mybatis批量删除

mapper.java:

int batchDeleteByLogIds(@Param("logIds") List<Integer> logIds);

mapper.xml

<delete id="batchDeleteByLogIds" parameterType="java.util.List">
    DELETE FROM tb_plc_import_relation WHERE log_id IN
    <foreach collection="logIds" index="index" item="item" open="(" separator="," close=")">
        #{item}
    </foreach>
</delete>

 

posted @ 2016-06-20 15:01  艺言弈行  阅读(356)  评论(0编辑  收藏  举报