zouxuan 5 years ago
parent
commit
35724b8cbd

+ 0 - 2
edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/OrganizationService.java

@@ -1,10 +1,8 @@
 package com.keao.edu.user.service;
 
 
-import com.keao.edu.common.page.PageInfo;
 import com.keao.edu.common.service.BaseService;
 import com.keao.edu.user.entity.Organization;
-import com.keao.edu.user.page.OrganizationQueryInfo;
 
 import java.util.List;
 

+ 4 - 0
edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/impl/OrganizationServiceImpl.java

@@ -22,6 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
 
 import java.util.Collections;
 import java.util.List;
@@ -188,6 +189,9 @@ public class OrganizationServiceImpl extends BaseServiceImpl<Integer, Organizati
 		if(!includeSelf){
 			selfAndChildOrganIds.remove(organization.getId());
 		}
+		if(CollectionUtils.isEmpty(selfAndChildOrganIds)){
+			return null;
+		}
 		return selfAndChildOrganIds;
 	}