|
@@ -213,7 +213,6 @@ public class BossDataExhibitionServiceImpl implements IBossDataExhibitionService
|
|
|
}else if (StringUtils.equals("2",mediaType)){
|
|
|
resultList = bossDataExhibitionMapper.getMediaTypeAccountTrendKuaishou(stat_tim,end_tim);
|
|
|
}
|
|
|
-
|
|
|
if (Check.isNull(resultList)) {
|
|
|
return Result.error("账户消耗数据查询为空");
|
|
|
}
|
|
@@ -225,47 +224,34 @@ public class BossDataExhibitionServiceImpl implements IBossDataExhibitionService
|
|
|
Map<String,List<AccountTrendPojo>> map = resultList.stream().collect(Collectors.groupingBy(AccountTrendPojo::getArea));
|
|
|
|
|
|
//1-华北
|
|
|
- List<AccountTrendPojo> huaBeiList = !map.containsKey("华北") ? null : map.get("华北");
|
|
|
-
|
|
|
- List<String> huaBeiCostList = new ArrayList();
|
|
|
- if (!Check.isNull(huaBeiList)){
|
|
|
- //获取数据 时间 集合
|
|
|
- List<String> huabeiTime = huaBeiList.stream().map(AccountTrendPojo::getTime).collect(Collectors.toList());
|
|
|
- // 补充数据
|
|
|
- huaBeiList = getDateSupplement(betweenDaysList,huabeiTime,huaBeiList);
|
|
|
- // 获取属性 cost 返回数组
|
|
|
- huaBeiCostList = huaBeiList.stream().map(AccountTrendPojo::getCost).collect(Collectors.toList());
|
|
|
- }
|
|
|
+ List<AccountTrendPojo> huaBeiList = !map.containsKey("华北") ? new ArrayList<>() : map.get("华北");
|
|
|
+ //获取数据 时间 集合
|
|
|
+ List<String> huabeiTime = huaBeiList.stream().map(AccountTrendPojo::getTime).collect(Collectors.toList());
|
|
|
+ // 补充数据
|
|
|
+ huaBeiList = getDateSupplement(betweenDaysList,huabeiTime,huaBeiList);
|
|
|
+ // 获取属性 cost 返回数组
|
|
|
+ List<String> huaBeiCostList = huaBeiList.stream().map(AccountTrendPojo::getCost).collect(Collectors.toList());
|
|
|
resultMap.put("huaBei",huaBeiCostList);
|
|
|
|
|
|
//2-华南
|
|
|
- List<String> huaNanCostList = new ArrayList();
|
|
|
- List<AccountTrendPojo> huaNanList = !map.containsKey("华南") ? null : map.get("华南");
|
|
|
- if (!Check.isNull(huaNanList)){
|
|
|
- List<String> huaNanTime = huaNanList.stream().map(AccountTrendPojo::getTime).collect(Collectors.toList());
|
|
|
- huaNanList = getDateSupplement(betweenDaysList,huaNanTime,huaNanList);
|
|
|
- huaNanCostList = huaNanList.stream().map(AccountTrendPojo::getCost).collect(Collectors.toList());
|
|
|
- }
|
|
|
+ List<AccountTrendPojo> huaNanList = !map.containsKey("华南") ? new ArrayList<>() : map.get("华南");
|
|
|
+ List<String> huaNanTime = huaNanList.stream().map(AccountTrendPojo::getTime).collect(Collectors.toList());
|
|
|
+ huaNanList = getDateSupplement(betweenDaysList,huaNanTime,huaNanList);
|
|
|
+ List<String> huaNanCostList = huaNanList.stream().map(AccountTrendPojo::getCost).collect(Collectors.toList());
|
|
|
resultMap.put("huaNan",huaNanCostList);
|
|
|
|
|
|
//3-华东
|
|
|
- List<String> huaDongCostList = new ArrayList();
|
|
|
- List<AccountTrendPojo> huaDongList = !map.containsKey("华东") ? null : map.get("华东");
|
|
|
- if (!Check.isNull(huaDongList)){
|
|
|
- List<String> huaDongTime = huaDongList.stream().map(AccountTrendPojo::getTime).collect(Collectors.toList());
|
|
|
- huaDongList = getDateSupplement(betweenDaysList,huaDongTime,huaDongList);
|
|
|
- huaDongCostList = huaDongList.stream().map(AccountTrendPojo::getCost).collect(Collectors.toList());
|
|
|
- }
|
|
|
+ List<AccountTrendPojo> huaDongList = !map.containsKey("华东") ? new ArrayList<>() : map.get("华东");
|
|
|
+ List<String> huaDongTime = huaDongList.stream().map(AccountTrendPojo::getTime).collect(Collectors.toList());
|
|
|
+ huaDongList = getDateSupplement(betweenDaysList,huaDongTime,huaDongList);
|
|
|
+ List<String> huaDongCostList = huaDongList.stream().map(AccountTrendPojo::getCost).collect(Collectors.toList());
|
|
|
resultMap.put("huaDong",huaDongCostList);
|
|
|
|
|
|
//4-骄阳
|
|
|
- List<String> jiaoYangCostList = new ArrayList();
|
|
|
- List<AccountTrendPojo> jiaoYangList = !map.containsKey("骄阳") ? null : map.get("骄阳");
|
|
|
- if (!Check.isNull(jiaoYangList)){
|
|
|
- List<String> jiaoYangTime = jiaoYangList.stream().map(AccountTrendPojo::getTime).collect(Collectors.toList());
|
|
|
- jiaoYangList = getDateSupplement(betweenDaysList,jiaoYangTime,jiaoYangList);
|
|
|
- jiaoYangCostList = jiaoYangList.stream().map(AccountTrendPojo::getCost).collect(Collectors.toList());
|
|
|
- }
|
|
|
+ List<AccountTrendPojo> jiaoYangList = !map.containsKey("骄阳") ? new ArrayList<>() : map.get("骄阳");
|
|
|
+ List<String> jiaoYangTime = jiaoYangList.stream().map(AccountTrendPojo::getTime).collect(Collectors.toList());
|
|
|
+ jiaoYangList = getDateSupplement(betweenDaysList,jiaoYangTime,jiaoYangList);
|
|
|
+ List<String> jiaoYangCostList = jiaoYangList.stream().map(AccountTrendPojo::getCost).collect(Collectors.toList());
|
|
|
resultMap.put("jiaoYang",jiaoYangCostList);
|
|
|
|
|
|
return Result.successMsg(("1".equals(mediaType) ? "【头条】" : "【快手】")+"===分公司-分日-账户消耗数据查询成功。",resultMap);
|