|
@@ -7,11 +7,7 @@ import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouImageGet;
|
|
|
import cn.com.ctop.kuaishou.modules.batch.entity.KuaishouStrategy;
|
|
|
import cn.com.ctop.kuaishou.modules.batch.entity.kuaishoustrategycampaignRel;
|
|
|
import cn.com.ctop.kuaishou.modules.batch.mapper.KuaishouStrategyMapper;
|
|
|
-import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouImageGetService;
|
|
|
-import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouMaterialUploadService;
|
|
|
-import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouUpdateService;
|
|
|
-import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouInterfaceService;
|
|
|
-import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouStrategyService;
|
|
|
+import cn.com.ctop.kuaishou.modules.batch.service.*;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
@@ -90,6 +86,11 @@ public class KuaishouStrategyServiceImpl extends ServiceImpl<KuaishouStrategyMap
|
|
|
}
|
|
|
if (flag) {
|
|
|
obj.put(id.toString(), true);
|
|
|
+ QueryWrapper<KuaishouStrategy> strategyWrapper = new QueryWrapper<>();
|
|
|
+ strategyWrapper.eq("id", id);
|
|
|
+ KuaishouStrategy strategy = new KuaishouStrategy();
|
|
|
+ strategy.setStrategyState(data.getString("state"));
|
|
|
+ kuaishouStrategyMapper.update(strategy, strategyWrapper);
|
|
|
} else {
|
|
|
obj.put(id.toString(), false);
|
|
|
}
|
|
@@ -116,12 +117,11 @@ public class KuaishouStrategyServiceImpl extends ServiceImpl<KuaishouStrategyMap
|
|
|
|
|
|
/**
|
|
|
* @param oauthToken token签名
|
|
|
- * @param data 广告计划
|
|
|
+ * @param groupJson 广告计划
|
|
|
* @return void
|
|
|
* @throws
|
|
|
* @author ZHAOXA
|
|
|
*/
|
|
|
- @Override
|
|
|
public Map<String, Object> createPlanLevelStrategy(CtopOauthToken oauthToken, JSONObject data) {
|
|
|
JSONObject planJson = new JSONObject();
|
|
|
/**计划类型
|
|
@@ -147,7 +147,6 @@ public class KuaishouStrategyServiceImpl extends ServiceImpl<KuaishouStrategyMap
|
|
|
return kuaishouInterfaceService.campaignCreate(oauthToken.getAccessToken(), oauthToken.getAccountId(), planJson);
|
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
public JSONArray createGroupLevelStrategy(CtopOauthToken oauthToken, JSONObject data) {
|
|
|
JSONArray resultArr = new JSONArray();
|
|
|
JSONArray groupInfo = data.getJSONArray("groupInfo");
|
|
@@ -430,8 +429,9 @@ public class KuaishouStrategyServiceImpl extends ServiceImpl<KuaishouStrategyMap
|
|
|
if (!Check.isNull(groupJson.getInteger("noAreaBreak"))) {
|
|
|
intelliExtendJson.put("no_area_break", groupJson.getInteger("noAreaBreak"));
|
|
|
}
|
|
|
- targetJson.put("intelli_extend", intelliExtendJson);
|
|
|
-
|
|
|
+ if (!Check.isNull(intelliExtendJson)) {
|
|
|
+ targetJson.put("intelli_extend", intelliExtendJson);
|
|
|
+ }
|
|
|
}
|
|
|
// APP行为-按分类
|
|
|
if (!Check.isNull(groupJson.getJSONArray("appInterest"))) {
|