|
@@ -124,7 +124,7 @@ public class BytedanceAdvertiserHourlyReportServiceImpl extends ServiceImpl<Byte
|
|
|
strategyQueryWrapper.last("limit 1");
|
|
|
AiBytedanceAdvertiserStrategy strategy = aiBytedanceAdvertiserStrategyMapper.selectOne(strategyQueryWrapper);
|
|
|
//没有预算则使用上阶段花费
|
|
|
- double accountBudget = Check.isNull(strategy) ? lastCost : strategy.getAccountBudget().doubleValue();
|
|
|
+ double accountBudget = Check.isNull(strategy) || strategy.getAccountBudget().intValue() == 0 ? lastCost : strategy.getAccountBudget().doubleValue();
|
|
|
//花费占比
|
|
|
double costShare = nowCost / accountBudget;
|
|
|
resultMap.put("costShare",new Double(accountBudget).intValue() == 0 ? "0" : df.format(costShare));
|
|
@@ -325,6 +325,7 @@ public class BytedanceAdvertiserHourlyReportServiceImpl extends ServiceImpl<Byte
|
|
|
|
|
|
}
|
|
|
|
|
|
+
|
|
|
for (ReportCostVo reportCostVo : reportCostVoList) {
|
|
|
reportCostVo.setCostStr(String.format("%.2f",reportCostVo.getCost()));
|
|
|
//出价 ctop_bytedance_advertise_plan 广告计划信息表
|
|
@@ -335,6 +336,8 @@ public class BytedanceAdvertiserHourlyReportServiceImpl extends ServiceImpl<Byte
|
|
|
ByteDanceAdvertisePlan planInfo = byteDanceAdvertisePlanMapper.selectOne(planQueryWrapper);
|
|
|
reportCostVo.setCpaBid(Check.isNull(planInfo) ? "0" : String.format("%.2f",planInfo.getCpaBid()));
|
|
|
reportCostVo.setBid(Check.isNull(planInfo) ? "0" : String.format("%.2f",planInfo.getBid()));
|
|
|
+ //广告预算 (修改出价不能大于广告计划预算)
|
|
|
+ reportCostVo.setAdBudget(Check.isNull(planInfo) ? new BigDecimal(0) : planInfo.getBudget());
|
|
|
|
|
|
// 平均千次展显费用 = 总花费/展示数 * 1000
|
|
|
double show = 0;
|