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>
逃避不一定躲得过,面对不一定最难过