我找到了解决方案。映射必须是用户,而不是canCustomerSubscribe方法中的两个参数。
void canCustomerSubscribe(Map<String,Object> params);
mybatis xml内容:
<select id="canCustomerSubscribe" parameterType="java.util.HashMap" statementType="CALLABLE"> CALL wallet.pkg_wallet_validation.can_customer_subscribe( #{msisdn, jdbcType=VARCHAR, javaType=java.lang.String, mode=IN}, #{responseCode,jdbcType=NUMERIC, javaType=java.lang.Integer, mode=OUT})</select>(我需要在参数属性之间添加逗号)
从订阅服务方法调用它:
public void subscribe(String msisdn) throws InvalidArgumentException { Map<String, Object> params = new HashMap<String, Object>(); params.put("msisdn", msisdn); params.put("responseCode", null); subscriberMapper.canCustomerSubscribe(params); System.out.println(params.get("responseCode"));}


