Quellcode durchsuchen

fix 考试配置分类

he2802 vor 4 Jahren
Ursprung
Commit
f120ca6ca2
24 geänderte Dateien mit 134 neuen und 103 gelöschten Zeilen
  1. 7 10
      zhongzheng-admin/src/main/java/com/zhongzheng/controller/exam/ExamConfigController.java
  2. 6 9
      zhongzheng-admin/src/main/java/com/zhongzheng/controller/exam/ExamNoteController.java
  3. 1 0
      zhongzheng-admin/src/main/java/com/zhongzheng/controller/system/SysUserController.java
  4. 0 15
      zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/mapper/ExamConfigMapper.java
  5. 0 20
      zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/mapper/ExamNoteMapper.java
  6. 1 1
      zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/bo/ExamConfigAddBo.java
  7. 1 1
      zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/bo/ExamConfigEditBo.java
  8. 1 1
      zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/bo/ExamConfigQueryBo.java
  9. 1 1
      zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/bo/ExamNoteAddBo.java
  10. 1 1
      zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/bo/ExamNoteEditBo.java
  11. 1 1
      zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/bo/ExamNoteQueryBo.java
  12. 4 1
      zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/domain/ExamConfig.java
  13. 1 1
      zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/domain/ExamNote.java
  14. 21 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/mapper/ExamConfigMapper.java
  15. 18 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/mapper/ExamNoteMapper.java
  16. 8 6
      zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/service/IExamConfigService.java
  17. 6 6
      zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/service/IExamNoteService.java
  18. 20 11
      zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/service/impl/ExamConfigServiceImpl.java
  19. 8 10
      zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/service/impl/ExamNoteServiceImpl.java
  20. 1 1
      zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/vo/ExamConfigVo.java
  21. 1 1
      zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/vo/ExamNoteVo.java
  22. 2 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/vo/ExamUserVo.java
  23. 21 3
      zhongzheng-system/src/main/resources/mapper/modules/exam/ExamConfigMapper.xml
  24. 3 3
      zhongzheng-system/src/main/resources/mapper/modules/exam/ExamNoteMapper.xml

+ 7 - 10
zhongzheng-admin/src/main/java/com/zhongzheng/controller/bank/ExamConfigController.java → zhongzheng-admin/src/main/java/com/zhongzheng/controller/exam/ExamConfigController.java

@@ -1,22 +1,20 @@
-package com.zhongzheng.controller.bank;
+package com.zhongzheng.controller.exam;
 
 import java.util.List;
 import java.util.Arrays;
 
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
-import com.zhongzheng.modules.bank.bo.ExamConfigAddBo;
-import com.zhongzheng.modules.bank.bo.ExamConfigEditBo;
-import com.zhongzheng.modules.bank.bo.ExamConfigQueryBo;
-import com.zhongzheng.modules.bank.service.IExamConfigService;
-import com.zhongzheng.modules.bank.vo.ExamConfigVo;
+import com.zhongzheng.modules.exam.bo.ExamConfigAddBo;
+import com.zhongzheng.modules.exam.bo.ExamConfigEditBo;
+import com.zhongzheng.modules.exam.bo.ExamConfigQueryBo;
+import com.zhongzheng.modules.exam.service.IExamConfigService;
+import com.zhongzheng.modules.exam.vo.ExamConfigVo;
 import lombok.RequiredArgsConstructor;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -25,7 +23,6 @@ import com.zhongzheng.common.annotation.Log;
 import com.zhongzheng.common.core.controller.BaseController;
 import com.zhongzheng.common.core.domain.AjaxResult;
 import com.zhongzheng.common.enums.BusinessType;
-import com.zhongzheng.common.utils.poi.ExcelUtil;
 import com.zhongzheng.common.core.page.TableDataInfo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -52,7 +49,7 @@ public class ExamConfigController extends BaseController {
     @GetMapping("/list")
     public TableDataInfo<ExamConfigVo> list(ExamConfigQueryBo bo) {
         startPage();
-        List<ExamConfigVo> list = iExamConfigService.queryList(bo);
+        List<ExamConfigVo> list = iExamConfigService.selectExamConfigList(bo);
         return getDataTable(list);
     }
 

+ 6 - 9
zhongzheng-admin/src/main/java/com/zhongzheng/controller/bank/ExamNoteController.java → zhongzheng-admin/src/main/java/com/zhongzheng/controller/exam/ExamNoteController.java

@@ -1,21 +1,19 @@
-package com.zhongzheng.controller.bank;
+package com.zhongzheng.controller.exam;
 
 import java.util.List;
 import java.util.Arrays;
 
-import com.zhongzheng.modules.bank.bo.ExamNoteAddBo;
-import com.zhongzheng.modules.bank.bo.ExamNoteEditBo;
-import com.zhongzheng.modules.bank.bo.ExamNoteQueryBo;
-import com.zhongzheng.modules.bank.service.IExamNoteService;
-import com.zhongzheng.modules.bank.vo.ExamNoteVo;
+import com.zhongzheng.modules.exam.bo.ExamNoteAddBo;
+import com.zhongzheng.modules.exam.bo.ExamNoteEditBo;
+import com.zhongzheng.modules.exam.bo.ExamNoteQueryBo;
+import com.zhongzheng.modules.exam.service.IExamNoteService;
+import com.zhongzheng.modules.exam.vo.ExamNoteVo;
 import lombok.RequiredArgsConstructor;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -24,7 +22,6 @@ import com.zhongzheng.common.annotation.Log;
 import com.zhongzheng.common.core.controller.BaseController;
 import com.zhongzheng.common.core.domain.AjaxResult;
 import com.zhongzheng.common.enums.BusinessType;
-import com.zhongzheng.common.utils.poi.ExcelUtil;
 import com.zhongzheng.common.core.page.TableDataInfo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;

+ 1 - 0
zhongzheng-admin/src/main/java/com/zhongzheng/controller/system/SysUserController.java

@@ -158,6 +158,7 @@ public class SysUserController extends BaseController
     public AjaxResult edit(@Validated @RequestBody SysUser user)
     {
         userService.checkUserAllowed(user);
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
         if (Validator.isNotEmpty(user.getPhonenumber())
                 && UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
         {

+ 0 - 15
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/mapper/ExamConfigMapper.java

@@ -1,15 +0,0 @@
-package com.zhongzheng.modules.bank.mapper;
-
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.zhongzheng.modules.bank.domain.ExamConfig;
-
-/**
- * 考题配置Mapper接口
- *
- * @author hjl
- * @date 2021-05-21
- */
-public interface ExamConfigMapper extends BaseMapper<ExamConfig> {
-
-}

+ 0 - 20
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/mapper/ExamNoteMapper.java

@@ -1,20 +0,0 @@
-package com.zhongzheng.modules.bank.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.zhongzheng.modules.bank.bo.ExamNoteQueryBo;
-import com.zhongzheng.modules.bank.domain.ExamNote;
-import com.zhongzheng.modules.bank.vo.ExamNoteVo;
-import com.zhongzheng.modules.course.bo.CourseQueryBo;
-import com.zhongzheng.modules.course.vo.CourseVo;
-
-import java.util.List;
-
-/**
- * 考试重点Mapper接口
- *
- * @author hjl
- * @date 2021-05-21
- */
-public interface ExamNoteMapper extends BaseMapper<ExamNote> {
-    List<ExamNoteVo> selectExamNoteList(ExamNoteQueryBo bo);
-}

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/bo/ExamConfigAddBo.java → zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/bo/ExamConfigAddBo.java

@@ -1,4 +1,4 @@
-package com.zhongzheng.modules.bank.bo;
+package com.zhongzheng.modules.exam.bo;
 
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/bo/ExamConfigEditBo.java → zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/bo/ExamConfigEditBo.java

@@ -1,4 +1,4 @@
-package com.zhongzheng.modules.bank.bo;
+package com.zhongzheng.modules.exam.bo;
 
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/bo/ExamConfigQueryBo.java → zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/bo/ExamConfigQueryBo.java

@@ -1,4 +1,4 @@
-package com.zhongzheng.modules.bank.bo;
+package com.zhongzheng.modules.exam.bo;
 
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/bo/ExamNoteAddBo.java → zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/bo/ExamNoteAddBo.java

@@ -1,4 +1,4 @@
-package com.zhongzheng.modules.bank.bo;
+package com.zhongzheng.modules.exam.bo;
 
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/bo/ExamNoteEditBo.java → zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/bo/ExamNoteEditBo.java

@@ -1,4 +1,4 @@
-package com.zhongzheng.modules.bank.bo;
+package com.zhongzheng.modules.exam.bo;
 
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/bo/ExamNoteQueryBo.java → zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/bo/ExamNoteQueryBo.java

@@ -1,4 +1,4 @@
-package com.zhongzheng.modules.bank.bo;
+package com.zhongzheng.modules.exam.bo;
 
 import com.baomidou.mybatisplus.annotation.TableField;
 import io.swagger.annotations.ApiModel;

+ 4 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/domain/ExamConfig.java → zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/domain/ExamConfig.java

@@ -1,4 +1,4 @@
-package com.zhongzheng.modules.bank.domain;
+package com.zhongzheng.modules.exam.domain;
 
 import com.baomidou.mybatisplus.annotation.*;
 import lombok.Data;
@@ -75,4 +75,7 @@ private static final long serialVersionUID=1L;
     /** 类目ID */
     private Long categoryId;
 
+    @TableField(exist = false)
+    private String categoryName;
+
 }

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/domain/ExamNote.java → zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/domain/ExamNote.java

@@ -1,4 +1,4 @@
-package com.zhongzheng.modules.bank.domain;
+package com.zhongzheng.modules.exam.domain;
 
 import com.baomidou.mybatisplus.annotation.*;
 import lombok.Data;

+ 21 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/mapper/ExamConfigMapper.java

@@ -0,0 +1,21 @@
+package com.zhongzheng.modules.exam.mapper;
+
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.zhongzheng.modules.bank.bo.QuestionBankQueryBo;
+import com.zhongzheng.modules.bank.vo.QuestionBankVo;
+import com.zhongzheng.modules.exam.bo.ExamConfigQueryBo;
+import com.zhongzheng.modules.exam.domain.ExamConfig;
+import com.zhongzheng.modules.exam.vo.ExamConfigVo;
+
+import java.util.List;
+
+/**
+ * 考题配置Mapper接口
+ *
+ * @author hjl
+ * @date 2021-05-21
+ */
+public interface ExamConfigMapper extends BaseMapper<ExamConfig> {
+    List<ExamConfigVo> selectExamConfigList(ExamConfigQueryBo bo);
+}

+ 18 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/mapper/ExamNoteMapper.java

@@ -0,0 +1,18 @@
+package com.zhongzheng.modules.exam.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.zhongzheng.modules.exam.bo.ExamNoteQueryBo;
+import com.zhongzheng.modules.exam.domain.ExamNote;
+import com.zhongzheng.modules.exam.vo.ExamNoteVo;
+
+import java.util.List;
+
+/**
+ * 考试重点Mapper接口
+ *
+ * @author hjl
+ * @date 2021-05-21
+ */
+public interface ExamNoteMapper extends BaseMapper<ExamNote> {
+    List<ExamNoteVo> selectExamNoteList(ExamNoteQueryBo bo);
+}

+ 8 - 6
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/IExamConfigService.java → zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/service/IExamConfigService.java

@@ -1,12 +1,12 @@
-package com.zhongzheng.modules.bank.service;
+package com.zhongzheng.modules.exam.service;
 
 
 import com.baomidou.mybatisplus.extension.service.IService;
-import com.zhongzheng.modules.bank.bo.ExamConfigAddBo;
-import com.zhongzheng.modules.bank.bo.ExamConfigEditBo;
-import com.zhongzheng.modules.bank.bo.ExamConfigQueryBo;
-import com.zhongzheng.modules.bank.domain.ExamConfig;
-import com.zhongzheng.modules.bank.vo.ExamConfigVo;
+import com.zhongzheng.modules.exam.bo.ExamConfigAddBo;
+import com.zhongzheng.modules.exam.bo.ExamConfigEditBo;
+import com.zhongzheng.modules.exam.bo.ExamConfigQueryBo;
+import com.zhongzheng.modules.exam.domain.ExamConfig;
+import com.zhongzheng.modules.exam.vo.ExamConfigVo;
 
 import java.util.Collection;
 import java.util.List;
@@ -29,6 +29,8 @@ public interface IExamConfigService extends IService<ExamConfig> {
 	 */
 	List<ExamConfigVo> queryList(ExamConfigQueryBo bo);
 
+	List<ExamConfigVo> selectExamConfigList(ExamConfigQueryBo bo);
+
 	/**
 	 * 根据新增业务对象插入考题配置
 	 * @param bo 考题配置新增业务对象

+ 6 - 6
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/IExamNoteService.java → zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/service/IExamNoteService.java

@@ -1,11 +1,11 @@
-package com.zhongzheng.modules.bank.service;
+package com.zhongzheng.modules.exam.service;
 
-import com.zhongzheng.modules.bank.bo.ExamNoteAddBo;
-import com.zhongzheng.modules.bank.bo.ExamNoteEditBo;
-import com.zhongzheng.modules.bank.bo.ExamNoteQueryBo;
-import com.zhongzheng.modules.bank.domain.ExamNote;
+import com.zhongzheng.modules.exam.bo.ExamNoteAddBo;
+import com.zhongzheng.modules.exam.bo.ExamNoteEditBo;
+import com.zhongzheng.modules.exam.bo.ExamNoteQueryBo;
+import com.zhongzheng.modules.exam.domain.ExamNote;
 import com.baomidou.mybatisplus.extension.service.IService;
-import com.zhongzheng.modules.bank.vo.ExamNoteVo;
+import com.zhongzheng.modules.exam.vo.ExamNoteVo;
 
 import java.util.Collection;
 import java.util.List;

+ 20 - 11
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/ExamConfigServiceImpl.java → zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/service/impl/ExamConfigServiceImpl.java

@@ -1,18 +1,18 @@
-package com.zhongzheng.modules.bank.service.impl;
+package com.zhongzheng.modules.exam.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.lang.Validator;
-import cn.hutool.core.util.StrUtil;
 import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.utils.DateUtils;
-import com.zhongzheng.modules.bank.bo.ExamConfigAddBo;
-import com.zhongzheng.modules.bank.bo.ExamConfigEditBo;
-import com.zhongzheng.modules.bank.bo.ExamConfigQueryBo;
-import com.zhongzheng.modules.bank.domain.ExamConfig;
-import com.zhongzheng.modules.bank.mapper.ExamConfigMapper;
-import com.zhongzheng.modules.bank.service.IExamConfigService;
-import com.zhongzheng.modules.bank.vo.ExamConfigVo;
-import com.zhongzheng.modules.course.domain.MajorCategory;
+import com.zhongzheng.modules.course.mapper.CourseMapper;
+import com.zhongzheng.modules.exam.bo.ExamConfigAddBo;
+import com.zhongzheng.modules.exam.bo.ExamConfigEditBo;
+import com.zhongzheng.modules.exam.bo.ExamConfigQueryBo;
+import com.zhongzheng.modules.exam.domain.ExamConfig;
+import com.zhongzheng.modules.exam.mapper.ExamConfigMapper;
+import com.zhongzheng.modules.exam.service.IExamConfigService;
+import com.zhongzheng.modules.exam.vo.ExamConfigVo;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -20,7 +20,6 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.github.pagehelper.Page;
 
 import java.util.Collection;
-import java.util.Collections;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -33,6 +32,11 @@ import java.util.stream.Collectors;
 @Service
 public class ExamConfigServiceImpl extends ServiceImpl<ExamConfigMapper, ExamConfig> implements IExamConfigService {
 
+
+    @Autowired
+    private ExamConfigMapper examConfigMapper;
+
+
     @Override
     public ExamConfigVo queryById(Long id){
         ExamConfig db = this.baseMapper.selectById(id);
@@ -58,6 +62,11 @@ public class ExamConfigServiceImpl extends ServiceImpl<ExamConfigMapper, ExamCon
         return entity2Vo(this.list(lqw));
     }
 
+    @Override
+    public List<ExamConfigVo> selectExamConfigList(ExamConfigQueryBo bo) {
+        return examConfigMapper.selectExamConfigList(bo);
+    }
+
     /**
     * 实体类转化成视图对象
     *

+ 8 - 10
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/ExamNoteServiceImpl.java → zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/service/impl/ExamNoteServiceImpl.java

@@ -1,16 +1,15 @@
-package com.zhongzheng.modules.bank.service.impl;
+package com.zhongzheng.modules.exam.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.StrUtil;
 import com.zhongzheng.common.utils.DateUtils;
-import com.zhongzheng.modules.bank.bo.ExamNoteAddBo;
-import com.zhongzheng.modules.bank.bo.ExamNoteEditBo;
-import com.zhongzheng.modules.bank.bo.ExamNoteQueryBo;
-import com.zhongzheng.modules.bank.domain.ExamNote;
-import com.zhongzheng.modules.bank.mapper.ExamNoteMapper;
-import com.zhongzheng.modules.bank.service.IExamNoteService;
-import com.zhongzheng.modules.bank.vo.ExamNoteVo;
-import com.zhongzheng.modules.course.mapper.CourseMapper;
+import com.zhongzheng.modules.exam.bo.ExamNoteAddBo;
+import com.zhongzheng.modules.exam.bo.ExamNoteEditBo;
+import com.zhongzheng.modules.exam.bo.ExamNoteQueryBo;
+import com.zhongzheng.modules.exam.domain.ExamNote;
+import com.zhongzheng.modules.exam.mapper.ExamNoteMapper;
+import com.zhongzheng.modules.exam.service.IExamNoteService;
+import com.zhongzheng.modules.exam.vo.ExamNoteVo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -19,7 +18,6 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.github.pagehelper.Page;
 
 import java.util.Collection;
-import java.util.Collections;
 import java.util.List;
 import java.util.stream.Collectors;
 

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/vo/ExamConfigVo.java → zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/vo/ExamConfigVo.java

@@ -1,4 +1,4 @@
-package com.zhongzheng.modules.bank.vo;
+package com.zhongzheng.modules.exam.vo;
 
 import com.zhongzheng.common.annotation.Excel;
 import com.fasterxml.jackson.annotation.JsonFormat;

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/vo/ExamNoteVo.java → zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/vo/ExamNoteVo.java

@@ -1,4 +1,4 @@
-package com.zhongzheng.modules.bank.vo;
+package com.zhongzheng.modules.exam.vo;
 
 import com.zhongzheng.common.annotation.Excel;
 import com.fasterxml.jackson.annotation.JsonFormat;

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/vo/ExamUserVo.java

@@ -107,4 +107,6 @@ public class ExamUserVo {
 	@ApiModelProperty("考试安排,包含考试指引视图对象")
 	private ExamArrangementVo examArrangementVo;
 
+	@ApiModelProperty("分类名")
+	private String categoryName;
 }

+ 21 - 3
zhongzheng-system/src/main/resources/mapper/modules/bank/ExamConfigMapper.xml → zhongzheng-system/src/main/resources/mapper/modules/exam/ExamConfigMapper.xml

@@ -2,9 +2,9 @@
 <!DOCTYPE mapper
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.zhongzheng.modules.bank.mapper.ExamConfigMapper">
+<mapper namespace="com.zhongzheng.modules.exam.mapper.ExamConfigMapper">
 
-    <resultMap type="com.zhongzheng.modules.bank.domain.ExamConfig" id="ExamConfigResult">
+    <resultMap type="com.zhongzheng.modules.exam.domain.ExamConfig" id="ExamConfigResult">
         <result property="id" column="id"/>
         <result property="passingScore" column="passing_score"/>
         <result property="examTime" column="exam_time"/>
@@ -21,7 +21,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="updateTime" column="update_time"/>
         <result property="status" column="status"/>
         <result property="categoryId" column="category_id"/>
+        <result property="categoryName" column="category_name"/>
     </resultMap>
 
-
+    <select id="selectExamConfigList" parameterType="com.zhongzheng.modules.exam.bo.ExamConfigQueryBo"  resultMap="ExamConfigResult">
+        SELECT
+        ex.*,
+        mc.category_name
+        FROM
+        exam_config ex
+        LEFT JOIN major_category mc ON ex.category_id = mc.category_id
+        WHERE 1=1
+        <if test="status != null and status.size()!=0 ">
+            AND ex.status in
+            <foreach collection="status" item="item" index="index" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
+        </if>
+        <if test="categoryId != null and categoryId != ''">
+            AND ex.category_id = #{categoryId}
+        </if>
+    </select>
 </mapper>

+ 3 - 3
zhongzheng-system/src/main/resources/mapper/modules/bank/ExamNoteMapper.xml → zhongzheng-system/src/main/resources/mapper/modules/exam/ExamNoteMapper.xml

@@ -2,9 +2,9 @@
 <!DOCTYPE mapper
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.zhongzheng.modules.bank.mapper.ExamNoteMapper">
+<mapper namespace="com.zhongzheng.modules.exam.mapper.ExamNoteMapper">
 
-    <resultMap type="com.zhongzheng.modules.bank.domain.ExamNote" id="ExamNoteResult">
+    <resultMap type="com.zhongzheng.modules.exam.domain.ExamNote" id="ExamNoteResult">
         <result property="fileId" column="file_id"/>
         <result property="categoryId" column="category_id"/>
         <result property="name" column="name"/>
@@ -20,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="categoryName" column="category_name"/>
     </resultMap>
 
-    <select id="selectExamNoteList" parameterType="com.zhongzheng.modules.bank.bo.ExamNoteQueryBo"  resultMap="ExamNoteResult">
+    <select id="selectExamNoteList" parameterType="com.zhongzheng.modules.exam.bo.ExamNoteQueryBo" resultMap="ExamNoteResult">
         SELECT en.*,mc.category_name from exam_note en LEFT JOIN major_category mc on en.category_id = mc.category_id
         <if test="status != null and status.size()!=0 ">
             WHERE en.status in