|
@@ -77,15 +77,11 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
|
|
private KuaiShouConversionInfosMapper conversionInfosMapper;
|
|
private KuaiShouConversionInfosMapper conversionInfosMapper;
|
|
@Autowired
|
|
@Autowired
|
|
private KuaiShouConversionTypesMapper conversionTypesMapper;
|
|
private KuaiShouConversionTypesMapper conversionTypesMapper;
|
|
- @Autowired
|
|
|
|
- private KuaiShouCreativeCreateMapper creativeCreateMapper;
|
|
|
|
|
|
+
|
|
@Autowired
|
|
@Autowired
|
|
private KuaiShouVideoUploadMapper videoUploadMapper;
|
|
private KuaiShouVideoUploadMapper videoUploadMapper;
|
|
@Autowired
|
|
@Autowired
|
|
private KuaiShouVideoMapper kuaiShouVideoMapper;
|
|
private KuaiShouVideoMapper kuaiShouVideoMapper;
|
|
-
|
|
|
|
- @Autowired
|
|
|
|
- private KuaiShouImageGetMapper imageGetMapper;
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private KuaiShouRegionListChildrenMapper regionListChildrenMapper;
|
|
private KuaiShouRegionListChildrenMapper regionListChildrenMapper;
|
|
@Autowired
|
|
@Autowired
|
|
@@ -106,6 +102,12 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
|
|
private KuaiShouAdvertiserBaseInfoMapper advertiserBaseInfoMapper;
|
|
private KuaiShouAdvertiserBaseInfoMapper advertiserBaseInfoMapper;
|
|
@Autowired
|
|
@Autowired
|
|
private IKuaiShouImageGetService iKuaiShouImageGetService;
|
|
private IKuaiShouImageGetService iKuaiShouImageGetService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private MaterialInfoMapper materialInfoMapper;
|
|
|
|
+ @Autowired
|
|
|
|
+ private KuaiShouGroupTargetMapper groupTargetMapper;
|
|
|
|
+ @Autowired
|
|
|
|
+ private KuaiShouTargetingTagsMapper targetingTagsMapper;
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void getAdvertiserReportHourly(CtopOauthToken token, Date startDate, Date endDate) {
|
|
public void getAdvertiserReportHourly(CtopOauthToken token, Date startDate, Date endDate) {
|
|
@@ -1025,13 +1027,27 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
|
|
public void loadAllKuaishouData(List<CtopOauthToken> tokens) {
|
|
public void loadAllKuaishouData(List<CtopOauthToken> tokens) {
|
|
if (null != tokens && tokens.size() > 0) {
|
|
if (null != tokens && tokens.size() > 0) {
|
|
for (CtopOauthToken token : tokens) {
|
|
for (CtopOauthToken token : tokens) {
|
|
- loadKuaishouDataSingle(token);
|
|
|
|
|
|
+ try {
|
|
|
|
+ loadKuaishouDataSingle(token);
|
|
|
|
+ } catch (java.text.ParseException e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private IKuaiShouHistoryReportTaskService historyReportTaskService;
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
- public void loadKuaishouDataSingle(CtopOauthToken token) {
|
|
|
|
|
|
+ public void loadKuaishouDataSingle(CtopOauthToken token) throws java.text.ParseException {
|
|
|
|
+ log.info("----------------开始历史数据获取,accountId:{}", token.getAccountId());
|
|
|
|
+
|
|
|
|
+ String endDateStr = DateUtils.getDate("yyyy-MM-dd");
|
|
|
|
+ String startDate = DateUtils.addMonth(endDateStr, -6);
|
|
|
|
+
|
|
|
|
+ historyReportTaskService.createTask(token.getAccountId(), token.getAccessToken(), startDate, endDateStr, CtopAdConstant.KUAISHOU_LOAD_JOB_TYPE_HISTORY);
|
|
|
|
+
|
|
Date endDate = new Date();
|
|
Date endDate = new Date();
|
|
for (int i = 0; i < 7; i++) {
|
|
for (int i = 0; i < 7; i++) {
|
|
Date getStartDate = DateUtils.addDay(endDate, -i);
|
|
Date getStartDate = DateUtils.addDay(endDate, -i);
|
|
@@ -1044,39 +1060,22 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
|
|
//4: 获取广告创意信息数据
|
|
//4: 获取广告创意信息数据
|
|
getAdvertiserCreativeReportHourly(token, getStartDate, getStartDate);
|
|
getAdvertiserCreativeReportHourly(token, getStartDate, getStartDate);
|
|
}
|
|
}
|
|
- for (int i = 0; i < 6; i++) {
|
|
|
|
- Date getStartDate = new Date();
|
|
|
|
- Date getEndDate = new Date();
|
|
|
|
- if (i == 0) {
|
|
|
|
- getStartDate = DateUtils.addDay(endDate, -175 + i * 30);
|
|
|
|
- getEndDate = DateUtils.addDay(endDate, -150 + i * 30);
|
|
|
|
- } else {
|
|
|
|
- getStartDate = DateUtils.addDay(endDate, -180 + i * 30);
|
|
|
|
- getEndDate = DateUtils.addDay(endDate, -150 + i * 30);
|
|
|
|
- }
|
|
|
|
- //1: 获取广告主信息数据
|
|
|
|
- getAdvertiserReportDaily(token, getStartDate, getEndDate);
|
|
|
|
- //2:获取广告计划信息数据
|
|
|
|
- getAdvertiserCampaignReportDaily(token, getStartDate, getEndDate);
|
|
|
|
- //3:获取广告组信息数据
|
|
|
|
- getAdvertiserGroupReportDaily(token, getStartDate, getEndDate);
|
|
|
|
- //4: 获取广告创意信息数据
|
|
|
|
- // getAdvertiserCreativeReportDaily(token, getStartDate, getEndDate);
|
|
|
|
|
|
|
|
- //获取全量广告计划数据
|
|
|
|
- getCampaignList(token, null, null);
|
|
|
|
- //获取全量广组主数据
|
|
|
|
- getGroupList(token, null, null);
|
|
|
|
- //获取全量创意数据
|
|
|
|
- getCreativeList(token, null, null);
|
|
|
|
- //获取全量视频素材数据
|
|
|
|
- getVideoList(token, null, null);
|
|
|
|
- //获取图片信息数据
|
|
|
|
- getImageList(token, null, null);
|
|
|
|
- }
|
|
|
|
|
|
+ //获取全量广告计划数据
|
|
|
|
+ getCampaignList(token, null, null);
|
|
|
|
+ //获取全量广组主数据
|
|
|
|
+ getGroupList(token, null, null);
|
|
|
|
+ //获取全量创意数据
|
|
|
|
+ getCreativeList(token, null, null);
|
|
|
|
+ //获取全量视频素材数据
|
|
|
|
+ getVideoList(token, null, null);
|
|
|
|
+ //获取图片信息数据
|
|
|
|
+ getImageList(token, null, null);
|
|
|
|
|
|
|
|
|
|
getAppList(token.getAccountId(), token.getAccessToken());
|
|
getAppList(token.getAccountId(), token.getAccessToken());
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -1562,8 +1561,6 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- @Autowired
|
|
|
|
- private KuaiShouGroupTargetMapper groupTargetMapper;
|
|
|
|
|
|
|
|
private void addGroup(Long advertiserId, JSONArray details) {
|
|
private void addGroup(Long advertiserId, JSONArray details) {
|
|
if (!Check.isNull(details)) {
|
|
if (!Check.isNull(details)) {
|
|
@@ -2445,8 +2442,6 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- @Autowired
|
|
|
|
- private MaterialInfoMapper materialInfoMapper;
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public Map<String, Object> videoUpload(Long advertiserId, String accessToken, String videoUrl) {
|
|
public Map<String, Object> videoUpload(Long advertiserId, String accessToken, String videoUrl) {
|
|
@@ -3630,8 +3625,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
|
|
* @param accountId
|
|
* @param accountId
|
|
* @param accessToken
|
|
* @param accessToken
|
|
*/
|
|
*/
|
|
- @Autowired
|
|
|
|
- private KuaiShouTargetingTagsMapper targetingTagsMapper;
|
|
|
|
|
|
+
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public void getTargetingTags(Long accountId, String accessToken) {
|
|
public void getTargetingTags(Long accountId, String accessToken) {
|