|
|
@@ -68,7 +68,9 @@ public class PlanNewOutController {
|
|
|
*/
|
|
|
@GetMapping("domain/select")
|
|
|
public Mono<RStatus<DomainSelectRes>> domainSelect(@RequestParam("code") String code,@RequestParam("type") String type ){
|
|
|
- Mono<PlanNew> code1 = template.selectOne(Query.query(Criteria.where("code").is(code)), PlanNew.class);
|
|
|
+ Mono<PlanNew> code1 = template.selectOne(Query.query(Criteria.where("code").is(code)), PlanNew.class)
|
|
|
+ .switchIfEmpty(Mono.error(new BaseException("code错误")))
|
|
|
+ .onErrorResume(throwable -> Mono.error(new Exception(throwable.getMessage())));
|
|
|
Mono<DomainSelectRes> domainSelectResMono1 = code1.flatMap(f -> template.select(Query.query(Criteria.where("group_type_id").is(f.groupId())
|
|
|
.and("status").is(1).and("type").is(type)), DomainSelect.class)
|
|
|
.switchIfEmpty(Mono.error(new BaseException("查询domain为空")))
|
|
|
@@ -146,7 +148,9 @@ public class PlanNewOutController {
|
|
|
*/
|
|
|
@PostMapping("hfoInfo")
|
|
|
public Mono<RStatus<DataLists>> hfoInfo(@RequestBody HfoRequest request){
|
|
|
- Mono<PlanNew> code0 = template.selectOne(Query.query(Criteria.where("code").is(request.getCode())), PlanNew.class);
|
|
|
+ Mono<PlanNew> code0 = template.selectOne(Query.query(Criteria.where("code").is(request.getCode())), PlanNew.class)
|
|
|
+ .switchIfEmpty(Mono.error(new BaseException(" code错误")))
|
|
|
+ .onErrorResume(throwable -> Mono.error(new Exception(throwable.getMessage())));
|
|
|
Mono<DataLists> dataListsMono1 = code0.flatMap(planNew -> {
|
|
|
Mono<PlanNew> code = Mono.just(planNew);
|
|
|
Long group_type_id ; //.and("group_type_id").is(group_type_id)
|
|
|
@@ -285,7 +289,8 @@ public class PlanNewOutController {
|
|
|
map.put(request.getUnique(),0);
|
|
|
request.setUserVisits(0);
|
|
|
}
|
|
|
- Mono<PlanNew> code0 = template.selectOne(Query.query(Criteria.where("code").is(request.getCode())), PlanNew.class);
|
|
|
+ Mono<PlanNew> code0 = template.selectOne(Query.query(Criteria.where("code").is(request.getCode())), PlanNew.class).switchIfEmpty(Mono.error(new BaseException(" code错误")))
|
|
|
+ .onErrorResume(throwable -> Mono.error(new Exception(throwable.getMessage())));
|
|
|
Mono<DataLists0> dataLists0Mono = code0.flatMap(ftmp->{
|
|
|
//(如果wx_user_id值不为空则使用清水分类)
|
|
|
Mono<StringBuilder> stringBuilderMono;
|