Commit 24e4b10a by zhangkb

判断获取用户授予其他机构如果为空不加入组织list中

parent 2abe4c64
......@@ -83,10 +83,11 @@ public class TagCtrl {
orgIds.add(deptIdPath);
//获取当前用户被授予其他机构
List<Long> deptList = GrantedAuthHelper.getUserGrantedOrgs();
logger.info("granted Orgs:"+deptList);
if(!deptList.isEmpty() && !"null".equals(deptList) && deptList!=null) {
for(Long dept : deptList) {
orgIds.add(String.valueOf(dept));
}
}
return tagService.queryDimensionTagAsTree(orgIds, parentId);
}
......@@ -103,9 +104,11 @@ public class TagCtrl {
orgIds.add(deptIdPath);
//获取当前用户被授予其他机构
List<Long> deptList = GrantedAuthHelper.getUserGrantedOrgs();
if(!deptList.isEmpty() && !"null".equals(deptList) && deptList!=null) {
for(Long dept : deptList) {
orgIds.add(String.valueOf(dept));
}
}
//获取当前登录用户id
String userId = UserInfoUtils.getUserId();
return tagService.queryPersonalTagAsTree(parentId, userId, orgIds);
......@@ -127,9 +130,11 @@ public class TagCtrl {
orgIds.add(deptIdPath);
//获取当前用户被授予其他机构
List<Long> deptList = GrantedAuthHelper.getUserGrantedOrgs();
if(!deptList.isEmpty() && !"null".equals(deptList) && deptList!=null) {
for(Long dept : deptList) {
orgIds.add(String.valueOf(dept));
}
}
return tagService.searchPersonalDimensionTagByPage(userName, orgIds, keyword,
path, domain, new Page(pageSize, pageNo));
}
......@@ -149,9 +154,11 @@ public class TagCtrl {
orgIds.add(deptIdPath);
//获取当前用户被授予其他机构
List<Long> deptList = GrantedAuthHelper.getUserGrantedOrgs();
if(!deptList.isEmpty() && !"null".equals(deptList) && deptList!=null) {
for(Long dept : deptList) {
orgIds.add(String.valueOf(dept));
}
}
return tagService.searchPersonalTagByPage(userName, orgIds, keyword, path,
domain, new Page(pageSize, pageNo));
}
......@@ -186,9 +193,11 @@ public class TagCtrl {
orgIds.add(deptIdPath);
//获取当前用户被授予其他机构
List<Long> deptList = GrantedAuthHelper.getUserGrantedOrgs();
if(!deptList.isEmpty() && !"null".equals(deptList) && deptList!=null) {
for(Long dept : deptList) {
orgIds.add(String.valueOf(dept));
}
}
return tagService.queryPersonalTagExcludeOpenTypeAsTree(parentId, userName, orgIds);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment