接口全部使用使用POST请求加请求体的方式

This commit is contained in:
pserimal
2023-06-21 17:22:06 +08:00
parent 4a3f49d1fc
commit afbca96734
7 changed files with 62 additions and 13 deletions

View File

@@ -1,8 +1,6 @@
package com.cool.store.controller;
import com.cool.store.dto.content.ContentAddDto;
import com.cool.store.dto.content.ContentQueryListDto;
import com.cool.store.dto.content.ContentUpdateDto;
import com.cool.store.dto.content.*;
import com.cool.store.entity.HyContentInfoDO;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.ContentService;
@@ -34,8 +32,8 @@ public class ContentController {
@PostMapping("/delete")
@ApiOperation("删除动态")
public ResponseResult deleteContent(@RequestParam(value = "contentId") String contentId) {
contentService.deleteContent(contentId);
public ResponseResult deleteContent(@RequestBody ContentDelDto dto) {
contentService.deleteContent(dto.getContentId());
return ResponseResult.success();
}
@@ -57,8 +55,8 @@ public class ContentController {
@PostMapping("/detail")
@ApiOperation("动态详情")
public ResponseResult<HyContentInfoDO> queryContentInfo(@RequestBody String contentId) {
return ResponseResult.success(contentService.queryContentInfo(contentId));
public ResponseResult<HyContentInfoDO> queryContentInfo(@RequestBody ContentQueryDetailDto dto) {
return ResponseResult.success(contentService.queryContentInfo(dto.getContentId()));
}
}