Quellcode durchsuchen

feature 代码提交

xiahan vor 1 Jahr
Ursprung
Commit
d44e2d0eb8

+ 5 - 6
rw-training/training-common/src/main/java/com/rongwei/trainingcommon/sys/service/impl/SendNotifyServiceImpl.java

@@ -18,10 +18,7 @@ import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
 import java.util.stream.Collectors;
@@ -147,7 +144,8 @@ public class SendNotifyServiceImpl implements SendNotifyService {
         // 获取用户id
         planAndUserIdMap.forEach((k, v) -> {
             CXCommonUtils.sendNotify(TRAIN_NOTIFY_TITLE, String.format(TRAIN_NOTIFY_CONTENT, k.getCoursename(),
-                    k.getTrainingstarttime(), k.getTrainingendtimt()), "", (List<String>) v, k.getId(), TRAINING);
+                            k.getTrainingstarttime(), k.getTrainingendtimt()), "", new ArrayList<>(v),
+                    k.getId(), TRAINING);
         });
     }
 
@@ -158,7 +156,8 @@ public class SendNotifyServiceImpl implements SendNotifyService {
      */
     public void sendTrainingPlanCancelNotify(Map<PlanDo, Set<String>> planAndUserIdMap) {
         planAndUserIdMap.forEach((k, v) -> {
-            CXCommonUtils.sendNotify(CANCEL_TRAIN_TITLE, String.format(CANCEL_TRAIN_CONTENT, k.getCoursename()), "", (List<String>) v, null, TRAINING);
+            CXCommonUtils.sendNotify(CANCEL_TRAIN_TITLE, String.format(CANCEL_TRAIN_CONTENT, k.getCoursename()), "",
+                    new ArrayList<>(v), null, TRAINING);
         });
     }