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/student/EducationController.java |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/main/java/com/ycl/jxkg/controller/student/EducationController.java b/src/main/java/com/ycl/jxkg/controller/student/EducationController.java
index 05bbae2..1717365 100644
--- a/src/main/java/com/ycl/jxkg/controller/student/EducationController.java
+++ b/src/main/java/com/ycl/jxkg/controller/student/EducationController.java
@@ -8,6 +8,7 @@
 import com.ycl.jxkg.service.SubjectService;
 import com.ycl.jxkg.vo.student.education.SubjectEditRequestVO;
 import com.ycl.jxkg.vo.student.education.SubjectVO;
+import lombok.RequiredArgsConstructor;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -15,16 +16,12 @@
 import java.util.List;
 import java.util.stream.Collectors;
 
+@RequiredArgsConstructor
 @RestController("StudentEducationController")
 @RequestMapping(value = "/api/student/education")
 public class EducationController extends BaseApiController {
 
     private final SubjectService subjectService;
-
-    @Autowired
-    public EducationController(SubjectService subjectService) {
-        this.subjectService = subjectService;
-    }
 
     @RequestMapping(value = "/subject/list", method = RequestMethod.POST)
     public Result<List<SubjectVO>> list() {
@@ -41,7 +38,7 @@
 
     @RequestMapping(value = "/subject/select/{id}", method = RequestMethod.POST)
     public Result<SubjectEditRequestVO> select(@PathVariable Integer id) {
-        Subject subject = subjectService.selectById(id);
+        Subject subject = subjectService.getById(id);
         SubjectEditRequestVO vo = new SubjectEditRequestVO();
         BeanUtils.copyProperties(subject, vo);
         return Result.ok(vo);

--
Gitblit v1.8.0