Browse Source

fix: 交友裂变-域名修改

wangcheng 2 years ago
parent
commit
5c48b7bb5f

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

@@ -1122,6 +1122,8 @@ public class GoGenerateService {
                     column = "plan_new_id";
                     column = "plan_new_id";
                 } else if (2 == type) {
                 } else if (2 == type) {
                     column = "listening_plan_new_id";
                     column = "listening_plan_new_id";
+                } else if (3 == type) {
+                    column = "id";
                 } else {
                 } else {
                     throw new BaseException("type错误::" + type);
                     throw new BaseException("type错误::" + type);
                 }
                 }
@@ -1135,7 +1137,7 @@ public class GoGenerateService {
                                 String code = f1.code();
                                 String code = f1.code();
                                 return getDomainSetV(ftm, planId, type, f1.groupId(), code);
                                 return getDomainSetV(ftm, planId, type, f1.groupId(), code);
                             });
                             });
-                } else {
+                } else if (2 == type) {
                     stringMono = template.selectOne(query, ListeningPlanNew.class)
                     stringMono = template.selectOne(query, ListeningPlanNew.class)
                             .switchIfEmpty(Mono.error(new BaseException("自定义二维码:听书计划查询::PlanId  返回空结果::" + planId)))
                             .switchIfEmpty(Mono.error(new BaseException("自定义二维码:听书计划查询::PlanId  返回空结果::" + planId)))
                             .onErrorResume(throwable -> Mono.error(new Exception("select ListeningPlanNew::"+throwable.getMessage())))
                             .onErrorResume(throwable -> Mono.error(new Exception("select ListeningPlanNew::"+throwable.getMessage())))
@@ -1143,6 +1145,14 @@ public class GoGenerateService {
                                 String code = f1.code();
                                 String code = f1.code();
                                 return getDomainSetV(ftm, planId, type, f1.groupId(), code);
                                 return getDomainSetV(ftm, planId, type, f1.groupId(), code);
                             });
                             });
+                } else {
+                    stringMono = template.selectOne(query, PlanNewCommon.class)
+                            .switchIfEmpty(Mono.error(new BaseException("自定义二维码:裂变计划查询::PlanId 返回空结果::" + planId)))
+                            .onErrorResume(throwable -> Mono.error(new Exception(throwable.getMessage())))
+                            .flatMap(f1 -> {
+                                String code = f1.code();
+                                return getDomainSetV(ftm, planId, type, f1.groupId(), code);
+                            });
                 }
                 }
                 return stringMono;
                 return stringMono;
             }) .onErrorResume(throwable -> Mono.error(new Exception("setCusqrcodeSetV error:" + throwable.getMessage()))).collectList();
             }) .onErrorResume(throwable -> Mono.error(new Exception("setCusqrcodeSetV error:" + throwable.getMessage()))).collectList();
@@ -1165,7 +1175,12 @@ public class GoGenerateService {
                         stringBuilder.append(get6Str());
                         stringBuilder.append(get6Str());
                         stringBuilder.append(".");
                         stringBuilder.append(".");
                         stringBuilder.append(domainSelect.domain());
                         stringBuilder.append(domainSelect.domain());
-                        stringBuilder.append("/index.html?code=");
+                        if (3 == type) {
+                            // 交友裂变
+                            stringBuilder.append("/portal-page/index?code=");
+                        } else {
+                            stringBuilder.append("/index.html?code=");
+                        }
                         stringBuilder.append(code);
                         stringBuilder.append(code);
                         stringBuilder.append("&sk=");
                         stringBuilder.append("&sk=");
                         stringBuilder.append(IdUtil.fastSimpleUUID());
                         stringBuilder.append(IdUtil.fastSimpleUUID());