Bladeren bron

修复营期批量修改红包问题,和token

吴树波 4 dagen geleden
bovenliggende
commit
53dcb4e679

+ 6 - 1
fs-service/src/main/java/com/fs/course/service/impl/FsUserCourseVideoRedPackageServiceImpl.java

@@ -124,7 +124,12 @@ public class FsUserCourseVideoRedPackageServiceImpl implements IFsUserCourseVide
         if (fsUserCourseVideoRedPackageList == null || fsUserCourseVideoRedPackageList.isEmpty()) {
             return;
         }
-
+        List<Long> videoList = new ArrayList<>();
+        fsUserCourseVideoRedPackageList = fsUserCourseVideoRedPackageList.stream().filter(e -> {
+            boolean contains = videoList.contains(e.getVideoId());
+            videoList.add(e.getVideoId());
+            return !contains;
+        }).collect(Collectors.toList());
         List<FsUserCourseVideoRedPackage> existingData = fsUserCourseVideoRedPackageMapper
                 .selectByParamsList(fsUserCourseVideoRedPackageList);
 

+ 8 - 0
fs-service/src/main/resources/application-druid-yjb.yml

@@ -138,5 +138,13 @@ rocketmq:
         group: test-group
         access-key: ak1243b25nj17d4b2dc1a03 # 替换为实际的 accessKey
         secret-key: sk08a7ea1f9f4b0237 # 替换为实际的 secretKey
+# token配置
+token:
+  # 令牌自定义标识
+  header: Authorization
+  # 令牌密钥
+  secret: feeb79c778c1274dd0e4a709cd948718
+  # 令牌有效期(默认30分钟)
+  expireTime: 180
 #是否为新商户,新商户不走mpOpenId
 isNewWxMerchant: false