Browse Source

RequestBody

deason 5 years ago
parent
commit
7bdd0cc2bb

+ 3 - 2
examcloud-exchange-outer-api-provider/src/main/java/cn/com/qmth/examcloud/exchange/outer/api/provider/ExamQuestionOuterServiceProvider.java

@@ -34,6 +34,7 @@ import org.jsoup.nodes.Element;
 import org.jsoup.select.Elements;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
@@ -68,7 +69,7 @@ public class ExamQuestionOuterServiceProvider extends ControllerSupport implemen
     @ApiResponses({@ApiResponse(code = 200, message = "成功", response = OuterGetScoreQueueTopResp.class),
             @ApiResponse(code = 500, message = "系统异常(异常信息见响应体)", response = StatusResponse.class)})
     @PostMapping("/getSubjectivePaperStruct")
-    public OuterGetSubjectivePaperStructResp getSubjectivePaperStruct(OuterGetSubjectivePaperStructReq req) {
+    public OuterGetSubjectivePaperStructResp getSubjectivePaperStruct(@RequestBody OuterGetSubjectivePaperStructReq req) {
         if (req.getExamId() == null) {
             throw new StatusException("101201", "考试ID不能为空");
         }
@@ -119,7 +120,7 @@ public class ExamQuestionOuterServiceProvider extends ControllerSupport implemen
             @ApiResponse(code = 500, message = "系统异常(异常信息见响应体)", response = StatusResponse.class)})
     @PostMapping("/getSubjectiveQuestion")
     @Override
-    public OuterGetSubjectiveQuestionResp getSubjectiveQuestion(OuterGetSubjectiveQuestionReq req) {
+    public OuterGetSubjectiveQuestionResp getSubjectiveQuestion(@RequestBody OuterGetSubjectiveQuestionReq req) {
         Long examId = req.getExamId();
         if (null == examId) {
             throw new StatusException("101001", "考试id不允许为空");