|
|
@@ -186,17 +186,8 @@ public class PlanNewCommonOutController {
|
|
|
});
|
|
|
// GZIP压缩
|
|
|
// Mono<byte[]> res = resMono.flatMap(f -> Mono.just(Objects.requireNonNull(this.compressData(JSONUtil.toJsonStr(f)))));
|
|
|
- Mono<Boolean> rateReturn = blacklistService.getRateReturn(exchange,unique);
|
|
|
- return rateReturn.flatMap(bl->{
|
|
|
- if(bl){
|
|
|
- return RStatus.success(resMono) ;
|
|
|
- }else {
|
|
|
- PlanNewCommonRes dataLists = new PlanNewCommonRes();
|
|
|
- dataLists.setWxUrl(BlacklistService.wxUrl.get());
|
|
|
- return RStatus.fail("1","",Mono.just(dataLists));
|
|
|
- }
|
|
|
- });
|
|
|
- // return RStatus.success(resMono);
|
|
|
+
|
|
|
+ return RStatus.success(resMono);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -497,25 +488,38 @@ public class PlanNewCommonOutController {
|
|
|
* @return {@link Mono}<{@link RStatus}<{@link DomainSelectRes}>>
|
|
|
*/
|
|
|
@PostMapping("domainSelect")
|
|
|
- public Mono<RStatus<DomainSelectRes>> domainSelect(@RequestBody OutDomainRequest request) {
|
|
|
- if (null == request.getCode() || request.getCode().isEmpty()) {
|
|
|
- return Mono.error(new BaseException("code为空"));
|
|
|
- }
|
|
|
+
|
|
|
+ public Mono<RStatus<DomainSelectRes>> domainSelect(@RequestBody OutDomainRequest request, ServerWebExchange exchange) {
|
|
|
+ if (null == request.getCode() || request.getCode().isEmpty()) {
|
|
|
+ return Mono.error(new BaseException("code为空"));
|
|
|
+ }
|
|
|
+ Mono<RStatus<DomainSelectRes>> planNew;
|
|
|
+
|
|
|
if (1 == request.getTypePlan()) {
|
|
|
// 加群裂变
|
|
|
- return this.getPlanNew(request);
|
|
|
+ planNew = this.getPlanNew(request);
|
|
|
} else if (2 == request.getTypePlan()) {
|
|
|
// 听书裂变
|
|
|
- return this.getListeningPlan(request);
|
|
|
+ planNew = this.getListeningPlan(request);
|
|
|
} else if (3 == request.getTypePlan() ||6 == request.getTypePlan() ||7 == request.getTypePlan()) {
|
|
|
// 交友裂变
|
|
|
- return this.getFriendPlan(request);
|
|
|
+ planNew = this.getFriendPlan(request);
|
|
|
} else if (4 == request.getTypePlan()) {
|
|
|
- return this.getTakeaway(request);
|
|
|
+ planNew = this.getTakeaway(request);
|
|
|
}else{
|
|
|
// 交友裂变
|
|
|
- return this.getFriendPlan(request);
|
|
|
+ planNew = this.getFriendPlan(request);
|
|
|
}
|
|
|
+ Mono<Boolean> rateReturn = blacklistService.getRateReturn(exchange);
|
|
|
+ return rateReturn.flatMap(bl->{
|
|
|
+ if(bl){
|
|
|
+ return planNew ;
|
|
|
+ }else {
|
|
|
+ DomainSelectRes dataLists = new DomainSelectRes();
|
|
|
+ dataLists.setWxUrl(BlacklistService.wxUrl.get());
|
|
|
+ return RStatus.fail("1","",Mono.just(dataLists));
|
|
|
+ }
|
|
|
+ });
|
|
|
// throw new BaseException("typePlan 类型错误");
|
|
|
}
|
|
|
|