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; } }