소스 검색

自定义二维码 计划兼容v-2

(cherry picked from commit 2bb34cb3f6300cd1a0a589a4927a27578b9f6115)
MOKASZ\lw12420 2 년 전
부모
커밋
c6f8216f17

+ 2 - 2
launch-admin/src/main/java/com/webflux/launchadmin/mysql/service/listening/ListeningPlanServiceImpl.java

@@ -229,7 +229,7 @@ public class ListeningPlanServiceImpl implements ListeningPlanServiceInterface{
                         && f.getIsRandom()).collect(Collectors.toList());
         Mono<List<StringBuilder>> stringBuilderMono =null;
         if (Objects.nonNull(collect) && !collect.isEmpty()) {
-            List<Long> collect1 = collect.stream().map(Item::getPlanId).collect(Collectors.toList());
+            List<String> collect1 = collect.stream().map(Item::getPlanId).collect(Collectors.toList());
             stringBuilderMono = template.select(Query.query(Criteria.where("listening_plan_new_id").in(collect1)), ListeningPlanNew.class)
                     .flatMap(f -> Mono.zip(Mono.just(f), template.select(Query.query(Criteria.where("group_type_id").is(f.groupId())
                                     .and("status").is(1).and("type").is(1).and("deleted_at").isNull()), DomainSelect.class)
@@ -785,7 +785,7 @@ public class ListeningPlanServiceImpl implements ListeningPlanServiceInterface{
                 .collect(Collectors.toList());
         Mono<List<StringBuilder>> stringBuilderMono =null;
         if (Objects.nonNull(collect) && !collect.isEmpty()) {
-            List<Long> collect1 = collect.stream().map(Item::getPlanId).collect(Collectors.toList());
+            List<String> collect1 = collect.stream().map(Item::getPlanId).collect(Collectors.toList());
             stringBuilderMono = template.select(Query.query(Criteria.where("listening_plan_new_id").in(collect1)), ListeningPlanNew.class)
                     .flatMap(f -> Mono.zip(Mono.just(f), template.select(Query.query(Criteria.where("group_type_id").is(f.groupId())
                                     .and("status").is(1)

+ 5 - 5
launch-admin/src/main/java/com/webflux/launchadmin/mysql/service/planNew/goGenerate/GoGenerateService.java

@@ -982,13 +982,13 @@ public class GoGenerateService {
         if (!collect0.isEmpty()) {
             Flux<Item> itemFlux = Flux.fromIterable(collect0);
            return itemFlux.flatMap(ftm -> {
-                Long planId = ftm.getPlanId();
+                String planId = ftm.getPlanId();
                 Long type = ftm.getType();
                 String column;
                 if (1 == type) {
                     column = "plan_new_id";
                 } else if (2 == type) {
-                    column = "listenig_plan_new_id";
+                    column = "listening_plan_new_id";
                 } else {
                     throw new BaseException("type错误::" + type);
                 }
@@ -1005,7 +1005,7 @@ public class GoGenerateService {
                 } else {
                     stringMono = template.selectOne(query, ListeningPlanNew.class)
                             .switchIfEmpty(Mono.error(new BaseException("自定义二维码:听书计划查询::PlanId  返回空结果::" + planId)))
-                            .onErrorResume(throwable -> Mono.error(new Exception(throwable.getMessage())))
+                            .onErrorResume(throwable -> Mono.error(new Exception("select ListeningPlanNew::"+throwable.getMessage())))
                             .flatMap(f1 -> {
                                 String code = f1.code();
                                 return getDomainSetV(ftm, planId, type, f1.groupId(), code);
@@ -1017,7 +1017,7 @@ public class GoGenerateService {
         return Mono.just(List.of(new StringBuilder("无自定义二维码 随机事件")));
     }
 
-    private Mono<StringBuilder> getDomainSetV(Item ftm, Long planId, Long type, Long  groupId, String code) {
+    private Mono<StringBuilder> getDomainSetV(Item ftm, String planId, Long type, Long  groupId, String code) {
         return template.select(Query.query(Criteria.where("group_type_id").is(groupId)
                 .and("status").is(1)
                 .and("type").is(1)
@@ -1047,7 +1047,7 @@ public class GoGenerateService {
                 && Objects.nonNull(f.getPlanId())
                 && f.getIsRandom()).collect(Collectors.toList());
         if (Objects.nonNull(collect) && !collect.isEmpty()) {
-            List<Long> collect1 = collect.stream().map(Item::getPlanId).collect(Collectors.toList());
+            List<String> collect1 = collect.stream().map(Item::getPlanId).collect(Collectors.toList());
              stringBuilderMono = template.select(Query.query(Criteria.where("plan_new_id").in(collect1)), PlanNew.class)
                     .flatMap(f -> Mono.zip(Mono.just(f), template.select(Query.query(Criteria.where("group_type_id").is(f.groupId())
                                     .and("status").is(1).and("type").is(1).and("deleted_at").isNull()), DomainSelect.class)

+ 1 - 1
launch-admin/src/main/java/com/webflux/launchadmin/mysql/service/planNew/structure/Item.java

@@ -45,7 +45,7 @@ public class Item {
 
     private Boolean isRandom;
 
-    private Long planId;
+    private String planId;
 
     private Long  groupTypeIdQs;