MyBatis传入参数为数组、list的写法
<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>

浙公网安备 33010602011771号