|
@@ -213,11 +213,16 @@ public class AiKuaishouProjectCreateCreativeServiceImpl implements IAiKuaishouPr
|
|
insertAccountOperationRecord(strategy, "未获取到项目应用模板", operationType, 0);
|
|
insertAccountOperationRecord(strategy, "未获取到项目应用模板", operationType, 0);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- appId = appPackageService.queryAppId(appTemId, token.getAccountId());
|
|
|
|
- if (Check.isNull(appTemId)) {
|
|
|
|
|
|
+ JSONObject app = appPackageService.queryAppId(appTemId, token.getAccountId());
|
|
|
|
+ if (Check.isNull(app) || Check.isNull(app.getLong("app_id"))) {
|
|
insertAccountOperationRecord(strategy, "未获取到appId", operationType, 0);
|
|
insertAccountOperationRecord(strategy, "未获取到appId", operationType, 0);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+ appId = app.getLong("app_id");
|
|
|
|
+ strategy.setClickTrackUrl(app.getString("track_url"));
|
|
|
|
+ strategy.setImpressionUrl(app.getString("impression_url"));
|
|
|
|
+ strategy.setAdPhotoPlayedT3sUrl(app.getString("ad_photo_played_t3s_url"));
|
|
|
|
+ strategy.setActionbarClickUrl(app.getString("actionbar_click_url"));
|
|
}
|
|
}
|
|
Long newCampaignId = getCampaignId(strategy, token, replaceString, "TODAY", createType, appId, strategyUuid);
|
|
Long newCampaignId = getCampaignId(strategy, token, replaceString, "TODAY", createType, appId, strategyUuid);
|
|
if (null == newCampaignId) {
|
|
if (null == newCampaignId) {
|
|
@@ -317,7 +322,7 @@ public class AiKuaishouProjectCreateCreativeServiceImpl implements IAiKuaishouPr
|
|
Long timeStart = null;
|
|
Long timeStart = null;
|
|
Long timeEnd = null;
|
|
Long timeEnd = null;
|
|
Integer singleAppid = strategy.getSingleAppid();
|
|
Integer singleAppid = strategy.getSingleAppid();
|
|
- if (null != singleAppid && singleAppid == 0) {
|
|
|
|
|
|
+ if (null != singleAppid && singleAppid == 1) {
|
|
timeStart = -7 * 60 * 24L;
|
|
timeStart = -7 * 60 * 24L;
|
|
timeEnd = -5L;
|
|
timeEnd = -5L;
|
|
} else {
|
|
} else {
|
|
@@ -347,11 +352,16 @@ public class AiKuaishouProjectCreateCreativeServiceImpl implements IAiKuaishouPr
|
|
insertAccountOperationRecord(strategy, "未获取到项t目应用模板", operationType, 0);
|
|
insertAccountOperationRecord(strategy, "未获取到项t目应用模板", operationType, 0);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- appId = appPackageService.queryAppId(appTemId, token.getAccountId());
|
|
|
|
- if (Check.isNull(appTemId)) {
|
|
|
|
|
|
+ JSONObject app = appPackageService.queryAppId(appTemId, token.getAccountId());
|
|
|
|
+ if (Check.isNull(app) || Check.isNull(app.getLong("app_id"))) {
|
|
insertAccountOperationRecord(strategy, "未获取到appId", operationType, 0);
|
|
insertAccountOperationRecord(strategy, "未获取到appId", operationType, 0);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+ appId = app.getLong("app_id");
|
|
|
|
+ strategy.setClickTrackUrl(app.getString("track_url"));
|
|
|
|
+ strategy.setImpressionUrl(app.getString("impression_url"));
|
|
|
|
+ strategy.setAdPhotoPlayedT3sUrl(app.getString("ad_photo_played_t3s_url"));
|
|
|
|
+ strategy.setActionbarClickUrl(app.getString("actionbar_click_url"));
|
|
}
|
|
}
|
|
Long newCampaignId = getCampaignId(strategy, token, replaceString, "TODAY", createType, appId, strategyUuid);
|
|
Long newCampaignId = getCampaignId(strategy, token, replaceString, "TODAY", createType, appId, strategyUuid);
|
|
if (null == newCampaignId) {
|
|
if (null == newCampaignId) {
|
|
@@ -506,7 +516,7 @@ public class AiKuaishouProjectCreateCreativeServiceImpl implements IAiKuaishouPr
|
|
JSONObject programJson = new JSONObject();
|
|
JSONObject programJson = new JSONObject();
|
|
programJson.put("advertiser_id", token.getAccountId());
|
|
programJson.put("advertiser_id", token.getAccountId());
|
|
programJson.put("unit_id", unitId);
|
|
programJson.put("unit_id", unitId);
|
|
- if (strategy.getSingleAppid() != null && strategy.getSingleAppid() == 0) { // 多应用情况下 创意名称已app-versionMI命名
|
|
|
|
|
|
+ if (strategy.getSingleAppid() != null && strategy.getSingleAppid() == 1) { // 多应用情况下 创意名称已app-versionMI命名
|
|
if (!Check.isNull(appVersion)) {
|
|
if (!Check.isNull(appVersion)) {
|
|
programJson.put("package_name", appVersion);
|
|
programJson.put("package_name", appVersion);
|
|
} else {
|
|
} else {
|
|
@@ -1339,8 +1349,8 @@ public class AiKuaishouProjectCreateCreativeServiceImpl implements IAiKuaishouPr
|
|
String HOUR = DateUtils.formatDate(date, DateUtils.TIME_FORMAT);
|
|
String HOUR = DateUtils.formatDate(date, DateUtils.TIME_FORMAT);
|
|
if (wildcard.contains("{{时分}}")) {
|
|
if (wildcard.contains("{{时分}}")) {
|
|
wildcard = wildcard.replace("{{时分}}", HOUR);
|
|
wildcard = wildcard.replace("{{时分}}", HOUR);
|
|
- }else{
|
|
|
|
- wildcard = wildcard.concat(HOUR.substring(0,4));
|
|
|
|
|
|
+ } else {
|
|
|
|
+ wildcard = wildcard.concat(HOUR.substring(0, 4));
|
|
}
|
|
}
|
|
String targetName = KuaishouProjectCreativeMatTypeEnum.getNameByType(strategy.getUnitType().toString() + createType.toString());
|
|
String targetName = KuaishouProjectCreativeMatTypeEnum.getNameByType(strategy.getUnitType().toString() + createType.toString());
|
|
wildcard = wildcard.replace("{{自定义}}", targetName);
|
|
wildcard = wildcard.replace("{{自定义}}", targetName);
|