UserService
@Override
public void deleteAll(List ids) {
userDao.deleteAll(ids);
}
UserController
@RequestMapping(“deleteAll.do”)
public String deleteAll(String userList){
String[] strs = userList.split(",");
List ids=new ArrayList<>();
for(String s:strs){
ids.add(Integer.parseInt(s));
}
userService.deleteAll(ids);
return "redirect:findAll.do";
Userdao
User findUserByUserName(String username);
List<User> findAll(@Param("start") int start,@Param("username") String username);
void deleteById(int id);
void add(User user);
User selectById(int id);
void update(User user);
int getTotalCount(@Param("username")String username);
void deleteAll(@Param("ids") List<Integer> ids);
Loginfilter
@Overr