src/main/java/com/ycl/jxkg/domain/vo/admin/exam/ExamPaperPageRequestVO.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/ycl/jxkg/job/StudyRecordJob.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/ycl/jxkg/service/impl/ExamPaperServiceImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/ycl/jxkg/service/impl/ExamServiceImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/application-prod.yml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/application.yml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/mapper/ExamMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/resources/mapper/ExamPaperMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/ycl/jxkg/domain/vo/admin/exam/ExamPaperPageRequestVO.java
@@ -19,4 +19,6 @@ private BigDecimal score; private Integer createUser; } src/main/java/com/ycl/jxkg/job/StudyRecordJob.java
@@ -32,7 +32,7 @@ private final StudyRecordMapper studyRecordMapper; private final StudyRecordService studyRecordService; @Scheduled(fixedRate = 120000) // 2分钟执行一次 @Scheduled(fixedRate = 1200000) // 2分钟执行一次 private void updateStudyRecord() { log.info("开始存学习时长"); List<StudyRecord> cacheList = new ArrayList<>(); src/main/java/com/ycl/jxkg/service/impl/ExamPaperServiceImpl.java
@@ -185,7 +185,7 @@ @Override public PageInfo<ExamResponseVO> page(ExamPaperPageRequestVO requestVM) { //TODO: 数据权限 requestVM.setCreateUser(webContext.getCurrentUser().getId()); PageInfo<ExamPaper> page = PageHelper.startPage(requestVM.getPageIndex(), requestVM.getPageSize(), "id desc").doSelectPageInfo(() -> examPaperMapper.page(requestVM)); PageInfo<ExamResponseVO> pageVO = PageInfoHelper.copyMap(page, e -> { src/main/java/com/ycl/jxkg/service/impl/ExamServiceImpl.java
@@ -373,6 +373,24 @@ doQuestionVO.setQuestionType(item.getQuestionType()); //增加题目分数 doQuestionVO.setQuestionScore(question.getScore()); // 题目副本 QuestionAnswerCopyVO copy = new QuestionAnswerCopyVO(); copy.setId(question.getId()); copy.setAnalyze(question.getAnalyze()); copy.setDifficult(question.getDifficult()); //填空的答案在Json里 if (QuestionTypeEnum.GapFilling.getCode().equals(item.getQuestionType())) { List<String> gapAnswer = new ArrayList<>(); for (QuestionItemObject questionItemObject : question.getItems()) { gapAnswer.add(questionItemObject.getContent()); } copy.setCorrect(String.join(ANSWER_SPLIT, gapAnswer)); } else { copy.setCorrect(question.getCorrect()); } questionAnswerCopyVOList.add(copy); // 填空题需要抹除content(因为是答案) if (QuestionTypeEnum.GapFilling.getCode().equals(doQuestionVO.getQuestionType())) { question.getItems().stream().forEach(option -> { @@ -383,24 +401,6 @@ doQuestionVO.setId(question.getId()); doQuestionVO.setOriginalFile(question.getOriginalFile()); doQuestionVO.setAudioFile(question.getAudioFile()); // 题目副本 QuestionAnswerCopyVO copy = new QuestionAnswerCopyVO(); copy.setId(question.getId()); copy.setAnalyze(question.getAnalyze()); copy.setDifficult(question.getDifficult()); //填空的答案在Json里 if (QuestionTypeEnum.GapFilling.getCode().equals(item.getQuestionType())) { List<String> gapAnswer = new ArrayList<>(); for (QuestionItemObject questionItemObject : doQuestionVO.getQuestionItemList()) { gapAnswer.add(questionItemObject.getContent()); } copy.setCorrect(String.join(ANSWER_SPLIT, gapAnswer)); } else { copy.setCorrect(question.getCorrect()); } questionAnswerCopyVOList.add(copy); return doQuestionVO; }).collect(Collectors.toList()); if (ExamPaperTypeEnum.RandomOrder.getCode().equals(examPaper.getPaperType())) { src/main/resources/application-prod.yml
@@ -3,13 +3,13 @@ upload: # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath) url: /usr/local/file url: E:/ycl/file spring: datasource: url: jdbc:mysql://localhost:3306/xzs?useSSL=true&useUnicode=true&serverTimezone=GMT%2B8&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&allowPublicKeyRetrieval=true&allowMultiQueries=true url: jdbc:mysql://42.193.1.25:3306/xzs?useSSL=true&useUnicode=true&serverTimezone=GMT%2B8&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&allowPublicKeyRetrieval=true&allowMultiQueries=true username: root password: 123456 password: 321$YcYl@1970! driver-class-name: com.mysql.cj.jdbc.Driver rabbitmq: host: 101.35.247.188 src/main/resources/application.yml
@@ -80,4 +80,4 @@ #runningtime environment profiles: active: dev active: prod src/main/resources/mapper/ExamMapper.xml
@@ -98,7 +98,7 @@ INNER JOIN t_exam_paper TEP ON TEP.id = TE.exam_paper_id AND TEP.deleted = 0 LEFT JOIN t_exam_submit_temp TEST ON TEST.exam_id = TE.id WHERE TE.deleted = 0 and TEST.deleted !=1 TE.deleted = 0 and (TEST.deleted =0 or TEST.deleted is null) <if test="query.examName != null and query.examName != ''"> AND TE.exam_name like concat('%', #{query.examName}, '%') </if> src/main/resources/mapper/ExamPaperMapper.xml
@@ -34,7 +34,7 @@ tep.* FROM t_exam_paper tep <where> and tep.deleted=0 and tep.deleted=0 and (create_user = #{createUser} or visibility = 'Public') <if test="id != null "> and tep.id= #{id} </if>