1 回答
TA贡献1785条经验 获得超4个赞
我刚刚设法弄清楚了,我想我必须自己回答,以防万一它帮助别人......,事实证明,我最终设法通过只发送1个map作为参数来获取参数,并在服务方法中设置IN值...此外,映射器现在正在返回 void,这意味着 mybatis 正在动态地将所有额外的 out 参数添加到映射中。我还对调用语句进行了一些更改,也许那里也有错误?
代码的结尾如下:
//service call
public Map<String, Object> callProcedure(String param){
Map<String, Object> map = new HashMap<String, Object>();
Integer privilegesCount = 0;
map.put("p_id_grupo_familiar", Integer.valueOf(param));
asociadoMapper.callProcedure(map);
return map;
}
//mapper
@Select(value = AsociadoQueries.getDocumentoAsociadoCall)
@Options(statementType = StatementType.CALLABLE)
void callProcedure(Map<String,Object> params);
// Call statement
public static final String getDocumentoAsociadoCall = "{ CALL consultas_generales.get_detalle_cliente_gf(" +
"#{p_id_grupo_familiar, jdbcType=NUMERIC ,javaType=java.lang.Integer ,mode=IN}," +
"#{p_tipo_cliente, jdbcType=NUMERIC,javaType=java.lang.Integer ,mode=OUT,},"+
"#{p_codigo_cliente, jdbcType=NUMERIC ,javaType=java.lang.Integer ,mode=OUT},"+
"#{p_nombre_cliente, jdbcType=VARCHAR ,javaType=java.lang.String ,mode=OUT},"+
"#{p_cuit_cliente, jdbcType=VARCHAR ,javaType=java.lang.String ,mode=OUT},"+
"#{p_cuit_rp, jdbcType=VARCHAR ,javaType=java.lang.String ,mode=OUT},"+
"#{p_razon_social_rp, jdbcType=VARCHAR ,javaType=java.lang.String ,mode=OUT},"+
"#{p_domicilio, jdbcType=VARCHAR ,javaType=java.lang.String ,mode=OUT}"+
")}";
添加回答
举报