一:list<String>集合
mapper类
对应的方法xml
<update id="teamMemberSignIn" parameterType="list"> update dance_member set sign_in_time = sysdate(), state = 1 where (state = 0 or state is null) and (is_captain = 1 or is_captain is null) and id in <foreach collection="list" item="id" open="(" separator="," close=")"> #{id} </foreach> </update>
二:list<Map>集合
mapper传入list<Map>
xml写法 <update id="updateCityPeopleNum" parameterType="list"> <foreach collection="list" item="list" index="index" separator=";"> update dance_city set number_of_people = #{list.score} where city_name = #{list.value} </foreach> </update>
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/137516.html