修bug(这git怎么这么难用啊😡😡😡)

This commit is contained in:
KilLze
2025-12-25 18:37:20 +08:00
parent 176e133a57
commit df463f2a52
4 changed files with 18 additions and 18 deletions

View File

@@ -52,8 +52,8 @@ public class PostController {
*/
@DeleteMapping
public Result<String> deleteById(@RequestParam List<Long> postIds){
postService.deletePostById(postIds);
return Result.success(ResultCode.SUCCESS_DELETE, "动态删除成功", null);
int deletedCount = postService.deletePostById(postIds);
return Result.success(ResultCode.SUCCESS_DELETE, deletedCount > 0 ? "成功删除" : "删除失败,该动态不存在", null);
}
/**