update 修改判断逻辑

This commit is contained in:
2023-11-07 13:26:21 +08:00
parent 7862ddb5b6
commit 3fb3eed409

View File

@@ -135,10 +135,27 @@ public class SecurityUtils {
resultVO.setParentId(String.valueOf(parentId));
List<String> merchantDeptIds = Lists.newArrayList();
List<String> 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 {