|
@@ -331,6 +331,20 @@ public class TimeTask {
|
|
|
JSONObject data = resData.getJSONObject("data");
|
|
|
JSONArray jsonArray = data.getJSONArray("list");
|
|
|
List<DutyRoleAccount> roleAccounts = JSONArray.parseArray(jsonArray.toJSONString(), DutyRoleAccount.class);
|
|
|
+ Integer totalSize = data.getInteger("totalSize");
|
|
|
+ if (totalSize > pageSize) {
|
|
|
+ int totalPages = (int) Math.ceil((double) totalSize / pageSize);
|
|
|
+ for (int i = 2; i <= totalPages; i++) {
|
|
|
+ url = idaasUrlPrefix + roleAccountsApi + "?privilegeUuid=" + roleZby + "&psSystemUuid="
|
|
|
+ + psId + "&pageSize=" + pageSize + "¤tPage=" + i;
|
|
|
+ ResponseEntity<JSONObject> exchangePages = restTemplate.exchange(url, HttpMethod.GET, entity, JSONObject.class);
|
|
|
+ JSONObject resDataPages = exchangePages.getBody();
|
|
|
+ JSONObject dataPages = resDataPages.getJSONObject("data");
|
|
|
+ JSONArray jsonArrayPages = dataPages.getJSONArray("list");
|
|
|
+ List<DutyRoleAccount> roleAccountsPages = JSONArray.parseArray(jsonArrayPages.toJSONString(), DutyRoleAccount.class);
|
|
|
+ roleAccounts.addAll(roleAccountsPages);
|
|
|
+ }
|
|
|
+ }
|
|
|
roleAccounts.forEach(dutyRoleAccount -> dutyRoleAccount.setRoleUuid(roleZby));
|
|
|
|
|
|
|