Commit 91b5c14a by levphon

bug修复

1 parent 483e1a96
...@@ -20,7 +20,6 @@ import com.google.common.collect.Lists; ...@@ -20,7 +20,6 @@ import com.google.common.collect.Lists;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.springframework.context.annotation.DependsOn;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import javax.annotation.Resource; import javax.annotation.Resource;
...@@ -181,6 +180,11 @@ public class SubOrdinateStrategy extends PermissionStrategy { ...@@ -181,6 +180,11 @@ public class SubOrdinateStrategy extends PermissionStrategy {
} else { } else {
matchedDepartmentIdList = subDepartmentIdList; matchedDepartmentIdList = subDepartmentIdList;
} }
//如果没找到匹配部门,返回为空(指定授权跨部门情况容易发生)
if (CollectionUtils.isEmpty(matchedDepartmentIdList)) {
return Lists.newArrayList();
}
//全部上级 //全部上级
List<Organization> superiorOrgList = organizationMapper.selectList(new OrganizationBO().setSubIdList(matchedDepartmentIdList)); List<Organization> superiorOrgList = organizationMapper.selectList(new OrganizationBO().setSubIdList(matchedDepartmentIdList));
//所有部门id //所有部门id
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!