|
@@ -140,10 +140,14 @@ public class AiBytedanceAdvertiserStrategyController {
|
|
// 值 为0 不限预算
|
|
// 值 为0 不限预算
|
|
// !0 指定预算
|
|
// !0 指定预算
|
|
if (!aiBytedanceAdvertiserStrategy.getAccountBudget().equals(new BigDecimal("0"))){
|
|
if (!aiBytedanceAdvertiserStrategy.getAccountBudget().equals(new BigDecimal("0"))){
|
|
- // 前者 < 后者
|
|
|
|
- int a = aiBytedanceAdvertiserStrategy.getAccountBudget().compareTo(ruleDataAccountVo.getCost().multiply(new BigDecimal(1.05)));
|
|
|
|
- if (a == -1){
|
|
|
|
- return Result.errorMsg("预算金额不能低于当前已消费金额的105%");
|
|
|
|
|
|
+ //花费 0 不校验
|
|
|
|
+ int zero= Check.isNull(ruleDataAccountVo) ? 0 : ruleDataAccountVo.getCost().compareTo(BigDecimal.ZERO);
|
|
|
|
+ if (zero != 0){
|
|
|
|
+ // 前者 < 后者
|
|
|
|
+ int a = aiBytedanceAdvertiserStrategy.getAccountBudget().compareTo(ruleDataAccountVo.getCost().multiply(new BigDecimal(1.05)));
|
|
|
|
+ if (a == -1){
|
|
|
|
+ return Result.errorMsg("预算金额不能低于当前已消费金额的105%");
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|