|
@@ -4,7 +4,6 @@ import java.util.List;
|
|
|
|
|
|
import me.chanjar.weixin.common.error.WxErrorException;
|
|
import me.chanjar.weixin.common.error.WxErrorException;
|
|
import me.chanjar.weixin.cp.bean.WxCpDepart;
|
|
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 {
|
|
public static void main(String[] args) throws WxErrorException {
|
|
List<WxCpDepart> departs = WXCpDepartUtil.getAllChildDeparts(1L);
|
|
List<WxCpDepart> departs = WXCpDepartUtil.getAllChildDeparts(1L);
|
|
for(WxCpDepart depart : departs) {
|
|
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());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|