From 3fb3eed4097d5660cf9df2bddf8982c55a86905b Mon Sep 17 00:00:00 2001 From: "autumn.g@foxmail.com" Date: Tue, 7 Nov 2023 13:26:21 +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 | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 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 7401cda80..de4c2ebf7 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,10 +135,27 @@ 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,表明是该账号挂在运营商下面,是运营商管理员 + // 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")) { + // 表明是该账号挂在运营商下面,是二级运营商管理员 merchantDeptIds.add(deptId); resultVO.setMerchantDeptIds(merchantDeptIds); } else {