|
|
@@ -12,7 +12,6 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
-import java.util.Date;
|
|
|
import java.util.List;
|
|
|
import java.util.concurrent.ExecutorService;
|
|
|
import java.util.concurrent.Executors;
|
|
|
@@ -67,10 +66,11 @@ public class UnitReportJob {
|
|
|
@XxlJob("unitAdSceneTypeDailyReport")
|
|
|
public void unitAdSceneTypeDailyReport() throws Exception {
|
|
|
String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
|
|
|
- String date = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -1);
|
|
|
+ String startDate = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -1);
|
|
|
+ String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -2);
|
|
|
List<JSONObject> tokens = tokenService.getByProjectId(458L); //淘特项目
|
|
|
tokens.forEach(t -> adSceneDailyExecutorService.submit(() -> {
|
|
|
- unitReportDailyService.getUnitAdSceneReportDaily(t.getLong("accountId"), t.getString("accessToken"), date, date, 1);
|
|
|
+ unitReportDailyService.getUnitAdSceneReportDaily(t.getLong("accountId"), t.getString("accessToken"), startDate, endDate, 1);
|
|
|
}));
|
|
|
}
|
|
|
|
|
|
@@ -81,12 +81,12 @@ public class UnitReportJob {
|
|
|
*/
|
|
|
@XxlJob("unitPlacementTypeDailyReport")
|
|
|
public void unitPlacementTypeDailyReport() throws Exception {
|
|
|
- String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
|
|
|
- String date = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -1);
|
|
|
- List<JSONObject> tokens = tokenService.getByProjectId(458L); //淘特项目
|
|
|
- tokens.forEach(t -> placementTypeDailyExecutorService.submit(() -> {
|
|
|
- unitReportDailyService.getUnitPlacementTypeReportDaily(t.getLong("accountId"), t.getString("accessToken"), date, date, 1);
|
|
|
- }));
|
|
|
+ String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
|
|
|
+ String date = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -1);
|
|
|
+ List<JSONObject> tokens = tokenService.getByProjectId(458L); //淘特项目
|
|
|
+ tokens.forEach(t -> placementTypeDailyExecutorService.submit(() -> {
|
|
|
+ unitReportDailyService.getUnitPlacementTypeReportDaily(t.getLong("accountId"), t.getString("accessToken"), date, date, 1);
|
|
|
+ }));
|
|
|
}
|
|
|
|
|
|
/**
|