无感五
2019-02-18 17:59使用SpringBoot+MybatisPlus做了一个单个删除DOM,请问批量怎么删除呢
40ContentCatService
//删除
public void delete(Integer id);
public class ContentCatServiceImpl implements ContentCatService{
//删除
public void delete(Integer id){
List<Integer> idList = new ArrayList<>();
idList.add(id);
contentCatMapper.deleteBatchIds(idList);
}
public class ContentCatController {
//删除
private SysResult delete(@PathVariable Integer id){
try {
contentCatService.delete(id);
return SysResult.ok();
}catch (Exception e){
e.printStackTrace();
return SysResult.build(201,"删除失败");
}
请问如果改为批量删除呢
- 点赞
- 回答
- 收藏
- 复制链接分享
4条回答
为你推荐
- 使用SpringBoot+MybatisPlus做了一个单个删除DOM,请问批量怎么删除呢
- java
- maven
- intellij-idea
- 4个回答