sql.xml:java
<parameterMap class="java.util.HashMap" id="AllocateResult">
<parameter property="city" jdbcType="VARCHAR2"
javaType="java.lang.String" mode="IN" />
<parameter property="agentCode" jdbcType="VARCHAR2"
javaType="java.lang.String" mode="IN" />
<parameter property="bcCode" jdbcType="VARCHAR2"
javaType="java.lang.String" mode="IN" />
<parameter property="id" jdbcType="NUMBER"
javaType="java.lang.Long" mode="IN" />
<parameter property="result" jdbcType="VARCHAR"
javaType="java.lang.String" mode="INOUT" />
</parameterMap>sql
<procedure id="DataAllocate_team_map"
parameterMap="AllocateResult">
call p_t_allocate(?,?,?,?,?)
</procedure>ide
java代碼:xml
Map resultMap = new HashMap();blog
resultMap.put("city", ins.getCity());
resultMap.put("agentCode", ins.getAgentCode());
resultMap.put("bcCode", ins.getAgentCode());
resultMap.put("id", ins.getId());
resultMap.put("result", result);ci
getSqlMapClientTemplate().queryForMap("DataAllocate_team_map", resultMap, "AllocateResult");get
result = (String) resultMap.get("result");it
存儲過程:class
我不會寫……總之返回的是個VARCHAR就是了。jdbc