mirror of
				https://github.com/dromara/RuoYi-Vue-Plus.git
				synced 2025-11-04 16:23:42 +08:00 
			
		
		
		
	!282 System 相关表请求响应参数优化
* update 更新 system 相关表接口 (sys_role) 新增 Bo | Vo 类, 更改请求以及响应参数 ; * update 更新 system 相关表接口 (sys_notice, sys_post) 新增 Bo | Vo 类, 更改请求以及响应参数 ; * update 更新 system 相关表接口 (sys_menu) 新增 Bo | Vo 类, 更改请求以及响应参数 ; * update 更新 system 相关表接口 (sys_dict_data, sys_dict_type) 新增 Bo | Vo 类, 更改请求以及响应参数 ; * update 更新 system 相关表接口 (sys_config, sys_dept) 新增 Bo | Vo 类, 更改请求以及响应参数 ;
This commit is contained in:
		@@ -9,7 +9,8 @@ import com.ruoyi.common.core.domain.R;
 | 
			
		||||
import com.ruoyi.common.mybatis.core.page.TableDataInfo;
 | 
			
		||||
import com.ruoyi.common.log.enums.BusinessType;
 | 
			
		||||
import com.ruoyi.common.excel.utils.ExcelUtil;
 | 
			
		||||
import com.ruoyi.system.domain.SysConfig;
 | 
			
		||||
import com.ruoyi.system.domain.bo.SysConfigBo;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysConfigVo;
 | 
			
		||||
import com.ruoyi.system.service.ISysConfigService;
 | 
			
		||||
import lombok.RequiredArgsConstructor;
 | 
			
		||||
import org.springframework.validation.annotation.Validated;
 | 
			
		||||
@@ -36,7 +37,7 @@ public class SysConfigController extends BaseController {
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("system:config:list")
 | 
			
		||||
    @GetMapping("/list")
 | 
			
		||||
    public TableDataInfo<SysConfig> list(SysConfig config, PageQuery pageQuery) {
 | 
			
		||||
    public TableDataInfo<SysConfigVo> list(SysConfigBo config, PageQuery pageQuery) {
 | 
			
		||||
        return configService.selectPageConfigList(config, pageQuery);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -46,9 +47,9 @@ public class SysConfigController extends BaseController {
 | 
			
		||||
    @Log(title = "参数管理", businessType = BusinessType.EXPORT)
 | 
			
		||||
    @SaCheckPermission("system:config:export")
 | 
			
		||||
    @PostMapping("/export")
 | 
			
		||||
    public void export(SysConfig config, HttpServletResponse response) {
 | 
			
		||||
        List<SysConfig> list = configService.selectConfigList(config);
 | 
			
		||||
        ExcelUtil.exportExcel(list, "参数数据", SysConfig.class, response);
 | 
			
		||||
    public void export(SysConfigBo config, HttpServletResponse response) {
 | 
			
		||||
        List<SysConfigVo> list = configService.selectConfigList(config);
 | 
			
		||||
        ExcelUtil.exportExcel(list, "参数数据", SysConfigVo.class, response);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -58,7 +59,7 @@ public class SysConfigController extends BaseController {
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("system:config:query")
 | 
			
		||||
    @GetMapping(value = "/{configId}")
 | 
			
		||||
    public R<SysConfig> getInfo(@PathVariable Long configId) {
 | 
			
		||||
    public R<SysConfigVo> getInfo(@PathVariable Long configId) {
 | 
			
		||||
        return R.ok(configService.selectConfigById(configId));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -78,7 +79,7 @@ public class SysConfigController extends BaseController {
 | 
			
		||||
    @SaCheckPermission("system:config:add")
 | 
			
		||||
    @Log(title = "参数管理", businessType = BusinessType.INSERT)
 | 
			
		||||
    @PostMapping
 | 
			
		||||
    public R<Void> add(@Validated @RequestBody SysConfig config) {
 | 
			
		||||
    public R<Void> add(@Validated @RequestBody SysConfigBo config) {
 | 
			
		||||
        if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config))) {
 | 
			
		||||
            return R.fail("新增参数'" + config.getConfigName() + "'失败,参数键名已存在");
 | 
			
		||||
        }
 | 
			
		||||
@@ -92,7 +93,7 @@ public class SysConfigController extends BaseController {
 | 
			
		||||
    @SaCheckPermission("system:config:edit")
 | 
			
		||||
    @Log(title = "参数管理", businessType = BusinessType.UPDATE)
 | 
			
		||||
    @PutMapping
 | 
			
		||||
    public R<Void> edit(@Validated @RequestBody SysConfig config) {
 | 
			
		||||
    public R<Void> edit(@Validated @RequestBody SysConfigBo config) {
 | 
			
		||||
        if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config))) {
 | 
			
		||||
            return R.fail("修改参数'" + config.getConfigName() + "'失败,参数键名已存在");
 | 
			
		||||
        }
 | 
			
		||||
@@ -106,7 +107,7 @@ public class SysConfigController extends BaseController {
 | 
			
		||||
    @SaCheckPermission("system:config:edit")
 | 
			
		||||
    @Log(title = "参数管理", businessType = BusinessType.UPDATE)
 | 
			
		||||
    @PutMapping("/updateByKey")
 | 
			
		||||
    public R<Void> updateByKey(@RequestBody SysConfig config) {
 | 
			
		||||
    public R<Void> updateByKey(@RequestBody SysConfigBo config) {
 | 
			
		||||
        configService.updateConfig(config);
 | 
			
		||||
        return R.ok();
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -6,9 +6,10 @@ import com.ruoyi.common.log.annotation.Log;
 | 
			
		||||
import com.ruoyi.common.core.constant.UserConstants;
 | 
			
		||||
import com.ruoyi.common.web.core.BaseController;
 | 
			
		||||
import com.ruoyi.common.core.domain.R;
 | 
			
		||||
import com.ruoyi.system.domain.SysDept;
 | 
			
		||||
import com.ruoyi.common.log.enums.BusinessType;
 | 
			
		||||
import com.ruoyi.common.core.utils.StringUtils;
 | 
			
		||||
import com.ruoyi.system.domain.bo.SysDeptBo;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysDeptVo;
 | 
			
		||||
import com.ruoyi.system.service.ISysDeptService;
 | 
			
		||||
import lombok.RequiredArgsConstructor;
 | 
			
		||||
import org.springframework.validation.annotation.Validated;
 | 
			
		||||
@@ -34,8 +35,8 @@ public class SysDeptController extends BaseController {
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("system:dept:list")
 | 
			
		||||
    @GetMapping("/list")
 | 
			
		||||
    public R<List<SysDept>> list(SysDept dept) {
 | 
			
		||||
        List<SysDept> depts = deptService.selectDeptList(dept);
 | 
			
		||||
    public R<List<SysDeptVo>> list(SysDeptBo dept) {
 | 
			
		||||
        List<SysDeptVo> depts = deptService.selectDeptList(dept);
 | 
			
		||||
        return R.ok(depts);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -46,8 +47,8 @@ public class SysDeptController extends BaseController {
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("system:dept:list")
 | 
			
		||||
    @GetMapping("/list/exclude/{deptId}")
 | 
			
		||||
    public R<List<SysDept>> excludeChild(@PathVariable(value = "deptId", required = false) Long deptId) {
 | 
			
		||||
        List<SysDept> depts = deptService.selectDeptList(new SysDept());
 | 
			
		||||
    public R<List<SysDeptVo>> excludeChild(@PathVariable(value = "deptId", required = false) Long deptId) {
 | 
			
		||||
        List<SysDeptVo> depts = deptService.selectDeptList(new SysDeptBo());
 | 
			
		||||
        depts.removeIf(d -> d.getDeptId().equals(deptId)
 | 
			
		||||
            || ArrayUtil.contains(StringUtils.split(d.getAncestors(), ","), deptId + ""));
 | 
			
		||||
        return R.ok(depts);
 | 
			
		||||
@@ -60,7 +61,7 @@ public class SysDeptController extends BaseController {
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("system:dept:query")
 | 
			
		||||
    @GetMapping(value = "/{deptId}")
 | 
			
		||||
    public R<SysDept> getInfo(@PathVariable Long deptId) {
 | 
			
		||||
    public R<SysDeptVo> getInfo(@PathVariable Long deptId) {
 | 
			
		||||
        deptService.checkDeptDataScope(deptId);
 | 
			
		||||
        return R.ok(deptService.selectDeptById(deptId));
 | 
			
		||||
    }
 | 
			
		||||
@@ -71,7 +72,7 @@ public class SysDeptController extends BaseController {
 | 
			
		||||
    @SaCheckPermission("system:dept:add")
 | 
			
		||||
    @Log(title = "部门管理", businessType = BusinessType.INSERT)
 | 
			
		||||
    @PostMapping
 | 
			
		||||
    public R<Void> add(@Validated @RequestBody SysDept dept) {
 | 
			
		||||
    public R<Void> add(@Validated @RequestBody SysDeptBo dept) {
 | 
			
		||||
        if (UserConstants.NOT_UNIQUE.equals(deptService.checkDeptNameUnique(dept))) {
 | 
			
		||||
            return R.fail("新增部门'" + dept.getDeptName() + "'失败,部门名称已存在");
 | 
			
		||||
        }
 | 
			
		||||
@@ -84,7 +85,7 @@ public class SysDeptController extends BaseController {
 | 
			
		||||
    @SaCheckPermission("system:dept:edit")
 | 
			
		||||
    @Log(title = "部门管理", businessType = BusinessType.UPDATE)
 | 
			
		||||
    @PutMapping
 | 
			
		||||
    public R<Void> edit(@Validated @RequestBody SysDept dept) {
 | 
			
		||||
    public R<Void> edit(@Validated @RequestBody SysDeptBo dept) {
 | 
			
		||||
        Long deptId = dept.getDeptId();
 | 
			
		||||
        deptService.checkDeptDataScope(deptId);
 | 
			
		||||
        if (UserConstants.NOT_UNIQUE.equals(deptService.checkDeptNameUnique(dept))) {
 | 
			
		||||
 
 | 
			
		||||
@@ -10,6 +10,8 @@ import com.ruoyi.system.domain.SysDictData;
 | 
			
		||||
import com.ruoyi.common.mybatis.core.page.TableDataInfo;
 | 
			
		||||
import com.ruoyi.common.log.enums.BusinessType;
 | 
			
		||||
import com.ruoyi.common.excel.utils.ExcelUtil;
 | 
			
		||||
import com.ruoyi.system.domain.bo.SysDictDataBo;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysDictDataVo;
 | 
			
		||||
import com.ruoyi.system.service.ISysDictDataService;
 | 
			
		||||
import com.ruoyi.system.service.ISysDictTypeService;
 | 
			
		||||
import lombok.RequiredArgsConstructor;
 | 
			
		||||
@@ -39,7 +41,7 @@ public class SysDictDataController extends BaseController {
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("system:dict:list")
 | 
			
		||||
    @GetMapping("/list")
 | 
			
		||||
    public TableDataInfo<SysDictData> list(SysDictData dictData, PageQuery pageQuery) {
 | 
			
		||||
    public TableDataInfo<SysDictDataVo> list(SysDictDataBo dictData, PageQuery pageQuery) {
 | 
			
		||||
        return dictDataService.selectPageDictDataList(dictData, pageQuery);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -49,9 +51,9 @@ public class SysDictDataController extends BaseController {
 | 
			
		||||
    @Log(title = "字典数据", businessType = BusinessType.EXPORT)
 | 
			
		||||
    @SaCheckPermission("system:dict:export")
 | 
			
		||||
    @PostMapping("/export")
 | 
			
		||||
    public void export(SysDictData dictData, HttpServletResponse response) {
 | 
			
		||||
        List<SysDictData> list = dictDataService.selectDictDataList(dictData);
 | 
			
		||||
        ExcelUtil.exportExcel(list, "字典数据", SysDictData.class, response);
 | 
			
		||||
    public void export(SysDictDataBo dictData, HttpServletResponse response) {
 | 
			
		||||
        List<SysDictDataVo> list = dictDataService.selectDictDataList(dictData);
 | 
			
		||||
        ExcelUtil.exportExcel(list, "字典数据", SysDictDataVo.class, response);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -61,7 +63,7 @@ public class SysDictDataController extends BaseController {
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("system:dict:query")
 | 
			
		||||
    @GetMapping(value = "/{dictCode}")
 | 
			
		||||
    public R<SysDictData> getInfo(@PathVariable Long dictCode) {
 | 
			
		||||
    public R<SysDictDataVo> getInfo(@PathVariable Long dictCode) {
 | 
			
		||||
        return R.ok(dictDataService.selectDictDataById(dictCode));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -71,8 +73,8 @@ public class SysDictDataController extends BaseController {
 | 
			
		||||
     * @param dictType 字典类型
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping(value = "/type/{dictType}")
 | 
			
		||||
    public R<List<SysDictData>> dictType(@PathVariable String dictType) {
 | 
			
		||||
        List<SysDictData> data = dictTypeService.selectDictDataByType(dictType);
 | 
			
		||||
    public R<List<SysDictDataVo>> dictType(@PathVariable String dictType) {
 | 
			
		||||
        List<SysDictDataVo> data = dictTypeService.selectDictDataByType(dictType);
 | 
			
		||||
        if (ObjectUtil.isNull(data)) {
 | 
			
		||||
            data = new ArrayList<>();
 | 
			
		||||
        }
 | 
			
		||||
@@ -85,7 +87,7 @@ public class SysDictDataController extends BaseController {
 | 
			
		||||
    @SaCheckPermission("system:dict:add")
 | 
			
		||||
    @Log(title = "字典数据", businessType = BusinessType.INSERT)
 | 
			
		||||
    @PostMapping
 | 
			
		||||
    public R<Void> add(@Validated @RequestBody SysDictData dict) {
 | 
			
		||||
    public R<Void> add(@Validated @RequestBody SysDictDataBo dict) {
 | 
			
		||||
        dictDataService.insertDictData(dict);
 | 
			
		||||
        return R.ok();
 | 
			
		||||
    }
 | 
			
		||||
@@ -96,7 +98,7 @@ public class SysDictDataController extends BaseController {
 | 
			
		||||
    @SaCheckPermission("system:dict:edit")
 | 
			
		||||
    @Log(title = "字典数据", businessType = BusinessType.UPDATE)
 | 
			
		||||
    @PutMapping
 | 
			
		||||
    public R<Void> edit(@Validated @RequestBody SysDictData dict) {
 | 
			
		||||
    public R<Void> edit(@Validated @RequestBody SysDictDataBo dict) {
 | 
			
		||||
        dictDataService.updateDictData(dict);
 | 
			
		||||
        return R.ok();
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -10,6 +10,8 @@ import com.ruoyi.system.domain.SysDictType;
 | 
			
		||||
import com.ruoyi.common.mybatis.core.page.TableDataInfo;
 | 
			
		||||
import com.ruoyi.common.log.enums.BusinessType;
 | 
			
		||||
import com.ruoyi.common.excel.utils.ExcelUtil;
 | 
			
		||||
import com.ruoyi.system.domain.bo.SysDictTypeBo;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysDictTypeVo;
 | 
			
		||||
import com.ruoyi.system.service.ISysDictTypeService;
 | 
			
		||||
import lombok.RequiredArgsConstructor;
 | 
			
		||||
import org.springframework.validation.annotation.Validated;
 | 
			
		||||
@@ -36,7 +38,7 @@ public class SysDictTypeController extends BaseController {
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("system:dict:list")
 | 
			
		||||
    @GetMapping("/list")
 | 
			
		||||
    public TableDataInfo<SysDictType> list(SysDictType dictType, PageQuery pageQuery) {
 | 
			
		||||
    public TableDataInfo<SysDictTypeVo> list(SysDictTypeBo dictType, PageQuery pageQuery) {
 | 
			
		||||
        return dictTypeService.selectPageDictTypeList(dictType, pageQuery);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -46,9 +48,9 @@ public class SysDictTypeController extends BaseController {
 | 
			
		||||
    @Log(title = "字典类型", businessType = BusinessType.EXPORT)
 | 
			
		||||
    @SaCheckPermission("system:dict:export")
 | 
			
		||||
    @PostMapping("/export")
 | 
			
		||||
    public void export(SysDictType dictType, HttpServletResponse response) {
 | 
			
		||||
        List<SysDictType> list = dictTypeService.selectDictTypeList(dictType);
 | 
			
		||||
        ExcelUtil.exportExcel(list, "字典类型", SysDictType.class, response);
 | 
			
		||||
    public void export(SysDictTypeBo dictType, HttpServletResponse response) {
 | 
			
		||||
        List<SysDictTypeVo> list = dictTypeService.selectDictTypeList(dictType);
 | 
			
		||||
        ExcelUtil.exportExcel(list, "字典类型", SysDictTypeVo.class, response);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -58,7 +60,7 @@ public class SysDictTypeController extends BaseController {
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("system:dict:query")
 | 
			
		||||
    @GetMapping(value = "/{dictId}")
 | 
			
		||||
    public R<SysDictType> getInfo(@PathVariable Long dictId) {
 | 
			
		||||
    public R<SysDictTypeVo> getInfo(@PathVariable Long dictId) {
 | 
			
		||||
        return R.ok(dictTypeService.selectDictTypeById(dictId));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -68,7 +70,7 @@ public class SysDictTypeController extends BaseController {
 | 
			
		||||
    @SaCheckPermission("system:dict:add")
 | 
			
		||||
    @Log(title = "字典类型", businessType = BusinessType.INSERT)
 | 
			
		||||
    @PostMapping
 | 
			
		||||
    public R<Void> add(@Validated @RequestBody SysDictType dict) {
 | 
			
		||||
    public R<Void> add(@Validated @RequestBody SysDictTypeBo dict) {
 | 
			
		||||
        if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict))) {
 | 
			
		||||
            return R.fail("新增字典'" + dict.getDictName() + "'失败,字典类型已存在");
 | 
			
		||||
        }
 | 
			
		||||
@@ -82,7 +84,7 @@ public class SysDictTypeController extends BaseController {
 | 
			
		||||
    @SaCheckPermission("system:dict:edit")
 | 
			
		||||
    @Log(title = "字典类型", businessType = BusinessType.UPDATE)
 | 
			
		||||
    @PutMapping
 | 
			
		||||
    public R<Void> edit(@Validated @RequestBody SysDictType dict) {
 | 
			
		||||
    public R<Void> edit(@Validated @RequestBody SysDictTypeBo dict) {
 | 
			
		||||
        if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict))) {
 | 
			
		||||
            return R.fail("修改字典'" + dict.getDictName() + "'失败,字典类型已存在");
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -10,6 +10,8 @@ import com.ruoyi.common.log.annotation.Log;
 | 
			
		||||
import com.ruoyi.common.log.enums.BusinessType;
 | 
			
		||||
import com.ruoyi.common.satoken.utils.LoginHelper;
 | 
			
		||||
import com.ruoyi.system.domain.SysMenu;
 | 
			
		||||
import com.ruoyi.system.domain.bo.SysMenuBo;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysMenuVo;
 | 
			
		||||
import com.ruoyi.system.service.ISysMenuService;
 | 
			
		||||
import lombok.RequiredArgsConstructor;
 | 
			
		||||
import org.springframework.validation.annotation.Validated;
 | 
			
		||||
@@ -48,7 +50,7 @@ public class SysMenuController extends BaseController {
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("system:menu:query")
 | 
			
		||||
    @GetMapping(value = "/{menuId}")
 | 
			
		||||
    public R<SysMenu> getInfo(@PathVariable Long menuId) {
 | 
			
		||||
    public R<SysMenuVo> getInfo(@PathVariable Long menuId) {
 | 
			
		||||
        return R.ok(menuService.selectMenuById(menuId));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -81,7 +83,7 @@ public class SysMenuController extends BaseController {
 | 
			
		||||
    @SaCheckPermission("system:menu:add")
 | 
			
		||||
    @Log(title = "菜单管理", businessType = BusinessType.INSERT)
 | 
			
		||||
    @PostMapping
 | 
			
		||||
    public R<Void> add(@Validated @RequestBody SysMenu menu) {
 | 
			
		||||
    public R<Void> add(@Validated @RequestBody SysMenuBo menu) {
 | 
			
		||||
        if (UserConstants.NOT_UNIQUE.equals(menuService.checkMenuNameUnique(menu))) {
 | 
			
		||||
            return R.fail("新增菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
 | 
			
		||||
        } else if (UserConstants.YES_FRAME.equals(menu.getIsFrame()) && !StringUtils.ishttp(menu.getPath())) {
 | 
			
		||||
@@ -96,7 +98,7 @@ public class SysMenuController extends BaseController {
 | 
			
		||||
    @SaCheckPermission("system:menu:edit")
 | 
			
		||||
    @Log(title = "菜单管理", businessType = BusinessType.UPDATE)
 | 
			
		||||
    @PutMapping
 | 
			
		||||
    public R<Void> edit(@Validated @RequestBody SysMenu menu) {
 | 
			
		||||
    public R<Void> edit(@Validated @RequestBody SysMenuBo menu) {
 | 
			
		||||
        if (UserConstants.NOT_UNIQUE.equals(menuService.checkMenuNameUnique(menu))) {
 | 
			
		||||
            return R.fail("修改菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
 | 
			
		||||
        } else if (UserConstants.YES_FRAME.equals(menu.getIsFrame()) && !StringUtils.ishttp(menu.getPath())) {
 | 
			
		||||
 
 | 
			
		||||
@@ -7,7 +7,8 @@ import com.ruoyi.common.mybatis.core.page.PageQuery;
 | 
			
		||||
import com.ruoyi.common.core.domain.R;
 | 
			
		||||
import com.ruoyi.common.mybatis.core.page.TableDataInfo;
 | 
			
		||||
import com.ruoyi.common.log.enums.BusinessType;
 | 
			
		||||
import com.ruoyi.system.domain.SysNotice;
 | 
			
		||||
import com.ruoyi.system.domain.bo.SysNoticeBo;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysNoticeVo;
 | 
			
		||||
import com.ruoyi.system.service.ISysNoticeService;
 | 
			
		||||
import lombok.RequiredArgsConstructor;
 | 
			
		||||
import org.springframework.validation.annotation.Validated;
 | 
			
		||||
@@ -31,7 +32,7 @@ public class SysNoticeController extends BaseController {
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("system:notice:list")
 | 
			
		||||
    @GetMapping("/list")
 | 
			
		||||
    public TableDataInfo<SysNotice> list(SysNotice notice, PageQuery pageQuery) {
 | 
			
		||||
    public TableDataInfo<SysNoticeVo> list(SysNoticeBo notice, PageQuery pageQuery) {
 | 
			
		||||
        return noticeService.selectPageNoticeList(notice, pageQuery);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -42,7 +43,7 @@ public class SysNoticeController extends BaseController {
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("system:notice:query")
 | 
			
		||||
    @GetMapping(value = "/{noticeId}")
 | 
			
		||||
    public R<SysNotice> getInfo(@PathVariable Long noticeId) {
 | 
			
		||||
    public R<SysNoticeVo> getInfo(@PathVariable Long noticeId) {
 | 
			
		||||
        return R.ok(noticeService.selectNoticeById(noticeId));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -52,7 +53,7 @@ public class SysNoticeController extends BaseController {
 | 
			
		||||
    @SaCheckPermission("system:notice:add")
 | 
			
		||||
    @Log(title = "通知公告", businessType = BusinessType.INSERT)
 | 
			
		||||
    @PostMapping
 | 
			
		||||
    public R<Void> add(@Validated @RequestBody SysNotice notice) {
 | 
			
		||||
    public R<Void> add(@Validated @RequestBody SysNoticeBo notice) {
 | 
			
		||||
        return toAjax(noticeService.insertNotice(notice));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -62,7 +63,7 @@ public class SysNoticeController extends BaseController {
 | 
			
		||||
    @SaCheckPermission("system:notice:edit")
 | 
			
		||||
    @Log(title = "通知公告", businessType = BusinessType.UPDATE)
 | 
			
		||||
    @PutMapping
 | 
			
		||||
    public R<Void> edit(@Validated @RequestBody SysNotice notice) {
 | 
			
		||||
    public R<Void> edit(@Validated @RequestBody SysNoticeBo notice) {
 | 
			
		||||
        return toAjax(noticeService.updateNotice(notice));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,8 @@ import com.ruoyi.common.core.domain.R;
 | 
			
		||||
import com.ruoyi.common.mybatis.core.page.TableDataInfo;
 | 
			
		||||
import com.ruoyi.common.log.enums.BusinessType;
 | 
			
		||||
import com.ruoyi.common.excel.utils.ExcelUtil;
 | 
			
		||||
import com.ruoyi.system.domain.SysPost;
 | 
			
		||||
import com.ruoyi.system.domain.bo.SysPostBo;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysPostVo;
 | 
			
		||||
import com.ruoyi.system.service.ISysPostService;
 | 
			
		||||
import lombok.RequiredArgsConstructor;
 | 
			
		||||
import org.springframework.validation.annotation.Validated;
 | 
			
		||||
@@ -36,7 +37,7 @@ public class SysPostController extends BaseController {
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("system:post:list")
 | 
			
		||||
    @GetMapping("/list")
 | 
			
		||||
    public TableDataInfo<SysPost> list(SysPost post, PageQuery pageQuery) {
 | 
			
		||||
    public TableDataInfo<SysPostVo> list(SysPostBo post, PageQuery pageQuery) {
 | 
			
		||||
        return postService.selectPagePostList(post, pageQuery);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -46,9 +47,9 @@ public class SysPostController extends BaseController {
 | 
			
		||||
    @Log(title = "岗位管理", businessType = BusinessType.EXPORT)
 | 
			
		||||
    @SaCheckPermission("system:post:export")
 | 
			
		||||
    @PostMapping("/export")
 | 
			
		||||
    public void export(SysPost post, HttpServletResponse response) {
 | 
			
		||||
        List<SysPost> list = postService.selectPostList(post);
 | 
			
		||||
        ExcelUtil.exportExcel(list, "岗位数据", SysPost.class, response);
 | 
			
		||||
    public void export(SysPostBo post, HttpServletResponse response) {
 | 
			
		||||
        List<SysPostVo> list = postService.selectPostList(post);
 | 
			
		||||
        ExcelUtil.exportExcel(list, "岗位数据", SysPostVo.class, response);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -58,7 +59,7 @@ public class SysPostController extends BaseController {
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("system:post:query")
 | 
			
		||||
    @GetMapping(value = "/{postId}")
 | 
			
		||||
    public R<SysPost> getInfo(@PathVariable Long postId) {
 | 
			
		||||
    public R<SysPostVo> getInfo(@PathVariable Long postId) {
 | 
			
		||||
        return R.ok(postService.selectPostById(postId));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -68,7 +69,7 @@ public class SysPostController extends BaseController {
 | 
			
		||||
    @SaCheckPermission("system:post:add")
 | 
			
		||||
    @Log(title = "岗位管理", businessType = BusinessType.INSERT)
 | 
			
		||||
    @PostMapping
 | 
			
		||||
    public R<Void> add(@Validated @RequestBody SysPost post) {
 | 
			
		||||
    public R<Void> add(@Validated @RequestBody SysPostBo post) {
 | 
			
		||||
        if (UserConstants.NOT_UNIQUE.equals(postService.checkPostNameUnique(post))) {
 | 
			
		||||
            return R.fail("新增岗位'" + post.getPostName() + "'失败,岗位名称已存在");
 | 
			
		||||
        } else if (UserConstants.NOT_UNIQUE.equals(postService.checkPostCodeUnique(post))) {
 | 
			
		||||
@@ -83,7 +84,7 @@ public class SysPostController extends BaseController {
 | 
			
		||||
    @SaCheckPermission("system:post:edit")
 | 
			
		||||
    @Log(title = "岗位管理", businessType = BusinessType.UPDATE)
 | 
			
		||||
    @PutMapping
 | 
			
		||||
    public R<Void> edit(@Validated @RequestBody SysPost post) {
 | 
			
		||||
    public R<Void> edit(@Validated @RequestBody SysPostBo post) {
 | 
			
		||||
        if (UserConstants.NOT_UNIQUE.equals(postService.checkPostNameUnique(post))) {
 | 
			
		||||
            return R.fail("修改岗位'" + post.getPostName() + "'失败,岗位名称已存在");
 | 
			
		||||
        } else if (UserConstants.NOT_UNIQUE.equals(postService.checkPostCodeUnique(post))) {
 | 
			
		||||
@@ -108,8 +109,8 @@ public class SysPostController extends BaseController {
 | 
			
		||||
     * 获取岗位选择框列表
 | 
			
		||||
     */
 | 
			
		||||
    @GetMapping("/optionselect")
 | 
			
		||||
    public R<List<SysPost>> optionselect() {
 | 
			
		||||
        List<SysPost> posts = postService.selectPostAll();
 | 
			
		||||
    public R<List<SysPostVo>> optionselect() {
 | 
			
		||||
        List<SysPostVo> posts = postService.selectPostAll();
 | 
			
		||||
        return R.ok(posts);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -13,9 +13,10 @@ import com.ruoyi.common.mybatis.core.page.PageQuery;
 | 
			
		||||
import com.ruoyi.common.mybatis.core.page.TableDataInfo;
 | 
			
		||||
import com.ruoyi.common.satoken.utils.LoginHelper;
 | 
			
		||||
import com.ruoyi.system.domain.SysDept;
 | 
			
		||||
import com.ruoyi.system.domain.SysRole;
 | 
			
		||||
import com.ruoyi.system.domain.SysUser;
 | 
			
		||||
import com.ruoyi.system.domain.SysUserRole;
 | 
			
		||||
import com.ruoyi.system.domain.bo.SysRoleBo;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysRoleVo;
 | 
			
		||||
import com.ruoyi.system.service.ISysDeptService;
 | 
			
		||||
import com.ruoyi.system.service.ISysRoleService;
 | 
			
		||||
import com.ruoyi.system.service.ISysUserService;
 | 
			
		||||
@@ -49,7 +50,7 @@ public class SysRoleController extends BaseController {
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("system:role:list")
 | 
			
		||||
    @GetMapping("/list")
 | 
			
		||||
    public TableDataInfo<SysRole> list(SysRole role, PageQuery pageQuery) {
 | 
			
		||||
    public TableDataInfo<SysRoleVo> list(SysRoleBo role, PageQuery pageQuery) {
 | 
			
		||||
        return roleService.selectPageRoleList(role, pageQuery);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -59,9 +60,9 @@ public class SysRoleController extends BaseController {
 | 
			
		||||
    @Log(title = "角色管理", businessType = BusinessType.EXPORT)
 | 
			
		||||
    @SaCheckPermission("system:role:export")
 | 
			
		||||
    @PostMapping("/export")
 | 
			
		||||
    public void export(SysRole role, HttpServletResponse response) {
 | 
			
		||||
        List<SysRole> list = roleService.selectRoleList(role);
 | 
			
		||||
        ExcelUtil.exportExcel(list, "角色数据", SysRole.class, response);
 | 
			
		||||
    public void export(SysRoleBo role, HttpServletResponse response) {
 | 
			
		||||
        List<SysRoleVo> list = roleService.selectRoleList(role);
 | 
			
		||||
        ExcelUtil.exportExcel(list, "角色数据", SysRoleVo.class, response);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -71,7 +72,7 @@ public class SysRoleController extends BaseController {
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("system:role:query")
 | 
			
		||||
    @GetMapping(value = "/{roleId}")
 | 
			
		||||
    public R<SysRole> getInfo(@PathVariable Long roleId) {
 | 
			
		||||
    public R<SysRoleVo> getInfo(@PathVariable Long roleId) {
 | 
			
		||||
        roleService.checkRoleDataScope(roleId);
 | 
			
		||||
        return R.ok(roleService.selectRoleById(roleId));
 | 
			
		||||
    }
 | 
			
		||||
@@ -82,7 +83,7 @@ public class SysRoleController extends BaseController {
 | 
			
		||||
    @SaCheckPermission("system:role:add")
 | 
			
		||||
    @Log(title = "角色管理", businessType = BusinessType.INSERT)
 | 
			
		||||
    @PostMapping
 | 
			
		||||
    public R<Void> add(@Validated @RequestBody SysRole role) {
 | 
			
		||||
    public R<Void> add(@Validated @RequestBody SysRoleBo role) {
 | 
			
		||||
        if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role))) {
 | 
			
		||||
            return R.fail("新增角色'" + role.getRoleName() + "'失败,角色名称已存在");
 | 
			
		||||
        } else if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleKeyUnique(role))) {
 | 
			
		||||
@@ -98,7 +99,7 @@ public class SysRoleController extends BaseController {
 | 
			
		||||
    @SaCheckPermission("system:role:edit")
 | 
			
		||||
    @Log(title = "角色管理", businessType = BusinessType.UPDATE)
 | 
			
		||||
    @PutMapping
 | 
			
		||||
    public R<Void> edit(@Validated @RequestBody SysRole role) {
 | 
			
		||||
    public R<Void> edit(@Validated @RequestBody SysRoleBo role) {
 | 
			
		||||
        roleService.checkRoleAllowed(role);
 | 
			
		||||
        roleService.checkRoleDataScope(role.getRoleId());
 | 
			
		||||
        if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role))) {
 | 
			
		||||
@@ -126,7 +127,7 @@ public class SysRoleController extends BaseController {
 | 
			
		||||
    @SaCheckPermission("system:role:edit")
 | 
			
		||||
    @Log(title = "角色管理", businessType = BusinessType.UPDATE)
 | 
			
		||||
    @PutMapping("/dataScope")
 | 
			
		||||
    public R<Void> dataScope(@RequestBody SysRole role) {
 | 
			
		||||
    public R<Void> dataScope(@RequestBody SysRoleBo role) {
 | 
			
		||||
        roleService.checkRoleAllowed(role);
 | 
			
		||||
        roleService.checkRoleDataScope(role.getRoleId());
 | 
			
		||||
        return toAjax(roleService.authDataScope(role));
 | 
			
		||||
@@ -138,7 +139,7 @@ public class SysRoleController extends BaseController {
 | 
			
		||||
    @SaCheckPermission("system:role:edit")
 | 
			
		||||
    @Log(title = "角色管理", businessType = BusinessType.UPDATE)
 | 
			
		||||
    @PutMapping("/changeStatus")
 | 
			
		||||
    public R<Void> changeStatus(@RequestBody SysRole role) {
 | 
			
		||||
    public R<Void> changeStatus(@RequestBody SysRoleBo role) {
 | 
			
		||||
        roleService.checkRoleAllowed(role);
 | 
			
		||||
        roleService.checkRoleDataScope(role.getRoleId());
 | 
			
		||||
        return toAjax(roleService.updateRoleStatus(role));
 | 
			
		||||
@@ -161,7 +162,7 @@ public class SysRoleController extends BaseController {
 | 
			
		||||
     */
 | 
			
		||||
    @SaCheckPermission("system:role:query")
 | 
			
		||||
    @GetMapping("/optionselect")
 | 
			
		||||
    public R<List<SysRole>> optionselect() {
 | 
			
		||||
    public R<List<SysRoleVo>> optionselect() {
 | 
			
		||||
        return R.ok(roleService.selectRoleAll());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -21,6 +21,7 @@ import com.ruoyi.common.satoken.utils.LoginHelper;
 | 
			
		||||
import com.ruoyi.system.domain.SysDept;
 | 
			
		||||
import com.ruoyi.system.domain.SysRole;
 | 
			
		||||
import com.ruoyi.system.domain.SysUser;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysRoleVo;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysUserExportVo;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysUserImportVo;
 | 
			
		||||
import com.ruoyi.system.listener.SysUserImportListener;
 | 
			
		||||
@@ -111,7 +112,7 @@ public class SysUserController extends BaseController {
 | 
			
		||||
    public R<Map<String, Object>> getInfo(@PathVariable(value = "userId", required = false) Long userId) {
 | 
			
		||||
        userService.checkUserDataScope(userId);
 | 
			
		||||
        Map<String, Object> ajax = new HashMap<>();
 | 
			
		||||
        List<SysRole> roles = roleService.selectRoleAll();
 | 
			
		||||
        List<SysRoleVo> roles = roleService.selectRoleAll();
 | 
			
		||||
        ajax.put("roles", LoginHelper.isAdmin(userId) ? roles : StreamUtils.filter(roles, r -> !r.isAdmin()));
 | 
			
		||||
        ajax.put("posts", postService.selectPostAll());
 | 
			
		||||
        if (ObjectUtil.isNotNull(userId)) {
 | 
			
		||||
@@ -213,7 +214,7 @@ public class SysUserController extends BaseController {
 | 
			
		||||
    @GetMapping("/authRole/{userId}")
 | 
			
		||||
    public R<Map<String, Object>> authRole(@PathVariable Long userId) {
 | 
			
		||||
        SysUser user = userService.selectUserById(userId);
 | 
			
		||||
        List<SysRole> roles = roleService.selectRolesByUserId(userId);
 | 
			
		||||
        List<SysRoleVo> roles = roleService.selectRolesByUserId(userId);
 | 
			
		||||
        return R.ok(Map.of(
 | 
			
		||||
                "user", user,
 | 
			
		||||
                "roles", LoginHelper.isAdmin(userId) ? roles : StreamUtils.filter(roles, r -> !r.isAdmin())
 | 
			
		||||
 
 | 
			
		||||
@@ -1,18 +1,11 @@
 | 
			
		||||
package com.ruoyi.system.domain;
 | 
			
		||||
 | 
			
		||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 | 
			
		||||
import com.alibaba.excel.annotation.ExcelProperty;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableId;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableName;
 | 
			
		||||
import com.ruoyi.common.mybatis.core.domain.BaseEntity;
 | 
			
		||||
import com.ruoyi.common.excel.annotation.ExcelDictFormat;
 | 
			
		||||
import com.ruoyi.common.excel.convert.ExcelDictConvert;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import lombok.EqualsAndHashCode;
 | 
			
		||||
 | 
			
		||||
import jakarta.validation.constraints.NotBlank;
 | 
			
		||||
import jakarta.validation.constraints.Size;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 参数配置表 sys_config
 | 
			
		||||
 *
 | 
			
		||||
@@ -22,45 +15,32 @@ import jakarta.validation.constraints.Size;
 | 
			
		||||
@Data
 | 
			
		||||
@EqualsAndHashCode(callSuper = true)
 | 
			
		||||
@TableName("sys_config")
 | 
			
		||||
@ExcelIgnoreUnannotated
 | 
			
		||||
public class SysConfig extends BaseEntity {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 参数主键
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "参数主键")
 | 
			
		||||
    @TableId(value = "config_id")
 | 
			
		||||
    private Long configId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 参数名称
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "参数名称")
 | 
			
		||||
    @NotBlank(message = "参数名称不能为空")
 | 
			
		||||
    @Size(min = 0, max = 100, message = "参数名称不能超过{max}个字符")
 | 
			
		||||
    private String configName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 参数键名
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "参数键名")
 | 
			
		||||
    @NotBlank(message = "参数键名长度不能为空")
 | 
			
		||||
    @Size(min = 0, max = 100, message = "参数键名长度不能超过{max}个字符")
 | 
			
		||||
    private String configKey;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 参数键值
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "参数键值")
 | 
			
		||||
    @NotBlank(message = "参数键值不能为空")
 | 
			
		||||
    @Size(min = 0, max = 500, message = "参数键值长度不能超过{max}个字符")
 | 
			
		||||
    private String configValue;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 系统内置(Y是 N否)
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "系统内置", converter = ExcelDictConvert.class)
 | 
			
		||||
    @ExcelDictFormat(dictType = "sys_yes_no")
 | 
			
		||||
    private String configType;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
 
 | 
			
		||||
@@ -36,14 +36,11 @@ public class SysDept extends TreeEntity<SysDept> {
 | 
			
		||||
    /**
 | 
			
		||||
     * 部门名称
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "部门名称不能为空")
 | 
			
		||||
    @Size(min = 0, max = 30, message = "部门名称长度不能超过{max}个字符")
 | 
			
		||||
    private String deptName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 显示顺序
 | 
			
		||||
     */
 | 
			
		||||
    @NotNull(message = "显示顺序不能为空")
 | 
			
		||||
    private Integer orderNum;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -54,14 +51,11 @@ public class SysDept extends TreeEntity<SysDept> {
 | 
			
		||||
    /**
 | 
			
		||||
     * 联系电话
 | 
			
		||||
     */
 | 
			
		||||
    @Size(min = 0, max = 11, message = "联系电话长度不能超过{max}个字符")
 | 
			
		||||
    private String phone;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 邮箱
 | 
			
		||||
     */
 | 
			
		||||
    @Email(message = "邮箱格式不正确")
 | 
			
		||||
    @Size(min = 0, max = 50, message = "邮箱长度不能超过{max}个字符")
 | 
			
		||||
    private String email;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
 
 | 
			
		||||
@@ -1,19 +1,12 @@
 | 
			
		||||
package com.ruoyi.system.domain;
 | 
			
		||||
 | 
			
		||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 | 
			
		||||
import com.alibaba.excel.annotation.ExcelProperty;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableId;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableName;
 | 
			
		||||
import com.ruoyi.common.core.constant.UserConstants;
 | 
			
		||||
import com.ruoyi.common.mybatis.core.domain.BaseEntity;
 | 
			
		||||
import com.ruoyi.common.excel.annotation.ExcelDictFormat;
 | 
			
		||||
import com.ruoyi.common.excel.convert.ExcelDictConvert;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import lombok.EqualsAndHashCode;
 | 
			
		||||
 | 
			
		||||
import jakarta.validation.constraints.NotBlank;
 | 
			
		||||
import jakarta.validation.constraints.Size;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 字典数据表 sys_dict_data
 | 
			
		||||
 *
 | 
			
		||||
@@ -23,50 +16,37 @@ import jakarta.validation.constraints.Size;
 | 
			
		||||
@Data
 | 
			
		||||
@EqualsAndHashCode(callSuper = true)
 | 
			
		||||
@TableName("sys_dict_data")
 | 
			
		||||
@ExcelIgnoreUnannotated
 | 
			
		||||
public class SysDictData extends BaseEntity {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 字典编码
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "字典编码")
 | 
			
		||||
    @TableId(value = "dict_code")
 | 
			
		||||
    private Long dictCode;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 字典排序
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "字典排序")
 | 
			
		||||
    private Integer dictSort;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 字典标签
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "字典标签")
 | 
			
		||||
    @NotBlank(message = "字典标签不能为空")
 | 
			
		||||
    @Size(min = 0, max = 100, message = "字典标签长度不能超过{max}个字符")
 | 
			
		||||
    private String dictLabel;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 字典键值
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "字典键值")
 | 
			
		||||
    @NotBlank(message = "字典键值不能为空")
 | 
			
		||||
    @Size(min = 0, max = 100, message = "字典键值长度不能超过{max}个字符")
 | 
			
		||||
    private String dictValue;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 字典类型
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "字典类型")
 | 
			
		||||
    @NotBlank(message = "字典类型不能为空")
 | 
			
		||||
    @Size(min = 0, max = 100, message = "字典类型长度不能超过{max}个字符")
 | 
			
		||||
    private String dictType;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 样式属性(其他样式扩展)
 | 
			
		||||
     */
 | 
			
		||||
    @Size(min = 0, max = 100, message = "样式属性长度不能超过{max}个字符")
 | 
			
		||||
    private String cssClass;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -77,15 +57,11 @@ public class SysDictData extends BaseEntity {
 | 
			
		||||
    /**
 | 
			
		||||
     * 是否默认(Y是 N否)
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "是否默认", converter = ExcelDictConvert.class)
 | 
			
		||||
    @ExcelDictFormat(dictType = "sys_yes_no")
 | 
			
		||||
    private String isDefault;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 状态(0正常 1停用)
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
 | 
			
		||||
    @ExcelDictFormat(dictType = "sys_normal_disable")
 | 
			
		||||
    private String status;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
 
 | 
			
		||||
@@ -1,19 +1,11 @@
 | 
			
		||||
package com.ruoyi.system.domain;
 | 
			
		||||
 | 
			
		||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 | 
			
		||||
import com.alibaba.excel.annotation.ExcelProperty;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableId;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableName;
 | 
			
		||||
import com.ruoyi.common.mybatis.core.domain.BaseEntity;
 | 
			
		||||
import com.ruoyi.common.excel.annotation.ExcelDictFormat;
 | 
			
		||||
import com.ruoyi.common.excel.convert.ExcelDictConvert;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import lombok.EqualsAndHashCode;
 | 
			
		||||
 | 
			
		||||
import jakarta.validation.constraints.NotBlank;
 | 
			
		||||
import jakarta.validation.constraints.Pattern;
 | 
			
		||||
import jakarta.validation.constraints.Size;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 字典类型表 sys_dict_type
 | 
			
		||||
 *
 | 
			
		||||
@@ -23,38 +15,27 @@ import jakarta.validation.constraints.Size;
 | 
			
		||||
@Data
 | 
			
		||||
@EqualsAndHashCode(callSuper = true)
 | 
			
		||||
@TableName("sys_dict_type")
 | 
			
		||||
@ExcelIgnoreUnannotated
 | 
			
		||||
public class SysDictType extends BaseEntity {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 字典主键
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "字典主键")
 | 
			
		||||
    @TableId(value = "dict_id")
 | 
			
		||||
    private Long dictId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 字典名称
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "字典名称")
 | 
			
		||||
    @NotBlank(message = "字典名称不能为空")
 | 
			
		||||
    @Size(min = 0, max = 100, message = "字典类型名称长度不能超过{max}个字符")
 | 
			
		||||
    private String dictName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 字典类型
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "字典类型")
 | 
			
		||||
    @NotBlank(message = "字典类型不能为空")
 | 
			
		||||
    @Size(min = 0, max = 100, message = "字典类型类型长度不能超过{max}个字符")
 | 
			
		||||
    @Pattern(regexp = "^[a-z][a-z0-9_]*$", message = "字典类型必须以字母开头,且只能为(小写字母,数字,下滑线)")
 | 
			
		||||
    private String dictType;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 状态(0正常 1停用)
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
 | 
			
		||||
    @ExcelDictFormat(dictType = "sys_normal_disable")
 | 
			
		||||
    private String status;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
 
 | 
			
		||||
@@ -31,26 +31,21 @@ public class SysMenu extends TreeEntity<SysMenu> {
 | 
			
		||||
    /**
 | 
			
		||||
     * 菜单名称
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "菜单名称不能为空")
 | 
			
		||||
    @Size(min = 0, max = 50, message = "菜单名称长度不能超过{max}个字符")
 | 
			
		||||
    private String menuName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 显示顺序
 | 
			
		||||
     */
 | 
			
		||||
    @NotNull(message = "显示顺序不能为空")
 | 
			
		||||
    private Integer orderNum;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 路由地址
 | 
			
		||||
     */
 | 
			
		||||
    @Size(min = 0, max = 200, message = "路由地址不能超过{max}个字符")
 | 
			
		||||
    private String path;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 组件路径
 | 
			
		||||
     */
 | 
			
		||||
    @Size(min = 0, max = 200, message = "组件路径不能超过{max}个字符")
 | 
			
		||||
    private String component;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -71,7 +66,6 @@ public class SysMenu extends TreeEntity<SysMenu> {
 | 
			
		||||
    /**
 | 
			
		||||
     * 类型(M目录 C菜单 F按钮)
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "菜单类型不能为空")
 | 
			
		||||
    private String menuType;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -87,8 +81,6 @@ public class SysMenu extends TreeEntity<SysMenu> {
 | 
			
		||||
    /**
 | 
			
		||||
     * 权限字符串
 | 
			
		||||
     */
 | 
			
		||||
    @JsonInclude(JsonInclude.Include.NON_NULL)
 | 
			
		||||
    @Size(min = 0, max = 100, message = "权限标识长度不能超过{max}个字符")
 | 
			
		||||
    private String perms;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
 
 | 
			
		||||
@@ -3,13 +3,9 @@ package com.ruoyi.system.domain;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableId;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableName;
 | 
			
		||||
import com.ruoyi.common.mybatis.core.domain.BaseEntity;
 | 
			
		||||
import com.ruoyi.common.core.xss.Xss;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import lombok.EqualsAndHashCode;
 | 
			
		||||
 | 
			
		||||
import jakarta.validation.constraints.NotBlank;
 | 
			
		||||
import jakarta.validation.constraints.Size;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 通知公告表 sys_notice
 | 
			
		||||
@@ -30,9 +26,6 @@ public class SysNotice extends BaseEntity {
 | 
			
		||||
    /**
 | 
			
		||||
     * 公告标题
 | 
			
		||||
     */
 | 
			
		||||
    @Xss(message = "公告标题不能包含脚本字符")
 | 
			
		||||
    @NotBlank(message = "公告标题不能为空")
 | 
			
		||||
    @Size(min = 0, max = 50, message = "公告标题不能超过{max}个字符")
 | 
			
		||||
    private String noticeTitle;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
 
 | 
			
		||||
@@ -24,44 +24,32 @@ import jakarta.validation.constraints.Size;
 | 
			
		||||
@Data
 | 
			
		||||
@EqualsAndHashCode(callSuper = true)
 | 
			
		||||
@TableName("sys_post")
 | 
			
		||||
@ExcelIgnoreUnannotated
 | 
			
		||||
public class SysPost extends BaseEntity {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 岗位序号
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "岗位序号")
 | 
			
		||||
    @TableId(value = "post_id")
 | 
			
		||||
    private Long postId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 岗位编码
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "岗位编码")
 | 
			
		||||
    @NotBlank(message = "岗位编码不能为空")
 | 
			
		||||
    @Size(min = 0, max = 64, message = "岗位编码长度不能超过{max}个字符")
 | 
			
		||||
    private String postCode;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 岗位名称
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "岗位名称")
 | 
			
		||||
    @NotBlank(message = "岗位名称不能为空")
 | 
			
		||||
    @Size(min = 0, max = 50, message = "岗位名称长度不能超过{max}个字符")
 | 
			
		||||
    private String postName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 岗位排序
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "岗位排序")
 | 
			
		||||
    @NotNull(message = "显示顺序不能为空")
 | 
			
		||||
    private Integer postSort;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 状态(0正常 1停用)
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
 | 
			
		||||
    @ExcelDictFormat(dictType = "sys_normal_disable")
 | 
			
		||||
    private String status;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
 
 | 
			
		||||
@@ -1,18 +1,10 @@
 | 
			
		||||
package com.ruoyi.system.domain;
 | 
			
		||||
 | 
			
		||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 | 
			
		||||
import com.alibaba.excel.annotation.ExcelProperty;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableField;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableId;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableLogic;
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.TableName;
 | 
			
		||||
import com.ruoyi.common.core.constant.UserConstants;
 | 
			
		||||
import com.ruoyi.common.mybatis.core.domain.BaseEntity;
 | 
			
		||||
import com.ruoyi.common.excel.annotation.ExcelDictFormat;
 | 
			
		||||
import com.ruoyi.common.excel.convert.ExcelDictConvert;
 | 
			
		||||
import jakarta.validation.constraints.NotBlank;
 | 
			
		||||
import jakarta.validation.constraints.NotNull;
 | 
			
		||||
import jakarta.validation.constraints.Size;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import lombok.EqualsAndHashCode;
 | 
			
		||||
import lombok.NoArgsConstructor;
 | 
			
		||||
@@ -29,44 +21,32 @@ import java.util.Set;
 | 
			
		||||
@NoArgsConstructor
 | 
			
		||||
@EqualsAndHashCode(callSuper = true)
 | 
			
		||||
@TableName("sys_role")
 | 
			
		||||
@ExcelIgnoreUnannotated
 | 
			
		||||
public class SysRole extends BaseEntity {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 角色ID
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "角色序号")
 | 
			
		||||
    @TableId(value = "role_id")
 | 
			
		||||
    private Long roleId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 角色名称
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "角色名称")
 | 
			
		||||
    @NotBlank(message = "角色名称不能为空")
 | 
			
		||||
    @Size(min = 0, max = 30, message = "角色名称长度不能超过{max}个字符")
 | 
			
		||||
    private String roleName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 角色权限
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "角色权限")
 | 
			
		||||
    @NotBlank(message = "权限字符不能为空")
 | 
			
		||||
    @Size(min = 0, max = 100, message = "权限字符长度不能超过{max}个字符")
 | 
			
		||||
    private String roleKey;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 角色排序
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "角色排序")
 | 
			
		||||
    @NotNull(message = "显示顺序不能为空")
 | 
			
		||||
    private Integer roleSort;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限;5:仅本人数据权限)
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "数据范围", converter = ExcelDictConvert.class)
 | 
			
		||||
    @ExcelDictFormat(readConverterExp = "1=所有数据权限,2=自定义数据权限,3=本部门数据权限,4=本部门及以下数据权限,5=仅本人数据权限")
 | 
			
		||||
    private String dataScope;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -82,8 +62,6 @@ public class SysRole extends BaseEntity {
 | 
			
		||||
    /**
 | 
			
		||||
     * 角色状态(0正常 1停用)
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "角色状态", converter = ExcelDictConvert.class)
 | 
			
		||||
    @ExcelDictFormat(dictType = "sys_normal_disable")
 | 
			
		||||
    private String status;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -125,7 +103,4 @@ public class SysRole extends BaseEntity {
 | 
			
		||||
        this.roleId = roleId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public boolean isAdmin() {
 | 
			
		||||
        return UserConstants.SUPER_ADMIN_ID.equals(this.roleId);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,60 @@
 | 
			
		||||
package com.ruoyi.system.domain.bo;
 | 
			
		||||
 | 
			
		||||
import com.ruoyi.common.core.validate.AddGroup;
 | 
			
		||||
import com.ruoyi.common.core.validate.EditGroup;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import lombok.EqualsAndHashCode;
 | 
			
		||||
import jakarta.validation.constraints.*;
 | 
			
		||||
 | 
			
		||||
import com.ruoyi.common.mybatis.core.domain.BaseEntity;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 参数配置业务对象 sys_config
 | 
			
		||||
 *
 | 
			
		||||
 * @author ruoyi
 | 
			
		||||
 * @date 2023-01-31
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
@Data
 | 
			
		||||
@EqualsAndHashCode(callSuper = true)
 | 
			
		||||
public class SysConfigBo extends BaseEntity {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 参数主键
 | 
			
		||||
     */
 | 
			
		||||
    @NotNull(message = "参数主键不能为空", groups = { EditGroup.class })
 | 
			
		||||
    private Long configId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 参数名称
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "参数名称不能为空", groups = { AddGroup.class, EditGroup.class })
 | 
			
		||||
    @Size(min = 0, max = 100, message = "参数名称不能超过{max}个字符")
 | 
			
		||||
    private String configName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 参数键名
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "参数键名不能为空", groups = { AddGroup.class, EditGroup.class })
 | 
			
		||||
    @Size(min = 0, max = 100, message = "参数键名长度不能超过{max}个字符")
 | 
			
		||||
    private String configKey;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 参数键值
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "参数键值不能为空", groups = { AddGroup.class, EditGroup.class })
 | 
			
		||||
    @Size(min = 0, max = 500, message = "参数键值长度不能超过{max}个字符")
 | 
			
		||||
    private String configValue;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 系统内置(Y是 N否)
 | 
			
		||||
     */
 | 
			
		||||
    private String configType;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 备注
 | 
			
		||||
     */
 | 
			
		||||
    private String remark;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,63 @@
 | 
			
		||||
package com.ruoyi.system.domain.bo;
 | 
			
		||||
 | 
			
		||||
import com.ruoyi.common.core.validate.AddGroup;
 | 
			
		||||
import com.ruoyi.common.core.validate.EditGroup;
 | 
			
		||||
import com.ruoyi.common.mybatis.core.domain.TreeEntity;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import lombok.EqualsAndHashCode;
 | 
			
		||||
import jakarta.validation.constraints.*;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 部门业务对象 sys_dept
 | 
			
		||||
 *
 | 
			
		||||
 * @author ruoyi
 | 
			
		||||
 * @date 2023-01-31
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
@Data
 | 
			
		||||
@EqualsAndHashCode(callSuper = true)
 | 
			
		||||
public class SysDeptBo extends TreeEntity<SysDeptBo> {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 部门id
 | 
			
		||||
     */
 | 
			
		||||
    @NotNull(message = "部门id不能为空", groups = { EditGroup.class })
 | 
			
		||||
    private Long deptId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 部门名称
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "部门名称不能为空", groups = { AddGroup.class, EditGroup.class })
 | 
			
		||||
    @Size(min = 0, max = 30, message = "部门名称长度不能超过{max}个字符")
 | 
			
		||||
    private String deptName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 显示顺序
 | 
			
		||||
     */
 | 
			
		||||
    @NotNull(message = "显示顺序不能为空")
 | 
			
		||||
    private Long orderNum;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 负责人
 | 
			
		||||
     */
 | 
			
		||||
    private String leader;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 联系电话
 | 
			
		||||
     */
 | 
			
		||||
    @Size(min = 0, max = 11, message = "联系电话长度不能超过{max}个字符")
 | 
			
		||||
    private String phone;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 邮箱
 | 
			
		||||
     */
 | 
			
		||||
    @Email(message = "邮箱格式不正确")
 | 
			
		||||
    @Size(min = 0, max = 50, message = "邮箱长度不能超过{max}个字符")
 | 
			
		||||
    private String email;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 部门状态(0正常 1停用)
 | 
			
		||||
     */
 | 
			
		||||
    private String status;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,86 @@
 | 
			
		||||
package com.ruoyi.system.domain.bo;
 | 
			
		||||
 | 
			
		||||
import com.ruoyi.common.core.validate.AddGroup;
 | 
			
		||||
import com.ruoyi.common.core.validate.EditGroup;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import lombok.EqualsAndHashCode;
 | 
			
		||||
import jakarta.validation.constraints.*;
 | 
			
		||||
 | 
			
		||||
import com.ruoyi.common.mybatis.core.domain.BaseEntity;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 字典数据业务对象 sys_dict_data
 | 
			
		||||
 *
 | 
			
		||||
 * @author ruoyi
 | 
			
		||||
 * @date 2023-02-01
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
@Data
 | 
			
		||||
@EqualsAndHashCode(callSuper = true)
 | 
			
		||||
public class SysDictDataBo extends BaseEntity {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 字典编码
 | 
			
		||||
     */
 | 
			
		||||
    @NotNull(message = "字典编码不能为空", groups = { EditGroup.class })
 | 
			
		||||
    private Long dictCode;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 字典排序
 | 
			
		||||
     */
 | 
			
		||||
    private Integer dictSort;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 字典标签
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "字典标签不能为空", groups = { AddGroup.class, EditGroup.class })
 | 
			
		||||
    @Size(min = 0, max = 100, message = "字典标签长度不能超过{max}个字符")
 | 
			
		||||
    private String dictLabel;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 字典键值
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "字典键值不能为空", groups = { AddGroup.class, EditGroup.class })
 | 
			
		||||
    @Size(min = 0, max = 100, message = "字典键值长度不能超过{max}个字符")
 | 
			
		||||
    private String dictValue;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 字典类型
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "字典类型不能为空", groups = { AddGroup.class, EditGroup.class })
 | 
			
		||||
    @Size(min = 0, max = 100, message = "字典类型长度不能超过{max}个字符")
 | 
			
		||||
    private String dictType;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 样式属性(其他样式扩展)
 | 
			
		||||
     */
 | 
			
		||||
    @Size(min = 0, max = 100, message = "样式属性长度不能超过{max}个字符")
 | 
			
		||||
    private String cssClass;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 表格回显样式
 | 
			
		||||
     */
 | 
			
		||||
    private String listClass;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 是否默认(Y是 N否)
 | 
			
		||||
     */
 | 
			
		||||
    private String isDefault;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 状态(0正常 1停用)
 | 
			
		||||
     */
 | 
			
		||||
    private String status;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 创建部门
 | 
			
		||||
     */
 | 
			
		||||
    private Long createDept;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 备注
 | 
			
		||||
     */
 | 
			
		||||
    private String remark;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,59 @@
 | 
			
		||||
package com.ruoyi.system.domain.bo;
 | 
			
		||||
 | 
			
		||||
import com.ruoyi.common.core.validate.AddGroup;
 | 
			
		||||
import com.ruoyi.common.core.validate.EditGroup;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import lombok.EqualsAndHashCode;
 | 
			
		||||
import jakarta.validation.constraints.*;
 | 
			
		||||
 | 
			
		||||
import com.ruoyi.common.mybatis.core.domain.BaseEntity;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 字典类型业务对象 sys_dict_type
 | 
			
		||||
 *
 | 
			
		||||
 * @author ruoyi
 | 
			
		||||
 * @date 2023-02-01
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
@Data
 | 
			
		||||
@EqualsAndHashCode(callSuper = true)
 | 
			
		||||
public class SysDictTypeBo extends BaseEntity {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 字典主键
 | 
			
		||||
     */
 | 
			
		||||
    @NotNull(message = "字典主键不能为空", groups = { EditGroup.class })
 | 
			
		||||
    private Long dictId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 字典名称
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "字典名称不能为空", groups = { AddGroup.class, EditGroup.class })
 | 
			
		||||
    @Size(min = 0, max = 100, message = "字典类型名称长度不能超过{max}个字符")
 | 
			
		||||
    private String dictName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 字典类型
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "字典类型不能为空", groups = { AddGroup.class, EditGroup.class })
 | 
			
		||||
    @Size(min = 0, max = 100, message = "字典类型类型长度不能超过{max}个字符")
 | 
			
		||||
    @Pattern(regexp = "^[a-z][a-z0-9_]*$", message = "字典类型必须以字母开头,且只能为(小写字母,数字,下滑线)")
 | 
			
		||||
    private String dictType;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 状态(0正常 1停用)
 | 
			
		||||
     */
 | 
			
		||||
    private String status;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 创建部门
 | 
			
		||||
     */
 | 
			
		||||
    private Long createDept;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 备注
 | 
			
		||||
     */
 | 
			
		||||
    private String remark;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,106 @@
 | 
			
		||||
package com.ruoyi.system.domain.bo;
 | 
			
		||||
 | 
			
		||||
import com.fasterxml.jackson.annotation.JsonInclude;
 | 
			
		||||
import com.ruoyi.common.core.validate.AddGroup;
 | 
			
		||||
import com.ruoyi.common.core.validate.EditGroup;
 | 
			
		||||
import com.ruoyi.common.mybatis.core.domain.TreeEntity;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import lombok.EqualsAndHashCode;
 | 
			
		||||
import jakarta.validation.constraints.*;
 | 
			
		||||
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
 | 
			
		||||
import com.ruoyi.common.mybatis.core.domain.BaseEntity;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 菜单权限业务对象 sys_menu
 | 
			
		||||
 *
 | 
			
		||||
 * @author ruoyi
 | 
			
		||||
 * @date 2023-02-01
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
@Data
 | 
			
		||||
@EqualsAndHashCode(callSuper = true)
 | 
			
		||||
public class SysMenuBo extends TreeEntity<SysMenuBo> {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 菜单ID
 | 
			
		||||
     */
 | 
			
		||||
    @NotNull(message = "菜单ID不能为空", groups = { EditGroup.class })
 | 
			
		||||
    private Long menuId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 菜单名称
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "菜单名称不能为空", groups = { AddGroup.class, EditGroup.class })
 | 
			
		||||
    @Size(min = 0, max = 50, message = "菜单名称长度不能超过{max}个字符")
 | 
			
		||||
    private String menuName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 显示顺序
 | 
			
		||||
     */
 | 
			
		||||
    @NotNull(message = "显示顺序不能为空", groups = { AddGroup.class, EditGroup.class })
 | 
			
		||||
    private Integer orderNum;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 路由地址
 | 
			
		||||
     */
 | 
			
		||||
    @Size(min = 0, max = 200, message = "路由地址不能超过{max}个字符")
 | 
			
		||||
    private String path;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 组件路径
 | 
			
		||||
     */
 | 
			
		||||
    @Size(min = 0, max = 200, message = "组件路径不能超过{max}个字符")
 | 
			
		||||
    private String component;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 路由参数
 | 
			
		||||
     */
 | 
			
		||||
    private String queryParam;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 是否为外链(0是 1否)
 | 
			
		||||
     */
 | 
			
		||||
    private Integer isFrame;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 是否缓存(0缓存 1不缓存)
 | 
			
		||||
     */
 | 
			
		||||
    private Integer isCache;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 菜单类型(M目录 C菜单 F按钮)
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "菜单类型不能为空", groups = { AddGroup.class, EditGroup.class })
 | 
			
		||||
    private String menuType;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 显示状态(0显示 1隐藏)
 | 
			
		||||
     */
 | 
			
		||||
    private String visible;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 菜单状态(0正常 1停用)
 | 
			
		||||
     */
 | 
			
		||||
    private String status;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 权限标识
 | 
			
		||||
     */
 | 
			
		||||
    @JsonInclude(JsonInclude.Include.NON_NULL)
 | 
			
		||||
    @Size(min = 0, max = 100, message = "权限标识长度不能超过{max}个字符")
 | 
			
		||||
    private String perms;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 菜单图标
 | 
			
		||||
     */
 | 
			
		||||
    private String icon;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 备注
 | 
			
		||||
     */
 | 
			
		||||
    private String remark;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,60 @@
 | 
			
		||||
package com.ruoyi.system.domain.bo;
 | 
			
		||||
 | 
			
		||||
import com.ruoyi.common.core.validate.AddGroup;
 | 
			
		||||
import com.ruoyi.common.core.validate.EditGroup;
 | 
			
		||||
import com.ruoyi.common.core.xss.Xss;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import lombok.EqualsAndHashCode;
 | 
			
		||||
import jakarta.validation.constraints.*;
 | 
			
		||||
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
 | 
			
		||||
import com.ruoyi.common.mybatis.core.domain.BaseEntity;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 通知公告业务对象 sys_notice
 | 
			
		||||
 *
 | 
			
		||||
 * @author ruoyi
 | 
			
		||||
 * @date 2023-02-01
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
@Data
 | 
			
		||||
@EqualsAndHashCode(callSuper = true)
 | 
			
		||||
public class SysNoticeBo extends BaseEntity {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 公告ID
 | 
			
		||||
     */
 | 
			
		||||
    @NotNull(message = "公告ID不能为空", groups = { EditGroup.class })
 | 
			
		||||
    private Long noticeId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 公告标题
 | 
			
		||||
     */
 | 
			
		||||
    @Xss(message = "公告标题不能包含脚本字符")
 | 
			
		||||
    @NotBlank(message = "公告标题不能为空", groups = { AddGroup.class, EditGroup.class })
 | 
			
		||||
    @Size(min = 0, max = 50, message = "公告标题不能超过{max}个字符")
 | 
			
		||||
    private String noticeTitle;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 公告类型(1通知 2公告)
 | 
			
		||||
     */
 | 
			
		||||
    private String noticeType;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 公告内容
 | 
			
		||||
     */
 | 
			
		||||
    private String noticeContent;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 公告状态(0正常 1关闭)
 | 
			
		||||
     */
 | 
			
		||||
    private String status;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 备注
 | 
			
		||||
     */
 | 
			
		||||
    private String remark;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,61 @@
 | 
			
		||||
package com.ruoyi.system.domain.bo;
 | 
			
		||||
 | 
			
		||||
import com.ruoyi.common.core.validate.AddGroup;
 | 
			
		||||
import com.ruoyi.common.core.validate.EditGroup;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import lombok.EqualsAndHashCode;
 | 
			
		||||
import jakarta.validation.constraints.*;
 | 
			
		||||
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
 | 
			
		||||
import com.ruoyi.common.mybatis.core.domain.BaseEntity;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 岗位信息业务对象 sys_post
 | 
			
		||||
 *
 | 
			
		||||
 * @author ruoyi
 | 
			
		||||
 * @date 2023-02-01
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
@Data
 | 
			
		||||
@EqualsAndHashCode(callSuper = true)
 | 
			
		||||
public class SysPostBo extends BaseEntity {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 岗位ID
 | 
			
		||||
     */
 | 
			
		||||
    @NotNull(message = "岗位ID不能为空", groups = { EditGroup.class })
 | 
			
		||||
    private Long postId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 岗位编码
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "岗位编码不能为空", groups = { AddGroup.class, EditGroup.class })
 | 
			
		||||
    @Size(min = 0, max = 64, message = "岗位编码长度不能超过{max}个字符")
 | 
			
		||||
    private String postCode;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 岗位名称
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "岗位名称不能为空", groups = { AddGroup.class, EditGroup.class })
 | 
			
		||||
    @Size(min = 0, max = 50, message = "岗位名称长度不能超过{max}个字符")
 | 
			
		||||
    private String postName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 显示顺序
 | 
			
		||||
     */
 | 
			
		||||
    @NotNull(message = "显示顺序不能为空", groups = { AddGroup.class, EditGroup.class })
 | 
			
		||||
    private Integer postSort;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 状态(0正常 1停用)
 | 
			
		||||
     */
 | 
			
		||||
    private String status;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 备注
 | 
			
		||||
     */
 | 
			
		||||
    private String remark;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,84 @@
 | 
			
		||||
package com.ruoyi.system.domain.bo;
 | 
			
		||||
 | 
			
		||||
import com.ruoyi.common.core.constant.UserConstants;
 | 
			
		||||
import com.ruoyi.common.core.validate.AddGroup;
 | 
			
		||||
import com.ruoyi.common.core.validate.EditGroup;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import lombok.EqualsAndHashCode;
 | 
			
		||||
import jakarta.validation.constraints.*;
 | 
			
		||||
 | 
			
		||||
import com.ruoyi.common.mybatis.core.domain.BaseEntity;
 | 
			
		||||
import lombok.NoArgsConstructor;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 角色信息业务对象 sys_role
 | 
			
		||||
 *
 | 
			
		||||
 * @author ruoyi
 | 
			
		||||
 * @date 2023-02-01
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
@Data
 | 
			
		||||
@NoArgsConstructor
 | 
			
		||||
@EqualsAndHashCode(callSuper = true)
 | 
			
		||||
public class SysRoleBo extends BaseEntity {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 角色ID
 | 
			
		||||
     */
 | 
			
		||||
    @NotNull(message = "角色ID不能为空", groups = { EditGroup.class })
 | 
			
		||||
    private Long roleId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 角色名称
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "角色名称不能为空", groups = { AddGroup.class, EditGroup.class })
 | 
			
		||||
    @Size(min = 0, max = 30, message = "角色名称长度不能超过{max}个字符")
 | 
			
		||||
    private String roleName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 角色权限字符串
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "角色权限字符串不能为空", groups = { AddGroup.class, EditGroup.class })
 | 
			
		||||
    @Size(min = 0, max = 100, message = "权限字符长度不能超过{max}个字符")
 | 
			
		||||
    private String roleKey;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 显示顺序
 | 
			
		||||
     */
 | 
			
		||||
    @NotNull(message = "显示顺序不能为空", groups = { AddGroup.class, EditGroup.class })
 | 
			
		||||
    private Integer roleSort;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)
 | 
			
		||||
     */
 | 
			
		||||
    private String dataScope;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 菜单树选择项是否关联显示
 | 
			
		||||
     */
 | 
			
		||||
    private Boolean menuCheckStrictly;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 部门树选择项是否关联显示
 | 
			
		||||
     */
 | 
			
		||||
    private Boolean deptCheckStrictly;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 角色状态(0正常 1停用)
 | 
			
		||||
     */
 | 
			
		||||
    private String status;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 备注
 | 
			
		||||
     */
 | 
			
		||||
    private String remark;
 | 
			
		||||
 | 
			
		||||
    public SysRoleBo(Long roleId) {
 | 
			
		||||
        this.roleId = roleId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public boolean isAdmin() {
 | 
			
		||||
        return UserConstants.SUPER_ADMIN_ID.equals(this.roleId);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,127 @@
 | 
			
		||||
package com.ruoyi.system.domain.bo;
 | 
			
		||||
 | 
			
		||||
import com.ruoyi.common.core.constant.UserConstants;
 | 
			
		||||
import com.ruoyi.common.core.validate.AddGroup;
 | 
			
		||||
import com.ruoyi.common.core.validate.EditGroup;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
import lombok.EqualsAndHashCode;
 | 
			
		||||
import jakarta.validation.constraints.*;
 | 
			
		||||
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
 | 
			
		||||
import com.ruoyi.common.mybatis.core.domain.BaseEntity;
 | 
			
		||||
import lombok.NoArgsConstructor;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 用户信息业务对象 sys_user
 | 
			
		||||
 *
 | 
			
		||||
 * @author ruoyi
 | 
			
		||||
 * @date 2023-02-01
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
@Data
 | 
			
		||||
@NoArgsConstructor
 | 
			
		||||
@EqualsAndHashCode(callSuper = true)
 | 
			
		||||
public class SysUserBo extends BaseEntity {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 用户ID
 | 
			
		||||
     */
 | 
			
		||||
    @NotNull(message = "用户ID不能为空", groups = { EditGroup.class })
 | 
			
		||||
    private Long userId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 部门ID
 | 
			
		||||
     */
 | 
			
		||||
    private Long deptId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 用户账号
 | 
			
		||||
     */
 | 
			
		||||
    @NotBlank(message = "用户账号不能为空", groups = { AddGroup.class, EditGroup.class })
 | 
			
		||||
    private String userName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 用户昵称
 | 
			
		||||
     */
 | 
			
		||||
    private String nickName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 用户类型(sys_user系统用户)
 | 
			
		||||
     */
 | 
			
		||||
    private String userType;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 用户邮箱
 | 
			
		||||
     */
 | 
			
		||||
    private String email;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 手机号码
 | 
			
		||||
     */
 | 
			
		||||
    private String phonenumber;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 用户性别(0男 1女 2未知)
 | 
			
		||||
     */
 | 
			
		||||
    private String sex;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 头像地址
 | 
			
		||||
     */
 | 
			
		||||
    private String avatar;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 密码
 | 
			
		||||
     */
 | 
			
		||||
    private String password;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 帐号状态(0正常 1停用)
 | 
			
		||||
     */
 | 
			
		||||
    private String status;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 最后登录IP
 | 
			
		||||
     */
 | 
			
		||||
    private String loginIp;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 最后登录时间
 | 
			
		||||
     */
 | 
			
		||||
    private Date loginDate;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 创建部门
 | 
			
		||||
     */
 | 
			
		||||
    private Long createDept;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 备注
 | 
			
		||||
     */
 | 
			
		||||
    private String remark;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 角色组
 | 
			
		||||
     */
 | 
			
		||||
    private Long[] roleIds;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 岗位组
 | 
			
		||||
     */
 | 
			
		||||
    private Long[] postIds;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 数据权限 当前角色ID
 | 
			
		||||
     */
 | 
			
		||||
    private Long roleId;
 | 
			
		||||
 | 
			
		||||
    public SysUserBo(Long userId) {
 | 
			
		||||
        this.userId = userId;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public boolean isAdmin() {
 | 
			
		||||
        return UserConstants.SUPER_ADMIN_ID.equals(this.userId);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,70 @@
 | 
			
		||||
package com.ruoyi.system.domain.vo;
 | 
			
		||||
 | 
			
		||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 | 
			
		||||
import com.alibaba.excel.annotation.ExcelProperty;
 | 
			
		||||
import com.ruoyi.common.excel.annotation.ExcelDictFormat;
 | 
			
		||||
import com.ruoyi.common.excel.convert.ExcelDictConvert;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 参数配置视图对象 sys_config
 | 
			
		||||
 *
 | 
			
		||||
 * @author ruoyi
 | 
			
		||||
 * @date 2023-01-31
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@ExcelIgnoreUnannotated
 | 
			
		||||
public class SysConfigVo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 参数主键
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "参数主键")
 | 
			
		||||
    private Long configId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 参数名称
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "参数名称")
 | 
			
		||||
    private String configName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 参数键名
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "参数键名")
 | 
			
		||||
    private String configKey;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 参数键值
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "参数键值")
 | 
			
		||||
    private String configValue;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 系统内置(Y是 N否)
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "系统内置", converter = ExcelDictConvert.class)
 | 
			
		||||
    @ExcelDictFormat(dictType = "sys_yes_no")
 | 
			
		||||
    private String configType;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 备注
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "备注")
 | 
			
		||||
    private String remark;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 创建时间
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "创建时间")
 | 
			
		||||
    private Date createTime;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,89 @@
 | 
			
		||||
package com.ruoyi.system.domain.vo;
 | 
			
		||||
 | 
			
		||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 | 
			
		||||
import com.alibaba.excel.annotation.ExcelProperty;
 | 
			
		||||
import com.ruoyi.common.excel.annotation.ExcelDictFormat;
 | 
			
		||||
import com.ruoyi.common.excel.convert.ExcelDictConvert;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 部门视图对象 sys_dept
 | 
			
		||||
 *
 | 
			
		||||
 * @author ruoyi
 | 
			
		||||
 * @date 2023-01-31
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@ExcelIgnoreUnannotated
 | 
			
		||||
public class SysDeptVo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 部门id
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "部门id")
 | 
			
		||||
    private Long deptId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 父部门id
 | 
			
		||||
     */
 | 
			
		||||
    private Long parentId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 父部门名称
 | 
			
		||||
     */
 | 
			
		||||
    private String parentName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 祖级列表
 | 
			
		||||
     */
 | 
			
		||||
    private String ancestors;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 部门名称
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "部门名称")
 | 
			
		||||
    private String deptName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 显示顺序
 | 
			
		||||
     */
 | 
			
		||||
    private Long orderNum;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 负责人
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "负责人")
 | 
			
		||||
    private String leader;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 联系电话
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "联系电话")
 | 
			
		||||
    private String phone;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 邮箱
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "邮箱")
 | 
			
		||||
    private String email;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 部门状态(0正常 1停用)
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "部门状态", converter = ExcelDictConvert.class)
 | 
			
		||||
    @ExcelDictFormat(dictType = "sys_normal_disable")
 | 
			
		||||
    private String status;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 创建时间
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "创建时间")
 | 
			
		||||
    private Date createTime;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,93 @@
 | 
			
		||||
package com.ruoyi.system.domain.vo;
 | 
			
		||||
 | 
			
		||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 | 
			
		||||
import com.alibaba.excel.annotation.ExcelProperty;
 | 
			
		||||
import com.ruoyi.common.excel.annotation.ExcelDictFormat;
 | 
			
		||||
import com.ruoyi.common.excel.convert.ExcelDictConvert;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 字典数据视图对象 sys_dict_data
 | 
			
		||||
 *
 | 
			
		||||
 * @author ruoyi
 | 
			
		||||
 * @date 2023-02-01
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@ExcelIgnoreUnannotated
 | 
			
		||||
public class SysDictDataVo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 字典编码
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "字典编码")
 | 
			
		||||
    private Long dictCode;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 字典排序
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "字典排序")
 | 
			
		||||
    private Integer dictSort;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 字典标签
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "字典标签")
 | 
			
		||||
    private String dictLabel;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 字典键值
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "字典键值")
 | 
			
		||||
    private String dictValue;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 字典类型
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "字典类型")
 | 
			
		||||
    private String dictType;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 样式属性(其他样式扩展)
 | 
			
		||||
     */
 | 
			
		||||
    private String cssClass;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 表格回显样式
 | 
			
		||||
     */
 | 
			
		||||
    private String listClass;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 是否默认(Y是 N否)
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "是否默认", converter = ExcelDictConvert.class)
 | 
			
		||||
    @ExcelDictFormat(dictType = "sys_yes_no")
 | 
			
		||||
    private String isDefault;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 状态(0正常 1停用)
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
 | 
			
		||||
    @ExcelDictFormat(dictType = "sys_normal_disable")
 | 
			
		||||
    private String status;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 备注
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "备注")
 | 
			
		||||
    private String remark;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 创建时间
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "创建时间")
 | 
			
		||||
    private Date createTime;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,64 @@
 | 
			
		||||
package com.ruoyi.system.domain.vo;
 | 
			
		||||
 | 
			
		||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 | 
			
		||||
import com.alibaba.excel.annotation.ExcelProperty;
 | 
			
		||||
import com.ruoyi.common.excel.annotation.ExcelDictFormat;
 | 
			
		||||
import com.ruoyi.common.excel.convert.ExcelDictConvert;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 字典类型视图对象 sys_dict_type
 | 
			
		||||
 *
 | 
			
		||||
 * @author ruoyi
 | 
			
		||||
 * @date 2023-02-01
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@ExcelIgnoreUnannotated
 | 
			
		||||
public class SysDictTypeVo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 字典主键
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "字典主键")
 | 
			
		||||
    private Long dictId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 字典名称
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "字典名称")
 | 
			
		||||
    private String dictName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 字典类型
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "字典类型")
 | 
			
		||||
    private String dictType;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 状态(0正常 1停用)
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
 | 
			
		||||
    @ExcelDictFormat(dictType = "sys_normal_disable")
 | 
			
		||||
    private String status;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 备注
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "备注")
 | 
			
		||||
    private String remark;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 创建时间
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "创建时间")
 | 
			
		||||
    private Date createTime;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,108 @@
 | 
			
		||||
package com.ruoyi.system.domain.vo;
 | 
			
		||||
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 菜单权限视图对象 sys_menu
 | 
			
		||||
 *
 | 
			
		||||
 * @author ruoyi
 | 
			
		||||
 * @date 2023-02-01
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class SysMenuVo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 菜单ID
 | 
			
		||||
     */
 | 
			
		||||
    private Long menuId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 菜单名称
 | 
			
		||||
     */
 | 
			
		||||
    private String menuName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 父菜单ID
 | 
			
		||||
     */
 | 
			
		||||
    private Long parentId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 显示顺序
 | 
			
		||||
     */
 | 
			
		||||
    private Integer orderNum;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 路由地址
 | 
			
		||||
     */
 | 
			
		||||
    private String path;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 组件路径
 | 
			
		||||
     */
 | 
			
		||||
    private String component;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 路由参数
 | 
			
		||||
     */
 | 
			
		||||
    private String queryParam;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 是否为外链(0是 1否)
 | 
			
		||||
     */
 | 
			
		||||
    private String isFrame;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 是否缓存(0缓存 1不缓存)
 | 
			
		||||
     */
 | 
			
		||||
    private String isCache;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 菜单类型(M目录 C菜单 F按钮)
 | 
			
		||||
     */
 | 
			
		||||
    private String menuType;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 显示状态(0显示 1隐藏)
 | 
			
		||||
     */
 | 
			
		||||
    private String visible;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 菜单状态(0正常 1停用)
 | 
			
		||||
     */
 | 
			
		||||
    private String status;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 权限标识
 | 
			
		||||
     */
 | 
			
		||||
    private String perms;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 菜单图标
 | 
			
		||||
     */
 | 
			
		||||
    private String icon;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 创建部门
 | 
			
		||||
     */
 | 
			
		||||
    private Long createDept;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 备注
 | 
			
		||||
     */
 | 
			
		||||
    private String remark;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 创建时间
 | 
			
		||||
     */
 | 
			
		||||
    private Date createTime;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,70 @@
 | 
			
		||||
package com.ruoyi.system.domain.vo;
 | 
			
		||||
 | 
			
		||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 | 
			
		||||
import com.alibaba.excel.annotation.ExcelProperty;
 | 
			
		||||
import com.ruoyi.common.excel.annotation.ExcelDictFormat;
 | 
			
		||||
import com.ruoyi.common.excel.convert.ExcelDictConvert;
 | 
			
		||||
import com.ruoyi.common.translation.annotation.Translation;
 | 
			
		||||
import com.ruoyi.common.translation.constant.TransConstant;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 通知公告视图对象 sys_notice
 | 
			
		||||
 *
 | 
			
		||||
 * @author ruoyi
 | 
			
		||||
 * @date 2023-02-01
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class SysNoticeVo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 公告ID
 | 
			
		||||
     */
 | 
			
		||||
    private Long noticeId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 公告标题
 | 
			
		||||
     */
 | 
			
		||||
    private String noticeTitle;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 公告类型(1通知 2公告)
 | 
			
		||||
     */
 | 
			
		||||
    private String noticeType;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 公告内容
 | 
			
		||||
     */
 | 
			
		||||
    private String noticeContent;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 公告状态(0正常 1关闭)
 | 
			
		||||
     */
 | 
			
		||||
    private String status;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 备注
 | 
			
		||||
     */
 | 
			
		||||
    private String remark;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 创建者
 | 
			
		||||
     */
 | 
			
		||||
    @Translation(type = TransConstant.USER_ID_TO_NAME)
 | 
			
		||||
    private Long createBy;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 创建时间
 | 
			
		||||
     */
 | 
			
		||||
    private Date createTime;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,71 @@
 | 
			
		||||
package com.ruoyi.system.domain.vo;
 | 
			
		||||
 | 
			
		||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 | 
			
		||||
import com.alibaba.excel.annotation.ExcelProperty;
 | 
			
		||||
import com.ruoyi.common.excel.annotation.ExcelDictFormat;
 | 
			
		||||
import com.ruoyi.common.excel.convert.ExcelDictConvert;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 岗位信息视图对象 sys_post
 | 
			
		||||
 *
 | 
			
		||||
 * @author ruoyi
 | 
			
		||||
 * @date 2023-02-01
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@ExcelIgnoreUnannotated
 | 
			
		||||
public class SysPostVo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 岗位ID
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "岗位序号")
 | 
			
		||||
    private Long postId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 岗位编码
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "岗位编码")
 | 
			
		||||
    private String postCode;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 岗位名称
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "岗位名称")
 | 
			
		||||
    private String postName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 显示顺序
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "岗位排序")
 | 
			
		||||
    private Integer postSort;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 状态(0正常 1停用)
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
 | 
			
		||||
    @ExcelDictFormat(dictType = "sys_normal_disable")
 | 
			
		||||
    private String status;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 备注
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "备注")
 | 
			
		||||
    private String remark;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 创建时间
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "创建时间")
 | 
			
		||||
    private Date createTime;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,104 @@
 | 
			
		||||
package com.ruoyi.system.domain.vo;
 | 
			
		||||
 | 
			
		||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
 | 
			
		||||
import com.alibaba.excel.annotation.ExcelProperty;
 | 
			
		||||
import com.ruoyi.common.core.constant.UserConstants;
 | 
			
		||||
import com.ruoyi.common.excel.annotation.ExcelDictFormat;
 | 
			
		||||
import com.ruoyi.common.excel.convert.ExcelDictConvert;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
import java.util.Set;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 角色信息视图对象 sys_role
 | 
			
		||||
 *
 | 
			
		||||
 * @author ruoyi
 | 
			
		||||
 * @date 2023-02-01
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
@ExcelIgnoreUnannotated
 | 
			
		||||
public class SysRoleVo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 角色ID
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "角色序号")
 | 
			
		||||
    private Long roleId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 角色名称
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "角色名称")
 | 
			
		||||
    private String roleName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 角色权限字符串
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "角色权限")
 | 
			
		||||
    private String roleKey;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 显示顺序
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "角色排序")
 | 
			
		||||
    private Integer roleSort;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "数据范围", converter = ExcelDictConvert.class)
 | 
			
		||||
    @ExcelDictFormat(readConverterExp = "1=所有数据权限,2=自定义数据权限,3=本部门数据权限,4=本部门及以下数据权限,5=仅本人数据权限")
 | 
			
		||||
    private String dataScope;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 菜单树选择项是否关联显示
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "菜单树选择项是否关联显示")
 | 
			
		||||
    private Boolean menuCheckStrictly;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 部门树选择项是否关联显示
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "部门树选择项是否关联显示")
 | 
			
		||||
    private Boolean deptCheckStrictly;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 角色状态(0正常 1停用)
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "角色状态", converter = ExcelDictConvert.class)
 | 
			
		||||
    @ExcelDictFormat(dictType = "sys_normal_disable")
 | 
			
		||||
    private String status;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 备注
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "备注")
 | 
			
		||||
    private String remark;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 创建时间
 | 
			
		||||
     */
 | 
			
		||||
    @ExcelProperty(value = "创建时间")
 | 
			
		||||
    private Date createTime;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 用户是否存在此角色标识 默认不存在
 | 
			
		||||
     */
 | 
			
		||||
    private boolean flag = false;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 角色菜单权限
 | 
			
		||||
     */
 | 
			
		||||
    private Set<String> permissions;
 | 
			
		||||
 | 
			
		||||
    public boolean isAdmin() {
 | 
			
		||||
        return UserConstants.SUPER_ADMIN_ID.equals(this.roleId);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -0,0 +1,128 @@
 | 
			
		||||
package com.ruoyi.system.domain.vo;
 | 
			
		||||
 | 
			
		||||
import com.ruoyi.common.core.constant.UserConstants;
 | 
			
		||||
import lombok.Data;
 | 
			
		||||
 | 
			
		||||
import java.io.Serial;
 | 
			
		||||
import java.io.Serializable;
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 用户信息视图对象 sys_user
 | 
			
		||||
 *
 | 
			
		||||
 * @author ruoyi
 | 
			
		||||
 * @date 2023-02-01
 | 
			
		||||
 */
 | 
			
		||||
@Data
 | 
			
		||||
public class SysUserVo implements Serializable {
 | 
			
		||||
 | 
			
		||||
    @Serial
 | 
			
		||||
    private static final long serialVersionUID = 1L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 用户ID
 | 
			
		||||
     */
 | 
			
		||||
    private Long userId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 部门ID
 | 
			
		||||
     */
 | 
			
		||||
    private Long deptId;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 用户账号
 | 
			
		||||
     */
 | 
			
		||||
    private String userName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 用户昵称
 | 
			
		||||
     */
 | 
			
		||||
    private String nickName;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 用户类型(sys_user系统用户)
 | 
			
		||||
     */
 | 
			
		||||
    private String userType;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 用户邮箱
 | 
			
		||||
     */
 | 
			
		||||
    private String email;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 手机号码
 | 
			
		||||
     */
 | 
			
		||||
    private String phonenumber;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 用户性别(0男 1女 2未知)
 | 
			
		||||
     */
 | 
			
		||||
    private String sex;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 头像地址
 | 
			
		||||
     */
 | 
			
		||||
    private String avatar;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 密码
 | 
			
		||||
     */
 | 
			
		||||
    private String password;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 帐号状态(0正常 1停用)
 | 
			
		||||
     */
 | 
			
		||||
    private String status;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 最后登录IP
 | 
			
		||||
     */
 | 
			
		||||
    private String loginIp;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 最后登录时间
 | 
			
		||||
     */
 | 
			
		||||
    private Date loginDate;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 备注
 | 
			
		||||
     */
 | 
			
		||||
    private String remark;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 创建时间
 | 
			
		||||
     */
 | 
			
		||||
    private Date createTime;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 部门对象
 | 
			
		||||
     */
 | 
			
		||||
    private SysDeptVo dept;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 角色对象
 | 
			
		||||
     */
 | 
			
		||||
    private List<SysRoleVo> roles;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 角色组
 | 
			
		||||
     */
 | 
			
		||||
    private Long[] roleIds;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 岗位组
 | 
			
		||||
     */
 | 
			
		||||
    private Long[] postIds;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 数据权限 当前角色ID
 | 
			
		||||
     */
 | 
			
		||||
    private Long roleId;
 | 
			
		||||
 | 
			
		||||
    public boolean isAdmin() {
 | 
			
		||||
        return UserConstants.SUPER_ADMIN_ID.equals(this.userId);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -2,12 +2,13 @@ package com.ruoyi.system.mapper;
 | 
			
		||||
 | 
			
		||||
import com.ruoyi.common.mybatis.core.mapper.BaseMapperPlus;
 | 
			
		||||
import com.ruoyi.system.domain.SysConfig;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysConfigVo;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 参数配置 数据层
 | 
			
		||||
 *
 | 
			
		||||
 * @author Lion Li
 | 
			
		||||
 */
 | 
			
		||||
public interface SysConfigMapper extends BaseMapperPlus<SysConfigMapper, SysConfig, SysConfig> {
 | 
			
		||||
public interface SysConfigMapper extends BaseMapperPlus<SysConfigMapper, SysConfig, SysConfigVo> {
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -6,6 +6,7 @@ import com.ruoyi.common.mybatis.annotation.DataColumn;
 | 
			
		||||
import com.ruoyi.common.mybatis.annotation.DataPermission;
 | 
			
		||||
import com.ruoyi.common.mybatis.core.mapper.BaseMapperPlus;
 | 
			
		||||
import com.ruoyi.system.domain.SysDept;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysDeptVo;
 | 
			
		||||
import org.apache.ibatis.annotations.Param;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
@@ -15,7 +16,7 @@ import java.util.List;
 | 
			
		||||
 *
 | 
			
		||||
 * @author Lion Li
 | 
			
		||||
 */
 | 
			
		||||
public interface SysDeptMapper extends BaseMapperPlus<SysDeptMapper, SysDept, SysDept> {
 | 
			
		||||
public interface SysDeptMapper extends BaseMapperPlus<SysDeptMapper, SysDept, SysDeptVo> {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询部门管理数据
 | 
			
		||||
@@ -26,7 +27,7 @@ public interface SysDeptMapper extends BaseMapperPlus<SysDeptMapper, SysDept, Sy
 | 
			
		||||
    @DataPermission({
 | 
			
		||||
        @DataColumn(key = "deptName", value = "dept_id")
 | 
			
		||||
    })
 | 
			
		||||
    List<SysDept> selectDeptList(@Param(Constants.WRAPPER) Wrapper<SysDept> queryWrapper);
 | 
			
		||||
    List<SysDeptVo> selectDeptList(@Param(Constants.WRAPPER) Wrapper<SysDept> queryWrapper);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 根据角色ID查询部门树信息
 | 
			
		||||
 
 | 
			
		||||
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 | 
			
		||||
import com.ruoyi.common.core.constant.UserConstants;
 | 
			
		||||
import com.ruoyi.system.domain.SysDictData;
 | 
			
		||||
import com.ruoyi.common.mybatis.core.mapper.BaseMapperPlus;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysDictDataVo;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
@@ -12,10 +13,10 @@ import java.util.List;
 | 
			
		||||
 *
 | 
			
		||||
 * @author Lion Li
 | 
			
		||||
 */
 | 
			
		||||
public interface SysDictDataMapper extends BaseMapperPlus<SysDictDataMapper, SysDictData, SysDictData> {
 | 
			
		||||
public interface SysDictDataMapper extends BaseMapperPlus<SysDictDataMapper, SysDictData, SysDictDataVo> {
 | 
			
		||||
 | 
			
		||||
    default List<SysDictData> selectDictDataByType(String dictType) {
 | 
			
		||||
        return selectList(
 | 
			
		||||
    default List<SysDictDataVo> selectDictDataByType(String dictType) {
 | 
			
		||||
        return selectVoList(
 | 
			
		||||
            new LambdaQueryWrapper<SysDictData>()
 | 
			
		||||
                .eq(SysDictData::getStatus, UserConstants.DICT_NORMAL)
 | 
			
		||||
                .eq(SysDictData::getDictType, dictType)
 | 
			
		||||
 
 | 
			
		||||
@@ -2,12 +2,13 @@ package com.ruoyi.system.mapper;
 | 
			
		||||
 | 
			
		||||
import com.ruoyi.system.domain.SysDictType;
 | 
			
		||||
import com.ruoyi.common.mybatis.core.mapper.BaseMapperPlus;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysDictTypeVo;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 字典表 数据层
 | 
			
		||||
 *
 | 
			
		||||
 * @author Lion Li
 | 
			
		||||
 */
 | 
			
		||||
public interface SysDictTypeMapper extends BaseMapperPlus<SysDictTypeMapper, SysDictType, SysDictType> {
 | 
			
		||||
public interface SysDictTypeMapper extends BaseMapperPlus<SysDictTypeMapper, SysDictType, SysDictTypeVo> {
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.toolkit.Constants;
 | 
			
		||||
import com.ruoyi.common.core.constant.UserConstants;
 | 
			
		||||
import com.ruoyi.system.domain.SysMenu;
 | 
			
		||||
import com.ruoyi.common.mybatis.core.mapper.BaseMapperPlus;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysMenuVo;
 | 
			
		||||
import org.apache.ibatis.annotations.Param;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
@@ -15,7 +16,7 @@ import java.util.List;
 | 
			
		||||
 *
 | 
			
		||||
 * @author Lion Li
 | 
			
		||||
 */
 | 
			
		||||
public interface SysMenuMapper extends BaseMapperPlus<SysMenuMapper, SysMenu, SysMenu> {
 | 
			
		||||
public interface SysMenuMapper extends BaseMapperPlus<SysMenuMapper, SysMenu, SysMenuVo> {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 根据用户所有权限
 | 
			
		||||
 
 | 
			
		||||
@@ -2,12 +2,13 @@ package com.ruoyi.system.mapper;
 | 
			
		||||
 | 
			
		||||
import com.ruoyi.common.mybatis.core.mapper.BaseMapperPlus;
 | 
			
		||||
import com.ruoyi.system.domain.SysNotice;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysNoticeVo;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 通知公告表 数据层
 | 
			
		||||
 *
 | 
			
		||||
 * @author Lion Li
 | 
			
		||||
 */
 | 
			
		||||
public interface SysNoticeMapper extends BaseMapperPlus<SysNoticeMapper, SysNotice, SysNotice> {
 | 
			
		||||
public interface SysNoticeMapper extends BaseMapperPlus<SysNoticeMapper, SysNotice, SysNoticeVo> {
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -2,6 +2,7 @@ package com.ruoyi.system.mapper;
 | 
			
		||||
 | 
			
		||||
import com.ruoyi.common.mybatis.core.mapper.BaseMapperPlus;
 | 
			
		||||
import com.ruoyi.system.domain.SysPost;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysPostVo;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
@@ -10,7 +11,7 @@ import java.util.List;
 | 
			
		||||
 *
 | 
			
		||||
 * @author Lion Li
 | 
			
		||||
 */
 | 
			
		||||
public interface SysPostMapper extends BaseMapperPlus<SysPostMapper, SysPost, SysPost> {
 | 
			
		||||
public interface SysPostMapper extends BaseMapperPlus<SysPostMapper, SysPost, SysPostVo> {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 根据用户ID获取岗位选择框列表
 | 
			
		||||
@@ -26,6 +27,6 @@ public interface SysPostMapper extends BaseMapperPlus<SysPostMapper, SysPost, Sy
 | 
			
		||||
     * @param userName 用户名
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    List<SysPost> selectPostsByUserName(String userName);
 | 
			
		||||
    List<SysPostVo> selectPostsByUserName(String userName);
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -7,6 +7,7 @@ import com.ruoyi.common.mybatis.annotation.DataColumn;
 | 
			
		||||
import com.ruoyi.common.mybatis.annotation.DataPermission;
 | 
			
		||||
import com.ruoyi.system.domain.SysRole;
 | 
			
		||||
import com.ruoyi.common.mybatis.core.mapper.BaseMapperPlus;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysRoleVo;
 | 
			
		||||
import org.apache.ibatis.annotations.Param;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
@@ -16,12 +17,12 @@ import java.util.List;
 | 
			
		||||
 *
 | 
			
		||||
 * @author Lion Li
 | 
			
		||||
 */
 | 
			
		||||
public interface SysRoleMapper extends BaseMapperPlus<SysRoleMapper, SysRole, SysRole> {
 | 
			
		||||
public interface SysRoleMapper extends BaseMapperPlus<SysRoleMapper, SysRole, SysRoleVo> {
 | 
			
		||||
 | 
			
		||||
    @DataPermission({
 | 
			
		||||
        @DataColumn(key = "deptName", value = "d.dept_id")
 | 
			
		||||
    })
 | 
			
		||||
    Page<SysRole> selectPageRoleList(@Param("page") Page<SysRole> page, @Param(Constants.WRAPPER) Wrapper<SysRole> queryWrapper);
 | 
			
		||||
    Page<SysRoleVo> selectPageRoleList(@Param("page") Page<SysRole> page, @Param(Constants.WRAPPER) Wrapper<SysRole> queryWrapper);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 根据条件分页查询角色数据
 | 
			
		||||
@@ -32,7 +33,7 @@ public interface SysRoleMapper extends BaseMapperPlus<SysRoleMapper, SysRole, Sy
 | 
			
		||||
    @DataPermission({
 | 
			
		||||
        @DataColumn(key = "deptName", value = "d.dept_id")
 | 
			
		||||
    })
 | 
			
		||||
    List<SysRole> selectRoleList(@Param(Constants.WRAPPER) Wrapper<SysRole> queryWrapper);
 | 
			
		||||
    List<SysRoleVo> selectRoleList(@Param(Constants.WRAPPER) Wrapper<SysRole> queryWrapper);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 根据用户ID查询角色
 | 
			
		||||
@@ -40,7 +41,7 @@ public interface SysRoleMapper extends BaseMapperPlus<SysRoleMapper, SysRole, Sy
 | 
			
		||||
     * @param userId 用户ID
 | 
			
		||||
     * @return 角色列表
 | 
			
		||||
     */
 | 
			
		||||
    List<SysRole> selectRolePermissionByUserId(Long userId);
 | 
			
		||||
    List<SysRoleVo> selectRolePermissionByUserId(Long userId);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -57,6 +58,6 @@ public interface SysRoleMapper extends BaseMapperPlus<SysRoleMapper, SysRole, Sy
 | 
			
		||||
     * @param userName 用户名
 | 
			
		||||
     * @return 角色列表
 | 
			
		||||
     */
 | 
			
		||||
    List<SysRole> selectRolesByUserName(String userName);
 | 
			
		||||
    List<SysRoleVo> selectRolesByUserName(String userName);
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,8 @@ package com.ruoyi.system.service;
 | 
			
		||||
 | 
			
		||||
import com.ruoyi.common.mybatis.core.page.PageQuery;
 | 
			
		||||
import com.ruoyi.common.mybatis.core.page.TableDataInfo;
 | 
			
		||||
import com.ruoyi.system.domain.SysConfig;
 | 
			
		||||
import com.ruoyi.system.domain.bo.SysConfigBo;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysConfigVo;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
@@ -14,7 +15,7 @@ import java.util.List;
 | 
			
		||||
public interface ISysConfigService {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    TableDataInfo<SysConfig> selectPageConfigList(SysConfig config, PageQuery pageQuery);
 | 
			
		||||
    TableDataInfo<SysConfigVo> selectPageConfigList(SysConfigBo config, PageQuery pageQuery);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询参数配置信息
 | 
			
		||||
@@ -22,7 +23,7 @@ public interface ISysConfigService {
 | 
			
		||||
     * @param configId 参数配置ID
 | 
			
		||||
     * @return 参数配置信息
 | 
			
		||||
     */
 | 
			
		||||
    SysConfig selectConfigById(Long configId);
 | 
			
		||||
    SysConfigVo selectConfigById(Long configId);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 根据键名查询参数配置信息
 | 
			
		||||
@@ -45,23 +46,23 @@ public interface ISysConfigService {
 | 
			
		||||
     * @param config 参数配置信息
 | 
			
		||||
     * @return 参数配置集合
 | 
			
		||||
     */
 | 
			
		||||
    List<SysConfig> selectConfigList(SysConfig config);
 | 
			
		||||
    List<SysConfigVo> selectConfigList(SysConfigBo config);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 新增参数配置
 | 
			
		||||
     *
 | 
			
		||||
     * @param config 参数配置信息
 | 
			
		||||
     * @param bo 参数配置信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    String insertConfig(SysConfig config);
 | 
			
		||||
    String insertConfig(SysConfigBo bo);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 修改参数配置
 | 
			
		||||
     *
 | 
			
		||||
     * @param config 参数配置信息
 | 
			
		||||
     * @param bo 参数配置信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    String updateConfig(SysConfig config);
 | 
			
		||||
    String updateConfig(SysConfigBo bo);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 批量删除参数信息
 | 
			
		||||
@@ -91,6 +92,6 @@ public interface ISysConfigService {
 | 
			
		||||
     * @param config 参数信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    String checkConfigKeyUnique(SysConfig config);
 | 
			
		||||
    String checkConfigKeyUnique(SysConfigBo config);
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -2,6 +2,8 @@ package com.ruoyi.system.service;
 | 
			
		||||
 | 
			
		||||
import cn.hutool.core.lang.tree.Tree;
 | 
			
		||||
import com.ruoyi.system.domain.SysDept;
 | 
			
		||||
import com.ruoyi.system.domain.bo.SysDeptBo;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysDeptVo;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
@@ -17,7 +19,7 @@ public interface ISysDeptService {
 | 
			
		||||
     * @param dept 部门信息
 | 
			
		||||
     * @return 部门信息集合
 | 
			
		||||
     */
 | 
			
		||||
    List<SysDept> selectDeptList(SysDept dept);
 | 
			
		||||
    List<SysDeptVo> selectDeptList(SysDeptBo dept);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询部门树结构信息
 | 
			
		||||
@@ -49,7 +51,7 @@ public interface ISysDeptService {
 | 
			
		||||
     * @param deptId 部门ID
 | 
			
		||||
     * @return 部门信息
 | 
			
		||||
     */
 | 
			
		||||
    SysDept selectDeptById(Long deptId);
 | 
			
		||||
    SysDeptVo selectDeptById(Long deptId);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 根据ID查询所有子部门数(正常状态)
 | 
			
		||||
@@ -81,7 +83,7 @@ public interface ISysDeptService {
 | 
			
		||||
     * @param dept 部门信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    String checkDeptNameUnique(SysDept dept);
 | 
			
		||||
    String checkDeptNameUnique(SysDeptBo dept);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 校验部门是否有数据权限
 | 
			
		||||
@@ -93,18 +95,18 @@ public interface ISysDeptService {
 | 
			
		||||
    /**
 | 
			
		||||
     * 新增保存部门信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param dept 部门信息
 | 
			
		||||
     * @param bo 部门信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    int insertDept(SysDept dept);
 | 
			
		||||
    int insertDept(SysDeptBo bo);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 修改保存部门信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param dept 部门信息
 | 
			
		||||
     * @param bo 部门信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    int updateDept(SysDept dept);
 | 
			
		||||
    int updateDept(SysDeptBo bo);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 删除部门管理信息
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,9 @@
 | 
			
		||||
package com.ruoyi.system.service;
 | 
			
		||||
 | 
			
		||||
import com.ruoyi.common.mybatis.core.page.PageQuery;
 | 
			
		||||
import com.ruoyi.system.domain.SysDictData;
 | 
			
		||||
import com.ruoyi.common.mybatis.core.page.TableDataInfo;
 | 
			
		||||
import com.ruoyi.system.domain.bo.SysDictDataBo;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysDictDataVo;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
@@ -14,7 +15,7 @@ import java.util.List;
 | 
			
		||||
public interface ISysDictDataService {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    TableDataInfo<SysDictData> selectPageDictDataList(SysDictData dictData, PageQuery pageQuery);
 | 
			
		||||
    TableDataInfo<SysDictDataVo> selectPageDictDataList(SysDictDataBo dictData, PageQuery pageQuery);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 根据条件分页查询字典数据
 | 
			
		||||
@@ -22,7 +23,7 @@ public interface ISysDictDataService {
 | 
			
		||||
     * @param dictData 字典数据信息
 | 
			
		||||
     * @return 字典数据集合信息
 | 
			
		||||
     */
 | 
			
		||||
    List<SysDictData> selectDictDataList(SysDictData dictData);
 | 
			
		||||
    List<SysDictDataVo> selectDictDataList(SysDictDataBo dictData);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 根据字典类型和字典键值查询字典数据信息
 | 
			
		||||
@@ -39,7 +40,7 @@ public interface ISysDictDataService {
 | 
			
		||||
     * @param dictCode 字典数据ID
 | 
			
		||||
     * @return 字典数据
 | 
			
		||||
     */
 | 
			
		||||
    SysDictData selectDictDataById(Long dictCode);
 | 
			
		||||
    SysDictDataVo selectDictDataById(Long dictCode);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 批量删除字典数据信息
 | 
			
		||||
@@ -51,16 +52,16 @@ public interface ISysDictDataService {
 | 
			
		||||
    /**
 | 
			
		||||
     * 新增保存字典数据信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param dictData 字典数据信息
 | 
			
		||||
     * @param bo 字典数据信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    List<SysDictData> insertDictData(SysDictData dictData);
 | 
			
		||||
    List<SysDictDataVo> insertDictData(SysDictDataBo bo);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 修改保存字典数据信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param dictData 字典数据信息
 | 
			
		||||
     * @param bo 字典数据信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    List<SysDictData> updateDictData(SysDictData dictData);
 | 
			
		||||
    List<SysDictDataVo> updateDictData(SysDictDataBo bo);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,9 +1,11 @@
 | 
			
		||||
package com.ruoyi.system.service;
 | 
			
		||||
 | 
			
		||||
import com.ruoyi.common.mybatis.core.page.PageQuery;
 | 
			
		||||
import com.ruoyi.system.domain.SysDictData;
 | 
			
		||||
import com.ruoyi.system.domain.SysDictType;
 | 
			
		||||
import com.ruoyi.common.mybatis.core.page.TableDataInfo;
 | 
			
		||||
import com.ruoyi.system.domain.bo.SysDictTypeBo;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysDictDataVo;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysDictTypeVo;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
@@ -15,7 +17,7 @@ import java.util.List;
 | 
			
		||||
public interface ISysDictTypeService {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    TableDataInfo<SysDictType> selectPageDictTypeList(SysDictType dictType, PageQuery pageQuery);
 | 
			
		||||
    TableDataInfo<SysDictTypeVo> selectPageDictTypeList(SysDictTypeBo dictType, PageQuery pageQuery);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 根据条件分页查询字典类型
 | 
			
		||||
@@ -23,7 +25,7 @@ public interface ISysDictTypeService {
 | 
			
		||||
     * @param dictType 字典类型信息
 | 
			
		||||
     * @return 字典类型集合信息
 | 
			
		||||
     */
 | 
			
		||||
    List<SysDictType> selectDictTypeList(SysDictType dictType);
 | 
			
		||||
    List<SysDictTypeVo> selectDictTypeList(SysDictTypeBo dictType);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 根据所有字典类型
 | 
			
		||||
@@ -38,7 +40,7 @@ public interface ISysDictTypeService {
 | 
			
		||||
     * @param dictType 字典类型
 | 
			
		||||
     * @return 字典数据集合信息
 | 
			
		||||
     */
 | 
			
		||||
    List<SysDictData> selectDictDataByType(String dictType);
 | 
			
		||||
    List<SysDictDataVo> selectDictDataByType(String dictType);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 根据字典类型ID查询信息
 | 
			
		||||
@@ -46,7 +48,7 @@ public interface ISysDictTypeService {
 | 
			
		||||
     * @param dictId 字典类型ID
 | 
			
		||||
     * @return 字典类型
 | 
			
		||||
     */
 | 
			
		||||
    SysDictType selectDictTypeById(Long dictId);
 | 
			
		||||
    SysDictTypeVo selectDictTypeById(Long dictId);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 根据字典类型查询信息
 | 
			
		||||
@@ -54,7 +56,7 @@ public interface ISysDictTypeService {
 | 
			
		||||
     * @param dictType 字典类型
 | 
			
		||||
     * @return 字典类型
 | 
			
		||||
     */
 | 
			
		||||
    SysDictType selectDictTypeByType(String dictType);
 | 
			
		||||
    SysDictTypeVo selectDictTypeByType(String dictType);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 批量删除字典信息
 | 
			
		||||
@@ -81,18 +83,18 @@ public interface ISysDictTypeService {
 | 
			
		||||
    /**
 | 
			
		||||
     * 新增保存字典类型信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param dictType 字典类型信息
 | 
			
		||||
     * @param bo 字典类型信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    List<SysDictData> insertDictType(SysDictType dictType);
 | 
			
		||||
    List<SysDictTypeVo> insertDictType(SysDictTypeBo bo);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 修改保存字典类型信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param dictType 字典类型信息
 | 
			
		||||
     * @param bo 字典类型信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    List<SysDictData> updateDictType(SysDictType dictType);
 | 
			
		||||
    List<SysDictDataVo> updateDictType(SysDictTypeBo bo);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 校验字典类型称是否唯一
 | 
			
		||||
@@ -100,5 +102,5 @@ public interface ISysDictTypeService {
 | 
			
		||||
     * @param dictType 字典类型
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    String checkDictTypeUnique(SysDictType dictType);
 | 
			
		||||
    String checkDictTypeUnique(SysDictTypeBo dictType);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,9 @@ package com.ruoyi.system.service;
 | 
			
		||||
 | 
			
		||||
import cn.hutool.core.lang.tree.Tree;
 | 
			
		||||
import com.ruoyi.system.domain.SysMenu;
 | 
			
		||||
import com.ruoyi.system.domain.bo.SysMenuBo;
 | 
			
		||||
import com.ruoyi.system.domain.vo.RouterVo;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysMenuVo;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.Set;
 | 
			
		||||
@@ -85,7 +87,7 @@ public interface ISysMenuService {
 | 
			
		||||
     * @param menuId 菜单ID
 | 
			
		||||
     * @return 菜单信息
 | 
			
		||||
     */
 | 
			
		||||
    SysMenu selectMenuById(Long menuId);
 | 
			
		||||
    SysMenuVo selectMenuById(Long menuId);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 是否存在菜单子节点
 | 
			
		||||
@@ -106,18 +108,18 @@ public interface ISysMenuService {
 | 
			
		||||
    /**
 | 
			
		||||
     * 新增保存菜单信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param menu 菜单信息
 | 
			
		||||
     * @param bo 菜单信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    int insertMenu(SysMenu menu);
 | 
			
		||||
    int insertMenu(SysMenuBo bo);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 修改保存菜单信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param menu 菜单信息
 | 
			
		||||
     * @param bo 菜单信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    int updateMenu(SysMenu menu);
 | 
			
		||||
    int updateMenu(SysMenuBo bo);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 删除菜单管理信息
 | 
			
		||||
@@ -133,5 +135,5 @@ public interface ISysMenuService {
 | 
			
		||||
     * @param menu 菜单信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    String checkMenuNameUnique(SysMenu menu);
 | 
			
		||||
    String checkMenuNameUnique(SysMenuBo menu);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,8 @@ package com.ruoyi.system.service;
 | 
			
		||||
 | 
			
		||||
import com.ruoyi.common.mybatis.core.page.PageQuery;
 | 
			
		||||
import com.ruoyi.common.mybatis.core.page.TableDataInfo;
 | 
			
		||||
import com.ruoyi.system.domain.SysNotice;
 | 
			
		||||
import com.ruoyi.system.domain.bo.SysNoticeBo;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysNoticeVo;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
@@ -14,7 +15,7 @@ import java.util.List;
 | 
			
		||||
public interface ISysNoticeService {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    TableDataInfo<SysNotice> selectPageNoticeList(SysNotice notice, PageQuery pageQuery);
 | 
			
		||||
    TableDataInfo<SysNoticeVo> selectPageNoticeList(SysNoticeBo notice, PageQuery pageQuery);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询公告信息
 | 
			
		||||
@@ -22,7 +23,7 @@ public interface ISysNoticeService {
 | 
			
		||||
     * @param noticeId 公告ID
 | 
			
		||||
     * @return 公告信息
 | 
			
		||||
     */
 | 
			
		||||
    SysNotice selectNoticeById(Long noticeId);
 | 
			
		||||
    SysNoticeVo selectNoticeById(Long noticeId);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询公告列表
 | 
			
		||||
@@ -30,23 +31,23 @@ public interface ISysNoticeService {
 | 
			
		||||
     * @param notice 公告信息
 | 
			
		||||
     * @return 公告集合
 | 
			
		||||
     */
 | 
			
		||||
    List<SysNotice> selectNoticeList(SysNotice notice);
 | 
			
		||||
    List<SysNoticeVo> selectNoticeList(SysNoticeBo notice);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 新增公告
 | 
			
		||||
     *
 | 
			
		||||
     * @param notice 公告信息
 | 
			
		||||
     * @param bo 公告信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    int insertNotice(SysNotice notice);
 | 
			
		||||
    int insertNotice(SysNoticeBo bo);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 修改公告
 | 
			
		||||
     *
 | 
			
		||||
     * @param notice 公告信息
 | 
			
		||||
     * @param bo 公告信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    int updateNotice(SysNotice notice);
 | 
			
		||||
    int updateNotice(SysNoticeBo bo);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 删除公告信息
 | 
			
		||||
 
 | 
			
		||||
@@ -2,7 +2,8 @@ package com.ruoyi.system.service;
 | 
			
		||||
 | 
			
		||||
import com.ruoyi.common.mybatis.core.page.PageQuery;
 | 
			
		||||
import com.ruoyi.common.mybatis.core.page.TableDataInfo;
 | 
			
		||||
import com.ruoyi.system.domain.SysPost;
 | 
			
		||||
import com.ruoyi.system.domain.bo.SysPostBo;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysPostVo;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
@@ -14,7 +15,7 @@ import java.util.List;
 | 
			
		||||
public interface ISysPostService {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    TableDataInfo<SysPost> selectPagePostList(SysPost post, PageQuery pageQuery);
 | 
			
		||||
    TableDataInfo<SysPostVo> selectPagePostList(SysPostBo post, PageQuery pageQuery);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询岗位信息集合
 | 
			
		||||
@@ -22,14 +23,14 @@ public interface ISysPostService {
 | 
			
		||||
     * @param post 岗位信息
 | 
			
		||||
     * @return 岗位列表
 | 
			
		||||
     */
 | 
			
		||||
    List<SysPost> selectPostList(SysPost post);
 | 
			
		||||
    List<SysPostVo> selectPostList(SysPostBo post);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询所有岗位
 | 
			
		||||
     *
 | 
			
		||||
     * @return 岗位列表
 | 
			
		||||
     */
 | 
			
		||||
    List<SysPost> selectPostAll();
 | 
			
		||||
    List<SysPostVo> selectPostAll();
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 通过岗位ID查询岗位信息
 | 
			
		||||
@@ -37,7 +38,7 @@ public interface ISysPostService {
 | 
			
		||||
     * @param postId 岗位ID
 | 
			
		||||
     * @return 角色对象信息
 | 
			
		||||
     */
 | 
			
		||||
    SysPost selectPostById(Long postId);
 | 
			
		||||
    SysPostVo selectPostById(Long postId);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 根据用户ID获取岗位选择框列表
 | 
			
		||||
@@ -53,7 +54,7 @@ public interface ISysPostService {
 | 
			
		||||
     * @param post 岗位信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    String checkPostNameUnique(SysPost post);
 | 
			
		||||
    String checkPostNameUnique(SysPostBo post);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 校验岗位编码
 | 
			
		||||
@@ -61,7 +62,7 @@ public interface ISysPostService {
 | 
			
		||||
     * @param post 岗位信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    String checkPostCodeUnique(SysPost post);
 | 
			
		||||
    String checkPostCodeUnique(SysPostBo post);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 通过岗位ID查询岗位使用数量
 | 
			
		||||
@@ -90,16 +91,16 @@ public interface ISysPostService {
 | 
			
		||||
    /**
 | 
			
		||||
     * 新增保存岗位信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param post 岗位信息
 | 
			
		||||
     * @param bo 岗位信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    int insertPost(SysPost post);
 | 
			
		||||
    int insertPost(SysPostBo bo);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 修改保存岗位信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param post 岗位信息
 | 
			
		||||
     * @param bo 岗位信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    int updatePost(SysPost post);
 | 
			
		||||
    int updatePost(SysPostBo bo);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,9 +1,10 @@
 | 
			
		||||
package com.ruoyi.system.service;
 | 
			
		||||
 | 
			
		||||
import com.ruoyi.common.mybatis.core.page.PageQuery;
 | 
			
		||||
import com.ruoyi.system.domain.SysRole;
 | 
			
		||||
import com.ruoyi.common.mybatis.core.page.TableDataInfo;
 | 
			
		||||
import com.ruoyi.system.domain.SysUserRole;
 | 
			
		||||
import com.ruoyi.system.domain.bo.SysRoleBo;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysRoleVo;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.Set;
 | 
			
		||||
@@ -16,7 +17,7 @@ import java.util.Set;
 | 
			
		||||
public interface ISysRoleService {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    TableDataInfo<SysRole> selectPageRoleList(SysRole role, PageQuery pageQuery);
 | 
			
		||||
    TableDataInfo<SysRoleVo> selectPageRoleList(SysRoleBo role, PageQuery pageQuery);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 根据条件分页查询角色数据
 | 
			
		||||
@@ -24,7 +25,7 @@ public interface ISysRoleService {
 | 
			
		||||
     * @param role 角色信息
 | 
			
		||||
     * @return 角色数据集合信息
 | 
			
		||||
     */
 | 
			
		||||
    List<SysRole> selectRoleList(SysRole role);
 | 
			
		||||
    List<SysRoleVo> selectRoleList(SysRoleBo role);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 根据用户ID查询角色列表
 | 
			
		||||
@@ -32,7 +33,7 @@ public interface ISysRoleService {
 | 
			
		||||
     * @param userId 用户ID
 | 
			
		||||
     * @return 角色列表
 | 
			
		||||
     */
 | 
			
		||||
    List<SysRole> selectRolesByUserId(Long userId);
 | 
			
		||||
    List<SysRoleVo> selectRolesByUserId(Long userId);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 根据用户ID查询角色权限
 | 
			
		||||
@@ -47,7 +48,7 @@ public interface ISysRoleService {
 | 
			
		||||
     *
 | 
			
		||||
     * @return 角色列表
 | 
			
		||||
     */
 | 
			
		||||
    List<SysRole> selectRoleAll();
 | 
			
		||||
    List<SysRoleVo> selectRoleAll();
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 根据用户ID获取角色选择框列表
 | 
			
		||||
@@ -63,7 +64,7 @@ public interface ISysRoleService {
 | 
			
		||||
     * @param roleId 角色ID
 | 
			
		||||
     * @return 角色对象信息
 | 
			
		||||
     */
 | 
			
		||||
    SysRole selectRoleById(Long roleId);
 | 
			
		||||
    SysRoleVo selectRoleById(Long roleId);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 校验角色名称是否唯一
 | 
			
		||||
@@ -71,7 +72,7 @@ public interface ISysRoleService {
 | 
			
		||||
     * @param role 角色信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    String checkRoleNameUnique(SysRole role);
 | 
			
		||||
    String checkRoleNameUnique(SysRoleBo role);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 校验角色权限是否唯一
 | 
			
		||||
@@ -79,14 +80,14 @@ public interface ISysRoleService {
 | 
			
		||||
     * @param role 角色信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    String checkRoleKeyUnique(SysRole role);
 | 
			
		||||
    String checkRoleKeyUnique(SysRoleBo role);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 校验角色是否允许操作
 | 
			
		||||
     *
 | 
			
		||||
     * @param role 角色信息
 | 
			
		||||
     */
 | 
			
		||||
    void checkRoleAllowed(SysRole role);
 | 
			
		||||
    void checkRoleAllowed(SysRoleBo role);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 校验角色是否有数据权限
 | 
			
		||||
@@ -106,34 +107,34 @@ public interface ISysRoleService {
 | 
			
		||||
    /**
 | 
			
		||||
     * 新增保存角色信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param role 角色信息
 | 
			
		||||
     * @param bo 角色信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    int insertRole(SysRole role);
 | 
			
		||||
    int insertRole(SysRoleBo bo);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 修改保存角色信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param role 角色信息
 | 
			
		||||
     * @param bo 角色信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    int updateRole(SysRole role);
 | 
			
		||||
    int updateRole(SysRoleBo bo);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 修改角色状态
 | 
			
		||||
     *
 | 
			
		||||
     * @param role 角色信息
 | 
			
		||||
     * @param bo 角色信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    int updateRoleStatus(SysRole role);
 | 
			
		||||
    int updateRoleStatus(SysRoleBo bo);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 修改数据权限信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param role 角色信息
 | 
			
		||||
     * @param bo 角色信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    int authDataScope(SysRole role);
 | 
			
		||||
    int authDataScope(SysRoleBo bo);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 通过角色ID删除角色
 | 
			
		||||
 
 | 
			
		||||
@@ -1,9 +1,11 @@
 | 
			
		||||
package com.ruoyi.system.service.impl;
 | 
			
		||||
 | 
			
		||||
import cn.hutool.core.bean.BeanUtil;
 | 
			
		||||
import cn.hutool.core.convert.Convert;
 | 
			
		||||
import cn.hutool.core.util.ObjectUtil;
 | 
			
		||||
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.plugins.pagination.Page;
 | 
			
		||||
import com.ruoyi.common.core.constant.CacheNames;
 | 
			
		||||
import com.ruoyi.common.core.constant.UserConstants;
 | 
			
		||||
@@ -15,6 +17,8 @@ import com.ruoyi.common.core.utils.StringUtils;
 | 
			
		||||
import com.ruoyi.common.redis.utils.CacheUtils;
 | 
			
		||||
import com.ruoyi.common.core.utils.SpringUtils;
 | 
			
		||||
import com.ruoyi.system.domain.SysConfig;
 | 
			
		||||
import com.ruoyi.system.domain.bo.SysConfigBo;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysConfigVo;
 | 
			
		||||
import com.ruoyi.system.mapper.SysConfigMapper;
 | 
			
		||||
import com.ruoyi.system.service.ISysConfigService;
 | 
			
		||||
import lombok.RequiredArgsConstructor;
 | 
			
		||||
@@ -38,15 +42,9 @@ public class SysConfigServiceImpl implements ISysConfigService, ConfigService {
 | 
			
		||||
    private final SysConfigMapper baseMapper;
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public TableDataInfo<SysConfig> selectPageConfigList(SysConfig config, PageQuery pageQuery) {
 | 
			
		||||
        Map<String, Object> params = config.getParams();
 | 
			
		||||
        LambdaQueryWrapper<SysConfig> lqw = new LambdaQueryWrapper<SysConfig>()
 | 
			
		||||
            .like(StringUtils.isNotBlank(config.getConfigName()), SysConfig::getConfigName, config.getConfigName())
 | 
			
		||||
            .eq(StringUtils.isNotBlank(config.getConfigType()), SysConfig::getConfigType, config.getConfigType())
 | 
			
		||||
            .like(StringUtils.isNotBlank(config.getConfigKey()), SysConfig::getConfigKey, config.getConfigKey())
 | 
			
		||||
            .between(params.get("beginTime") != null && params.get("endTime") != null,
 | 
			
		||||
                SysConfig::getCreateTime, params.get("beginTime"), params.get("endTime"));
 | 
			
		||||
        Page<SysConfig> page = baseMapper.selectPage(pageQuery.build(), lqw);
 | 
			
		||||
    public TableDataInfo<SysConfigVo> selectPageConfigList(SysConfigBo config, PageQuery pageQuery) {
 | 
			
		||||
        LambdaQueryWrapper<SysConfig> lqw = buildQueryWrapper(config);
 | 
			
		||||
        Page<SysConfigVo> page = baseMapper.selectVoPage(pageQuery.build(), lqw);
 | 
			
		||||
        return TableDataInfo.build(page);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -58,8 +56,8 @@ public class SysConfigServiceImpl implements ISysConfigService, ConfigService {
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    @DS("master")
 | 
			
		||||
    public SysConfig selectConfigById(Long configId) {
 | 
			
		||||
        return baseMapper.selectById(configId);
 | 
			
		||||
    public SysConfigVo selectConfigById(Long configId) {
 | 
			
		||||
        return baseMapper.selectVoById(configId);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -100,26 +98,32 @@ public class SysConfigServiceImpl implements ISysConfigService, ConfigService {
 | 
			
		||||
     * @return 参数配置集合
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public List<SysConfig> selectConfigList(SysConfig config) {
 | 
			
		||||
        Map<String, Object> params = config.getParams();
 | 
			
		||||
        LambdaQueryWrapper<SysConfig> lqw = new LambdaQueryWrapper<SysConfig>()
 | 
			
		||||
            .like(StringUtils.isNotBlank(config.getConfigName()), SysConfig::getConfigName, config.getConfigName())
 | 
			
		||||
            .eq(StringUtils.isNotBlank(config.getConfigType()), SysConfig::getConfigType, config.getConfigType())
 | 
			
		||||
            .like(StringUtils.isNotBlank(config.getConfigKey()), SysConfig::getConfigKey, config.getConfigKey())
 | 
			
		||||
            .between(params.get("beginTime") != null && params.get("endTime") != null,
 | 
			
		||||
    public List<SysConfigVo> selectConfigList(SysConfigBo config) {
 | 
			
		||||
        LambdaQueryWrapper<SysConfig> lqw = buildQueryWrapper(config);
 | 
			
		||||
        return baseMapper.selectVoList(lqw);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private LambdaQueryWrapper<SysConfig> buildQueryWrapper(SysConfigBo bo) {
 | 
			
		||||
        Map<String, Object> params = bo.getParams();
 | 
			
		||||
        LambdaQueryWrapper<SysConfig> lqw = Wrappers.lambdaQuery();
 | 
			
		||||
        lqw.like(StringUtils.isNotBlank(bo.getConfigName()), SysConfig::getConfigName, bo.getConfigName());
 | 
			
		||||
        lqw.eq(StringUtils.isNotBlank(bo.getConfigType()), SysConfig::getConfigType, bo.getConfigType());
 | 
			
		||||
        lqw.like(StringUtils.isNotBlank(bo.getConfigKey()), SysConfig::getConfigKey, bo.getConfigKey());
 | 
			
		||||
        lqw.between(params.get("beginTime") != null && params.get("endTime") != null,
 | 
			
		||||
            SysConfig::getCreateTime, params.get("beginTime"), params.get("endTime"));
 | 
			
		||||
        return baseMapper.selectList(lqw);
 | 
			
		||||
        return lqw;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 新增参数配置
 | 
			
		||||
     *
 | 
			
		||||
     * @param config 参数配置信息
 | 
			
		||||
     * @param bo 参数配置信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    @CachePut(cacheNames = CacheNames.SYS_CONFIG, key = "#config.configKey")
 | 
			
		||||
    @CachePut(cacheNames = CacheNames.SYS_CONFIG, key = "#bo.configKey")
 | 
			
		||||
    @Override
 | 
			
		||||
    public String insertConfig(SysConfig config) {
 | 
			
		||||
    public String insertConfig(SysConfigBo bo) {
 | 
			
		||||
        SysConfig config = BeanUtil.toBean(bo, SysConfig.class);
 | 
			
		||||
        int row = baseMapper.insert(config);
 | 
			
		||||
        if (row > 0) {
 | 
			
		||||
            return config.getConfigValue();
 | 
			
		||||
@@ -130,13 +134,14 @@ public class SysConfigServiceImpl implements ISysConfigService, ConfigService {
 | 
			
		||||
    /**
 | 
			
		||||
     * 修改参数配置
 | 
			
		||||
     *
 | 
			
		||||
     * @param config 参数配置信息
 | 
			
		||||
     * @param bo 参数配置信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    @CachePut(cacheNames = CacheNames.SYS_CONFIG, key = "#config.configKey")
 | 
			
		||||
    @CachePut(cacheNames = CacheNames.SYS_CONFIG, key = "#bo.configKey")
 | 
			
		||||
    @Override
 | 
			
		||||
    public String updateConfig(SysConfig config) {
 | 
			
		||||
    public String updateConfig(SysConfigBo bo) {
 | 
			
		||||
        int row = 0;
 | 
			
		||||
        SysConfig config = BeanUtil.toBean(bo, SysConfig.class);
 | 
			
		||||
        if (config.getConfigId() != null) {
 | 
			
		||||
            SysConfig temp = baseMapper.selectById(config.getConfigId());
 | 
			
		||||
            if (!StringUtils.equals(temp.getConfigKey(), config.getConfigKey())) {
 | 
			
		||||
@@ -161,7 +166,7 @@ public class SysConfigServiceImpl implements ISysConfigService, ConfigService {
 | 
			
		||||
    @Override
 | 
			
		||||
    public void deleteConfigByIds(Long[] configIds) {
 | 
			
		||||
        for (Long configId : configIds) {
 | 
			
		||||
            SysConfig config = selectConfigById(configId);
 | 
			
		||||
            SysConfig config = baseMapper.selectById(configId);
 | 
			
		||||
            if (StringUtils.equals(UserConstants.YES, config.getConfigType())) {
 | 
			
		||||
                throw new ServiceException(String.format("内置参数【%1$s】不能删除 ", config.getConfigKey()));
 | 
			
		||||
            }
 | 
			
		||||
@@ -175,7 +180,7 @@ public class SysConfigServiceImpl implements ISysConfigService, ConfigService {
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public void loadingConfigCache() {
 | 
			
		||||
        List<SysConfig> configsList = selectConfigList(new SysConfig());
 | 
			
		||||
        List<SysConfigVo> configsList = selectConfigList(new SysConfigBo());
 | 
			
		||||
        configsList.forEach(config ->
 | 
			
		||||
            CacheUtils.put(CacheNames.SYS_CONFIG, config.getConfigKey(), config.getConfigValue()));
 | 
			
		||||
    }
 | 
			
		||||
@@ -204,7 +209,7 @@ public class SysConfigServiceImpl implements ISysConfigService, ConfigService {
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public String checkConfigKeyUnique(SysConfig config) {
 | 
			
		||||
    public String checkConfigKeyUnique(SysConfigBo config) {
 | 
			
		||||
        long configId = ObjectUtil.isNull(config.getConfigId()) ? -1L : config.getConfigId();
 | 
			
		||||
        SysConfig info = baseMapper.selectOne(new LambdaQueryWrapper<SysConfig>().eq(SysConfig::getConfigKey, config.getConfigKey()));
 | 
			
		||||
        if (ObjectUtil.isNotNull(info) && info.getConfigId() != configId) {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,11 +1,13 @@
 | 
			
		||||
package com.ruoyi.system.service.impl;
 | 
			
		||||
 | 
			
		||||
import cn.hutool.core.bean.BeanUtil;
 | 
			
		||||
import cn.hutool.core.collection.CollUtil;
 | 
			
		||||
import cn.hutool.core.convert.Convert;
 | 
			
		||||
import cn.hutool.core.lang.tree.Tree;
 | 
			
		||||
import cn.hutool.core.util.ObjectUtil;
 | 
			
		||||
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.ruoyi.common.core.constant.UserConstants;
 | 
			
		||||
import com.ruoyi.system.domain.SysDept;
 | 
			
		||||
import com.ruoyi.system.domain.SysRole;
 | 
			
		||||
@@ -15,6 +17,8 @@ import com.ruoyi.common.mybatis.helper.DataBaseHelper;
 | 
			
		||||
import com.ruoyi.common.satoken.utils.LoginHelper;
 | 
			
		||||
import com.ruoyi.common.core.utils.StringUtils;
 | 
			
		||||
import com.ruoyi.common.core.utils.TreeBuildUtils;
 | 
			
		||||
import com.ruoyi.system.domain.bo.SysDeptBo;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysDeptVo;
 | 
			
		||||
import com.ruoyi.system.mapper.SysDeptMapper;
 | 
			
		||||
import com.ruoyi.system.mapper.SysRoleMapper;
 | 
			
		||||
import com.ruoyi.system.mapper.SysUserMapper;
 | 
			
		||||
@@ -46,15 +50,8 @@ public class SysDeptServiceImpl implements ISysDeptService {
 | 
			
		||||
     * @return 部门信息集合
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public List<SysDept> selectDeptList(SysDept dept) {
 | 
			
		||||
        LambdaQueryWrapper<SysDept> lqw = new LambdaQueryWrapper<>();
 | 
			
		||||
        lqw.eq(SysDept::getDelFlag, "0")
 | 
			
		||||
            .eq(ObjectUtil.isNotNull(dept.getDeptId()), SysDept::getDeptId, dept.getDeptId())
 | 
			
		||||
            .eq(ObjectUtil.isNotNull(dept.getParentId()), SysDept::getParentId, dept.getParentId())
 | 
			
		||||
            .like(StringUtils.isNotBlank(dept.getDeptName()), SysDept::getDeptName, dept.getDeptName())
 | 
			
		||||
            .eq(StringUtils.isNotBlank(dept.getStatus()), SysDept::getStatus, dept.getStatus())
 | 
			
		||||
            .orderByAsc(SysDept::getParentId)
 | 
			
		||||
            .orderByAsc(SysDept::getOrderNum);
 | 
			
		||||
    public List<SysDeptVo> selectDeptList(SysDeptBo dept) {
 | 
			
		||||
        LambdaQueryWrapper<SysDept> lqw = buildQueryWrapper(dept);
 | 
			
		||||
        return baseMapper.selectDeptList(lqw);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -66,10 +63,24 @@ public class SysDeptServiceImpl implements ISysDeptService {
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public List<Tree<Long>> selectDeptTreeList(SysDept dept) {
 | 
			
		||||
        List<SysDept> depts = this.selectDeptList(dept);
 | 
			
		||||
        SysDeptBo bo = BeanUtil.toBean(dept, SysDeptBo.class);
 | 
			
		||||
        LambdaQueryWrapper<SysDept> lqw = buildQueryWrapper(bo);
 | 
			
		||||
        List<SysDept> depts = baseMapper.selectList(lqw);
 | 
			
		||||
        return buildDeptTreeSelect(depts);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private LambdaQueryWrapper<SysDept> buildQueryWrapper(SysDeptBo bo) {
 | 
			
		||||
        LambdaQueryWrapper<SysDept> lqw = Wrappers.lambdaQuery();
 | 
			
		||||
        lqw.eq(SysDept::getDelFlag, "0");
 | 
			
		||||
        lqw.eq(ObjectUtil.isNotNull(bo.getDeptId()), SysDept::getDeptId, bo.getDeptId());
 | 
			
		||||
        lqw.eq(ObjectUtil.isNotNull(bo.getParentId()), SysDept::getParentId, bo.getParentId());
 | 
			
		||||
        lqw.like(StringUtils.isNotBlank(bo.getDeptName()), SysDept::getDeptName, bo.getDeptName());
 | 
			
		||||
        lqw.eq(StringUtils.isNotBlank(bo.getStatus()), SysDept::getStatus, bo.getStatus());
 | 
			
		||||
        lqw.orderByAsc(SysDept::getParentId);
 | 
			
		||||
        lqw.orderByAsc(SysDept::getOrderNum);
 | 
			
		||||
        return lqw;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 构建前端所需要下拉树结构
 | 
			
		||||
     *
 | 
			
		||||
@@ -107,9 +118,9 @@ public class SysDeptServiceImpl implements ISysDeptService {
 | 
			
		||||
     * @return 部门信息
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public SysDept selectDeptById(Long deptId) {
 | 
			
		||||
        SysDept dept = baseMapper.selectById(deptId);
 | 
			
		||||
        SysDept parentDept = baseMapper.selectOne(new LambdaQueryWrapper<SysDept>()
 | 
			
		||||
    public SysDeptVo selectDeptById(Long deptId) {
 | 
			
		||||
        SysDeptVo dept = baseMapper.selectVoById(deptId);
 | 
			
		||||
        SysDeptVo parentDept = baseMapper.selectVoOne(new LambdaQueryWrapper<SysDept>()
 | 
			
		||||
            .select(SysDept::getDeptName).eq(SysDept::getDeptId, dept.getParentId()));
 | 
			
		||||
        dept.setParentName(ObjectUtil.isNotNull(parentDept) ? parentDept.getDeptName() : null);
 | 
			
		||||
        return dept;
 | 
			
		||||
@@ -159,7 +170,7 @@ public class SysDeptServiceImpl implements ISysDeptService {
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public String checkDeptNameUnique(SysDept dept) {
 | 
			
		||||
    public String checkDeptNameUnique(SysDeptBo dept) {
 | 
			
		||||
        boolean exist = baseMapper.exists(new LambdaQueryWrapper<SysDept>()
 | 
			
		||||
            .eq(SysDept::getDeptName, dept.getDeptName())
 | 
			
		||||
            .eq(SysDept::getParentId, dept.getParentId())
 | 
			
		||||
@@ -178,9 +189,9 @@ public class SysDeptServiceImpl implements ISysDeptService {
 | 
			
		||||
    @Override
 | 
			
		||||
    public void checkDeptDataScope(Long deptId) {
 | 
			
		||||
        if (!LoginHelper.isAdmin()) {
 | 
			
		||||
            SysDept dept = new SysDept();
 | 
			
		||||
            SysDeptBo dept = new SysDeptBo();
 | 
			
		||||
            dept.setDeptId(deptId);
 | 
			
		||||
            List<SysDept> depts = this.selectDeptList(dept);
 | 
			
		||||
            List<SysDeptVo> depts = this.selectDeptList(dept);
 | 
			
		||||
            if (CollUtil.isEmpty(depts)) {
 | 
			
		||||
                throw new ServiceException("没有权限访问部门数据!");
 | 
			
		||||
            }
 | 
			
		||||
@@ -190,16 +201,17 @@ public class SysDeptServiceImpl implements ISysDeptService {
 | 
			
		||||
    /**
 | 
			
		||||
     * 新增保存部门信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param dept 部门信息
 | 
			
		||||
     * @param bo 部门信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public int insertDept(SysDept dept) {
 | 
			
		||||
        SysDept info = baseMapper.selectById(dept.getParentId());
 | 
			
		||||
    public int insertDept(SysDeptBo bo) {
 | 
			
		||||
        SysDept info = baseMapper.selectById(bo.getParentId());
 | 
			
		||||
        // 如果父节点不为正常状态,则不允许新增子节点
 | 
			
		||||
        if (!UserConstants.DEPT_NORMAL.equals(info.getStatus())) {
 | 
			
		||||
            throw new ServiceException("部门停用,不允许新增");
 | 
			
		||||
        }
 | 
			
		||||
        SysDept dept = BeanUtil.toBean(bo, SysDept.class);
 | 
			
		||||
        dept.setAncestors(info.getAncestors() + "," + dept.getParentId());
 | 
			
		||||
        return baseMapper.insert(dept);
 | 
			
		||||
    }
 | 
			
		||||
@@ -207,11 +219,12 @@ public class SysDeptServiceImpl implements ISysDeptService {
 | 
			
		||||
    /**
 | 
			
		||||
     * 修改保存部门信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param dept 部门信息
 | 
			
		||||
     * @param bo 部门信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public int updateDept(SysDept dept) {
 | 
			
		||||
    public int updateDept(SysDeptBo bo) {
 | 
			
		||||
        SysDept dept = BeanUtil.toBean(bo, SysDept.class);
 | 
			
		||||
        SysDept newParentDept = baseMapper.selectById(dept.getParentId());
 | 
			
		||||
        SysDept oldDept = baseMapper.selectById(dept.getDeptId());
 | 
			
		||||
        if (ObjectUtil.isNotNull(newParentDept) && ObjectUtil.isNotNull(oldDept)) {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,8 @@
 | 
			
		||||
package com.ruoyi.system.service.impl;
 | 
			
		||||
 | 
			
		||||
import cn.hutool.core.bean.BeanUtil;
 | 
			
		||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 | 
			
		||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 | 
			
		||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 | 
			
		||||
import com.ruoyi.common.core.constant.CacheNames;
 | 
			
		||||
import com.ruoyi.common.mybatis.core.page.PageQuery;
 | 
			
		||||
@@ -9,6 +11,8 @@ import com.ruoyi.common.mybatis.core.page.TableDataInfo;
 | 
			
		||||
import com.ruoyi.common.core.exception.ServiceException;
 | 
			
		||||
import com.ruoyi.common.core.utils.StringUtils;
 | 
			
		||||
import com.ruoyi.common.redis.utils.CacheUtils;
 | 
			
		||||
import com.ruoyi.system.domain.bo.SysDictDataBo;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysDictDataVo;
 | 
			
		||||
import com.ruoyi.system.mapper.SysDictDataMapper;
 | 
			
		||||
import com.ruoyi.system.service.ISysDictDataService;
 | 
			
		||||
import lombok.RequiredArgsConstructor;
 | 
			
		||||
@@ -29,13 +33,9 @@ public class SysDictDataServiceImpl implements ISysDictDataService {
 | 
			
		||||
    private final SysDictDataMapper baseMapper;
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public TableDataInfo<SysDictData> selectPageDictDataList(SysDictData dictData, PageQuery pageQuery) {
 | 
			
		||||
        LambdaQueryWrapper<SysDictData> lqw = new LambdaQueryWrapper<SysDictData>()
 | 
			
		||||
            .eq(StringUtils.isNotBlank(dictData.getDictType()), SysDictData::getDictType, dictData.getDictType())
 | 
			
		||||
            .like(StringUtils.isNotBlank(dictData.getDictLabel()), SysDictData::getDictLabel, dictData.getDictLabel())
 | 
			
		||||
            .eq(StringUtils.isNotBlank(dictData.getStatus()), SysDictData::getStatus, dictData.getStatus())
 | 
			
		||||
            .orderByAsc(SysDictData::getDictSort);
 | 
			
		||||
        Page<SysDictData> page = baseMapper.selectPage(pageQuery.build(), lqw);
 | 
			
		||||
    public TableDataInfo<SysDictDataVo> selectPageDictDataList(SysDictDataBo dictData, PageQuery pageQuery) {
 | 
			
		||||
        LambdaQueryWrapper<SysDictData> lqw = buildQueryWrapper(dictData);
 | 
			
		||||
        Page<SysDictDataVo> page = baseMapper.selectVoPage(pageQuery.build(), lqw);
 | 
			
		||||
        return TableDataInfo.build(page);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -46,12 +46,19 @@ public class SysDictDataServiceImpl implements ISysDictDataService {
 | 
			
		||||
     * @return 字典数据集合信息
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public List<SysDictData> selectDictDataList(SysDictData dictData) {
 | 
			
		||||
        return baseMapper.selectList(new LambdaQueryWrapper<SysDictData>()
 | 
			
		||||
            .eq(StringUtils.isNotBlank(dictData.getDictType()), SysDictData::getDictType, dictData.getDictType())
 | 
			
		||||
            .like(StringUtils.isNotBlank(dictData.getDictLabel()), SysDictData::getDictLabel, dictData.getDictLabel())
 | 
			
		||||
            .eq(StringUtils.isNotBlank(dictData.getStatus()), SysDictData::getStatus, dictData.getStatus())
 | 
			
		||||
            .orderByAsc(SysDictData::getDictSort));
 | 
			
		||||
    public List<SysDictDataVo> selectDictDataList(SysDictDataBo dictData) {
 | 
			
		||||
        LambdaQueryWrapper<SysDictData> lqw = buildQueryWrapper(dictData);
 | 
			
		||||
        return baseMapper.selectVoList(lqw);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private LambdaQueryWrapper<SysDictData> buildQueryWrapper(SysDictDataBo bo) {
 | 
			
		||||
        LambdaQueryWrapper<SysDictData> lqw = Wrappers.lambdaQuery();
 | 
			
		||||
        lqw.eq(bo.getDictSort() != null, SysDictData::getDictSort, bo.getDictSort());
 | 
			
		||||
        lqw.like(StringUtils.isNotBlank(bo.getDictLabel()), SysDictData::getDictLabel, bo.getDictLabel());
 | 
			
		||||
        lqw.eq(StringUtils.isNotBlank(bo.getDictType()), SysDictData::getDictType, bo.getDictType());
 | 
			
		||||
        lqw.eq(StringUtils.isNotBlank(bo.getStatus()), SysDictData::getStatus, bo.getStatus());
 | 
			
		||||
        lqw.orderByAsc(SysDictData::getDictSort);
 | 
			
		||||
        return lqw;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -77,8 +84,8 @@ public class SysDictDataServiceImpl implements ISysDictDataService {
 | 
			
		||||
     * @return 字典数据
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public SysDictData selectDictDataById(Long dictCode) {
 | 
			
		||||
        return baseMapper.selectById(dictCode);
 | 
			
		||||
    public SysDictDataVo selectDictDataById(Long dictCode) {
 | 
			
		||||
        return baseMapper.selectVoById(dictCode);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -89,7 +96,7 @@ public class SysDictDataServiceImpl implements ISysDictDataService {
 | 
			
		||||
    @Override
 | 
			
		||||
    public void deleteDictDataByIds(Long[] dictCodes) {
 | 
			
		||||
        for (Long dictCode : dictCodes) {
 | 
			
		||||
            SysDictData data = selectDictDataById(dictCode);
 | 
			
		||||
            SysDictData data = baseMapper.selectById(dictCode);
 | 
			
		||||
            baseMapper.deleteById(dictCode);
 | 
			
		||||
            CacheUtils.evict(CacheNames.SYS_DICT, data.getDictType());
 | 
			
		||||
        }
 | 
			
		||||
@@ -98,12 +105,13 @@ public class SysDictDataServiceImpl implements ISysDictDataService {
 | 
			
		||||
    /**
 | 
			
		||||
     * 新增保存字典数据信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param data 字典数据信息
 | 
			
		||||
     * @param bo 字典数据信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    @CachePut(cacheNames = CacheNames.SYS_DICT, key = "#data.dictType")
 | 
			
		||||
    @CachePut(cacheNames = CacheNames.SYS_DICT, key = "#bo.dictType")
 | 
			
		||||
    @Override
 | 
			
		||||
    public List<SysDictData> insertDictData(SysDictData data) {
 | 
			
		||||
    public List<SysDictDataVo> insertDictData(SysDictDataBo bo) {
 | 
			
		||||
        SysDictData data = BeanUtil.toBean(bo, SysDictData.class);
 | 
			
		||||
        int row = baseMapper.insert(data);
 | 
			
		||||
        if (row > 0) {
 | 
			
		||||
            return baseMapper.selectDictDataByType(data.getDictType());
 | 
			
		||||
@@ -114,12 +122,13 @@ public class SysDictDataServiceImpl implements ISysDictDataService {
 | 
			
		||||
    /**
 | 
			
		||||
     * 修改保存字典数据信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param data 字典数据信息
 | 
			
		||||
     * @param bo 字典数据信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    @CachePut(cacheNames = CacheNames.SYS_DICT, key = "#data.dictType")
 | 
			
		||||
    @CachePut(cacheNames = CacheNames.SYS_DICT, key = "#bo.dictType")
 | 
			
		||||
    @Override
 | 
			
		||||
    public List<SysDictData> updateDictData(SysDictData data) {
 | 
			
		||||
    public List<SysDictDataVo> updateDictData(SysDictDataBo bo) {
 | 
			
		||||
        SysDictData data = BeanUtil.toBean(bo, SysDictData.class);
 | 
			
		||||
        int row = baseMapper.updateById(data);
 | 
			
		||||
        if (row > 0) {
 | 
			
		||||
            return baseMapper.selectDictDataByType(data.getDictType());
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,12 @@
 | 
			
		||||
package com.ruoyi.system.service.impl;
 | 
			
		||||
 | 
			
		||||
import cn.dev33.satoken.context.SaHolder;
 | 
			
		||||
import cn.hutool.core.bean.BeanUtil;
 | 
			
		||||
import cn.hutool.core.collection.CollUtil;
 | 
			
		||||
import cn.hutool.core.util.ObjectUtil;
 | 
			
		||||
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.plugins.pagination.Page;
 | 
			
		||||
import com.ruoyi.common.core.constant.CacheConstants;
 | 
			
		||||
import com.ruoyi.common.core.constant.CacheNames;
 | 
			
		||||
@@ -19,6 +21,9 @@ import com.ruoyi.common.core.utils.StreamUtils;
 | 
			
		||||
import com.ruoyi.common.core.utils.StringUtils;
 | 
			
		||||
import com.ruoyi.common.redis.utils.CacheUtils;
 | 
			
		||||
import com.ruoyi.common.core.utils.SpringUtils;
 | 
			
		||||
import com.ruoyi.system.domain.bo.SysDictTypeBo;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysDictDataVo;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysDictTypeVo;
 | 
			
		||||
import com.ruoyi.system.mapper.SysDictDataMapper;
 | 
			
		||||
import com.ruoyi.system.mapper.SysDictTypeMapper;
 | 
			
		||||
import com.ruoyi.system.service.ISysDictTypeService;
 | 
			
		||||
@@ -44,15 +49,9 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService, DictService
 | 
			
		||||
    private final SysDictDataMapper dictDataMapper;
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public TableDataInfo<SysDictType> selectPageDictTypeList(SysDictType dictType, PageQuery pageQuery) {
 | 
			
		||||
        Map<String, Object> params = dictType.getParams();
 | 
			
		||||
        LambdaQueryWrapper<SysDictType> lqw = new LambdaQueryWrapper<SysDictType>()
 | 
			
		||||
            .like(StringUtils.isNotBlank(dictType.getDictName()), SysDictType::getDictName, dictType.getDictName())
 | 
			
		||||
            .eq(StringUtils.isNotBlank(dictType.getStatus()), SysDictType::getStatus, dictType.getStatus())
 | 
			
		||||
            .like(StringUtils.isNotBlank(dictType.getDictType()), SysDictType::getDictType, dictType.getDictType())
 | 
			
		||||
            .between(params.get("beginTime") != null && params.get("endTime") != null,
 | 
			
		||||
                SysDictType::getCreateTime, params.get("beginTime"), params.get("endTime"));
 | 
			
		||||
        Page<SysDictType> page = baseMapper.selectPage(pageQuery.build(), lqw);
 | 
			
		||||
    public TableDataInfo<SysDictTypeVo> selectPageDictTypeList(SysDictTypeBo dictType, PageQuery pageQuery) {
 | 
			
		||||
        LambdaQueryWrapper<SysDictType> lqw = buildQueryWrapper(dictType);
 | 
			
		||||
        Page<SysDictTypeVo> page = baseMapper.selectVoPage(pageQuery.build(), lqw);
 | 
			
		||||
        return TableDataInfo.build(page);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -63,14 +62,20 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService, DictService
 | 
			
		||||
     * @return 字典类型集合信息
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public List<SysDictType> selectDictTypeList(SysDictType dictType) {
 | 
			
		||||
        Map<String, Object> params = dictType.getParams();
 | 
			
		||||
        return baseMapper.selectList(new LambdaQueryWrapper<SysDictType>()
 | 
			
		||||
            .like(StringUtils.isNotBlank(dictType.getDictName()), SysDictType::getDictName, dictType.getDictName())
 | 
			
		||||
            .eq(StringUtils.isNotBlank(dictType.getStatus()), SysDictType::getStatus, dictType.getStatus())
 | 
			
		||||
            .like(StringUtils.isNotBlank(dictType.getDictType()), SysDictType::getDictType, dictType.getDictType())
 | 
			
		||||
            .between(params.get("beginTime") != null && params.get("endTime") != null,
 | 
			
		||||
                SysDictType::getCreateTime, params.get("beginTime"), params.get("endTime")));
 | 
			
		||||
    public List<SysDictTypeVo> selectDictTypeList(SysDictTypeBo dictType) {
 | 
			
		||||
        LambdaQueryWrapper<SysDictType> lqw = buildQueryWrapper(dictType);
 | 
			
		||||
        return baseMapper.selectVoList(lqw);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private LambdaQueryWrapper<SysDictType> buildQueryWrapper(SysDictTypeBo bo) {
 | 
			
		||||
        Map<String, Object> params = bo.getParams();
 | 
			
		||||
        LambdaQueryWrapper<SysDictType> lqw = Wrappers.lambdaQuery();
 | 
			
		||||
        lqw.like(StringUtils.isNotBlank(bo.getDictName()), SysDictType::getDictName, bo.getDictName());
 | 
			
		||||
        lqw.like(StringUtils.isNotBlank(bo.getDictType()), SysDictType::getDictType, bo.getDictType());
 | 
			
		||||
        lqw.eq(StringUtils.isNotBlank(bo.getStatus()), SysDictType::getStatus, bo.getStatus());
 | 
			
		||||
        lqw.between(params.get("beginTime") != null && params.get("endTime") != null,
 | 
			
		||||
            SysDictType::getCreateTime, params.get("beginTime"), params.get("endTime"));
 | 
			
		||||
        return lqw;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -91,8 +96,8 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService, DictService
 | 
			
		||||
     */
 | 
			
		||||
    @Cacheable(cacheNames = CacheNames.SYS_DICT, key = "#dictType")
 | 
			
		||||
    @Override
 | 
			
		||||
    public List<SysDictData> selectDictDataByType(String dictType) {
 | 
			
		||||
        List<SysDictData> dictDatas = dictDataMapper.selectDictDataByType(dictType);
 | 
			
		||||
    public List<SysDictDataVo> selectDictDataByType(String dictType) {
 | 
			
		||||
        List<SysDictDataVo> dictDatas = dictDataMapper.selectDictDataByType(dictType);
 | 
			
		||||
        if (CollUtil.isNotEmpty(dictDatas)) {
 | 
			
		||||
            return dictDatas;
 | 
			
		||||
        }
 | 
			
		||||
@@ -106,8 +111,8 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService, DictService
 | 
			
		||||
     * @return 字典类型
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public SysDictType selectDictTypeById(Long dictId) {
 | 
			
		||||
        return baseMapper.selectById(dictId);
 | 
			
		||||
    public SysDictTypeVo selectDictTypeById(Long dictId) {
 | 
			
		||||
        return baseMapper.selectVoById(dictId);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -118,8 +123,8 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService, DictService
 | 
			
		||||
     */
 | 
			
		||||
    @Cacheable(cacheNames = CacheNames.SYS_DICT, key = "#dictType")
 | 
			
		||||
    @Override
 | 
			
		||||
    public SysDictType selectDictTypeByType(String dictType) {
 | 
			
		||||
        return baseMapper.selectById(new LambdaQueryWrapper<SysDictType>().eq(SysDictType::getDictType, dictType));
 | 
			
		||||
    public SysDictTypeVo selectDictTypeByType(String dictType) {
 | 
			
		||||
        return baseMapper.selectVoById(new LambdaQueryWrapper<SysDictType>().eq(SysDictType::getDictType, dictType));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -130,7 +135,7 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService, DictService
 | 
			
		||||
    @Override
 | 
			
		||||
    public void deleteDictTypeByIds(Long[] dictIds) {
 | 
			
		||||
        for (Long dictId : dictIds) {
 | 
			
		||||
            SysDictType dictType = selectDictTypeById(dictId);
 | 
			
		||||
            SysDictType dictType = baseMapper.selectById(dictId);
 | 
			
		||||
            if (dictDataMapper.exists(new LambdaQueryWrapper<SysDictData>()
 | 
			
		||||
                .eq(SysDictData::getDictType, dictType.getDictType()))) {
 | 
			
		||||
                throw new ServiceException(String.format("%1$s已分配,不能删除", dictType.getDictName()));
 | 
			
		||||
@@ -145,11 +150,11 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService, DictService
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public void loadingDictCache() {
 | 
			
		||||
        List<SysDictData> dictDataList = dictDataMapper.selectList(
 | 
			
		||||
        List<SysDictDataVo> dictDataList = dictDataMapper.selectVoList(
 | 
			
		||||
            new LambdaQueryWrapper<SysDictData>().eq(SysDictData::getStatus, UserConstants.DICT_NORMAL));
 | 
			
		||||
        Map<String, List<SysDictData>> dictDataMap = StreamUtils.groupByKey(dictDataList, SysDictData::getDictType);
 | 
			
		||||
        Map<String, List<SysDictDataVo>> dictDataMap = StreamUtils.groupByKey(dictDataList, SysDictDataVo::getDictType);
 | 
			
		||||
        dictDataMap.forEach((k,v) -> {
 | 
			
		||||
            List<SysDictData> dictList = StreamUtils.sorted(v, Comparator.comparing(SysDictData::getDictSort));
 | 
			
		||||
            List<SysDictDataVo> dictList = StreamUtils.sorted(v, Comparator.comparing(SysDictDataVo::getDictSort));
 | 
			
		||||
            CacheUtils.put(CacheNames.SYS_DICT, k, dictList);
 | 
			
		||||
        });
 | 
			
		||||
    }
 | 
			
		||||
@@ -174,12 +179,13 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService, DictService
 | 
			
		||||
    /**
 | 
			
		||||
     * 新增保存字典类型信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param dict 字典类型信息
 | 
			
		||||
     * @param bo 字典类型信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    @CachePut(cacheNames = CacheNames.SYS_DICT, key = "#dict.dictType")
 | 
			
		||||
    @CachePut(cacheNames = CacheNames.SYS_DICT, key = "#bo.dictType")
 | 
			
		||||
    @Override
 | 
			
		||||
    public List<SysDictData> insertDictType(SysDictType dict) {
 | 
			
		||||
    public List<SysDictTypeVo> insertDictType(SysDictTypeBo bo) {
 | 
			
		||||
        SysDictType dict = BeanUtil.toBean(bo, SysDictType.class);
 | 
			
		||||
        int row = baseMapper.insert(dict);
 | 
			
		||||
        if (row > 0) {
 | 
			
		||||
            return new ArrayList<>();
 | 
			
		||||
@@ -190,13 +196,14 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService, DictService
 | 
			
		||||
    /**
 | 
			
		||||
     * 修改保存字典类型信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param dict 字典类型信息
 | 
			
		||||
     * @param bo 字典类型信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    @CachePut(cacheNames = CacheNames.SYS_DICT, key = "#dict.dictType")
 | 
			
		||||
    @CachePut(cacheNames = CacheNames.SYS_DICT, key = "#bo.dictType")
 | 
			
		||||
    @Override
 | 
			
		||||
    @Transactional(rollbackFor = Exception.class)
 | 
			
		||||
    public List<SysDictData> updateDictType(SysDictType dict) {
 | 
			
		||||
    public List<SysDictDataVo> updateDictType(SysDictTypeBo bo) {
 | 
			
		||||
        SysDictType dict = BeanUtil.toBean(bo, SysDictType.class);
 | 
			
		||||
        SysDictType oldDict = baseMapper.selectById(dict.getDictId());
 | 
			
		||||
        dictDataMapper.update(null, new LambdaUpdateWrapper<SysDictData>()
 | 
			
		||||
            .set(SysDictData::getDictType, dict.getDictType())
 | 
			
		||||
@@ -212,14 +219,14 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService, DictService
 | 
			
		||||
    /**
 | 
			
		||||
     * 校验字典类型称是否唯一
 | 
			
		||||
     *
 | 
			
		||||
     * @param dict 字典类型
 | 
			
		||||
     * @param dictType 字典类型
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public String checkDictTypeUnique(SysDictType dict) {
 | 
			
		||||
    public String checkDictTypeUnique(SysDictTypeBo dictType) {
 | 
			
		||||
        boolean exist = baseMapper.exists(new LambdaQueryWrapper<SysDictType>()
 | 
			
		||||
            .eq(SysDictType::getDictType, dict.getDictType())
 | 
			
		||||
            .ne(ObjectUtil.isNotNull(dict.getDictId()), SysDictType::getDictId, dict.getDictId()));
 | 
			
		||||
            .eq(SysDictType::getDictType, dictType.getDictType())
 | 
			
		||||
            .ne(ObjectUtil.isNotNull(dictType.getDictId()), SysDictType::getDictId, dictType.getDictId()));
 | 
			
		||||
        if (exist) {
 | 
			
		||||
            return UserConstants.NOT_UNIQUE;
 | 
			
		||||
        }
 | 
			
		||||
@@ -238,13 +245,13 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService, DictService
 | 
			
		||||
    @Override
 | 
			
		||||
    public String getDictLabel(String dictType, String dictValue, String separator) {
 | 
			
		||||
        // 优先从本地缓存获取
 | 
			
		||||
        List<SysDictData> datas = (List<SysDictData>) SaHolder.getStorage().get(CacheConstants.SYS_DICT_KEY + dictType);
 | 
			
		||||
        List<SysDictDataVo> datas = (List<SysDictDataVo>) SaHolder.getStorage().get(CacheConstants.SYS_DICT_KEY + dictType);
 | 
			
		||||
        if (ObjectUtil.isNull(datas)) {
 | 
			
		||||
            datas = SpringUtils.getAopProxy(this).selectDictDataByType(dictType);
 | 
			
		||||
            SaHolder.getStorage().set(CacheConstants.SYS_DICT_KEY + dictType, datas);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        Map<String, String> map = StreamUtils.toMap(datas, SysDictData::getDictValue, SysDictData::getDictLabel);
 | 
			
		||||
        Map<String, String> map = StreamUtils.toMap(datas, SysDictDataVo::getDictValue, SysDictDataVo::getDictLabel);
 | 
			
		||||
        if (StringUtils.containsAny(dictValue, separator)) {
 | 
			
		||||
            return Arrays.stream(dictValue.split(separator))
 | 
			
		||||
                .map(v -> map.getOrDefault(v, StringUtils.EMPTY))
 | 
			
		||||
@@ -266,13 +273,13 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService, DictService
 | 
			
		||||
    @Override
 | 
			
		||||
    public String getDictValue(String dictType, String dictLabel, String separator) {
 | 
			
		||||
        // 优先从本地缓存获取
 | 
			
		||||
        List<SysDictData> datas = (List<SysDictData>) SaHolder.getStorage().get(CacheConstants.SYS_DICT_KEY + dictType);
 | 
			
		||||
        List<SysDictDataVo> datas = (List<SysDictDataVo>) SaHolder.getStorage().get(CacheConstants.SYS_DICT_KEY + dictType);
 | 
			
		||||
        if (ObjectUtil.isNull(datas)) {
 | 
			
		||||
            datas = SpringUtils.getAopProxy(this).selectDictDataByType(dictType);
 | 
			
		||||
            SaHolder.getStorage().set(CacheConstants.SYS_DICT_KEY + dictType, datas);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        Map<String, String> map = StreamUtils.toMap(datas, SysDictData::getDictLabel, SysDictData::getDictValue);
 | 
			
		||||
        Map<String, String> map = StreamUtils.toMap(datas, SysDictDataVo::getDictLabel, SysDictDataVo::getDictValue);
 | 
			
		||||
        if (StringUtils.containsAny(dictLabel, separator)) {
 | 
			
		||||
            return Arrays.stream(dictLabel.split(separator))
 | 
			
		||||
                .map(l -> map.getOrDefault(l, StringUtils.EMPTY))
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,6 @@
 | 
			
		||||
package com.ruoyi.system.service.impl;
 | 
			
		||||
 | 
			
		||||
import cn.hutool.core.bean.BeanUtil;
 | 
			
		||||
import cn.hutool.core.collection.CollUtil;
 | 
			
		||||
import cn.hutool.core.lang.tree.Tree;
 | 
			
		||||
import cn.hutool.core.util.ObjectUtil;
 | 
			
		||||
@@ -15,8 +16,10 @@ import com.ruoyi.common.satoken.utils.LoginHelper;
 | 
			
		||||
import com.ruoyi.system.domain.SysMenu;
 | 
			
		||||
import com.ruoyi.system.domain.SysRole;
 | 
			
		||||
import com.ruoyi.system.domain.SysRoleMenu;
 | 
			
		||||
import com.ruoyi.system.domain.bo.SysMenuBo;
 | 
			
		||||
import com.ruoyi.system.domain.vo.MetaVo;
 | 
			
		||||
import com.ruoyi.system.domain.vo.RouterVo;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysMenuVo;
 | 
			
		||||
import com.ruoyi.system.mapper.SysMenuMapper;
 | 
			
		||||
import com.ruoyi.system.mapper.SysRoleMapper;
 | 
			
		||||
import com.ruoyi.system.mapper.SysRoleMenuMapper;
 | 
			
		||||
@@ -221,8 +224,8 @@ public class SysMenuServiceImpl implements ISysMenuService {
 | 
			
		||||
     * @return 菜单信息
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public SysMenu selectMenuById(Long menuId) {
 | 
			
		||||
        return baseMapper.selectById(menuId);
 | 
			
		||||
    public SysMenuVo selectMenuById(Long menuId) {
 | 
			
		||||
        return baseMapper.selectVoById(menuId);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -250,22 +253,24 @@ public class SysMenuServiceImpl implements ISysMenuService {
 | 
			
		||||
    /**
 | 
			
		||||
     * 新增保存菜单信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param menu 菜单信息
 | 
			
		||||
     * @param bo 菜单信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public int insertMenu(SysMenu menu) {
 | 
			
		||||
    public int insertMenu(SysMenuBo bo) {
 | 
			
		||||
        SysMenu menu = BeanUtil.toBean(bo, SysMenu.class);
 | 
			
		||||
        return baseMapper.insert(menu);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 修改保存菜单信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param menu 菜单信息
 | 
			
		||||
     * @param bo 菜单信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public int updateMenu(SysMenu menu) {
 | 
			
		||||
    public int updateMenu(SysMenuBo bo) {
 | 
			
		||||
        SysMenu menu = BeanUtil.toBean(bo, SysMenu.class);
 | 
			
		||||
        return baseMapper.updateById(menu);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -287,7 +292,7 @@ public class SysMenuServiceImpl implements ISysMenuService {
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public String checkMenuNameUnique(SysMenu menu) {
 | 
			
		||||
    public String checkMenuNameUnique(SysMenuBo menu) {
 | 
			
		||||
        boolean exist = baseMapper.exists(new LambdaQueryWrapper<SysMenu>()
 | 
			
		||||
            .eq(SysMenu::getMenuName, menu.getMenuName())
 | 
			
		||||
            .eq(SysMenu::getParentId, menu.getParentId())
 | 
			
		||||
 
 | 
			
		||||
@@ -1,12 +1,16 @@
 | 
			
		||||
package com.ruoyi.system.service.impl;
 | 
			
		||||
 | 
			
		||||
import cn.hutool.core.bean.BeanUtil;
 | 
			
		||||
import cn.hutool.core.util.ObjectUtil;
 | 
			
		||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 | 
			
		||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 | 
			
		||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 | 
			
		||||
import com.ruoyi.common.mybatis.core.page.PageQuery;
 | 
			
		||||
import com.ruoyi.common.mybatis.core.page.TableDataInfo;
 | 
			
		||||
import com.ruoyi.common.core.utils.StringUtils;
 | 
			
		||||
import com.ruoyi.system.domain.SysNotice;
 | 
			
		||||
import com.ruoyi.system.domain.bo.SysNoticeBo;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysNoticeVo;
 | 
			
		||||
import com.ruoyi.system.mapper.SysNoticeMapper;
 | 
			
		||||
import com.ruoyi.system.service.ISysNoticeService;
 | 
			
		||||
import lombok.RequiredArgsConstructor;
 | 
			
		||||
@@ -27,12 +31,9 @@ public class SysNoticeServiceImpl implements ISysNoticeService {
 | 
			
		||||
    private final SysNoticeMapper baseMapper;
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public TableDataInfo<SysNotice> selectPageNoticeList(SysNotice notice, PageQuery pageQuery) {
 | 
			
		||||
        LambdaQueryWrapper<SysNotice> lqw = new LambdaQueryWrapper<SysNotice>()
 | 
			
		||||
            .like(StringUtils.isNotBlank(notice.getNoticeTitle()), SysNotice::getNoticeTitle, notice.getNoticeTitle())
 | 
			
		||||
            .eq(StringUtils.isNotBlank(notice.getNoticeType()), SysNotice::getNoticeType, notice.getNoticeType())
 | 
			
		||||
            .like(ObjectUtil.isNotNull(notice.getCreateBy()), SysNotice::getCreateBy, notice.getCreateBy());
 | 
			
		||||
        Page<SysNotice> page = baseMapper.selectPage(pageQuery.build(), lqw);
 | 
			
		||||
    public TableDataInfo<SysNoticeVo> selectPageNoticeList(SysNoticeBo notice, PageQuery pageQuery) {
 | 
			
		||||
        LambdaQueryWrapper<SysNotice> lqw = buildQueryWrapper(notice);
 | 
			
		||||
        Page<SysNoticeVo> page = baseMapper.selectVoPage(pageQuery.build(), lqw);
 | 
			
		||||
        return TableDataInfo.build(page);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -43,8 +44,8 @@ public class SysNoticeServiceImpl implements ISysNoticeService {
 | 
			
		||||
     * @return 公告信息
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public SysNotice selectNoticeById(Long noticeId) {
 | 
			
		||||
        return baseMapper.selectById(noticeId);
 | 
			
		||||
    public SysNoticeVo selectNoticeById(Long noticeId) {
 | 
			
		||||
        return baseMapper.selectVoById(noticeId);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -54,32 +55,40 @@ public class SysNoticeServiceImpl implements ISysNoticeService {
 | 
			
		||||
     * @return 公告集合
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public List<SysNotice> selectNoticeList(SysNotice notice) {
 | 
			
		||||
        return baseMapper.selectList(new LambdaQueryWrapper<SysNotice>()
 | 
			
		||||
            .like(StringUtils.isNotBlank(notice.getNoticeTitle()), SysNotice::getNoticeTitle, notice.getNoticeTitle())
 | 
			
		||||
            .eq(StringUtils.isNotBlank(notice.getNoticeType()), SysNotice::getNoticeType, notice.getNoticeType())
 | 
			
		||||
            .like(ObjectUtil.isNotNull(notice.getCreateBy()), SysNotice::getCreateBy, notice.getCreateBy()));
 | 
			
		||||
    public List<SysNoticeVo> selectNoticeList(SysNoticeBo notice) {
 | 
			
		||||
        LambdaQueryWrapper<SysNotice> lqw = buildQueryWrapper(notice);
 | 
			
		||||
        return baseMapper.selectVoList(lqw);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private LambdaQueryWrapper<SysNotice> buildQueryWrapper(SysNoticeBo bo) {
 | 
			
		||||
        LambdaQueryWrapper<SysNotice> lqw = Wrappers.lambdaQuery();
 | 
			
		||||
        lqw.like(StringUtils.isNotBlank(bo.getNoticeTitle()), SysNotice::getNoticeTitle, bo.getNoticeTitle());
 | 
			
		||||
        lqw.eq(StringUtils.isNotBlank(bo.getNoticeType()), SysNotice::getNoticeType, bo.getNoticeType());
 | 
			
		||||
        lqw.eq(ObjectUtil.isNotNull(bo.getCreateBy()), SysNotice::getCreateBy, bo.getCreateBy());
 | 
			
		||||
        return lqw;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 新增公告
 | 
			
		||||
     *
 | 
			
		||||
     * @param notice 公告信息
 | 
			
		||||
     * @param bo 公告信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public int insertNotice(SysNotice notice) {
 | 
			
		||||
    public int insertNotice(SysNoticeBo bo) {
 | 
			
		||||
        SysNotice notice = BeanUtil.toBean(bo, SysNotice.class);
 | 
			
		||||
        return baseMapper.insert(notice);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 修改公告
 | 
			
		||||
     *
 | 
			
		||||
     * @param notice 公告信息
 | 
			
		||||
     * @param bo 公告信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public int updateNotice(SysNotice notice) {
 | 
			
		||||
    public int updateNotice(SysNoticeBo bo) {
 | 
			
		||||
        SysNotice notice = BeanUtil.toBean(bo, SysNotice.class);
 | 
			
		||||
        return baseMapper.updateById(notice);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,10 @@
 | 
			
		||||
package com.ruoyi.system.service.impl;
 | 
			
		||||
 | 
			
		||||
import cn.hutool.core.bean.BeanUtil;
 | 
			
		||||
import cn.hutool.core.util.ObjectUtil;
 | 
			
		||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 | 
			
		||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 | 
			
		||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 | 
			
		||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 | 
			
		||||
import com.ruoyi.common.core.constant.UserConstants;
 | 
			
		||||
import com.ruoyi.common.mybatis.core.page.PageQuery;
 | 
			
		||||
@@ -10,6 +13,8 @@ import com.ruoyi.common.core.exception.ServiceException;
 | 
			
		||||
import com.ruoyi.common.core.utils.StringUtils;
 | 
			
		||||
import com.ruoyi.system.domain.SysPost;
 | 
			
		||||
import com.ruoyi.system.domain.SysUserPost;
 | 
			
		||||
import com.ruoyi.system.domain.bo.SysPostBo;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysPostVo;
 | 
			
		||||
import com.ruoyi.system.mapper.SysPostMapper;
 | 
			
		||||
import com.ruoyi.system.mapper.SysUserPostMapper;
 | 
			
		||||
import com.ruoyi.system.service.ISysPostService;
 | 
			
		||||
@@ -32,12 +37,9 @@ public class SysPostServiceImpl implements ISysPostService {
 | 
			
		||||
    private final SysUserPostMapper userPostMapper;
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public TableDataInfo<SysPost> selectPagePostList(SysPost post, PageQuery pageQuery) {
 | 
			
		||||
        LambdaQueryWrapper<SysPost> lqw = new LambdaQueryWrapper<SysPost>()
 | 
			
		||||
            .like(StringUtils.isNotBlank(post.getPostCode()), SysPost::getPostCode, post.getPostCode())
 | 
			
		||||
            .eq(StringUtils.isNotBlank(post.getStatus()), SysPost::getStatus, post.getStatus())
 | 
			
		||||
            .like(StringUtils.isNotBlank(post.getPostName()), SysPost::getPostName, post.getPostName());
 | 
			
		||||
        Page<SysPost> page = baseMapper.selectPage(pageQuery.build(), lqw);
 | 
			
		||||
    public TableDataInfo<SysPostVo> selectPagePostList(SysPostBo post, PageQuery pageQuery) {
 | 
			
		||||
        LambdaQueryWrapper<SysPost> lqw = buildQueryWrapper(post);
 | 
			
		||||
        Page<SysPostVo> page = baseMapper.selectVoPage(pageQuery.build(), lqw);
 | 
			
		||||
        return TableDataInfo.build(page);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -48,11 +50,18 @@ public class SysPostServiceImpl implements ISysPostService {
 | 
			
		||||
     * @return 岗位信息集合
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public List<SysPost> selectPostList(SysPost post) {
 | 
			
		||||
        return baseMapper.selectList(new LambdaQueryWrapper<SysPost>()
 | 
			
		||||
            .like(StringUtils.isNotBlank(post.getPostCode()), SysPost::getPostCode, post.getPostCode())
 | 
			
		||||
            .eq(StringUtils.isNotBlank(post.getStatus()), SysPost::getStatus, post.getStatus())
 | 
			
		||||
            .like(StringUtils.isNotBlank(post.getPostName()), SysPost::getPostName, post.getPostName()));
 | 
			
		||||
    public List<SysPostVo> selectPostList(SysPostBo post) {
 | 
			
		||||
        LambdaQueryWrapper<SysPost> lqw = buildQueryWrapper(post);
 | 
			
		||||
        return baseMapper.selectVoList(lqw);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private LambdaQueryWrapper<SysPost> buildQueryWrapper(SysPostBo bo) {
 | 
			
		||||
        LambdaQueryWrapper<SysPost> lqw = Wrappers.lambdaQuery();
 | 
			
		||||
        lqw.like(StringUtils.isNotBlank(bo.getPostCode()), SysPost::getPostCode, bo.getPostCode());
 | 
			
		||||
        lqw.like(StringUtils.isNotBlank(bo.getPostName()), SysPost::getPostName, bo.getPostName());
 | 
			
		||||
        lqw.eq(StringUtils.isNotBlank(bo.getStatus()), SysPost::getStatus, bo.getStatus());
 | 
			
		||||
        lqw.orderByAsc(SysPost::getPostSort);
 | 
			
		||||
        return lqw;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -61,8 +70,8 @@ public class SysPostServiceImpl implements ISysPostService {
 | 
			
		||||
     * @return 岗位列表
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public List<SysPost> selectPostAll() {
 | 
			
		||||
        return baseMapper.selectList();
 | 
			
		||||
    public List<SysPostVo> selectPostAll() {
 | 
			
		||||
        return baseMapper.selectVoList(new QueryWrapper<>());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -72,8 +81,8 @@ public class SysPostServiceImpl implements ISysPostService {
 | 
			
		||||
     * @return 角色对象信息
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public SysPost selectPostById(Long postId) {
 | 
			
		||||
        return baseMapper.selectById(postId);
 | 
			
		||||
    public SysPostVo selectPostById(Long postId) {
 | 
			
		||||
        return baseMapper.selectVoById(postId);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -94,7 +103,7 @@ public class SysPostServiceImpl implements ISysPostService {
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public String checkPostNameUnique(SysPost post) {
 | 
			
		||||
    public String checkPostNameUnique(SysPostBo post) {
 | 
			
		||||
        boolean exist = baseMapper.exists(new LambdaQueryWrapper<SysPost>()
 | 
			
		||||
            .eq(SysPost::getPostName, post.getPostName())
 | 
			
		||||
            .ne(ObjectUtil.isNotNull(post.getPostId()), SysPost::getPostId, post.getPostId()));
 | 
			
		||||
@@ -111,7 +120,7 @@ public class SysPostServiceImpl implements ISysPostService {
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public String checkPostCodeUnique(SysPost post) {
 | 
			
		||||
    public String checkPostCodeUnique(SysPostBo post) {
 | 
			
		||||
        boolean exist = baseMapper.exists(new LambdaQueryWrapper<SysPost>()
 | 
			
		||||
            .eq(SysPost::getPostCode, post.getPostCode())
 | 
			
		||||
            .ne(ObjectUtil.isNotNull(post.getPostId()), SysPost::getPostId, post.getPostId()));
 | 
			
		||||
@@ -152,7 +161,7 @@ public class SysPostServiceImpl implements ISysPostService {
 | 
			
		||||
    @Override
 | 
			
		||||
    public int deletePostByIds(Long[] postIds) {
 | 
			
		||||
        for (Long postId : postIds) {
 | 
			
		||||
            SysPost post = selectPostById(postId);
 | 
			
		||||
            SysPost post = baseMapper.selectById(postId);
 | 
			
		||||
            if (countUserPostById(postId) > 0) {
 | 
			
		||||
                throw new ServiceException(String.format("%1$s已分配,不能删除", post.getPostName()));
 | 
			
		||||
            }
 | 
			
		||||
@@ -163,22 +172,24 @@ public class SysPostServiceImpl implements ISysPostService {
 | 
			
		||||
    /**
 | 
			
		||||
     * 新增保存岗位信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param post 岗位信息
 | 
			
		||||
     * @param bo 岗位信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public int insertPost(SysPost post) {
 | 
			
		||||
    public int insertPost(SysPostBo bo) {
 | 
			
		||||
        SysPost post = BeanUtil.toBean(bo, SysPost.class);
 | 
			
		||||
        return baseMapper.insert(post);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 修改保存岗位信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param post 岗位信息
 | 
			
		||||
     * @param bo 岗位信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public int updatePost(SysPost post) {
 | 
			
		||||
    public int updatePost(SysPostBo bo) {
 | 
			
		||||
        SysPost post = BeanUtil.toBean(bo, SysPost.class);
 | 
			
		||||
        return baseMapper.updateById(post);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,6 @@
 | 
			
		||||
package com.ruoyi.system.service.impl;
 | 
			
		||||
 | 
			
		||||
import cn.hutool.core.bean.BeanUtil;
 | 
			
		||||
import cn.hutool.core.collection.CollUtil;
 | 
			
		||||
import cn.hutool.core.util.ObjectUtil;
 | 
			
		||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
 | 
			
		||||
@@ -18,6 +19,8 @@ import com.ruoyi.common.satoken.utils.LoginHelper;
 | 
			
		||||
import com.ruoyi.system.domain.SysRoleDept;
 | 
			
		||||
import com.ruoyi.system.domain.SysRoleMenu;
 | 
			
		||||
import com.ruoyi.system.domain.SysUserRole;
 | 
			
		||||
import com.ruoyi.system.domain.bo.SysRoleBo;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysRoleVo;
 | 
			
		||||
import com.ruoyi.system.mapper.SysRoleDeptMapper;
 | 
			
		||||
import com.ruoyi.system.mapper.SysRoleMapper;
 | 
			
		||||
import com.ruoyi.system.mapper.SysRoleMenuMapper;
 | 
			
		||||
@@ -44,8 +47,8 @@ public class SysRoleServiceImpl implements ISysRoleService {
 | 
			
		||||
    private final SysRoleDeptMapper roleDeptMapper;
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
    public TableDataInfo<SysRole> selectPageRoleList(SysRole role, PageQuery pageQuery) {
 | 
			
		||||
        Page<SysRole> page = baseMapper.selectPageRoleList(pageQuery.build(), this.buildQueryWrapper(role));
 | 
			
		||||
    public TableDataInfo<SysRoleVo> selectPageRoleList(SysRoleBo role, PageQuery pageQuery) {
 | 
			
		||||
        Page<SysRoleVo> page = baseMapper.selectPageRoleList(pageQuery.build(), this.buildQueryWrapper(role));
 | 
			
		||||
        return TableDataInfo.build(page);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -56,18 +59,18 @@ public class SysRoleServiceImpl implements ISysRoleService {
 | 
			
		||||
     * @return 角色数据集合信息
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public List<SysRole> selectRoleList(SysRole role) {
 | 
			
		||||
    public List<SysRoleVo> selectRoleList(SysRoleBo role) {
 | 
			
		||||
        return baseMapper.selectRoleList(this.buildQueryWrapper(role));
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private Wrapper<SysRole> buildQueryWrapper(SysRole role) {
 | 
			
		||||
        Map<String, Object> params = role.getParams();
 | 
			
		||||
    private Wrapper<SysRole> buildQueryWrapper(SysRoleBo bo) {
 | 
			
		||||
        Map<String, Object> params = bo.getParams();
 | 
			
		||||
        QueryWrapper<SysRole> wrapper = Wrappers.query();
 | 
			
		||||
        wrapper.eq("r.del_flag", UserConstants.ROLE_NORMAL)
 | 
			
		||||
            .eq(ObjectUtil.isNotNull(role.getRoleId()), "r.role_id", role.getRoleId())
 | 
			
		||||
            .like(StringUtils.isNotBlank(role.getRoleName()), "r.role_name", role.getRoleName())
 | 
			
		||||
            .eq(StringUtils.isNotBlank(role.getStatus()), "r.status", role.getStatus())
 | 
			
		||||
            .like(StringUtils.isNotBlank(role.getRoleKey()), "r.role_key", role.getRoleKey())
 | 
			
		||||
            .eq(ObjectUtil.isNotNull(bo.getRoleId()), "r.role_id", bo.getRoleId())
 | 
			
		||||
            .like(StringUtils.isNotBlank(bo.getRoleName()), "r.role_name", bo.getRoleName())
 | 
			
		||||
            .eq(StringUtils.isNotBlank(bo.getStatus()), "r.status", bo.getStatus())
 | 
			
		||||
            .like(StringUtils.isNotBlank(bo.getRoleKey()), "r.role_key", bo.getRoleKey())
 | 
			
		||||
            .between(params.get("beginTime") != null && params.get("endTime") != null,
 | 
			
		||||
                "r.create_time", params.get("beginTime"), params.get("endTime"))
 | 
			
		||||
            .orderByAsc("r.role_sort");
 | 
			
		||||
@@ -81,11 +84,11 @@ public class SysRoleServiceImpl implements ISysRoleService {
 | 
			
		||||
     * @return 角色列表
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public List<SysRole> selectRolesByUserId(Long userId) {
 | 
			
		||||
        List<SysRole> userRoles = baseMapper.selectRolePermissionByUserId(userId);
 | 
			
		||||
        List<SysRole> roles = selectRoleAll();
 | 
			
		||||
        for (SysRole role : roles) {
 | 
			
		||||
            for (SysRole userRole : userRoles) {
 | 
			
		||||
    public List<SysRoleVo> selectRolesByUserId(Long userId) {
 | 
			
		||||
        List<SysRoleVo> userRoles = baseMapper.selectRolePermissionByUserId(userId);
 | 
			
		||||
        List<SysRoleVo> roles = selectRoleAll();
 | 
			
		||||
        for (SysRoleVo role : roles) {
 | 
			
		||||
            for (SysRoleVo userRole : userRoles) {
 | 
			
		||||
                if (role.getRoleId().longValue() == userRole.getRoleId().longValue()) {
 | 
			
		||||
                    role.setFlag(true);
 | 
			
		||||
                    break;
 | 
			
		||||
@@ -103,9 +106,9 @@ public class SysRoleServiceImpl implements ISysRoleService {
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public Set<String> selectRolePermissionByUserId(Long userId) {
 | 
			
		||||
        List<SysRole> perms = baseMapper.selectRolePermissionByUserId(userId);
 | 
			
		||||
        List<SysRoleVo> perms = baseMapper.selectRolePermissionByUserId(userId);
 | 
			
		||||
        Set<String> permsSet = new HashSet<>();
 | 
			
		||||
        for (SysRole perm : perms) {
 | 
			
		||||
        for (SysRoleVo perm : perms) {
 | 
			
		||||
            if (ObjectUtil.isNotNull(perm)) {
 | 
			
		||||
                permsSet.addAll(Arrays.asList(perm.getRoleKey().trim().split(",")));
 | 
			
		||||
            }
 | 
			
		||||
@@ -119,8 +122,8 @@ public class SysRoleServiceImpl implements ISysRoleService {
 | 
			
		||||
     * @return 角色列表
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public List<SysRole> selectRoleAll() {
 | 
			
		||||
        return this.selectRoleList(new SysRole());
 | 
			
		||||
    public List<SysRoleVo> selectRoleAll() {
 | 
			
		||||
        return this.selectRoleList(new SysRoleBo());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -141,8 +144,8 @@ public class SysRoleServiceImpl implements ISysRoleService {
 | 
			
		||||
     * @return 角色对象信息
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public SysRole selectRoleById(Long roleId) {
 | 
			
		||||
        return baseMapper.selectById(roleId);
 | 
			
		||||
    public SysRoleVo selectRoleById(Long roleId) {
 | 
			
		||||
        return baseMapper.selectVoById(roleId);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -152,7 +155,7 @@ public class SysRoleServiceImpl implements ISysRoleService {
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public String checkRoleNameUnique(SysRole role) {
 | 
			
		||||
    public String checkRoleNameUnique(SysRoleBo role) {
 | 
			
		||||
        boolean exist = baseMapper.exists(new LambdaQueryWrapper<SysRole>()
 | 
			
		||||
            .eq(SysRole::getRoleName, role.getRoleName())
 | 
			
		||||
            .ne(ObjectUtil.isNotNull(role.getRoleId()), SysRole::getRoleId, role.getRoleId()));
 | 
			
		||||
@@ -169,7 +172,7 @@ public class SysRoleServiceImpl implements ISysRoleService {
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public String checkRoleKeyUnique(SysRole role) {
 | 
			
		||||
    public String checkRoleKeyUnique(SysRoleBo role) {
 | 
			
		||||
        boolean exist = baseMapper.exists(new LambdaQueryWrapper<SysRole>()
 | 
			
		||||
            .eq(SysRole::getRoleKey, role.getRoleKey())
 | 
			
		||||
            .ne(ObjectUtil.isNotNull(role.getRoleId()), SysRole::getRoleId, role.getRoleId()));
 | 
			
		||||
@@ -185,7 +188,7 @@ public class SysRoleServiceImpl implements ISysRoleService {
 | 
			
		||||
     * @param role 角色信息
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public void checkRoleAllowed(SysRole role) {
 | 
			
		||||
    public void checkRoleAllowed(SysRoleBo role) {
 | 
			
		||||
        if (ObjectUtil.isNotNull(role.getRoleId()) && role.isAdmin()) {
 | 
			
		||||
            throw new ServiceException("不允许操作超级管理员角色");
 | 
			
		||||
        }
 | 
			
		||||
@@ -199,9 +202,9 @@ public class SysRoleServiceImpl implements ISysRoleService {
 | 
			
		||||
    @Override
 | 
			
		||||
    public void checkRoleDataScope(Long roleId) {
 | 
			
		||||
        if (!LoginHelper.isAdmin()) {
 | 
			
		||||
            SysRole role = new SysRole();
 | 
			
		||||
            SysRoleBo role = new SysRoleBo();
 | 
			
		||||
            role.setRoleId(roleId);
 | 
			
		||||
            List<SysRole> roles = this.selectRoleList(role);
 | 
			
		||||
            List<SysRoleVo> roles = this.selectRoleList(role);
 | 
			
		||||
            if (CollUtil.isEmpty(roles)) {
 | 
			
		||||
                throw new ServiceException("没有权限访问角色数据!");
 | 
			
		||||
            }
 | 
			
		||||
@@ -222,12 +225,13 @@ public class SysRoleServiceImpl implements ISysRoleService {
 | 
			
		||||
    /**
 | 
			
		||||
     * 新增保存角色信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param role 角色信息
 | 
			
		||||
     * @param bo 角色信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    @Transactional(rollbackFor = Exception.class)
 | 
			
		||||
    public int insertRole(SysRole role) {
 | 
			
		||||
    public int insertRole(SysRoleBo bo) {
 | 
			
		||||
        SysRole role = BeanUtil.toBean(bo, SysRole.class);
 | 
			
		||||
        // 新增角色信息
 | 
			
		||||
        baseMapper.insert(role);
 | 
			
		||||
        return insertRoleMenu(role);
 | 
			
		||||
@@ -236,12 +240,13 @@ public class SysRoleServiceImpl implements ISysRoleService {
 | 
			
		||||
    /**
 | 
			
		||||
     * 修改保存角色信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param role 角色信息
 | 
			
		||||
     * @param bo 角色信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    @Transactional(rollbackFor = Exception.class)
 | 
			
		||||
    public int updateRole(SysRole role) {
 | 
			
		||||
    public int updateRole(SysRoleBo bo) {
 | 
			
		||||
        SysRole role = BeanUtil.toBean(bo, SysRole.class);
 | 
			
		||||
        // 修改角色信息
 | 
			
		||||
        baseMapper.updateById(role);
 | 
			
		||||
        // 删除角色与菜单关联
 | 
			
		||||
@@ -252,23 +257,25 @@ public class SysRoleServiceImpl implements ISysRoleService {
 | 
			
		||||
    /**
 | 
			
		||||
     * 修改角色状态
 | 
			
		||||
     *
 | 
			
		||||
     * @param role 角色信息
 | 
			
		||||
     * @param bo 角色信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public int updateRoleStatus(SysRole role) {
 | 
			
		||||
    public int updateRoleStatus(SysRoleBo bo) {
 | 
			
		||||
        SysRole role = BeanUtil.toBean(bo, SysRole.class);
 | 
			
		||||
        return baseMapper.updateById(role);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 修改数据权限信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param role 角色信息
 | 
			
		||||
     * @param bo 角色信息
 | 
			
		||||
     * @return 结果
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    @Transactional(rollbackFor = Exception.class)
 | 
			
		||||
    public int authDataScope(SysRole role) {
 | 
			
		||||
    public int authDataScope(SysRoleBo bo) {
 | 
			
		||||
        SysRole role = BeanUtil.toBean(bo, SysRole.class);
 | 
			
		||||
        // 修改角色信息
 | 
			
		||||
        baseMapper.updateById(role);
 | 
			
		||||
        // 删除角色与部门关联
 | 
			
		||||
@@ -345,9 +352,9 @@ public class SysRoleServiceImpl implements ISysRoleService {
 | 
			
		||||
    @Transactional(rollbackFor = Exception.class)
 | 
			
		||||
    public int deleteRoleByIds(Long[] roleIds) {
 | 
			
		||||
        for (Long roleId : roleIds) {
 | 
			
		||||
            checkRoleAllowed(new SysRole(roleId));
 | 
			
		||||
            checkRoleAllowed(new SysRoleBo(roleId));
 | 
			
		||||
            checkRoleDataScope(roleId);
 | 
			
		||||
            SysRole role = selectRoleById(roleId);
 | 
			
		||||
            SysRole role = baseMapper.selectById(roleId);
 | 
			
		||||
            if (countUserRoleByRoleId(roleId) > 0) {
 | 
			
		||||
                throw new ServiceException(String.format("%1$s已分配,不能删除", role.getRoleName()));
 | 
			
		||||
            }
 | 
			
		||||
 
 | 
			
		||||
@@ -20,6 +20,8 @@ import com.ruoyi.common.mybatis.core.page.TableDataInfo;
 | 
			
		||||
import com.ruoyi.common.mybatis.helper.DataBaseHelper;
 | 
			
		||||
import com.ruoyi.common.satoken.utils.LoginHelper;
 | 
			
		||||
import com.ruoyi.system.domain.*;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysPostVo;
 | 
			
		||||
import com.ruoyi.system.domain.vo.SysRoleVo;
 | 
			
		||||
import com.ruoyi.system.mapper.*;
 | 
			
		||||
import com.ruoyi.system.service.ISysUserService;
 | 
			
		||||
import lombok.RequiredArgsConstructor;
 | 
			
		||||
@@ -164,11 +166,11 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public String selectUserRoleGroup(String userName) {
 | 
			
		||||
        List<SysRole> list = roleMapper.selectRolesByUserName(userName);
 | 
			
		||||
        List<SysRoleVo> list = roleMapper.selectRolesByUserName(userName);
 | 
			
		||||
        if (CollUtil.isEmpty(list)) {
 | 
			
		||||
            return StringUtils.EMPTY;
 | 
			
		||||
        }
 | 
			
		||||
        return StreamUtils.join(list, SysRole::getRoleName);
 | 
			
		||||
        return StreamUtils.join(list, SysRoleVo::getRoleName);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
@@ -179,11 +181,11 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
 | 
			
		||||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public String selectUserPostGroup(String userName) {
 | 
			
		||||
        List<SysPost> list = postMapper.selectPostsByUserName(userName);
 | 
			
		||||
        List<SysPostVo> list = postMapper.selectPostsByUserName(userName);
 | 
			
		||||
        if (CollUtil.isEmpty(list)) {
 | 
			
		||||
            return StringUtils.EMPTY;
 | 
			
		||||
        }
 | 
			
		||||
        return StreamUtils.join(list, SysPost::getPostName);
 | 
			
		||||
        return StreamUtils.join(list, SysPostVo::getPostName);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@
 | 
			
		||||
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 | 
			
		||||
<mapper namespace="com.ruoyi.system.mapper.SysDeptMapper">
 | 
			
		||||
 | 
			
		||||
    <resultMap type="com.ruoyi.system.domain.SysDept" id="SysDeptResult">
 | 
			
		||||
    <resultMap type="com.ruoyi.system.domain.vo.SysDeptVo" id="SysDeptResult">
 | 
			
		||||
    </resultMap>
 | 
			
		||||
 | 
			
		||||
    <select id="selectDeptList" resultMap="SysDeptResult">
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@
 | 
			
		||||
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 | 
			
		||||
<mapper namespace="com.ruoyi.system.mapper.SysPostMapper">
 | 
			
		||||
 | 
			
		||||
    <resultMap type="com.ruoyi.system.domain.SysPost" id="SysPostResult">
 | 
			
		||||
    <resultMap type="com.ruoyi.system.domain.vo.SysPostVo" id="SysPostResult">
 | 
			
		||||
    </resultMap>
 | 
			
		||||
 | 
			
		||||
    <select id="selectPostListByUserId" parameterType="Long" resultType="Long">
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@
 | 
			
		||||
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 | 
			
		||||
<mapper namespace="com.ruoyi.system.mapper.SysRoleMapper">
 | 
			
		||||
 | 
			
		||||
    <resultMap type="com.ruoyi.system.domain.SysRole" id="SysRoleResult">
 | 
			
		||||
    <resultMap type="com.ruoyi.system.domain.vo.SysRoleVo" id="SysRoleResult">
 | 
			
		||||
    </resultMap>
 | 
			
		||||
 | 
			
		||||
    <sql id="selectRoleVo">
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user