bug: 修改人员同步定时任务
This commit is contained in:
@@ -126,6 +126,7 @@ public class SyncUserService {
|
||||
|
||||
List<String> json=new ArrayList<>();
|
||||
byte[] cookie = null;
|
||||
int index = 1;
|
||||
do {
|
||||
Map<String, Object> params = new HashMap<String, Object>();
|
||||
params.put("cookie", Base64.encodeBase64String(cookie));
|
||||
@@ -137,7 +138,7 @@ public class SyncUserService {
|
||||
params.forEach((key, value) -> log.info("同步用户数据的请求参数:" + key + " : " + value));
|
||||
// 用户测试
|
||||
String rs = util.getResponseFromServer("http://idmsync.foton.com.cn/rest/users/getUserList", params);
|
||||
log.info("远程调用同步的员工数据:"+rs);
|
||||
log.info("第{}次调用,远程调用同步的员工数据:{}",index,rs);
|
||||
JSONObject responseStr = JSON.parseObject(rs);
|
||||
if(responseStr.containsKey("status") && responseStr.getBoolean("status")){
|
||||
json.add(rs);
|
||||
@@ -159,7 +160,7 @@ public class SyncUserService {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
index++;
|
||||
} while (cookie != null);
|
||||
return json;
|
||||
}
|
||||
@@ -265,6 +266,7 @@ public class SyncUserService {
|
||||
|
||||
byte[] cookie = null;
|
||||
List<String> json=new ArrayList<>();
|
||||
int index=1;
|
||||
do {
|
||||
Map<String, Object> params = new HashMap<String, Object>();
|
||||
params.put("cookie", Base64.encodeBase64String(cookie));
|
||||
@@ -274,7 +276,7 @@ public class SyncUserService {
|
||||
params.put("basedn", "ou=Organizations,o=foton.com.cn,o=isp");
|
||||
// 组织测试
|
||||
String rs = util.getResponseFromServer("http://idmsync.foton.com.cn/rest/orgs/getOrgList", params);
|
||||
log.info("远程调用同步的部门数据:"+rs);
|
||||
log.info("第{}次调用:远程调用同步的部门数据:{}",index,rs);
|
||||
JSONObject responseStr = JSONObject.parseObject(rs);
|
||||
if(responseStr.containsKey("status") && responseStr.getBoolean("status")){
|
||||
json.add(rs);
|
||||
@@ -296,6 +298,7 @@ public class SyncUserService {
|
||||
}
|
||||
}
|
||||
}
|
||||
index++;
|
||||
} while (cookie != null);
|
||||
return json;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user