Browse Source

fix: 修复获取用户issys信息错误的问题

suntg 6 years ago
parent
commit
685c23a3e6
1 changed files with 1 additions and 14 deletions
  1. 1 14
      src/main/java/com/uas/platform/b2b/model/UserInfo.java

+ 1 - 14
src/main/java/com/uas/platform/b2b/model/UserInfo.java

@@ -34,20 +34,7 @@ public class UserInfo {
 			}
 			}
 			this.role = sb.toString();
 			this.role = sb.toString();
 		}
 		}
-		this.sys = false;
-		if (!CollectionUtils.isEmpty(user.getRoles())) { // 获取用户在该企业的权限
-			for (Role role: user.getRoles()) {
-				if (!CollectionUtils.isEmpty(user.getEnterprises())) {
-					if (null != user.getEnterprise()) {
-						if (role.getEnUU().equals(user.getEnterprise().getUu())) {
-							if (role.isSys()) {
-								this.sys = true;
-							}
-						}
-					}
-				}
-			}
-		} 
+		this.sys = user.isSys();
 		if (!CollectionUtils.isEmpty(user.getEnterprises())) {
 		if (!CollectionUtils.isEmpty(user.getEnterprises())) {
 			Enterprise current = user.getEnterprise();
 			Enterprise current = user.getEnterprise();
 			List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
 			List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();