|
@@ -159,9 +159,9 @@ public class KuaishouDirectionalPackageServiceImpl extends ServiceImpl<KuaishouD
|
|
if (Check.isNullMap(unionJson)) {
|
|
if (Check.isNullMap(unionJson)) {
|
|
throw new Exception("根据定向模板未获取到相关信息");
|
|
throw new Exception("根据定向模板未获取到相关信息");
|
|
}
|
|
}
|
|
- unitJson.put("target", unionJson);
|
|
|
|
|
|
+ unitJson.put("target", unionJson.getJSONObject("target"));
|
|
}
|
|
}
|
|
- JSONObject jsonObject = updateService.updateUnit(token.getAccessToken(), unitJson);
|
|
|
|
|
|
+ updateService.updateUnit(token.getAccessToken(), unitJson);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
log.error("修改广告组定向异常", e);
|
|
log.error("修改广告组定向异常", e);
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
@@ -275,9 +275,6 @@ public class KuaishouDirectionalPackageServiceImpl extends ServiceImpl<KuaishouD
|
|
targetJson.put("intelli_extend", intelliExtendJson);
|
|
targetJson.put("intelli_extend", intelliExtendJson);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if (!Check.isNull(targetJson)) {
|
|
|
|
- param.put("target", targetJson);
|
|
|
|
- }
|
|
|
|
JSONObject behaviorInterest = new JSONObject();
|
|
JSONObject behaviorInterest = new JSONObject();
|
|
JSONObject behavior = new JSONObject();
|
|
JSONObject behavior = new JSONObject();
|
|
JSONObject interest = new JSONObject();
|
|
JSONObject interest = new JSONObject();
|
|
@@ -306,7 +303,10 @@ public class KuaishouDirectionalPackageServiceImpl extends ServiceImpl<KuaishouD
|
|
behaviorInterest.put("interest", interest);
|
|
behaviorInterest.put("interest", interest);
|
|
}
|
|
}
|
|
if (!Check.isNull(behaviorInterest)) {
|
|
if (!Check.isNull(behaviorInterest)) {
|
|
- param.put("behavior_interest", behaviorInterest);
|
|
|
|
|
|
+ targetJson.put("behavior_interest", behaviorInterest);
|
|
|
|
+ }
|
|
|
|
+ if (!Check.isNull(targetJson)) {
|
|
|
|
+ param.put("target", targetJson);
|
|
}
|
|
}
|
|
Map<String, String> headers = new HashMap<String, String>();
|
|
Map<String, String> headers = new HashMap<String, String>();
|
|
headers.put("Access-Token", oauthToken.getAccessToken());
|
|
headers.put("Access-Token", oauthToken.getAccessToken());
|
|
@@ -318,6 +318,8 @@ public class KuaishouDirectionalPackageServiceImpl extends ServiceImpl<KuaishouD
|
|
Integer code = resultJson.getInteger("code");
|
|
Integer code = resultJson.getInteger("code");
|
|
if (code == 0) {
|
|
if (code == 0) {
|
|
kuaishouTemplateService.getTemplateByAccountId(accountId, oauthToken.getAccessToken(), 1);
|
|
kuaishouTemplateService.getTemplateByAccountId(accountId, oauthToken.getAccessToken(), 1);
|
|
|
|
+ }else{
|
|
|
|
+ log.error("修改账户定向失败,"+resultJson.getString("message"));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
@@ -470,9 +472,6 @@ public class KuaishouDirectionalPackageServiceImpl extends ServiceImpl<KuaishouD
|
|
targetJson.put("intelli_extend", intelliExtendJson);
|
|
targetJson.put("intelli_extend", intelliExtendJson);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if (!Check.isNull(targetJson)) {
|
|
|
|
- param.put("target", targetJson);
|
|
|
|
- }
|
|
|
|
//-------------兴趣行为定向
|
|
//-------------兴趣行为定向
|
|
JSONObject behaviorInterest = new JSONObject();
|
|
JSONObject behaviorInterest = new JSONObject();
|
|
JSONObject behavior = new JSONObject();
|
|
JSONObject behavior = new JSONObject();
|
|
@@ -502,7 +501,10 @@ public class KuaishouDirectionalPackageServiceImpl extends ServiceImpl<KuaishouD
|
|
behaviorInterest.put("interest", interest);
|
|
behaviorInterest.put("interest", interest);
|
|
}
|
|
}
|
|
if (!Check.isNull(behaviorInterest)) {
|
|
if (!Check.isNull(behaviorInterest)) {
|
|
- param.put("behavior_interest", behaviorInterest);
|
|
|
|
|
|
+ targetJson.put("behavior_interest", behaviorInterest);
|
|
|
|
+ }
|
|
|
|
+ if (!Check.isNull(targetJson)) {
|
|
|
|
+ param.put("target", targetJson);
|
|
}
|
|
}
|
|
Map<String, String> headers = new HashMap<String, String>();
|
|
Map<String, String> headers = new HashMap<String, String>();
|
|
headers.put("Access-Token", oauthToken.getAccessToken());
|
|
headers.put("Access-Token", oauthToken.getAccessToken());
|