diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/classs/ClassController.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/classs/ClassController.java new file mode 100644 index 00000000..90b8fa7b --- /dev/null +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/classs/ClassController.java @@ -0,0 +1,118 @@ +package pc.exam.pp.module.exam.controller.admin.classs; + +import org.springframework.web.bind.annotation.*; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import jakarta.validation.constraints.*; +import jakarta.validation.*; +import jakarta.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import pc.exam.pp.framework.common.pojo.PageParam; +import pc.exam.pp.framework.common.pojo.PageResult; +import pc.exam.pp.framework.common.pojo.CommonResult; +import pc.exam.pp.framework.common.util.object.BeanUtils; +import static pc.exam.pp.framework.common.pojo.CommonResult.success; + +import pc.exam.pp.framework.excel.core.util.ExcelUtils; + +import pc.exam.pp.framework.apilog.core.annotation.ApiAccessLog; +import static pc.exam.pp.framework.apilog.core.enums.OperateTypeEnum.*; + +import pc.exam.pp.module.exam.controller.admin.classs.vo.*; +import pc.exam.pp.module.exam.dal.dataobject.classs.ClassDO; +import pc.exam.pp.module.exam.service.classs.ClassService; + +@Tag(name = "管理后台 - 学生班级") +@RestController +@RequestMapping("/exam/class") +@Validated +public class ClassController { + + @Resource + private ClassService classService; + + @PostMapping("/create") + @Operation(summary = "创建学生班级") + @PreAuthorize("@ss.hasPermission('exam:class:create')") + public CommonResult createClass(@Valid @RequestBody ClassSaveReqVO createReqVO) { + return success(classService.createClass(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新学生班级") + @PreAuthorize("@ss.hasPermission('exam:class:update')") + public CommonResult updateClass(@Valid @RequestBody ClassSaveReqVO updateReqVO) { + classService.updateClass(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除学生班级") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('exam:class:delete')") + public CommonResult deleteClass(@RequestParam("id") Long id) { + classService.deleteClass(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得学生班级") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('exam:class:query')") + public CommonResult getClass(@RequestParam("id") Long id) { + ClassDO classs = classService.getClass(id); + return success(BeanUtils.toBean(classs, ClassRespVO.class)); + } + + @GetMapping("/getClassName") + @Operation(summary = "获得班级名称列表") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + public CommonResult> getClassName() { + List className = classService.getClassName(); + return success(BeanUtils.toBean(className, ClassNameReturnVO.class)); + } + + @GetMapping("/getClassIdName") + @Operation(summary = "获得班级名称ID列表") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + public CommonResult> getClassIdName() { + List classDo = classService.getClassIdName(); + return success(BeanUtils.toBean(classDo, ClassDoReturnVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得学生班级分页") + @PreAuthorize("@ss.hasPermission('exam:class:query')") + public CommonResult> getClassPage(@Valid ClassPageReqVO pageReqVO) { + PageResult pageResult = classService.getClassPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ClassRespVO.class)); + } + + @PostMapping("/binding") + @Operation(summary = "班级绑定学生列表") + public CommonResult getClassPage(@RequestBody ClassStudentSaveReqVO reqVO) { + classService.createClassStudent(reqVO); + return success(true); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出学生班级 Excel") + @PreAuthorize("@ss.hasPermission('exam:class:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportClassExcel(@Valid ClassPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = classService.getClassPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "学生班级.xls", "数据", ClassRespVO.class, + BeanUtils.toBean(list, ClassRespVO.class)); + } + +} \ No newline at end of file diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/classs/vo/ClassDoReturnVO.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/classs/vo/ClassDoReturnVO.java new file mode 100644 index 00000000..25a16c7f --- /dev/null +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/classs/vo/ClassDoReturnVO.java @@ -0,0 +1,14 @@ +package pc.exam.pp.module.exam.controller.admin.classs.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.ToString; + +@Schema(description = "管理后台 - 学生班级分页 Request VO") +@Data +@ToString(callSuper = true) +public class ClassDoReturnVO { + private Long id; + + private String name; +} diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/classs/vo/ClassNameReturnVO.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/classs/vo/ClassNameReturnVO.java new file mode 100644 index 00000000..a88edc65 --- /dev/null +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/classs/vo/ClassNameReturnVO.java @@ -0,0 +1,13 @@ +package pc.exam.pp.module.exam.controller.admin.classs.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +@Schema(description = "管理后台 - 学生班级分页 Request VO") +@Data +@ToString(callSuper = true) +public class ClassNameReturnVO { + private String className; +} diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/classs/vo/ClassPageReqVO.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/classs/vo/ClassPageReqVO.java new file mode 100644 index 00000000..878f153a --- /dev/null +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/classs/vo/ClassPageReqVO.java @@ -0,0 +1,24 @@ +package pc.exam.pp.module.exam.controller.admin.classs.vo; + +import lombok.*; +import java.util.*; +import io.swagger.v3.oas.annotations.media.Schema; +import pc.exam.pp.framework.common.pojo.PageParam; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; + +import static pc.exam.pp.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 学生班级分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class ClassPageReqVO extends PageParam { + + @Schema(description = "名字", example = "芋艿") + private String name; + + @Schema(description = "状态", example = "1") + private Integer status; + +} \ No newline at end of file diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/classs/vo/ClassRespVO.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/classs/vo/ClassRespVO.java new file mode 100644 index 00000000..e5f45df9 --- /dev/null +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/classs/vo/ClassRespVO.java @@ -0,0 +1,35 @@ +package pc.exam.pp.module.exam.controller.admin.classs.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDateTime; +import com.alibaba.excel.annotation.*; + +@Schema(description = "管理后台 - 学生班级 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ClassRespVO { + + @Schema(description = "班级编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "26824") + @ExcelProperty("班级编号") + private Long id; + + @Schema(description = "名字", example = "芋艿") + @ExcelProperty("名字") + private String name; + + @Schema(description = "状态", example = "1") + @ExcelProperty("状态") + private Integer status; + + @Schema(description = "备注", example = "你说的对") + @ExcelProperty("备注") + private String remark; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建时间") + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/classs/vo/ClassSaveReqVO.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/classs/vo/ClassSaveReqVO.java new file mode 100644 index 00000000..7e5f68b5 --- /dev/null +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/classs/vo/ClassSaveReqVO.java @@ -0,0 +1,24 @@ +package pc.exam.pp.module.exam.controller.admin.classs.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.*; +import java.util.*; +import jakarta.validation.constraints.*; + +@Schema(description = "管理后台 - 学生班级新增/修改 Request VO") +@Data +public class ClassSaveReqVO { + + @Schema(description = "班级编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "26824") + private Long id; + + @Schema(description = "名字", example = "芋艿") + private String name; + + @Schema(description = "状态", example = "1") + private Integer status; + + @Schema(description = "备注", example = "你说的对") + private String remark; + +} \ No newline at end of file diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/classs/vo/ClassStudentSaveReqVO.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/classs/vo/ClassStudentSaveReqVO.java new file mode 100644 index 00000000..affef006 --- /dev/null +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/classs/vo/ClassStudentSaveReqVO.java @@ -0,0 +1,16 @@ +package pc.exam.pp.module.exam.controller.admin.classs.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import pc.exam.pp.module.exam.dal.dataobject.student.StudentClassDO; + +import java.util.List; + +@Schema(description = "管理后台 - 学生班级绑定新增/修改 Request VO") +@Data +public class ClassStudentSaveReqVO { + + @Schema(description = "学生表") + private List studentClassDOS; + +} \ No newline at end of file diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/classs/ClassDO.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/classs/ClassDO.java new file mode 100644 index 00000000..d08a905a --- /dev/null +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/classs/ClassDO.java @@ -0,0 +1,43 @@ +package pc.exam.pp.module.exam.dal.dataobject.classs; + +import lombok.*; +import java.util.*; +import java.time.LocalDateTime; +import java.time.LocalDateTime; +import com.baomidou.mybatisplus.annotation.*; +import pc.exam.pp.framework.mybatis.core.dataobject.BaseDO; + +/** + * 学生班级 DO + * + * @author rwb + */ +@TableName("exam_class") +@KeySequence("exam_class_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class ClassDO extends BaseDO { + + /** + * 班级编号 + */ + @TableId + private Long id; + /** + * 名字 + */ + private String name; + /** + * 状态 + */ + private Integer status; + /** + * 备注 + */ + private String remark; + +} \ No newline at end of file diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/classs/ClassTeacherDO.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/classs/ClassTeacherDO.java new file mode 100644 index 00000000..ac1fa596 --- /dev/null +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/classs/ClassTeacherDO.java @@ -0,0 +1,35 @@ +package pc.exam.pp.module.exam.dal.dataobject.classs; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.*; +import pc.exam.pp.framework.mybatis.core.dataobject.BaseDO; +import pc.exam.pp.framework.tenant.core.db.TenantBaseDO; + +/** + * 班级老师 DO + * + * @author rwb + */ +@TableName("exam_class_teacher") +@Data +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class ClassTeacherDO extends TenantBaseDO { + + /** + * Id + */ + @TableId + private Long id; + /** + * 班级编号 + */ + private Long classId; + /** + * 老师编号 + */ + private Long teacherId; +} \ No newline at end of file diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/mysql/classs/ClassMapper.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/mysql/classs/ClassMapper.java new file mode 100644 index 00000000..43a1b0bc --- /dev/null +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/mysql/classs/ClassMapper.java @@ -0,0 +1,34 @@ +package pc.exam.pp.module.exam.dal.mysql.classs; + +import java.util.*; + +import org.apache.ibatis.annotations.Param; +import pc.exam.pp.framework.common.pojo.PageResult; +import pc.exam.pp.framework.mybatis.core.query.LambdaQueryWrapperX; +import pc.exam.pp.framework.mybatis.core.mapper.BaseMapperX; +import pc.exam.pp.module.exam.dal.dataobject.classs.ClassDO; +import org.apache.ibatis.annotations.Mapper; +import pc.exam.pp.module.exam.controller.admin.classs.vo.*; + +/** + * 学生班级 Mapper + * + * @author rwb + */ +@Mapper +public interface ClassMapper extends BaseMapperX { + + default PageResult selectPage(ClassPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .likeIfPresent(ClassDO::getName, reqVO.getName()) + .eqIfPresent(ClassDO::getStatus, reqVO.getStatus()) + .orderByDesc(ClassDO::getId)); + } + + List getClassName(); + + List getClassIdName(); + + ClassDO getClassNameOne(@Param("className") String className); + +} \ No newline at end of file diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/mysql/classs/ClassTeacherMapper.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/mysql/classs/ClassTeacherMapper.java new file mode 100644 index 00000000..e3d269f6 --- /dev/null +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/mysql/classs/ClassTeacherMapper.java @@ -0,0 +1,10 @@ +package pc.exam.pp.module.exam.dal.mysql.classs; + + +import org.apache.ibatis.annotations.Mapper; +import pc.exam.pp.framework.mybatis.core.mapper.BaseMapperX; +import pc.exam.pp.module.exam.dal.dataobject.classs.ClassTeacherDO; + +@Mapper +public interface ClassTeacherMapper extends BaseMapperX { +} diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/classs/ClassService.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/classs/ClassService.java new file mode 100644 index 00000000..203a1f39 --- /dev/null +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/classs/ClassService.java @@ -0,0 +1,102 @@ +package pc.exam.pp.module.exam.service.classs; + +import java.util.*; +import jakarta.validation.*; +import pc.exam.pp.framework.common.util.collection.CollectionUtils; +import pc.exam.pp.module.exam.controller.admin.classs.vo.*; +import pc.exam.pp.module.exam.dal.dataobject.classs.ClassDO; +import pc.exam.pp.framework.common.pojo.PageResult; +import pc.exam.pp.framework.common.pojo.PageParam; + +/** + * 学生班级 Service 接口 + * + * @author rwb + */ +public interface ClassService { + + /** + * 创建学生班级 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createClass(@Valid ClassSaveReqVO createReqVO); + + /** + * 创建学生班级绑定关系 + * + * @param reqVO 创建信息 + */ + void createClassStudent(ClassStudentSaveReqVO reqVO); + + /** + * 解除学生班级绑定关系 + * + * @param reqVO 解除信息 + */ + void deleteClassStudent(ClassStudentSaveReqVO reqVO); + + /** + * 更新学生班级 + * + * @param updateReqVO 更新信息 + */ + void updateClass(@Valid ClassSaveReqVO updateReqVO); + + /** + * 删除学生班级 + * + * @param id 编号 + */ + void deleteClass(Long id); + + /** + * 获得学生班级 + * + * @param id 编号 + * @return 学生班级 + */ + ClassDO getClass(Long id); + + /** + * 获得班级名称 + * + * @return 班级名称 + */ + List getClassName(); + + /** + * 获得班级名称和ID + * + * @return 班级名称和ID + */ + List getClassIdName(); + + /** + * 获得学生班级分页 + * + * @param pageReqVO 分页查询 + * @return 学生班级分页 + */ + PageResult getClassPage(ClassPageReqVO pageReqVO); + + /** + * 获得指定编号的班级 Map + * + * @param ids 班级编号数组 + * @return 班级 Map + */ + default Map getClassMap(Collection ids) { + List list = getClassList(ids); + return CollectionUtils.convertMap(list, ClassDO::getId); + } + + /** + * 获得班级信息数组 + * + * @param ids 班级编号数组 + * @return 班级信息数组 + */ + List getClassList(Collection ids); +} \ No newline at end of file diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/classs/ClassServiceImpl.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/classs/ClassServiceImpl.java new file mode 100644 index 00000000..d180f879 --- /dev/null +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/classs/ClassServiceImpl.java @@ -0,0 +1,119 @@ +package pc.exam.pp.module.exam.service.classs; + +import cn.hutool.core.collection.CollUtil; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; + +import pc.exam.pp.framework.common.enums.CommonStatusEnum; +import pc.exam.pp.module.exam.controller.admin.classs.vo.*; +import pc.exam.pp.module.exam.dal.dataobject.classs.ClassDO; +import pc.exam.pp.framework.common.pojo.PageResult; +import pc.exam.pp.framework.common.pojo.PageParam; +import pc.exam.pp.framework.common.util.object.BeanUtils; + +import pc.exam.pp.module.exam.dal.dataobject.student.StudentClassDO; +import pc.exam.pp.module.exam.dal.dataobject.student.StudentDO; +import pc.exam.pp.module.exam.dal.mysql.classs.ClassMapper; +import pc.exam.pp.module.exam.dal.mysql.student.StudentClassMapper; + +import static pc.exam.pp.framework.common.exception.util.ServiceExceptionUtil.exception; +import static pc.exam.pp.module.system.enums.ErrorCodeConstants.CLASS_NOT_EXISTS; + +/** + * 学生班级 Service 实现类 + * + * @author rwb + */ +@Service +@Validated +public class ClassServiceImpl implements ClassService { + + @Resource + private ClassMapper classMapper; + @Resource + private StudentClassMapper studentClassMapper; + + @Override + public Long createClass(ClassSaveReqVO createReqVO) { + // 插入 + createReqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); // 默认开启 + ClassDO classs = BeanUtils.toBean(createReqVO, ClassDO.class); + classMapper.insert(classs); + // 返回 + return classs.getId(); + } + + @Override + public void createClassStudent(ClassStudentSaveReqVO reqVO) { + // 循环插入或者更新数据 + for (StudentClassDO studentClassDO : reqVO.getStudentClassDOS()){ + studentClassMapper.insert(studentClassDO); + } + } + + @Override + public void deleteClassStudent(ClassStudentSaveReqVO reqVO) { + // 循环插入或者更新数据 +// for (Long longs : reqVO.getStudentClassDOS()){ +// StudentClassDO studentClassDO = new StudentClassDO(); +// studentClassDO.setStudentId(longs); +// studentClassMapper.deleteById(studentClassDO); +// } + } + + @Override + public void updateClass(ClassSaveReqVO updateReqVO) { + // 校验存在 + validateClassExists(updateReqVO.getId()); + // 更新 + ClassDO updateObj = BeanUtils.toBean(updateReqVO, ClassDO.class); + classMapper.updateById(updateObj); + } + + @Override + public void deleteClass(Long id) { + // 校验存在 + validateClassExists(id); + // 删除 + classMapper.deleteById(id); + } + + private void validateClassExists(Long id) { + if (classMapper.selectById(id) == null) { + throw exception(CLASS_NOT_EXISTS); + } + } + + @Override + public ClassDO getClass(Long id) { + return classMapper.selectById(id); + } + + @Override + public List getClassName() { + return classMapper.getClassName(); + } + + @Override + public List getClassIdName() { + return classMapper.getClassIdName(); + } + + @Override + public PageResult getClassPage(ClassPageReqVO pageReqVO) { + return classMapper.selectPage(pageReqVO); + } + + @Override + public List getClassList(Collection ids) { + if (CollUtil.isEmpty(ids)) { + return Collections.emptyList(); + } + return classMapper.selectBatchIds(ids); + } + +} \ No newline at end of file diff --git a/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/classs/ClassMapper.xml b/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/classs/ClassMapper.xml new file mode 100644 index 00000000..ee50669d --- /dev/null +++ b/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/classs/ClassMapper.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + \ No newline at end of file