liujc 1 年之前
父節點
當前提交
eddc39e208
共有 1 個文件被更改,包括 8 次插入1 次删除
  1. 8 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ImGroupServiceImpl.java

+ 8 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ImGroupServiceImpl.java

@@ -929,7 +929,7 @@ public class ImGroupServiceImpl extends BaseServiceImpl<String, ImGroup> impleme
                 throw new BizException("时间区间参数错误,格式为:yyyy-MM-dd");
             }
             List<Future<?>> list = new ArrayList<>();
-            for (List<ImGroup> imGroups : Lists.partition(rows, 20)) {
+            for (List<ImGroup> imGroups : Lists.partition(rows, 40)) {
                 list.add(executorService.submit(() -> {
                     groupTransfer(imGroups);
                 }));
@@ -1091,7 +1091,11 @@ public class ImGroupServiceImpl extends BaseServiceImpl<String, ImGroup> impleme
             new LinkedBlockingQueue<Runnable>());
 
         log.info("------------------------------- import user student ---------------------------");
+        // 学生花费时间计算
+        long start = System.currentTimeMillis();
         List<String[]> student = getStudent(page, rows);
+        long end = System.currentTimeMillis();
+        log.info("查询学生花费时间:{}毫秒", end - start);
         SysConfig studentAvatar = sysConfigService.findByParamName(SysConfigService.STUDENT_DEFAULT_AVATAR);
         while (!student.isEmpty()) {
             for (String[] next : student) {
@@ -1121,7 +1125,10 @@ public class ImGroupServiceImpl extends BaseServiceImpl<String, ImGroup> impleme
         count = 0;
         page = 1;
         SysConfig staffAvatar = sysConfigService.findByParamName(SysConfigService.USER_DEFAULT_AVATAR);
+        start = System.currentTimeMillis();
         List<String[]> staff = getStaff(page, rows);
+        end = System.currentTimeMillis();
+        log.info("查询老师花费时间:{}毫秒", end - start);
         while (!staff.isEmpty()) {
 
             for (String[] next : staff) {