|
@@ -309,16 +309,16 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
|
|
kuaiShouVideoGet.setId(token.getAccountId() + kuaiShouVideoGet.getPhotoId());
|
|
kuaiShouVideoGet.setId(token.getAccountId() + kuaiShouVideoGet.getPhotoId());
|
|
kuaiShouVideoGet.setAccountId(token.getAccountId());
|
|
kuaiShouVideoGet.setAccountId(token.getAccountId());
|
|
|
|
|
|
- // kuaiShouVideoGet.setCreateTime(new Date());
|
|
|
|
|
|
+ // kuaiShouVideoGet.setCreateTime(new Date());
|
|
kuaiShouVideoGet.setUpdateTime(new Date());
|
|
kuaiShouVideoGet.setUpdateTime(new Date());
|
|
Integer type = MaterialEnum.getTypeBySize(kuaiShouVideoGet.getWidth(), kuaiShouVideoGet.getHeight());
|
|
Integer type = MaterialEnum.getTypeBySize(kuaiShouVideoGet.getWidth(), kuaiShouVideoGet.getHeight());
|
|
if (!Check.isNull(type)) {
|
|
if (!Check.isNull(type)) {
|
|
kuaiShouVideoGet.setMaterialType(type);
|
|
kuaiShouVideoGet.setMaterialType(type);
|
|
}
|
|
}
|
|
kuaiShouVideoGetService.saveOrUpdate(kuaiShouVideoGet);
|
|
kuaiShouVideoGetService.saveOrUpdate(kuaiShouVideoGet);
|
|
- // videoGets.add(kuaiShouVideoGet);
|
|
|
|
|
|
+ // videoGets.add(kuaiShouVideoGet);
|
|
}
|
|
}
|
|
- // kuaiShouVideoGetService.replaceBatch(videoGets);
|
|
|
|
|
|
+ // kuaiShouVideoGetService.replaceBatch(videoGets);
|
|
getVideoListByPage(token, startDate, endDate, page + 1);
|
|
getVideoListByPage(token, startDate, endDate, page + 1);
|
|
|
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
@@ -781,8 +781,12 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
|
|
headers.put("Content-Type", "application/json");
|
|
headers.put("Content-Type", "application/json");
|
|
headers.put("Access-Token", token.getAccessToken());
|
|
headers.put("Access-Token", token.getAccessToken());
|
|
Map<String, Object> param = new HashMap<String, Object>();
|
|
Map<String, Object> param = new HashMap<String, Object>();
|
|
- param.put("start_date", DateUtils.formatDate(startDate));
|
|
|
|
- param.put("end_date", DateUtils.formatDate(endDate));
|
|
|
|
|
|
+ if (!Check.isNull(startDate)) {
|
|
|
|
+ param.put("start_date", DateUtils.formatDate(startDate));
|
|
|
|
+ }
|
|
|
|
+ if (!Check.isNull(endDate)) {
|
|
|
|
+ param.put("end_date", DateUtils.formatDate(endDate));
|
|
|
|
+ }
|
|
param.put("advertiser_id", token.getAccountId());
|
|
param.put("advertiser_id", token.getAccountId());
|
|
param.put("temporal_granularity", "DAILY");
|
|
param.put("temporal_granularity", "DAILY");
|
|
param.put("page_size", 500);
|
|
param.put("page_size", 500);
|
|
@@ -810,6 +814,12 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
|
|
var creative = JSONObject.toJavaObject(detailJson, KuaishouReportDailyCreative.class);
|
|
var creative = JSONObject.toJavaObject(detailJson, KuaishouReportDailyCreative.class);
|
|
creative.setAccountId(token.getAccountId());
|
|
creative.setAccountId(token.getAccountId());
|
|
creative.setId("" + creative.getAccountId() + creative.getCreativeId() + creative.getStatDate());
|
|
creative.setId("" + creative.getAccountId() + creative.getCreativeId() + creative.getStatDate());
|
|
|
|
+
|
|
|
|
+ // 取得MD5
|
|
|
|
+ String signature = creativeService.getCodeByCreativeId(creative.getCreativeId());
|
|
|
|
+ if (!Check.isNull(signature)) {
|
|
|
|
+ creative.setSignature(signature);
|
|
|
|
+ }
|
|
KuaishouReportDailyCreativeStatistic statistic = setDailyStatistic(creative, token);
|
|
KuaishouReportDailyCreativeStatistic statistic = setDailyStatistic(creative, token);
|
|
dailyCreativeStatisticService.saveOrUpdate(statistic);
|
|
dailyCreativeStatisticService.saveOrUpdate(statistic);
|
|
dailyCreativeService.saveOrUpdate(creative);
|
|
dailyCreativeService.saveOrUpdate(creative);
|
|
@@ -3428,10 +3438,10 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
|
|
kuaiShouVideoGet.setId("" + accountId + kuaiShouVideoGet.getPhotoId());
|
|
kuaiShouVideoGet.setId("" + accountId + kuaiShouVideoGet.getPhotoId());
|
|
kuaiShouVideoGet.setCreateTime(new Date());
|
|
kuaiShouVideoGet.setCreateTime(new Date());
|
|
kuaiShouVideoGet.setUpdateTime(new Date());
|
|
kuaiShouVideoGet.setUpdateTime(new Date());
|
|
- // videoGets.add(kuaiShouVideoGet);
|
|
|
|
|
|
+ // videoGets.add(kuaiShouVideoGet);
|
|
kuaiShouVideoGetService.saveOrUpdate(kuaiShouVideoGet);
|
|
kuaiShouVideoGetService.saveOrUpdate(kuaiShouVideoGet);
|
|
}
|
|
}
|
|
- // kuaiShouVideoGetService.replaceBatch(videoGets);
|
|
|
|
|
|
+ // kuaiShouVideoGetService.replaceBatch(videoGets);
|
|
getVideoList(token, accountId, startDate, endDate, page + 1);
|
|
getVideoList(token, accountId, startDate, endDate, page + 1);
|
|
}
|
|
}
|
|
|
|
|