调用:
@Autowired
private myMapper myMapper;
@Test
public void contextLoads() {
HashMap<String, Object> hash = new HashMap<>();
List<QueryPatCostsRecipe> list = new ArrayList<QueryPatCostsRecipe>();
hash.put("as_in_parm", "传入数据");
hash.put("rs_return", "");
hash.put("rs_out_parm", "");
myMapper.test1(hash);
System.out.println(hash.get("rs_return"));
System.out.println(hash.get("rs_out_parm"));
}
mapper:
HashMap<String, Object> test1(HashMap<String, Object> map);
mapper.xml:
<select id="test1" resultType="String" flushCache="true" statementType="CALLABLE" parameterType="java.util.HashMap" >
<![CDATA[
{call zhiydba.zhis4_interface_service.pro_trade_cur5001(
#{as_in_parm, mode=IN, jdbcType=VARCHAR},
#{rs_return, mode=OUT, jdbcType=VARCHAR},
#{rs_out_parm, mode=OUT, jdbcType=VARCHAR})}
]]>
</select>