优化和完善批量删除动态功能
实现动态软删除,被删除的动态的状态将改为3,将动态关联的评论,点赞,收藏硬删除
This commit is contained in:
@@ -61,7 +61,7 @@ public class PostController {
|
||||
@PostMapping("/deletePost")
|
||||
public Result<String> deleteById(@RequestBody List<Long> postIds){
|
||||
int deletedCount = postService.deletePostById(postIds);
|
||||
return Result.success(ResultCode.SUCCESS_DELETE, deletedCount > 0 ? "成功删除" : "删除失败,该动态不存在", null);
|
||||
return Result.success(ResultCode.SUCCESS_DELETE, "成功删除" + deletedCount + "条动态", null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user