From d910a3e7ad5bc3a5e5443f506d05bbb9e83a4c8e Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期四, 31 十月 2024 17:14:33 +0800
Subject: [PATCH] 生成试卷时如果题目列表为空,则不反悔这个题型的数据
---
src/main/java/com/ycl/jxkg/controller/admin/DashboardController.java | 24 ++++++++----------------
1 files changed, 8 insertions(+), 16 deletions(-)
diff --git a/src/main/java/com/ycl/jxkg/controller/admin/DashboardController.java b/src/main/java/com/ycl/jxkg/controller/admin/DashboardController.java
index af1ccde..1b383ea 100644
--- a/src/main/java/com/ycl/jxkg/controller/admin/DashboardController.java
+++ b/src/main/java/com/ycl/jxkg/controller/admin/DashboardController.java
@@ -4,32 +4,24 @@
import com.ycl.jxkg.base.Result;
import com.ycl.jxkg.service.*;
import com.ycl.jxkg.utils.DateTimeUtil;
-import com.ycl.jxkg.vo.admin.dashboard.IndexVO;
-import org.springframework.beans.factory.annotation.Autowired;
+import com.ycl.jxkg.domain.vo.admin.dashboard.IndexVO;
+import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
+@RequiredArgsConstructor
@RestController("AdminDashboardController")
@RequestMapping(value = "/api/admin/dashboard")
public class DashboardController extends BaseApiController {
private final ExamPaperService examPaperService;
private final QuestionService questionService;
- private final ExamPaperAnswerService examPaperAnswerService;
- private final ExamPaperQuestionCustomerAnswerService examPaperQuestionCustomerAnswerService;
+ private final ExamPaperScoreService examPaperScoreService;
+ private final ExamPaperScoreDetailService examPaperScoreDetailService;
private final UserEventLogService userEventLogService;
-
- @Autowired
- public DashboardController(ExamPaperService examPaperService, QuestionService questionService, ExamPaperAnswerService examPaperAnswerService, ExamPaperQuestionCustomerAnswerService examPaperQuestionCustomerAnswerService, UserEventLogService userEventLogService) {
- this.examPaperService = examPaperService;
- this.questionService = questionService;
- this.examPaperAnswerService = examPaperAnswerService;
- this.examPaperQuestionCustomerAnswerService = examPaperQuestionCustomerAnswerService;
- this.userEventLogService = userEventLogService;
- }
@RequestMapping(value = "/index", method = RequestMethod.POST)
public Result<IndexVO> Index() {
@@ -37,8 +29,8 @@
Integer examPaperCount = examPaperService.selectAllCount();
Integer questionCount = questionService.selectAllCount();
- Integer doExamPaperCount = examPaperAnswerService.selectAllCount();
- Integer doQuestionCount = examPaperQuestionCustomerAnswerService.selectAllCount();
+ Integer doExamPaperCount = examPaperScoreService.selectAllCount();
+ Integer doQuestionCount = examPaperScoreService.selectAllQuestionCount();
vm.setExamPaperCount(examPaperCount);
vm.setQuestionCount(questionCount);
@@ -46,7 +38,7 @@
vm.setDoQuestionCount(doQuestionCount);
List<Integer> mothDayUserActionValue = userEventLogService.selectMothCount();
- List<Integer> mothDayDoExamQuestionValue = examPaperQuestionCustomerAnswerService.selectMothCount();
+ List<Integer> mothDayDoExamQuestionValue = examPaperScoreDetailService.selectMothCount();
vm.setMothDayUserActionValue(mothDayUserActionValue);
vm.setMothDayDoExamQuestionValue(mothDayDoExamQuestionValue);
--
Gitblit v1.8.0