接口全部使用使用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

@@ -0,0 +1,12 @@
package com.cool.store.dto.content;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class ContentDelDto {
@ApiModelProperty("动态id")
private String contentId;
}

View File

@@ -0,0 +1,12 @@
package com.cool.store.dto.content;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class ContentQueryDetailDto {
@ApiModelProperty("动态id")
private String contentId;
}

View File

@@ -0,0 +1,12 @@
package com.cool.store.dto.partner;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class PartnerGetPassLetterDetailDto {
@ApiModelProperty("面试计划id")
private String interviewPlanId;
}

View File

@@ -0,0 +1,12 @@
package com.cool.store.dto.partner;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class PartnerQueryInterviewDto {
@ApiModelProperty("加盟商用户id")
private String partnerId;
}

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()));
}
}

View File

@@ -1,5 +1,6 @@
package com.cool.store.controller;
import com.cool.store.dto.content.ContentQueryDetailDto;
import com.cool.store.dto.content.ContentQueryListDto;
import com.cool.store.entity.HyContentInfoDO;
import com.cool.store.response.ResponseResult;
@@ -35,8 +36,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()));
}
}

View File

@@ -1,6 +1,8 @@
package com.cool.store.controller;
import com.cool.store.dto.partner.EnterInterviewDto;
import com.cool.store.dto.partner.PartnerGetPassLetterDetailDto;
import com.cool.store.dto.partner.PartnerQueryInterviewDto;
import com.cool.store.exception.ApiException;
import com.cool.store.request.CreateAppointmentReq;
import com.cool.store.request.ModifyInterviewTimeReq;
@@ -30,8 +32,8 @@ public class InterviewController {
@PostMapping("/queryByPartnerId")
@ApiOperation("根据用户id查询面试信息")
public ResponseResult<PartnerInterviewInfoVO> queryByPartnerId(@RequestBody String partnerId) {
return ResponseResult.success(interviewService.queryByPartnerId(partnerId));
public ResponseResult<PartnerInterviewInfoVO> queryByPartnerId(@RequestBody PartnerQueryInterviewDto dto) {
return ResponseResult.success(interviewService.queryByPartnerId(dto.getPartnerId()));
}
@PostMapping("/enter")
@@ -42,8 +44,8 @@ public class InterviewController {
@PostMapping("/passLetter/detail")
@ApiOperation("通过函详情")
public ResponseResult<PartnerPassLetterDetailVO> passLetterDetail(@RequestParam String interviewPlanId) {
return ResponseResult.success(interviewService.passLetterDetail(interviewPlanId));
public ResponseResult<PartnerPassLetterDetailVO> passLetterDetail(@RequestBody PartnerGetPassLetterDetailDto dto) {
return ResponseResult.success(interviewService.passLetterDetail(dto.getInterviewPlanId()));
}
@PostMapping("/appointment/submit")