1、当传参为list 时:
1.1 mapper
接口中:
void updateContactsIsRead(List<Integer> logidList);
1.2 mapper.<update id="updateContactsIsRead">
update emaillog2 set isRead = 1 where isRead = 0 and logid in
<foreach collection="list" item="logid" index="index" open="(" close=")" separator=",">
#{logid,jdbcType=INTEGER}
</foreach>
</update>
原标题:MyBatis之传参
关键词:mybatis