|
|
@@ -80,6 +80,23 @@ public class FeishuRobotUtil {
|
|
|
if (Check.isNull(telephones)){
|
|
|
return null;
|
|
|
}
|
|
|
+ Map<String, String> map = new HashMap<>();
|
|
|
+ int size = telephones.size();
|
|
|
+ int pageSize = 30;
|
|
|
+ int pageNum = size / pageSize + (size % pageSize == 0 ? 0 : 1);
|
|
|
+ for (int i = 0; i < pageNum; i++) {
|
|
|
+ int start = i * pageSize;
|
|
|
+ int end = Math.min(start + pageSize, size);
|
|
|
+ List<String> subList = telephones.subList(start, end);
|
|
|
+ Map<String, String> subMap = getFsUserIdOnePage(token, subList);
|
|
|
+ if (!Check.isNull(subMap)){
|
|
|
+ map.putAll(subMap);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+
|
|
|
+ private static Map<String, String> getFsUserIdOnePage(String token, List<String> telephones) throws IOException {
|
|
|
//获取token
|
|
|
String url = "https://open.feishu.cn/open-apis/contact/v3/users/batch_get_id?user_id_type=user_id";
|
|
|
HttpPost httpPost = new HttpPost(url);
|