原文:https://blog.csdn.net/qq_40010745/article/details/81032218 mybatis 根据id批量删除的两种方法 第一种,直接传递给mapper.xml 集合/数组形式 <delete id="deleteByLogic" parameterType = "java.util.List"> delete from user where 1>2 or id in <foreac
1.Java代码: 1.1 entity类: User.java public class User { private int userId; private String userName; private String password; private String comment; //这里要添加 setter and getter 略 } 1.2 DAO类: UserDao.java public interface UserDao { public int insertAndGe