springboot批量删除

1、Controller 

@RequestMapping("delete")
public Result delete(@RequestBody Map map) {
       List ids = Arrays.asList(map.get("ids").toString().split(","));
       service.delete(ids);
       return ResultUtil.success();
}

2、Service

public void delete(List ids){
        mapper.delete(ids);
}

3、Mapper

void delete(List ids);

4、xml


        delete from tl_banner where id in
        
            #{id}
        

5、post测试

springboot批量删除_第1张图片

 

你可能感兴趣的:(springboot,spring,boot,java)