From a9abf06f9e9ed1e112d57ce5e4c8d424d86860b5 Mon Sep 17 00:00:00 2001 From: wangxy <1356089412@qq.com> Date: Wed, 3 Jul 2024 10:21:37 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=E5=9C=A8=E7=BA=BF=E8=80=83=E8=AF=95?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/web/controller/manager/QuManager.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/QuManager.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/QuManager.java index 5ac1aa7..8bddbd1 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/QuManager.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/QuManager.java @@ -84,11 +84,17 @@ public class QuManager { qu.setCreateTime(new Date()); } quService.saveOrUpdate(qu); + if(CollUtil.isEmpty(reqDTO.getAnswerList())){ + throw new ServiceException("备选项列表不能为空"); + } if(CollUtil.isNotEmpty(reqDTO.getAnswerList())){ List answerList = Convert.toList(ElQuAnswer.class, reqDTO.getAnswerList()); answerList.forEach(elQuAnswer -> elQuAnswer.setQuId(qu.getId())); quAnswerService.saveBatch(answerList); } + if(CollUtil.isEmpty(reqDTO.getRepoIds())){ + throw new ServiceException("题库列表不能为空"); + } if(CollUtil.isNotEmpty(reqDTO.getRepoIds())){ List list = new ArrayList<>(); reqDTO.getRepoIds().forEach(repoId->{ From af41f1f0b1fcb7f7e2ebc7d1d54c6431b71b1608 Mon Sep 17 00:00:00 2001 From: wangxy <1356089412@qq.com> Date: Wed, 3 Jul 2024 10:29:27 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:mapper=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ruoyi/system/mapper/ElExamDepartMapper.java | 2 ++ .../src/main/java/com/ruoyi/system/mapper/ElExamMapper.java | 2 ++ .../src/main/java/com/ruoyi/system/mapper/ElExamRepoMapper.java | 2 ++ .../src/main/java/com/ruoyi/system/mapper/ElPaperMapper.java | 2 ++ .../java/com/ruoyi/system/mapper/ElPaperQuAnswerMapper.java | 2 ++ .../src/main/java/com/ruoyi/system/mapper/ElPaperQuMapper.java | 2 ++ .../src/main/java/com/ruoyi/system/mapper/ElQuAnswerMapper.java | 2 ++ .../src/main/java/com/ruoyi/system/mapper/ElQuMapper.java | 2 ++ .../src/main/java/com/ruoyi/system/mapper/ElQuRepoMapper.java | 2 ++ .../src/main/java/com/ruoyi/system/mapper/ElRepoMapper.java | 2 ++ .../src/main/java/com/ruoyi/system/mapper/ElUserBookMapper.java | 2 ++ .../src/main/java/com/ruoyi/system/mapper/ElUserExamMapper.java | 2 ++ 12 files changed, 24 insertions(+) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElExamDepartMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElExamDepartMapper.java index 4543758..e49a351 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElExamDepartMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElExamDepartMapper.java @@ -2,6 +2,7 @@ package com.ruoyi.system.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.system.domain.exam.ElExamDepart; +import org.apache.ibatis.annotations.Mapper; /** * @author 13560 @@ -9,6 +10,7 @@ import com.ruoyi.system.domain.exam.ElExamDepart; * @createDate 2024-06-28 10:53:44 * @Entity generator.domain.ElExamDepart */ +@Mapper public interface ElExamDepartMapper extends BaseMapper { } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElExamMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElExamMapper.java index edadac1..bba416f 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElExamMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElExamMapper.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.system.domain.exam.ElExam; import com.ruoyi.system.domain.exam.dto.ExamDTO; import com.ruoyi.system.domain.exam.dto.response.ExamOnlineRespDTO; +import org.apache.ibatis.annotations.Mapper; import java.util.List; @@ -14,6 +15,7 @@ import java.util.List; * @createDate 2024-06-28 08:51:41 * @Entity generator.domain.ElExam */ +@Mapper public interface ElExamMapper extends BaseMapper { diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElExamRepoMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElExamRepoMapper.java index 9cfb985..aa77a98 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElExamRepoMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElExamRepoMapper.java @@ -3,6 +3,7 @@ package com.ruoyi.system.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.system.domain.exam.ElExamRepo; import com.ruoyi.system.domain.exam.dto.ext.ExamRepoExtDTO; +import org.apache.ibatis.annotations.Mapper; import java.util.List; @@ -12,6 +13,7 @@ import java.util.List; * @createDate 2024-06-28 08:51:41 * @Entity generator.domain.ElExamRepo */ +@Mapper public interface ElExamRepoMapper extends BaseMapper { diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElPaperMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElPaperMapper.java index c1cb30f..37b0b9c 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElPaperMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElPaperMapper.java @@ -2,6 +2,7 @@ package com.ruoyi.system.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.system.domain.paper.ElPaper; +import org.apache.ibatis.annotations.Mapper; /** * @author 13560 @@ -9,6 +10,7 @@ import com.ruoyi.system.domain.paper.ElPaper; * @createDate 2024-06-28 15:02:53 * @Entity generator.domain.ElPaper */ +@Mapper public interface ElPaperMapper extends BaseMapper { } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElPaperQuAnswerMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElPaperQuAnswerMapper.java index 5aeb7db..cd32a53 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElPaperQuAnswerMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElPaperQuAnswerMapper.java @@ -3,6 +3,7 @@ package com.ruoyi.system.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.system.domain.paper.ElPaperQuAnswer; import com.ruoyi.system.domain.paper.dto.ext.PaperQuAnswerExtDTO; +import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -13,6 +14,7 @@ import java.util.List; * @createDate 2024-06-28 15:02:53 * @Entity generator.domain.ElPaperQuAnswer */ +@Mapper public interface ElPaperQuAnswerMapper extends BaseMapper { diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElPaperQuMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElPaperQuMapper.java index 6efdb9b..7851c89 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElPaperQuMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElPaperQuMapper.java @@ -2,6 +2,7 @@ package com.ruoyi.system.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.system.domain.paper.ElPaperQu; +import org.apache.ibatis.annotations.Mapper; /** * @author 13560 @@ -9,6 +10,7 @@ import com.ruoyi.system.domain.paper.ElPaperQu; * @createDate 2024-06-28 15:02:53 * @Entity generator.domain.ElPaperQu */ +@Mapper public interface ElPaperQuMapper extends BaseMapper { diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElQuAnswerMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElQuAnswerMapper.java index b28b1fc..286ef70 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElQuAnswerMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElQuAnswerMapper.java @@ -2,6 +2,7 @@ package com.ruoyi.system.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.system.domain.qu.ElQuAnswer; +import org.apache.ibatis.annotations.Mapper; /** * @author 13560 @@ -9,6 +10,7 @@ import com.ruoyi.system.domain.qu.ElQuAnswer; * @createDate 2024-06-27 14:33:59 * @Entity generator.domain.ElQuAnswer */ +@Mapper public interface ElQuAnswerMapper extends BaseMapper { } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElQuMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElQuMapper.java index 1515998..fc2576d 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElQuMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElQuMapper.java @@ -3,6 +3,7 @@ package com.ruoyi.system.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.system.domain.qu.ElQu; import com.ruoyi.system.domain.qu.dto.request.QuQueryReqDTO; +import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -13,6 +14,7 @@ import java.util.List; * @createDate 2024-06-27 14:33:59 * @Entity generator.domain.ElQu */ +@Mapper public interface ElQuMapper extends BaseMapper { diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElQuRepoMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElQuRepoMapper.java index bddeb90..414be0e 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElQuRepoMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElQuRepoMapper.java @@ -2,6 +2,7 @@ package com.ruoyi.system.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.system.domain.qu.ElQuRepo; +import org.apache.ibatis.annotations.Mapper; /** * @author 13560 @@ -9,6 +10,7 @@ import com.ruoyi.system.domain.qu.ElQuRepo; * @createDate 2024-06-27 14:33:59 * @Entity generator.domain.ElQuRepo */ +@Mapper public interface ElQuRepoMapper extends BaseMapper { } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElRepoMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElRepoMapper.java index faf451d..139c42d 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElRepoMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElRepoMapper.java @@ -3,6 +3,7 @@ package com.ruoyi.system.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.system.domain.repo.ElRepo; import com.ruoyi.system.domain.repo.vo.RepoVO; +import org.apache.ibatis.annotations.Mapper; import java.util.List; @@ -12,6 +13,7 @@ import java.util.List; * @createDate 2024-06-27 10:03:50 * @Entity generator.domain.ElRepo */ +@Mapper public interface ElRepoMapper extends BaseMapper { diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElUserBookMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElUserBookMapper.java index 4c606d0..ba150bc 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElUserBookMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElUserBookMapper.java @@ -2,6 +2,7 @@ package com.ruoyi.system.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.system.domain.userbook.ElUserBook; +import org.apache.ibatis.annotations.Mapper; /** * @author 13560 @@ -9,6 +10,7 @@ import com.ruoyi.system.domain.userbook.ElUserBook; * @createDate 2024-07-01 14:45:33 * @Entity generator.domain.ElUserBook */ +@Mapper public interface ElUserBookMapper extends BaseMapper { } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElUserExamMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElUserExamMapper.java index e3f9c74..fcf4c52 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElUserExamMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ElUserExamMapper.java @@ -2,6 +2,7 @@ package com.ruoyi.system.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ruoyi.system.domain.userexam.ElUserExam; +import org.apache.ibatis.annotations.Mapper; /** * @author 13560 @@ -9,6 +10,7 @@ import com.ruoyi.system.domain.userexam.ElUserExam; * @createDate 2024-07-01 14:31:30 * @Entity generator.domain.ElUserExam */ +@Mapper public interface ElUserExamMapper extends BaseMapper { }