Jelajahi Sumber

Cancel RequestMethod.GET

deason 5 tahun lalu
induk
melakukan
87e0c63ecf

+ 3 - 3
src/main/java/cn/com/qmth/examcloud/app/controller/OfflineExamController.java

@@ -47,14 +47,14 @@ public class OfflineExamController {
 
     @ResponseBody
     @ApiOperation(value = "获取当前用户参加的离线课程列表接口")
-    @RequestMapping(value = "/course/list", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/course/list", method = {RequestMethod.POST})
     public Result getOfflineExamCourseList(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token) throws Exception {
         return oeService.getOfflineExamCourseList(key, token);
     }
 
     @ResponseBody
     @ApiOperation(value = "离线考试的抽取考题接口")
-    @RequestMapping(value = "/record/start", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/record/start", method = {RequestMethod.POST})
     public Result startOfflineExamRecord(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String examStudentId) throws Exception {
         return oeService.startOfflineExamRecord(key, token, examStudentId);
     }
@@ -78,7 +78,7 @@ public class OfflineExamController {
 
     @ResponseBody
     @ApiOperation(value = "获取某份试卷的详细信息接口")
-    @RequestMapping(value = "/paper/detail", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/paper/detail", method = {RequestMethod.POST})
     public Result getPaperDetail(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String paperId) throws Exception {
         return questionService.getPaperDetail(key, token, paperId);
     }

+ 22 - 22
src/main/java/cn/com/qmth/examcloud/app/controller/PracticeExamRestController.java

@@ -38,134 +38,134 @@ public class PracticeExamRestController {
     private CoreQuestionService questionService;
 
     @ApiOperation(value = "获取某考生的“考试批次”列表接口")
-    @RequestMapping(value = "/exam/practice/list", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/exam/practice/list", method = {RequestMethod.POST})
     public Result getPracticeExamList(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String studentId) throws Exception {
         return examWorkService.getPracticeExamList(key, token, studentId);
     }
 
     @ApiOperation(value = "获取某考试批次下的课程列表接口")
-    @RequestMapping(value = "/exam/practice/course/list", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/exam/practice/course/list", method = {RequestMethod.POST})
     public Result getPracticeExamCourseList(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String examId) throws Exception {
         return oeService.getPracticeExamCourseList(key, token, examId);
     }
 
     @ApiOperation(value = "获取当前练习的剩余作答时间接口")
-    @RequestMapping(value = "/exam/record/heartbeat", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/exam/record/heartbeat", method = {RequestMethod.POST})
     public Result getExamRecordHeartbeat(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token) throws Exception {
         return oeService.getExamRecordHeartbeat(key, token);
     }
 
     @ApiOperation(value = "考生“开始练习”接口")
-    @RequestMapping(value = "/exam/record/start", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/exam/record/start", method = {RequestMethod.POST})
     public Result startPracticeExamRecord(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String examStudentId) throws Exception {
         return oeService.startPracticeExamRecord(key, token, examStudentId);
     }
 
     @ApiOperation(value = "获取当前练习的试卷大题结构信息接口")
-    @RequestMapping(value = "/exam/record/paper/struct/list", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/exam/record/paper/struct/list", method = {RequestMethod.POST})
     public Result getExamRecordPaperStructList(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String examRecordId) throws Exception {
         return oeService.getExamRecordPaperStructList(key, token, examRecordId);
     }
 
     @ApiOperation(value = "获取当前练习的考试基本信息接口")
-    @RequestMapping(value = "/exam/info/{examId}", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/exam/info/{examId}", method = {RequestMethod.POST})
     public Result getExamInfo(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @PathVariable Long examId) throws Exception {
         return examWorkService.getExamInfo(key, token, examId);
     }
 
     @ApiOperation(value = "获取当前练习的试卷试题列表接口")
-    @RequestMapping(value = "/exam/record/paper/question/list", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/exam/record/paper/question/list", method = {RequestMethod.POST})
     public Result getExamRecordPaperQuestionList(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token) throws Exception {
         return oeService.getExamRecordPaperQuestionList(key, token);
     }
 
     @ApiOperation(value = "获取考生作答的某个试题的详细信息接口")
-    @RequestMapping(value = "/exam/record/paper/question/detail/{questionId}/{examRecordId}", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/exam/record/paper/question/detail/{questionId}/{examRecordId}", method = {RequestMethod.POST})
     public Result questionDetail(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @PathVariable String questionId, @PathVariable String examRecordId) throws Exception {
         return oeService.getExamRecordPaperQuestionDetail(key, token, questionId, examRecordId);
     }
 
     @ApiOperation(value = "保存或更新考生作答的某个试题答案接口")
-    @RequestMapping(value = "/exam/record/paper/question/answer/update", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/exam/record/paper/question/answer/update", method = {RequestMethod.POST})
     public Result updateExamRecordPaperQuestionAnswer(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam Integer order, @RequestParam String studentAnswer) throws Exception {
         return oeService.updateExamRecordPaperQuestionAnswer(key, token, order, studentAnswer);
     }
 
     @ApiOperation(value = "当前练习的交卷接口")
-    @RequestMapping(value = "/exam/record/submit", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/exam/record/submit", method = {RequestMethod.POST})
     public Result submitPracticeExamRecord(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token) throws Exception {
         return oeService.submitPracticeExamRecord(key, token);
     }
 
     @ApiOperation(value = "检查考生当前是否有正在进行的练习记录接口")
-    @RequestMapping(value = "/exam/record/online/check", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/exam/record/online/check", method = {RequestMethod.POST})
     public Result checkOnlineExamRecord(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token) throws Exception {
         return oeService.checkOnlineExamRecord(key, token);
     }
 
     @ApiOperation(value = "获取当前考生的当前课程的历史练习记录接口")
-    @RequestMapping(value = "/exam/record/practice/course/history/list", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/exam/record/practice/course/history/list", method = {RequestMethod.POST})
     public Result getExamRecordPracticeHistoryList(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String examStudentId) throws Exception {
         return oeService.getExamRecordPracticeHistoryList(key, token, examStudentId);
     }
 
     @ApiOperation(value = "获取成绩报告的答题情况统计接口")
-    @RequestMapping(value = "/exam/record/total", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/exam/record/total", method = {RequestMethod.POST})
     public Result getExamRecordTotalInfo(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String examRecordId) throws Exception {
         return oeService.getExamRecordTotalInfo(key, token, examRecordId);
     }
 
     @ApiOperation(value = "获取作答的题列表接口")
-    @RequestMapping(value = "/exam/record/paper/question/detail/list", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/exam/record/paper/question/detail/list", method = {RequestMethod.POST})
     public Result getExamRecordQuestionDetailList(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String examRecordId) throws Exception {
         return oeService.getExamRecordQuestionDetailList(key, token, examRecordId);
     }
 
     @ApiOperation(value = "获取当前试题的音频已播放次数接口")
-    @RequestMapping(value = "/exam/record/paper/question/get/playtimes", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/exam/record/paper/question/get/playtimes", method = {RequestMethod.POST})
     public Result getExamRecordQuestionAudioPlayTimes(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String questionId) throws Exception {
         return oeService.getExamRecordQuestionAudioPlayTimes(key, token, questionId);
     }
 
     @ApiOperation(value = "更新当前试题的音频已播放次数接口")
-    @RequestMapping(value = "/exam/record/paper/question/update/playtimes", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/exam/record/paper/question/update/playtimes", method = {RequestMethod.POST})
     public Result updateExamRecordQuestionAudioPlayTimes(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String questionId, @RequestParam String mediaName) throws Exception {
         return oeService.updateExamRecordQuestionAudioPlayTimes(key, token, questionId, mediaName);
     }
 
     @ApiOperation(value = "开考前查询“考试说明”")
-    @RequestMapping(value = "/exam/practice/before/{examId}/{type}", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/exam/practice/before/{examId}/{type}", method = {RequestMethod.POST})
     public Result getBeforeExamRemark(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @PathVariable Long examId, @PathVariable String type) throws Exception {
         return examWorkService.getBeforeExamRemark(key, token, examId, type);
     }
 
     @ApiOperation(value = "查询练习记录配置信息")
-    @RequestMapping(value = "/exam/practice/end/findExamRecordDataEntity/{examRecordDataId}", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/exam/practice/end/findExamRecordDataEntity/{examRecordDataId}", method = {RequestMethod.POST})
     public Result findExamRecordDataEntity(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @PathVariable Long examRecordDataId) throws Exception {
         return oeService.findExamRecordDataEntity(key, token, examRecordDataId);
     }
 
     @ApiOperation(value = "查询练习记录试题列表")
-    @RequestMapping(value = "/exam/practice/end/getExamRecordQuestions/{examRecordDataId}", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/exam/practice/end/getExamRecordQuestions/{examRecordDataId}", method = {RequestMethod.POST})
     public Result getExamRecordQuestions(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @PathVariable Long examRecordDataId) throws Exception {
         return oeService.getExamRecordQuestions(key, token, examRecordDataId);
     }
 
     @ApiOperation(value = "查询某个试题内容")
-    @RequestMapping(value = "/exam/practice/end/question", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/exam/practice/end/question", method = {RequestMethod.POST})
     public Result getQuestion(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String courseCode,
                               @RequestParam Long examId, @RequestParam String groupCode, @RequestParam String questionId) throws Exception {
         return questionService.getQuestion(key, token, courseCode, examId, groupCode, questionId);
     }
 
     @ApiOperation(value = "获取冻结时间")
-    @RequestMapping(value = "/exam/practice/getFreezeTime", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/exam/practice/getFreezeTime", method = {RequestMethod.POST})
     public Result getFreezeTime(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam Long examId) throws Exception {
         return examWorkService.getFreezeTime(key, token, examId);
     }
 
     @ApiOperation(value = "获取文件上传类型")
-    @RequestMapping(value = "/exam/practice/getUpLoadType/{examId}", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/exam/practice/getUpLoadType/{examId}", method = {RequestMethod.POST})
     public Result getUpLoadType(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @PathVariable Long examId) throws Exception {
         return examWorkService.getUpLoadType(key, token, examId);
     }

+ 4 - 4
src/main/java/cn/com/qmth/examcloud/app/controller/SystemRestController.java

@@ -38,25 +38,25 @@ public class SystemRestController {
     private SmsService smsService;
 
     @ApiOperation(value = "获取服务器当前时间接口")
-    @RequestMapping(value = "/system/currentTime", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/system/currentTime", method = {RequestMethod.POST})
     public Result getCurrentTime(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token) throws Exception {
         return oeService.getCurrentTime(key, token);
     }
 
     @ApiOperation(value = "获取短信验证码接口")
-    @RequestMapping(value = "/send/sms/code", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/send/sms/code", method = {RequestMethod.POST})
     public Result sendSmsCode(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String phone) throws Exception {
         return authService.sendSmsCode(key, token, phone);
     }
 
     @ApiOperation(value = "获取短信验证码接口(不带token)")
-    @RequestMapping(value = "/send/sms/code4Student", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/send/sms/code4Student", method = {RequestMethod.POST})
     public Result sendSmsCode(@RequestParam String phone) throws Exception {
         return authService.code4Student(phone, true);
     }
 
     @ApiOperation(value = "校验短信验证码接口", hidden = true)
-    @RequestMapping(value = "/check/sms/code", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/check/sms/code", method = {RequestMethod.POST})
     public Result checkSmsCode(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String phone, @RequestParam String code) throws Exception {
         return smsService.checkSmsCode(key, token, phone, code);
     }

+ 7 - 7
src/main/java/cn/com/qmth/examcloud/app/controller/UserAuthRestController.java

@@ -41,7 +41,7 @@ public class UserAuthRestController {
     private CoreBasicService basicService;
 
     @ApiOperation(value = "登录接口", notes = "参数accountType值说明:学生身份证号类型=STUDENT_IDENTITY_NUMBER,学生学号类型=STUDENT_CODE,学生手机号类型=STUDENT_PHONE")
-    @RequestMapping(value = "/user/login", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/user/login", method = {RequestMethod.POST})
     public Result<UserInfo> login(@RequestParam String account, @RequestParam String password, @RequestParam String accountType, @RequestParam(required = false) Long rootOrgId,
                                   @RequestParam(required = false) String domain, @RequestHeader String deviceId) throws Exception {
         LoginInfo loginInfo = new LoginInfo(account, password, accountType, rootOrgId, domain, deviceId, null);
@@ -60,7 +60,7 @@ public class UserAuthRestController {
     }
 
     @ApiOperation(value = "验证码接口", notes = "参数accountType值说明:学生身份证号类型=STUDENT_IDENTITY_NUMBER,学生学号类型=STUDENT_CODE,学生手机号类型=STUDENT_PHONE")
-    @RequestMapping(value = "/user/verify", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/user/verify", method = {RequestMethod.POST})
     public Result<UserInfo> verifyLogin(@RequestParam String account, @RequestParam String smsCode, @RequestParam(required = false) Long rootOrgId,
                                         @RequestParam(required = false) String domain, @RequestHeader String deviceId) throws Exception {
         LoginInfo loginInfo = new LoginInfo(account, null, LoginType.STUDENT_PHONE.name(), rootOrgId, domain, deviceId, smsCode);
@@ -79,33 +79,33 @@ public class UserAuthRestController {
     }
 
     @ApiOperation(value = "登出接口")
-    @RequestMapping(value = "/user/logout", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/user/logout", method = {RequestMethod.POST})
     public Result logout(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token) throws Exception {
         return authService.logout(key, token);
     }
 
     @ApiOperation(value = "获取用户信息接口")
-    @RequestMapping(value = "/user/info", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/user/info", method = {RequestMethod.POST})
     public Result getUserInfo(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token) throws Exception {
         //return authService.getUserInfo(key, token);
         return basicService.getStudentInfo(key, token);
     }
 
     @ApiOperation(value = "修改密码接口")
-    @RequestMapping(value = "/user/update/password", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/user/update/password", method = {RequestMethod.POST})
     public Result updatePassword(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam Long studentId, @RequestParam String password,
                                  @RequestParam String newPassword) throws Exception {
         return authService.updateStudentPassword(key, token, studentId, password, newPassword);
     }
 
     @ApiOperation(value = "重置密码接口")
-    @RequestMapping(value = "/user/reset/password", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/user/reset/password", method = {RequestMethod.POST})
     public Result updateNewPassword(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String newPassword) throws Exception {
         return authService.resetStudentPassword(key, token, newPassword);
     }
 
     @ApiOperation(value = "保存用户绑定的手机号接口")
-    @RequestMapping(value = "/user/binding/phone", method = {RequestMethod.GET, RequestMethod.POST})
+    @RequestMapping(value = "/user/binding/phone", method = {RequestMethod.POST})
     public Result userBindingPhone(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String phone, @RequestParam String code) throws Exception {
         return authService.userBindingPhone(key, token, phone, code);
     }