ssm批量删除

mapper.xml

 
        delete from repository
        where repository_id in
        
            #{item}
        
    

dao层

 public void deleteRepository(Integer [] repository_id);//删除信息

controller层

@RequestMapping(value = "/deleteRepository")
    public void deleteRepository(Integer[] repository_id, HttpServletResponse response){
            repositoryService.deleteRepository(repository_id);//执行方法,将数据库中得信息删除
    }

 

你可能感兴趣的:(ssm批量删除)