|
@@ -91,7 +91,10 @@ public class BytedanceAdvertiserHourlyReportServiceImpl extends ServiceImpl<Byte
|
|
|
}else{
|
|
|
// 账户 当前时间段数据
|
|
|
nowCostList = bytedanceAdvertiserHourlyReportMapper.getReportCostInfoStage(accountId,startTime,endTime);
|
|
|
- ReportCostVo statHourVo = nowCostList.get(nowCostList.size()-1);
|
|
|
+ ReportCostVo statHourVo = new ReportCostVo();
|
|
|
+ if (nowCostList.size() > 0){
|
|
|
+ statHourVo = nowCostList.get(nowCostList.size()-1);
|
|
|
+ }
|
|
|
//上阶段数据
|
|
|
lastCostList = bytedanceAdvertiserHourlyReportMapper.getReportCostInfoStageLast(accountId,lastTimeMap.get("lastTimeStart"),lastTimeMap.get("lastTimeEnd"),statHourVo.getTime());
|
|
|
}
|
|
@@ -131,10 +134,20 @@ public class BytedanceAdvertiserHourlyReportServiceImpl extends ServiceImpl<Byte
|
|
|
// 上阶段数据
|
|
|
Map lastMap = getCost(lastCostList);
|
|
|
|
|
|
- //当前阶段 每个时间 的 转化成本;转化数;转化率;平均千次展现费用。数据展示
|
|
|
- nowMap.put("costList", getCostList(nowCostList,startTime,endTime,lastTimeMap.get("daysBetween")));
|
|
|
- //上个阶段 每个时间 的 转化成本;转化数;转化率;平均千次展现费用。数据展示
|
|
|
- lastMap.put("costList", getCostList(lastCostList,lastTimeMap.get("lastTimeStart"),lastTimeMap.get("lastTimeEnd"),lastTimeMap.get("daysBetween")));
|
|
|
+ if (nowCostList.size() > 0){
|
|
|
+ //当前阶段 每个时间 的 转化成本;转化数;转化率;平均千次展现费用。数据展示
|
|
|
+ nowMap.put("costList", getCostList(nowCostList,startTime,endTime,lastTimeMap.get("daysBetween")));
|
|
|
+ }else {
|
|
|
+ nowMap.put("costList",Arrays.asList());
|
|
|
+ }
|
|
|
+
|
|
|
+ if (lastCostList.size() > 0){
|
|
|
+ //上个阶段 每个时间 的 转化成本;转化数;转化率;平均千次展现费用。数据展示
|
|
|
+ lastMap.put("costList", getCostList(lastCostList,lastTimeMap.get("lastTimeStart"),lastTimeMap.get("lastTimeEnd"),lastTimeMap.get("daysBetween")));
|
|
|
+ }else {
|
|
|
+ lastMap.put("costList",Arrays.asList());
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
resultMap.put("nowMap", nowMap);
|
|
|
resultMap.put("lastMap", lastMap);
|