From 10e1d7eeb6541057a7be340ec60af8f2bf507d5c Mon Sep 17 00:00:00 2001 From: "autumn.g@foxmail.com" Date: Tue, 7 Nov 2023 13:38:47 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E4=BF=AE=E6=94=B9=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jsowell/common/util/SecurityUtils.java | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/jsowell-common/src/main/java/com/jsowell/common/util/SecurityUtils.java b/jsowell-common/src/main/java/com/jsowell/common/util/SecurityUtils.java index de4c2ebf7..dbba23b03 100644 --- a/jsowell-common/src/main/java/com/jsowell/common/util/SecurityUtils.java +++ b/jsowell-common/src/main/java/com/jsowell/common/util/SecurityUtils.java @@ -135,27 +135,10 @@ public class SecurityUtils { resultVO.setParentId(String.valueOf(parentId)); List merchantDeptIds = Lists.newArrayList(); List stationDeptIds = Lists.newArrayList(); - // if (parentId == 0L) { - // // 父级id是0,表明是该账号挂在平台下面,是系统管理员 - // } else if (parentId == 100L) { - // // 父级id是100,表明是该账号挂在运营商下面,是运营商管理员 - // merchantDeptIds.add(deptId); - // resultVO.setMerchantDeptIds(merchantDeptIds); - // } else { - // // 其他情况,表明是站点管理员 - // stationDeptIds.add(deptId); - // resultVO.setStationDeptIds(stationDeptIds); - // } - - String deptLevel = dept.getDeptLevel(); - if (StringUtils.equals(deptLevel, "0")) { - // 表明是该账号挂在平台下面,是系统管理员 - } else if (StringUtils.equals(deptLevel, "1")) { - // 表明是该账号挂在运营商下面,是一级运营商管理员 - merchantDeptIds.add(deptId); - resultVO.setMerchantDeptIds(merchantDeptIds); - } else if (StringUtils.equals(deptLevel, "2")) { - // 表明是该账号挂在运营商下面,是二级运营商管理员 + if (parentId == 0L) { + // 父级id是0,表明是该账号挂在平台下面,是系统管理员 + } else if (parentId == 100L) { + // 父级id是100,表明是该账号挂在运营商下面,是运营商管理员 merchantDeptIds.add(deptId); resultVO.setMerchantDeptIds(merchantDeptIds); } else { @@ -163,6 +146,23 @@ public class SecurityUtils { stationDeptIds.add(deptId); resultVO.setStationDeptIds(stationDeptIds); } + + // String deptLevel = dept.getDeptLevel(); + // if (StringUtils.equals(deptLevel, "0")) { + // // 表明是该账号挂在平台下面,是系统管理员 + // } else if (StringUtils.equals(deptLevel, "1")) { + // // 表明是该账号挂在运营商下面,是一级运营商管理员 + // merchantDeptIds.add(deptId); + // resultVO.setMerchantDeptIds(merchantDeptIds); + // } else if (StringUtils.equals(deptLevel, "2")) { + // // 表明是该账号挂在运营商下面,是二级运营商管理员 + // merchantDeptIds.add(deptId); + // resultVO.setMerchantDeptIds(merchantDeptIds); + // } else { + // // 其他情况,表明是站点管理员 + // stationDeptIds.add(deptId); + // resultVO.setStationDeptIds(stationDeptIds); + // } return resultVO; } }