From 3a8e1524dcf0eeb610d38123d5f0a3ef838379cd Mon Sep 17 00:00:00 2001
From: linzhijie <19970921lzj>
Date: 星期一, 12 四月 2021 15:44:53 +0800
Subject: [PATCH] Merge branch '20210406-maqv2' into 20210412-youhua

---
 src/main/java/com/ots/project/exam/listener/CalculateExamPaperAnswerListener.java |   14 --------------
 1 files changed, 0 insertions(+), 14 deletions(-)

diff --git a/src/main/java/com/ots/project/exam/listener/CalculateExamPaperAnswerListener.java b/src/main/java/com/ots/project/exam/listener/CalculateExamPaperAnswerListener.java
index 11a5dcd..a8169fd 100644
--- a/src/main/java/com/ots/project/exam/listener/CalculateExamPaperAnswerListener.java
+++ b/src/main/java/com/ots/project/exam/listener/CalculateExamPaperAnswerListener.java
@@ -1,5 +1,4 @@
 package com.ots.project.exam.listener;
-
 import com.ots.common.enums.ExamPaperTypeEnum;
 import com.ots.common.enums.QuestionTypeEnum;
 import com.ots.project.exam.domain.ExamPaperAnswer;
@@ -16,40 +15,28 @@
 import org.springframework.context.ApplicationListener;
 import org.springframework.stereotype.Component;
 import org.springframework.transaction.annotation.Transactional;
-
 import java.util.Date;
 import java.util.List;
 
-
-/**
- * @author OTS
- */
 @Component
 @AllArgsConstructor
 public class CalculateExamPaperAnswerListener implements ApplicationListener<CalculateExamPaperAnswerCompleteEvent> {
-
     @Autowired
     private ExamPaperAnswerService examPaperAnswerService;
-
     @Autowired
     private ExamPaperQuestionCustomerAnswerService examPaperQuestionCustomerAnswerService;
-
     @Autowired
     private ITTextContentService textContentService;
-
     @Autowired
     private TaskExamCustomerAnswerService examCustomerAnswerService;
-
     @Override
     @Transactional
     public void onApplicationEvent(CalculateExamPaperAnswerCompleteEvent calculateExamPaperAnswerCompleteEvent) {
         Date now = new Date();
-
         ExamPaperAnswerInfo examPaperAnswerInfo = (ExamPaperAnswerInfo) calculateExamPaperAnswerCompleteEvent.getSource();
         TExamPaper examPaper = examPaperAnswerInfo.getExamPaper();
         ExamPaperAnswer examPaperAnswer = examPaperAnswerInfo.getExamPaperAnswer();
         List<ExamPaperQuestionCustomerAnswer> examPaperQuestionCustomerAnswers = examPaperAnswerInfo.getExamPaperQuestionCustomerAnswers();
-
         examPaperAnswerService.insertByFilter(examPaperAnswer);
         examPaperQuestionCustomerAnswers.stream().filter(a -> QuestionTypeEnum.needSaveTextContent(a.getQuestionType())).forEach(d -> {
             TTextContent textContent = new TTextContent(d.getAnswer(), now);
@@ -61,7 +48,6 @@
             d.setExamPaperAnswerId(examPaperAnswer.getId());
         });
         examPaperQuestionCustomerAnswerService.insertList(examPaperQuestionCustomerAnswers);
-
         switch (ExamPaperTypeEnum.fromCode(examPaper.getPaperType().intValue())) {
             case Task: {
                 examCustomerAnswerService.insertOrUpdate(examPaper, examPaperAnswer, now);

--
Gitblit v1.9.1