|
@@ -1,9 +1,9 @@
|
|
|
package com.webflux.launchadmin.mysql.controller.planNew;
|
|
package com.webflux.launchadmin.mysql.controller.planNew;
|
|
|
|
|
|
|
|
import com.webflux.launchadmin.config.BaseContextHandler;
|
|
import com.webflux.launchadmin.config.BaseContextHandler;
|
|
|
-import com.webflux.launchadmin.mysql.controller.lbOut.resp.DataList;
|
|
|
|
|
import com.webflux.launchadmin.mysql.controller.planNew.req.*;
|
|
import com.webflux.launchadmin.mysql.controller.planNew.req.*;
|
|
|
-import com.webflux.launchadmin.mysql.entity.lb.HomePageTempItem;
|
|
|
|
|
|
|
+import com.webflux.launchadmin.mysql.controller.planNew.res.BackgroupImageRes;
|
|
|
|
|
+import com.webflux.launchadmin.mysql.controller.planNew.res.DataLists;
|
|
|
import com.webflux.launchadmin.mysql.entity.planNew.*;
|
|
import com.webflux.launchadmin.mysql.entity.planNew.*;
|
|
|
import com.webflux.launchcommon.returnObj.Paged;
|
|
import com.webflux.launchcommon.returnObj.Paged;
|
|
|
import com.webflux.launchcommon.returnObj.RStatus;
|
|
import com.webflux.launchcommon.returnObj.RStatus;
|
|
@@ -15,6 +15,7 @@ import org.springframework.data.r2dbc.core.R2dbcEntityTemplate;
|
|
|
import org.springframework.data.relational.core.query.Query;
|
|
import org.springframework.data.relational.core.query.Query;
|
|
|
import org.springframework.data.relational.core.query.Update;
|
|
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.Mono;
|
|
import reactor.core.publisher.Mono;
|
|
|
|
|
|
|
|
import java.time.ZonedDateTime;
|
|
import java.time.ZonedDateTime;
|
|
@@ -29,14 +30,57 @@ import java.util.Objects;
|
|
|
@RestController
|
|
@RestController
|
|
|
@RequestMapping("in/planNew")
|
|
@RequestMapping("in/planNew")
|
|
|
public class PlanNewController {
|
|
public class PlanNewController {
|
|
|
|
|
+ //一天时间
|
|
|
@Resource
|
|
@Resource
|
|
|
private R2dbcEntityTemplate template;
|
|
private R2dbcEntityTemplate template;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 分享、清水背景组-回显
|
|
|
|
|
+ * @param planNewId 计划id
|
|
|
|
|
+ * @param qsOrFx 1:分享 2:清水
|
|
|
|
|
+ * @return {@link Mono}<{@link RStatus}<{@link BackgroupImageRes}>>
|
|
|
|
|
+ */
|
|
|
|
|
+ @GetMapping("backgroupSelectOne/{planNewId}/{qsOrFx}")
|
|
|
|
|
+ public Mono<RStatus<List<PlanNewBackgroupPoster>>> backgroupSelectOne(@PathVariable("id") 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)), PlanNewBackgroupPoster.class)
|
|
|
|
|
+ .collectList();
|
|
|
|
|
+ return RStatus.successList(listMono);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 背景组详情接口
|
|
|
|
|
+ * @param id 背景组id
|
|
|
|
|
+ * @return {@link Mono}<{@link RStatus}<{@link DataLists}>>
|
|
|
|
|
+ */
|
|
|
|
|
+ @GetMapping("backgroupImageRes/{id}")
|
|
|
|
|
+ public Mono<RStatus<BackgroupImageRes>> backgroupImageRes(@PathVariable("id") Long id){
|
|
|
|
|
+ Mono<BackgroupImageRes> map = Mono.just(new BackgroupImageRes())
|
|
|
|
|
+ .map(dataLists -> {
|
|
|
|
|
+ template.selectOne(Query.query(Criteria.where("id").is(dataLists.getPlanNew().backgroundGroupId())), BackgroupImage.class)
|
|
|
|
|
+ .subscribe(dataLists::setBackgroupImage);
|
|
|
|
|
+ return dataLists;
|
|
|
|
|
+ }).map(dataLists -> {
|
|
|
|
|
+ template.select(Query.query(Criteria.where("group_id").is(dataLists.getPlanNew().backgroundGroupId())), BackgroupImageItem.class).collectList()
|
|
|
|
|
+ .subscribe(dataLists::setBackgroupImageItemList);
|
|
|
|
|
+ return dataLists;
|
|
|
|
|
+ });
|
|
|
|
|
+ return RStatus.successList(map);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 客服组-下拉 ( By status)
|
|
|
|
|
+ * @param request
|
|
|
|
|
+ * @return {@link Mono}<{@link RStatus}<{@link List}<{@link ReturnLoop}>>>
|
|
|
|
|
+ */
|
|
|
|
|
+ @GetMapping("serviceGroupSlt")
|
|
|
|
|
+ public Mono<RStatus<List<ServiceGroup>>> serviceGroupSlt (@RequestBody ServiceGroupRequest request){
|
|
|
|
|
+ Mono<List<ServiceGroup>> status = template.select(Query.query(Criteria.where("status").is(request.getStatus())), ServiceGroup.class).collectList();
|
|
|
|
|
+ return RStatus.successList(status);
|
|
|
|
|
|
|
|
|
|
+ }
|
|
|
/**
|
|
/**
|
|
|
* 返回广告下拉名称模糊查询
|
|
* 返回广告下拉名称模糊查询
|
|
|
* @param request
|
|
* @param request
|
|
@@ -52,13 +96,13 @@ public class PlanNewController {
|
|
|
return RStatus.success(listMono);
|
|
return RStatus.success(listMono);
|
|
|
}
|
|
}
|
|
|
/**
|
|
/**
|
|
|
- * 背景组设置下拉名称模糊查询
|
|
|
|
|
|
|
+ * (分享/清水)背景组设置下拉名称模糊查询
|
|
|
* @param backgroupRequest
|
|
* @param backgroupRequest
|
|
|
* @return {@link Mono}<{@link RStatus}<{@link Long}>>
|
|
* @return {@link Mono}<{@link RStatus}<{@link Long}>>
|
|
|
*/
|
|
*/
|
|
|
@GetMapping("backgroupSlt")
|
|
@GetMapping("backgroupSlt")
|
|
|
public Mono<RStatus<List<BackgroupImage>>> backgroupSlt (@RequestBody BackgroupRequest backgroupRequest){
|
|
public Mono<RStatus<List<BackgroupImage>>> backgroupSlt (@RequestBody BackgroupRequest backgroupRequest){
|
|
|
- Criteria criteria= Criteria.empty() ; //poster_template_id
|
|
|
|
|
|
|
+ Criteria criteria= Criteria.where("group_type").is(backgroupRequest.getGroupType()) ; //poster_template_id
|
|
|
if (Objects.nonNull(backgroupRequest.getName()) && "" != backgroupRequest.getName()) {
|
|
if (Objects.nonNull(backgroupRequest.getName()) && "" != backgroupRequest.getName()) {
|
|
|
criteria = criteria.and("name").like(backgroupRequest.getName());
|
|
criteria = criteria.and("name").like(backgroupRequest.getName());
|
|
|
}
|
|
}
|
|
@@ -93,7 +137,6 @@ public class PlanNewController {
|
|
|
ZonedDateTime.now());
|
|
ZonedDateTime.now());
|
|
|
Mono<Poster> insert = template.insert(poster);
|
|
Mono<Poster> insert = template.insert(poster);
|
|
|
return RStatus.success(insert);
|
|
return RStatus.success(insert);
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -125,6 +168,30 @@ public class PlanNewController {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
|
|
+ * 海报列表
|
|
|
|
|
+ * @param request
|
|
|
|
|
+ * @return {@link Mono}<{@link RStatus}<{@link Paged}<{@link PosterTemplate}>>>
|
|
|
|
|
+ */
|
|
|
|
|
+ @PostMapping("posterList")
|
|
|
|
|
+ public Mono<RStatus<Paged<Poster>>> posterList(@RequestBody PosterPage request) {
|
|
|
|
|
+ Criteria criteria= Criteria.empty() ; //poster_template_id
|
|
|
|
|
+ criteria = criteria.and("poster_template_id").is(request.getPosterTemplateId());
|
|
|
|
|
+ Query query = Query.query(criteria);
|
|
|
|
|
+ Criteria finalCriteria = criteria;
|
|
|
|
|
+ int skip = (request.getPage() - 1) * request.getSize();
|
|
|
|
|
+ int limit = request.getPage() * request.getSize();
|
|
|
|
|
+ Mono<Paged<Poster>> pagedMono = template.count(query, Poster.class).flatMap(fm ->
|
|
|
|
|
+ template.select(Query.query(finalCriteria)
|
|
|
|
|
+ .offset(skip)
|
|
|
|
|
+ .limit(limit)
|
|
|
|
|
+ .sort(Sort.by(Sort.Order.desc("created_at"))),Poster.class)
|
|
|
|
|
+ .collectList()
|
|
|
|
|
+ .map(list -> new Paged<>(fm, list,request.getPage(),request.getSize()))
|
|
|
|
|
+ );
|
|
|
|
|
+ return RStatus.successList(pagedMono);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
* 海报模版保存
|
|
* 海报模版保存
|
|
|
* @param posterTemplateRequset
|
|
* @param posterTemplateRequset
|
|
|
* @return {@link Mono}<{@link RStatus}<{@link PlanNew}>>
|
|
* @return {@link Mono}<{@link RStatus}<{@link PlanNew}>>
|
|
@@ -136,7 +203,6 @@ public class PlanNewController {
|
|
|
ZonedDateTime.now());
|
|
ZonedDateTime.now());
|
|
|
Mono<PosterTemplate> insert = template.insert(posterTemplate);
|
|
Mono<PosterTemplate> insert = template.insert(posterTemplate);
|
|
|
return RStatus.success(insert);
|
|
return RStatus.success(insert);
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
/**
|
|
/**
|
|
|
* 海报模版修改
|
|
* 海报模版修改
|
|
@@ -165,6 +231,60 @@ public class PlanNewController {
|
|
|
return RStatus.success(plan_new_id);
|
|
return RStatus.success(plan_new_id);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 海报模版-编辑回显详情
|
|
|
|
|
+ * @param posterTemplateId
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
|
|
+ @GetMapping("posterTem/{planNewId}")
|
|
|
|
|
+ public Mono<RStatus<PosterTemplate>> posterTem(@PathVariable("posterTemplateId") @NotNull Long posterTemplateId){
|
|
|
|
|
+ Mono<PosterTemplate> planNewMono = template
|
|
|
|
|
+ .selectOne(Query.query(Criteria.where("poster_template_id")
|
|
|
|
|
+ .is(posterTemplateId)), PosterTemplate.class);
|
|
|
|
|
+ return RStatus.success(planNewMono);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 海报模版下拉
|
|
|
|
|
+ * @param request
|
|
|
|
|
+ * @return {@link Mono}<{@link RStatus}<{@link Paged}<{@link PosterTemplate}>>>
|
|
|
|
|
+ */
|
|
|
|
|
+ @PostMapping("posterTemSelect")
|
|
|
|
|
+ public Mono<RStatus<List<PosterTemplate>>> posterTemSelect(@RequestBody PosterTemSelect request) {
|
|
|
|
|
+ Criteria criteria= Criteria.empty() ; //poster_template_id
|
|
|
|
|
+ if (Objects.nonNull(request.getName()) && "" != request.getName()) {
|
|
|
|
|
+ criteria = criteria.and("name").like(request.getName());
|
|
|
|
|
+ }
|
|
|
|
|
+ Mono<List<PosterTemplate>> listMono = template.select(Query.query(criteria), PosterTemplate.class).collectList();
|
|
|
|
|
+ return RStatus.successList(listMono);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 海报模版-列表
|
|
|
|
|
+ * @param request
|
|
|
|
|
+ * @return {@link Mono}<{@link RStatus}<{@link Paged}<{@link PosterTemplate}>>>
|
|
|
|
|
+ */
|
|
|
|
|
+ @PostMapping("posterTemList")
|
|
|
|
|
+ public Mono<RStatus<Paged<PosterTemplate>>> posterTemList(@RequestBody PosterTemPage request) {
|
|
|
|
|
+ Criteria criteria= Criteria.empty() ; //poster_template_id
|
|
|
|
|
+ if (Objects.nonNull(request.getName()) && "" != request.getName()) {
|
|
|
|
|
+ criteria = criteria.and("name").is(request.getName());
|
|
|
|
|
+ }
|
|
|
|
|
+ Query query = Query.query(criteria);
|
|
|
|
|
+ Criteria finalCriteria = criteria;
|
|
|
|
|
+ int skip = (request.getPage() - 1) * request.getSize();
|
|
|
|
|
+ int limit = request.getPage() * request.getSize();
|
|
|
|
|
+ Mono<Paged<PosterTemplate>> pagedMono = template.count(query, PosterTemplate.class).flatMap(fm ->
|
|
|
|
|
+ template.select(Query.query(finalCriteria)
|
|
|
|
|
+ .offset(skip)
|
|
|
|
|
+ .limit(limit)
|
|
|
|
|
+ .sort(Sort.by(Sort.Order.desc("created_at"))),PosterTemplate.class)
|
|
|
|
|
+ .collectList()
|
|
|
|
|
+ .map(list -> new Paged<>(fm, list,request.getPage(),request.getSize()))
|
|
|
|
|
+ );
|
|
|
|
|
+ return RStatus.successList(pagedMono);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 计划保存
|
|
* 计划保存
|
|
@@ -195,12 +315,49 @@ public class PlanNewController {
|
|
|
saveRequest.getHomePageId(),
|
|
saveRequest.getHomePageId(),
|
|
|
saveRequest.getTopAdvNum(),
|
|
saveRequest.getTopAdvNum(),
|
|
|
saveRequest.getBottomAdvNum(),
|
|
saveRequest.getBottomAdvNum(),
|
|
|
- saveRequest.getReturnLoopId()
|
|
|
|
|
|
|
+ saveRequest.getReturnLoopId(),
|
|
|
|
|
+ saveRequest.getBackgroundGroupQsId(),
|
|
|
|
|
+ saveRequest.getTopAdvBl(),
|
|
|
|
|
+ saveRequest.getBottomAdvBl(),
|
|
|
|
|
+ saveRequest.getReturnLoopBl()
|
|
|
);
|
|
);
|
|
|
Mono<PlanNew> insert = template.insert(plan);
|
|
Mono<PlanNew> insert = template.insert(plan);
|
|
|
- return RStatus.success(insert);
|
|
|
|
|
|
|
+ Mono<PlanNew> map = insert.map(f -> {
|
|
|
|
|
+ List<ServiceGroupSettingItemRequest> backgroupFxSetting = saveRequest.getBackgroupFxSetting();
|
|
|
|
|
+ backgroupFxSetting.forEach(fx -> {
|
|
|
|
|
+ fxBackgroupSettingsSave(fx, f.planNewId(), 1);
|
|
|
|
|
+ });
|
|
|
|
|
+ List<ServiceGroupSettingItemRequest> backgroupQsSetting = saveRequest.getBackgroupQsSetting();
|
|
|
|
|
+ backgroupQsSetting.forEach(qs -> {
|
|
|
|
|
+ fxBackgroupSettingsSave(qs, f.planNewId(), 2);
|
|
|
|
|
+ });
|
|
|
|
|
+ return f;
|
|
|
|
|
+ });
|
|
|
|
|
+ return RStatus.success(map);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ public Boolean fxBackgroupSettingsSave( ServiceGroupSettingItemRequest request,Long planNewId,Integer qsOrFx){
|
|
|
|
|
+ PlanNewBackgroupPoster planNewBackgroupPoster = new PlanNewBackgroupPoster(null,
|
|
|
|
|
+ request.getAudioId(),
|
|
|
|
|
+ request.getGroupId(),
|
|
|
|
|
+ request.getImage(),
|
|
|
|
|
+ request.getKefu(),
|
|
|
|
|
+ request.getLimitTime(),
|
|
|
|
|
+ request.getLimitTimeRemark(),
|
|
|
|
|
+ request.getStatus(),
|
|
|
|
|
+ request.getIndex(),
|
|
|
|
|
+ request.getServiceGroupId(),
|
|
|
|
|
+ request.getServiceGroupType(),
|
|
|
|
|
+ qsOrFx,
|
|
|
|
|
+ ZonedDateTime.now(),
|
|
|
|
|
+ null,
|
|
|
|
|
+ null,
|
|
|
|
|
+ planNewId,null,null);
|
|
|
|
|
+ template.insert(planNewBackgroupPoster);
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 修改计划
|
|
* 修改计划
|
|
|
* @param saveRequest
|
|
* @param saveRequest
|
|
@@ -231,15 +388,53 @@ public class PlanNewController {
|
|
|
saveRequest.getHomePageId(),
|
|
saveRequest.getHomePageId(),
|
|
|
saveRequest.getTopAdvNum(),
|
|
saveRequest.getTopAdvNum(),
|
|
|
saveRequest.getBottomAdvNum(),
|
|
saveRequest.getBottomAdvNum(),
|
|
|
- saveRequest.getReturnLoopId()
|
|
|
|
|
|
|
+ saveRequest.getReturnLoopId(),
|
|
|
|
|
+ saveRequest.getBackgroundGroupQsId(),
|
|
|
|
|
+ saveRequest.getTopAdvBl(),
|
|
|
|
|
+ saveRequest.getBottomAdvBl(),
|
|
|
|
|
+ saveRequest.getReturnLoopBl()
|
|
|
)).map(map -> {
|
|
)).map(map -> {
|
|
|
template.update(map);
|
|
template.update(map);
|
|
|
return map;
|
|
return map;
|
|
|
});
|
|
});
|
|
|
- return RStatus.success(plan_new_id);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ Mono<PlanNew> map = plan_new_id.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);
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+ public void fxBackgroupSettingsUpdate( ServiceGroupSettingItemRequest request,Long planNewId,Integer qsOrFx){
|
|
|
|
|
+ template.selectOne(Query.query(Criteria.where("id").is(request.getId())), PlanNewBackgroupPoster.class).map(m->{
|
|
|
|
|
+ PlanNewBackgroupPoster planNewBackgroupPoster = new PlanNewBackgroupPoster(request.getId(),
|
|
|
|
|
+ request.getAudioId(),
|
|
|
|
|
+ request.getGroupId(),
|
|
|
|
|
+ request.getImage(),
|
|
|
|
|
+ request.getKefu(),
|
|
|
|
|
+ request.getLimitTime(),
|
|
|
|
|
+ request.getLimitTimeRemark(),
|
|
|
|
|
+ request.getStatus(),
|
|
|
|
|
+ request.getIndex(),
|
|
|
|
|
+ request.getServiceGroupId(),
|
|
|
|
|
+ request.getServiceGroupType(),
|
|
|
|
|
+ qsOrFx,
|
|
|
|
|
+ m.createdAt(),
|
|
|
|
|
+ ZonedDateTime.now(),
|
|
|
|
|
+ null,
|
|
|
|
|
+ planNewId,null,null);
|
|
|
|
|
+ template.update(planNewBackgroupPoster);
|
|
|
|
|
+ return m;
|
|
|
|
|
+ });
|
|
|
|
|
|
|
|
|
|
+ }
|
|
|
/**
|
|
/**
|
|
|
* 复制计划
|
|
* 复制计划
|
|
|
* @param planNewId
|
|
* @param planNewId
|
|
@@ -270,7 +465,11 @@ public class PlanNewController {
|
|
|
saveRequest.homePageId(),
|
|
saveRequest.homePageId(),
|
|
|
saveRequest.topAdvNum(),
|
|
saveRequest.topAdvNum(),
|
|
|
saveRequest.bottomAdvNum(),
|
|
saveRequest.bottomAdvNum(),
|
|
|
- saveRequest.returnLoopId()
|
|
|
|
|
|
|
+ saveRequest.returnLoopId(),
|
|
|
|
|
+ saveRequest.backgroundGroupQsId(),
|
|
|
|
|
+ saveRequest.topAdvBl(),
|
|
|
|
|
+ saveRequest.bottomAdvBl(),
|
|
|
|
|
+ saveRequest.returnLoopBl()
|
|
|
)).map(map -> {
|
|
)).map(map -> {
|
|
|
template.update(map);
|
|
template.update(map);
|
|
|
return map;
|
|
return map;
|
|
@@ -288,6 +487,34 @@ public class PlanNewController {
|
|
|
Mono<Long> plan_new_id = template.delete(Query.query(Criteria.where("plan_new_id").is(planNewId)), PlanNew.class);
|
|
Mono<Long> plan_new_id = template.delete(Query.query(Criteria.where("plan_new_id").is(planNewId)), PlanNew.class);
|
|
|
return RStatus.success(plan_new_id);
|
|
return RStatus.success(plan_new_id);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 计划-编辑回显详情
|
|
|
|
|
+ * @param planNewId
|
|
|
|
|
+ * @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);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 计划列表-下拉
|
|
|
|
|
+ * @param request
|
|
|
|
|
+ * @return {@link Mono}<{@link RStatus}<{@link Paged}<{@link PlanNew}>>>
|
|
|
|
|
+ */
|
|
|
|
|
+ @PostMapping("planSelect")
|
|
|
|
|
+ public Mono<RStatus<List<PlanNew>>> planSelect(@RequestBody PosterTemSelect request) {
|
|
|
|
|
+ Criteria criteria= Criteria.empty() ; //poster_template_id
|
|
|
|
|
+ if (Objects.nonNull(request.getName()) && "" != 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);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 计划列表
|
|
* 计划列表
|
|
|
* @param request
|
|
* @param request
|
|
@@ -319,7 +546,7 @@ public class PlanNewController {
|
|
|
template.select(Query.query(finalCriteria)
|
|
template.select(Query.query(finalCriteria)
|
|
|
.offset(skip)
|
|
.offset(skip)
|
|
|
.limit(limit)
|
|
.limit(limit)
|
|
|
- .sort(Sort.by(Sort.Order.desc("create_time"))),PlanNew.class)
|
|
|
|
|
|
|
+ .sort(Sort.by(Sort.Order.desc("created_at"))),PlanNew.class)
|
|
|
.collectList()
|
|
.collectList()
|
|
|
.map(list -> new Paged<>(fm, list,request.getPage(),request.getSize()))
|
|
.map(list -> new Paged<>(fm, list,request.getPage(),request.getSize()))
|
|
|
);
|
|
);
|