|
@@ -8,10 +8,17 @@ import cn.hutool.json.JSONUtil;
|
|
|
import com.webflux.launchadmin.config.BaseContextHandler;
|
|
import com.webflux.launchadmin.config.BaseContextHandler;
|
|
|
import com.webflux.launchadmin.global.BaseException;
|
|
import com.webflux.launchadmin.global.BaseException;
|
|
|
import com.webflux.launchadmin.mysql.controller.lbOut.resp.DataList;
|
|
import com.webflux.launchadmin.mysql.controller.lbOut.resp.DataList;
|
|
|
|
|
+import com.webflux.launchadmin.mysql.controller.listening.res.ListeningPlanNewRes;
|
|
|
|
|
+import com.webflux.launchadmin.mysql.controller.listening.res.ListeningPlanNewRes1;
|
|
|
|
|
+import com.webflux.launchadmin.mysql.controller.listening.res.ListeningPlanNewRes2;
|
|
|
import com.webflux.launchadmin.mysql.controller.planNew.req.*;
|
|
import com.webflux.launchadmin.mysql.controller.planNew.req.*;
|
|
|
import com.webflux.launchadmin.mysql.controller.planNew.res.*;
|
|
import com.webflux.launchadmin.mysql.controller.planNew.res.*;
|
|
|
import com.webflux.launchadmin.mysql.entity.lb.HomePageTempItem;
|
|
import com.webflux.launchadmin.mysql.entity.lb.HomePageTempItem;
|
|
|
|
|
+import com.webflux.launchadmin.mysql.entity.listening.ListeningPlanNew;
|
|
|
|
|
+import com.webflux.launchadmin.mysql.entity.listening.ListeningPlanNewBackgroupPoster;
|
|
|
import com.webflux.launchadmin.mysql.entity.planNew.*;
|
|
import com.webflux.launchadmin.mysql.entity.planNew.*;
|
|
|
|
|
+import com.webflux.launchadmin.mysql.service.listening.ListeningPlanServiceInterface;
|
|
|
|
|
+import com.webflux.launchadmin.mysql.service.planNew.PlanServiceInterface;
|
|
|
import com.webflux.launchadmin.mysql.service.planNew.goGenerate.GoGenerateService;
|
|
import com.webflux.launchadmin.mysql.service.planNew.goGenerate.GoGenerateService;
|
|
|
import com.webflux.launchadmin.mysql.service.planNew.structure.GoRequest;
|
|
import com.webflux.launchadmin.mysql.service.planNew.structure.GoRequest;
|
|
|
import com.webflux.launchcommon.returnObj.Paged;
|
|
import com.webflux.launchcommon.returnObj.Paged;
|
|
@@ -26,15 +33,12 @@ import org.springframework.data.relational.core.query.Update;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import reactor.core.publisher.Flux;
|
|
import reactor.core.publisher.Flux;
|
|
|
import reactor.core.publisher.Mono;
|
|
import reactor.core.publisher.Mono;
|
|
|
-
|
|
|
|
|
import java.time.ZonedDateTime;
|
|
import java.time.ZonedDateTime;
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
import java.util.Objects;
|
|
import java.util.Objects;
|
|
|
-import java.util.Optional;
|
|
|
|
|
-import java.util.concurrent.Phaser;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
-import java.util.stream.Stream;
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 计划
|
|
* 计划
|
|
@@ -50,7 +54,10 @@ public class PlanNewController {
|
|
|
|
|
|
|
|
@Resource
|
|
@Resource
|
|
|
private GoGenerateService goGenerateService;
|
|
private GoGenerateService goGenerateService;
|
|
|
-
|
|
|
|
|
|
|
+ @Resource
|
|
|
|
|
+ private ListeningPlanServiceInterface listeningPlanService;
|
|
|
|
|
+ @Resource
|
|
|
|
|
+ private PlanServiceInterface planServiceInterface;
|
|
|
|
|
|
|
|
@GetMapping("tt")
|
|
@GetMapping("tt")
|
|
|
public String tt(){
|
|
public String tt(){
|
|
@@ -65,15 +72,61 @@ public class PlanNewController {
|
|
|
*
|
|
*
|
|
|
* 分享、清水背景组-回显
|
|
* 分享、清水背景组-回显
|
|
|
* @param planNewId 计划id
|
|
* @param planNewId 计划id
|
|
|
- * @param qsOrFx 1:分享 2:清水
|
|
|
|
|
|
|
+ * @param qsOrFx 1:营销 2:清水
|
|
|
* @return {@link Mono}<{@link RStatus}<{@link BackgroupImageRes}>>
|
|
* @return {@link Mono}<{@link RStatus}<{@link BackgroupImageRes}>>
|
|
|
*/
|
|
*/
|
|
|
- @GetMapping("backgroupSelectOne/{planNewId}/{qsOrFx}")
|
|
|
|
|
- public Mono<RStatus<List<PlanNewBackgroupPoster>>> backgroupSelectOne(@PathVariable("planNewId") Long planNewId,@PathVariable("qsOrFx") Integer qsOrFx ){
|
|
|
|
|
- Mono<List<PlanNewBackgroupPoster>> listMono = template.select(Query.query(Criteria.where("plan_new_id").is(planNewId)
|
|
|
|
|
- .and("qs_or_fx").is(qsOrFx)).sort(Sort.by(Sort.Order.asc("idx"))), PlanNewBackgroupPoster.class)
|
|
|
|
|
- .collectList();
|
|
|
|
|
- return RStatus.successList(listMono);
|
|
|
|
|
|
|
+ @GetMapping("backgroupSelectOne/{type}/{planNewId}/{qsOrFx}")
|
|
|
|
|
+ public Mono<RStatus<List<PlanNewBackgroupPosterAllRes>>> backgroupSelectOne(@PathVariable("type") @NotNull Integer type,
|
|
|
|
|
+ @PathVariable("planNewId") String planNewId,@PathVariable("qsOrFx") Integer qsOrFx ){
|
|
|
|
|
+ if (1 == type) {
|
|
|
|
|
+ Mono<List<PlanNewBackgroupPosterAllRes>> listMono = template.select(Query.query(Criteria.where("plan_new_id").is(planNewId)
|
|
|
|
|
+ .and("qs_or_fx").is(qsOrFx)).sort(Sort.by(Sort.Order.asc("idx"))), PlanNewBackgroupPoster.class).flatMap(request->{
|
|
|
|
|
+ PlanNewBackgroupPosterAllRes planNewBackgroupPosterAllRes =
|
|
|
|
|
+ new PlanNewBackgroupPosterAllRes(request.id(),
|
|
|
|
|
+ request.audioId(),
|
|
|
|
|
+ request.groupId(),
|
|
|
|
|
+ request.image(),
|
|
|
|
|
+ request.kefu(),
|
|
|
|
|
+ request.limitTime(),
|
|
|
|
|
+ request.limitTimeRemark(),
|
|
|
|
|
+ request.status(),
|
|
|
|
|
+ request.index(),
|
|
|
|
|
+ request.serviceGroupId(),
|
|
|
|
|
+ request.serviceGroupType(),
|
|
|
|
|
+ qsOrFx,
|
|
|
|
|
+ ZonedDateTime.now(),
|
|
|
|
|
+ null,
|
|
|
|
|
+ null,
|
|
|
|
|
+ request.planNewId(), null, null);
|
|
|
|
|
+ return Mono.just(planNewBackgroupPosterAllRes);
|
|
|
|
|
+ }).collectList();
|
|
|
|
|
+ return RStatus.successList(listMono);
|
|
|
|
|
+ } else if (2 == type) {
|
|
|
|
|
+ Mono<List<PlanNewBackgroupPosterAllRes>> listMono = template.select(Query.query(Criteria.where("listening_plan_new_id").is(planNewId)
|
|
|
|
|
+ .and("qs_or_fx").is(qsOrFx))
|
|
|
|
|
+ .sort(Sort.by(Sort.Order.asc("idx"))), ListeningPlanNewBackgroupPoster.class).flatMap(request->{
|
|
|
|
|
+ PlanNewBackgroupPosterAllRes planNewBackgroupPosterAllRes =
|
|
|
|
|
+ new PlanNewBackgroupPosterAllRes(request.id(),
|
|
|
|
|
+ request.audioId(),
|
|
|
|
|
+ request.groupId(),
|
|
|
|
|
+ request.image(),
|
|
|
|
|
+ request.kefu(),
|
|
|
|
|
+ request.limitTime(),
|
|
|
|
|
+ request.limitTimeRemark(),
|
|
|
|
|
+ request.status(),
|
|
|
|
|
+ request.index(),
|
|
|
|
|
+ request.serviceGroupId(),
|
|
|
|
|
+ request.serviceGroupType(),
|
|
|
|
|
+ qsOrFx,
|
|
|
|
|
+ ZonedDateTime.now(),
|
|
|
|
|
+ null,
|
|
|
|
|
+ null,
|
|
|
|
|
+ request.listeningPlanNewId(), null, null);
|
|
|
|
|
+ return Mono.just(planNewBackgroupPosterAllRes);
|
|
|
|
|
+ }).collectList();
|
|
|
|
|
+ return RStatus.successList(listMono);
|
|
|
|
|
+ }
|
|
|
|
|
+ throw new BaseException("type异常");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -146,7 +199,6 @@ public class PlanNewController {
|
|
|
*/
|
|
*/
|
|
|
@GetMapping("backgroupSlt")
|
|
@GetMapping("backgroupSlt")
|
|
|
public Mono<RStatus<List<BackgroupImage>>> backgroupSlt ( @RequestParam("name") String name,@RequestParam("groupType") String groupType){
|
|
public Mono<RStatus<List<BackgroupImage>>> backgroupSlt ( @RequestParam("name") String name,@RequestParam("groupType") String groupType){
|
|
|
-
|
|
|
|
|
Criteria criteria= Criteria.where("group_type").is(groupType) ; //poster_template_id
|
|
Criteria criteria= Criteria.where("group_type").is(groupType) ; //poster_template_id
|
|
|
if (Objects.nonNull(name) && "" != name) {
|
|
if (Objects.nonNull(name) && "" != name) {
|
|
|
criteria = criteria.and("name").like("%"+name+"%");
|
|
criteria = criteria.and("name").like("%"+name+"%");
|
|
@@ -176,19 +228,16 @@ public class PlanNewController {
|
|
|
*/
|
|
*/
|
|
|
@PostMapping("savePoster")
|
|
@PostMapping("savePoster")
|
|
|
public Mono<RStatus<Poster>> savePoster(@RequestBody PosterRequest posterRequset){
|
|
public Mono<RStatus<Poster>> savePoster(@RequestBody PosterRequest posterRequset){
|
|
|
-
|
|
|
|
|
return goGenerateService.savePoster(posterRequset);
|
|
return goGenerateService.savePoster(posterRequset);
|
|
|
}
|
|
}
|
|
|
@PostMapping("test11")
|
|
@PostMapping("test11")
|
|
|
public Mono<RStatus<Poster>> test11(){
|
|
public Mono<RStatus<Poster>> test11(){
|
|
|
return goGenerateService.updatePoster1();
|
|
return goGenerateService.updatePoster1();
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
@PostMapping("test12")
|
|
@PostMapping("test12")
|
|
|
public Mono<String> test112(){
|
|
public Mono<String> test112(){
|
|
|
String string = RandomUtil.randomString("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", 6);
|
|
String string = RandomUtil.randomString("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", 6);
|
|
|
return Mono.just(string);//goGenerateService.updatePoster12();
|
|
return Mono.just(string);//goGenerateService.updatePoster12();
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
/**
|
|
/**
|
|
|
* 海报修改
|
|
* 海报修改
|
|
@@ -348,86 +397,109 @@ public class PlanNewController {
|
|
|
* @return {@link Mono}<{@link RStatus}<{@link PlanNew}>>
|
|
* @return {@link Mono}<{@link RStatus}<{@link PlanNew}>>
|
|
|
*/
|
|
*/
|
|
|
@PostMapping("savePlan")
|
|
@PostMapping("savePlan")
|
|
|
- public Mono<RStatus<PlanNew>> savePlan(@RequestBody PlanReq saveRequest){
|
|
|
|
|
- String userName = BaseContextHandler.getUserName();
|
|
|
|
|
- String userId = BaseContextHandler.getUserId();
|
|
|
|
|
- saveRequest.setCode(IdUtil.fastSimpleUUID());
|
|
|
|
|
- Long posterTemplateId = saveRequest.getPosterTemplateId();
|
|
|
|
|
- Mono<String> stringMono1 = template
|
|
|
|
|
- .select(Query.query(Criteria.where("poster_template_id").is(posterTemplateId)).sort(Sort.by(Sort.Order.asc("created_at"))), Poster.class)
|
|
|
|
|
- .collectList().flatMap(f -> {
|
|
|
|
|
- Poster poster = f.get(0);
|
|
|
|
|
- String posterTemplate = poster.posterTemplate();
|
|
|
|
|
- JSONObject jsonObject = JSONUtil.parseObj(posterTemplate);
|
|
|
|
|
- GoRequest goRequest = new GoRequest();
|
|
|
|
|
- BeanUtil.copyProperties(jsonObject, goRequest);
|
|
|
|
|
- ServiceGroupSettingItemRequest serviceGroupSettingItemRequest = saveRequest.getBackgroupFxSetting().get(0);
|
|
|
|
|
- Mono<String> stringMono = goGenerateService.saveAndUpdatePlanGenerateImage0(goRequest,
|
|
|
|
|
- goGenerateService.getStringBuilderMono(goRequest),
|
|
|
|
|
- serviceGroupSettingItemRequest,
|
|
|
|
|
- saveRequest);
|
|
|
|
|
- return stringMono;
|
|
|
|
|
- });
|
|
|
|
|
- Mono<StringBuilder> stringBuilderMono ;
|
|
|
|
|
- if(saveRequest.getRedirectType()==2){
|
|
|
|
|
- stringBuilderMono =Mono.just(new StringBuilder()); //goGenerateService.byPlanNewIdGetUrl(saveRequest.getRedirectPlanId());
|
|
|
|
|
- }else {
|
|
|
|
|
- stringBuilderMono=Mono.just(new StringBuilder(saveRequest.getLink()));
|
|
|
|
|
- }
|
|
|
|
|
- Mono<PlanNew> insert = Mono.zip(stringMono1, stringBuilderMono).flatMap(f->{
|
|
|
|
|
- PlanNew plan = new PlanNew(null,
|
|
|
|
|
- saveRequest.getName(),
|
|
|
|
|
- userName,
|
|
|
|
|
- userId,
|
|
|
|
|
- ZonedDateTime.now(),
|
|
|
|
|
- ZonedDateTime.now(),
|
|
|
|
|
- null,
|
|
|
|
|
- saveRequest.getType(),
|
|
|
|
|
- saveRequest.getCode(),
|
|
|
|
|
- saveRequest.getGroupId(),
|
|
|
|
|
- saveRequest.getPosterTemplateId(),
|
|
|
|
|
- saveRequest.getPageShow(),
|
|
|
|
|
- saveRequest.getPageLine(),
|
|
|
|
|
- saveRequest.getCount(),
|
|
|
|
|
- saveRequest.getListAudioId(),
|
|
|
|
|
- saveRequest.getRetAudioId(),
|
|
|
|
|
- f.getT2().toString(),
|
|
|
|
|
- saveRequest.getIsAddQun(),
|
|
|
|
|
- saveRequest.getBackgroundGroupId(),
|
|
|
|
|
- saveRequest.getHomePageId(),
|
|
|
|
|
- saveRequest.getTopAdvNum(),
|
|
|
|
|
- saveRequest.getBottomAdvNum(),
|
|
|
|
|
- saveRequest.getReturnLoopId(),
|
|
|
|
|
- saveRequest.getBackgroundGroupQsId(),
|
|
|
|
|
- saveRequest.getTopAdvBl(),
|
|
|
|
|
- saveRequest.getBottomAdvBl(),
|
|
|
|
|
- saveRequest.getReturnLoopBl(),
|
|
|
|
|
- saveRequest.getGroupIdQs(),
|
|
|
|
|
- saveRequest.getBaiduDot(),
|
|
|
|
|
- saveRequest.getBackgroundGroupIdNewAdd(),
|
|
|
|
|
- f.getT1(),
|
|
|
|
|
- saveRequest.getRedirectType(),
|
|
|
|
|
- saveRequest.getRedirectPlanId()
|
|
|
|
|
- );
|
|
|
|
|
- return template.insert(plan);
|
|
|
|
|
-
|
|
|
|
|
- });
|
|
|
|
|
- Mono<PlanNew> map = insert.map(f -> {
|
|
|
|
|
- List<ServiceGroupSettingItemRequest> backgroupFxSetting = saveRequest.getBackgroupFxSetting();
|
|
|
|
|
- backgroupFxSetting.forEach(fx -> {
|
|
|
|
|
- fxBackgroupSettingsSave(fx, f.planNewId(), 1);
|
|
|
|
|
|
|
+ public Mono<RStatus<String>> savePlan(@RequestBody PlanReq saveRequest){
|
|
|
|
|
+ if(2==saveRequest.getType()){
|
|
|
|
|
+ return listeningPlanService.savePlan(saveRequest);
|
|
|
|
|
+ }else if(1==saveRequest.getType()){
|
|
|
|
|
+ String userName = BaseContextHandler.getUserName();
|
|
|
|
|
+ String userId = BaseContextHandler.getUserId();
|
|
|
|
|
+ saveRequest.setCode(IdUtil.fastSimpleUUID());
|
|
|
|
|
+ Long posterTemplateId = saveRequest.getPosterTemplateId();
|
|
|
|
|
+ Mono<String> stringMono1 = template
|
|
|
|
|
+ .select(Query.query(Criteria.where("poster_template_id")
|
|
|
|
|
+ .is(posterTemplateId))
|
|
|
|
|
+ .sort(Sort.by(Sort.Order.asc("created_at"))), Poster.class)
|
|
|
|
|
+ .collectList().flatMap(f -> {
|
|
|
|
|
+ Poster poster = f.get(0);
|
|
|
|
|
+ String posterTemplate = poster.posterTemplate();
|
|
|
|
|
+ JSONObject jsonObject = JSONUtil.parseObj(posterTemplate);
|
|
|
|
|
+ GoRequest goRequest = new GoRequest();
|
|
|
|
|
+ BeanUtil.copyProperties(jsonObject, goRequest);
|
|
|
|
|
+ ServiceGroupSettingItemRequest serviceGroupSettingItemRequest = saveRequest.getBackgroupFxSetting().get(0);
|
|
|
|
|
+ Mono<String> stringMono = goGenerateService.saveAndUpdatePlanGenerateImage0(goRequest,
|
|
|
|
|
+ goGenerateService.getStringBuilderMono(goRequest),
|
|
|
|
|
+ serviceGroupSettingItemRequest,
|
|
|
|
|
+ saveRequest);
|
|
|
|
|
+ return stringMono;
|
|
|
|
|
+ });
|
|
|
|
|
+ Mono<StringBuilder> stringBuilderMono ;
|
|
|
|
|
+ if(saveRequest.getRedirectType()==2){
|
|
|
|
|
+ stringBuilderMono =Mono.just(new StringBuilder()); //goGenerateService.byPlanNewIdGetUrl(saveRequest.getRedirectPlanId());
|
|
|
|
|
+ }else {
|
|
|
|
|
+ stringBuilderMono=Mono.just(new StringBuilder(saveRequest.getLink()));
|
|
|
|
|
+ }
|
|
|
|
|
+ Mono<PlanNew> insert = Mono.zip(stringMono1, stringBuilderMono).flatMap(f->{
|
|
|
|
|
+ PlanNew plan = new PlanNew(IdUtil.fastSimpleUUID(),
|
|
|
|
|
+ saveRequest.getName(),
|
|
|
|
|
+ userName,
|
|
|
|
|
+ userId,
|
|
|
|
|
+ ZonedDateTime.now(),
|
|
|
|
|
+ ZonedDateTime.now(),
|
|
|
|
|
+ null,
|
|
|
|
|
+ saveRequest.getType(),
|
|
|
|
|
+ saveRequest.getCode(),
|
|
|
|
|
+ saveRequest.getGroupId(),
|
|
|
|
|
+ saveRequest.getPosterTemplateId(),
|
|
|
|
|
+ saveRequest.getPageShow(),
|
|
|
|
|
+ saveRequest.getPageLine(),
|
|
|
|
|
+ saveRequest.getCount(),
|
|
|
|
|
+ saveRequest.getListAudioId(),
|
|
|
|
|
+ saveRequest.getRetAudioId(),
|
|
|
|
|
+ f.getT2().toString(),
|
|
|
|
|
+ saveRequest.getIsAddQun(),
|
|
|
|
|
+ saveRequest.getBackgroundGroupId(),
|
|
|
|
|
+ saveRequest.getHomePageId(),
|
|
|
|
|
+ saveRequest.getTopAdvNum(),
|
|
|
|
|
+ saveRequest.getBottomAdvNum(),
|
|
|
|
|
+ saveRequest.getReturnLoopId(),
|
|
|
|
|
+ saveRequest.getBackgroundGroupQsId(),
|
|
|
|
|
+ saveRequest.getTopAdvBl(),
|
|
|
|
|
+ saveRequest.getBottomAdvBl(),
|
|
|
|
|
+ saveRequest.getReturnLoopBl(),
|
|
|
|
|
+ saveRequest.getGroupIdQs(),
|
|
|
|
|
+ saveRequest.getBaiduDot(),
|
|
|
|
|
+ saveRequest.getBackgroundGroupIdNewAdd(),
|
|
|
|
|
+ f.getT1(),
|
|
|
|
|
+ saveRequest.getRedirectType(),
|
|
|
|
|
+ saveRequest.getRedirectPlanId()
|
|
|
|
|
+ );
|
|
|
|
|
+ return template.insert(plan);
|
|
|
});
|
|
});
|
|
|
- List<ServiceGroupSettingItemRequest> backgroupQsSetting = saveRequest.getBackgroupQsSetting();
|
|
|
|
|
- backgroupQsSetting.forEach(qs -> {
|
|
|
|
|
- fxBackgroupSettingsSave(qs, f.planNewId(), 2);
|
|
|
|
|
|
|
+ Mono<String> map = insert.flatMap(f -> {
|
|
|
|
|
+ Flux<PlanNewBackgroupPoster> just = getPlanNewBackgroupPosterFlux(saveRequest, f);
|
|
|
|
|
+ return Mono.zip(batchInsert(just), Mono.just(f)).flatMap(ff -> {
|
|
|
|
|
+ PlanNew t2 = ff.getT2();
|
|
|
|
|
+ return Mono.just(t2.planNewId());
|
|
|
|
|
+ });
|
|
|
});
|
|
});
|
|
|
- return f;
|
|
|
|
|
|
|
+ return RStatus.success(map);
|
|
|
|
|
+ }
|
|
|
|
|
+ throw new BaseException("type类型错误");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ private Flux<PlanNewBackgroupPoster> getPlanNewBackgroupPosterFlux(PlanReq saveRequest, PlanNew f) {
|
|
|
|
|
+ List<ServiceGroupSettingItemRequest> backgroupFxSetting = saveRequest.getBackgroupFxSetting();
|
|
|
|
|
+ ArrayList<PlanNewBackgroupPoster> listeningPlanNewBackgroupPosters = new ArrayList<>();
|
|
|
|
|
+ backgroupFxSetting.forEach(fx -> {
|
|
|
|
|
+ PlanNewBackgroupPoster listeningPlanNewBackgroupPoster = fxBackgroupSettingsSave(fx, f.planNewId(), 1);
|
|
|
|
|
+ listeningPlanNewBackgroupPosters.add(listeningPlanNewBackgroupPoster);
|
|
|
|
|
+ });
|
|
|
|
|
+ List<ServiceGroupSettingItemRequest> backgroupQsSetting = saveRequest.getBackgroupQsSetting();
|
|
|
|
|
+ backgroupQsSetting.forEach(fx -> {
|
|
|
|
|
+ PlanNewBackgroupPoster listeningPlanNewBackgroupPoster = fxBackgroupSettingsSave(fx, f.planNewId(), 2);
|
|
|
|
|
+ listeningPlanNewBackgroupPosters.add(listeningPlanNewBackgroupPoster);
|
|
|
});
|
|
});
|
|
|
- return RStatus.success(map);
|
|
|
|
|
|
|
+ Flux<PlanNewBackgroupPoster> just = Flux.fromIterable(listeningPlanNewBackgroupPosters);
|
|
|
|
|
+ return just;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public Boolean fxBackgroupSettingsSave( ServiceGroupSettingItemRequest request,Long planNewId,Integer qsOrFx){
|
|
|
|
|
- PlanNewBackgroupPoster planNewBackgroupPoster = new PlanNewBackgroupPoster(null,
|
|
|
|
|
|
|
+ public Mono<List<PlanNewBackgroupPoster>> batchInsert(Flux<PlanNewBackgroupPoster> entities) {
|
|
|
|
|
+ Mono<List<PlanNewBackgroupPoster>> listMono = entities.flatMap(entity -> template
|
|
|
|
|
+ .insert(PlanNewBackgroupPoster.class).using(entity)).collectList();
|
|
|
|
|
+ return listMono;
|
|
|
|
|
+ }
|
|
|
|
|
+ public PlanNewBackgroupPoster fxBackgroupSettingsSave( ServiceGroupSettingItemRequest request,String planNewId,Integer qsOrFx){
|
|
|
|
|
+ return new PlanNewBackgroupPoster(null,
|
|
|
request.getAudioId(),
|
|
request.getAudioId(),
|
|
|
request.getGroupId(),
|
|
request.getGroupId(),
|
|
|
request.getImage(),
|
|
request.getImage(),
|
|
@@ -443,11 +515,11 @@ public class PlanNewController {
|
|
|
null,
|
|
null,
|
|
|
null,
|
|
null,
|
|
|
planNewId,null,null);
|
|
planNewId,null,null);
|
|
|
- template.insert(planNewBackgroupPoster).subscribe(f->{
|
|
|
|
|
- JSONObject jsonObject = JSONUtil.parseObj(f);
|
|
|
|
|
- System.out.println(jsonObject);
|
|
|
|
|
- });
|
|
|
|
|
- return true;
|
|
|
|
|
|
|
+// template.insert(planNewBackgroupPoster).subscribe(f->{
|
|
|
|
|
+// JSONObject jsonObject = JSONUtil.parseObj(f);
|
|
|
|
|
+// System.out.println(jsonObject);
|
|
|
|
|
+// });
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -457,83 +529,96 @@ public class PlanNewController {
|
|
|
* @return {@link Mono}<{@link RStatus}<{@link PlanNew}>>
|
|
* @return {@link Mono}<{@link RStatus}<{@link PlanNew}>>
|
|
|
*/
|
|
*/
|
|
|
@PostMapping("updatePlan")
|
|
@PostMapping("updatePlan")
|
|
|
- public Mono<RStatus<PlanNew>> updatePlan(@RequestBody PlanReq saveRequest){
|
|
|
|
|
- Long posterTemplateId = saveRequest.getPosterTemplateId();
|
|
|
|
|
- Mono<String> stringMono1 = template
|
|
|
|
|
- .select(Query.query(Criteria.where("poster_template_id").is(posterTemplateId)).sort(Sort.by(Sort.Order.asc("created_at"))), Poster.class)
|
|
|
|
|
- .collectList().flatMap(f -> {
|
|
|
|
|
- Poster poster = f.get(0);
|
|
|
|
|
- String posterTemplate = poster.posterTemplate();
|
|
|
|
|
- JSONObject jsonObject = JSONUtil.parseObj(posterTemplate);
|
|
|
|
|
- GoRequest goRequest = new GoRequest();
|
|
|
|
|
- BeanUtil.copyProperties(jsonObject, goRequest);
|
|
|
|
|
- ServiceGroupSettingItemRequest serviceGroupSettingItemRequest = saveRequest.getBackgroupFxSetting().get(0);
|
|
|
|
|
- Mono<String> stringMono = goGenerateService.saveAndUpdatePlanGenerateImage0(goRequest,
|
|
|
|
|
- goGenerateService.getStringBuilderMono(goRequest), serviceGroupSettingItemRequest, saveRequest);
|
|
|
|
|
- return stringMono;
|
|
|
|
|
|
|
+ public Mono<RStatus<String>> updatePlan(@RequestBody PlanReq saveRequest){
|
|
|
|
|
+ if(2==saveRequest.getType()){
|
|
|
|
|
+ return listeningPlanService.savePlan(saveRequest);
|
|
|
|
|
+ }else if(1==saveRequest.getType()){
|
|
|
|
|
+ Long posterTemplateId = saveRequest.getPosterTemplateId();
|
|
|
|
|
+ Mono<String> stringMono1 = template
|
|
|
|
|
+ .select(Query.query(Criteria.where("poster_template_id").is(posterTemplateId)).sort(Sort.by(Sort.Order.asc("created_at"))), Poster.class)
|
|
|
|
|
+ .collectList().flatMap(f -> {
|
|
|
|
|
+ Poster poster = f.get(0);
|
|
|
|
|
+ String posterTemplate = poster.posterTemplate();
|
|
|
|
|
+ JSONObject jsonObject = JSONUtil.parseObj(posterTemplate);
|
|
|
|
|
+ GoRequest goRequest = new GoRequest();
|
|
|
|
|
+ BeanUtil.copyProperties(jsonObject, goRequest);
|
|
|
|
|
+ ServiceGroupSettingItemRequest serviceGroupSettingItemRequest = saveRequest.getBackgroupFxSetting().get(0);
|
|
|
|
|
+ Mono<String> stringMono = goGenerateService.saveAndUpdatePlanGenerateImage0(goRequest,
|
|
|
|
|
+ goGenerateService.getStringBuilderMono(goRequest), serviceGroupSettingItemRequest, saveRequest);
|
|
|
|
|
+ return stringMono;
|
|
|
|
|
+ });
|
|
|
|
|
+ Mono<PlanNew> plan_new_id1 = template.selectOne(Query.query(Criteria.where("plan_new_id").is(saveRequest.getPlanNewId())), PlanNew.class);
|
|
|
|
|
+ Mono<StringBuilder> stringBuilderMono ;
|
|
|
|
|
+ if(saveRequest.getRedirectType()==2){
|
|
|
|
|
+ stringBuilderMono = Mono.just(new StringBuilder(""));//goGenerateService.byPlanNewIdGetUrl(saveRequest.getRedirectPlanId());
|
|
|
|
|
+ }else {
|
|
|
|
|
+ stringBuilderMono=Mono.just(new StringBuilder(saveRequest.getLink()));
|
|
|
|
|
+ }
|
|
|
|
|
+ Mono<PlanNew> planNewMono = Mono.zip(stringMono1, plan_new_id1, stringBuilderMono).flatMap(f -> {
|
|
|
|
|
+ PlanNew map = f.getT2();
|
|
|
|
|
+ PlanNew planNew = new PlanNew(
|
|
|
|
|
+ saveRequest.getPlanNewId(),
|
|
|
|
|
+ saveRequest.getName(),
|
|
|
|
|
+ map.createUser(),
|
|
|
|
|
+ map.createId(),
|
|
|
|
|
+ map.createdAt(),
|
|
|
|
|
+ ZonedDateTime.now(),
|
|
|
|
|
+ map.deletedAt(),
|
|
|
|
|
+ saveRequest.getType(),
|
|
|
|
|
+ map.code(),
|
|
|
|
|
+ saveRequest.getGroupId(),
|
|
|
|
|
+ saveRequest.getPosterTemplateId(),
|
|
|
|
|
+ saveRequest.getPageShow(),
|
|
|
|
|
+ saveRequest.getPageLine(),
|
|
|
|
|
+ saveRequest.getCount(),
|
|
|
|
|
+ saveRequest.getListAudioId(),
|
|
|
|
|
+ saveRequest.getRetAudioId(),
|
|
|
|
|
+ f.getT3().toString(),
|
|
|
|
|
+ saveRequest.getIsAddQun(),
|
|
|
|
|
+ saveRequest.getBackgroundGroupId(),
|
|
|
|
|
+ saveRequest.getHomePageId(),
|
|
|
|
|
+ saveRequest.getTopAdvNum(),
|
|
|
|
|
+ saveRequest.getBottomAdvNum(),
|
|
|
|
|
+ saveRequest.getReturnLoopId(),
|
|
|
|
|
+ saveRequest.getBackgroundGroupQsId(),
|
|
|
|
|
+ saveRequest.getTopAdvBl(),
|
|
|
|
|
+ saveRequest.getBottomAdvBl(),
|
|
|
|
|
+ saveRequest.getReturnLoopBl(),
|
|
|
|
|
+ saveRequest.getGroupIdQs(),
|
|
|
|
|
+ saveRequest.getBaiduDot(),
|
|
|
|
|
+ saveRequest.getBackgroundGroupIdNewAdd(),
|
|
|
|
|
+ f.getT1(),
|
|
|
|
|
+ saveRequest.getRedirectType(),
|
|
|
|
|
+ saveRequest.getRedirectPlanId()
|
|
|
|
|
+ );
|
|
|
|
|
+ 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 -> {
|
|
|
|
|
+ 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 -> {
|
|
|
|
|
+ PlanNew t2 = ff.getT2();
|
|
|
|
|
+ return Mono.just(t2.planNewId());
|
|
|
});
|
|
});
|
|
|
- Mono<PlanNew> plan_new_id1 = template.selectOne(Query.query(Criteria.where("plan_new_id").is(saveRequest.getPlanNewId())), PlanNew.class);
|
|
|
|
|
-
|
|
|
|
|
- Mono<StringBuilder> stringBuilderMono ;
|
|
|
|
|
- if(saveRequest.getRedirectType()==2){
|
|
|
|
|
- stringBuilderMono = Mono.just(new StringBuilder(""));//goGenerateService.byPlanNewIdGetUrl(saveRequest.getRedirectPlanId());
|
|
|
|
|
- }else {
|
|
|
|
|
- stringBuilderMono=Mono.just(new StringBuilder(saveRequest.getLink()));
|
|
|
|
|
|
|
+ });
|
|
|
|
|
+ return RStatus.success(map);
|
|
|
}
|
|
}
|
|
|
- Mono<PlanNew> planNewMono = Mono.zip(stringMono1, plan_new_id1, stringBuilderMono).flatMap(f -> {
|
|
|
|
|
- PlanNew map = f.getT2();
|
|
|
|
|
- PlanNew planNew = new PlanNew(
|
|
|
|
|
- saveRequest.getPlanNewId(),
|
|
|
|
|
- saveRequest.getName(),
|
|
|
|
|
- map.createUser(),
|
|
|
|
|
- map.createId(),
|
|
|
|
|
- map.createdAt(),
|
|
|
|
|
- ZonedDateTime.now(),
|
|
|
|
|
- map.deletedAt(),
|
|
|
|
|
- saveRequest.getType(),
|
|
|
|
|
- map.code(),
|
|
|
|
|
- saveRequest.getGroupId(),
|
|
|
|
|
- saveRequest.getPosterTemplateId(),
|
|
|
|
|
- saveRequest.getPageShow(),
|
|
|
|
|
- saveRequest.getPageLine(),
|
|
|
|
|
- saveRequest.getCount(),
|
|
|
|
|
- saveRequest.getListAudioId(),
|
|
|
|
|
- saveRequest.getRetAudioId(),
|
|
|
|
|
- f.getT3().toString(),
|
|
|
|
|
- saveRequest.getIsAddQun(),
|
|
|
|
|
- saveRequest.getBackgroundGroupId(),
|
|
|
|
|
- saveRequest.getHomePageId(),
|
|
|
|
|
- saveRequest.getTopAdvNum(),
|
|
|
|
|
- saveRequest.getBottomAdvNum(),
|
|
|
|
|
- saveRequest.getReturnLoopId(),
|
|
|
|
|
- saveRequest.getBackgroundGroupQsId(),
|
|
|
|
|
- saveRequest.getTopAdvBl(),
|
|
|
|
|
- saveRequest.getBottomAdvBl(),
|
|
|
|
|
- saveRequest.getReturnLoopBl(),
|
|
|
|
|
- saveRequest.getGroupIdQs(),
|
|
|
|
|
- saveRequest.getBaiduDot(),
|
|
|
|
|
- saveRequest.getBackgroundGroupIdNewAdd(),
|
|
|
|
|
- f.getT1(),
|
|
|
|
|
- saveRequest.getRedirectType(),
|
|
|
|
|
- saveRequest.getRedirectPlanId()
|
|
|
|
|
- );
|
|
|
|
|
- return Mono.just(planNew);
|
|
|
|
|
- }).flatMap(template::update);
|
|
|
|
|
-
|
|
|
|
|
- Mono<PlanNew> 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;
|
|
|
|
|
- });
|
|
|
|
|
- return RStatus.success(map);
|
|
|
|
|
|
|
|
|
|
|
|
+ throw new BaseException("type类型错误");
|
|
|
}
|
|
}
|
|
|
- public void fxBackgroupSettingsUpdate( ServiceGroupSettingItemRequest request,Long planNewId,Integer qsOrFx){
|
|
|
|
|
|
|
+ public void fxBackgroupSettingsUpdate( ServiceGroupSettingItemRequest request,String planNewId,Integer qsOrFx){
|
|
|
PlanNewBackgroupPoster planNewBackgroupPoster = new PlanNewBackgroupPoster(request.getId(),
|
|
PlanNewBackgroupPoster planNewBackgroupPoster = new PlanNewBackgroupPoster(request.getId(),
|
|
|
request.getAudioId(),
|
|
request.getAudioId(),
|
|
|
request.getGroupId(),
|
|
request.getGroupId(),
|
|
@@ -558,50 +643,88 @@ public class PlanNewController {
|
|
|
* @param planNewId
|
|
* @param planNewId
|
|
|
* @return {@link Mono}<{@link RStatus}<{@link PlanNew}>>
|
|
* @return {@link Mono}<{@link RStatus}<{@link PlanNew}>>
|
|
|
*/
|
|
*/
|
|
|
- @GetMapping("copyById/{planNewId}")
|
|
|
|
|
- public Mono<RStatus<PlanNew>> copyById (@PathVariable("planNewId") @NotNull Long planNewId){
|
|
|
|
|
- String userName = BaseContextHandler.getUserName();
|
|
|
|
|
- String userId = BaseContextHandler.getUserId();
|
|
|
|
|
- Mono<PlanNew> plan_new_id = template.selectOne(Query.query(Criteria.where("plan_new_id").is(planNewId)), PlanNew.class)
|
|
|
|
|
- .map(saveRequest -> new PlanNew(null,
|
|
|
|
|
- saveRequest.name(),
|
|
|
|
|
- userName,
|
|
|
|
|
- userId,
|
|
|
|
|
- ZonedDateTime.now(),
|
|
|
|
|
- ZonedDateTime.now(),
|
|
|
|
|
- null,
|
|
|
|
|
- saveRequest.type(),
|
|
|
|
|
- IdUtil.fastSimpleUUID(),
|
|
|
|
|
- saveRequest.groupId(),
|
|
|
|
|
- saveRequest.posterTemplateId(),
|
|
|
|
|
- saveRequest.pageShow(),
|
|
|
|
|
- saveRequest.pageLine(),
|
|
|
|
|
- saveRequest.count(),
|
|
|
|
|
- saveRequest.listAudioId(),
|
|
|
|
|
- saveRequest.retAudioId(),
|
|
|
|
|
- saveRequest.link(),
|
|
|
|
|
- saveRequest.isAddQun(),
|
|
|
|
|
- saveRequest.backgroundGroupId(),
|
|
|
|
|
- saveRequest.homePageId(),
|
|
|
|
|
- saveRequest.topAdvNum(),
|
|
|
|
|
- saveRequest.bottomAdvNum(),
|
|
|
|
|
- saveRequest.returnLoopId(),
|
|
|
|
|
- saveRequest.backgroundGroupQsId(),
|
|
|
|
|
- saveRequest.topAdvBl(),
|
|
|
|
|
- saveRequest.bottomAdvBl(),
|
|
|
|
|
- saveRequest.returnLoopBl(),
|
|
|
|
|
- saveRequest.groupIdQs(),
|
|
|
|
|
- saveRequest.baiduDot(),
|
|
|
|
|
- saveRequest.backgroundGroupIdNewAdd(),
|
|
|
|
|
- saveRequest.previewUrl(),
|
|
|
|
|
- saveRequest.redirectType(),
|
|
|
|
|
- saveRequest.redirectPlanId()
|
|
|
|
|
- )).flatMap(map -> {
|
|
|
|
|
- System.out.println(map.createUser());
|
|
|
|
|
- System.out.println(JSONUtil.toJsonStr(map));
|
|
|
|
|
- return template.insert(map);
|
|
|
|
|
- });
|
|
|
|
|
- return RStatus.success(plan_new_id);
|
|
|
|
|
|
|
+ @GetMapping("copyById/{type}/{planNewId}")
|
|
|
|
|
+ public Mono<RStatus<String>> copyById (@PathVariable("type") @NotNull Integer type,@PathVariable("planNewId") @NotNull String planNewId){
|
|
|
|
|
+ if (2 == type) {
|
|
|
|
|
+ return listeningPlanService.copyById(planNewId);
|
|
|
|
|
+ }else if (1==type){
|
|
|
|
|
+ String userName = BaseContextHandler.getUserName();
|
|
|
|
|
+ String userId = BaseContextHandler.getUserId();
|
|
|
|
|
+ Mono<PlanNew> plan_new_id = template.selectOne(Query.query(Criteria.where("plan_new_id").is(planNewId)), PlanNew.class)
|
|
|
|
|
+ .map(saveRequest -> new PlanNew(IdUtil.fastSimpleUUID(),
|
|
|
|
|
+ saveRequest.name(),
|
|
|
|
|
+ userName,
|
|
|
|
|
+ userId,
|
|
|
|
|
+ ZonedDateTime.now(),
|
|
|
|
|
+ ZonedDateTime.now(),
|
|
|
|
|
+ null,
|
|
|
|
|
+ saveRequest.type(),
|
|
|
|
|
+ IdUtil.fastSimpleUUID(),
|
|
|
|
|
+ saveRequest.groupId(),
|
|
|
|
|
+ saveRequest.posterTemplateId(),
|
|
|
|
|
+ saveRequest.pageShow(),
|
|
|
|
|
+ saveRequest.pageLine(),
|
|
|
|
|
+ saveRequest.count(),
|
|
|
|
|
+ saveRequest.listAudioId(),
|
|
|
|
|
+ saveRequest.retAudioId(),
|
|
|
|
|
+ saveRequest.link(),
|
|
|
|
|
+ saveRequest.isAddQun(),
|
|
|
|
|
+ saveRequest.backgroundGroupId(),
|
|
|
|
|
+ saveRequest.homePageId(),
|
|
|
|
|
+ saveRequest.topAdvNum(),
|
|
|
|
|
+ saveRequest.bottomAdvNum(),
|
|
|
|
|
+ saveRequest.returnLoopId(),
|
|
|
|
|
+ saveRequest.backgroundGroupQsId(),
|
|
|
|
|
+ saveRequest.topAdvBl(),
|
|
|
|
|
+ saveRequest.bottomAdvBl(),
|
|
|
|
|
+ saveRequest.returnLoopBl(),
|
|
|
|
|
+ saveRequest.groupIdQs(),
|
|
|
|
|
+ saveRequest.baiduDot(),
|
|
|
|
|
+ saveRequest.backgroundGroupIdNewAdd(),
|
|
|
|
|
+ saveRequest.previewUrl(),
|
|
|
|
|
+ saveRequest.redirectType(),
|
|
|
|
|
+ saveRequest.redirectPlanId()
|
|
|
|
|
+ )).flatMap(map -> template.insert(map));
|
|
|
|
|
+ Mono<List<PlanNewBackgroupPoster>> listening_plan_new_id1 =
|
|
|
|
|
+ template.select(Query.query(Criteria.where("plan_new_id")
|
|
|
|
|
+ .is(planNewId)), PlanNewBackgroupPoster.class)
|
|
|
|
|
+ .collectList();
|
|
|
|
|
+ Mono<String> stringMono = Mono.zip(plan_new_id, listening_plan_new_id1).flatMap(f -> {
|
|
|
|
|
+ PlanNew t1 = f.getT1();
|
|
|
|
|
+ List<PlanNewBackgroupPoster> t2 = f.getT2();
|
|
|
|
|
+ if (!t2.isEmpty()) {
|
|
|
|
|
+ List<PlanNewBackgroupPoster> collect = t2.stream().map(request -> new PlanNewBackgroupPoster(null,
|
|
|
|
|
+ request.audioId(),
|
|
|
|
|
+ request.groupId(),
|
|
|
|
|
+ request.image(),
|
|
|
|
|
+ request.kefu(),
|
|
|
|
|
+ request.limitTime(),
|
|
|
|
|
+ request.limitTimeRemark(),
|
|
|
|
|
+ request.status(),
|
|
|
|
|
+ request.index(),
|
|
|
|
|
+ request.serviceGroupId(),
|
|
|
|
|
+ request.serviceGroupType(),
|
|
|
|
|
+ request.qsOrFx(),
|
|
|
|
|
+ ZonedDateTime.now(),
|
|
|
|
|
+ null,
|
|
|
|
|
+ null,
|
|
|
|
|
+ t1.planNewId(),
|
|
|
|
|
+ request.generateImagesJson(),
|
|
|
|
|
+ request.generateImagesUrl())).collect(Collectors.toList());
|
|
|
|
|
+ Mono<List<PlanNewBackgroupPoster>> listMono =
|
|
|
|
|
+ Flux.fromIterable(collect).flatMap(entity -> template.insert(entity)).collectList();
|
|
|
|
|
+ return Mono.zip(Mono.just(t1), listMono).flatMap(ff -> {
|
|
|
|
|
+ PlanNew t11 = ff.getT1();
|
|
|
|
|
+ return Mono.just(t11.planNewId());
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return Mono.just(t1.planNewId());
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ return RStatus.success(stringMono);
|
|
|
|
|
+ }
|
|
|
|
|
+ throw new BaseException("type类型错误");
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -609,10 +732,31 @@ public class PlanNewController {
|
|
|
* @param planNewId
|
|
* @param planNewId
|
|
|
* @return {@link Mono}<{@link RStatus}<{@link Long}>>
|
|
* @return {@link Mono}<{@link RStatus}<{@link Long}>>
|
|
|
*/
|
|
*/
|
|
|
- @DeleteMapping("deleteById/{planNewId}")
|
|
|
|
|
- public Mono<RStatus<Long>> deleteById (@PathVariable("planNewId") @NotNull Long planNewId){
|
|
|
|
|
- Mono<Long> plan_new_id = template.delete(Query.query(Criteria.where("plan_new_id").is(planNewId)), PlanNew.class);
|
|
|
|
|
- return RStatus.success(plan_new_id);
|
|
|
|
|
|
|
+ @DeleteMapping("deleteById/{type}/{planNewId}")
|
|
|
|
|
+ public Mono<RStatus<Long>> deleteById (@PathVariable("type") @NotNull Integer type,@PathVariable("planNewId") @NotNull String planNewId ){
|
|
|
|
|
+ if(1==type){
|
|
|
|
|
+ Query plan_new_id2 = Query.query(Criteria.where("plan_new_id").is(planNewId));
|
|
|
|
|
+ Mono<Long> plan_new_id = template.delete(plan_new_id2, PlanNew.class)
|
|
|
|
|
+ .switchIfEmpty(Mono.error(new BaseException("计划id异常"))) //Mono.error(new BaseException("查询海报模版 id:"+f.posterTemplateId()+"=>空"))
|
|
|
|
|
+ .onErrorResume(throwable -> Mono.error(new Exception("删除计划 " +planNewId+"---"+ type+"error:" + throwable.getMessage())));
|
|
|
|
|
+ Mono<Long> plan_new_id1 = template.count(plan_new_id2, PlanNewBackgroupPoster.class).filter(f -> f > 0)
|
|
|
|
|
+ .flatMap(f -> template.delete(plan_new_id2, PlanNewBackgroupPoster.class))
|
|
|
|
|
+ .switchIfEmpty(Mono.just(0L));
|
|
|
|
|
+ Mono<Long> longMono = Mono.zip(plan_new_id1, plan_new_id).flatMap(f -> Mono.just(f.getT1()));
|
|
|
|
|
+ return RStatus.success(longMono);
|
|
|
|
|
+ }else if(2==type) {
|
|
|
|
|
+ Query listening_plan_new_id1 = Query.query(Criteria.where("listening_plan_new_id")
|
|
|
|
|
+ .is(planNewId));
|
|
|
|
|
+ Mono<Long> listening_plan_new_id = template.delete(listening_plan_new_id1, ListeningPlanNew.class)
|
|
|
|
|
+ .switchIfEmpty(Mono.error(new BaseException("计划id异常"))) //Mono.error(new BaseException("查询海报模版 id:"+f.posterTemplateId()+"=>空"))
|
|
|
|
|
+ .onErrorResume(throwable -> Mono.error(new Exception("删除计划 " +planNewId+"---"+ type+"error:" + throwable.getMessage())));
|
|
|
|
|
+ Mono<Long> plan_new_id1 = template.count(listening_plan_new_id1, ListeningPlanNewBackgroupPoster.class).filter(f -> f > 0)
|
|
|
|
|
+ .flatMap(f -> template.delete(listening_plan_new_id1, ListeningPlanNewBackgroupPoster.class))
|
|
|
|
|
+ .switchIfEmpty(Mono.just(0L));
|
|
|
|
|
+ Mono<Long> longMono = Mono.zip(listening_plan_new_id, plan_new_id1).flatMap(f -> Mono.just(f.getT1()));
|
|
|
|
|
+ return RStatus.success(longMono);
|
|
|
|
|
+ }
|
|
|
|
|
+ throw new BaseException("type类型错误");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -620,10 +764,94 @@ public class PlanNewController {
|
|
|
* @param planNewId
|
|
* @param planNewId
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- @GetMapping("planNewInfo/{planNewId}")
|
|
|
|
|
- public Mono<RStatus<PlanNew>> planNewInfo(@PathVariable("planNewId") @NotNull Long planNewId){
|
|
|
|
|
- Mono<PlanNew> planNewMono = template.selectOne(Query.query(Criteria.where("plan_new_id").is(planNewId)), PlanNew.class);
|
|
|
|
|
- return RStatus.success(planNewMono);
|
|
|
|
|
|
|
+ @GetMapping("planNewInfo/{type}/{planNewId}")
|
|
|
|
|
+ public Mono<RStatus<PlanNewAllRs>> planNewInfo(@PathVariable("type") @NotNull Integer type,@PathVariable("planNewId") @NotNull String planNewId){
|
|
|
|
|
+ if (1 == type) {
|
|
|
|
|
+ Mono<PlanNewAllRs> planNewAllRsMono = template.selectOne(Query.query(Criteria.where("plan_new_id").is(planNewId)), PlanNew.class)
|
|
|
|
|
+ .flatMap(saveRequest -> {
|
|
|
|
|
+ PlanNewAllRs planNewAllRs = new PlanNewAllRs(saveRequest.planNewId(),
|
|
|
|
|
+ saveRequest.name(),
|
|
|
|
|
+ saveRequest.createUser(),
|
|
|
|
|
+ saveRequest.createId(),
|
|
|
|
|
+ ZonedDateTime.now(),
|
|
|
|
|
+ ZonedDateTime.now(),
|
|
|
|
|
+ null,
|
|
|
|
|
+ saveRequest.type(),
|
|
|
|
|
+ saveRequest.code(),
|
|
|
|
|
+ saveRequest.groupId(),
|
|
|
|
|
+ saveRequest.posterTemplateId(),
|
|
|
|
|
+ saveRequest.pageShow(),
|
|
|
|
|
+ saveRequest.pageLine(),
|
|
|
|
|
+ saveRequest.count(),
|
|
|
|
|
+ saveRequest.listAudioId(),
|
|
|
|
|
+ saveRequest.retAudioId(),
|
|
|
|
|
+ saveRequest.link(),
|
|
|
|
|
+ saveRequest.isAddQun(),
|
|
|
|
|
+ saveRequest.backgroundGroupId(),
|
|
|
|
|
+ saveRequest.homePageId(),
|
|
|
|
|
+ saveRequest.topAdvNum(),
|
|
|
|
|
+ saveRequest.bottomAdvNum(),
|
|
|
|
|
+ saveRequest.returnLoopId(),
|
|
|
|
|
+ saveRequest.backgroundGroupQsId(),
|
|
|
|
|
+ saveRequest.topAdvBl(),
|
|
|
|
|
+ saveRequest.bottomAdvBl(),
|
|
|
|
|
+ saveRequest.returnLoopBl(),
|
|
|
|
|
+ saveRequest.groupIdQs(),
|
|
|
|
|
+ saveRequest.baiduDot(),
|
|
|
|
|
+ saveRequest.backgroundGroupIdNewAdd(),
|
|
|
|
|
+ saveRequest.previewUrl(),
|
|
|
|
|
+ saveRequest.redirectType(),
|
|
|
|
|
+ saveRequest.redirectPlanId()
|
|
|
|
|
+ );
|
|
|
|
|
+ return Mono.just(planNewAllRs);
|
|
|
|
|
+ }
|
|
|
|
|
+ ).switchIfEmpty(Mono.error(new BaseException("计划id异常"))) //Mono.error(new BaseException("查询海报模版 id:"+f.posterTemplateId()+"=>空"))
|
|
|
|
|
+ .onErrorResume(throwable -> Mono.error(new Exception("计划id异常")));
|
|
|
|
|
+ return RStatus.success(planNewAllRsMono);
|
|
|
|
|
+ }else if (2 == type) {
|
|
|
|
|
+ Mono<PlanNewAllRs> planNewAllRsMono = template.selectOne(Query.query(Criteria.where("plan_new_id").is(planNewId)), ListeningPlanNew.class)
|
|
|
|
|
+ .flatMap(saveRequest -> {
|
|
|
|
|
+ PlanNewAllRs planNewAllRs = new PlanNewAllRs(saveRequest.listeningPlanNewId(),
|
|
|
|
|
+ saveRequest.name(),
|
|
|
|
|
+ saveRequest.createUser(),
|
|
|
|
|
+ saveRequest.createId(),
|
|
|
|
|
+ ZonedDateTime.now(),
|
|
|
|
|
+ ZonedDateTime.now(),
|
|
|
|
|
+ null,
|
|
|
|
|
+ saveRequest.type(),
|
|
|
|
|
+ saveRequest.code(),
|
|
|
|
|
+ saveRequest.groupId(),
|
|
|
|
|
+ saveRequest.posterTemplateId(),
|
|
|
|
|
+ saveRequest.pageShow(),
|
|
|
|
|
+ saveRequest.pageLine(),
|
|
|
|
|
+ null,
|
|
|
|
|
+ null,
|
|
|
|
|
+ null,
|
|
|
|
|
+ saveRequest.link(),
|
|
|
|
|
+ null,
|
|
|
|
|
+ saveRequest.backgroundGroupId(),
|
|
|
|
|
+ null,
|
|
|
|
|
+ null,
|
|
|
|
|
+ null,
|
|
|
|
|
+ null,
|
|
|
|
|
+ null,
|
|
|
|
|
+ null,
|
|
|
|
|
+ null,
|
|
|
|
|
+ null,
|
|
|
|
|
+ null,
|
|
|
|
|
+ saveRequest.baiduDot(),
|
|
|
|
|
+ null,
|
|
|
|
|
+ saveRequest.previewUrl(),
|
|
|
|
|
+ null,
|
|
|
|
|
+ null
|
|
|
|
|
+ );
|
|
|
|
|
+ return Mono.just(planNewAllRs);
|
|
|
|
|
+ }
|
|
|
|
|
+ ).switchIfEmpty(Mono.error(new BaseException("计划id异常"))) //Mono.error(new BaseException("查询海报模版 id:"+f.posterTemplateId()+"=>空"))
|
|
|
|
|
+ .onErrorResume(throwable -> Mono.error(new Exception("计划id异常")));
|
|
|
|
|
+ return RStatus.success(planNewAllRsMono);
|
|
|
|
|
+ }
|
|
|
|
|
+ throw new BaseException("type类型错误");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -646,44 +874,72 @@ public class PlanNewController {
|
|
|
return RStatus.successList(listMono);
|
|
return RStatus.successList(listMono);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 计划列表-下拉
|
|
* 计划列表-下拉
|
|
|
* @param request
|
|
* @param request
|
|
|
- * @return {@link Mono}<{@link RStatus}<{@link Paged}<{@link PlanNew}>>>
|
|
|
|
|
|
|
+ * @return {@link Mono}<{@link RStatus}<{@link List}<{@link SelectPlanRes1}>>>
|
|
|
*/
|
|
*/
|
|
|
@PostMapping("planSelect")
|
|
@PostMapping("planSelect")
|
|
|
- public Mono<RStatus<List<PlanNew>>> planSelect(@RequestBody PosterTemSelect request) {
|
|
|
|
|
|
|
+ public Mono<RStatus<List<SelectPlanRes1>>> planSelect(@RequestBody PosterTemSelect request) {
|
|
|
Criteria criteria= Criteria.empty() ; //poster_template_id
|
|
Criteria criteria= Criteria.empty() ; //poster_template_id
|
|
|
if (Objects.nonNull(request.getName()) && "" != request.getName()) {
|
|
if (Objects.nonNull(request.getName()) && "" != request.getName()) {
|
|
|
criteria = criteria.and("name").is(request.getName());
|
|
criteria = criteria.and("name").is(request.getName());
|
|
|
}
|
|
}
|
|
|
- Mono<List<PlanNew>> listMono = template.select(Query.query(criteria), PlanNew.class).collectList();
|
|
|
|
|
- return RStatus.successList(listMono);
|
|
|
|
|
|
|
+ Mono<List<SelectPlanRes1>> listMono = template.select(Query.query(criteria), PlanNew.class).flatMap(fm -> {
|
|
|
|
|
+ SelectPlanRes1 selectPlanRes1 = new SelectPlanRes1();
|
|
|
|
|
+ selectPlanRes1.setName(fm.name());
|
|
|
|
|
+ selectPlanRes1.setPlanNewId(fm.planNewId());
|
|
|
|
|
+ return Mono.just(selectPlanRes1);
|
|
|
|
|
+ }).collectList();
|
|
|
|
|
+ Mono<List<SelectPlanRes1>> listMono1 = template.select(Query.query(criteria), ListeningPlanNew.class).flatMap(fm -> {
|
|
|
|
|
+ SelectPlanRes1 selectPlanRes2 = new SelectPlanRes1();
|
|
|
|
|
+ selectPlanRes2.setName(fm.name());
|
|
|
|
|
+ selectPlanRes2.setPlanNewId(fm.listeningPlanNewId());
|
|
|
|
|
+ return Mono.just(selectPlanRes2);
|
|
|
|
|
+ }).collectList();
|
|
|
|
|
+ Mono<List<SelectPlanRes1>> arrayListMono = Mono.zip(listMono, listMono1).flatMap(f -> {
|
|
|
|
|
+ List<SelectPlanRes1> t1 = f.getT1();
|
|
|
|
|
+ List<SelectPlanRes1> t2 = f.getT2();
|
|
|
|
|
+ ArrayList<SelectPlanRes1> objects = new ArrayList<>();
|
|
|
|
|
+ objects.addAll(t1);
|
|
|
|
|
+ objects.addAll(t2);
|
|
|
|
|
+ return Mono.just(objects);
|
|
|
|
|
+ });
|
|
|
|
|
+ return RStatus.successList(arrayListMono);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 计划列表
|
|
* 计划列表
|
|
|
* @param request
|
|
* @param request
|
|
|
- * @return {@link Mono}<{@link RStatus}<{@link Paged}<{@link PlanNew}>>>
|
|
|
|
|
|
|
+ * @return {@link Mono}<{@link RStatus}<{@link Paged}<{@link ListeningPlanNewRes2}>>>
|
|
|
*/
|
|
*/
|
|
|
@PostMapping("planList")
|
|
@PostMapping("planList")
|
|
|
- public Mono<RStatus<Paged<PlanNewRes>>> page(@RequestBody PlanReqPage request) {
|
|
|
|
|
|
|
+ public Mono<RStatus<Paged<ListeningPlanNewRes2>>> page(@RequestBody PlanReqPage request) {
|
|
|
|
|
+ if (2 == request.getType()) {
|
|
|
|
|
+ return listeningPlanService.page(request);
|
|
|
|
|
+ }else {
|
|
|
|
|
+ return getType1(request);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ private Mono<RStatus<Paged<ListeningPlanNewRes2>>> getType1(PlanReqPage request) {
|
|
|
Criteria criteria= Criteria.empty() ; //poster_template_id
|
|
Criteria criteria= Criteria.empty() ; //poster_template_id
|
|
|
- if (Objects.nonNull(request.getCode()) && "" != request.getCode()) {
|
|
|
|
|
- criteria = criteria.and("code").is(request.getCode());
|
|
|
|
|
|
|
+ if (Objects.nonNull(request.getCode()) && "" != request.getCode().trim()) {
|
|
|
|
|
+ criteria = criteria.and("code").like("%"+request.getCode()+"%");
|
|
|
}
|
|
}
|
|
|
- if (Objects.nonNull(request.getName()) && "" != request.getName()) {
|
|
|
|
|
- criteria = criteria.and("name").is(request.getName());
|
|
|
|
|
|
|
+ if (Objects.nonNull(request.getName()) && "" != request.getName().trim()) {
|
|
|
|
|
+ criteria = criteria.and("name").like("%"+request.getName()+"%");
|
|
|
}
|
|
}
|
|
|
- if (Objects.nonNull(request.getCreateUser()) && "" != request.getCreateUser()) {
|
|
|
|
|
- criteria = criteria.and("create_user").like(request.getCreateUser());
|
|
|
|
|
|
|
+ if (Objects.nonNull(request.getCreateUser()) && "" != request.getCreateUser().trim()) {
|
|
|
|
|
+ criteria = criteria.and("create_user").like("%"+request.getCreateUser()+"%");
|
|
|
}
|
|
}
|
|
|
if (Objects.nonNull(request.getPosterTemplateId()) && 0L != request.getPosterTemplateId()) {
|
|
if (Objects.nonNull(request.getPosterTemplateId()) && 0L != request.getPosterTemplateId()) {
|
|
|
criteria = criteria.and("poster_template_id").is(request.getPosterTemplateId());
|
|
criteria = criteria.and("poster_template_id").is(request.getPosterTemplateId());
|
|
|
}
|
|
}
|
|
|
- if (Objects.nonNull(request.getType()) && 0L != request.getType()) {
|
|
|
|
|
- criteria = criteria.and("type").is(request.getType());
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// if (Objects.nonNull(request.getType()) && 0L != request.getType()) {
|
|
|
|
|
+// criteria = criteria.and("type").is(request.getType());
|
|
|
|
|
+// }
|
|
|
Query query = Query.query(criteria);
|
|
Query query = Query.query(criteria);
|
|
|
Criteria finalCriteria = criteria;
|
|
Criteria finalCriteria = criteria;
|
|
|
int skip = (request.getPage() - 1) * request.getSize();
|
|
int skip = (request.getPage() - 1) * request.getSize();
|
|
@@ -693,44 +949,35 @@ public class PlanNewController {
|
|
|
.offset(skip)
|
|
.offset(skip)
|
|
|
.limit(limit)
|
|
.limit(limit)
|
|
|
.sort(Sort.by(Sort.Order.desc("created_at"))), PlanNew.class);
|
|
.sort(Sort.by(Sort.Order.desc("created_at"))), PlanNew.class);
|
|
|
-
|
|
|
|
|
- Flux<Poster> poster_template_id = created_at.flatMap(f -> {
|
|
|
|
|
- Long aLong = f.posterTemplateId();
|
|
|
|
|
- if (Objects.isNull(aLong)) {
|
|
|
|
|
- aLong = 0L;
|
|
|
|
|
- }
|
|
|
|
|
- return template.select(Query.query(Criteria.where("poster_template_id").is(aLong)), Poster.class);
|
|
|
|
|
- });
|
|
|
|
|
- Mono<Paged<PlanNewRes>> pagedMono1 = Mono.zip(count, created_at.collectList(), poster_template_id.collectList()).flatMap(f -> {
|
|
|
|
|
- List<PlanNew> t2 = f.getT2();
|
|
|
|
|
- List<Poster> t3 = f.getT3();
|
|
|
|
|
- List<PlanNewRes> collect = t2.stream().map(fe -> {
|
|
|
|
|
- PlanNewRes planNewRes = new PlanNewRes();
|
|
|
|
|
-// Optional<String> first = t3.stream().filter(ff -> Objects.nonNull( ff.posterTemplateId())
|
|
|
|
|
-// && Objects.nonNull( fe.posterTemplateId())
|
|
|
|
|
-// && ff.posterTemplateId().equals(fe.posterTemplateId()))
|
|
|
|
|
-// .filter(f11->Objects.nonNull(f11.generateImagesUrl()))
|
|
|
|
|
-// .map(Poster::generateImagesUrl).findFirst();
|
|
|
|
|
-// first.ifPresent(planNewRes::setPosterUrl);
|
|
|
|
|
- planNewRes.setPlanNew(fe);
|
|
|
|
|
- planNewRes.setPosterUrl(fe.previewUrl());
|
|
|
|
|
- return planNewRes;
|
|
|
|
|
- }).collect(Collectors.toList());
|
|
|
|
|
- Paged<PlanNewRes> planNewResPaged = new Paged<>(f.getT1(), collect, request.getPage(), request.getSize());
|
|
|
|
|
|
|
+ Mono<List<ListeningPlanNewRes2>> listMono = created_at.flatMap(f -> {
|
|
|
|
|
+ Mono<String> poster_template_id = template.selectOne(Query.query(Criteria.where("poster_template_id")
|
|
|
|
|
+ .is(f.posterTemplateId())), PosterTemplate.class).flatMap(f0 -> Mono.just(f0.posterTemplateName()))
|
|
|
|
|
+ .switchIfEmpty(Mono.just("")) //Mono.error(new BaseException("查询海报模版 id:"+f.posterTemplateId()+"=>空"))
|
|
|
|
|
+ .onErrorResume(throwable -> Mono.error(new Exception("查询海报模版 id:" + f.posterTemplateId() + "error:" + throwable.getMessage())));
|
|
|
|
|
+ Mono<String> id = template.selectOne(Query.query(Criteria.where("id").is(f.groupId())), GroupType.class)
|
|
|
|
|
+ .flatMap(f1 -> Mono.just(f1.name()))
|
|
|
|
|
+ .switchIfEmpty(Mono.just(""))//Mono.error(new BaseException("查询GroupType id:"+f.groupId()+"=>空"))
|
|
|
|
|
+ .onErrorResume(throwable -> Mono.error(new Exception("查询GroupType id:" + f.groupId() + "error:" + throwable.getMessage())));
|
|
|
|
|
+ return Mono.zip(Mono.just(f), poster_template_id, id).flatMap(ff -> {
|
|
|
|
|
+ PlanNew t1 = ff.getT1();
|
|
|
|
|
+ ListeningPlanNewRes2 listeningPlanNewRes = new ListeningPlanNewRes2();
|
|
|
|
|
+ listeningPlanNewRes.setPlanNewId(t1.planNewId());
|
|
|
|
|
+ listeningPlanNewRes.setCode(t1.code());
|
|
|
|
|
+ listeningPlanNewRes.setName(t1.name());
|
|
|
|
|
+ listeningPlanNewRes.setCreatedAt(t1.createdAt());
|
|
|
|
|
+ listeningPlanNewRes.setCreateUser(t1.createUser());
|
|
|
|
|
+ listeningPlanNewRes.setType(t1.type());
|
|
|
|
|
+ listeningPlanNewRes.setGroupName(ff.getT3());
|
|
|
|
|
+ listeningPlanNewRes.setPreviewUrl(t1.previewUrl());
|
|
|
|
|
+ listeningPlanNewRes.setPosterTemplateName(ff.getT2());
|
|
|
|
|
+ return Mono.just(listeningPlanNewRes);
|
|
|
|
|
+ });
|
|
|
|
|
+ }).collectList();
|
|
|
|
|
+ Mono<Paged<ListeningPlanNewRes2>> pagedMono = Mono.zip(count, listMono).flatMap(ff -> {
|
|
|
|
|
+ Long t1 = ff.getT1();
|
|
|
|
|
+ Paged<ListeningPlanNewRes2> planNewResPaged = new Paged<>(t1, ff.getT2(), request.getPage(), request.getSize());
|
|
|
return Mono.just(planNewResPaged);
|
|
return Mono.just(planNewResPaged);
|
|
|
});
|
|
});
|
|
|
-// Mono<Paged<PlanNew>> pagedMono = template.count(query, PlanNew.class).flatMap(fm ->
|
|
|
|
|
-// template.select(Query.query(finalCriteria)
|
|
|
|
|
-// .offset(skip)
|
|
|
|
|
-// .limit(limit)
|
|
|
|
|
-// .sort(Sort.by(Sort.Order.desc("created_at"))),PlanNew.class)
|
|
|
|
|
-// .collectList()
|
|
|
|
|
-// .map(list -> new Paged<>(fm, list,request.getPage(),request.getSize()))
|
|
|
|
|
-// );
|
|
|
|
|
- return RStatus.successList(pagedMono1);
|
|
|
|
|
|
|
+ return RStatus.successList(pagedMono);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
}
|
|
}
|