This commit is contained in:
parent
a6733814ae
commit
b45316d33b
|
@ -176,6 +176,9 @@ public class TbFuseServiceImpl extends CrudServiceImpl<TbFuseDao, TbFuseEntity,
|
||||||
Map<String, Object> dataResource = (Map<String, Object>) factory.get().getDataResource(dto);
|
Map<String, Object> dataResource = (Map<String, Object>) factory.get().getDataResource(dto);
|
||||||
if (!dataResource.isEmpty()) {
|
if (!dataResource.isEmpty()) {
|
||||||
List<Map<String, Object>> list = (List<Map<String, Object>>) dataResource.get("data");
|
List<Map<String, Object>> list = (List<Map<String, Object>>) dataResource.get("data");
|
||||||
|
if (list.size() < pageSize) {
|
||||||
|
end.set(false);
|
||||||
|
}
|
||||||
pageIndex.getAndIncrement();
|
pageIndex.getAndIncrement();
|
||||||
return new HashMap() {{
|
return new HashMap() {{
|
||||||
put(list.stream().map(map -> {
|
put(list.stream().map(map -> {
|
||||||
|
@ -205,9 +208,11 @@ public class TbFuseServiceImpl extends CrudServiceImpl<TbFuseDao, TbFuseEntity,
|
||||||
Thread.sleep(300); // 防止任务运行过快,无法跳出循环
|
Thread.sleep(300); // 防止任务运行过快,无法跳出循环
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
logger.info("获取数据资源异常", e);
|
logger.info("获取数据资源异常", e);
|
||||||
|
end.set(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
} while (end.get());
|
} while (end.get());
|
||||||
|
CompletableFuture.allOf(completableFutures.toArray(new CompletableFuture[completableFutures.size()])).join();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue