POST请求使用Body发送参数

This commit is contained in:
pserimal
2023-06-21 15:13:50 +08:00
parent bbf3d47de5
commit 9e5ad14f30
3 changed files with 4 additions and 3 deletions

View File

@@ -57,7 +57,7 @@ public class ContentController {
@PostMapping("/detail")
@ApiOperation("动态详情")
public ResponseResult<HyContentInfoDO> queryContentInfo(@RequestParam String contentId) {
public ResponseResult<HyContentInfoDO> queryContentInfo(@RequestBody String contentId) {
return ResponseResult.success(contentService.queryContentInfo(contentId));
}

View File

@@ -35,7 +35,7 @@ public class ContentController {
@PostMapping("/detail")
@ApiOperation("动态详情")
public ResponseResult<HyContentInfoDO> queryContentInfo(@RequestParam String contentId) {
public ResponseResult<HyContentInfoDO> queryContentInfo(@RequestBody String contentId) {
return ResponseResult.success(contentService.queryContentInfo(contentId));
}

View File

@@ -19,6 +19,7 @@ import org.springframework.web.bind.annotation.*;
@Api(tags = "加盟商资格面试")
@RestController
@RequestMapping("/interview")
@CrossOrigin
public class InterviewController {
@Autowired
@@ -29,7 +30,7 @@ public class InterviewController {
@PostMapping("/queryByPartnerId")
@ApiOperation("根据用户id查询面试信息")
public ResponseResult<PartnerInterviewInfoVO> queryByPartnerId(@RequestParam String partnerId) {
public ResponseResult<PartnerInterviewInfoVO> queryByPartnerId(@RequestBody String partnerId) {
return ResponseResult.success(interviewService.queryByPartnerId(partnerId));
}