<update id="updateReturnOrderStatus" parameterType="java.util.Map">
update LTE_TFJ_DATA_DEAL set STATUS=#{status}
<if test="dealTime != null">
,DEAL_TIMES=DEAL_TIMES+#{dealTime} <!-- 自增长 1 -->
</if>
where ORDER_ID in
<foreach item="item" index="index" collection="orderIds" open="(" separator="," close=")">
#{item}
</foreach>
</update>
1,传入参数:
Map<String,Object> map = new HashMap<String,Object>();
map.put("dealTime",1);
map.put("orderIds",orderIds);//orderIds可以为字符串数组或是list
2,update test set test_count=test_count+1
搞了两个多小时,才知道这种写法也可以,崩溃
3,mybatis执行sql***