|
|
@@ -309,36 +309,33 @@ public class PlanNewOutController {
|
|
|
return a;
|
|
|
});
|
|
|
// 设置封面等
|
|
|
-// Mono<DataLists0> dataLists0Mono2 = zip.flatMap(fm -> {
|
|
|
-// Poster poster = fm.getPoster();
|
|
|
-// if (Objects.isNull(poster)) {
|
|
|
-// return Mono.just(fm);
|
|
|
-// }
|
|
|
-// String posterTemplate = poster.posterTemplate();
|
|
|
-// JSONObject jsonObject = JSONUtil.parseObj(posterTemplate);
|
|
|
-// GoRequest goRequest = new GoRequest();
|
|
|
-// BeanUtil.copyProperties(jsonObject, goRequest);
|
|
|
-// Mono<String> outTemPoster = goGenerateService.getOutTemPoster(goRequest, goGenerateService.getStringBuilderMono(goRequest));
|
|
|
-// Mono<DataLists0> zip1 = Mono.zip(Mono.just(fm), outTemPoster, (a, b) -> {
|
|
|
-// Poster poster1 = new Poster(poster.posterId(),
|
|
|
-// poster.posterTemplateId(),
|
|
|
-// b,
|
|
|
-// poster.createUser(),
|
|
|
-// poster.createId(),
|
|
|
-// poster.createdAt(),
|
|
|
-// poster.updatedAt(),
|
|
|
-// poster.generateImagesJson(),
|
|
|
-// poster.generateImagesUrl());
|
|
|
-// a.setPoster(poster1);
|
|
|
-// return a;
|
|
|
-// });
|
|
|
-// return zip1;
|
|
|
-// });
|
|
|
+ Mono<DataLists0> dataLists0Mono2 = zip.flatMap(fm -> {
|
|
|
+ Poster poster = fm.getPoster();
|
|
|
+ if (Objects.isNull(poster)) {
|
|
|
+ return Mono.just(fm);
|
|
|
+ }
|
|
|
+ String posterTemplate = poster.posterTemplate();
|
|
|
+ JSONObject jsonObject = JSONUtil.parseObj(posterTemplate);
|
|
|
+ GoRequest goRequest = new GoRequest();
|
|
|
+ BeanUtil.copyProperties(jsonObject, goRequest);
|
|
|
+ Mono<String> outTemPoster = goGenerateService.getOutTemPoster(goRequest, goGenerateService.getStringBuilderMono(goRequest));
|
|
|
+ Mono<DataLists0> zip1 = Mono.zip(Mono.just(fm), outTemPoster, (a, b) -> {
|
|
|
+ Poster poster1 = new Poster(poster.posterId(),
|
|
|
+ poster.posterTemplateId(),
|
|
|
+ b,
|
|
|
+ poster.createUser(),
|
|
|
+ poster.createId(),
|
|
|
+ poster.createdAt(),
|
|
|
+ poster.updatedAt(),
|
|
|
+ poster.generateImagesJson(),
|
|
|
+ poster.generateImagesUrl());
|
|
|
+ a.setPoster(poster1);
|
|
|
+ return a;
|
|
|
+ });
|
|
|
+ return zip1;
|
|
|
+ });
|
|
|
|
|
|
- // if(Objects.nonNull(goRequest)){
|
|
|
-//
|
|
|
-// }
|
|
|
- Mono<DataLists0> dataLists0Mono1 = zip.flatMap(fm -> {
|
|
|
+ Mono<DataLists0> dataLists0Mono1 = dataLists0Mono2.flatMap(fm -> {
|
|
|
Poster poster = fm.getPoster();
|
|
|
if (Objects.isNull(poster)) {
|
|
|
return Mono.just(fm);
|
|
|
@@ -396,7 +393,6 @@ public class PlanNewOutController {
|
|
|
JSONArray jsonArray = JSONUtil.parseArray(kefu);
|
|
|
if (!jsonArray.isEmpty()) {
|
|
|
String s = jsonArray.get(0, String.class);
|
|
|
- log.info("item.setName(s);");
|
|
|
item.setName(s);
|
|
|
return goRequest;
|
|
|
}
|