|
|
@@ -81,11 +81,11 @@ public class PlanNewOutController {
|
|
|
if (1 == typePlan) {
|
|
|
Mono<PlanNew> code1 = template
|
|
|
.selectOne(Query.query(Criteria.where("code").is(code)), PlanNew.class)
|
|
|
- .switchIfEmpty(Mono.error(new BaseException("计划code异常"))) //Mono.error(new BaseException("查询海报模版 id:"+f.posterTemplateId()+"=>空"))
|
|
|
+ .switchIfEmpty(Mono.error(new BaseException("计划code异常 返回结果为空"))) //Mono.error(new BaseException("查询海报模版 id:"+f.posterTemplateId()+"=>空"))
|
|
|
.onErrorResume(throwable -> Mono.error(new Exception( throwable.getMessage())));
|
|
|
- Mono<DomainSelectRes> domainSelectResMono1 = code1.flatMap(f -> template.select(Query.query(Criteria.where("group_type_id").is(f.groupId())
|
|
|
+ Mono<DomainSelectRes> domainSelectResMono1 = code1.flatMap(f -> template.select(Query.query(Criteria.where("group_type_id").is(f.landingPageDomain())
|
|
|
.and("status").is(1).and("type").is(type)), DomainSelect.class)
|
|
|
- .switchIfEmpty(Mono.error(new BaseException("查询domain为空")))
|
|
|
+ .switchIfEmpty(Mono.error(new BaseException("查询domain 返回结果为空")))
|
|
|
.onErrorResume(throwable -> Mono.error(new Exception(throwable.getMessage()))).collectList().flatMap(fm -> {
|
|
|
DomainSelectRes domainSelectRes = new DomainSelectRes();
|
|
|
int i = RandomUtil.randomInt(0, fm.size());
|
|
|
@@ -99,11 +99,11 @@ public class PlanNewOutController {
|
|
|
return RStatus.success(domainSelectResMono1);
|
|
|
}else if(2==typePlan){
|
|
|
Mono<ListeningPlanNew> code1 = template.selectOne(Query.query(Criteria.where("code").is(code)), ListeningPlanNew.class)
|
|
|
- .switchIfEmpty(Mono.error(new BaseException("计划code异常"))) //Mono.error(new BaseException("查询海报模版 id:"+f.posterTemplateId()+"=>空"))
|
|
|
+ .switchIfEmpty(Mono.error(new BaseException("计划code异常 返回结果为空"))) //Mono.error(new BaseException("查询海报模版 id:"+f.posterTemplateId()+"=>空"))
|
|
|
.onErrorResume(throwable -> Mono.error(new Exception( throwable.getMessage())));;
|
|
|
Mono<DomainSelectRes> domainSelectResMono1 = code1.flatMap(f -> template.select(Query.query(Criteria.where("group_type_id").is(f.groupId())
|
|
|
.and("status").is(1).and("type").is(type)), DomainSelect.class)
|
|
|
- .switchIfEmpty(Mono.error(new BaseException("查询domain为空")))
|
|
|
+ .switchIfEmpty(Mono.error(new BaseException("查询domain 返回结果为空")))
|
|
|
.onErrorResume(throwable -> Mono.error(new Exception(throwable.getMessage()))).collectList().flatMap(fm -> {
|
|
|
DomainSelectRes domainSelectRes = new DomainSelectRes();
|
|
|
int i = RandomUtil.randomInt(0, fm.size());
|
|
|
@@ -310,7 +310,14 @@ public class PlanNewOutController {
|
|
|
Mono<DataLists> dataListsMono = Mono.zip(code, listAudio, retAudioId, returnLoop, arrayListMono, adtop, bottom, wx_user_id).flatMap(f -> {
|
|
|
DataLists dataLists = new DataLists();
|
|
|
dataLists.setPlanNew(f.getT1());
|
|
|
- dataLists.setListAudio(f.getT2());
|
|
|
+
|
|
|
+ dataLists.setTransferPageBl(f.getT1().transferPageBl());
|
|
|
+ dataLists.setTransferPageDomain(f.getT1().transferPageDomain());
|
|
|
+ dataLists.setBackgroupDomain(f.getT1().backgroupDomain());
|
|
|
+ if (Objects.nonNull(f.getT2().id())) {
|
|
|
+ dataLists.setListAudio(f.getT2());
|
|
|
+ }
|
|
|
+
|
|
|
dataLists.setRetAudio(f.getT3());
|
|
|
if (-1 != f.getT4().id()) {
|
|
|
dataLists.setReturnLoop(f.getT4());
|
|
|
@@ -570,13 +577,13 @@ public class PlanNewOutController {
|
|
|
|
|
|
// //+二维码
|
|
|
private Mono<StringBuilder> getEwm(HftRequest request, Mono<PlanNew> code) {
|
|
|
- Mono<StringBuilder> stringBuilderMono ;
|
|
|
- if (Objects.nonNull(request.getWx_user_id()) && !"".equals(request.getWx_user_id())) {
|
|
|
- stringBuilderMono = goGenerateService.getStringBuilderMonoQs(code);
|
|
|
- }else{
|
|
|
- stringBuilderMono = goGenerateService.getStringBuilderMonoYx(code);
|
|
|
- }
|
|
|
- return stringBuilderMono;
|
|
|
+ // Mono<StringBuilder> stringBuilderMono ;
|
|
|
+// if (Objects.nonNull(request.getWx_user_id()) && !"".equals(request.getWx_user_id())) {
|
|
|
+// stringBuilderMono = goGenerateService.getStringBuilderMonoQs(code);
|
|
|
+// }else{
|
|
|
+// stringBuilderMono = goGenerateService.getStringBuilderMonoYx(code);
|
|
|
+// }
|
|
|
+ return goGenerateService.getOutImportDomain(code);
|
|
|
}
|
|
|
|
|
|
private Mono<List<PlanNewBackgroupPoster>> getPlanNewBackgroupPoster(Mono<PlanNew> code) {
|