From 19df67e19f23cd2a04d1c7f355e1e656f4140af4 Mon Sep 17 00:00:00 2001 From: huliguo <2023611923@qq.com> Date: 星期四, 17 四月 2025 20:04:14 +0800 Subject: [PATCH] 后台:首页统计、系统管理、广告管理、用户管理、商品分类管理 --- ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java | 13 ++++--------- 1 files changed, 4 insertions(+), 9 deletions(-) diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java index 2b26388..5c7ae12 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java @@ -57,11 +57,6 @@ @Override @DataScope(deptAlias = "d") public List<SysDept> selectDeptList(SysDept dept) { - Long userid = tokenService.getLoginUser().getUserid(); - SysUser sysUser = sysUserService.getById(userid); - if(sysUser.getRoleType() == 2){ - dept.setShopId(sysUser.getObjectId()); - } return deptMapper.selectDeptList(dept); } @@ -190,10 +185,10 @@ @Override public boolean checkDeptNameUnique(SysDept dept) { - Long deptId = StringUtils.isNull(dept.getDeptId()) ? -1L : dept.getDeptId(); - SysDept info = deptMapper.checkDeptNameUnique(dept.getDeptName(), dept.getParentId()); + Long deptId = StringUtils.isNull(dept.getDeptId()) ? -1L : dept.getDeptId();//部门id + SysDept info = deptMapper.checkDeptNameUnique(dept.getDeptName(), dept.getParentId());//查询该父类部门下是否有相同名字的部门 if (StringUtils.isNotNull(info) && info.getDeptId().longValue() != deptId.longValue()) - { + {//有相同部门名称,且部门id不相同,返回不唯一 return UserConstants.NOT_UNIQUE; } return UserConstants.UNIQUE; @@ -207,7 +202,7 @@ @Override public void checkDeptDataScope(Long deptId) { - if (!SysUser.isAdmin(SecurityUtils.getUserId())) + if (!SysUser.isAdmin(SecurityUtils.getUserId()))//超级管理员跳过验证 { SysDept dept = new SysDept(); dept.setDeptId(deptId); -- Gitblit v1.7.1