yangdamao преди 2 години
родител
ревизия
cd1eb6e074
променени са 71 файла, в които са добавени 985 реда и са изтрити 727 реда
  1. 72 49
      zhongzheng-admin-saas/src/main/java/com/zhongzheng/controller/top/TopSysDictDataController.java
  2. 63 51
      zhongzheng-admin-saas/src/main/java/com/zhongzheng/controller/top/TopSysDictTypeController.java
  3. 5 0
      zhongzheng-common/src/main/java/com/zhongzheng/common/constant/Constants.java
  4. 8 0
      zhongzheng-common/src/main/java/com/zhongzheng/common/core/domain/entity/TopSysUser.java
  5. 40 0
      zhongzheng-common/src/main/java/com/zhongzheng/common/utils/DictUtils.java
  6. 3 2
      zhongzheng-framework/src/main/java/com/zhongzheng/framework/mybatisplus/CreateAndUpdateMetaObjectHandler.java
  7. 6 7
      zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/ExamQuestionServiceImpl.java
  8. 10 9
      zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/ExamServiceImpl.java
  9. 6 7
      zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/QuestionBusinessServiceImpl.java
  10. 6 9
      zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/QuestionChapterExamServiceImpl.java
  11. 14 7
      zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/QuestionChapterServiceImpl.java
  12. 6 8
      zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/QuestionModuleChapterServiceImpl.java
  13. 6 6
      zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/QuestionModuleServiceImpl.java
  14. 24 25
      zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/QuestionServiceImpl.java
  15. 6 5
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/CertificateCommonServiceImpl.java
  16. 6 7
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/CertificateServiceImpl.java
  17. 9 12
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/CertificateTpServiceImpl.java
  18. 6 5
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/ProfileFieldServiceImpl.java
  19. 6 7
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/ProfileTpBusinessServiceImpl.java
  20. 2 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/ProfileTpServiceImpl.java
  21. 14 17
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseBusinessServiceImpl.java
  22. 6 8
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseChapterBusinessServiceImpl.java
  23. 12 11
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseChapterSectionServiceImpl.java
  24. 10 9
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseChapterServiceImpl.java
  25. 6 6
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseEducationTierServiceImpl.java
  26. 16 14
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseEducationTypeServiceImpl.java
  27. 7 8
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseHandoutsBusinessServiceImpl.java
  28. 15 14
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseHandoutsServiceImpl.java
  29. 6 7
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseMenuExamServiceImpl.java
  30. 2 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseMenuServiceImpl.java
  31. 7 9
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseModuleBusinessServiceImpl.java
  32. 12 10
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseModuleChapterServiceImpl.java
  33. 14 8
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseModuleServiceImpl.java
  34. 7 9
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseProjectTypeServiceImpl.java
  35. 6 8
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseSectionBusinessServiceImpl.java
  36. 6 11
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseSectionServiceImpl.java
  37. 2 7
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseSectionWatchPerServiceImpl.java
  38. 16 16
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseServiceImpl.java
  39. 6 8
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseStreamingBusinessServiceImpl.java
  40. 10 10
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseStreamingServiceImpl.java
  41. 7 8
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseSubjectProjectServiceImpl.java
  42. 10 16
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseSubjectServiceImpl.java
  43. 7 8
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/MajorProjectServiceImpl.java
  44. 12 14
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/MajorServiceImpl.java
  45. 9 10
      zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/service/impl/ExamPaperServiceImpl.java
  46. 2 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/IGoodsService.java
  47. 6 7
      zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/impl/GoodsAttachedServiceImpl.java
  48. 8 9
      zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/impl/GoodsCourseServiceImpl.java
  49. 4 7
      zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/impl/GoodsCourseTeacherServiceImpl.java
  50. 13 4
      zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/impl/GoodsServiceImpl.java
  51. 6 5
      zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/impl/GoodsSpecAttributeRelationServiceImpl.java
  52. 6 5
      zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/impl/GoodsSpecAttributeServiceImpl.java
  53. 6 10
      zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/impl/GoodsSpecServiceImpl.java
  54. 2 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/impl/GoodsSpecTemplateServiceImpl.java
  55. 8 10
      zhongzheng-system/src/main/java/com/zhongzheng/modules/pay/service/impl/PayServeServiceImpl.java
  56. 8 8
      zhongzheng-system/src/main/java/com/zhongzheng/modules/pay/service/impl/PaySupplyServiceImpl.java
  57. 7 6
      zhongzheng-system/src/main/java/com/zhongzheng/modules/polyv/service/impl/PolyvCataServiceImpl.java
  58. 13 14
      zhongzheng-system/src/main/java/com/zhongzheng/modules/polyv/service/impl/PolyvVideoServiceImpl.java
  59. 0 3
      zhongzheng-system/src/main/java/com/zhongzheng/modules/system/service/impl/SysDictDataServiceImpl.java
  60. 4 12
      zhongzheng-system/src/main/java/com/zhongzheng/modules/top/goods/service/impl/TopGoodsServiceImpl.java
  61. 2 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/top/user/bo/TopSysUserAddBo.java
  62. 3 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/top/user/bo/TopSysUserEditBo.java
  63. 4 3
      zhongzheng-system/src/main/java/com/zhongzheng/modules/top/user/bo/TopSysUserQueryBo.java
  64. 18 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/top/user/domain/TopSysDictData.java
  65. 20 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/top/user/domain/TopSysDictType.java
  66. 34 23
      zhongzheng-system/src/main/java/com/zhongzheng/modules/top/user/service/ITopSysDictDataService.java
  67. 48 23
      zhongzheng-system/src/main/java/com/zhongzheng/modules/top/user/service/ITopSysDictTypeService.java
  68. 95 58
      zhongzheng-system/src/main/java/com/zhongzheng/modules/top/user/service/impl/TopSysDictDataServiceImpl.java
  69. 131 52
      zhongzheng-system/src/main/java/com/zhongzheng/modules/top/user/service/impl/TopSysDictTypeServiceImpl.java
  70. 2 3
      zhongzheng-system/src/main/java/com/zhongzheng/modules/top/user/service/impl/TopSysUserServiceImpl.java
  71. 6 3
      zhongzheng-system/src/main/java/com/zhongzheng/modules/top/user/vo/TopSysUserVo.java

+ 72 - 49
zhongzheng-admin-saas/src/main/java/com/zhongzheng/controller/top/TopSysDictDataController.java

@@ -1,23 +1,25 @@
 package com.zhongzheng.controller.top;
 
+import cn.hutool.core.lang.Validator;
 import com.zhongzheng.common.annotation.Log;
 import com.zhongzheng.common.core.controller.BaseController;
 import com.zhongzheng.common.core.domain.AjaxResult;
+import com.zhongzheng.common.core.page.TableDataInfo;
 import com.zhongzheng.common.enums.BusinessType;
+import com.zhongzheng.common.utils.SecurityUtils;
 import com.zhongzheng.common.utils.poi.ExcelUtil;
-import com.zhongzheng.modules.top.user.bo.TopSysDictDataAddBo;
-import com.zhongzheng.modules.top.user.bo.TopSysDictDataEditBo;
-import com.zhongzheng.modules.top.user.bo.TopSysDictDataQueryBo;
+import com.zhongzheng.modules.top.user.domain.TopSysDictData;
 import com.zhongzheng.modules.top.user.service.ITopSysDictDataService;
-import com.zhongzheng.modules.top.user.vo.TopSysDictDataVo;
+import com.zhongzheng.modules.top.user.service.ITopSysDictTypeService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.RequiredArgsConstructor;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
-import java.util.Arrays;
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -32,71 +34,92 @@ import java.util.List;
 @RequestMapping("/system/dict/data")
 public class TopSysDictDataController extends BaseController {
 
-    private final ITopSysDictDataService iTopSysDictDataService;
+    private final ITopSysDictDataService dictDataService;
 
-    /**
-     * 查询【请填写功能名称】列表
-     */
-    @ApiOperation("查询【请填写功能名称】列表")
+    private final ITopSysDictTypeService dictTypeService;
+
+
+    @ApiOperation("获取字典数据列表")
+    //  @PreAuthorize("@ss.hasPermi('system:dict:list')")
     @GetMapping("/list")
-    public AjaxResult<List<TopSysDictDataVo>> list(TopSysDictDataQueryBo bo) {
-        List<TopSysDictDataVo> list = iTopSysDictDataService.queryList(bo);
-        return AjaxResult.success(list);
+    public TableDataInfo list(TopSysDictData dictData)
+    {
+        startPage();
+        List<TopSysDictData> list = dictDataService.selectDictDataList(dictData);
+        return getDataTable(list);
+    }
+
+    @Log(title = "字典数据", businessType = BusinessType.EXPORT)
+    //  @PreAuthorize("@ss.hasPermi('system:dict:export')")
+    @GetMapping("/export")
+    public AjaxResult export(TopSysDictData dictData)
+    {
+        List<TopSysDictData> list = dictDataService.selectDictDataList(dictData);
+        ExcelUtil<TopSysDictData> util = new ExcelUtil<TopSysDictData>(TopSysDictData.class);
+        return util.exportExcel(list, "字典数据");
     }
 
     /**
-     * 导出【请填写功能名称】列表
+     * 查询字典数据详细
      */
-    @ApiOperation("导出【请填写功能名称】列表")
-    @PreAuthorize("@ss.hasPermi('system:data:export')")
-    @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    public AjaxResult<TopSysDictDataVo> export(TopSysDictDataQueryBo bo) {
-        List<TopSysDictDataVo> list = iTopSysDictDataService.queryList(bo);
-        ExcelUtil<TopSysDictDataVo> util = new ExcelUtil<TopSysDictDataVo>(TopSysDictDataVo.class);
-        return util.exportExcel(list, "【请填写功能名称】");
+    @ApiOperation("查询字典数据详细")
+    // @PreAuthorize("@ss.hasPermi('system:dict:query')")
+    @GetMapping(value = "/{dictCode}")
+    public AjaxResult getInfo(@PathVariable Long dictCode)
+    {
+        return AjaxResult.success(dictDataService.selectDictDataById(dictCode));
     }
 
     /**
-     * 获取【请填写功能名称】详细信息
+     * 根据字典类型查询字典数据信息
      */
-    @ApiOperation("获取【请填写功能名称】详细信息")
-    @PreAuthorize("@ss.hasPermi('system:data:query')")
-    @GetMapping("/{dictCode}")
-    public AjaxResult<TopSysDictDataVo> getInfo(@PathVariable("dictCode" ) Long dictCode) {
-        return AjaxResult.success(iTopSysDictDataService.queryById(dictCode));
+    @ApiOperation("根据字典类型查询字典数据信息")
+    @GetMapping(value = "/type/{dictType}")
+    public AjaxResult dictType(@PathVariable String dictType)
+    {
+        List<TopSysDictData> data = dictTypeService.selectDictDataByType(dictType);
+        if (Validator.isNull(data))
+        {
+            data = new ArrayList<TopSysDictData>();
+        }
+        return AjaxResult.success(data);
     }
 
     /**
-     * 新增【请填写功能名称】
+     * 新增字典类型
      */
-    @ApiOperation("新增【请填写功能名称】")
-    @PreAuthorize("@ss.hasPermi('system:data:add')")
-    @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
-    @PostMapping()
-    public AjaxResult<Void> add(@RequestBody TopSysDictDataAddBo bo) {
-        return toAjax(iTopSysDictDataService.insertByAddBo(bo) ? 1 : 0);
+    @ApiOperation("新增字典数据")
+    @PreAuthorize("@ss.hasPermi('system:dict:add')")
+    @Log(title = "字典数据", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@Validated @RequestBody TopSysDictData dict)
+    {
+        dict.setCreateBy(SecurityUtils.getUsername());
+        return toAjax(dictDataService.insertDictData(dict));
     }
 
     /**
-     * 修改【请填写功能名称】
+     * 修改保存字典类型
      */
-    @ApiOperation("修改【请填写功能名称】")
-    @PreAuthorize("@ss.hasPermi('system:data:edit')")
-    @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
-    @PutMapping()
-    public AjaxResult<Void> edit(@RequestBody TopSysDictDataEditBo bo) {
-        return toAjax(iTopSysDictDataService.updateByEditBo(bo) ? 1 : 0);
+    @ApiOperation("修改保存字典数据")
+    @PreAuthorize("@ss.hasPermi('system:dict:edit')")
+    @Log(title = "字典数据", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    public AjaxResult edit(@Validated @RequestBody TopSysDictData dict)
+    {
+        dict.setUpdateBy(SecurityUtils.getUsername());
+        return toAjax(dictDataService.updateDictData(dict));
     }
 
     /**
-     * 删除【请填写功能名称】
+     * 删除字典类型
      */
-    @ApiOperation("删除【请填写功能名称】")
-    @PreAuthorize("@ss.hasPermi('system:data:remove')")
-    @Log(title = "【请填写功能名称】" , businessType = BusinessType.DELETE)
-    @DeleteMapping("/{dictCodes}")
-    public AjaxResult<Void> remove(@PathVariable Long[] dictCodes) {
-        return toAjax(iTopSysDictDataService.deleteWithValidByIds(Arrays.asList(dictCodes), true) ? 1 : 0);
+    @ApiOperation("删除字典数据")
+    @PreAuthorize("@ss.hasPermi('system:dict:remove')")
+    @Log(title = "字典类型", businessType = BusinessType.DELETE)
+    @PostMapping("/delete/{dictCodes}")
+    public AjaxResult remove(@PathVariable Long[] dictCodes)
+    {
+        return toAjax(dictDataService.deleteDictDataByIds(dictCodes));
     }
 }

+ 63 - 51
zhongzheng-admin-saas/src/main/java/com/zhongzheng/controller/top/TopSysDictTypeController.java

@@ -1,24 +1,22 @@
 package com.zhongzheng.controller.top;
 
 import com.zhongzheng.common.annotation.Log;
+import com.zhongzheng.common.constant.UserConstants;
 import com.zhongzheng.common.core.controller.BaseController;
 import com.zhongzheng.common.core.domain.AjaxResult;
 import com.zhongzheng.common.core.page.TableDataInfo;
 import com.zhongzheng.common.enums.BusinessType;
-import com.zhongzheng.common.utils.poi.ExcelUtil;
-import com.zhongzheng.modules.top.user.bo.TopSysDictTypeAddBo;
-import com.zhongzheng.modules.top.user.bo.TopSysDictTypeEditBo;
-import com.zhongzheng.modules.top.user.bo.TopSysDictTypeQueryBo;
+import com.zhongzheng.common.utils.SecurityUtils;
+import com.zhongzheng.modules.top.user.domain.TopSysDictType;
 import com.zhongzheng.modules.top.user.service.ITopSysDictTypeService;
-import com.zhongzheng.modules.top.user.vo.TopSysDictTypeVo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.RequiredArgsConstructor;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
-import java.util.Arrays;
 import java.util.List;
 
 /**
@@ -30,76 +28,90 @@ import java.util.List;
 @Api(value = "【请填写功能名称】控制器", tags = {"【请填写功能名称】管理"})
 @RequiredArgsConstructor(onConstructor_ = @Autowired)
 @RestController
-@RequestMapping("/system/type")
+@RequestMapping("/system/dict/type")
 public class TopSysDictTypeController extends BaseController {
 
-    private final ITopSysDictTypeService iTopSysDictTypeService;
+    private final ITopSysDictTypeService dictTypeService;
 
-    /**
-     * 查询【请填写功能名称】列表
-     */
-    @ApiOperation("查询【请填写功能名称】列表")
-    @PreAuthorize("@ss.hasPermi('system:type:list')")
+    @ApiOperation("获取字典类型列表")
+    //   @PreAuthorize("@ss.hasPermi('system:dict:list')")
     @GetMapping("/list")
-    public TableDataInfo<TopSysDictTypeVo> list(TopSysDictTypeQueryBo bo) {
+    public TableDataInfo list(TopSysDictType dictType)
+    {
         startPage();
-        List<TopSysDictTypeVo> list = iTopSysDictTypeService.queryList(bo);
+        List<TopSysDictType> list = dictTypeService.selectDictTypeList(dictType);
         return getDataTable(list);
     }
+    
 
     /**
-     * 导出【请填写功能名称】列表
+     * 查询字典类型详细
      */
-    @ApiOperation("导出【请填写功能名称】列表")
-    @PreAuthorize("@ss.hasPermi('system:type:export')")
-    @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    public AjaxResult<TopSysDictTypeVo> export(TopSysDictTypeQueryBo bo) {
-        List<TopSysDictTypeVo> list = iTopSysDictTypeService.queryList(bo);
-        ExcelUtil<TopSysDictTypeVo> util = new ExcelUtil<TopSysDictTypeVo>(TopSysDictTypeVo.class);
-        return util.exportExcel(list, "【请填写功能名称】");
+    @ApiOperation("查询字典类型详细")
+    //   @PreAuthorize("@ss.hasPermi('system:dict:query')")
+    @GetMapping(value = "/{dictId}")
+    public AjaxResult getInfo(@PathVariable Long dictId)
+    {
+        return AjaxResult.success(dictTypeService.selectDictTypeById(dictId));
     }
 
     /**
-     * 获取【请填写功能名称】详细信息
+     * 新增字典类型
      */
-    @ApiOperation("获取【请填写功能名称】详细信息")
-    @PreAuthorize("@ss.hasPermi('system:type:query')")
-    @GetMapping("/{dictId}")
-    public AjaxResult<TopSysDictTypeVo> getInfo(@PathVariable("dictId" ) Long dictId) {
-        return AjaxResult.success(iTopSysDictTypeService.queryById(dictId));
+    @ApiOperation("新增字典类型")
+    @PreAuthorize("@ss.hasPermi('system:dict:add')")
+    @Log(title = "字典类型", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@Validated @RequestBody TopSysDictType dict)
+    {
+        if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict)))
+        {
+            return AjaxResult.error("新增字典'" + dict.getDictName() + "'失败,字典类型已存在");
+        }
+        dict.setCreateBy(SecurityUtils.getUsername());
+        return toAjax(dictTypeService.insertDictType(dict));
     }
 
     /**
-     * 新增【请填写功能名称】
+     * 修改字典类型
      */
-    @ApiOperation("新增【请填写功能名称】")
-    @PreAuthorize("@ss.hasPermi('system:type:add')")
-    @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
-    @PostMapping()
-    public AjaxResult<Void> add(@RequestBody TopSysDictTypeAddBo bo) {
-        return toAjax(iTopSysDictTypeService.insertByAddBo(bo) ? 1 : 0);
+    @ApiOperation("修改字典类型")
+    @PreAuthorize("@ss.hasPermi('system:dict:edit')")
+    @Log(title = "字典类型", businessType = BusinessType.UPDATE)
+    @PostMapping("/edit")
+    public AjaxResult edit(@Validated @RequestBody TopSysDictType dict)
+    {
+        if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict)))
+        {
+            return AjaxResult.error("修改字典'" + dict.getDictName() + "'失败,字典类型已存在");
+        }
+        dict.setUpdateBy(SecurityUtils.getUsername());
+        return toAjax(dictTypeService.updateDictType(dict));
     }
 
     /**
-     * 修改【请填写功能名称】
+     * 删除字典类型
      */
-    @ApiOperation("修改【请填写功能名称】")
-    @PreAuthorize("@ss.hasPermi('system:type:edit')")
-    @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
-    @PutMapping()
-    public AjaxResult<Void> edit(@RequestBody TopSysDictTypeEditBo bo) {
-        return toAjax(iTopSysDictTypeService.updateByEditBo(bo) ? 1 : 0);
+    @ApiOperation("删除字典类型")
+    @PreAuthorize("@ss.hasPermi('system:dict:remove')")
+    @Log(title = "字典类型", businessType = BusinessType.DELETE)
+    @PostMapping("/delete/{dictIds}")
+    public AjaxResult remove(@PathVariable Long[] dictIds)
+    {
+        return toAjax(dictTypeService.deleteDictTypeByIds(dictIds));
     }
 
     /**
-     * 删除【请填写功能名称】
+     * 清空缓存
      */
-    @ApiOperation("删除【请填写功能名称】")
-    @PreAuthorize("@ss.hasPermi('system:type:remove')")
-    @Log(title = "【请填写功能名称】" , businessType = BusinessType.DELETE)
-    @DeleteMapping("/{dictIds}")
-    public AjaxResult<Void> remove(@PathVariable Long[] dictIds) {
-        return toAjax(iTopSysDictTypeService.deleteWithValidByIds(Arrays.asList(dictIds), true) ? 1 : 0);
+
+    @PreAuthorize("@ss.hasPermi('system:dict:remove')")
+    @Log(title = "字典类型", businessType = BusinessType.CLEAN)
+    @DeleteMapping("/clearCache")
+    public AjaxResult clearCache()
+    {
+        dictTypeService.clearCache();
+        return AjaxResult.success();
     }
+
 }

+ 5 - 0
zhongzheng-common/src/main/java/com/zhongzheng/common/constant/Constants.java

@@ -154,6 +154,11 @@ public class Constants
      */
     public static final String SYS_DICT_KEY = "sys_dict:";
 
+    /**
+     * 字典管理 cache key
+     */
+    public static final String SYS_TOP_DICT_KEY = "sys_top_dict:";
+
     /**
      * 资源映射路径 前缀
      */

+ 8 - 0
zhongzheng-common/src/main/java/com/zhongzheng/common/core/domain/entity/TopSysUser.java

@@ -72,6 +72,9 @@ public class TopSysUser implements Serializable
     /** 用户头像 */
     private String avatar;
 
+    /** 用户编码 */
+    private String code;
+
     /** 密码 */
     private String password;
 
@@ -82,6 +85,7 @@ public class TopSysUser implements Serializable
     }
 
     /** 盐加密 */
+    @TableField(exist = false)
     private String salt;
 
     /** 帐号状态(1正常 0停用) */
@@ -146,6 +150,10 @@ public class TopSysUser implements Serializable
     @TableField(exist = false)
     private Long[] roleIds;
 
+    /** 角色名称 */
+    @TableField(exist = false)
+    private String roleName;
+
     /** 岗位组 */
     @TableField(exist = false)
     private Long[] postIds;

+ 40 - 0
zhongzheng-common/src/main/java/com/zhongzheng/common/utils/DictUtils.java

@@ -34,6 +34,17 @@ public class DictUtils
         SpringUtils.getBean(RedisCache.class).setCacheObject(getCacheKey(key), dictDatas);
     }
 
+    /**
+     * 设置字典缓存
+     *
+     * @param key 参数键
+     * @param dictDatas 字典数据列表
+     */
+    public static void setTopDictCache(String key, List<SysDictData> dictDatas)
+    {
+        SpringUtils.getBean(RedisCache.class).setCacheObject(getTopCacheKey(key), dictDatas);
+    }
+
     /**
      * 获取字典缓存
      * 
@@ -51,6 +62,24 @@ public class DictUtils
         return null;
     }
 
+    /**
+     * 获取字典缓存
+     *
+     * @param key 参数键
+     * @return dictDatas 字典数据列表
+     */
+    public static List<SysDictData> getTopDictCache(String key)
+    {
+        Object cacheObj = SpringUtils.getBean(RedisCache.class).getCacheObject(getTopCacheKey(key));
+        if (Validator.isNotNull(cacheObj))
+        {
+            List<SysDictData> dictDatas = (List<SysDictData>)cacheObj;
+            return dictDatas;
+        }
+        return null;
+    }
+
+
     /**
      * 根据字典类型和字典值获取字典标签
      * 
@@ -174,4 +203,15 @@ public class DictUtils
     {
         return Constants.SYS_DICT_KEY + configKey;
     }
+
+    /**
+     * 设置cache key
+     *
+     * @param configKey 参数键
+     * @return 缓存键key
+     */
+    public static String getTopCacheKey(String configKey)
+    {
+        return Constants.SYS_TOP_DICT_KEY + configKey;
+    }
 }

+ 3 - 2
zhongzheng-framework/src/main/java/com/zhongzheng/framework/mybatisplus/CreateAndUpdateMetaObjectHandler.java

@@ -1,6 +1,7 @@
 package com.zhongzheng.framework.mybatisplus;
 
 import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
+import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.common.utils.SecurityUtils;
 import org.apache.ibatis.reflection.MetaObject;
 
@@ -18,7 +19,7 @@ public class CreateAndUpdateMetaObjectHandler implements MetaObjectHandler {
 		//根据属性名字设置要填充的值
 		if (metaObject.hasGetter("createTime")) {
 			if (metaObject.getValue("createTime") == null) {
-				this.setFieldValByName("createTime", new Date(), metaObject);
+				this.setFieldValByName("createTime", DateUtils.getNowTime(), metaObject);
 			}
 		}
 		if (metaObject.hasGetter("createBy")) {
@@ -37,7 +38,7 @@ public class CreateAndUpdateMetaObjectHandler implements MetaObjectHandler {
 		}
 		if (metaObject.hasGetter("updateTime")) {
 			if (metaObject.getValue("updateTime") == null) {
-				this.setFieldValByName("updateTime", new Date(), metaObject);
+				this.setFieldValByName("updateTime", DateUtils.getNowTime(), metaObject);
 			}
 		}
 	}

+ 6 - 7
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/ExamQuestionServiceImpl.java

@@ -1,8 +1,11 @@
 package com.zhongzheng.modules.bank.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.util.StrUtil;
-import com.zhongzheng.common.utils.DateUtils;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
 import com.zhongzheng.modules.bank.bo.ExamQuestionAddBo;
 import com.zhongzheng.modules.bank.bo.ExamQuestionEditBo;
 import com.zhongzheng.modules.bank.bo.ExamQuestionQueryBo;
@@ -12,13 +15,8 @@ import com.zhongzheng.modules.bank.service.IExamQuestionService;
 import com.zhongzheng.modules.bank.vo.ExamQuestionVo;
 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;
-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;
 
@@ -29,6 +27,7 @@ import java.util.stream.Collectors;
  * @date 2021-10-22
  */
 @Service
+@DS("slave")
 public class ExamQuestionServiceImpl extends ServiceImpl<ExamQuestionMapper, ExamQuestion> implements IExamQuestionService {
 
     @Autowired

+ 10 - 9
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/ExamServiceImpl.java

@@ -4,15 +4,23 @@ import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.lang.Validator;
 import cn.hutool.core.util.StrUtil;
 import com.alibaba.fastjson.JSON;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
 import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.modules.bank.bo.*;
-import com.zhongzheng.modules.bank.domain.*;
+import com.zhongzheng.modules.bank.domain.Exam;
+import com.zhongzheng.modules.bank.domain.ExamQuestion;
+import com.zhongzheng.modules.bank.domain.QuestionBusiness;
+import com.zhongzheng.modules.bank.domain.QuestionChapterExam;
 import com.zhongzheng.modules.bank.mapper.ExamMapper;
 import com.zhongzheng.modules.bank.service.IExamQuestionService;
 import com.zhongzheng.modules.bank.service.IExamService;
@@ -20,10 +28,7 @@ import com.zhongzheng.modules.bank.service.IQuestionBusinessService;
 import com.zhongzheng.modules.bank.service.IQuestionChapterExamService;
 import com.zhongzheng.modules.bank.vo.ExamVo;
 import com.zhongzheng.modules.bank.vo.QuestionChapterExamVo;
-import com.zhongzheng.modules.course.bo.CourseChapterSectionListAddBo;
-import com.zhongzheng.modules.course.domain.CourseChapterSection;
 import com.zhongzheng.modules.course.domain.CourseMenuExam;
-import com.zhongzheng.modules.course.service.ICourseChapterBusinessService;
 import com.zhongzheng.modules.course.service.ICourseMenuExamService;
 import com.zhongzheng.modules.exam.bo.ExamPaperQueryBo;
 import com.zhongzheng.modules.goods.bo.GoodsAttachedQueryBo;
@@ -31,14 +36,9 @@ import com.zhongzheng.modules.goods.domain.GoodsAttached;
 import com.zhongzheng.modules.goods.service.IGoodsAttachedService;
 import com.zhongzheng.modules.goods.vo.GoodsAttachedVo;
 import com.zhongzheng.modules.user.bo.CheckUserExamRecordBo;
-import com.zhongzheng.modules.user.domain.User;
 import com.zhongzheng.modules.user.service.IUserExamRecordService;
 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;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.pagehelper.Page;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.util.*;
@@ -51,6 +51,7 @@ import java.util.stream.Collectors;
  * @date 2021-10-22
  */
 @Service
+@DS("slave")
 public class ExamServiceImpl extends ServiceImpl<ExamMapper, Exam> implements IExamService {
 
     @Autowired

+ 6 - 7
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/QuestionBusinessServiceImpl.java

@@ -1,8 +1,11 @@
 package com.zhongzheng.modules.bank.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.util.StrUtil;
-import com.zhongzheng.common.utils.DateUtils;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
 import com.zhongzheng.modules.bank.bo.QuestionBusinessAddBo;
 import com.zhongzheng.modules.bank.bo.QuestionBusinessEditBo;
 import com.zhongzheng.modules.bank.bo.QuestionBusinessQueryBo;
@@ -12,13 +15,8 @@ import com.zhongzheng.modules.bank.service.IQuestionBusinessService;
 import com.zhongzheng.modules.bank.vo.QuestionBusinessVo;
 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;
-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;
 
@@ -29,6 +27,7 @@ import java.util.stream.Collectors;
  * @date 2021-10-25
  */
 @Service
+@DS("slave")
 public class QuestionBusinessServiceImpl extends ServiceImpl<QuestionBusinessMapper, QuestionBusiness> implements IQuestionBusinessService {
 
     @Autowired

+ 6 - 9
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/QuestionChapterExamServiceImpl.java

@@ -1,27 +1,23 @@
 package com.zhongzheng.modules.bank.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.util.StrUtil;
-import com.zhongzheng.common.utils.DateUtils;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
 import com.zhongzheng.modules.bank.bo.QuestionChapterExamAddBo;
 import com.zhongzheng.modules.bank.bo.QuestionChapterExamEditBo;
 import com.zhongzheng.modules.bank.bo.QuestionChapterExamQueryBo;
 import com.zhongzheng.modules.bank.domain.QuestionChapterExam;
 import com.zhongzheng.modules.bank.mapper.QuestionChapterExamMapper;
-import com.zhongzheng.modules.bank.mapper.QuestionModuleChapterMapper;
 import com.zhongzheng.modules.bank.service.IQuestionChapterExamService;
 import com.zhongzheng.modules.bank.vo.ExamVo;
 import com.zhongzheng.modules.bank.vo.QuestionChapterExamVo;
 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;
-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;
 
@@ -32,6 +28,7 @@ import java.util.stream.Collectors;
  * @date 2021-10-25
  */
 @Service
+@DS("slave")
 public class QuestionChapterExamServiceImpl extends ServiceImpl<QuestionChapterExamMapper, QuestionChapterExam> implements IQuestionChapterExamService {
 
     @Autowired

+ 14 - 7
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/QuestionChapterServiceImpl.java

@@ -2,33 +2,39 @@ package com.zhongzheng.modules.bank.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.StrUtil;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
 import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.modules.bank.bo.*;
-import com.zhongzheng.modules.bank.domain.*;
+import com.zhongzheng.modules.bank.domain.QuestionBusiness;
+import com.zhongzheng.modules.bank.domain.QuestionChapter;
+import com.zhongzheng.modules.bank.domain.QuestionChapterExam;
+import com.zhongzheng.modules.bank.domain.QuestionModuleChapter;
 import com.zhongzheng.modules.bank.mapper.QuestionChapterMapper;
 import com.zhongzheng.modules.bank.service.IQuestionBusinessService;
 import com.zhongzheng.modules.bank.service.IQuestionChapterExamService;
 import com.zhongzheng.modules.bank.service.IQuestionChapterService;
 import com.zhongzheng.modules.bank.service.IQuestionModuleChapterService;
 import com.zhongzheng.modules.bank.vo.QuestionChapterVo;
-import com.zhongzheng.modules.course.bo.CourseSectionAddBo;
 import com.zhongzheng.modules.goods.domain.GoodsAttached;
 import com.zhongzheng.modules.goods.service.IGoodsAttachedService;
 import com.zhongzheng.modules.user.bo.CheckUserExamRecordBo;
 import com.zhongzheng.modules.user.service.IUserExamRecordService;
 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;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.pagehelper.Page;
 import org.springframework.transaction.annotation.Transactional;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
 import java.util.stream.Collectors;
 
 /**
@@ -38,6 +44,7 @@ import java.util.stream.Collectors;
  * @date 2021-10-25
  */
 @Service
+@DS("slave")
 public class QuestionChapterServiceImpl extends ServiceImpl<QuestionChapterMapper, QuestionChapter> implements IQuestionChapterService {
 
     @Autowired

+ 6 - 8
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/QuestionModuleChapterServiceImpl.java

@@ -1,26 +1,23 @@
 package com.zhongzheng.modules.bank.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.util.StrUtil;
-import com.zhongzheng.common.utils.DateUtils;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
 import com.zhongzheng.modules.bank.bo.QuestionModuleChapterAddBo;
 import com.zhongzheng.modules.bank.bo.QuestionModuleChapterEditBo;
 import com.zhongzheng.modules.bank.bo.QuestionModuleChapterQueryBo;
 import com.zhongzheng.modules.bank.domain.QuestionModuleChapter;
 import com.zhongzheng.modules.bank.mapper.QuestionModuleChapterMapper;
-import com.zhongzheng.modules.bank.service.IQuestionBusinessService;
 import com.zhongzheng.modules.bank.service.IQuestionModuleChapterService;
 import com.zhongzheng.modules.bank.vo.QuestionChapterVo;
 import com.zhongzheng.modules.bank.vo.QuestionModuleChapterVo;
 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;
-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;
 
@@ -31,6 +28,7 @@ import java.util.stream.Collectors;
  * @date 2021-10-26
  */
 @Service
+@DS("slave")
 public class QuestionModuleChapterServiceImpl extends ServiceImpl<QuestionModuleChapterMapper, QuestionModuleChapter> implements IQuestionModuleChapterService {
 
     @Autowired

+ 6 - 6
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/QuestionModuleServiceImpl.java

@@ -2,8 +2,13 @@ package com.zhongzheng.modules.bank.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.StrUtil;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
 import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.common.utils.ServletUtils;
@@ -16,21 +21,15 @@ import com.zhongzheng.modules.bank.service.IQuestionBusinessService;
 import com.zhongzheng.modules.bank.service.IQuestionModuleChapterService;
 import com.zhongzheng.modules.bank.service.IQuestionModuleService;
 import com.zhongzheng.modules.bank.vo.QuestionModuleVo;
-import com.zhongzheng.modules.course.domain.CourseModule;
 import com.zhongzheng.modules.goods.domain.GoodsAttached;
 import com.zhongzheng.modules.goods.service.IGoodsAttachedService;
 import com.zhongzheng.modules.user.bo.CheckUserExamRecordBo;
 import com.zhongzheng.modules.user.service.IUserExamRecordService;
 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;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.pagehelper.Page;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.util.Collection;
-import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
 import java.util.stream.Collectors;
@@ -42,6 +41,7 @@ import java.util.stream.Collectors;
  * @date 2021-10-25
  */
 @Service
+@DS("slave")
 public class QuestionModuleServiceImpl extends ServiceImpl<QuestionModuleMapper, QuestionModule> implements IQuestionModuleService {
 
     @Autowired

+ 24 - 25
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/QuestionServiceImpl.java

@@ -3,13 +3,15 @@ package com.zhongzheng.modules.bank.service.impl;
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.lang.Validator;
 import cn.hutool.core.util.StrUtil;
-import cn.hutool.extra.tokenizer.Word;
 import com.alibaba.fastjson.JSON;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
-import com.zhongzheng.common.constant.Constants;
-import com.zhongzheng.common.core.domain.entity.SysUser;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
 import com.zhongzheng.common.core.redis.RedisCache;
 import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.utils.DateUtils;
@@ -18,17 +20,27 @@ import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.common.utils.ToolsUtils;
 import com.zhongzheng.modules.alioss.service.OssService;
 import com.zhongzheng.modules.bank.bo.*;
-import com.zhongzheng.modules.bank.domain.*;
+import com.zhongzheng.modules.bank.domain.Exam;
+import com.zhongzheng.modules.bank.domain.ExamQuestion;
+import com.zhongzheng.modules.bank.domain.Question;
+import com.zhongzheng.modules.bank.domain.QuestionBusiness;
 import com.zhongzheng.modules.bank.mapper.QuestionMapper;
 import com.zhongzheng.modules.bank.service.IExamQuestionService;
 import com.zhongzheng.modules.bank.service.IExamService;
 import com.zhongzheng.modules.bank.service.IQuestionBusinessService;
 import com.zhongzheng.modules.bank.service.IQuestionService;
-import com.zhongzheng.modules.bank.vo.*;
-import com.zhongzheng.modules.base.domain.ApplyAreas;
-import com.zhongzheng.modules.course.bo.CourseChapterSectionListAddBo;
-import com.zhongzheng.modules.course.domain.*;
-import com.zhongzheng.modules.course.service.*;
+import com.zhongzheng.modules.bank.vo.QuestionImport;
+import com.zhongzheng.modules.bank.vo.QuestionImportContent;
+import com.zhongzheng.modules.bank.vo.QuestionImportV2;
+import com.zhongzheng.modules.bank.vo.QuestionVo;
+import com.zhongzheng.modules.course.domain.CourseBusiness;
+import com.zhongzheng.modules.course.domain.CourseEducationType;
+import com.zhongzheng.modules.course.domain.CourseProjectType;
+import com.zhongzheng.modules.course.domain.CourseSubject;
+import com.zhongzheng.modules.course.service.ICourseBusinessService;
+import com.zhongzheng.modules.course.service.ICourseEducationTypeService;
+import com.zhongzheng.modules.course.service.ICourseProjectTypeService;
+import com.zhongzheng.modules.course.service.ICourseSubjectService;
 import com.zhongzheng.modules.exam.bo.ExamKnowledgeAddBo;
 import com.zhongzheng.modules.exam.bo.ExamKnowledgeBusinessAddBo;
 import com.zhongzheng.modules.exam.domain.ExamKnowledge;
@@ -41,7 +53,6 @@ import com.zhongzheng.modules.goods.service.IGoodsService;
 import com.zhongzheng.modules.goods.vo.BankGoodsExamVo;
 import com.zhongzheng.modules.goods.vo.GoodsExamTimeVo;
 import com.zhongzheng.modules.goods.vo.GoodsUserQuestionVo;
-
 import com.zhongzheng.modules.user.bo.CheckUserExamRecordBo;
 import com.zhongzheng.modules.user.bo.UserSpecialExamRecord;
 import com.zhongzheng.modules.user.domain.User;
@@ -55,35 +66,22 @@ import org.apache.poi.openxml4j.opc.PackagePart;
 import org.apache.poi.xwpf.usermodel.XWPFDocument;
 import org.apache.poi.xwpf.usermodel.XWPFParagraph;
 import org.apache.poi.xwpf.usermodel.XWPFRun;
-import org.apache.poi.xwpf.usermodel.XWPFTable;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.pagehelper.Page;
 import org.springframework.transaction.annotation.Transactional;
-import org.springframework.util.unit.DataUnit;
 import org.springframework.web.multipart.MultipartFile;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 
-import javax.imageio.ImageIO;
-import javax.xml.bind.DatatypeConverter;
-import java.awt.*;
-import java.awt.image.BufferedImage;
-import java.io.*;
-import java.net.URL;
+import java.io.IOException;
+import java.io.InputStream;
 import java.text.NumberFormat;
 import java.util.*;
-import java.util.List;
 import java.util.concurrent.TimeUnit;
 import java.util.stream.Collectors;
 
-import static com.zhongzheng.common.utils.ToolsUtils.getEncoding;
-
 /**
  * 题库题目Service业务层处理
  *
@@ -91,6 +89,7 @@ import static com.zhongzheng.common.utils.ToolsUtils.getEncoding;
  * @date 2021-10-21
  */
 @Service
+@DS("slave")
 public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> implements IQuestionService {
 
     @Autowired

+ 6 - 5
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/CertificateCommonServiceImpl.java

@@ -2,6 +2,11 @@ package com.zhongzheng.modules.base.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.StrUtil;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.modules.base.bo.CertificateCommonAddBo;
@@ -12,13 +17,8 @@ import com.zhongzheng.modules.base.mapper.CertificateCommonMapper;
 import com.zhongzheng.modules.base.service.ICertificateCommonService;
 import com.zhongzheng.modules.base.vo.CertificateCommonVo;
 import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-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;
 
@@ -29,6 +29,7 @@ import java.util.stream.Collectors;
  * @date 2022-06-07
  */
 @Service
+@DS("slave")
 public class CertificateCommonServiceImpl extends ServiceImpl<CertificateCommonMapper, CertificateCommon> implements ICertificateCommonService {
 
     @Override

+ 6 - 7
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/CertificateServiceImpl.java

@@ -3,26 +3,24 @@ package com.zhongzheng.modules.base.service.impl;
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.lang.Validator;
 import cn.hutool.core.util.StrUtil;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
 import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.modules.base.bo.CertificateAddBo;
 import com.zhongzheng.modules.base.bo.CertificateEditBo;
 import com.zhongzheng.modules.base.bo.CertificateQueryBo;
-import com.zhongzheng.modules.base.domain.ApplyAreas;
 import com.zhongzheng.modules.base.domain.Certificate;
 import com.zhongzheng.modules.base.mapper.CertificateMapper;
 import com.zhongzheng.modules.base.service.ICertificateService;
 import com.zhongzheng.modules.base.vo.CertificateVo;
-import com.zhongzheng.modules.course.domain.CourseSection;
 import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-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 +31,7 @@ import java.util.stream.Collectors;
  * @date 2021-10-08
  */
 @Service
+@DS("slave")
 public class CertificateServiceImpl extends ServiceImpl<CertificateMapper, Certificate> implements ICertificateService {
 
     @Override

+ 9 - 12
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/CertificateTpServiceImpl.java

@@ -3,7 +3,12 @@ package com.zhongzheng.modules.base.service.impl;
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.lang.Validator;
 import cn.hutool.core.util.StrUtil;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
 import com.google.zxing.BarcodeFormat;
 import com.google.zxing.common.BitMatrix;
 import com.google.zxing.qrcode.QRCodeWriter;
@@ -20,11 +25,7 @@ import com.zhongzheng.modules.base.mapper.CertificateTpMapper;
 import com.zhongzheng.modules.base.service.ICertificateTpService;
 import com.zhongzheng.modules.base.vo.CertificatePhotoVo;
 import com.zhongzheng.modules.base.vo.CertificateTpVo;
-import com.zhongzheng.modules.course.domain.CourseBusiness;
 import com.zhongzheng.modules.course.vo.CourseChapterVo;
-import com.zhongzheng.modules.course.vo.CourseUserEducationTypeVo;
-import com.zhongzheng.modules.goods.domain.GoodsAttached;
-import com.zhongzheng.modules.goods.service.IGoodsAttachedService;
 import com.zhongzheng.modules.goods.service.IGoodsService;
 import com.zhongzheng.modules.goods.vo.GoodsVo;
 import com.zhongzheng.modules.grade.bo.ClassGradeUserQueryBo;
@@ -37,23 +38,18 @@ import com.zhongzheng.modules.user.service.IUserService;
 import com.zhongzheng.modules.user.service.IUserStudyRecordService;
 import com.zhongzheng.modules.user.vo.UserStudyRecordVo;
 import com.zhongzheng.modules.user.vo.UserVo;
-import org.apache.commons.compress.utils.IOUtils;
 import org.apache.commons.lang3.ArrayUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.pagehelper.Page;
 
 import javax.imageio.ImageIO;
-import javax.validation.Valid;
-import javax.validation.Validation;
 import java.awt.*;
 import java.awt.image.BufferedImage;
 import java.io.*;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
 import java.util.List;
 import java.util.concurrent.TimeUnit;
 import java.util.stream.Collectors;
@@ -65,6 +61,7 @@ import java.util.stream.Collectors;
  * @date 2022-02-16
  */
 @Service
+@DS("slave")
 public class CertificateTpServiceImpl extends ServiceImpl<CertificateTpMapper, CertificateTp> implements ICertificateTpService {
 
     @Autowired

+ 6 - 5
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/ProfileFieldServiceImpl.java

@@ -2,6 +2,11 @@ package com.zhongzheng.modules.base.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.StrUtil;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.modules.base.bo.ProfileFieldAddBo;
 import com.zhongzheng.modules.base.bo.ProfileFieldEditBo;
@@ -11,13 +16,8 @@ import com.zhongzheng.modules.base.mapper.ProfileFieldMapper;
 import com.zhongzheng.modules.base.service.IProfileFieldService;
 import com.zhongzheng.modules.base.vo.ProfileFieldVo;
 import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-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;
 
@@ -28,6 +28,7 @@ import java.util.stream.Collectors;
  * @date 2021-11-19
  */
 @Service
+@DS("slave")
 public class ProfileFieldServiceImpl extends ServiceImpl<ProfileFieldMapper, ProfileField> implements IProfileFieldService {
 
     @Override

+ 6 - 7
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/ProfileTpBusinessServiceImpl.java

@@ -1,8 +1,11 @@
 package com.zhongzheng.modules.base.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.util.StrUtil;
-import com.zhongzheng.common.utils.DateUtils;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
 import com.zhongzheng.modules.base.bo.ProfileTpBusinessAddBo;
 import com.zhongzheng.modules.base.bo.ProfileTpBusinessEditBo;
 import com.zhongzheng.modules.base.bo.ProfileTpBusinessQueryBo;
@@ -11,13 +14,8 @@ import com.zhongzheng.modules.base.mapper.ProfileTpBusinessMapper;
 import com.zhongzheng.modules.base.service.IProfileTpBusinessService;
 import com.zhongzheng.modules.base.vo.ProfileTpBusinessVo;
 import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-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;
 
@@ -28,6 +26,7 @@ import java.util.stream.Collectors;
  * @date 2021-11-19
  */
 @Service
+@DS("slave")
 public class ProfileTpBusinessServiceImpl extends ServiceImpl<ProfileTpBusinessMapper, ProfileTpBusiness> implements IProfileTpBusinessService {
 
     @Override

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/ProfileTpServiceImpl.java

@@ -3,6 +3,7 @@ package com.zhongzheng.modules.base.service.impl;
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.lang.Validator;
 import cn.hutool.core.util.StrUtil;
+import com.baomidou.dynamic.datasource.annotation.DS;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -33,6 +34,7 @@ import java.util.stream.Collectors;
  * @date 2021-11-19
  */
 @Service
+@DS("slave")
 public class ProfileTpServiceImpl extends ServiceImpl<ProfileTpMapper, ProfileTp> implements IProfileTpService {
 
     @Autowired

+ 14 - 17
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseBusinessServiceImpl.java

@@ -2,37 +2,33 @@ package com.zhongzheng.modules.course.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.lang.Validator;
-import cn.hutool.core.util.StrUtil;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
 import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.common.utils.ServletUtils;
-import com.zhongzheng.modules.course.bo.CourseProjectTypeQueryBo;
-import com.zhongzheng.modules.course.domain.CourseProjectType;
-import com.zhongzheng.modules.course.domain.CourseTopic;
-import com.zhongzheng.modules.course.service.ICourseChapterBusinessService;
-import com.zhongzheng.modules.course.service.ICourseProjectTypeService;
-import com.zhongzheng.modules.course.service.ICourseTopicService;
-import com.zhongzheng.modules.course.vo.*;
-import org.apache.el.util.Validation;
-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;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.pagehelper.Page;
 import com.zhongzheng.modules.course.bo.CourseBusinessAddBo;
-import com.zhongzheng.modules.course.bo.CourseBusinessQueryBo;
 import com.zhongzheng.modules.course.bo.CourseBusinessEditBo;
+import com.zhongzheng.modules.course.bo.CourseBusinessQueryBo;
 import com.zhongzheng.modules.course.domain.CourseBusiness;
+import com.zhongzheng.modules.course.domain.CourseTopic;
 import com.zhongzheng.modules.course.mapper.CourseBusinessMapper;
 import com.zhongzheng.modules.course.service.ICourseBusinessService;
+import com.zhongzheng.modules.course.service.ICourseProjectTypeService;
+import com.zhongzheng.modules.course.service.ICourseTopicService;
+import com.zhongzheng.modules.course.vo.CourseBusinessVo;
+import com.zhongzheng.modules.course.vo.CourseProjectTypeVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -43,6 +39,7 @@ import java.util.stream.Collectors;
  * @date 2021-10-08
  */
 @Service
+@DS("slave")
 public class CourseBusinessServiceImpl extends ServiceImpl<CourseBusinessMapper, CourseBusiness> implements ICourseBusinessService {
 
     @Autowired

+ 6 - 8
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseChapterBusinessServiceImpl.java

@@ -1,25 +1,22 @@
 package com.zhongzheng.modules.course.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.util.StrUtil;
-import com.zhongzheng.common.utils.DateUtils;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
 import com.zhongzheng.modules.course.bo.CourseChapterBusinessAddBo;
 import com.zhongzheng.modules.course.bo.CourseChapterBusinessEditBo;
 import com.zhongzheng.modules.course.bo.CourseChapterBusinessQueryBo;
 import com.zhongzheng.modules.course.domain.CourseChapterBusiness;
 import com.zhongzheng.modules.course.mapper.CourseChapterBusinessMapper;
-import com.zhongzheng.modules.course.mapper.CourseSectionBusinessMapper;
 import com.zhongzheng.modules.course.service.ICourseChapterBusinessService;
 import com.zhongzheng.modules.course.vo.CourseChapterBusinessVo;
 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;
-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;
 
@@ -30,6 +27,7 @@ import java.util.stream.Collectors;
  * @date 2021-10-09
  */
 @Service
+@DS("slave")
 public class CourseChapterBusinessServiceImpl extends ServiceImpl<CourseChapterBusinessMapper, CourseChapterBusiness> implements ICourseChapterBusinessService {
 
     @Autowired

+ 12 - 11
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseChapterSectionServiceImpl.java

@@ -2,26 +2,26 @@ package com.zhongzheng.modules.course.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.lang.Validator;
-import cn.hutool.core.util.StrUtil;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
-import com.zhongzheng.common.utils.DateUtils;
-import com.zhongzheng.modules.course.bo.*;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
+import com.zhongzheng.modules.course.bo.CourseChapterSectionAddBo;
+import com.zhongzheng.modules.course.bo.CourseChapterSectionEditBo;
+import com.zhongzheng.modules.course.bo.CourseChapterSectionQueryBo;
+import com.zhongzheng.modules.course.bo.CourseMenuQueryBo;
 import com.zhongzheng.modules.course.domain.CourseChapterSection;
-import com.zhongzheng.modules.course.domain.CourseStreamingBusiness;
-import com.zhongzheng.modules.course.mapper.CourseChapterMapper;
 import com.zhongzheng.modules.course.mapper.CourseChapterSectionMapper;
 import com.zhongzheng.modules.course.service.ICourseChapterSectionService;
-import com.zhongzheng.modules.course.vo.*;
+import com.zhongzheng.modules.course.vo.CourseChapterSectionVo;
+import com.zhongzheng.modules.course.vo.CourseUserChapterSectionVo;
 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;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.pagehelper.Page;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.util.Collection;
-import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
 import java.util.stream.Collectors;
@@ -33,6 +33,7 @@ import java.util.stream.Collectors;
  * @date 2021-10-12
  */
 @Service
+@DS("slave")
 public class CourseChapterSectionServiceImpl extends ServiceImpl<CourseChapterSectionMapper, CourseChapterSection> implements ICourseChapterSectionService {
 
     @Autowired

+ 10 - 9
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseChapterServiceImpl.java

@@ -3,32 +3,32 @@ package com.zhongzheng.modules.course.service.impl;
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.lang.Validator;
 import cn.hutool.core.util.StrUtil;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
 import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.common.utils.ServletUtils;
-import com.zhongzheng.modules.bank.domain.QuestionModuleChapter;
-import com.zhongzheng.modules.bank.service.IQuestionModuleChapterService;
 import com.zhongzheng.modules.course.bo.*;
 import com.zhongzheng.modules.course.domain.*;
 import com.zhongzheng.modules.course.mapper.CourseChapterMapper;
-import com.zhongzheng.modules.course.mapper.CourseSectionMapper;
 import com.zhongzheng.modules.course.service.*;
 import com.zhongzheng.modules.course.vo.CourseChapterVo;
 import com.zhongzheng.modules.goods.bo.GoodsBatchDelBo;
-import com.zhongzheng.modules.goods.domain.GoodsAttached;
 import com.zhongzheng.modules.grade.bo.UserPeriodQueryBo;
 import com.zhongzheng.modules.grade.service.IUserPeriodService;
 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;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.pagehelper.Page;
 import org.springframework.transaction.annotation.Transactional;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
 import java.util.stream.Collectors;
 
 /**
@@ -38,6 +38,7 @@ import java.util.stream.Collectors;
  * @date 2021-10-09
  */
 @Service
+@DS("slave")
 public class CourseChapterServiceImpl extends ServiceImpl<CourseChapterMapper, CourseChapter> implements ICourseChapterService {
 
     @Autowired

+ 6 - 6
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseEducationTierServiceImpl.java

@@ -2,22 +2,21 @@ package com.zhongzheng.modules.course.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.StrUtil;
-import com.zhongzheng.common.utils.DateUtils;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.baomidou.dynamic.datasource.annotation.DS;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.github.pagehelper.Page;
 import com.zhongzheng.modules.course.bo.CourseEducationTierAddBo;
-import com.zhongzheng.modules.course.bo.CourseEducationTierQueryBo;
 import com.zhongzheng.modules.course.bo.CourseEducationTierEditBo;
+import com.zhongzheng.modules.course.bo.CourseEducationTierQueryBo;
 import com.zhongzheng.modules.course.domain.CourseEducationTier;
 import com.zhongzheng.modules.course.mapper.CourseEducationTierMapper;
-import com.zhongzheng.modules.course.vo.CourseEducationTierVo;
 import com.zhongzheng.modules.course.service.ICourseEducationTierService;
+import com.zhongzheng.modules.course.vo.CourseEducationTierVo;
+import org.springframework.stereotype.Service;
 
 import java.util.Collection;
-import java.util.Collections;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -28,6 +27,7 @@ import java.util.stream.Collectors;
  * @date 2021-11-01
  */
 @Service
+@DS("slave")
 public class CourseEducationTierServiceImpl extends ServiceImpl<CourseEducationTierMapper, CourseEducationTier> implements ICourseEducationTierService {
 
     @Override

+ 16 - 14
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseEducationTypeServiceImpl.java

@@ -3,32 +3,33 @@ package com.zhongzheng.modules.course.service.impl;
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.lang.Validator;
 import cn.hutool.core.util.StrUtil;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.common.utils.ServletUtils;
-import com.zhongzheng.modules.base.domain.ApplyAreas;
 import com.zhongzheng.modules.base.vo.BaseFilterVo;
 import com.zhongzheng.modules.course.bo.CourseEducationTierAddBo;
-import com.zhongzheng.modules.course.domain.CourseEducationTier;
-import com.zhongzheng.modules.course.service.ICourseEducationTierService;
-import com.zhongzheng.modules.course.vo.CourseEducationTierVo;
-import com.zhongzheng.modules.pay.domain.PayAisle;
-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;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.pagehelper.Page;
 import com.zhongzheng.modules.course.bo.CourseEducationTypeAddBo;
-import com.zhongzheng.modules.course.bo.CourseEducationTypeQueryBo;
 import com.zhongzheng.modules.course.bo.CourseEducationTypeEditBo;
+import com.zhongzheng.modules.course.bo.CourseEducationTypeQueryBo;
+import com.zhongzheng.modules.course.domain.CourseEducationTier;
 import com.zhongzheng.modules.course.domain.CourseEducationType;
 import com.zhongzheng.modules.course.mapper.CourseEducationTypeMapper;
-import com.zhongzheng.modules.course.vo.CourseEducationTypeVo;
+import com.zhongzheng.modules.course.service.ICourseEducationTierService;
 import com.zhongzheng.modules.course.service.ICourseEducationTypeService;
+import com.zhongzheng.modules.course.vo.CourseEducationTierVo;
+import com.zhongzheng.modules.course.vo.CourseEducationTypeVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
 import org.springframework.util.StringUtils;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
 import java.util.stream.Collectors;
 
 /**
@@ -38,6 +39,7 @@ import java.util.stream.Collectors;
  * @date 2021-10-08
  */
 @Service
+@DS("slave")
 public class CourseEducationTypeServiceImpl extends ServiceImpl<CourseEducationTypeMapper, CourseEducationType> implements ICourseEducationTypeService {
 
     @Autowired

+ 7 - 8
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseHandoutsBusinessServiceImpl.java

@@ -1,24 +1,22 @@
 package com.zhongzheng.modules.course.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.util.StrUtil;
-import com.zhongzheng.common.utils.DateUtils;
-import com.zhongzheng.modules.course.domain.CourseEducationType;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.baomidou.dynamic.datasource.annotation.DS;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.github.pagehelper.Page;
+import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.modules.course.bo.CourseHandoutsBusinessAddBo;
-import com.zhongzheng.modules.course.bo.CourseHandoutsBusinessQueryBo;
 import com.zhongzheng.modules.course.bo.CourseHandoutsBusinessEditBo;
+import com.zhongzheng.modules.course.bo.CourseHandoutsBusinessQueryBo;
 import com.zhongzheng.modules.course.domain.CourseHandoutsBusiness;
 import com.zhongzheng.modules.course.mapper.CourseHandoutsBusinessMapper;
-import com.zhongzheng.modules.course.vo.CourseHandoutsBusinessVo;
 import com.zhongzheng.modules.course.service.ICourseHandoutsBusinessService;
+import com.zhongzheng.modules.course.vo.CourseHandoutsBusinessVo;
+import org.springframework.stereotype.Service;
 
 import java.util.Collection;
-import java.util.Collections;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -29,6 +27,7 @@ import java.util.stream.Collectors;
  * @date 2021-11-02
  */
 @Service
+@DS("slave")
 public class CourseHandoutsBusinessServiceImpl extends ServiceImpl<CourseHandoutsBusinessMapper, CourseHandoutsBusiness> implements ICourseHandoutsBusinessService {
 
     @Override

+ 15 - 14
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseHandoutsServiceImpl.java

@@ -2,33 +2,33 @@ package com.zhongzheng.modules.course.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.lang.Validator;
-import cn.hutool.core.util.StrUtil;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
 import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.modules.course.bo.*;
-import com.zhongzheng.modules.course.domain.*;
+import com.zhongzheng.modules.course.domain.CourseFile;
+import com.zhongzheng.modules.course.domain.CourseHandouts;
+import com.zhongzheng.modules.course.domain.CourseHandoutsBusiness;
+import com.zhongzheng.modules.course.mapper.CourseHandoutsMapper;
 import com.zhongzheng.modules.course.service.ICourseFileService;
 import com.zhongzheng.modules.course.service.ICourseHandoutsBusinessService;
+import com.zhongzheng.modules.course.service.ICourseHandoutsService;
 import com.zhongzheng.modules.course.vo.CourseHandoutsBusinessVo;
-import com.zhongzheng.modules.course.vo.CourseMenuExamVo;
-import com.zhongzheng.modules.goods.bo.GoodsCourseAddBo;
+import com.zhongzheng.modules.course.vo.CourseHandoutsVo;
 import com.zhongzheng.modules.goods.domain.Goods;
-import com.zhongzheng.modules.goods.domain.GoodsAttached;
-import com.zhongzheng.modules.goods.domain.GoodsCourse;
 import com.zhongzheng.modules.goods.service.IGoodsService;
 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;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.pagehelper.Page;
-import com.zhongzheng.modules.course.mapper.CourseHandoutsMapper;
-import com.zhongzheng.modules.course.vo.CourseHandoutsVo;
-import com.zhongzheng.modules.course.service.ICourseHandoutsService;
 import org.springframework.util.CollectionUtils;
 
-import java.util.*;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
 import java.util.stream.Collectors;
 
 /**
@@ -38,6 +38,7 @@ import java.util.stream.Collectors;
  * @date 2021-11-02
  */
 @Service
+@DS("slave")
 public class CourseHandoutsServiceImpl extends ServiceImpl<CourseHandoutsMapper, CourseHandouts> implements ICourseHandoutsService {
 
     @Autowired

+ 6 - 7
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseMenuExamServiceImpl.java

@@ -1,25 +1,23 @@
 package com.zhongzheng.modules.course.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.util.StrUtil;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.modules.course.bo.CourseMenuExamAddBo;
 import com.zhongzheng.modules.course.bo.CourseMenuExamEditBo;
 import com.zhongzheng.modules.course.bo.CourseMenuExamQueryBo;
 import com.zhongzheng.modules.course.domain.CourseMenuExam;
 import com.zhongzheng.modules.course.mapper.CourseMenuExamMapper;
-import com.zhongzheng.modules.course.mapper.CourseMenuMapper;
 import com.zhongzheng.modules.course.service.ICourseMenuExamService;
 import com.zhongzheng.modules.course.vo.CourseMenuExamVo;
 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;
-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;
 
@@ -30,6 +28,7 @@ import java.util.stream.Collectors;
  * @date 2021-11-17
  */
 @Service
+@DS("slave")
 public class CourseMenuExamServiceImpl extends ServiceImpl<CourseMenuExamMapper, CourseMenuExam> implements ICourseMenuExamService {
 
     @Autowired

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseMenuServiceImpl.java

@@ -2,6 +2,7 @@ package com.zhongzheng.modules.course.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.lang.Validator;
+import com.baomidou.dynamic.datasource.annotation.DS;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@@ -41,6 +42,7 @@ import java.util.stream.Collectors;
  * @date 2021-10-12
  */
 @Service
+@DS("slave")
 public class CourseMenuServiceImpl extends ServiceImpl<CourseMenuMapper, CourseMenu> implements ICourseMenuService {
 
     @Autowired

+ 7 - 9
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseModuleBusinessServiceImpl.java

@@ -1,25 +1,22 @@
 package com.zhongzheng.modules.course.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.util.StrUtil;
-import com.zhongzheng.common.utils.DateUtils;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
 import com.zhongzheng.modules.course.bo.CourseModuleBusinessAddBo;
 import com.zhongzheng.modules.course.bo.CourseModuleBusinessEditBo;
 import com.zhongzheng.modules.course.bo.CourseModuleBusinessQueryBo;
-import com.zhongzheng.modules.course.domain.CourseModule;
 import com.zhongzheng.modules.course.domain.CourseModuleBusiness;
 import com.zhongzheng.modules.course.mapper.CourseModuleBusinessMapper;
 import com.zhongzheng.modules.course.service.ICourseModuleBusinessService;
 import com.zhongzheng.modules.course.vo.CourseModuleBusinessVo;
-import com.zhongzheng.modules.grade.service.IClassGradeUserService;
 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;
-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;
 
@@ -30,6 +27,7 @@ import java.util.stream.Collectors;
  * @date 2021-10-09
  */
 @Service
+@DS("slave")
 public class CourseModuleBusinessServiceImpl extends ServiceImpl<CourseModuleBusinessMapper, CourseModuleBusiness> implements ICourseModuleBusinessService {
 
     @Autowired

+ 12 - 10
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseModuleChapterServiceImpl.java

@@ -2,25 +2,26 @@ package com.zhongzheng.modules.course.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.lang.Validator;
-import cn.hutool.core.util.StrUtil;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
-import com.zhongzheng.common.utils.DateUtils;
-import com.zhongzheng.modules.course.bo.*;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
+import com.zhongzheng.modules.course.bo.CourseMenuQueryBo;
+import com.zhongzheng.modules.course.bo.CourseModuleChapterAddBo;
+import com.zhongzheng.modules.course.bo.CourseModuleChapterEditBo;
+import com.zhongzheng.modules.course.bo.CourseModuleChapterQueryBo;
 import com.zhongzheng.modules.course.domain.CourseModuleChapter;
-import com.zhongzheng.modules.course.mapper.CourseChapterSectionMapper;
 import com.zhongzheng.modules.course.mapper.CourseModuleChapterMapper;
 import com.zhongzheng.modules.course.service.ICourseModuleChapterService;
-import com.zhongzheng.modules.course.vo.*;
+import com.zhongzheng.modules.course.vo.CourseModuleChapterVo;
+import com.zhongzheng.modules.course.vo.CourseUserModuleChapterVo;
 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;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.pagehelper.Page;
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -31,6 +32,7 @@ import java.util.stream.Collectors;
  * @date 2021-10-11
  */
 @Service
+@DS("slave")
 public class CourseModuleChapterServiceImpl extends ServiceImpl<CourseModuleChapterMapper, CourseModuleChapter> implements ICourseModuleChapterService {
 
     @Autowired

+ 14 - 8
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseModuleServiceImpl.java

@@ -3,30 +3,35 @@ package com.zhongzheng.modules.course.service.impl;
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.lang.Validator;
 import cn.hutool.core.util.StrUtil;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
 import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.modules.course.bo.*;
-import com.zhongzheng.modules.course.domain.*;
+import com.zhongzheng.modules.course.domain.CourseMenu;
+import com.zhongzheng.modules.course.domain.CourseModule;
+import com.zhongzheng.modules.course.domain.CourseModuleBusiness;
+import com.zhongzheng.modules.course.domain.CourseModuleChapter;
 import com.zhongzheng.modules.course.mapper.CourseModuleMapper;
-import com.zhongzheng.modules.course.service.*;
+import com.zhongzheng.modules.course.service.ICourseMenuService;
+import com.zhongzheng.modules.course.service.ICourseModuleBusinessService;
+import com.zhongzheng.modules.course.service.ICourseModuleChapterService;
+import com.zhongzheng.modules.course.service.ICourseModuleService;
 import com.zhongzheng.modules.course.vo.CourseModuleVo;
 import com.zhongzheng.modules.goods.bo.GoodsBatchDelBo;
-import com.zhongzheng.modules.goods.domain.GoodsAttached;
 import com.zhongzheng.modules.grade.bo.UserPeriodQueryBo;
 import com.zhongzheng.modules.grade.service.IUserPeriodService;
 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;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.pagehelper.Page;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.util.Collection;
-import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
 import java.util.stream.Collectors;
@@ -38,6 +43,7 @@ import java.util.stream.Collectors;
  * @date 2021-10-09
  */
 @Service
+@DS("slave")
 public class CourseModuleServiceImpl extends ServiceImpl<CourseModuleMapper, CourseModule> implements ICourseModuleService {
 
     @Autowired

+ 7 - 9
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseProjectTypeServiceImpl.java

@@ -1,26 +1,23 @@
 package com.zhongzheng.modules.course.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.util.StrUtil;
-import com.zhongzheng.common.utils.DateUtils;
-import com.zhongzheng.common.utils.ServletUtils;
-import org.springframework.stereotype.Service;
+import com.baomidou.dynamic.datasource.annotation.DS;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.github.pagehelper.Page;
+import com.zhongzheng.common.utils.DateUtils;
+import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.modules.course.bo.CourseProjectTypeAddBo;
-import com.zhongzheng.modules.course.bo.CourseProjectTypeQueryBo;
 import com.zhongzheng.modules.course.bo.CourseProjectTypeEditBo;
+import com.zhongzheng.modules.course.bo.CourseProjectTypeQueryBo;
 import com.zhongzheng.modules.course.domain.CourseProjectType;
 import com.zhongzheng.modules.course.mapper.CourseProjectTypeMapper;
-import com.zhongzheng.modules.course.vo.CourseProjectTypeVo;
 import com.zhongzheng.modules.course.service.ICourseProjectTypeService;
+import com.zhongzheng.modules.course.vo.CourseProjectTypeVo;
+import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -31,6 +28,7 @@ import java.util.stream.Collectors;
  * @date 2021-10-08
  */
 @Service
+@DS("slave")
 public class CourseProjectTypeServiceImpl extends ServiceImpl<CourseProjectTypeMapper, CourseProjectType> implements ICourseProjectTypeService {
 
     @Override

+ 6 - 8
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseSectionBusinessServiceImpl.java

@@ -1,25 +1,22 @@
 package com.zhongzheng.modules.course.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.util.StrUtil;
-import com.zhongzheng.common.utils.DateUtils;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
 import com.zhongzheng.modules.course.bo.CourseSectionBusinessAddBo;
 import com.zhongzheng.modules.course.bo.CourseSectionBusinessEditBo;
 import com.zhongzheng.modules.course.bo.CourseSectionBusinessQueryBo;
 import com.zhongzheng.modules.course.domain.CourseSectionBusiness;
 import com.zhongzheng.modules.course.mapper.CourseSectionBusinessMapper;
 import com.zhongzheng.modules.course.service.ICourseSectionBusinessService;
-import com.zhongzheng.modules.course.service.IMajorService;
 import com.zhongzheng.modules.course.vo.CourseSectionBusinessVo;
 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;
-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;
 
@@ -30,6 +27,7 @@ import java.util.stream.Collectors;
  * @date 2021-10-11
  */
 @Service
+@DS("slave")
 public class CourseSectionBusinessServiceImpl extends ServiceImpl<CourseSectionBusinessMapper, CourseSectionBusiness> implements ICourseSectionBusinessService {
 
     @Autowired

+ 6 - 11
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseSectionServiceImpl.java

@@ -4,18 +4,18 @@ import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.convert.Convert;
 import cn.hutool.core.lang.Validator;
 import cn.hutool.core.util.StrUtil;
-import com.alibaba.fastjson.JSON;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
 import com.zhongzheng.common.core.redis.RedisCache;
 import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.common.utils.ServletUtils;
-import com.zhongzheng.modules.bank.bo.QuestionAddBo;
-import com.zhongzheng.modules.bank.bo.QuestionBusinessAddBo;
-import com.zhongzheng.modules.bank.domain.Question;
 import com.zhongzheng.modules.bank.domain.QuestionBusiness;
-import com.zhongzheng.modules.bank.vo.QuestionImport;
 import com.zhongzheng.modules.course.bo.*;
 import com.zhongzheng.modules.course.domain.*;
 import com.zhongzheng.modules.course.mapper.CourseSectionMapper;
@@ -32,20 +32,14 @@ import com.zhongzheng.modules.polyv.bo.PolyvLiveQueryBo;
 import com.zhongzheng.modules.polyv.service.IPolyvLiveService;
 import com.zhongzheng.modules.polyv.service.IPolyvVideoService;
 import com.zhongzheng.modules.polyv.vo.PolyvVideoQuerVo;
-import com.zhongzheng.modules.system.domain.SysRoleMenu;
 import net.polyv.live.v1.entity.chat.LiveGetMessageListResponse;
 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;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.pagehelper.Page;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.io.IOException;
 import java.security.NoSuchAlgorithmException;
 import java.text.ParseException;
-import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.concurrent.TimeUnit;
 import java.util.stream.Collectors;
@@ -57,6 +51,7 @@ import java.util.stream.Collectors;
  * @date 2021-10-11
  */
 @Service
+@DS("slave")
 public class CourseSectionServiceImpl extends ServiceImpl<CourseSectionMapper, CourseSection> implements ICourseSectionService {
 
     @Autowired

+ 2 - 7
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseSectionWatchPerServiceImpl.java

@@ -2,13 +2,11 @@ package com.zhongzheng.modules.course.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.codec.Base64;
-import cn.hutool.core.codec.Base64Decoder;
+import com.baomidou.dynamic.datasource.annotation.DS;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.toolkit.BeanUtils;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.modules.course.bo.CheckSectionWatchVo;
 import com.zhongzheng.modules.course.bo.SectionWatchPerAddBo;
@@ -23,14 +21,10 @@ import com.zhongzheng.modules.course.vo.CourseSectionWatchPerVo;
 import com.zhongzheng.modules.goods.domain.Goods;
 import com.zhongzheng.modules.goods.service.IGoodsService;
 import com.zhongzheng.modules.wx.service.IWxLoginService;
-import org.apache.commons.codec.digest.DigestUtils;
-import org.bouncycastle.pqc.math.linearalgebra.ByteUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
-import java.security.MessageDigest;
-import java.util.Date;
 import java.util.List;
 
 /**
@@ -38,6 +32,7 @@ import java.util.List;
  * @date 2022年08月16日 11:05
  */
 @Service
+@DS("slave")
 public class CourseSectionWatchPerServiceImpl extends ServiceImpl<CourseSectionWatchPerMapper, CourseSectionWatchPer> implements ICourseSectionWatchPerService {
 
     @Autowired

+ 16 - 16
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseServiceImpl.java

@@ -3,36 +3,40 @@ package com.zhongzheng.modules.course.service.impl;
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.lang.Validator;
 import cn.hutool.core.util.StrUtil;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
-import com.zhongzheng.common.core.page.TableDataInfo;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
 import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.common.utils.ServletUtils;
-import com.zhongzheng.modules.bank.domain.ExamQuestion;
-import com.zhongzheng.modules.bank.domain.Question;
-import com.zhongzheng.modules.course.bo.*;
+import com.zhongzheng.modules.course.bo.CourseAddBo;
+import com.zhongzheng.modules.course.bo.CourseEditBo;
+import com.zhongzheng.modules.course.bo.CourseQueryBo;
 import com.zhongzheng.modules.course.domain.Course;
-import com.zhongzheng.modules.course.domain.CourseBusiness;
 import com.zhongzheng.modules.course.domain.CoursePhotoLog;
 import com.zhongzheng.modules.course.mapper.CourseMapper;
-import com.zhongzheng.modules.course.mapper.CourseSectionMapper;
 import com.zhongzheng.modules.course.service.ICoursePhotoLogService;
-import com.zhongzheng.modules.course.service.ICourseSectionBusinessService;
 import com.zhongzheng.modules.course.service.ICourseService;
 import com.zhongzheng.modules.course.vo.CourseUserVo;
 import com.zhongzheng.modules.course.vo.CourseVo;
-import com.zhongzheng.modules.exam.domain.*;
-import com.zhongzheng.modules.exam.service.*;
+import com.zhongzheng.modules.exam.domain.ExamApplyUser;
+import com.zhongzheng.modules.exam.domain.ExamBefore;
+import com.zhongzheng.modules.exam.domain.ExamBeforeApply;
+import com.zhongzheng.modules.exam.service.IExamApplyGoodsService;
+import com.zhongzheng.modules.exam.service.IExamApplyUserService;
+import com.zhongzheng.modules.exam.service.IExamBeforeApplyService;
+import com.zhongzheng.modules.exam.service.IExamBeforeService;
 import com.zhongzheng.modules.exam.vo.ExamApplyGoodsVo;
 import com.zhongzheng.modules.goods.bo.GoodsBatchDelBo;
-import com.zhongzheng.modules.goods.domain.Goods;
 import com.zhongzheng.modules.goods.domain.GoodsCourse;
 import com.zhongzheng.modules.goods.service.IGoodsCourseService;
 import com.zhongzheng.modules.goods.vo.GoodsPeriodStatusVo;
 import com.zhongzheng.modules.goods.vo.GoodsPeriodVo;
 import com.zhongzheng.modules.goods.vo.GoodsUserVo;
-import com.zhongzheng.modules.goods.vo.GoodsVo;
 import com.zhongzheng.modules.grade.bo.ClassGradeUserQueryBo;
 import com.zhongzheng.modules.grade.bo.UserPeriodQueryBo;
 import com.zhongzheng.modules.grade.bo.UserPeriodStatusAddBo;
@@ -56,16 +60,11 @@ import com.zhongzheng.modules.user.vo.SubjectStudyRecordVo;
 import com.zhongzheng.modules.user.vo.UserStudyRecordPhotoVo;
 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;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.pagehelper.Page;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -76,6 +75,7 @@ import java.util.stream.Collectors;
  * @date 2021-10-09
  */
 @Service
+@DS("slave")
 public class CourseServiceImpl extends ServiceImpl<CourseMapper, Course> implements ICourseService {
 
     @Autowired

+ 6 - 8
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseStreamingBusinessServiceImpl.java

@@ -1,25 +1,22 @@
 package com.zhongzheng.modules.course.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.util.StrUtil;
-import com.zhongzheng.common.utils.DateUtils;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
 import com.zhongzheng.modules.course.bo.CourseStreamingBusinessAddBo;
 import com.zhongzheng.modules.course.bo.CourseStreamingBusinessEditBo;
 import com.zhongzheng.modules.course.bo.CourseStreamingBusinessQueryBo;
 import com.zhongzheng.modules.course.domain.CourseStreamingBusiness;
-import com.zhongzheng.modules.course.mapper.CourseSectionBusinessMapper;
 import com.zhongzheng.modules.course.mapper.CourseStreamingBusinessMapper;
 import com.zhongzheng.modules.course.service.ICourseStreamingBusinessService;
 import com.zhongzheng.modules.course.vo.CourseStreamingBusinessVo;
 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;
-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;
 
@@ -30,6 +27,7 @@ import java.util.stream.Collectors;
  * @date 2021-10-11
  */
 @Service
+@DS("slave")
 public class CourseStreamingBusinessServiceImpl extends ServiceImpl<CourseStreamingBusinessMapper, CourseStreamingBusiness> implements ICourseStreamingBusinessService {
 
     @Autowired

+ 10 - 10
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseStreamingServiceImpl.java

@@ -3,18 +3,22 @@ package com.zhongzheng.modules.course.service.impl;
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.lang.Validator;
 import cn.hutool.core.util.StrUtil;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
 import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.common.utils.ServletUtils;
-import com.zhongzheng.modules.course.bo.*;
-import com.zhongzheng.modules.course.domain.Course;
-import com.zhongzheng.modules.course.domain.CourseSectionBusiness;
+import com.zhongzheng.modules.course.bo.CourseStreamingAddBo;
+import com.zhongzheng.modules.course.bo.CourseStreamingBusinessAddBo;
+import com.zhongzheng.modules.course.bo.CourseStreamingEditBo;
+import com.zhongzheng.modules.course.bo.CourseStreamingQueryBo;
 import com.zhongzheng.modules.course.domain.CourseStreaming;
 import com.zhongzheng.modules.course.domain.CourseStreamingBusiness;
-import com.zhongzheng.modules.course.mapper.CourseSectionMapper;
 import com.zhongzheng.modules.course.mapper.CourseStreamingMapper;
-import com.zhongzheng.modules.course.service.ICourseSectionBusinessService;
 import com.zhongzheng.modules.course.service.ICourseStreamingBusinessService;
 import com.zhongzheng.modules.course.service.ICourseStreamingService;
 import com.zhongzheng.modules.course.vo.CourseStreamingVo;
@@ -22,14 +26,9 @@ import com.zhongzheng.modules.polyv.service.IPolyvVideoService;
 import com.zhongzheng.modules.polyv.vo.PolyvVideoQuerVo;
 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;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.pagehelper.Page;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.util.Collection;
-import java.util.Collections;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -40,6 +39,7 @@ import java.util.stream.Collectors;
  * @date 2021-10-11
  */
 @Service
+@DS("slave")
 public class CourseStreamingServiceImpl extends ServiceImpl<CourseStreamingMapper, CourseStreaming> implements ICourseStreamingService {
 
     @Autowired

+ 7 - 8
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseSubjectProjectServiceImpl.java

@@ -1,24 +1,22 @@
 package com.zhongzheng.modules.course.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.util.StrUtil;
-import com.zhongzheng.common.utils.DateUtils;
-import com.zhongzheng.modules.course.domain.CourseHandoutsBusiness;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.baomidou.dynamic.datasource.annotation.DS;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.github.pagehelper.Page;
+import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.modules.course.bo.CourseSubjectProjectAddBo;
-import com.zhongzheng.modules.course.bo.CourseSubjectProjectQueryBo;
 import com.zhongzheng.modules.course.bo.CourseSubjectProjectEditBo;
+import com.zhongzheng.modules.course.bo.CourseSubjectProjectQueryBo;
 import com.zhongzheng.modules.course.domain.CourseSubjectProject;
 import com.zhongzheng.modules.course.mapper.CourseSubjectProjectMapper;
-import com.zhongzheng.modules.course.vo.CourseSubjectProjectVo;
 import com.zhongzheng.modules.course.service.ICourseSubjectProjectService;
+import com.zhongzheng.modules.course.vo.CourseSubjectProjectVo;
+import org.springframework.stereotype.Service;
 
 import java.util.Collection;
-import java.util.Collections;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -29,6 +27,7 @@ import java.util.stream.Collectors;
  * @date 2021-10-09
  */
 @Service
+@DS("slave")
 public class CourseSubjectProjectServiceImpl extends ServiceImpl<CourseSubjectProjectMapper, CourseSubjectProject> implements ICourseSubjectProjectService {
 
     @Override

+ 10 - 16
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseSubjectServiceImpl.java

@@ -1,35 +1,28 @@
 package com.zhongzheng.modules.course.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.util.StrUtil;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.modules.course.bo.*;
-import com.zhongzheng.modules.course.domain.CourseBusiness;
-import com.zhongzheng.modules.course.domain.CourseEducationType;
+import com.zhongzheng.modules.course.domain.CourseSubject;
 import com.zhongzheng.modules.course.domain.CourseSubjectProject;
+import com.zhongzheng.modules.course.mapper.CourseSubjectMapper;
 import com.zhongzheng.modules.course.service.ICourseSubjectProjectService;
+import com.zhongzheng.modules.course.service.ICourseSubjectService;
 import com.zhongzheng.modules.course.vo.CourseProjectTypeVo;
+import com.zhongzheng.modules.course.vo.CourseSubjectVo;
 import com.zhongzheng.modules.grade.bo.ClassGradeListBo;
-import com.zhongzheng.modules.user.bo.SchoolProjectAddBo;
-import com.zhongzheng.modules.user.domain.SchoolProject;
-import com.zhongzheng.modules.user.vo.SchoolVo;
-
 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;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.pagehelper.Page;
-import com.zhongzheng.modules.course.domain.CourseSubject;
-import com.zhongzheng.modules.course.mapper.CourseSubjectMapper;
-import com.zhongzheng.modules.course.vo.CourseSubjectVo;
-import com.zhongzheng.modules.course.service.ICourseSubjectService;
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -40,6 +33,7 @@ import java.util.stream.Collectors;
  * @date 2021-10-09
  */
 @Service
+@DS("slave")
 public class CourseSubjectServiceImpl extends ServiceImpl<CourseSubjectMapper, CourseSubject> implements ICourseSubjectService {
 
     @Autowired

+ 7 - 8
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/MajorProjectServiceImpl.java

@@ -1,24 +1,22 @@
 package com.zhongzheng.modules.course.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.util.StrUtil;
-import com.zhongzheng.common.utils.DateUtils;
-import com.zhongzheng.modules.course.domain.MajorCategory;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.baomidou.dynamic.datasource.annotation.DS;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.github.pagehelper.Page;
+import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.modules.course.bo.MajorProjectAddBo;
-import com.zhongzheng.modules.course.bo.MajorProjectQueryBo;
 import com.zhongzheng.modules.course.bo.MajorProjectEditBo;
+import com.zhongzheng.modules.course.bo.MajorProjectQueryBo;
 import com.zhongzheng.modules.course.domain.MajorProject;
 import com.zhongzheng.modules.course.mapper.MajorProjectMapper;
-import com.zhongzheng.modules.course.vo.MajorProjectVo;
 import com.zhongzheng.modules.course.service.IMajorProjectService;
+import com.zhongzheng.modules.course.vo.MajorProjectVo;
+import org.springframework.stereotype.Service;
 
 import java.util.Collection;
-import java.util.Collections;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -29,6 +27,7 @@ import java.util.stream.Collectors;
  * @date 2021-10-09
  */
 @Service
+@DS("slave")
 public class MajorProjectServiceImpl extends ServiceImpl<MajorProjectMapper, MajorProject> implements IMajorProjectService {
 
     @Override

+ 12 - 14
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/MajorServiceImpl.java

@@ -1,31 +1,28 @@
 package com.zhongzheng.modules.course.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.util.StrUtil;
-import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.modules.course.bo.*;
-import com.zhongzheng.modules.course.domain.CourseEducationType;
+import com.zhongzheng.modules.course.domain.Major;
 import com.zhongzheng.modules.course.domain.MajorProject;
+import com.zhongzheng.modules.course.mapper.MajorMapper;
 import com.zhongzheng.modules.course.service.IMajorLabelService;
 import com.zhongzheng.modules.course.service.IMajorProjectService;
-import com.zhongzheng.modules.course.vo.*;
-import com.zhongzheng.modules.user.bo.SchoolProjectAddBo;
-import com.zhongzheng.modules.user.domain.SchoolProject;
+import com.zhongzheng.modules.course.service.IMajorService;
+import com.zhongzheng.modules.course.vo.CourseProjectTypeVo;
+import com.zhongzheng.modules.course.vo.MajorLabelVo;
+import com.zhongzheng.modules.course.vo.MajorVo;
 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;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.pagehelper.Page;
-import com.zhongzheng.modules.course.domain.Major;
-import com.zhongzheng.modules.course.mapper.MajorMapper;
-import com.zhongzheng.modules.course.service.IMajorService;
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -36,6 +33,7 @@ import java.util.stream.Collectors;
  * @date 2021-10-09
  */
 @Service
+@DS("slave")
 public class MajorServiceImpl extends ServiceImpl<MajorMapper, Major> implements IMajorService {
 
     @Autowired

+ 9 - 10
zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/service/impl/ExamPaperServiceImpl.java

@@ -3,26 +3,24 @@ 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.common.utils.ServletUtils;
-import com.zhongzheng.modules.course.domain.CourseSection;
-import com.zhongzheng.modules.pay.domain.PayAisle;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.baomidou.dynamic.datasource.annotation.DS;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.github.pagehelper.Page;
+import com.zhongzheng.common.exception.CustomException;
+import com.zhongzheng.common.utils.DateUtils;
+import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.modules.exam.bo.ExamPaperAddBo;
-import com.zhongzheng.modules.exam.bo.ExamPaperQueryBo;
 import com.zhongzheng.modules.exam.bo.ExamPaperEditBo;
+import com.zhongzheng.modules.exam.bo.ExamPaperQueryBo;
 import com.zhongzheng.modules.exam.domain.ExamPaper;
 import com.zhongzheng.modules.exam.mapper.ExamPaperMapper;
-import com.zhongzheng.modules.exam.vo.ExamPaperVo;
 import com.zhongzheng.modules.exam.service.IExamPaperService;
+import com.zhongzheng.modules.exam.vo.ExamPaperVo;
+import org.springframework.stereotype.Service;
 
 import java.util.Collection;
-import java.util.Collections;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -33,6 +31,7 @@ import java.util.stream.Collectors;
  * @date 2021-10-18
  */
 @Service
+@DS("slave")
 public class ExamPaperServiceImpl extends ServiceImpl<ExamPaperMapper, ExamPaper> implements IExamPaperService {
 
     @Override

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/IGoodsService.java

@@ -120,4 +120,6 @@ public interface IGoodsService extends IService<Goods> {
 
     boolean updateGoodsRepair(UpdateGoodsRepairBo bo);
 
+	List<Goods> getList(Long tenantId);
+
 }

+ 6 - 7
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/impl/GoodsAttachedServiceImpl.java

@@ -1,28 +1,26 @@
 package com.zhongzheng.modules.goods.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.util.StrUtil;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.modules.goods.bo.GoodsAttachedAddBo;
 import com.zhongzheng.modules.goods.bo.GoodsAttachedEditBo;
 import com.zhongzheng.modules.goods.bo.GoodsAttachedQueryBo;
 import com.zhongzheng.modules.goods.domain.GoodsAttached;
 import com.zhongzheng.modules.goods.mapper.GoodsAttachedMapper;
-import com.zhongzheng.modules.goods.mapper.GoodsMapper;
 import com.zhongzheng.modules.goods.service.IGoodsAttachedService;
 import com.zhongzheng.modules.goods.vo.GoodsAttachedPaperVo;
 import com.zhongzheng.modules.goods.vo.GoodsAttachedVo;
 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;
-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 +31,7 @@ import java.util.stream.Collectors;
  * @date 2021-10-28
  */
 @Service
+@DS("slave")
 public class GoodsAttachedServiceImpl extends ServiceImpl<GoodsAttachedMapper, GoodsAttached> implements IGoodsAttachedService {
 
 

+ 8 - 9
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/impl/GoodsCourseServiceImpl.java

@@ -1,27 +1,25 @@
 package com.zhongzheng.modules.goods.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.util.StrUtil;
-import com.zhongzheng.common.utils.DateUtils;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
 import com.zhongzheng.modules.course.vo.CourseVo;
 import com.zhongzheng.modules.goods.bo.GoodsCourseAddBo;
 import com.zhongzheng.modules.goods.bo.GoodsCourseEditBo;
 import com.zhongzheng.modules.goods.bo.GoodsCourseQueryBo;
 import com.zhongzheng.modules.goods.domain.GoodsCourse;
 import com.zhongzheng.modules.goods.mapper.GoodsCourseMapper;
-import com.zhongzheng.modules.goods.mapper.GoodsMapper;
 import com.zhongzheng.modules.goods.service.IGoodsCourseService;
 import com.zhongzheng.modules.goods.vo.GoodsCourseMoreVo;
 import com.zhongzheng.modules.goods.vo.GoodsCourseVo;
-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;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.pagehelper.Page;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.util.Collection;
-import java.util.Collections;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -32,6 +30,7 @@ import java.util.stream.Collectors;
  * @date 2021-10-12
  */
 @Service
+@DS("slave")
 public class GoodsCourseServiceImpl extends ServiceImpl<GoodsCourseMapper, GoodsCourse> implements IGoodsCourseService {
 
 

+ 4 - 7
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/impl/GoodsCourseTeacherServiceImpl.java

@@ -2,11 +2,12 @@ package com.zhongzheng.modules.goods.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.lang.Validator;
-import cn.hutool.core.util.StrUtil;
+import com.baomidou.dynamic.datasource.annotation.DS;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
 import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.utils.DateUtils;
-import com.zhongzheng.modules.course.domain.CourseSectionWatchPer;
 import com.zhongzheng.modules.goods.bo.GoodsCourseTeacherAddBo;
 import com.zhongzheng.modules.goods.bo.GoodsCourseTeacherEditBo;
 import com.zhongzheng.modules.goods.bo.GoodsCourseTeacherItemBo;
@@ -20,14 +21,9 @@ import com.zhongzheng.modules.goods.vo.GoodsCourseTeacherVo;
 import org.apache.commons.lang3.StringUtils;
 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;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.pagehelper.Page;
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -38,6 +34,7 @@ import java.util.stream.Collectors;
  * @date 2022-09-14
  */
 @Service
+@DS("slave")
 public class GoodsCourseTeacherServiceImpl extends ServiceImpl<GoodsCourseTeacherMapper, GoodsCourseTeacher> implements IGoodsCourseTeacherService {
 
     @Autowired

+ 13 - 4
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/impl/GoodsServiceImpl.java

@@ -8,9 +8,14 @@ import cn.hutool.core.util.StrUtil;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
 import com.zhongzheng.common.annotation.DataScope;
 import com.zhongzheng.common.core.redis.RedisCache;
 import com.zhongzheng.common.exception.CustomException;
@@ -79,10 +84,7 @@ import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.pagehelper.Page;
+import org.springframework.transaction.annotation.Propagation;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.io.IOException;
@@ -102,6 +104,8 @@ import static java.math.RoundingMode.HALF_UP;
  * @date 2021-10-12
  */
 @Service
+@DS("slave")
+@Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class)
 public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements IGoodsService {
 
 
@@ -4150,6 +4154,11 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
         return true;
     }
 
+    @Override
+    public List<Goods> getList(Long tenantId) {
+       return list(new LambdaQueryWrapper<Goods>().eq(Goods::getTenantId,tenantId));
+    }
+
     private Long getNewId(Long oldId, Integer type){
         if (ObjectUtils.isNull(oldId) || oldId <= 0L){
             return null;

+ 6 - 5
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/impl/GoodsSpecAttributeRelationServiceImpl.java

@@ -2,7 +2,12 @@ package com.zhongzheng.modules.goods.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.StrUtil;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
 import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.modules.goods.bo.GoodsSpecAttributeRelationAddBo;
@@ -13,13 +18,8 @@ import com.zhongzheng.modules.goods.mapper.GoodsSpecAttributeRelationMapper;
 import com.zhongzheng.modules.goods.service.IGoodsSpecAttributeRelationService;
 import com.zhongzheng.modules.goods.vo.GoodsSpecAttributeRelationVo;
 import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-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;
 
@@ -30,6 +30,7 @@ import java.util.stream.Collectors;
  * @date 2022-09-29
  */
 @Service
+@DS("slave")
 public class GoodsSpecAttributeRelationServiceImpl extends ServiceImpl<GoodsSpecAttributeRelationMapper, GoodsSpecAttributeRelation> implements IGoodsSpecAttributeRelationService {
 
     @Override

+ 6 - 5
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/impl/GoodsSpecAttributeServiceImpl.java

@@ -2,6 +2,11 @@ package com.zhongzheng.modules.goods.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.StrUtil;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.modules.goods.bo.GoodsSpecAttributeAddBo;
 import com.zhongzheng.modules.goods.bo.GoodsSpecAttributeEditBo;
@@ -11,13 +16,8 @@ import com.zhongzheng.modules.goods.mapper.GoodsSpecAttributeMapper;
 import com.zhongzheng.modules.goods.service.IGoodsSpecAttributeService;
 import com.zhongzheng.modules.goods.vo.GoodsSpecAttributeVo;
 import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-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;
 
@@ -28,6 +28,7 @@ import java.util.stream.Collectors;
  * @date 2022-09-29
  */
 @Service
+@DS("slave")
 public class GoodsSpecAttributeServiceImpl extends ServiceImpl<GoodsSpecAttributeMapper, GoodsSpecAttribute> implements IGoodsSpecAttributeService {
 
     @Override

+ 6 - 10
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/impl/GoodsSpecServiceImpl.java

@@ -2,28 +2,23 @@ package com.zhongzheng.modules.goods.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.StrUtil;
-import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.github.pagehelper.Page;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.modules.goods.bo.GoodsSpecAddBo;
-import com.zhongzheng.modules.goods.bo.GoodsSpecAttributeAddBo;
 import com.zhongzheng.modules.goods.bo.GoodsSpecEditBo;
 import com.zhongzheng.modules.goods.bo.GoodsSpecQueryBo;
 import com.zhongzheng.modules.goods.domain.GoodsSpec;
-import com.zhongzheng.modules.goods.domain.GoodsSpecAttribute;
 import com.zhongzheng.modules.goods.mapper.GoodsSpecMapper;
 import com.zhongzheng.modules.goods.service.IGoodsSpecService;
-import com.zhongzheng.modules.goods.vo.GoodsSpecAttrDetailVo;
 import com.zhongzheng.modules.goods.vo.GoodsSpecVo;
 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;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.pagehelper.Page;
 
-import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -34,6 +29,7 @@ import java.util.stream.Collectors;
  * @date 2022-09-29
  */
 @Service
+@DS("slave")
 public class GoodsSpecServiceImpl extends ServiceImpl<GoodsSpecMapper, GoodsSpec> implements IGoodsSpecService {
 
     @Autowired

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/impl/GoodsSpecTemplateServiceImpl.java

@@ -2,6 +2,7 @@ package com.zhongzheng.modules.goods.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.StrUtil;
+import com.baomidou.dynamic.datasource.annotation.DS;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
@@ -36,6 +37,7 @@ import java.util.stream.Collectors;
  * @date 2022-09-29
  */
 @Service
+@DS("slave")
 public class GoodsSpecTemplateServiceImpl extends ServiceImpl<GoodsSpecTemplateMapper, GoodsSpecTemplate> implements IGoodsSpecTemplateService {
 
     @Autowired

+ 8 - 10
zhongzheng-system/src/main/java/com/zhongzheng/modules/pay/service/impl/PayServeServiceImpl.java

@@ -2,27 +2,24 @@ package com.zhongzheng.modules.pay.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.StrUtil;
-import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
-import com.zhongzheng.common.utils.DateUtils;
-import com.zhongzheng.modules.pay.domain.PayAisle;
-import com.zhongzheng.modules.pay.domain.PayNature;
-import com.zhongzheng.modules.pay.domain.PayPayee;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.baomidou.dynamic.datasource.annotation.DS;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.github.pagehelper.Page;
+import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.modules.pay.bo.PayServeAddBo;
-import com.zhongzheng.modules.pay.bo.PayServeQueryBo;
 import com.zhongzheng.modules.pay.bo.PayServeEditBo;
+import com.zhongzheng.modules.pay.bo.PayServeQueryBo;
 import com.zhongzheng.modules.pay.domain.PayServe;
 import com.zhongzheng.modules.pay.mapper.PayServeMapper;
-import com.zhongzheng.modules.pay.vo.PayServeVo;
 import com.zhongzheng.modules.pay.service.IPayServeService;
+import com.zhongzheng.modules.pay.vo.PayServeVo;
+import org.springframework.stereotype.Service;
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -33,6 +30,7 @@ import java.util.stream.Collectors;
  * @date 2021-10-12
  */
 @Service
+@DS("slave")
 public class PayServeServiceImpl extends ServiceImpl<PayServeMapper, PayServe> implements IPayServeService {
 
     @Override

+ 8 - 8
zhongzheng-system/src/main/java/com/zhongzheng/modules/pay/service/impl/PaySupplyServiceImpl.java

@@ -2,25 +2,24 @@ package com.zhongzheng.modules.pay.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.StrUtil;
-import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
-import com.zhongzheng.common.utils.DateUtils;
-import com.zhongzheng.modules.pay.domain.PayNature;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.baomidou.dynamic.datasource.annotation.DS;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.github.pagehelper.Page;
+import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.modules.pay.bo.PaySupplyAddBo;
-import com.zhongzheng.modules.pay.bo.PaySupplyQueryBo;
 import com.zhongzheng.modules.pay.bo.PaySupplyEditBo;
+import com.zhongzheng.modules.pay.bo.PaySupplyQueryBo;
 import com.zhongzheng.modules.pay.domain.PaySupply;
 import com.zhongzheng.modules.pay.mapper.PaySupplyMapper;
-import com.zhongzheng.modules.pay.vo.PaySupplyVo;
 import com.zhongzheng.modules.pay.service.IPaySupplyService;
+import com.zhongzheng.modules.pay.vo.PaySupplyVo;
+import org.springframework.stereotype.Service;
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -31,6 +30,7 @@ import java.util.stream.Collectors;
  * @date 2021-10-12
  */
 @Service
+@DS("slave")
 public class PaySupplyServiceImpl extends ServiceImpl<PaySupplyMapper, PaySupply> implements IPaySupplyService {
 
     @Override

+ 7 - 6
zhongzheng-system/src/main/java/com/zhongzheng/modules/polyv/service/impl/PolyvCataServiceImpl.java

@@ -2,22 +2,22 @@ package com.zhongzheng.modules.polyv.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.util.StrUtil;
-import com.zhongzheng.common.utils.DateUtils;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.baomidou.dynamic.datasource.annotation.DS;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.github.pagehelper.Page;
+import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.modules.polyv.bo.PolyvCataAddBo;
-import com.zhongzheng.modules.polyv.bo.PolyvCataQueryBo;
 import com.zhongzheng.modules.polyv.bo.PolyvCataEditBo;
+import com.zhongzheng.modules.polyv.bo.PolyvCataQueryBo;
 import com.zhongzheng.modules.polyv.domain.PolyvCata;
 import com.zhongzheng.modules.polyv.mapper.PolyvCataMapper;
-import com.zhongzheng.modules.polyv.vo.PolyvCataVo;
 import com.zhongzheng.modules.polyv.service.IPolyvCataService;
+import com.zhongzheng.modules.polyv.vo.PolyvCataVo;
+import org.springframework.stereotype.Service;
 
 import java.util.Collection;
-import java.util.Collections;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -28,6 +28,7 @@ import java.util.stream.Collectors;
  * @date 2022-01-11
  */
 @Service
+@DS("slave")
 public class PolyvCataServiceImpl extends ServiceImpl<PolyvCataMapper, PolyvCata> implements IPolyvCataService {
 
     @Override

+ 13 - 14
zhongzheng-system/src/main/java/com/zhongzheng/modules/polyv/service/impl/PolyvVideoServiceImpl.java

@@ -7,9 +7,13 @@ import cn.hutool.core.util.StrUtil;
 import cn.hutool.http.HttpStatus;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
-import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.fasterxml.jackson.databind.ObjectMapper;
+import com.github.pagehelper.Page;
 import com.zhongzheng.common.core.page.TableDataInfo;
 import com.zhongzheng.common.core.redis.RedisCache;
 import com.zhongzheng.common.utils.DateUtils;
@@ -22,27 +26,21 @@ import com.zhongzheng.modules.course.domain.CourseStreaming;
 import com.zhongzheng.modules.course.service.ICourseStreamingBusinessService;
 import com.zhongzheng.modules.course.service.ICourseStreamingService;
 import com.zhongzheng.modules.course.vo.CourseStreamingVo;
-import com.zhongzheng.modules.inform.bo.InformClassifyEditBo;
-import com.zhongzheng.modules.inform.domain.InformClassify;
 import com.zhongzheng.modules.polyv.bo.PolyvCataQueryBo;
+import com.zhongzheng.modules.polyv.bo.PolyvVideoAddBo;
+import com.zhongzheng.modules.polyv.bo.PolyvVideoEditBo;
+import com.zhongzheng.modules.polyv.bo.PolyvVideoQueryBo;
 import com.zhongzheng.modules.polyv.domain.PolyvCata;
 import com.zhongzheng.modules.polyv.domain.PolyvVideDo;
+import com.zhongzheng.modules.polyv.domain.PolyvVideo;
+import com.zhongzheng.modules.polyv.domain.TokenResponse;
+import com.zhongzheng.modules.polyv.mapper.PolyvVideoMapper;
 import com.zhongzheng.modules.polyv.service.IPolyvCataService;
+import com.zhongzheng.modules.polyv.service.IPolyvVideoService;
 import com.zhongzheng.modules.polyv.vo.*;
-import com.zhongzheng.modules.polyv.domain.TokenResponse;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.pagehelper.Page;
-import com.zhongzheng.modules.polyv.bo.PolyvVideoAddBo;
-import com.zhongzheng.modules.polyv.bo.PolyvVideoQueryBo;
-import com.zhongzheng.modules.polyv.bo.PolyvVideoEditBo;
-import com.zhongzheng.modules.polyv.domain.PolyvVideo;
-import com.zhongzheng.modules.polyv.mapper.PolyvVideoMapper;
-import com.zhongzheng.modules.polyv.service.IPolyvVideoService;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.io.IOException;
@@ -59,6 +57,7 @@ import static com.squareup.okhttp.internal.Util.md5Hex;
  * @date 2021-06-11
  */
 @Service
+@DS("slave")
 public class PolyvVideoServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVideo> implements IPolyvVideoService {
 
     @Value("${poliv.token.userid}")

+ 0 - 3
zhongzheng-system/src/main/java/com/zhongzheng/modules/system/service/impl/SysDictDataServiceImpl.java

@@ -5,12 +5,9 @@ import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.zhongzheng.common.core.domain.entity.SysDictData;
-import com.zhongzheng.common.core.domain.entity.SysDictType;
-import com.zhongzheng.common.core.domain.entity.TopSysUser;
 import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.common.utils.DictUtils;
-import com.zhongzheng.modules.course.domain.MajorCategory;
 import com.zhongzheng.modules.system.mapper.SysDictDataMapper;
 import com.zhongzheng.modules.system.service.ISysDictDataService;
 import org.springframework.stereotype.Service;

+ 4 - 12
zhongzheng-system/src/main/java/com/zhongzheng/modules/top/goods/service/impl/TopGoodsServiceImpl.java

@@ -21,8 +21,6 @@ import com.zhongzheng.modules.exam.domain.ExamPaper;
 import com.zhongzheng.modules.exam.service.IExamPaperService;
 import com.zhongzheng.modules.goods.domain.*;
 import com.zhongzheng.modules.goods.service.*;
-import com.zhongzheng.modules.grade.service.IClassGradeInterfaceService;
-import com.zhongzheng.modules.order.service.IOrderInputTemplateService;
 import com.zhongzheng.modules.pay.domain.PayServe;
 import com.zhongzheng.modules.pay.domain.PaySupply;
 import com.zhongzheng.modules.pay.service.IPayServeService;
@@ -32,7 +30,6 @@ import com.zhongzheng.modules.polyv.domain.PolyvVideo;
 import com.zhongzheng.modules.polyv.service.IPolyvCataService;
 import com.zhongzheng.modules.polyv.service.IPolyvVideoService;
 import com.zhongzheng.modules.system.bo.GoodsCopyEnum;
-import com.zhongzheng.modules.system.service.ISysGoodsCopyRecordService;
 import com.zhongzheng.modules.top.goods.bo.TopGoodsAddBo;
 import com.zhongzheng.modules.top.goods.bo.TopGoodsEditBo;
 import com.zhongzheng.modules.top.goods.bo.TopGoodsQueryBo;
@@ -69,10 +66,6 @@ public class TopGoodsServiceImpl extends ServiceImpl<TopGoodsMapper, TopGoods> i
     @Autowired
     private ICourseService iCourseService;
     @Autowired
-    private IOrderInputTemplateService iOrderInputTemplateService;
-    @Autowired
-    private IClassGradeInterfaceService iClassGradeInterfaceService;
-    @Autowired
     private ICourseMenuService iCourseMenuService;
     @Autowired
     private ICourseMenuExamService iCourseMenuExamService;
@@ -139,8 +132,6 @@ public class TopGoodsServiceImpl extends ServiceImpl<TopGoodsMapper, TopGoods> i
     @Autowired
     private ICertificateTpService iCertificateTpService;
     @Autowired
-    private ISysGoodsCopyRecordService iSysGoodsCopyRecordService;
-    @Autowired
     private IGoodsCourseTeacherService goodsCourseTeacherService;
     @Autowired
     private ICourseChapterService iCourseChapterService;
@@ -168,9 +159,9 @@ public class TopGoodsServiceImpl extends ServiceImpl<TopGoodsMapper, TopGoods> i
     private IMajorProjectService iMajorProjectService;
     @Autowired
     private IPayServeService iPayServeService;
+
     @Autowired
     private ITopGoodsCopyService iTopGoodsCopyService;
-
     @Autowired
     private ITopGoodsCourseService iTopGoodsCourseService;
     @Autowired
@@ -397,10 +388,11 @@ public class TopGoodsServiceImpl extends ServiceImpl<TopGoodsMapper, TopGoods> i
     @Transactional(rollbackFor = Exception.class)
     public boolean goodsBatchCopyTenant() {
         List<TopGoodsCopy> copyRecordList = new ArrayList<>();
-        String tenantId = "867735392558919680";
+        Long tenantId = 867735392558919680L;
         //全量同步
         // 1 goods
-        List<Goods> goodsList = iGoodsService.list(new LambdaQueryWrapper<Goods>().eq(Goods::getTenantId,tenantId));
+//        List<Goods> goodsList = iGoodsService.list(new LambdaQueryWrapper<Goods>().eq(Goods::getTenantId,tenantId));
+        List<Goods> goodsList = iGoodsService.getList(tenantId);
         if (CollectionUtils.isEmpty(goodsList)){
             return true;
         }

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/top/user/bo/TopSysUserAddBo.java

@@ -73,4 +73,6 @@ public class TopSysUserAddBo {
     /** 备注 */
     @ApiModelProperty("备注")
     private String remark;
+    /** 用户编码 */
+    private String code;
 }

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/top/user/bo/TopSysUserEditBo.java

@@ -82,4 +82,7 @@ public class TopSysUserEditBo {
     /** 备注 */
     @ApiModelProperty("备注")
     private String remark;
+
+    /** 用户编码 */
+    private String code;
 }

+ 4 - 3
zhongzheng-system/src/main/java/com/zhongzheng/modules/top/user/bo/TopSysUserQueryBo.java

@@ -1,5 +1,7 @@
 package com.zhongzheng.modules.top.user.bo;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.zhongzheng.common.core.domain.BaseEntity;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
@@ -7,9 +9,6 @@ import lombok.EqualsAndHashCode;
 
 import java.util.Date;
 
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.zhongzheng.common.core.domain.BaseEntity;
-
 /**
  * SAAS用户信息分页查询对象 top_sys_user
  *
@@ -73,4 +72,6 @@ public class TopSysUserQueryBo extends BaseEntity {
 	@ApiModelProperty("最后登录时间")
 	private Date loginDate;
 
+	/** 用户编码 */
+	private String code;
 }

+ 18 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/top/user/domain/TopSysDictData.java

@@ -4,12 +4,16 @@ import com.baomidou.mybatisplus.annotation.FieldFill;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
+import com.zhongzheng.common.constant.UserConstants;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 import lombok.experimental.Accessors;
 
 import java.io.Serializable;
 import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 /**
  * 【请填写功能名称】对象 top_sys_dict_data
@@ -60,4 +64,18 @@ private static final long serialVersionUID=1L;
     private String remark;
     /** 字典类型ID */
     private Long dictTypeId;
+
+    @TableField(exist = false)
+    private List<String> statusArray;
+    /**
+     * 请求参数
+     */
+    @TableField(exist = false)
+    private Map<String, Object> params = new HashMap<>();
+
+    public boolean getDefault()
+    {
+        return UserConstants.YES.equals(this.isDefault) ? true : false;
+    }
+
 }

+ 20 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/top/user/domain/TopSysDictType.java

@@ -4,12 +4,16 @@ import com.baomidou.mybatisplus.annotation.FieldFill;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 import lombok.experimental.Accessors;
 
 import java.io.Serializable;
 import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 /**
  * 【请填写功能名称】对象 top_sys_dict_type
@@ -48,4 +52,20 @@ private static final long serialVersionUID=1L;
     private Date updateTime;
     /** 备注 */
     private String remark;
+
+    @TableField(exist = false)
+    private List<String> statusArray;
+    /**
+     * 请求参数
+     */
+    @TableField(exist = false)
+    private Map<String, Object> params = new HashMap<>();
+    /** 分页大小 */
+    @ApiModelProperty("分页大小")
+    @TableField(exist = false)
+    private Integer pageSize;
+    /** 当前页数 */
+    @ApiModelProperty("当前页数")
+    @TableField(exist = false)
+    private Integer pageNum;
 }

+ 34 - 23
zhongzheng-system/src/main/java/com/zhongzheng/modules/top/user/service/ITopSysDictDataService.java

@@ -2,13 +2,8 @@ package com.zhongzheng.modules.top.user.service;
 
 
 import com.baomidou.mybatisplus.extension.service.IService;
-import com.zhongzheng.modules.top.user.bo.TopSysDictDataAddBo;
-import com.zhongzheng.modules.top.user.bo.TopSysDictDataEditBo;
-import com.zhongzheng.modules.top.user.bo.TopSysDictDataQueryBo;
 import com.zhongzheng.modules.top.user.domain.TopSysDictData;
-import com.zhongzheng.modules.top.user.vo.TopSysDictDataVo;
 
-import java.util.Collection;
 import java.util.List;
 
 /**
@@ -19,35 +14,51 @@ import java.util.List;
  */
 public interface ITopSysDictDataService extends IService<TopSysDictData> {
 	/**
-	 * 查询单个
-	 * @return
+	 * 根据条件分页查询字典数据
+	 *
+	 * @param dictData 字典数据信息
+	 * @return 字典数据集合信息
 	 */
-	TopSysDictDataVo queryById(Long dictCode);
+	public List<TopSysDictData> selectDictDataList(TopSysDictData dictData);
 
 	/**
-	 * 查询列表
+	 * 根据字典类型和字典键值查询字典数据信息
+	 *
+	 * @param dictType  字典类型
+	 * @param dictValue 字典键值
+	 * @return 字典标签
 	 */
-	List<TopSysDictDataVo> queryList(TopSysDictDataQueryBo bo);
+	public String selectDictLabel(String dictType, String dictValue);
 
 	/**
-	 * 根据新增业务对象插入【请填写功能名称】
-	 * @param bo 【请填写功能名称】新增业务对象
-	 * @return
+	 * 根据字典数据ID查询信息
+	 *
+	 * @param dictCode 字典数据ID
+	 * @return 字典数据
 	 */
-	Boolean insertByAddBo(TopSysDictDataAddBo bo);
+	public TopSysDictData selectDictDataById(Long dictCode);
 
 	/**
-	 * 根据编辑业务对象修改【请填写功能名称】
-	 * @param bo 【请填写功能名称】编辑业务对象
-	 * @return
+	 * 批量删除字典数据信息
+	 *
+	 * @param dictCodes 需要删除的字典数据ID
+	 * @return 结果
 	 */
-	Boolean updateByEditBo(TopSysDictDataEditBo bo);
+	public int deleteDictDataByIds(Long[] dictCodes);
 
 	/**
-	 * 校验并删除数据
-	 * @param ids 主键集合
-	 * @param isValid 是否校验,true-删除前校验,false-不校验
-	 * @return
+	 * 新增保存字典数据信息
+	 *
+	 * @param dictData 字典数据信息
+	 * @return 结果
 	 */
-	Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+	public int insertDictData(TopSysDictData dictData);
+
+	/**
+	 * 修改保存字典数据信息
+	 *
+	 * @param dictData 字典数据信息
+	 * @return 结果
+	 */
+	public int updateDictData(TopSysDictData dictData);
 }

+ 48 - 23
zhongzheng-system/src/main/java/com/zhongzheng/modules/top/user/service/ITopSysDictTypeService.java

@@ -2,13 +2,9 @@ package com.zhongzheng.modules.top.user.service;
 
 
 import com.baomidou.mybatisplus.extension.service.IService;
-import com.zhongzheng.modules.top.user.bo.TopSysDictTypeAddBo;
-import com.zhongzheng.modules.top.user.bo.TopSysDictTypeEditBo;
-import com.zhongzheng.modules.top.user.bo.TopSysDictTypeQueryBo;
+import com.zhongzheng.modules.top.user.domain.TopSysDictData;
 import com.zhongzheng.modules.top.user.domain.TopSysDictType;
-import com.zhongzheng.modules.top.user.vo.TopSysDictTypeVo;
 
-import java.util.Collection;
 import java.util.List;
 
 /**
@@ -19,35 +15,64 @@ import java.util.List;
  */
 public interface ITopSysDictTypeService extends IService<TopSysDictType> {
 	/**
-	 * 查询单个
-	 * @return
+	 * 根据条件分页查询字典类型
+	 *
+	 * @param dictType 字典类型信息
+	 * @return 字典类型集合信息
 	 */
-	TopSysDictTypeVo queryById(Long dictId);
+	public List<TopSysDictType> selectDictTypeList(TopSysDictType dictType);
+
+
+	/**
+	 * 根据字典类型ID查询信息
+	 *
+	 * @param dictId 字典类型ID
+	 * @return 字典类型
+	 */
+	public TopSysDictType selectDictTypeById(Long dictId);
+
+	/**
+	 * 批量删除字典信息
+	 *
+	 * @param dictIds 需要删除的字典ID
+	 * @return 结果
+	 */
+	public int deleteDictTypeByIds(Long[] dictIds);
+
+	/**
+	 * 清空缓存数据
+	 */
+	public void clearCache();
 
 	/**
-	 * 查询列表
+	 * 新增保存字典类型信息
+	 *
+	 * @param dictType 字典类型信息
+	 * @return 结果
 	 */
-	List<TopSysDictTypeVo> queryList(TopSysDictTypeQueryBo bo);
+	public int insertDictType(TopSysDictType dictType);
 
 	/**
-	 * 根据新增业务对象插入【请填写功能名称】
-	 * @param bo 【请填写功能名称】新增业务对象
-	 * @return
+	 * 根据字典类型查询字典数据
+	 *
+	 * @param dictType 字典类型
+	 * @return 字典数据集合信息
 	 */
-	Boolean insertByAddBo(TopSysDictTypeAddBo bo);
+	public List<TopSysDictData> selectDictDataByType(String dictType);
 
 	/**
-	 * 根据编辑业务对象修改【请填写功能名称】
-	 * @param bo 【请填写功能名称】编辑业务对象
-	 * @return
+	 * 修改保存字典类型信息
+	 *
+	 * @param dictType 字典类型信息
+	 * @return 结果
 	 */
-	Boolean updateByEditBo(TopSysDictTypeEditBo bo);
+	public int updateDictType(TopSysDictType dictType);
 
 	/**
-	 * 校验并删除数据
-	 * @param ids 主键集合
-	 * @param isValid 是否校验,true-删除前校验,false-不校验
-	 * @return
+	 * 校验字典类型称是否唯一
+	 *
+	 * @param dictType 字典类型
+	 * @return 结果
 	 */
-	Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+	public String checkDictTypeUnique(TopSysDictType dictType);
 }

+ 95 - 58
zhongzheng-system/src/main/java/com/zhongzheng/modules/top/user/service/impl/TopSysDictDataServiceImpl.java

@@ -1,24 +1,19 @@
 package com.zhongzheng.modules.top.user.service.impl;
 
-import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.lang.Validator;
 import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.github.pagehelper.Page;
-import com.zhongzheng.modules.top.user.bo.TopSysDictDataAddBo;
-import com.zhongzheng.modules.top.user.bo.TopSysDictDataEditBo;
-import com.zhongzheng.modules.top.user.bo.TopSysDictDataQueryBo;
+import com.zhongzheng.common.exception.CustomException;
+import com.zhongzheng.common.utils.DateUtils;
+import com.zhongzheng.common.utils.DictUtils;
 import com.zhongzheng.modules.top.user.domain.TopSysDictData;
 import com.zhongzheng.modules.top.user.mapper.TopSysDictDataMapper;
 import com.zhongzheng.modules.top.user.service.ITopSysDictDataService;
-import com.zhongzheng.modules.top.user.vo.TopSysDictDataVo;
 import org.springframework.stereotype.Service;
 
-import java.util.Collection;
-import java.util.Date;
+import java.util.Arrays;
 import java.util.List;
-import java.util.stream.Collectors;
 
 /**
  * 【请填写功能名称】Service业务层处理
@@ -29,63 +24,99 @@ import java.util.stream.Collectors;
 @Service
 public class TopSysDictDataServiceImpl extends ServiceImpl<TopSysDictDataMapper, TopSysDictData> implements ITopSysDictDataService {
 
+    /**
+     * 根据条件分页查询字典数据
+     *
+     * @param dictData 字典数据信息
+     * @return 字典数据集合信息
+     */
     @Override
-    public TopSysDictDataVo queryById(Long dictCode){
-        TopSysDictData db = this.baseMapper.selectById(dictCode);
-        return BeanUtil.toBean(db, TopSysDictDataVo.class);
+    public List<TopSysDictData> selectDictDataList(TopSysDictData dictData) {
+        return list(new LambdaQueryWrapper<TopSysDictData>().eq(StrUtil.isNotBlank(dictData.getDictType()), TopSysDictData::getDictType, dictData.getDictType())
+                .like(StrUtil.isNotBlank(dictData.getDictLabel()), TopSysDictData::getDictLabel, dictData.getDictLabel())
+                .eq(StrUtil.isNotBlank(dictData.getStatus()), TopSysDictData::getStatus, dictData.getStatus())
+                .in(dictData.getStatusArray()!=null, TopSysDictData::getStatus, dictData.getStatusArray())
+                .eq(dictData.getDictTypeId()!=null, TopSysDictData::getDictTypeId, dictData.getDictTypeId())
+                .orderByAsc(TopSysDictData::getDictSort));
     }
 
+    /**
+     * 根据字典类型和字典键值查询字典数据信息
+     *
+     * @param dictType  字典类型
+     * @param dictValue 字典键值
+     * @return 字典标签
+     */
     @Override
-    public List<TopSysDictDataVo> queryList(TopSysDictDataQueryBo bo) {
-        LambdaQueryWrapper<TopSysDictData> lqw = Wrappers.lambdaQuery();
-        lqw.eq(bo.getDictSort() != null, TopSysDictData::getDictSort, bo.getDictSort());
-        lqw.eq(StrUtil.isNotBlank(bo.getDictLabel()), TopSysDictData::getDictLabel, bo.getDictLabel());
-        lqw.eq(StrUtil.isNotBlank(bo.getDictValue()), TopSysDictData::getDictValue, bo.getDictValue());
-        lqw.eq(StrUtil.isNotBlank(bo.getDictType()), TopSysDictData::getDictType, bo.getDictType());
-        lqw.eq(StrUtil.isNotBlank(bo.getCssClass()), TopSysDictData::getCssClass, bo.getCssClass());
-        lqw.eq(StrUtil.isNotBlank(bo.getListClass()), TopSysDictData::getListClass, bo.getListClass());
-        lqw.eq(StrUtil.isNotBlank(bo.getIsDefault()), TopSysDictData::getIsDefault, bo.getIsDefault());
-        lqw.eq(StrUtil.isNotBlank(bo.getStatus()), TopSysDictData::getStatus, bo.getStatus());
-        lqw.eq(bo.getDictTypeId() != null, TopSysDictData::getDictTypeId, bo.getDictTypeId());
-        lqw.orderByAsc(TopSysDictData::getDictSort);
-        return entity2Vo(this.list(lqw));
+    public String selectDictLabel(String dictType, String dictValue) {
+        return getOne(new LambdaQueryWrapper<TopSysDictData>()
+                .select(TopSysDictData::getDictLabel)
+                .eq(TopSysDictData::getDictType, dictType)
+                .eq(TopSysDictData::getDictValue, dictValue))
+                .getDictLabel();
     }
 
     /**
-    * 实体类转化成视图对象
-    *
-    * @param collection 实体类集合
-    * @return
-    */
-    private List<TopSysDictDataVo> entity2Vo(Collection<TopSysDictData> collection) {
-        List<TopSysDictDataVo> voList = collection.stream()
-                .map(any -> BeanUtil.toBean(any, TopSysDictDataVo.class))
-                .collect(Collectors.toList());
-        if (collection instanceof Page) {
-            Page<TopSysDictData> page = (Page<TopSysDictData>)collection;
-            Page<TopSysDictDataVo> pageVo = new Page<>();
-            BeanUtil.copyProperties(page,pageVo);
-            pageVo.addAll(voList);
-            voList = pageVo;
+     * 根据字典数据ID查询信息
+     *
+     * @param dictCode 字典数据ID
+     * @return 字典数据
+     */
+    @Override
+    public TopSysDictData selectDictDataById(Long dictCode) {
+        return getById(dictCode);
+    }
+
+    /**
+     * 批量删除字典数据信息
+     *
+     * @param dictCodes 需要删除的字典数据ID
+     * @return 结果
+     */
+    @Override
+    public int deleteDictDataByIds(Long[] dictCodes) {
+        int row = baseMapper.deleteBatchIds(Arrays.asList(dictCodes));
+        if (row > 0) {
+            DictUtils.clearDictCache();
         }
-        return voList;
+        return row;
     }
 
+    /**
+     * 新增保存字典数据信息
+     *
+     * @param dictData 字典数据信息
+     * @return 结果
+     */
     @Override
-    public Boolean insertByAddBo(TopSysDictDataAddBo bo) {
-        TopSysDictData add = BeanUtil.toBean(bo, TopSysDictData.class);
-        validEntityBeforeSave(add);
-        add.setCreateTime(new Date());
-        add.setUpdateTime(new Date());
-        return this.save(add);
+    public int insertDictData(TopSysDictData dictData) {
+        validEntityBeforeSave(dictData);
+        int row = baseMapper.insert(dictData);
+        if (row > 0) {
+            DictUtils.clearDictCache();
+        }
+        return row;
     }
 
+    /**
+     * 修改保存字典数据信息
+     *
+     * @param dictData 字典数据信息
+     * @return 结果
+     */
     @Override
-    public Boolean updateByEditBo(TopSysDictDataEditBo bo) {
-        TopSysDictData update = BeanUtil.toBean(bo, TopSysDictData.class);
-        validEntityBeforeSave(update);
-        update.setUpdateTime(new Date());
-        return this.updateById(update);
+    public int updateDictData(TopSysDictData dictData) {
+        if (dictData.getStatus().equals("-1")){
+            dictData.setUpdateTime(DateUtils.getNowDate());
+            int row = baseMapper.updateById(dictData);
+            return row;
+        }
+        validEntityBeforeSave(dictData);
+        int row = baseMapper.updateById(dictData);
+        if (row > 0) {
+            DictUtils.clearDictCache();
+        }
+        return row;
     }
 
     /**
@@ -95,13 +126,19 @@ public class TopSysDictDataServiceImpl extends ServiceImpl<TopSysDictDataMapper,
      */
     private void validEntityBeforeSave(TopSysDictData entity){
         //TODO 做一些数据校验,如唯一约束
+        if(checkDictValueUnique(entity)){
+            throw new CustomException("该键值已存在");
+        }
     }
 
-    @Override
-    public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
-        if(isValid){
-            //TODO 做一些业务上的校验,判断是否需要校验
+    private boolean checkDictValueUnique(TopSysDictData entity) {
+        TopSysDictData info = getOne(new LambdaQueryWrapper<TopSysDictData>()
+                .eq(TopSysDictData::getDictValue,entity.getDictValue())
+                .eq(TopSysDictData::getDictType,entity.getDictType())
+                .last("limit 1"));
+        if (Validator.isNotNull(info)) {
+            return true;
         }
-        return this.removeByIds(ids);
+        return false;
     }
 }

+ 131 - 52
zhongzheng-system/src/main/java/com/zhongzheng/modules/top/user/service/impl/TopSysDictTypeServiceImpl.java

@@ -1,23 +1,28 @@
 package com.zhongzheng.modules.top.user.service.impl;
 
 import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.lang.Validator;
 import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.github.pagehelper.Page;
-import com.zhongzheng.modules.top.user.bo.TopSysDictTypeAddBo;
-import com.zhongzheng.modules.top.user.bo.TopSysDictTypeEditBo;
-import com.zhongzheng.modules.top.user.bo.TopSysDictTypeQueryBo;
+import com.zhongzheng.common.constant.UserConstants;
+import com.zhongzheng.common.core.domain.entity.SysDictData;
+import com.zhongzheng.common.exception.CustomException;
+import com.zhongzheng.common.utils.DictUtils;
+import com.zhongzheng.modules.top.user.domain.TopSysDictData;
 import com.zhongzheng.modules.top.user.domain.TopSysDictType;
+import com.zhongzheng.modules.top.user.mapper.TopSysDictDataMapper;
 import com.zhongzheng.modules.top.user.mapper.TopSysDictTypeMapper;
 import com.zhongzheng.modules.top.user.service.ITopSysDictTypeService;
-import com.zhongzheng.modules.top.user.vo.TopSysDictTypeVo;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
-import java.util.Collection;
-import java.util.Date;
+import java.util.Arrays;
 import java.util.List;
+import java.util.Map;
 import java.util.stream.Collectors;
 
 /**
@@ -29,72 +34,146 @@ import java.util.stream.Collectors;
 @Service
 public class TopSysDictTypeServiceImpl extends ServiceImpl<TopSysDictTypeMapper, TopSysDictType> implements ITopSysDictTypeService {
 
+    @Autowired
+    private TopSysDictDataMapper dictDataMapper;
+
+    /**
+     * 根据条件分页查询字典类型
+     *
+     * @param dictType 字典类型信息
+     * @return 字典类型集合信息
+     */
     @Override
-    public TopSysDictTypeVo queryById(Long dictId){
-        TopSysDictType db = this.baseMapper.selectById(dictId);
-        return BeanUtil.toBean(db, TopSysDictTypeVo.class);
+    public List<TopSysDictType> selectDictTypeList(TopSysDictType dictType) {
+        Map<String, Object> params = dictType.getParams();
+        return list(new LambdaQueryWrapper<TopSysDictType>()
+                .like(StrUtil.isNotBlank(dictType.getDictName()),TopSysDictType::getDictName, dictType.getDictName())
+                .eq(StrUtil.isNotBlank(dictType.getStatus()),TopSysDictType::getStatus, dictType.getStatus())
+                .in(dictType.getStatusArray()!=null,TopSysDictType::getStatus, dictType.getStatusArray())
+                .like(StrUtil.isNotBlank(dictType.getDictType()),TopSysDictType::getDictType, dictType.getDictType())
+                .apply(Validator.isNotEmpty(params.get("beginTime")),
+                        "date_format(create_time,'%y%m%d') >= date_format({0},'%y%m%d')",
+                        params.get("beginTime"))
+                .apply(Validator.isNotEmpty(params.get("endTime")),
+                        "date_format(create_time,'%y%m%d') <= date_format({0},'%y%m%d')",
+                        params.get("endTime")));
     }
 
+
+    /**
+     * 根据字典类型ID查询信息
+     *
+     * @param dictId 字典类型ID
+     * @return 字典类型
+     */
     @Override
-    public List<TopSysDictTypeVo> queryList(TopSysDictTypeQueryBo bo) {
-        LambdaQueryWrapper<TopSysDictType> lqw = Wrappers.lambdaQuery();
-        lqw.like(StrUtil.isNotBlank(bo.getDictName()), TopSysDictType::getDictName, bo.getDictName());
-        lqw.eq(StrUtil.isNotBlank(bo.getDictType()), TopSysDictType::getDictType, bo.getDictType());
-        lqw.eq(StrUtil.isNotBlank(bo.getStatus()), TopSysDictType::getStatus, bo.getStatus());
-        return entity2Vo(this.list(lqw));
+    public TopSysDictType selectDictTypeById(Long dictId) {
+        return getById(dictId);
     }
 
     /**
-    * 实体类转化成视图对象
-    *
-    * @param collection 实体类集合
-    * @return
-    */
-    private List<TopSysDictTypeVo> entity2Vo(Collection<TopSysDictType> collection) {
-        List<TopSysDictTypeVo> voList = collection.stream()
-                .map(any -> BeanUtil.toBean(any, TopSysDictTypeVo.class))
-                .collect(Collectors.toList());
-        if (collection instanceof Page) {
-            Page<TopSysDictType> page = (Page<TopSysDictType>)collection;
-            Page<TopSysDictTypeVo> pageVo = new Page<>();
-            BeanUtil.copyProperties(page,pageVo);
-            pageVo.addAll(voList);
-            voList = pageVo;
+     * 批量删除字典类型信息
+     *
+     * @param dictIds 需要删除的字典ID
+     * @return 结果
+     */
+    @Override
+    public int deleteDictTypeByIds(Long[] dictIds) {
+        for (Long dictId : dictIds) {
+            TopSysDictType dictType = selectDictTypeById(dictId);
+            if (dictDataMapper.selectCount(new LambdaQueryWrapper<TopSysDictData>()
+                    .eq(TopSysDictData::getDictType, dictType.getDictType())) > 0) {
+                throw new CustomException(String.format("%1$s已分配,不能删除", dictType.getDictName()));
+            }
+        }
+        int count = baseMapper.deleteBatchIds(Arrays.asList(dictIds));
+        if (count > 0) {
+            DictUtils.clearDictCache();
         }
-        return voList;
+        return count;
     }
 
+    /**
+     * 清空缓存数据
+     */
     @Override
-    public Boolean insertByAddBo(TopSysDictTypeAddBo bo) {
-        TopSysDictType add = BeanUtil.toBean(bo, TopSysDictType.class);
-        validEntityBeforeSave(add);
-        add.setCreateTime(new Date());
-        add.setUpdateTime(new Date());
-        return this.save(add);
+    public void clearCache() {
+        DictUtils.clearDictCache();
     }
 
+    /**
+     * 新增保存字典类型信息
+     *
+     * @param dictType 字典类型信息
+     * @return 结果
+     */
     @Override
-    public Boolean updateByEditBo(TopSysDictTypeEditBo bo) {
-        TopSysDictType update = BeanUtil.toBean(bo, TopSysDictType.class);
-        validEntityBeforeSave(update);
-        update.setUpdateTime(new Date());
-        return this.updateById(update);
+    public int insertDictType(TopSysDictType dictType) {
+        int row = baseMapper.insert(dictType);
+        if (row > 0) {
+            DictUtils.clearDictCache();
+        }
+        return row;
     }
 
     /**
-     * 保存前的数据校验
+     * 根据字典类型查询字典数据
      *
-     * @param entity 实体类数据
+     * @param dictType 字典类型
+     * @return 字典数据集合信息
      */
-    private void validEntityBeforeSave(TopSysDictType entity){
-        //TODO 做一些数据校验,如唯一约束
+    @Override
+    public List<TopSysDictData> selectDictDataByType(String dictType) {
+        List<SysDictData> dictDatas = DictUtils.getTopDictCache(dictType);
+        if (CollUtil.isNotEmpty(dictDatas)) {
+            return dictDatas.stream().map(item -> BeanUtil.toBean(item,TopSysDictData.class)).collect(Collectors.toList());
+        }
+        List<TopSysDictData> dictDataList = dictDataMapper.selectList(new LambdaQueryWrapper<TopSysDictData>()
+                .eq(TopSysDictData::getStatus, 0)
+                .eq(TopSysDictData::getDictType, dictType)
+                .orderByAsc(TopSysDictData::getDictSort));
+        if (CollUtil.isNotEmpty(dictDataList)) {
+            DictUtils.setTopDictCache(dictType, dictDataList.stream().map(item -> BeanUtil.toBean(item,SysDictData.class)).collect(Collectors.toList()));
+            return dictDataList;
+        }
+        return null;
     }
 
+    /**
+     * 修改保存字典类型信息
+     *
+     * @param dictType 字典类型信息
+     * @return 结果
+     */
+    @Override
+    @Transactional
+    public int updateDictType(TopSysDictType dictType) {
+        TopSysDictType oldDict = getById(dictType.getDictId());
+        dictDataMapper.update(null, new LambdaUpdateWrapper<TopSysDictData>()
+                .set(TopSysDictData::getDictType, dictType.getDictType())
+                .eq(TopSysDictData::getDictType, oldDict.getDictType()));
+        int row = baseMapper.updateById(dictType);
+        if (row > 0) {
+            DictUtils.clearDictCache();
+        }
+        return row;
+    }
+
+    /**
+     * 校验字典类型称是否唯一
+     *
+     * @param dict 字典类型
+     * @return 结果
+     */
     @Override
-    public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
-        if(isValid){
-            //TODO 做一些业务上的校验,判断是否需要校验
+    public String checkDictTypeUnique(TopSysDictType dict) {
+        Long dictId = Validator.isNull(dict.getDictId()) ? -1L : dict.getDictId();
+        TopSysDictType dictType = getOne(new LambdaQueryWrapper<TopSysDictType>()
+                .eq(TopSysDictType::getDictType, dict.getDictType())
+                .last("limit 1"));
+        if (Validator.isNotNull(dictType) && dictType.getDictId().longValue() != dictId.longValue()) {
+            return UserConstants.NOT_UNIQUE;
         }
-        return this.removeByIds(ids);
+        return UserConstants.UNIQUE;
     }
 }

+ 2 - 3
zhongzheng-system/src/main/java/com/zhongzheng/modules/top/user/service/impl/TopSysUserServiceImpl.java

@@ -9,7 +9,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.github.pagehelper.Page;
 import com.zhongzheng.common.annotation.DataScope;
 import com.zhongzheng.common.constant.UserConstants;
-import com.zhongzheng.common.core.domain.entity.SysRole;
 import com.zhongzheng.common.core.domain.entity.TopSysUser;
 import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.modules.course.bo.CourseBusinessQueryBo;
@@ -164,7 +163,7 @@ public class TopSysUserServiceImpl extends ServiceImpl<TopSysUserMapper, TopSysU
     @DataScope(deptAlias = "d", userAlias = "u")
     public List<TopSysUser> selectUserList(TopSysUser user) {
         List<TopSysUser> sysUsers = baseMapper.selectUserList(user);
-        for (TopSysUser sysUser : sysUsers) {
+    /*    for (TopSysUser sysUser : sysUsers) {
             List<Long> testList = new ArrayList();
             for (SysRole role : sysUser.getRoles()) {
                 testList.add(role.getRoleId());
@@ -178,7 +177,7 @@ public class TopSysUserServiceImpl extends ServiceImpl<TopSysUserMapper, TopSysU
             }
 
             sysUser.setRoleIds(array);
-        }
+        }*/
         return sysUsers;
     }
 

+ 6 - 3
zhongzheng-system/src/main/java/com/zhongzheng/modules/top/user/vo/TopSysUserVo.java

@@ -1,13 +1,13 @@
 package com.zhongzheng.modules.top.user.vo;
 
-import com.zhongzheng.common.annotation.Excel;
 import com.fasterxml.jackson.annotation.JsonFormat;
-import java.util.Date;
-
+import com.zhongzheng.common.annotation.Excel;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
+import java.util.Date;
+
 
 /**
  * SAAS用户信息视图对象 mall_package
@@ -78,4 +78,7 @@ public class TopSysUserVo {
 	@ApiModelProperty("备注")
 	private String remark;
 
+	/** 用户编码 */
+	private String code;
+
 }