持久层接口的的方法:
void batchUpdateLogistics(@Param("callMap") Map<String, String> callMap);
映射文件以下三种写法均可以,注意";"的使用:
<update id="batchUpdateLogistics" parameterType="map">
<foreach collection="callMap.entrySet()" item="value" index="key"
open="begin" close=";end;" separator=";">
update TD_LOGISTICS t set t.record=#{value} where t.sessionId=#{key}
</foreach>
</update>
<update id="batchUpdateLogistics" parameterType="map">
<foreach collection="callMap.entrySet()" item="value" index="key"
open="begin" close="end;" separator="">
update TD_LOGISTICS t set t.record=#{va