优化和完善批量删除动态功能

实现动态软删除,被删除的动态的状态将改为3,将动态关联的评论,点赞,收藏硬删除
This commit is contained in:
KilLze
2026-01-03 20:57:37 +08:00
parent 2ce8116126
commit 413bafa275
11 changed files with 103 additions and 33 deletions

View File

@@ -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);
}
/**