|
@@ -132,6 +132,7 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
|
|
|
//开始创建组+创意
|
|
|
String unitName = getName(strategy.getGroupName(), strategy, createType, videoItem.getPhotoName(), "unit", newCampaignId, appInfo.getAppId());
|
|
|
JSONObject unitParams = createUnitParams(token, newCampaignId, strategy, unitName, appInfo.getAppId());
|
|
|
+ log.info("创建广告组入参:{}", unitParams);
|
|
|
Map<String, Object> unitCreateResult = kuaishouInterfaceService.adUnitCreate(token.getAccessToken(), token.getAccountId(), unitParams, 1);
|
|
|
Integer unitCode = (Integer) unitCreateResult.get("code");
|
|
|
String unitMessage = (String) unitCreateResult.get("message");
|
|
@@ -143,6 +144,7 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
|
|
|
unitLevelOperationRecord.setCampaignId(newCampaignId);
|
|
|
unitLevelOperationRecord.setCpaBid(unitParams.getInteger("cpa_bid"));
|
|
|
unitLevelOperationRecord.setBid(unitParams.getInteger("bid"));
|
|
|
+ unitLevelOperationRecord.setDeepConversionBid(unitParams.getInteger("deep_conversion_bid"));
|
|
|
unitLevelOperationRecord.setMessage(unitMessage);
|
|
|
unitLevelOperationRecord.setCampaignId(newCampaignId);
|
|
|
unitLevelOperationRecord.setAiStrategyUuid(strategyUuid);
|
|
@@ -203,6 +205,7 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
|
|
|
unitParams.put("deep_conversion_bid", multipleBids.getDeepConversionBid());
|
|
|
}
|
|
|
strategy.setCpaBid(multipleBids.getCpaBid() + "");
|
|
|
+ log.info("创建广告组入参:{}", unitParams);
|
|
|
Map<String, Object> unitCreateResult = kuaishouInterfaceService.adUnitCreate(token.getAccessToken(), token.getAccountId(), unitParams, 1);
|
|
|
Integer unitCode = (Integer) unitCreateResult.get("code");
|
|
|
String unitMessage = (String) unitCreateResult.get("message");
|
|
@@ -210,6 +213,7 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
|
|
|
BeanUtils.copyProperties(strategy, unitLevelOperationRecord);
|
|
|
unitLevelOperationRecord.setCampaignId(newCampaignId);
|
|
|
unitLevelOperationRecord.setCpaBid(unitParams.getInteger("cpa_bid"));
|
|
|
+ unitLevelOperationRecord.setDeepConversionBid(unitParams.getInteger("deep_conversion_bid"));
|
|
|
unitLevelOperationRecord.setBid(unitParams.getInteger("bid"));
|
|
|
unitLevelOperationRecord.setGroupName(unitName);
|
|
|
unitLevelOperationRecord.setCreateTime(new Date());
|
|
@@ -267,6 +271,7 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
|
|
|
}
|
|
|
String unitName = getName(strategy.getGroupName(), strategy, createType, videoItem.getPhotoName(), "unit", newCampaignId, appId);
|
|
|
JSONObject unitParams = createUnitParams(token, newCampaignId, strategy, unitName, appId);
|
|
|
+ log.info("创建广告组入参:{}", unitParams);
|
|
|
Map<String, Object> unitCreateResult = kuaishouInterfaceService.adUnitCreate(token.getAccessToken(), token.getAccountId(), unitParams, 1);
|
|
|
Integer unitCode = (Integer) unitCreateResult.get("code");
|
|
|
String unitMessage = (String) unitCreateResult.get("message");
|
|
@@ -276,6 +281,7 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
|
|
|
unitLevelOperationRecord.setCampaignId(newCampaignId);
|
|
|
unitLevelOperationRecord.setCpaBid(unitParams.getInteger("cpa_bid"));
|
|
|
unitLevelOperationRecord.setBid(unitParams.getInteger("bid"));
|
|
|
+ unitLevelOperationRecord.setDeepConversionBid(unitParams.getInteger("deep_conversion_bid"));
|
|
|
unitLevelOperationRecord.setCreateTime(new Date());
|
|
|
unitLevelOperationRecord.setStatus(unitCode);
|
|
|
unitLevelOperationRecord.setMessage(unitMessage);
|
|
@@ -387,12 +393,17 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
|
|
|
//创建组
|
|
|
String unitName = getName(strategy.getGroupName(), strategy, createType, null, "unit", newCampaignId, appInfo.getAppId());
|
|
|
JSONObject unitParams = createUnitParams(token, newCampaignId, strategy, unitName, appInfo.getAppId());
|
|
|
+ log.info("创建广告组入参:{}", unitParams);
|
|
|
Map<String, Object> unitCreateResult = kuaishouInterfaceService.adUnitCreate(token.getAccessToken(), token.getAccountId(), unitParams, 1);
|
|
|
Integer unitCode = (Integer) unitCreateResult.get("code");
|
|
|
String unitMessage = (String) unitCreateResult.get("message");
|
|
|
AiKuaishouUnitLevelOperationRecord unitLevelOperationRecord = new AiKuaishouUnitLevelOperationRecord();
|
|
|
BeanUtils.copyProperties(strategy, unitLevelOperationRecord);
|
|
|
unitLevelOperationRecord.setGroupName(unitName);
|
|
|
+ unitLevelOperationRecord.setCampaignId(newCampaignId);
|
|
|
+ unitLevelOperationRecord.setCpaBid(unitParams.getInteger("cpa_bid"));
|
|
|
+ unitLevelOperationRecord.setBid(unitParams.getInteger("bid"));
|
|
|
+ unitLevelOperationRecord.setDeepConversionBid(unitParams.getInteger("deep_conversion_bid"));
|
|
|
unitLevelOperationRecord.setCreateTime(new Date());
|
|
|
unitLevelOperationRecord.setStatus(unitCode);
|
|
|
unitLevelOperationRecord.setMessage(unitMessage);
|
|
@@ -453,16 +464,23 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
|
|
|
unitParams.remove("deep_conversion_bid");
|
|
|
unitParams.put("deep_conversion_bid", multipleBids.getDeepConversionBid());
|
|
|
}
|
|
|
+ log.info("创建广告组入参:{}", unitParams);
|
|
|
Map<String, Object> unitCreateResult = kuaishouInterfaceService.adUnitCreate(token.getAccessToken(), token.getAccountId(), unitParams, 1);
|
|
|
Integer unitCode = (Integer) unitCreateResult.get("code");
|
|
|
String unitMessage = (String) unitCreateResult.get("message");
|
|
|
AiKuaishouUnitLevelOperationRecord unitLevelOperationRecord = new AiKuaishouUnitLevelOperationRecord();
|
|
|
BeanUtils.copyProperties(strategy, unitLevelOperationRecord);
|
|
|
unitLevelOperationRecord.setGroupName(unitName);
|
|
|
+ unitLevelOperationRecord.setCampaignId(newCampaignId);
|
|
|
+ unitLevelOperationRecord.setCpaBid(unitParams.getInteger("cpa_bid"));
|
|
|
+ unitLevelOperationRecord.setBid(unitParams.getInteger("bid"));
|
|
|
+ unitLevelOperationRecord.setDeepConversionBid(unitParams.getInteger("deep_conversion_bid"));
|
|
|
unitLevelOperationRecord.setCreateTime(new Date());
|
|
|
unitLevelOperationRecord.setStatus(unitCode);
|
|
|
unitLevelOperationRecord.setMessage(unitMessage);
|
|
|
unitLevelOperationRecord.setCampaignId(newCampaignId);
|
|
|
+ unitLevelOperationRecord.setDeepConversionBid(unitParams.getInteger("deep_conversion_bid"));
|
|
|
+
|
|
|
unitLevelOperationRecord.setAiStrategyUuid(strategyUuid);
|
|
|
if (unitCode != 0) {
|
|
|
log.info("组创建失败=>accountId:{};message:{}", accountId, unitMessage);
|
|
@@ -513,12 +531,17 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
|
|
|
//创建组
|
|
|
String unitName = getName(strategy.getGroupName(), strategy, createType, null, "unit", newCampaignId, appId);
|
|
|
JSONObject unitParams = createUnitParams(token, newCampaignId, strategy, unitName, appId);
|
|
|
+ log.info("创建广告组入参:{}", unitParams);
|
|
|
Map<String, Object> unitCreateResult = kuaishouInterfaceService.adUnitCreate(token.getAccessToken(), token.getAccountId(), unitParams, 1);
|
|
|
Integer unitCode = (Integer) unitCreateResult.get("code");
|
|
|
String unitMessage = (String) unitCreateResult.get("message");
|
|
|
AiKuaishouUnitLevelOperationRecord unitLevelOperationRecord = new AiKuaishouUnitLevelOperationRecord();
|
|
|
BeanUtils.copyProperties(strategy, unitLevelOperationRecord);
|
|
|
unitLevelOperationRecord.setGroupName(unitName);
|
|
|
+ unitLevelOperationRecord.setCampaignId(newCampaignId);
|
|
|
+ unitLevelOperationRecord.setCpaBid(unitParams.getInteger("cpa_bid"));
|
|
|
+ unitLevelOperationRecord.setBid(unitParams.getInteger("bid"));
|
|
|
+ unitLevelOperationRecord.setDeepConversionBid(unitParams.getInteger("deep_conversion_bid"));
|
|
|
unitLevelOperationRecord.setCreateTime(new Date());
|
|
|
unitLevelOperationRecord.setStatus(unitCode);
|
|
|
unitLevelOperationRecord.setMessage(unitMessage);
|
|
@@ -1115,7 +1138,6 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
|
|
|
}
|
|
|
}
|
|
|
unitParams.put("target", targetJsonObject);
|
|
|
- log.info("广告组创建参数:{}", unitParams.toJSONString());
|
|
|
return unitParams;
|
|
|
}
|
|
|
|