|
|
@@ -593,29 +593,19 @@ public class PlanNewController {
|
|
|
);
|
|
|
return Mono.just(planNew);
|
|
|
}).flatMap(template::update);
|
|
|
-
|
|
|
-// Mono<String> map = planNewMono.map(f->{
|
|
|
-// template.delete(Query.query(Criteria.where("plan_new_id").is(f.planNewId())),PlanNewBackgroupPoster.class).subscribe();
|
|
|
-// return f;
|
|
|
-// }).map(f -> {
|
|
|
-// List<ServiceGroupSettingItemRequest> backgroupFxSetting = saveRequest.getBackgroupFxSetting();
|
|
|
-// backgroupFxSetting.forEach(fx -> fxBackgroupSettingsUpdate(fx, f.planNewId(), 1));
|
|
|
-// List<ServiceGroupSettingItemRequest> backgroupQsSetting = saveRequest.getBackgroupQsSetting();
|
|
|
-// backgroupQsSetting.forEach(qs -> fxBackgroupSettingsUpdate(qs, f.planNewId(), 2));
|
|
|
-// return f.planNewId()+"";
|
|
|
-// });
|
|
|
-
|
|
|
- Mono<String> map = planNewMono.flatMap(f -> {
|
|
|
+ Mono<String> map = planNewMono.flatMap(f1->{
|
|
|
+ Mono<Long> ml= template.delete(Query.query(Criteria.where("plan_new_id").is(f1.planNewId())),PlanNewBackgroupPoster.class);
|
|
|
+ return Mono.zip(Mono.just(f1),ml).flatMap(ff->Mono.just(f1));
|
|
|
+ }).flatMap(f -> {
|
|
|
Flux<PlanNewBackgroupPoster> just = getPlanNewBackgroupPosterFlux(saveRequest, f);
|
|
|
- Mono<Long> ml= template.delete(Query.query(Criteria.where("plan_new_id").is(f.planNewId())),PlanNewBackgroupPoster.class);
|
|
|
- return Mono.zip(batchInsert(just), Mono.just(f),ml).flatMap(ff -> {
|
|
|
+
|
|
|
+ return Mono.zip(batchInsert(just), Mono.just(f)).flatMap(ff -> {
|
|
|
PlanNew t2 = ff.getT2();
|
|
|
return Mono.just(t2.planNewId());
|
|
|
});
|
|
|
});
|
|
|
return RStatus.success(map);
|
|
|
}
|
|
|
-
|
|
|
throw new BaseException("type类型错误");
|
|
|
}
|
|
|
public void fxBackgroupSettingsUpdate( ServiceGroupSettingItemRequest request,String planNewId,Integer qsOrFx){
|