|
|
@@ -103,13 +103,15 @@ public class KuaishouLaunchCampaignAutoStrategyServiceImpl implements IKuaishouL
|
|
|
JSONObject strategyJson = (JSONObject) JSONObject.toJSON(strategy);
|
|
|
//1、创建计划&获取计划ID
|
|
|
Long campaignId = createCampaign(strategyJson, token);
|
|
|
- strategyJson.put("campaignId", campaignId);
|
|
|
- //2、创建广告组
|
|
|
- try {
|
|
|
- Long unitId = createGroup(strategyJson, token);
|
|
|
- } catch (InterruptedException e) {
|
|
|
- log.error("---创建广告组异常---");
|
|
|
- e.printStackTrace();
|
|
|
+ if (campaignId > 0) {
|
|
|
+ strategyJson.put("campaignId", campaignId);
|
|
|
+ //2、创建广告组
|
|
|
+ try {
|
|
|
+ Long unitId = createGroup(strategyJson, token);
|
|
|
+ } catch (InterruptedException e) {
|
|
|
+ log.error("---创建广告组异常---");
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
}
|
|
|
return ResultResponse.success();
|
|
|
}
|