将删除动态优化为批量删除动态
This commit is contained in:
@@ -45,14 +45,14 @@ public class PostController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除动态
|
||||
* 批量删除动态
|
||||
*
|
||||
* @param postId 动态ID
|
||||
* @param postIds 动态ID
|
||||
* @return 删除结果
|
||||
*/
|
||||
@DeleteMapping("/{postId}")
|
||||
public Result<String> deleteById(@PathVariable Long postId){
|
||||
postService.deletePostById(postId);
|
||||
@DeleteMapping
|
||||
public Result<String> deleteById(@RequestParam List<Long> postIds){
|
||||
postService.deletePostById(postIds);
|
||||
return Result.success(ResultCode.SUCCESS_DELETE, "动态删除成功", null);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user