Merge remote-tracking branch 'origin/new-exam' into new-exam

pg_adapter
dshclm 9 months ago
commit f5cedc3967

@ -84,11 +84,17 @@ public class QuManager {
qu.setCreateTime(new Date()); qu.setCreateTime(new Date());
} }
quService.saveOrUpdate(qu); quService.saveOrUpdate(qu);
if(CollUtil.isEmpty(reqDTO.getAnswerList())){
throw new ServiceException("备选项列表不能为空");
}
if(CollUtil.isNotEmpty(reqDTO.getAnswerList())){ if(CollUtil.isNotEmpty(reqDTO.getAnswerList())){
List<ElQuAnswer> answerList = Convert.toList(ElQuAnswer.class, reqDTO.getAnswerList()); List<ElQuAnswer> answerList = Convert.toList(ElQuAnswer.class, reqDTO.getAnswerList());
answerList.forEach(elQuAnswer -> elQuAnswer.setQuId(qu.getId())); answerList.forEach(elQuAnswer -> elQuAnswer.setQuId(qu.getId()));
quAnswerService.saveBatch(answerList); quAnswerService.saveBatch(answerList);
} }
if(CollUtil.isEmpty(reqDTO.getRepoIds())){
throw new ServiceException("题库列表不能为空");
}
if(CollUtil.isNotEmpty(reqDTO.getRepoIds())){ if(CollUtil.isNotEmpty(reqDTO.getRepoIds())){
List<ElQuRepo> list = new ArrayList<>(); List<ElQuRepo> list = new ArrayList<>();
reqDTO.getRepoIds().forEach(repoId->{ reqDTO.getRepoIds().forEach(repoId->{

@ -2,6 +2,7 @@ package com.ruoyi.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.domain.exam.ElExamDepart; import com.ruoyi.system.domain.exam.ElExamDepart;
import org.apache.ibatis.annotations.Mapper;
/** /**
* @author 13560 * @author 13560
@ -9,6 +10,7 @@ import com.ruoyi.system.domain.exam.ElExamDepart;
* @createDate 2024-06-28 10:53:44 * @createDate 2024-06-28 10:53:44
* @Entity generator.domain.ElExamDepart * @Entity generator.domain.ElExamDepart
*/ */
@Mapper
public interface ElExamDepartMapper extends BaseMapper<ElExamDepart> { public interface ElExamDepartMapper extends BaseMapper<ElExamDepart> {
} }

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.domain.exam.ElExam; import com.ruoyi.system.domain.exam.ElExam;
import com.ruoyi.system.domain.exam.dto.ExamDTO; import com.ruoyi.system.domain.exam.dto.ExamDTO;
import com.ruoyi.system.domain.exam.dto.response.ExamOnlineRespDTO; import com.ruoyi.system.domain.exam.dto.response.ExamOnlineRespDTO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List; import java.util.List;
@ -14,6 +15,7 @@ import java.util.List;
* @createDate 2024-06-28 08:51:41 * @createDate 2024-06-28 08:51:41
* @Entity generator.domain.ElExam * @Entity generator.domain.ElExam
*/ */
@Mapper
public interface ElExamMapper extends BaseMapper<ElExam> { public interface ElExamMapper extends BaseMapper<ElExam> {

@ -3,6 +3,7 @@ package com.ruoyi.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.domain.exam.ElExamRepo; import com.ruoyi.system.domain.exam.ElExamRepo;
import com.ruoyi.system.domain.exam.dto.ext.ExamRepoExtDTO; import com.ruoyi.system.domain.exam.dto.ext.ExamRepoExtDTO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List; import java.util.List;
@ -12,6 +13,7 @@ import java.util.List;
* @createDate 2024-06-28 08:51:41 * @createDate 2024-06-28 08:51:41
* @Entity generator.domain.ElExamRepo * @Entity generator.domain.ElExamRepo
*/ */
@Mapper
public interface ElExamRepoMapper extends BaseMapper<ElExamRepo> { public interface ElExamRepoMapper extends BaseMapper<ElExamRepo> {

@ -2,6 +2,7 @@ package com.ruoyi.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.domain.paper.ElPaper; import com.ruoyi.system.domain.paper.ElPaper;
import org.apache.ibatis.annotations.Mapper;
/** /**
* @author 13560 * @author 13560
@ -9,6 +10,7 @@ import com.ruoyi.system.domain.paper.ElPaper;
* @createDate 2024-06-28 15:02:53 * @createDate 2024-06-28 15:02:53
* @Entity generator.domain.ElPaper * @Entity generator.domain.ElPaper
*/ */
@Mapper
public interface ElPaperMapper extends BaseMapper<ElPaper> { public interface ElPaperMapper extends BaseMapper<ElPaper> {
} }

@ -3,6 +3,7 @@ package com.ruoyi.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.domain.paper.ElPaperQuAnswer; import com.ruoyi.system.domain.paper.ElPaperQuAnswer;
import com.ruoyi.system.domain.paper.dto.ext.PaperQuAnswerExtDTO; import com.ruoyi.system.domain.paper.dto.ext.PaperQuAnswerExtDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
@ -13,6 +14,7 @@ import java.util.List;
* @createDate 2024-06-28 15:02:53 * @createDate 2024-06-28 15:02:53
* @Entity generator.domain.ElPaperQuAnswer * @Entity generator.domain.ElPaperQuAnswer
*/ */
@Mapper
public interface ElPaperQuAnswerMapper extends BaseMapper<ElPaperQuAnswer> { public interface ElPaperQuAnswerMapper extends BaseMapper<ElPaperQuAnswer> {

@ -2,6 +2,7 @@ package com.ruoyi.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.domain.paper.ElPaperQu; import com.ruoyi.system.domain.paper.ElPaperQu;
import org.apache.ibatis.annotations.Mapper;
/** /**
* @author 13560 * @author 13560
@ -9,6 +10,7 @@ import com.ruoyi.system.domain.paper.ElPaperQu;
* @createDate 2024-06-28 15:02:53 * @createDate 2024-06-28 15:02:53
* @Entity generator.domain.ElPaperQu * @Entity generator.domain.ElPaperQu
*/ */
@Mapper
public interface ElPaperQuMapper extends BaseMapper<ElPaperQu> { public interface ElPaperQuMapper extends BaseMapper<ElPaperQu> {

@ -2,6 +2,7 @@ package com.ruoyi.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.domain.qu.ElQuAnswer; import com.ruoyi.system.domain.qu.ElQuAnswer;
import org.apache.ibatis.annotations.Mapper;
/** /**
* @author 13560 * @author 13560
@ -9,6 +10,7 @@ import com.ruoyi.system.domain.qu.ElQuAnswer;
* @createDate 2024-06-27 14:33:59 * @createDate 2024-06-27 14:33:59
* @Entity generator.domain.ElQuAnswer * @Entity generator.domain.ElQuAnswer
*/ */
@Mapper
public interface ElQuAnswerMapper extends BaseMapper<ElQuAnswer> { public interface ElQuAnswerMapper extends BaseMapper<ElQuAnswer> {
} }

@ -3,6 +3,7 @@ package com.ruoyi.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.domain.qu.ElQu; import com.ruoyi.system.domain.qu.ElQu;
import com.ruoyi.system.domain.qu.dto.request.QuQueryReqDTO; import com.ruoyi.system.domain.qu.dto.request.QuQueryReqDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
@ -13,6 +14,7 @@ import java.util.List;
* @createDate 2024-06-27 14:33:59 * @createDate 2024-06-27 14:33:59
* @Entity generator.domain.ElQu * @Entity generator.domain.ElQu
*/ */
@Mapper
public interface ElQuMapper extends BaseMapper<ElQu> { public interface ElQuMapper extends BaseMapper<ElQu> {

@ -2,6 +2,7 @@ package com.ruoyi.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.domain.qu.ElQuRepo; import com.ruoyi.system.domain.qu.ElQuRepo;
import org.apache.ibatis.annotations.Mapper;
/** /**
* @author 13560 * @author 13560
@ -9,6 +10,7 @@ import com.ruoyi.system.domain.qu.ElQuRepo;
* @createDate 2024-06-27 14:33:59 * @createDate 2024-06-27 14:33:59
* @Entity generator.domain.ElQuRepo * @Entity generator.domain.ElQuRepo
*/ */
@Mapper
public interface ElQuRepoMapper extends BaseMapper<ElQuRepo> { public interface ElQuRepoMapper extends BaseMapper<ElQuRepo> {
} }

@ -3,6 +3,7 @@ package com.ruoyi.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.domain.repo.ElRepo; import com.ruoyi.system.domain.repo.ElRepo;
import com.ruoyi.system.domain.repo.vo.RepoVO; import com.ruoyi.system.domain.repo.vo.RepoVO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List; import java.util.List;
@ -12,6 +13,7 @@ import java.util.List;
* @createDate 2024-06-27 10:03:50 * @createDate 2024-06-27 10:03:50
* @Entity generator.domain.ElRepo * @Entity generator.domain.ElRepo
*/ */
@Mapper
public interface ElRepoMapper extends BaseMapper<ElRepo> { public interface ElRepoMapper extends BaseMapper<ElRepo> {

@ -2,6 +2,7 @@ package com.ruoyi.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.domain.userbook.ElUserBook; import com.ruoyi.system.domain.userbook.ElUserBook;
import org.apache.ibatis.annotations.Mapper;
/** /**
* @author 13560 * @author 13560
@ -9,6 +10,7 @@ import com.ruoyi.system.domain.userbook.ElUserBook;
* @createDate 2024-07-01 14:45:33 * @createDate 2024-07-01 14:45:33
* @Entity generator.domain.ElUserBook * @Entity generator.domain.ElUserBook
*/ */
@Mapper
public interface ElUserBookMapper extends BaseMapper<ElUserBook> { public interface ElUserBookMapper extends BaseMapper<ElUserBook> {
} }

@ -2,6 +2,7 @@ package com.ruoyi.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.domain.userexam.ElUserExam; import com.ruoyi.system.domain.userexam.ElUserExam;
import org.apache.ibatis.annotations.Mapper;
/** /**
* @author 13560 * @author 13560
@ -9,6 +10,7 @@ import com.ruoyi.system.domain.userexam.ElUserExam;
* @createDate 2024-07-01 14:31:30 * @createDate 2024-07-01 14:31:30
* @Entity generator.domain.ElUserExam * @Entity generator.domain.ElUserExam
*/ */
@Mapper
public interface ElUserExamMapper extends BaseMapper<ElUserExam> { public interface ElUserExamMapper extends BaseMapper<ElUserExam> {
} }

Loading…
Cancel
Save