|
@@ -1527,7 +1527,7 @@ public class TestController {
|
|
|
static CountDownLatch countDownLatch = null;
|
|
|
@Resource
|
|
|
AiKuaishouUnitLevelOperationRecordMapper kuaishouUnitLevelOperationRecordMapper;
|
|
|
- @PostMapping(value = "/getAudienceDataNew")
|
|
|
+ @GetMapping(value = "/getAudienceDataNew")
|
|
|
public void getAudienceData() throws Exception {
|
|
|
int page = 1;
|
|
|
int pageSize = 2000;
|
|
@@ -1535,8 +1535,14 @@ public class TestController {
|
|
|
List<CtopOauthToken> tokens = tokenService.getByProjectId(458l); //淘特项目
|
|
|
for (CtopOauthToken token : tokens) {
|
|
|
Date startDate = DateUtils.getNowDate();
|
|
|
+ if(startDate.after(token.getAccessTokenExpiresIn())){ //过期跳过
|
|
|
+ continue;
|
|
|
+ }
|
|
|
Date enDate = DateUtils.addDay(startDate, 30);
|
|
|
List<AiKuaishouUnitLevelOperationRecord> planIdsAndUnitIds = kuaishouUnitLevelOperationRecordMapper.selectAllByAccountIdAndDate(token.getAccountId(), startDate, enDate);
|
|
|
+ if(Check.isNull(planIdsAndUnitIds)){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
countDownLatch = new CountDownLatch(planIdsAndUnitIds.size());
|
|
|
planIdsAndUnitIds.forEach(planIdAndUnitId -> executorService.submit(() -> {
|
|
|
try {
|