Mybatis 实现批量修改
<update id="batchUpdate">
update yzsydj
<set>
<if test="yzsydj.djrq!=null">
djrq=#{djrq},
</if>
<if test="yzsydj.ghrq!=null">
ghrq=#{ghrq},
</if>
<if test="yzsydj.zt!=null">
zt=#{zt},
</if>
<if test="yzsydj.djrId!=null">
djr_id=#{djrId}
</if>
</set>
where id in
<foreach item="item" index="index" collection="ids.split(',')" open="(" separator="," close=")" >
#{item}
</foreach>
</update>
ids格式 ——>String ids = xxx,xxx,xxx