Skip to content
This repository was archived by the owner on Apr 18, 2026. It is now read-only.
This repository was archived by the owner on Apr 18, 2026. It is now read-only.

帖子删除接口只删除帖子表,未完全删除帖子相关联表数据 #76

Description

@hulunkunzao

postService 调用的 removeById 只删除 post 表中的数据,而帖子内容相关的 comment,like,post_details,post_image,post_topic 中数据未删除,同时由于 like 表的数据变动,也需要修改 user_details 中获赞总数字段,以及帖子总数字段

@DeleteMapping("/{postId}")
@Operation(summary = "删除帖子", description = "根据帖子ID删除指定帖子")
public Result<?> delete(@PathVariable Integer postId) {
postService.removeById(postId);
return Result.success();
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions