|
@@ -899,8 +899,12 @@ public class ImGroupServiceImpl extends BaseServiceImpl<String, ImGroup> impleme
|
|
|
queryInfo.setImportFlag(false);
|
|
|
PageInfo<ImGroup> imGroupPageInfo = this.queryPage(queryInfo);
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ int total = imGroupPageInfo.getTotal();
|
|
|
int importImGroupCount = 0;
|
|
|
- while (!imGroupPageInfo.getRows().isEmpty()) {
|
|
|
+ int num = (int) Math.ceil(total / 100);
|
|
|
+ for (int i = 0; i <=num ; i++) {
|
|
|
+
|
|
|
+ imGroupPageInfo = this.queryPage(queryInfo);
|
|
|
List<ImGroup> rows = imGroupPageInfo.getRows();
|
|
|
try {
|
|
|
if (StringUtils.isNotEmpty(startTime)) {
|
|
@@ -923,11 +927,7 @@ public class ImGroupServiceImpl extends BaseServiceImpl<String, ImGroup> impleme
|
|
|
groupTransfer(rows);
|
|
|
importImGroupCount += rows.size();
|
|
|
log.info("------------------------------- import im group --------------------------------------------");
|
|
|
- log.info("import im group success count:{}/{}", importImGroupCount, imGroupPageInfo.getTotal());
|
|
|
-
|
|
|
- page++;
|
|
|
- queryInfo.setPage(page);
|
|
|
- imGroupPageInfo = this.queryPage(queryInfo);
|
|
|
+ log.info("import im group success count:{}/{}", importImGroupCount, total);
|
|
|
}
|
|
|
log.info("-------------------- import im group finished and success! -------------------------------");
|
|
|
}
|