<update id="updatePlayListSortByMap" parameterType="map">
UPDATE library_play_list SET
sort = CASE `play_list_id`
<foreach collection="newPlayListSort" item="value" index="key">
WHEN #{key} THEN #{value}
</foreach>
END
WHERE play_list_id IN
<foreach collection="newPlayListSort" item="value" index="key" open="(" separator="," close=")">
#{key}
</foreach>
</update>
mybatis批量修改
最新推荐文章于 2022-09-09 11:17:22 发布