|
@@ -11,6 +11,7 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|
|
import org.jeecg.common.api.vo.Result;
|
|
|
import org.jeecg.common.constant.AccountReportConstants;
|
|
|
+import org.jeecg.common.util.DateUtils;
|
|
|
import org.jeecg.common.utils.JsonResourceUtil;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
@@ -43,9 +44,17 @@ public class BytedanceVideoReportCtrl {
|
|
|
log.error("request body is empty");
|
|
|
result.setSuccess(false);
|
|
|
} else {
|
|
|
- JSONArray accountIds = requestBody.getJSONArray("accountIds");
|
|
|
String startDate = requestBody.getString("startDate");
|
|
|
String endDate = requestBody.getString("endDate");
|
|
|
+ //开始和结束时间的时间跨度,不能超过60天
|
|
|
+ long days = DateUtils.getDiscrepantDays(startDate, endDate) + 1;
|
|
|
+ if (days > 60) {
|
|
|
+ result.setSuccess(false);
|
|
|
+ result.setMessage("开始和结束时间的时间跨度,不能超过60天,请重新选择");
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ JSONArray accountIds = requestBody.getJSONArray("accountIds");
|
|
|
String clip = requestBody.getString("clip");
|
|
|
String shot = requestBody.getString("shot");
|
|
|
String plan = requestBody.getString("plan");
|