Browse Source

多应用多出价加入深度转化出价

yumeng 4 years ago
parent
commit
3dd57d7a68

+ 1 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/entity/KuaiShouAppMultipleBids.java

@@ -52,6 +52,7 @@ public class KuaiShouAppMultipleBids {
     @Excel(name = "出价", width = 15)
     @ApiModelProperty(value = "出价")
     private Long cpaBid;
+    private Long deepConversionBid;
     /**
      * 监测链接
      */

+ 9 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/impl/AiKuaishouCreateCreativeServiceImpl.java

@@ -198,6 +198,10 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
                         JSONObject unitParams = createUnitParams(token, newCampaignId, strategy, unitName, appId);
                         unitParams.remove("cpa_bid");
                         unitParams.put("cpa_bid", multipleBids.getCpaBid());
+                        if (!Check.isNull(multipleBids.getDeepConversionBid())) {
+                            unitParams.remove("deep_conversion_bid");
+                            unitParams.put("deep_conversion_bid", multipleBids.getDeepConversionBid());
+                        }
                         strategy.setCpaBid(multipleBids.getCpaBid() + "");
                         Map<String, Object> unitCreateResult = kuaishouInterfaceService.adUnitCreate(token.getAccessToken(), token.getAccountId(), unitParams, 1);
                         Integer unitCode = (Integer) unitCreateResult.get("code");
@@ -442,7 +446,12 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
                         //创建组
                         String unitName = getName(strategy.getGroupName(), strategy, createType, null, "unit", newCampaignId, appId);
                         JSONObject unitParams = createUnitParams(token, newCampaignId, strategy, unitName, appId);
+                        unitParams.remove("cpa_bid");
                         unitParams.put("cpa_bid", multipleBids.getCpaBid());
+                        if (!Check.isNull(multipleBids.getDeepConversionBid())) {
+                            unitParams.remove("deep_conversion_bid");
+                            unitParams.put("deep_conversion_bid", multipleBids.getDeepConversionBid());
+                        }
                         Map<String, Object> unitCreateResult = kuaishouInterfaceService.adUnitCreate(token.getAccessToken(), token.getAccountId(), unitParams, 1);
                         Integer unitCode = (Integer) unitCreateResult.get("code");
                         String unitMessage = (String) unitCreateResult.get("message");