From 09afc46c92148f126c3e0f2af9eacffe0d42543e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=BB=E7=BB=B4=E7=82=B3?= Date: Mon, 21 Apr 2025 15:33:19 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91=E4=B8=93?= =?UTF-8?q?=E4=B8=9A-=E8=AF=BE=E7=A8=8B-=E9=A2=98=E5=9E=8B=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E8=BF=81=E7=A7=BB=EF=BC=8C=E7=9F=A5=E8=AF=86=E7=82=B9?= =?UTF-8?q?=E5=8D=8A=E8=BF=81=E7=A7=BB=E6=B2=A1=E6=9C=89=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/compiler.xml | 1 + .../ExamAuthorizeController.java | 2 +- .../ExamKnowledgePointsController.java | 180 ++++++++++++++++++ .../specialty/ExamSpecialtyController.java | 154 +++++++++++++++ .../admin/specialty/vo/SpecialtListReqVo.java | 20 ++ .../admin/specialty/vo/SpecialtyQueryVo.java | 25 +++ .../dal/dataobject/ExamKnowledgePoints.java | 43 +++++ .../exam/dal/dataobject/ExamSpecialty.java | 37 ++++ .../dal/mysql/ExamKnowledgePointsMapper.java | 50 +++++ .../exam/dal/mysql/ExamSpecialtyMapper.java | 75 ++++++++ .../knowledge/ExamKnowledgePointsService.java | 62 ++++++ .../ExamKnowledgePointsServiceImpl.java | 120 ++++++++++++ .../specialty/ExamSpecialtyService.java | 73 +++++++ .../specialty/ExamSpecialtyServiceImpl.java | 118 ++++++++++++ .../knowledge/ExamKnowledgePointsMapper.xml | 58 ++++++ .../mapper/specialty/ExamSpecialtyMapper.xml | 90 +++++++++ .../knowledge/ExamKnowledgePointsMapper.xml | 58 ++++++ .../mapper/specialty/ExamSpecialtyMapper.xml | 90 +++++++++ .../controller/admin/GccController.java | 4 + .../src/main/resources/application.yaml | 2 + exam-server/target/classes/application.yaml | 11 ++ 21 files changed, 1272 insertions(+), 1 deletion(-) rename exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/{ => authorize}/ExamAuthorizeController.java (96%) create mode 100644 exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/knowledge/ExamKnowledgePointsController.java create mode 100644 exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/specialty/ExamSpecialtyController.java create mode 100644 exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/specialty/vo/SpecialtListReqVo.java create mode 100644 exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/specialty/vo/SpecialtyQueryVo.java create mode 100644 exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/ExamKnowledgePoints.java create mode 100644 exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/ExamSpecialty.java create mode 100644 exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/mysql/ExamKnowledgePointsMapper.java create mode 100644 exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/mysql/ExamSpecialtyMapper.java create mode 100644 exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/knowledge/ExamKnowledgePointsService.java create mode 100644 exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/knowledge/ExamKnowledgePointsServiceImpl.java create mode 100644 exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/specialty/ExamSpecialtyService.java create mode 100644 exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/specialty/ExamSpecialtyServiceImpl.java create mode 100644 exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/knowledge/ExamKnowledgePointsMapper.xml create mode 100644 exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/specialty/ExamSpecialtyMapper.xml create mode 100644 exam-module-exam/exam-module-exam-biz/target/classes/mapper/knowledge/ExamKnowledgePointsMapper.xml create mode 100644 exam-module-exam/exam-module-exam-biz/target/classes/mapper/specialty/ExamSpecialtyMapper.xml create mode 100644 exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/admin/GccController.java diff --git a/.idea/compiler.xml b/.idea/compiler.xml index 8cd68d97..cda4b2e6 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -2,6 +2,7 @@ + diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/ExamAuthorizeController.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/authorize/ExamAuthorizeController.java similarity index 96% rename from exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/ExamAuthorizeController.java rename to exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/authorize/ExamAuthorizeController.java index 4837cab4..b83148b3 100644 --- a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/ExamAuthorizeController.java +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/authorize/ExamAuthorizeController.java @@ -1,4 +1,4 @@ -package pc.exam.pp.module.exam.controller.admin; +package pc.exam.pp.module.exam.controller.admin.authorize; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/knowledge/ExamKnowledgePointsController.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/knowledge/ExamKnowledgePointsController.java new file mode 100644 index 00000000..ae4720c7 --- /dev/null +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/knowledge/ExamKnowledgePointsController.java @@ -0,0 +1,180 @@ +//package pc.exam.pp.module.exam.controller.admin.knowledge; +// +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.web.bind.annotation.*; +//import pc.exam.pp.module.exam.service.knowledge.ExamKnowledgePointsService; +// +//import java.util.ArrayList; +//import java.util.List; +//import java.util.Objects; +// +///** +// * 知识点Controller +// * +// * @author pengchen +// * @date 2025-04-02 +// */ +//@RestController +//@RequestMapping("/exam/points") +//public class ExamKnowledgePointsController{ +// +// @Autowired +// private ExamKnowledgePointsService knowledgePointsService; +// +// /** +// * 查询知识点列表 +// */ +// @GetMapping("/list") +// public AjaxResult list(ExamKnowledgePoints knowledgePoints) { +// List list = knowledgePointsService.selectKnowledgePointsList(knowledgePoints, String.valueOf(getDeptId()), String.valueOf(getUserId())); +// return success(list); +// } +// +// /** +// * 导出知识点列表 +// */ +// @ApiOperation("导出知识点列表") +// @Log(title = "知识点", businessType = BusinessType.EXPORT) +// @PostMapping("/export") +// public void export(HttpServletResponse response, ExamKnowledgePoints knowledgePoints) { +// List list = knowledgePointsService.selectKnowledgePointsList(knowledgePoints, String.valueOf(getDeptId()), String.valueOf(getUserId())); +// ExcelUtil util = new ExcelUtil(ExamKnowledgePoints.class); +// util.exportExcel(response, list, "知识点数据"); +// } +// +// /** +// * 获取知识点详细信息 +// */ +// @ApiOperation("获取知识点详细信息") +// @GetMapping(value = "/{spId}") +// public AjaxResult getInfo(@PathVariable("spId") Long spId) { +// return success(knowledgePointsService.selectKnowledgePointsBySpId(spId)); +// } +// +// /** +// * 新增知识点 +// */ +// @ApiOperation("新增知识点") +// @Log(title = "知识点", businessType = BusinessType.INSERT) +// @PostMapping +// public AjaxResult add(@RequestBody ExamKnowledgePoints knowledgePoints) { +// //获取登录用户id +// knowledgePoints.setDeptId(String.valueOf(getDeptId())); +// //获取登录部门id +// knowledgePoints.setUserId(String.valueOf(getUserId())); +// //获取登录用户名 +// knowledgePoints.setCreateBy(getUsername()); +// //获取新增名称信息 +// String SpName = knowledgePoints.getSpName(); +// //修改祖籍列表 +// Long ParentId = knowledgePoints.getParentId(); +// if (SpName != null) { +// if (String.valueOf(ParentId).equals("0")) { +// return error("不可增加根节点!"); +// +// } else { +// //获取父节点的信息 +// ExamKnowledgePoints knowledgePointF = knowledgePointsService.selectKnowledgePointsBySpId(ParentId); +// //获取父节点的id +// String ancestors = knowledgePointF.getAncestors(); +// //父节点子树+1 +// knowledgePointF.setTreeNum(knowledgePointF.getTreeNum() + 1); +// knowledgePointsService.updateKnowledgePoints(knowledgePointF); +// +// //修改祖籍列表 +// knowledgePoints.setAncestors(ancestors + "," + ParentId); +// return toAjax(knowledgePointsService.insertKnowledgePoints(knowledgePoints)); +// } +// +// } else +// return error("输入名称不能为空!"); +// +// } +// +// /** +// * 修改知识点 +// */ +// @ApiOperation("修改知识点") +// @Log(title = "知识点", businessType = BusinessType.UPDATE) +// @PutMapping +// public AjaxResult edit(@RequestBody ExamKnowledgePoints knowledgePoints) { +// //判断是否修改的根节点 +// if (Objects.equals(knowledgePoints.getAncestors(), "0")) { +// return error("不可直接修改根节点,请在专业表中修改!"); +// } else { +// if (Objects.equals(knowledgePoints.getSpName(), "")) { +// return error("修改名称不得为空!"); +// } else { +// //获取修改人 +// knowledgePoints.setUpdateBy(getUsername()); +// //修改时间 +// knowledgePoints.setUpdateTime(DateUtils.getNowDate()); +// return toAjax(knowledgePointsService.updateKnowledgePoints(knowledgePoints)); +// } +// } +// } +// +// /** +// * 删除知识点 +// */ +// @ApiOperation("删除知识点") +// @Log(title = "知识点", businessType = BusinessType.DELETE) +// @DeleteMapping("/{spIds}") +// public AjaxResult remove(@PathVariable Long[] spIds) { +// //用于判断是否符合删除条件 +// for (Long spId : spIds) { +// //实例化节点 +// ExamKnowledgePoints knowledgePoint = knowledgePointsService.selectKnowledgePointsBySpId(spId); +// Long ParentId = knowledgePoint.getParentId(); +// // 根据父节点id查找是否为根节点,根节点为专业不可在此删除 +// if (ParentId == 0) { +// return error("删除失败,删除目录中含有专业,请在专业表中删除!"); +// } else { +// // 判断是否有子树 +// if (knowledgePoint.getTreeNum() != 0) { +// return error("删除失败,删除目录下还存在知识点!"); +// } +// } +// } +// // 用于操作节点数 +// for (Long spId : spIds) { +// //根据主键id查询,实例化节点 +// ExamKnowledgePoints knowledgePoint = knowledgePointsService.selectKnowledgePointsBySpId(spId); +// Long ParentId = knowledgePoint.getParentId(); +// //实例化父节点 +// ExamKnowledgePoints knowledgePointF = knowledgePointsService.selectKnowledgePointsBySpId(ParentId); +// //父节点子树-1 +// knowledgePointF.setTreeNum(knowledgePointF.getTreeNum() - 1); +// knowledgePointsService.updateKnowledgePoints(knowledgePointF); +// //获取删除人 +// knowledgePoint.setUpdateBy(getUsername()); +// //获取删除时间 +// knowledgePoint.setUpdateTime(DateUtils.getNowDate()); +// knowledgePointsService.updateKnowledgePoints(knowledgePoint); +// } +// +// return toAjax(knowledgePointsService.deleteKnowledgePointsBySpIds(spIds)); +// } +// +// +// /** +// * 构建知识点树状结构 +// */ +// @ApiOperation("构建知识点树状结构") +// @GetMapping("/tree") +// public AjaxResult listTree(ExamKnowledgePoints knowledgePoints) { +// //定义List +// List tree = new ArrayList<>(); +// //查询数据库表中全部数据 +// List list = knowledgePointsService.selectKnowledgePointsList(knowledgePoints, String.valueOf(getDeptId()), String.valueOf(getUserId())); +// //将SpId、ParentId、SpName添加至数组 +// for (ExamKnowledgePoints L : list) { +// tree.add(new Tree(String.valueOf(L.getSpId()), String.valueOf(L.getParentId()), L.getSpName())); +// } +// // 构建树状结构 +// BuildTree T = new BuildTree(); +// tree = T.builTree(tree); +// // 转为json +// return AjaxResult.success(tree); +// } +//} diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/specialty/ExamSpecialtyController.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/specialty/ExamSpecialtyController.java new file mode 100644 index 00000000..4c964344 --- /dev/null +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/specialty/ExamSpecialtyController.java @@ -0,0 +1,154 @@ +package pc.exam.pp.module.exam.controller.admin.specialty; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; +import pc.exam.pp.framework.common.pojo.CommonResult; +import pc.exam.pp.framework.common.pojo.PageResult; +import pc.exam.pp.framework.common.util.object.BeanUtils; +import pc.exam.pp.module.exam.controller.admin.specialty.vo.SpecialtListReqVo; +import pc.exam.pp.module.exam.controller.admin.specialty.vo.SpecialtyQueryVo; +import pc.exam.pp.module.exam.dal.dataobject.ExamKnowledgePoints; +import pc.exam.pp.module.exam.dal.dataobject.ExamSpecialty; +import pc.exam.pp.module.exam.service.knowledge.ExamKnowledgePointsService; +import pc.exam.pp.module.exam.service.specialty.ExamSpecialtyService; + +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +import static pc.exam.pp.framework.common.pojo.CommonResult.error; +import static pc.exam.pp.framework.common.pojo.CommonResult.success; + +/** + * 专业-课程-题型Controller + * + * @author pengchen + * @date 2025-03-24 + */ +@RestController +@RequestMapping("/exam/specialty") +public class ExamSpecialtyController{ + @Autowired + private ExamSpecialtyService examSpecialtyService; + @Autowired + private ExamKnowledgePointsService knowledgePointsService; + + + @GetMapping("/list") + @Operation(summary = "获取专业列表") + public CommonResult> getDeptList(SpecialtListReqVo reqVO) { + List list = examSpecialtyService.selectExamSpecialtyList(reqVO); + return success(BeanUtils.toBean(list, SpecialtyQueryVo.class)); + } + + /** + * 获取全部数据详细信息 + */ + @GetMapping(value = "/{spId}") + @Operation(summary = "获取专业-课程-题型ID对应数据", description = "获取专业-课程-题型ID对应数据") + @Parameter(name = "spId", description = "专业ID", required = true, example = "1024") + public CommonResult getInfo(@PathVariable("spId") Long spId) { + return success(examSpecialtyService.selectExamSpecialtyBySpId(spId)); + } + + /** + * 新增数据信息(一级:专业,二级:课程,三级:题型) + */ + @Operation(summary = "新增数据信息(一级:专业,二级:课程,三级:题型)", description = "新增数据信息(一级:专业,二级:课程,三级:题型)") + @Parameter(name = "examSpecialty", description = "专业数据", required = true, example = "1024") + @PostMapping + public CommonResult add(@RequestBody ExamSpecialty examSpecialty) { + //定义层的数量,LimitNodes>=3(专业、课程、题型) + int LimitNodes = 3; + //获取新增名称信息 + String SpName = examSpecialty.getSpName(); + //修改祖籍列表 + Long ParentId = examSpecialty.getParentId(); + if (SpName != null) { + if (String.valueOf(ParentId).equals("0")) { + examSpecialty.setAncestors("0"); + return success(examSpecialtyService.insertExamSpecialty(examSpecialty)); + } else { + //获取父亲节点的父ID + String ancestors = examSpecialtyService.selectExamSpecialtyBySpId(ParentId).getAncestors(); + //获取节点数量并判断是否可在添加 + int nodeNum = ancestors.split(",").length; + if (nodeNum == LimitNodes) { + return error(25530, "不可在添加更深节点!"); + } else { + //获取父节点的信息 + ExamSpecialty examSpecialtyF = examSpecialtyService.selectExamSpecialtyBySpId(ParentId); + //父节点子树+1 + examSpecialtyF.setTreeNum(examSpecialtyF.getTreeNum() + 1); + examSpecialtyService.updateExamSpecialty(examSpecialtyF); + //修改祖籍列表 + examSpecialty.setAncestors(ancestors + "," + ParentId); + return success(examSpecialtyService.insertExamSpecialty(examSpecialty)); + } + } + } else + return error(255301, "输入名称不能为空!"); + } + + /** + * 修改数据信息 + */ + @Operation(summary = "修改数据信息", description = "修改数据信息(一级:专业,二级:课程,三级:题型)") + @Parameter(name = "examSpecialty", description = "专业数据", required = true, example = "1024") + @PutMapping + public CommonResult edit(@RequestBody ExamSpecialty examSpecialty) { + //判断修改名称是否为空 + if (Objects.equals(examSpecialty.getSpName(), "")) { + return error(25532, "修改名称不能为空!"); + } else { + return success(examSpecialtyService.updateExamSpecialty(examSpecialty)); + } + } + + /** + * 删除数据信息 + */ + @Operation(summary = "删除数据信息", description = "删除数据信息(一级:专业,二级:课程,三级:题型)") + @Parameter(name = "examSpecialty", description = "专业数据", required = true, example = "1024") + @DeleteMapping("/{spIds}") + public CommonResult remove(@PathVariable Long[] spIds) { + //用于判断是否符合删除条件 + for (Long spId : spIds) { + //实例化节点 + ExamSpecialty examSpecialty = examSpecialtyService.selectExamSpecialtyBySpId(spId); + Long ParentId = examSpecialty.getParentId(); + // 判断是否有子树 + if (examSpecialty.getTreeNum() != 0) { + return error(25533, "删除失败,删除目录下还存在课程或题型!"); + } + ExamKnowledgePoints knowledgePoints = knowledgePointsService.selectKnowledgePointsBySpId(spId); + if (knowledgePoints != null) { + Long treeNum = knowledgePoints.getTreeNum(); + if (treeNum != 0) { + return error(255334, "删除失败,删除目录下还存在知识点!"); + } + } + } + // 用于操作节点数 + for (Long spId : spIds) { + //根据主键id查询,实例化节点 + ExamSpecialty examSpecialty = examSpecialtyService.selectExamSpecialtyBySpId(spId); + Long ParentId = examSpecialty.getParentId(); + //判断是不是根节点 + if (examSpecialty.getParentId() != 0) { + //实例化父节点 + ExamSpecialty examSpecialtyF = examSpecialtyService.selectExamSpecialtyBySpId(ParentId); + //父节点子树-1 + examSpecialtyF.setTreeNum(examSpecialtyF.getTreeNum() - 1); + // examSpecialtyService.updateExamSpecialty(examSpecialtyF); + } else { + knowledgePointsService.deleteKnowledgePointsBySpId(spId); + } + // examSpecialtyService.updateExamSpecialty(examSpecialty); + } + return success(examSpecialtyService.deleteExamSpecialtyBySpIds(spIds)); + } +} diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/specialty/vo/SpecialtListReqVo.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/specialty/vo/SpecialtListReqVo.java new file mode 100644 index 00000000..e8828044 --- /dev/null +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/specialty/vo/SpecialtListReqVo.java @@ -0,0 +1,20 @@ +package pc.exam.pp.module.exam.controller.admin.specialty.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 专业列表 Request VO") +@Data +public class SpecialtListReqVo { + + @Schema(description = "专业名称,模糊匹配", example = "计算机专业") + private String name; + + @Schema(description = "展示状态,参见 CommonStatusEnum 枚举类", example = "1") + private Integer status; + + @Schema(description = "创建时间") + private LocalDateTime createTime; +} diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/specialty/vo/SpecialtyQueryVo.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/specialty/vo/SpecialtyQueryVo.java new file mode 100644 index 00000000..3746a950 --- /dev/null +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/controller/admin/specialty/vo/SpecialtyQueryVo.java @@ -0,0 +1,25 @@ +package pc.exam.pp.module.exam.controller.admin.specialty.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 专业列表 QueryResult VO") +@Data +public class SpecialtyQueryVo { + + private Long id; + + private Long parentId; + + private String name; + + private Integer status; + + private String ancestors; + + private Integer orderNum; + + private LocalDateTime createTime; +} diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/ExamKnowledgePoints.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/ExamKnowledgePoints.java new file mode 100644 index 00000000..b552add9 --- /dev/null +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/ExamKnowledgePoints.java @@ -0,0 +1,43 @@ +package pc.exam.pp.module.exam.dal.dataobject; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import pc.exam.pp.framework.tenant.core.db.TenantBaseDO; + +/** + * 知识点对象 exam_knowledge_points + * + * @author pengchen + * @date 2025-04-02 + */ +@TableName("exam_knowledge_points") +@Data +@EqualsAndHashCode(callSuper = true) +public class ExamKnowledgePoints extends TenantBaseDO +{ + private static final long serialVersionUID = 1L; + + /** id */ + @TableId(value = "sp_id", type = IdType.AUTO) + private Long spId; + + private Long parentId; + + private String ancestors; + + private int orderNum; + + /** 名称 */ + private String spName; + + /** 状态(0正常 1停用) */ + private int status; + + /** 子树数量 */ + private Long treeNum; +} diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/ExamSpecialty.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/ExamSpecialty.java new file mode 100644 index 00000000..12d643cf --- /dev/null +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/dataobject/ExamSpecialty.java @@ -0,0 +1,37 @@ +package pc.exam.pp.module.exam.dal.dataobject; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import pc.exam.pp.framework.tenant.core.db.TenantBaseDO; + +@TableName("exam_specialty") +@Data +@EqualsAndHashCode(callSuper = true) +public class ExamSpecialty extends TenantBaseDO { + private static final long serialVersionUID = 1L; + + /** id */ + @TableId(value = "sp_id", type = IdType.AUTO) + private Long spId; + + private Long parentId; + + private String ancestors; + + private int orderNum; + + /** 名称 */ + private String spName; + + /** 状态(0正常 1停用) */ + private int status; + + + private String unite; + + /** 子树数量 */ + private Long treeNum; +} diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/mysql/ExamKnowledgePointsMapper.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/mysql/ExamKnowledgePointsMapper.java new file mode 100644 index 00000000..3430733e --- /dev/null +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/mysql/ExamKnowledgePointsMapper.java @@ -0,0 +1,50 @@ +package pc.exam.pp.module.exam.dal.mysql; + +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import pc.exam.pp.framework.mybatis.core.mapper.BaseMapperX; +import pc.exam.pp.module.exam.dal.dataobject.ExamKnowledgePoints; + +import java.util.List; + +/** + * 知识点Mapper接口 + * + * @author pengchen + * @date 2025-04-02 + */ +@Mapper +public interface ExamKnowledgePointsMapper extends BaseMapperX +{ + /** + * 查询知识点 + * + * @param spId 知识点主键 + * @return 知识点 + */ + public ExamKnowledgePoints selectKnowledgePointsBySpId(Long spId); + + /** + * 查询知识点列表 + * + * @param knowledgePoints 知识点 + * @return 知识点集合 + */ + public List selectKnowledgePointsList(@Param("knowledgePoints") ExamKnowledgePoints knowledgePoints); + + /** + * 删除知识点 + * + * @param spId 知识点主键 + * @return 结果 + */ + public int deleteKnowledgePointsBySpId(Long spId); + + /** + * 批量删除知识点 + * + * @param spIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteKnowledgePointsBySpIds(Long[] spIds); +} diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/mysql/ExamSpecialtyMapper.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/mysql/ExamSpecialtyMapper.java new file mode 100644 index 00000000..08232182 --- /dev/null +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/dal/mysql/ExamSpecialtyMapper.java @@ -0,0 +1,75 @@ +package pc.exam.pp.module.exam.dal.mysql; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import pc.exam.pp.framework.mybatis.core.mapper.BaseMapperX; +import pc.exam.pp.module.exam.controller.admin.specialty.vo.SpecialtListReqVo; +import pc.exam.pp.module.exam.controller.admin.specialty.vo.SpecialtyQueryVo; +import pc.exam.pp.module.exam.dal.dataobject.ExamSpecialty; + +import java.util.List; + +/** + * 客户端Mapper接口 + * + * @author pengchen + * @date 2025-03-24 + */ +@Mapper +public interface ExamSpecialtyMapper extends BaseMapperX +{ + /** + * 查询数据 + * + * @param spId 数据主键 + * @return 数据信息 + */ + public ExamSpecialty selectExamSpecialtyBySpId(Long spId); + + /** + * 修改数据信息 + * + * @param examSpecialty 修改数据 + * @return 结果 + */ + public int updateExamSpecialty(ExamSpecialty examSpecialty); + + /** + * 查询数据信息列表 + * + * @param reqVo 查询数据信息 + * @return 数据集合 + */ + public List selectExamSpecialtyListVo(SpecialtListReqVo reqVo); + + /** + * 查询数据信息列表 + * + * @param reqVo 查询数据信息 + * @return 数据集合 + */ + public List selectExamSpecialtyList(SpecialtListReqVo reqVo); + + /** + * 根据主键列表查询 + * + * @param spIds 主键列表 + * @return 数据集合 + */ + public List selectSpIds(Long[] spIds); + + /** + * 删除数据 + * + * @param spId 数据主键 + * @return 结果 + */ + public int deleteExamSpecialtyBySpId(Long spId); + + /** + * 批量删除数据 + * + * @param spIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteExamSpecialtyBySpIds(Long[] spIds); +} diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/knowledge/ExamKnowledgePointsService.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/knowledge/ExamKnowledgePointsService.java new file mode 100644 index 00000000..747f4fbe --- /dev/null +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/knowledge/ExamKnowledgePointsService.java @@ -0,0 +1,62 @@ +package pc.exam.pp.module.exam.service.knowledge; + +import pc.exam.pp.module.exam.dal.dataobject.ExamKnowledgePoints; + +import java.util.List; + +/** + * 知识点Service接口 + * + * @author pengchen + * @date 2025-04-02 + */ +public interface ExamKnowledgePointsService +{ + /** + * 查询知识点 + * + * @param spId 知识点主键 + * @return 知识点 + */ + public ExamKnowledgePoints selectKnowledgePointsBySpId(Long spId); + + /** + * 查询知识点列表 + * + * @param knowledgePoints 知识点 + * @return 知识点集合 + */ + public List selectKnowledgePointsList(ExamKnowledgePoints knowledgePoints); + + /** + * 新增知识点 + * + * @param knowledgePoints 知识点 + * @return 结果 + */ + public int insertKnowledgePoints(ExamKnowledgePoints knowledgePoints); + + /** + * 修改知识点 + * + * @param knowledgePoints 知识点 + * @return 结果 + */ + public int updateKnowledgePoints(ExamKnowledgePoints knowledgePoints); + + /** + * 批量删除知识点 + * + * @param spIds 需要删除的知识点主键集合 + * @return 结果 + */ + public int deleteKnowledgePointsBySpIds(Long[] spIds); + + /** + * 删除知识点信息 + * + * @param spId 知识点主键 + * @return 结果 + */ + public int deleteKnowledgePointsBySpId(Long spId); +} diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/knowledge/ExamKnowledgePointsServiceImpl.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/knowledge/ExamKnowledgePointsServiceImpl.java new file mode 100644 index 00000000..a2e82215 --- /dev/null +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/knowledge/ExamKnowledgePointsServiceImpl.java @@ -0,0 +1,120 @@ +package pc.exam.pp.module.exam.service.knowledge; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import pc.exam.pp.module.exam.controller.admin.specialty.vo.SpecialtListReqVo; +import pc.exam.pp.module.exam.dal.dataobject.ExamKnowledgePoints; +import pc.exam.pp.module.exam.dal.dataobject.ExamSpecialty; +import pc.exam.pp.module.exam.dal.mysql.ExamKnowledgePointsMapper; +import pc.exam.pp.module.exam.dal.mysql.ExamSpecialtyMapper; + +import java.util.List; +import java.util.Objects; + +/** + * 知识点Service业务层处理 + * + * @author pengchen + * @date 2025-04-02 + */ +@Service +public class ExamKnowledgePointsServiceImpl implements ExamKnowledgePointsService +{ + @Autowired + private ExamKnowledgePointsMapper knowledgePointsMapper; + + @Autowired + private ExamSpecialtyMapper examSpecialtyMapper; + + /** + * 查询知识点 + * + * @param spId 知识点主键 + * @return 知识点 + */ + @Override + public ExamKnowledgePoints selectKnowledgePointsBySpId(Long spId) + { + + return knowledgePointsMapper.selectKnowledgePointsBySpId(spId); + } + + /** + * 查询知识点列表 + * + * @param knowledgePoints 知识点 + * @return 知识点 + */ + @Override + public List selectKnowledgePointsList(ExamKnowledgePoints knowledgePoints) + { + SpecialtListReqVo reqVo = new SpecialtListReqVo(); + List examSpecialtyList = examSpecialtyMapper.selectExamSpecialtyList(reqVo); + for (ExamSpecialty Specialty:examSpecialtyList){ + // 根据ParentId是否为0判断是否为专业 + if (Objects.equals(String.valueOf(Specialty.getParentId()), "0") && Objects.equals(Specialty.getUnite(), "0")){ + // 实例化已经存在的专业 + ExamKnowledgePoints knowledgePoint = new ExamKnowledgePoints(); + knowledgePoint.setSpId(Specialty.getSpId()); + knowledgePoint.setParentId(Specialty.getParentId()); + knowledgePoint.setAncestors(Specialty.getAncestors()); + knowledgePoint.setSpName(Specialty.getSpName()); + knowledgePoint.setOrderNum(Specialty.getOrderNum()); + knowledgePoint.setStatus(Specialty.getStatus()); + // 新增专业 + knowledgePointsMapper.insert(knowledgePoint); + // 将合并标志改为1 + Specialty.setUnite("1"); + examSpecialtyMapper.updateById(Specialty); + } + } + return knowledgePointsMapper.selectKnowledgePointsList(knowledgePoints); + } + + /** + * 新增知识点 + * + * @param knowledgePoints 知识点 + * @return 结果 + */ + @Override + public int insertKnowledgePoints(ExamKnowledgePoints knowledgePoints) + { + return knowledgePointsMapper.insert(knowledgePoints); + } + + /** + * 修改知识点 + * + * @param knowledgePoints 知识点 + * @return 结果 + */ + @Override + public int updateKnowledgePoints(ExamKnowledgePoints knowledgePoints) + { + return knowledgePointsMapper.updateById(knowledgePoints); + } + + /** + * 批量删除知识点 + * + * @param spIds 需要删除的知识点主键 + * @return 结果 + */ + @Override + public int deleteKnowledgePointsBySpIds(Long[] spIds) + { + return knowledgePointsMapper.deleteKnowledgePointsBySpIds(spIds); + } + + /** + * 删除知识点信息 + * + * @param spId 知识点主键 + * @return 结果 + */ + @Override + public int deleteKnowledgePointsBySpId(Long spId) + { + return knowledgePointsMapper.deleteKnowledgePointsBySpId(spId); + } +} diff --git a/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/specialty/ExamSpecialtyService.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/specialty/ExamSpecialtyService.java new file mode 100644 index 00000000..55072f9c --- /dev/null +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/specialty/ExamSpecialtyService.java @@ -0,0 +1,73 @@ +package pc.exam.pp.module.exam.service.specialty; + +import pc.exam.pp.module.exam.controller.admin.specialty.vo.SpecialtListReqVo; +import pc.exam.pp.module.exam.controller.admin.specialty.vo.SpecialtyQueryVo; +import pc.exam.pp.module.exam.dal.dataobject.ExamSpecialty; + +import java.util.List; + +/** + * 专业——课程——题型Service接口 + * + * @author pengchen + * @date 2025-03-24 + */ +public interface ExamSpecialtyService +{ + /** + * 查询信息 + * + * @param spId 主键 + * @return 所有信息 + */ + public ExamSpecialty selectExamSpecialtyBySpId(Long spId); + + /** + * 查询全部信息列表 + * + * @param reqVO 信息数据 + * @return 全部信息集合 + */ + public List selectExamSpecialtyList(SpecialtListReqVo reqVO); + + /** + * 根据主键查询 + * + * @param spIds 主键id列表 + * @return 该主键id列表下的全部数据 + */ + public List selectSpIds(Long[] spIds); + + + /** + * 新增数据信息 + * + * @param examSpecialty 数据信息 + * @return 结果 + */ + public int insertExamSpecialty(ExamSpecialty examSpecialty); + + /** + * 修改数据 + * + * @param examSpecialty 数据信息 + * @return 结果 + */ + public int updateExamSpecialty(ExamSpecialty examSpecialty); + + /** + * 批量删除客户端 + * + * @param spIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteExamSpecialtyBySpIds(Long[] spIds); + + /** + * 删除客户端信息 + * + * @param spId 主键id + * @return 结果 + */ + public int deleteExamSpecialtyBySpId(Long spId); +} \ 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/specialty/ExamSpecialtyServiceImpl.java b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/specialty/ExamSpecialtyServiceImpl.java new file mode 100644 index 00000000..e9368f28 --- /dev/null +++ b/exam-module-exam/exam-module-exam-biz/src/main/java/pc/exam/pp/module/exam/service/specialty/ExamSpecialtyServiceImpl.java @@ -0,0 +1,118 @@ +package pc.exam.pp.module.exam.service.specialty; + + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import pc.exam.pp.framework.common.util.object.BeanUtils; +import pc.exam.pp.module.exam.controller.admin.specialty.vo.SpecialtListReqVo; +import pc.exam.pp.module.exam.controller.admin.specialty.vo.SpecialtyQueryVo; +import pc.exam.pp.module.exam.dal.dataobject.ExamKnowledgePoints; +import pc.exam.pp.module.exam.dal.dataobject.ExamSpecialty; +import pc.exam.pp.module.exam.dal.mysql.ExamKnowledgePointsMapper; +import pc.exam.pp.module.exam.dal.mysql.ExamSpecialtyMapper; + +import java.util.List; +import java.util.Objects; + +@Service +public class ExamSpecialtyServiceImpl implements ExamSpecialtyService { + + @Autowired + private ExamSpecialtyMapper examSpecialtyMapper; + @Autowired + private ExamKnowledgePointsMapper knowledgePointsMapper; + + + /** + * 查询数据信息 + * + * @param spId 数据主键id + * @return 数据信息 + */ + @Override + public ExamSpecialty selectExamSpecialtyBySpId(Long spId) + { + return examSpecialtyMapper.selectExamSpecialtyBySpId(spId); + } + /** + * 查询数据信息列表 + * + * @param reqVo 查询数据信息 + * @return 数据信息 + */ + @Override + public List selectExamSpecialtyList(SpecialtListReqVo reqVo) + { + return examSpecialtyMapper.selectExamSpecialtyListVo(reqVo); + } + + /** + * 根据主键列表查询 + * + * @param spIds 主键id列表 + * @return 数据信息 + */ + @Override + public List selectSpIds(Long[] spIds){ + return examSpecialtyMapper.selectSpIds(spIds); + } + + /** + * 新增数据信息 + * + * @param examSpecialty 新增数据 + * @return 结果 + */ + @Override + public int insertExamSpecialty(ExamSpecialty examSpecialty) + { + // 插入部门 + ExamSpecialty specialty = BeanUtils.toBean(examSpecialty, ExamSpecialty.class); + return examSpecialtyMapper.insert(specialty); + } + + /** + * 修改数据信息 + * + * @param examSpecialty 修改数据 + * @return 结果 + */ + @Override + public int updateExamSpecialty(ExamSpecialty examSpecialty) + { + // 对专业修改需判断是否已经互联 + // 已互联的情况需要对知识点表也进行修改 + ExamSpecialty Specialty = examSpecialtyMapper.selectExamSpecialtyBySpId(examSpecialty.getSpId()); + if (Objects.equals(Specialty.getUnite(), "1")){ + // 实例化需要修改的专业 + ExamKnowledgePoints knowledgePoint = new ExamKnowledgePoints(); + knowledgePoint.setSpId(examSpecialty.getSpId()); + knowledgePoint.setSpName(examSpecialty.getSpName()); + knowledgePointsMapper.updateById(knowledgePoint); + } + return examSpecialtyMapper.updateById(examSpecialty); + } + + /** + * 批量删除数据 + * + * @param spIds 需要删除的数据主键 + * @return 结果 + */ + @Override + public int deleteExamSpecialtyBySpIds(Long[] spIds) + { + return examSpecialtyMapper.deleteExamSpecialtyBySpIds(spIds); + } + /** + * 删除数据信息 + * + * @param spId 数据主键 + * @return 结果 + */ + @Override + public int deleteExamSpecialtyBySpId(Long spId) + { + return examSpecialtyMapper.deleteExamSpecialtyBySpId(spId); + } +} diff --git a/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/knowledge/ExamKnowledgePointsMapper.xml b/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/knowledge/ExamKnowledgePointsMapper.xml new file mode 100644 index 00000000..26e2bea3 --- /dev/null +++ b/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/knowledge/ExamKnowledgePointsMapper.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + select sp_id, parent_id, ancestors, sp_name, order_num, status, creator, create_time, updater, update_time, tree_num, tenant_id from exam_knowledge_points + + + + + + + + update exam_knowledge_points + + deleted = 1 + + where sp_id = #{spId} + + + +-- delete from knowledge_points + update exam_knowledge_points + + deleted = 1 + + where sp_id in + + #{spId} + + + diff --git a/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/specialty/ExamSpecialtyMapper.xml b/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/specialty/ExamSpecialtyMapper.xml new file mode 100644 index 00000000..1128e98c --- /dev/null +++ b/exam-module-exam/exam-module-exam-biz/src/main/resources/mapper/specialty/ExamSpecialtyMapper.xml @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + select sp_id, parent_id, ancestors, sp_name, order_num, status, creator, create_time, updater, update_time, unite, tree_num, tenant_id from exam_specialty + + + + + + + + + + + update exam_specialty + + parent_id = #{parentId}, + ancestors = #{ancestors}, + sp_name = #{spName}, + order_num = #{orderNum}, + status = #{status}, + unite = #{unite}, + tree_num = #{treeNum}, + + where sp_id = #{spId} + + + + + + update exam_specialty + + deleted = 1 + + where sp_id = #{spId} + + + + update exam_specialty + + deleted = 1 + + where sp_id in + + #{spId} + + + + diff --git a/exam-module-exam/exam-module-exam-biz/target/classes/mapper/knowledge/ExamKnowledgePointsMapper.xml b/exam-module-exam/exam-module-exam-biz/target/classes/mapper/knowledge/ExamKnowledgePointsMapper.xml new file mode 100644 index 00000000..26e2bea3 --- /dev/null +++ b/exam-module-exam/exam-module-exam-biz/target/classes/mapper/knowledge/ExamKnowledgePointsMapper.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + select sp_id, parent_id, ancestors, sp_name, order_num, status, creator, create_time, updater, update_time, tree_num, tenant_id from exam_knowledge_points + + + + + + + + update exam_knowledge_points + + deleted = 1 + + where sp_id = #{spId} + + + +-- delete from knowledge_points + update exam_knowledge_points + + deleted = 1 + + where sp_id in + + #{spId} + + + diff --git a/exam-module-exam/exam-module-exam-biz/target/classes/mapper/specialty/ExamSpecialtyMapper.xml b/exam-module-exam/exam-module-exam-biz/target/classes/mapper/specialty/ExamSpecialtyMapper.xml new file mode 100644 index 00000000..1128e98c --- /dev/null +++ b/exam-module-exam/exam-module-exam-biz/target/classes/mapper/specialty/ExamSpecialtyMapper.xml @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + select sp_id, parent_id, ancestors, sp_name, order_num, status, creator, create_time, updater, update_time, unite, tree_num, tenant_id from exam_specialty + + + + + + + + + + + update exam_specialty + + parent_id = #{parentId}, + ancestors = #{ancestors}, + sp_name = #{spName}, + order_num = #{orderNum}, + status = #{status}, + unite = #{unite}, + tree_num = #{treeNum}, + + where sp_id = #{spId} + + + + + + update exam_specialty + + deleted = 1 + + where sp_id = #{spId} + + + + update exam_specialty + + deleted = 1 + + where sp_id in + + #{spId} + + + + diff --git a/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/admin/GccController.java b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/admin/GccController.java new file mode 100644 index 00000000..7076e9dc --- /dev/null +++ b/exam-module-judgement/exam-module-judgement-biz/src/main/java/pc/exam/pp/module/judgement/controller/admin/GccController.java @@ -0,0 +1,4 @@ +package pc.exam.pp.module.judgement.controller.admin; + +public class GccController { +} diff --git a/exam-server/src/main/resources/application.yaml b/exam-server/src/main/resources/application.yaml index e1db9659..47def1bb 100644 --- a/exam-server/src/main/resources/application.yaml +++ b/exam-server/src/main/resources/application.yaml @@ -65,6 +65,8 @@ flowable: # MyBatis配置 mybatis: + configuration: + map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。 # 搜索指定包别名 typeAliasesPackage: pc.exam.pp.module.**.dal.dataobject # 配置mapper的扫描,找到所有的mapper.xml映射文件 diff --git a/exam-server/target/classes/application.yaml b/exam-server/target/classes/application.yaml index 6252bb53..47def1bb 100644 --- a/exam-server/target/classes/application.yaml +++ b/exam-server/target/classes/application.yaml @@ -63,6 +63,17 @@ flowable: check-process-definitions: false # 设置为 false,禁用 /resources/processes 自动部署 BPMN XML 流程 history-level: audit # full:保存历史数据的最高级别,可保存全部流程相关细节,包括流程流转各节点参数 +# MyBatis配置 +mybatis: + configuration: + map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。 + # 搜索指定包别名 + typeAliasesPackage: pc.exam.pp.module.**.dal.dataobject + # 配置mapper的扫描,找到所有的mapper.xml映射文件 + mapperLocations: classpath*:mysql/**/*Mapper.xml + # 加载全局的配置文件 + configLocation: classpath:mybatis/mybatis-config.xml + # MyBatis Plus 的配置项 mybatis-plus: configuration: