|
|
@@ -334,33 +334,35 @@ public class ListeningPlanServiceImpl implements ListeningPlanServiceInterface{
|
|
|
public Mono<RStatus<String>> copyById(String listeningPlanNewId) {
|
|
|
String userName = BaseContextHandler.getUserName();
|
|
|
String userId = BaseContextHandler.getUserId();
|
|
|
- Mono<ListeningPlanNew> listening_plan_new_id = template
|
|
|
- .selectOne(Query.query(Criteria.where("listening_plan_new_id").is(listeningPlanNewId)), ListeningPlanNew.class)
|
|
|
- .switchIfEmpty(Mono.error(new BaseException("计划错误")))
|
|
|
- .onErrorResume(throwable -> Mono.error(new BaseException(throwable.getMessage())))
|
|
|
- .flatMap(f -> {
|
|
|
- ListeningPlanNew listeningPlanNew = new ListeningPlanNew(IdUtil.fastSimpleUUID(),
|
|
|
- f.name(),
|
|
|
- userName,
|
|
|
- userId,
|
|
|
- ZonedDateTime.now(),
|
|
|
- ZonedDateTime.now(),
|
|
|
- null,
|
|
|
- f.type(),
|
|
|
- IdUtil.fastSimpleUUID(),
|
|
|
- f.groupId(),
|
|
|
- f.groupName(),
|
|
|
- f.posterTemplateId(),
|
|
|
- f.pageShow(),
|
|
|
- f.pageLine(),
|
|
|
- f.link(),
|
|
|
- f.backgroundGroupId(),
|
|
|
- f.baiduDot(),
|
|
|
- null,
|
|
|
- f.listButton()
|
|
|
- );
|
|
|
- return Mono.just(listeningPlanNew);
|
|
|
- }).flatMap(f -> template.insert(f));
|
|
|
+
|
|
|
+ Mono<String> code = customCodeServer.getCode();
|
|
|
+ Mono<ListeningPlanNew> listening_plan_new_id = code.flatMap(codeN-> template.selectOne(Query.query(Criteria.where("listening_plan_new_id").is(listeningPlanNewId)), ListeningPlanNew.class)
|
|
|
+ .switchIfEmpty(Mono.error(new BaseException("计划错误")))
|
|
|
+ .onErrorResume(throwable -> Mono.error(new BaseException(throwable.getMessage())))
|
|
|
+ .flatMap(f -> {
|
|
|
+ ListeningPlanNew listeningPlanNew = new ListeningPlanNew(IdUtil.fastSimpleUUID(),
|
|
|
+ f.name(),
|
|
|
+ userName,
|
|
|
+ userId,
|
|
|
+ ZonedDateTime.now(),
|
|
|
+ ZonedDateTime.now(),
|
|
|
+ null,
|
|
|
+ f.type(),
|
|
|
+ codeN,
|
|
|
+ f.groupId(),
|
|
|
+ f.groupName(),
|
|
|
+ f.posterTemplateId(),
|
|
|
+ f.pageShow(),
|
|
|
+ f.pageLine(),
|
|
|
+ f.link(),
|
|
|
+ f.backgroundGroupId(),
|
|
|
+ f.baiduDot(),
|
|
|
+ null,
|
|
|
+ f.listButton()
|
|
|
+ );
|
|
|
+ return Mono.just(listeningPlanNew);
|
|
|
+ }).flatMap(f -> template.insert(f)));
|
|
|
+
|
|
|
Mono<List<ListeningPlanNewBackgroupPoster>> listening_plan_new_id1 =
|
|
|
template.select(Query.query(Criteria.where("listening_plan_new_id")
|
|
|
.is(listeningPlanNewId)), ListeningPlanNewBackgroupPoster.class)
|