MyBatis에서 Annotation을 사용하여 Oracle Function을 호출해야합니다.MyBatis (Annotation Based)로 Oracle 함수 호출하기
내 매퍼 :
@Select("{ CALL #{outParam, jdbcType=NUMERIC, mode=OUT} := ORA_FUNC("
+ "#{pNum1, jdbcType=NUMERIC, mode=IN},"
+ "#{pNum2, jdbcType=NUMERIC, mode=IN},"
+ "#{pNum3, jdbcType=NUMERIC, mode=IN})}")
@Options(statementType = StatementType.CALLABLE)
@ResultType(Integer.class)
public Integer executeFunction(
@Param("map") Map<String, Object> carteira);
이 서명에 내 전화 :
Map<String, Object> mapParameters = new HashMap<String, Object>();
mapParameters.put("pNum1", carteira.getUnimedCarteira());
mapParameters.put("pNum2", carteira.getCodCarteira());
mapParameters.put("pNum3", carteira.getDigitoCarteira());
mapper.obterRedeBeneficiario(mapParameters);
return mapParameters.get("outParam").toString();
outParam가 null 매퍼의 반환이 너무 null입니다.
아무도 도와 줄 수 있습니까?
http://stackoverflow.com/questions/26739636/mybatis-mapping- 아래로 maaper을 변경할 수 있습니다 for-fetching-of-custom-record-types-in-oracle/26765161 # 26765161 완전한 예제를 추가했습니다 –
Karthik,이 예제는 XML 기반입니다. 주석 기반의 유사한 비트로 작업 해보십시오 – mEstrazulas
Google에 알려주십시오. 너 무슨 변화가 있었 니? –