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/ExamPaperController.java | 11 ++++------- 1 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/ycl/jxkg/controller/admin/ExamPaperController.java b/src/main/java/com/ycl/jxkg/controller/admin/ExamPaperController.java index 3756bb8..1f543ec 100644 --- a/src/main/java/com/ycl/jxkg/controller/admin/ExamPaperController.java +++ b/src/main/java/com/ycl/jxkg/controller/admin/ExamPaperController.java @@ -10,22 +10,19 @@ import com.ycl.jxkg.vo.admin.exam.ExamPaperEditRequestVO; import com.ycl.jxkg.vo.admin.exam.ExamResponseVO; import com.github.pagehelper.PageInfo; +import lombok.RequiredArgsConstructor; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import javax.validation.Valid; +@RequiredArgsConstructor @RestController("AdminExamPaperController") @RequestMapping(value = "/api/admin/exam/paper") public class ExamPaperController extends BaseApiController { private final ExamPaperService examPaperService; - - @Autowired - public ExamPaperController(ExamPaperService examPaperService) { - this.examPaperService = examPaperService; - } @RequestMapping(value = "/page", method = RequestMethod.POST) public Result<PageInfo<ExamResponseVO>> pageList(@RequestBody ExamPaperPageRequestVO model) { @@ -70,9 +67,9 @@ @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST) public Result delete(@PathVariable Integer id) { - ExamPaper examPaper = examPaperService.selectById(id); + ExamPaper examPaper = examPaperService.getById(id); examPaper.setDeleted(true); - examPaperService.updateByIdFilter(examPaper); + examPaperService.updateById(examPaper); return Result.ok(); } } -- Gitblit v1.8.0