|
|
@@ -2,6 +2,8 @@ package vip.xiaonuo.exam.controller.student;
|
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@@ -35,7 +37,7 @@ import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
-
|
|
|
+@Api(tags = "作业相关")
|
|
|
@RestController("StudentExamPaperAnswerController")
|
|
|
@RequestMapping(value = "/api/student/exampaper/answer")
|
|
|
public class ExamPaperAnswerController extends BaseApiController {
|
|
|
@@ -74,8 +76,8 @@ public class ExamPaperAnswerController extends BaseApiController {
|
|
|
});
|
|
|
return CommonResult.data(pageInfo);
|
|
|
}
|
|
|
-
|
|
|
- @ApiOperation("每次提交的错题")
|
|
|
+ @ApiOperationSupport(order = 1)
|
|
|
+ @ApiOperation("提交次数")
|
|
|
@RequestMapping(value = "/answerSubmit", method = RequestMethod.POST)
|
|
|
public CommonResult<String> answerSubmit(@RequestBody @Valid ExamPaperSubmitVM examPaperSubmitVM) {
|
|
|
SaBaseLoginUser user = getCurrentUser();
|
|
|
@@ -95,7 +97,7 @@ public class ExamPaperAnswerController extends BaseApiController {
|
|
|
eventPublisher.publishEvent(new UserEvent(userEventLog));
|
|
|
return CommonResult.data(scoreVm);
|
|
|
}
|
|
|
-
|
|
|
+ @ApiOperationSupport(order = 2)
|
|
|
@ApiOperation("每次提交的分数")
|
|
|
@RequestMapping(value = "/edit", method = RequestMethod.POST)
|
|
|
public CommonResult<String> edit(@RequestBody @Valid ExamPaperSubmitVM examPaperSubmitVM) {
|
|
|
@@ -117,7 +119,8 @@ public class ExamPaperAnswerController extends BaseApiController {
|
|
|
eventPublisher.publishEvent(new UserEvent(userEventLog));
|
|
|
return CommonResult.data(score);
|
|
|
}
|
|
|
-
|
|
|
+ @ApiOperationSupport(order = 3)
|
|
|
+ @ApiOperation("每次提交的错题")
|
|
|
@RequestMapping(value = "/read/{id}", method = RequestMethod.POST)
|
|
|
public CommonResult<ExamPaperReadVM> read(@PathVariable Integer id) {
|
|
|
ExamPaperAnswer examPaperAnswer = examPaperAnswerService.selectById(id);
|