pudongliang 4 месяцев назад
Родитель
Сommit
652a4caee5
1 измененных файлов с 8 добавлено и 8 удалено
  1. 8 8
      src/main/java/com/moka/gdtauto/service/AdAutoExecutor.java

+ 8 - 8
src/main/java/com/moka/gdtauto/service/AdAutoExecutor.java

@@ -213,16 +213,16 @@ public class AdAutoExecutor {
         if (rule.getType() == 1) {
             if (rule.getMinCost() == 0) {
                 if (plan.getReqIncomeRoi1().compareTo(rule.getMinIor()) < 0) {
-                    String s = String.format("不考虑消耗 ROI:%.2f < 阈值:%.2f",
-                            plan.getReqIncomeRoi1(), rule.getMinIor());
+                String s = String.format(isNewAd? "[新广告]" : "[老广告]" + " 不考虑消耗 ROI:%.2f < 阈值:%.2f",
+                            isNewAd, plan.getReqIncomeRoi1(), rule.getMinIor());
                     plan.setFailReason(s);
                     return true;
                 }
             } else {
                 // getReqIncomeRoi1 < minIor 关闭
                 if (constYuan > rule.getMinCost() && plan.getReqIncomeRoi1().compareTo(rule.getMinIor()) < 0) {
-                    String s = String.format("消耗%d > 阈值%d ROI:%.2f < 阈值:%.2f",
-                        constYuan, rule.getMinCost(), plan.getReqIncomeRoi1(), rule.getMinIor());
+                    String s = String.format(isNewAd? "[新广告]" : "[老广告]" + " 消耗%d > 阈值%d ROI:%.2f < 阈值:%.2f",
+                        isNewAd, constYuan, rule.getMinCost(), plan.getReqIncomeRoi1(), rule.getMinIor());
                     plan.setFailReason(s);
                     return true;
                 }
@@ -231,15 +231,15 @@ public class AdAutoExecutor {
             // minCost == 0 表示不限制消耗门槛
             if (rule.getMinCost() == 0) {
                 if (scanCostYuan > rule.getScanMaxCost()) {
-                    String s = String.format("不考虑消耗 粉价消耗%d > 阈值%d",
-                            scanCostYuan, rule.getScanMaxCost());
+                    String s = String.format(isNewAd? "[新广告]" : "[老广告]" + " 不考虑消耗 粉价消耗%d > 阈值%d",
+                            isNewAd, scanCostYuan, rule.getScanMaxCost());
                     plan.setFailReason(s);
                     return true;
                 }
             } else {
                 if (scanCostYuan > rule.getScanMaxCost() && constYuan > rule.getMinCost()) {
-                    String s = String.format("消耗%d > 阈值%d; 粉价消耗%d > 阈值%d",
-                        constYuan, rule.getMinCost(), scanCostYuan, rule.getScanMaxCost());
+                    String s = String.format(isNewAd? "[新广告]" : "[老广告]" + " 消耗%d > 阈值%d; 粉价消耗%d > 阈值%d",
+                        isNewAd, constYuan, rule.getMinCost(), scanCostYuan, rule.getScanMaxCost());
                     plan.setFailReason(s);
                     return true;
                 }