|
|
|
@@ -694,7 +694,7 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"该券未提交审核或审核未通过"); |
|
|
|
} |
|
|
|
try { |
|
|
|
int rateMin = getRateMin(); |
|
|
|
int rateMin = getRateMin(EnumCpsPlanType.COMMON); |
|
|
|
if(record.getTakeRate() < rateMin){ |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"分佣率低于最小值("+rateMin+")"); |
|
|
|
} |
|
|
|
@@ -746,7 +746,7 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"该券未提交审核或审核未通过"); |
|
|
|
} |
|
|
|
try { |
|
|
|
int rateMin = getRateMin(); |
|
|
|
int rateMin = getRateMin(EnumCpsPlanType.DIRECTIONAL); |
|
|
|
if(record.getTakeRate() < rateMin){ |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"分佣率低于最小值("+rateMin+")"); |
|
|
|
} |
|
|
|
@@ -1136,7 +1136,7 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public ResultData getRateScope(TenantEntity tenantInfo, Long couponId) { |
|
|
|
public ResultData getRateScope(TenantEntity tenantInfo, Long couponId,EnumCpsPlanType planType) { |
|
|
|
WxCoupon wxCoupon = wxCouponMapper.selectById(couponId, tenantInfo.getTenantId()); |
|
|
|
if(wxCoupon == null){ |
|
|
|
return new ResultData(ErrorCode.COUPON_IS_EMPTY.getCode(),"未找到该券"); |
|
|
|
@@ -1147,7 +1147,7 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { |
|
|
|
Map<String,Object> map = new HashMap<>(); |
|
|
|
|
|
|
|
map.put("rateMax",getRateMax(wxCoupon)); |
|
|
|
map.put("rateMin",getRateMin()); |
|
|
|
map.put("rateMin",getRateMin(planType)); |
|
|
|
return new ResultData(map); |
|
|
|
} |
|
|
|
|
|
|
|
@@ -1161,7 +1161,7 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { |
|
|
|
if(ttPoiTakeRate != null){ |
|
|
|
takeRate = ttPoiTakeRate.getTakeRate(); |
|
|
|
}else{ |
|
|
|
takeRate = getAllMax(); |
|
|
|
return getAllMax(); |
|
|
|
} |
|
|
|
|
|
|
|
WxAppinfo couponAppInfo = wxAppinfoService.getCouponAppInfo(wxCoupon); |
|
|
|
@@ -1189,7 +1189,12 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { |
|
|
|
} |
|
|
|
} |
|
|
|
//达人分佣率最小值 |
|
|
|
private int getRateMin(){ |
|
|
|
private int getRateMin(EnumCpsPlanType planType){ |
|
|
|
if(EnumCpsPlanType.COMMON.equals(planType)){ |
|
|
|
return 100; |
|
|
|
}else if(EnumCpsPlanType.DIRECTIONAL.equals(planType)){ |
|
|
|
return 0; |
|
|
|
} |
|
|
|
return 100; |
|
|
|
} |
|
|
|
|
|
|
|
|