|
@@ -61,6 +61,15 @@ public class BytedanceAccountReportDailyDwController {
|
|
}
|
|
}
|
|
String startDate = requestBody.getString("startDate");
|
|
String startDate = requestBody.getString("startDate");
|
|
String endDate = requestBody.getString("endDate");
|
|
String endDate = requestBody.getString("endDate");
|
|
|
|
+
|
|
|
|
+ //开始和结束时间的时间跨度,不能超过60天
|
|
|
|
+ long days = DateUtils.getDiscrepantDays(startDate, endDate) + 1;
|
|
|
|
+ if (days > 60) {
|
|
|
|
+ result.setSuccess(false);
|
|
|
|
+ result.setMessage("开始和结束时间的时间跨度,不能超过60天,请重新选择");
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+
|
|
Integer hour = requestBody.getInteger("hour");
|
|
Integer hour = requestBody.getInteger("hour");
|
|
if (null == hour) {
|
|
if (null == hour) {
|
|
hour = DateUtils.getNowHour();
|
|
hour = DateUtils.getNowHour();
|
|
@@ -89,14 +98,21 @@ public class BytedanceAccountReportDailyDwController {
|
|
log.error("request body is empty");
|
|
log.error("request body is empty");
|
|
resultBody.setSuccess(false);
|
|
resultBody.setSuccess(false);
|
|
}
|
|
}
|
|
|
|
+ String startDate = requestBody.getString("startDate");
|
|
|
|
+ String endDate = requestBody.getString("endDate");
|
|
|
|
+ //开始和结束时间的时间跨度,不能超过60天
|
|
|
|
+ long days = DateUtils.getDiscrepantDays(startDate, endDate) + 1;
|
|
|
|
+ if (days > 60) {
|
|
|
|
+ resultBody.setSuccess(false);
|
|
|
|
+ resultBody.setMessage("开始和结束时间的时间跨度,不能超过60天,请重新选择");
|
|
|
|
+ return resultBody;
|
|
|
|
+ }
|
|
String mediaId = requestBody.getString("mediaId");
|
|
String mediaId = requestBody.getString("mediaId");
|
|
BigDecimal discount = requestBody.getBigDecimal("disscount");
|
|
BigDecimal discount = requestBody.getBigDecimal("disscount");
|
|
JSONArray accounts = requestBody.getJSONArray("accountIds");
|
|
JSONArray accounts = requestBody.getJSONArray("accountIds");
|
|
if (accounts.isEmpty()) {
|
|
if (accounts.isEmpty()) {
|
|
return resultBody;
|
|
return resultBody;
|
|
}
|
|
}
|
|
- String startDate = requestBody.getString("startDate");
|
|
|
|
- String endDate = requestBody.getString("endDate");
|
|
|
|
try {
|
|
try {
|
|
Map<String, Object> sumData = accountAttributionInfoService.getBytedanceSumDataBy(mediaId, discount, accounts, startDate, endDate);
|
|
Map<String, Object> sumData = accountAttributionInfoService.getBytedanceSumDataBy(mediaId, discount, accounts, startDate, endDate);
|
|
List<JSONObject> chartData = accountAttributionInfoService.getBytedanceChartDataBy(mediaId, discount, accounts, startDate, endDate);
|
|
List<JSONObject> chartData = accountAttributionInfoService.getBytedanceChartDataBy(mediaId, discount, accounts, startDate, endDate);
|