<update id="disableUsers"> UPDATE t_user SET disable_flag = #{disable} WHERE 1 = 1 <if test="userIds != null and userIds.size > 0"> AND id IN <foreach collection="item" item="item" open="(" separator="," close=")"> #{item} </foreach> </if> </update>
标签:传入,list,disable,数组,MyBatis,写法 From: https://www.cnblogs.com/zzcsza/p/17434628.html