|
@@ -46,11 +46,9 @@ public class ResetStudentPasswordTask implements TaskService {
|
|
|
JsonMapper jsonMapper = new JsonMapper();
|
|
|
int sum = 0, pageNo = 0, pageSize = 100;
|
|
|
|
|
|
- String url = loginUser.getServerUrl()
|
|
|
- + "/api/ecs_core/student/studentPage/%s/%s?rootOrgId=%s&identityNumber=&studentCode=&name=";
|
|
|
+ String url = loginUser.getServerUrl() + "/api/ecs_core/student/studentPage/%s/%s?rootOrgId=%s&identityNumber=&studentCode=&name=";
|
|
|
while (true) {
|
|
|
String json = HttpHelper.get(String.format(url, pageNo, pageSize, rootOrgId), headers, null);
|
|
|
-
|
|
|
PageInfo<StudentVO> page = jsonMapper.parseJson(json, new TypeReference<PageInfo<StudentVO>>() {
|
|
|
|
|
|
});
|
|
@@ -60,14 +58,13 @@ public class ResetStudentPasswordTask implements TaskService {
|
|
|
}
|
|
|
|
|
|
for (StudentVO student : page.getList()) {
|
|
|
- HttpHelper.put(loginUser.getServerUrl() + "/api/ecs_core/student/resetPass/" + student.getId(), headers,
|
|
|
- null);
|
|
|
+ HttpHelper.put(loginUser.getServerUrl() + "/api/ecs_core/student/resetPass/" + student.getId(), headers, null);
|
|
|
}
|
|
|
|
|
|
pageNo++;
|
|
|
sum += page.getList().size();
|
|
|
float rate = sum * 100f / page.getTotal();
|
|
|
- log.info("rootOrgId:{} 已重置学生密码数:{} 进度:{}%", rootOrgId, sum, rate);
|
|
|
+ log.info("总数:{} 已重置学生密码数:{} 进度:{}%", page.getTotal(), sum, rate);
|
|
|
}
|
|
|
}
|
|
|
|