|
@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.util.IdUtil;
|
|
import cn.hutool.core.util.IdUtil;
|
|
|
import cn.hutool.core.util.RandomUtil;
|
|
import cn.hutool.core.util.RandomUtil;
|
|
|
|
|
|
|
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
import cn.hutool.http.HttpUtil;
|
|
import cn.hutool.http.HttpUtil;
|
|
|
import cn.hutool.json.JSONArray;
|
|
import cn.hutool.json.JSONArray;
|
|
|
import cn.hutool.json.JSONObject;
|
|
import cn.hutool.json.JSONObject;
|
|
@@ -958,16 +959,19 @@ public class GoGenerateService {
|
|
|
.switchIfEmpty(Mono.just(this.getListeningPlanNew()));
|
|
.switchIfEmpty(Mono.just(this.getListeningPlanNew()));
|
|
|
Mono<PlanNewCommon> planNewCommonMono1 = Mono.zip(planNewCommonMono, planNewMono, listeningPlanNewMono).flatMap(f -> {
|
|
Mono<PlanNewCommon> planNewCommonMono1 = Mono.zip(planNewCommonMono, planNewMono, listeningPlanNewMono).flatMap(f -> {
|
|
|
if (Objects.nonNull(f.getT1().id())) {
|
|
if (Objects.nonNull(f.getT1().id())) {
|
|
|
- return Mono.just(f.getT1());
|
|
|
|
|
|
|
+ PlanNewCommon planNewCommon = f.getT1();
|
|
|
|
|
+ Long groupId = StrUtil.isEmpty(planNewCommon.importDomain()) ? planNewCommon.groupId() : Long.parseLong(planNewCommon.importDomain());
|
|
|
|
|
+ return Mono.just(setPlanNewCommon(groupId, planNewCommon.code(), planNewCommon.type()));
|
|
|
} else if (Objects.nonNull(f.getT2().planNewId())) {
|
|
} else if (Objects.nonNull(f.getT2().planNewId())) {
|
|
|
PlanNew planNew = f.getT2();
|
|
PlanNew planNew = f.getT2();
|
|
|
- return Mono.just(setPlanNewCommon(planNew.groupId(), planNew.code()));
|
|
|
|
|
|
|
+ Long groupId = StrUtil.isEmpty(planNew.importDomain()) ? planNew.groupId() : Long.parseLong(planNew.importDomain());
|
|
|
|
|
+ return Mono.just(setPlanNewCommon(groupId, planNew.code(), planNew.type()));
|
|
|
} else {
|
|
} else {
|
|
|
ListeningPlanNew listeningPlanNew = f.getT3();
|
|
ListeningPlanNew listeningPlanNew = f.getT3();
|
|
|
- return Mono.just(setPlanNewCommon(listeningPlanNew.groupId(), listeningPlanNew.code()));
|
|
|
|
|
|
|
+ return Mono.just(setPlanNewCommon(listeningPlanNew.groupId(), listeningPlanNew.code(), listeningPlanNew.type()));
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- Mono<List<DomainSelect>> domainSelectMono = planNewCommonMono1.flatMap(f -> template.select(Query.query(Criteria
|
|
|
|
|
|
|
+ Mono<List<DomainSelect>> domainSelectMono = planNewCommonMono1.flatMap(f -> template.select(Query.query(Criteria
|
|
|
.where("group_type_id").is(isQs ? groupIdQs : f.groupId())
|
|
.where("group_type_id").is(isQs ? groupIdQs : f.groupId())
|
|
|
.and("status").is(1)
|
|
.and("status").is(1)
|
|
|
.and("type").is(1)
|
|
.and("type").is(1)
|
|
@@ -997,8 +1001,8 @@ public class GoGenerateService {
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private PlanNewCommon setPlanNewCommon(Long groupId, String code) {
|
|
|
|
|
- return new PlanNewCommon(null, null, code, null, groupId, null, null, null, null, null, null, null, null, null, null);
|
|
|
|
|
|
|
+ private PlanNewCommon setPlanNewCommon(Long groupId, String code, Integer type) {
|
|
|
|
|
+ return new PlanNewCommon(null, null, code, type, groupId, null, null, null, null, null, null, null, null, null, null);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private PlanNewCommon getPlanNewCommon() {
|
|
private PlanNewCommon getPlanNewCommon() {
|
|
@@ -1379,14 +1383,14 @@ public class GoGenerateService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
- public Mono<String> updatePoster1(){
|
|
|
|
|
|
|
+ public Mono<String> updatePoster1() {
|
|
|
Mono<String> poster_id = template.selectOne(Query.query(Criteria.where("poster_id").is(37)), Poster.class).flatMap(f -> {
|
|
Mono<String> poster_id = template.selectOne(Query.query(Criteria.where("poster_id").is(37)), Poster.class).flatMap(f -> {
|
|
|
|
|
|
|
|
PosterRequest posterRequest = new PosterRequest();
|
|
PosterRequest posterRequest = new PosterRequest();
|
|
|
posterRequest.setPosterId(f.posterId());
|
|
posterRequest.setPosterId(f.posterId());
|
|
|
posterRequest.setPosterTemplate(f.posterTemplate());
|
|
posterRequest.setPosterTemplate(f.posterTemplate());
|
|
|
posterRequest.setPosterTemplateId(f.posterTemplateId());
|
|
posterRequest.setPosterTemplateId(f.posterTemplateId());
|
|
|
- //Mono<RStatus<Poster>> rStatusMono = updatePoster(posterRequest);
|
|
|
|
|
|
|
+ // Mono<RStatus<Poster>> rStatusMono = updatePoster(posterRequest);
|
|
|
String s = goGenerate(JSONUtil.toJsonStr(f.posterTemplate()));
|
|
String s = goGenerate(JSONUtil.toJsonStr(f.posterTemplate()));
|
|
|
// System.out.println(s);
|
|
// System.out.println(s);
|
|
|
return Mono.just(s);
|
|
return Mono.just(s);
|