From 21a9aa320b3eeb072bcd7d3fa883587d57b6ccbb Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期五, 31 五月 2024 14:52:33 +0800 Subject: [PATCH] 日志指定表名,试卷实体类修改 --- src/main/java/com/ycl/jxkg/controller/admin/DashboardController.java | 23 ++++++++--------------- 1 files changed, 8 insertions(+), 15 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 e3281f6..3700ca7 100644 --- a/src/main/java/com/ycl/jxkg/controller/admin/DashboardController.java +++ b/src/main/java/com/ycl/jxkg/controller/admin/DashboardController.java @@ -1,10 +1,11 @@ package com.ycl.jxkg.controller.admin; import com.ycl.jxkg.base.BaseApiController; -import com.ycl.jxkg.base.RestResponse; +import com.ycl.jxkg.base.Result; import com.ycl.jxkg.service.*; -import com.ycl.jxkg.utility.DateTimeUtil; -import com.ycl.jxkg.viewmodel.admin.dashboard.IndexVM; +import com.ycl.jxkg.utils.DateTimeUtil; +import com.ycl.jxkg.vo.admin.dashboard.IndexVO; +import lombok.RequiredArgsConstructor; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @@ -12,6 +13,7 @@ import java.util.List; +@RequiredArgsConstructor @RestController("AdminDashboardController") @RequestMapping(value = "/api/admin/dashboard") public class DashboardController extends BaseApiController { @@ -22,18 +24,9 @@ private final ExamPaperQuestionCustomerAnswerService examPaperQuestionCustomerAnswerService; 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 RestResponse<IndexVM> Index() { - IndexVM vm = new IndexVM(); + public Result<IndexVO> Index() { + IndexVO vm = new IndexVO(); Integer examPaperCount = examPaperService.selectAllCount(); Integer questionCount = questionService.selectAllCount(); @@ -51,6 +44,6 @@ vm.setMothDayDoExamQuestionValue(mothDayDoExamQuestionValue); vm.setMothDayText(DateTimeUtil.MothDay()); - return RestResponse.ok(vm); + return Result.ok(vm); } } -- Gitblit v1.8.0