From 6f58f2cb4ab7d8717cfc8995142ba62f2be09af1 Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期二, 02 七月 2024 15:58:10 +0800 Subject: [PATCH] 题目导入完善 --- src/main/java/com/mindskip/xzs/service/impl/ExamTemplatesServiceImpl.java | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/mindskip/xzs/service/impl/ExamTemplatesServiceImpl.java b/src/main/java/com/mindskip/xzs/service/impl/ExamTemplatesServiceImpl.java index cb78cf0..1c2a337 100644 --- a/src/main/java/com/mindskip/xzs/service/impl/ExamTemplatesServiceImpl.java +++ b/src/main/java/com/mindskip/xzs/service/impl/ExamTemplatesServiceImpl.java @@ -11,6 +11,7 @@ import com.mindskip.xzs.service.ExamTemplatesUserCountService; import com.mindskip.xzs.utility.convert.ExamTemplatesClassConvert; import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperEditRequestVM; +import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperEditRequestVO; import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperTitleItemVM; import com.mindskip.xzs.viewmodel.admin.exam.QuestionTypeVM; import lombok.extern.slf4j.Slf4j; @@ -58,7 +59,6 @@ if (model.getId() != null) { removes(model.getId()); } - ExamTemplates examTemplates = ExamTemplatesClassConvert.INSTANCE.ExamPaperEditRequestVMToExamTemplates(model); if (!CollectionUtils.isEmpty(model.getLimitDateTime())) { SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); @@ -121,6 +121,12 @@ } @Override + public PageInfo<ExamTemplates> getByadmins(ExamTemplatesVO templatesVO) { + return PageHelper.startPage(templatesVO.getPageIndex(), templatesVO.getPageSize(), "id desc").doSelectPageInfo(() -> + examTemplatesMapper.getByadmins(templatesVO)); + } + + @Override public ExamPaperEditRequestVM getById(Integer id) { return restore(id); } @@ -142,7 +148,7 @@ vm.setType("1"); vm.setId(null); ExamPaper examPaper = examPaperService.savePaperFromVM(vm, user); - ExamPaperEditRequestVM newVM = examPaperService.examPaperToVM(examPaper.getId()); + ExamPaperEditRequestVO newVM = examPaperService.examPaperToVM(examPaper.getId()); count.setExamPaperId(examPaper.getId()); count.setUserId(user.getId()); examTemplatesUserCountService.add(count); @@ -161,7 +167,7 @@ vm.setType("1"); vm.setId(null); ExamPaper examPaper = examPaperService.savePaperFromVM(vm, user); - ExamPaperEditRequestVM newVM = examPaperService.examPaperToVM(examPaper.getId()); + ExamPaperEditRequestVO newVM = examPaperService.examPaperToVM(examPaper.getId()); // count.setExamPaperId(examPaper.getId()); // count.setUserId(user.getId()); // examTemplatesUserCountService.add(count); -- Gitblit v1.8.0