Browse Source

直播投流

zhaoxian 2 years ago
parent
commit
5715166d5f

+ 2 - 1
ruixuan-launch/src/main/java/com/ruixuan/launch/service/impl/KuaishouLaunchCampaignAutoStrategyServiceImpl.java

@@ -119,6 +119,7 @@ public class KuaishouLaunchCampaignAutoStrategyServiceImpl implements IKuaishouL
     /*创建广告计划*/
     private Long createCampaign(JSONObject strategyJson, String token) {
         JSONObject parameter = new JSONObject();
+        strategyJson.put("campaignName", strategyJson.getString("campaignName") + "-" + DateUtils.dateTime());
         parameter.put("accountId", strategyJson.getLong("accountId"));
         parameter.put("campaignName", strategyJson.getString("campaignName"));
         KuaishouLaunchCampaign campaign = kuaishouLaunchCampaignService.getOne(parameter);
@@ -149,7 +150,7 @@ public class KuaishouLaunchCampaignAutoStrategyServiceImpl implements IKuaishouL
                         Long targetId = targetTemplate.getLong(k);
                         KuaishouLaunchTargetTemplate template = kuaishouLaunchTargetTemplateService.selectKuaishouLaunchTargetTemplateById(targetId);
                         String name = getName(strategyJson, targetId, type, new BigDecimal(cpaBid));
-                        strategyJson.put("unitName", name);
+                        strategyJson.put("newUnitName", name);
                         strategyJson = kuaishouLaunchTargetTemplateService.getTargetJson(targetId, strategyJson);
                         Long unitId = kuaishouLaunchGroupService.insertKuaishouLaunchGroup(strategyJson, token);
                         if (unitId > 0) {

+ 1 - 1
ruixuan-launch/src/main/java/com/ruixuan/launch/service/impl/KuaishouLaunchGroupServiceImpl.java

@@ -73,7 +73,7 @@ public class KuaishouLaunchGroupServiceImpl implements IKuaishouLaunchGroupServi
         Map<String, Object> param = new HashMap<String, Object>();
         param.put("advertiser_id", requestJson.getLong("accountId"));
         param.put("campaign_id", requestJson.getLong("campaignId"));
-        param.put("name", requestJson.getString("unitName"));
+        param.put("name", requestJson.getString("newUnitName"));
         param.put("bid_type", requestJson.getInteger("bidType"));
         if (Check.isNotNull(requestJson.getLong("cpaBid"))) {
             param.put("cpa_bid", requestJson.getLong("cpaBid"));