|
@@ -99,7 +99,7 @@ public class BytedanceAccountReportServiceImpl implements IBytedanceAccountRepor
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<JSONObject> getListDataBy(String mediaId, BigDecimal discount, JSONArray accounts, String startDate, String endDate, int hour, String target, String order) {
|
|
|
+ public List<JSONObject> getListDataBy(String mediaId, JSONArray accounts, String startDate, String endDate, int hour, String target, String order) {
|
|
|
List<JSONObject> result;
|
|
|
String filedAll = JsonResourceUtil.joinAllFiled(AccountReportConstants.getDictMapBy());
|
|
|
filedAll = filedAll.replace("like_num", "`like`").
|
|
@@ -129,14 +129,18 @@ public class BytedanceAccountReportServiceImpl implements IBytedanceAccountRepor
|
|
|
if (startDate.equals(DateUtils.date2Str())) {
|
|
|
result = bytedanceAccountReportMapper.queryTodaySumByHourGroupAccount(filedAll, startDate, hour, accounts, target, order);
|
|
|
JSONObject afterSum = bytedanceAccountReportMapper.querySumByHour(filedAll, startDate, hour, accounts);
|
|
|
+ afterSum.put("authName", "总计");
|
|
|
JSONObject beforeSum = bytedanceAccountReportMapper.querySumByHour(filedAll, DateUtils.getAnotherDay(SystemDateConstant.yyyy_MM_dd, startDate, -1), hour, accounts);
|
|
|
+ beforeSum.put("authName", "昨日总计(相对)");
|
|
|
result.add(afterSum);
|
|
|
result.add(beforeSum);
|
|
|
result.add(countTotal(afterSum, beforeSum));
|
|
|
} else {
|
|
|
result = bytedanceAccountReportMapper.querySumByDateGroupAccount(filedAll, endDate, startDate, accounts, target, order);
|
|
|
JSONObject afterSum = bytedanceAccountReportMapper.queryAllSumByStartEndDate(filedAll, endDate, startDate, accounts);
|
|
|
+ afterSum.put("authName", "总计");
|
|
|
JSONObject beforeSum = bytedanceAccountReportMapper.queryAllSumByStartEndDate(filedAll, DateUtils.getAnotherDay(SystemDateConstant.yyyy_MM_dd, endDate, -1), DateUtils.getAnotherDay(SystemDateConstant.yyyy_MM_dd, startDate, -1), accounts);
|
|
|
+ beforeSum.put("authName", "昨日总计(相对)");
|
|
|
result.add(afterSum);
|
|
|
result.add(beforeSum);
|
|
|
result.add(countTotal(afterSum, beforeSum));
|
|
@@ -237,6 +241,7 @@ public class BytedanceAccountReportServiceImpl implements IBytedanceAccountRepor
|
|
|
jsonObject.put(k, (LinkUtils.countLink(after.getBigDecimal(k) == null ? zero : after.getBigDecimal(k), before.getBigDecimal(k) == null ? zero : before.getBigDecimal(k))).multiply(BigDecimal.valueOf(100)).setScale(2, RoundingMode.HALF_UP) + "%");
|
|
|
}
|
|
|
});
|
|
|
+ jsonObject.put("authName", "环比");
|
|
|
return jsonObject;
|
|
|
}
|
|
|
|