liupeng 5 éve
szülő
commit
daf154af5c

+ 1 - 7
code/sapparent/sapservice/src/main/java/org/fouram/core/plugin/weixin/cp/util/GetAllDepartDataUtil.java

@@ -4,7 +4,6 @@ import java.util.List;
 
 import me.chanjar.weixin.common.error.WxErrorException;
 import me.chanjar.weixin.cp.bean.WxCpDepart;
-import me.chanjar.weixin.cp.bean.WxCpUser;
 
 /**
  * 企业微信用户工具类
@@ -16,12 +15,7 @@ public class GetAllDepartDataUtil {
 	public static void main(String[] args) throws WxErrorException {
 		List<WxCpDepart> departs = WXCpDepartUtil.getAllChildDeparts(1L);
 		for(WxCpDepart depart : departs) {
-			List<WxCpUser> users = WXCpUserUtil.listByDepartment(depart.getId());
-			for (WxCpUser user : users) {
-				if(user.getMobile().equals("18801209212")) {
-					System.out.println(user);
-				}
-			}
+			System.out.println(depart.getId() + depart.getName());
 		}
 	}
 }