From 8546b3d285af4235a0ef615a0c6e89486ae2c806 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期四, 17 十月 2024 21:01:37 +0800
Subject: [PATCH] 达梦不支持value改为values

---
 src/main/java/com/ycl/jxkg/controller/wx/student/DashboardController.java |   30 +++++++++++-------------------
 1 files changed, 11 insertions(+), 19 deletions(-)

diff --git a/src/main/java/com/ycl/jxkg/controller/wx/student/DashboardController.java b/src/main/java/com/ycl/jxkg/controller/wx/student/DashboardController.java
index a22045c..470f167 100644
--- a/src/main/java/com/ycl/jxkg/controller/wx/student/DashboardController.java
+++ b/src/main/java/com/ycl/jxkg/controller/wx/student/DashboardController.java
@@ -2,11 +2,11 @@
 
 import com.ycl.jxkg.base.Result;
 import com.ycl.jxkg.controller.wx.BaseWXApiController;
-import com.ycl.jxkg.domain.TaskExam;
-import com.ycl.jxkg.domain.TaskExamCustomerAnswer;
-import com.ycl.jxkg.domain.TextContent;
-import com.ycl.jxkg.domain.User;
-import com.ycl.jxkg.domain.enums.ExamPaperTypeEnum;
+import com.ycl.jxkg.domain.entity.TaskExam;
+import com.ycl.jxkg.domain.entity.TaskExamCustomerAnswer;
+import com.ycl.jxkg.domain.entity.TextContent;
+import com.ycl.jxkg.domain.entity.User;
+import com.ycl.jxkg.enums.ExamPaperTypeEnum;
 import com.ycl.jxkg.domain.task.TaskItemAnswerObject;
 import com.ycl.jxkg.domain.task.TaskItemObject;
 import com.ycl.jxkg.service.ExamPaperService;
@@ -15,9 +15,9 @@
 import com.ycl.jxkg.service.TextContentService;
 import com.ycl.jxkg.utils.DateTimeUtil;
 import com.ycl.jxkg.utils.JsonUtil;
-import com.ycl.jxkg.vo.student.dashboard.*;
+import com.ycl.jxkg.domain.vo.student.dashboard.*;
+import lombok.RequiredArgsConstructor;
 import org.springframework.beans.BeanUtils;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -28,7 +28,7 @@
 import java.util.List;
 import java.util.stream.Collectors;
 
-
+@RequiredArgsConstructor
 @Controller("WXStudentDashboardController")
 @RequestMapping(value = "/api/wx/student/dashboard")
 @ResponseBody
@@ -38,14 +38,6 @@
     private final TextContentService textContentService;
     private final TaskExamService taskExamService;
     private final TaskExamCustomerAnswerService taskExamCustomerAnswerService;
-
-    @Autowired
-    public DashboardController(ExamPaperService examPaperService, TextContentService textContentService, TaskExamService taskExamService, TaskExamCustomerAnswerService taskExamCustomerAnswerService) {
-        this.examPaperService = examPaperService;
-        this.textContentService = textContentService;
-        this.taskExamService = taskExamService;
-        this.taskExamCustomerAnswerService = taskExamCustomerAnswerService;
-    }
 
     @RequestMapping(value = "/index", method = RequestMethod.POST)
     public Result<IndexVO> index() {
@@ -60,7 +52,7 @@
         PaperFilter timeLimitPaperFilter = new PaperFilter();
         timeLimitPaperFilter.setDateTime(new Date());
         timeLimitPaperFilter.setGradeLevel(user.getUserLevel());
-        timeLimitPaperFilter.setExamPaperType(ExamPaperTypeEnum.TimeLimit.getCode());
+        timeLimitPaperFilter.setExamPaperType(ExamPaperTypeEnum.Random.getCode());
 
         List<PaperInfo> limitPaper = examPaperService.indexPaper(timeLimitPaperFilter);
         List<PaperInfoVO> paperInfoVOS = limitPaper.stream().map(d -> {
@@ -98,12 +90,12 @@
 
 
     private List<TaskItemPaperVO> getTaskItemPaperVm(Integer tFrameId, TaskExamCustomerAnswer taskExamCustomerAnswers) {
-        TextContent textContent = textContentService.selectById(tFrameId);
+        TextContent textContent = textContentService.getById(tFrameId);
         List<TaskItemObject> paperItems = JsonUtil.toJsonListObject(textContent.getContent(), TaskItemObject.class);
 
         List<TaskItemAnswerObject> answerPaperItems = null;
         if (null != taskExamCustomerAnswers) {
-            TextContent answerTextContent = textContentService.selectById(taskExamCustomerAnswers.getTextContentId());
+            TextContent answerTextContent = textContentService.getById(taskExamCustomerAnswers.getTextContentId());
             answerPaperItems = JsonUtil.toJsonListObject(answerTextContent.getContent(), TaskItemAnswerObject.class);
         }
 

--
Gitblit v1.8.0