From cf41c0e75f800acea608c5abf13ea7344f67b537 Mon Sep 17 00:00:00 2001 From: wushaofeng <846162692@qq.com> Date: Wed, 30 Dec 2020 17:17:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=AD=9B=E9=80=89=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2--By=20Ternece?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ExaminationPaperProductionController.java | 13 +++++++++++-- .../com/mindskip/xzs/repository/QuestionMapper.java | 4 ++++ .../service/ExaminationPaperProductionService.java | 1 + .../impl/ExaminationPaperProductionServiceImpl.java | 8 ++++++++ .../src/main/resources/mapper/QuestionMapper.xml | 9 +++++++++ 5 files changed, 33 insertions(+), 2 deletions(-) diff --git a/source/xzs/src/main/java/com/mindskip/xzs/controller/student/ExaminationPaperProductionController.java b/source/xzs/src/main/java/com/mindskip/xzs/controller/student/ExaminationPaperProductionController.java index f79a69b..c394ec3 100644 --- a/source/xzs/src/main/java/com/mindskip/xzs/controller/student/ExaminationPaperProductionController.java +++ b/source/xzs/src/main/java/com/mindskip/xzs/controller/student/ExaminationPaperProductionController.java @@ -12,15 +12,24 @@ import javax.validation.Valid; import java.util.List; @RestController("ExaminationPaperProductionController") -@RequestMapping(value = "/api/student/examination/paper") +@RequestMapping(value = "/api/student/examination") @AllArgsConstructor public class ExaminationPaperProductionController extends BaseApiController { private final ExaminationPaperProductionService examinationPaperProductionService; - @RequestMapping(value = "/production", method = RequestMethod.POST) + @RequestMapping(value = "/paper", method = RequestMethod.GET) + public RestResponse paper(){ + List paper = examinationPaperProductionService.paper(); + return RestResponse.ok(paper); + } + + @RequestMapping(value = "/paper/production", method = RequestMethod.POST) public RestResponse paperProduction(@RequestBody @Valid ExaminationProductionVM examinationProductionVM){ List questionList = examinationPaperProductionService.generation(examinationProductionVM); return RestResponse.ok(questionList); } + + + } diff --git a/source/xzs/src/main/java/com/mindskip/xzs/repository/QuestionMapper.java b/source/xzs/src/main/java/com/mindskip/xzs/repository/QuestionMapper.java index bbf9799..f02d093 100644 --- a/source/xzs/src/main/java/com/mindskip/xzs/repository/QuestionMapper.java +++ b/source/xzs/src/main/java/com/mindskip/xzs/repository/QuestionMapper.java @@ -33,4 +33,8 @@ public interface QuestionMapper extends BaseMapper { List selectCountByDate(@Param("startTime") Date startTime, @Param("endTime") Date endTime); List selectQuestionsByQuestionsNumber(@Param("eachList") List eachList); + + List selectAllSkills(); + + List selectAllIndustry(); } diff --git a/source/xzs/src/main/java/com/mindskip/xzs/service/ExaminationPaperProductionService.java b/source/xzs/src/main/java/com/mindskip/xzs/service/ExaminationPaperProductionService.java index cc9e44c..4cb73a7 100644 --- a/source/xzs/src/main/java/com/mindskip/xzs/service/ExaminationPaperProductionService.java +++ b/source/xzs/src/main/java/com/mindskip/xzs/service/ExaminationPaperProductionService.java @@ -9,4 +9,5 @@ public interface ExaminationPaperProductionService extends BaseService List generation(ExaminationProductionVM examinationProductionVM); + List paper(); } diff --git a/source/xzs/src/main/java/com/mindskip/xzs/service/impl/ExaminationPaperProductionServiceImpl.java b/source/xzs/src/main/java/com/mindskip/xzs/service/impl/ExaminationPaperProductionServiceImpl.java index 33c3500..135890d 100644 --- a/source/xzs/src/main/java/com/mindskip/xzs/service/impl/ExaminationPaperProductionServiceImpl.java +++ b/source/xzs/src/main/java/com/mindskip/xzs/service/impl/ExaminationPaperProductionServiceImpl.java @@ -67,4 +67,12 @@ public class ExaminationPaperProductionServiceImpl extends BaseServiceImpl paper(){ + List questions1 = questionMapper.selectAllSkills(); + List questions2 = questionMapper.selectAllIndustry(); + questions1.addAll(questions2); + return questions1; + } } diff --git a/source/xzs/src/main/resources/mapper/QuestionMapper.xml b/source/xzs/src/main/resources/mapper/QuestionMapper.xml index 798113a..2cc1a6c 100644 --- a/source/xzs/src/main/resources/mapper/QuestionMapper.xml +++ b/source/xzs/src/main/resources/mapper/QuestionMapper.xml @@ -256,6 +256,15 @@ + + +