zhaoxian 2 éve
szülő
commit
bd2c7dde7b

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

@@ -168,7 +168,7 @@ public class KuaishouLaunchCampaignAutoStrategyServiceImpl implements IKuaishouL
                     Long targetId = targetTemplate.getLong(k);
                     KuaishouLaunchTargetTemplate template = kuaishouLaunchTargetTemplateService.selectKuaishouLaunchTargetTemplateById(targetId);
                     String name = getName(strategyJson, targetId, type, null);
-                    strategyJson.put("unitName", name);
+                    strategyJson.put("newUnitName", name);
                     strategyJson = kuaishouLaunchTargetTemplateService.getTargetJson(targetId, strategyJson);
                     Long unitId = kuaishouLaunchGroupService.insertKuaishouLaunchGroup(strategyJson, token);
                     if (unitId > 0) {

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

@@ -76,7 +76,9 @@ public class KuaishouLaunchCampaignServiceImpl implements IKuaishouLaunchCampaig
             if (Check.isNotNull(requestJson.getLong("dayBudget"))) {
                 param.put("day_budget", requestJson.getLong("dayBudget"));
             }
-            param.put("budget_schedule", requestJson.getJSONArray("budgetSchedule"));
+            if (Check.isNotNull(requestJson.getJSONArray("budgetSchedule"))) {
+                param.put("budget_schedule", requestJson.getJSONArray("budgetSchedule"));
+            }
             JSONObject resultJson = APIUtil.getApiResult(KuaishouAPIConstant.CREATE_CAMPAIGN, token, param);
             Long campaignId = -1L;
             KuaishouLaunchCampaignRecord record = JSONObject.parseObject(requestJson.toJSONString(), KuaishouLaunchCampaignRecord.class);