我需要使用注释在 MyBatis 中调用 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为空,mapper 的返回也为空。
谁能帮我?