|
@@ -190,7 +190,7 @@ public class KuaishouDirectionalPackageServiceImpl extends ServiceImpl<KuaishouD
|
|
|
param.put("template_name", requestJson.getString("templateName"));
|
|
|
}
|
|
|
JSONObject targetJson = new JSONObject();
|
|
|
- if (requestJson.getJSONArray("region")!=null) {
|
|
|
+ if (requestJson.getJSONArray("region") != null) {
|
|
|
targetJson.put("region", requestJson.getJSONArray("region"));
|
|
|
}
|
|
|
if (!Check.isNull(requestJson.getJSONArray("districtIds"))) {
|
|
@@ -230,10 +230,10 @@ public class KuaishouDirectionalPackageServiceImpl extends ServiceImpl<KuaishouD
|
|
|
if (!Check.isNull(requestJson.getInteger("filterConvertedLevel"))) {
|
|
|
targetJson.put("filter_converted_level", requestJson.getInteger("filterConvertedLevel"));
|
|
|
}
|
|
|
- if (requestJson.getJSONArray("deviceBrand")!=null) {
|
|
|
+ if (requestJson.getJSONArray("deviceBrand") != null) {
|
|
|
targetJson.put("device_brand", requestJson.getJSONArray("deviceBrand"));
|
|
|
}
|
|
|
- if (requestJson.getJSONArray("devicePrice")!=null) {
|
|
|
+ if (requestJson.getJSONArray("devicePrice") != null) {
|
|
|
targetJson.put("device_price", requestJson.getJSONArray("devicePrice"));
|
|
|
}
|
|
|
if (!Check.isNull(requestJson.getInteger("businessInterestType"))) {
|
|
@@ -385,7 +385,7 @@ public class KuaishouDirectionalPackageServiceImpl extends ServiceImpl<KuaishouD
|
|
|
param.put("advertiser_id", accountId);
|
|
|
param.put("template_name", data.getString("templateName"));
|
|
|
JSONObject targetJson = new JSONObject();
|
|
|
- if (data.getJSONArray("region")!=null) {
|
|
|
+ if (data.getJSONArray("region") != null) {
|
|
|
targetJson.put("region", data.getJSONArray("region"));
|
|
|
}
|
|
|
if (!Check.isNull(data.getJSONArray("districtIds"))) {
|
|
@@ -425,10 +425,10 @@ public class KuaishouDirectionalPackageServiceImpl extends ServiceImpl<KuaishouD
|
|
|
if (!Check.isNull(data.getInteger("filterConvertedLevel"))) {
|
|
|
targetJson.put("filter_converted_level", data.getInteger("filterConvertedLevel"));
|
|
|
}
|
|
|
- if (data.getJSONArray("deviceBrand")!=null) {
|
|
|
+ if (data.getJSONArray("deviceBrand") != null) {
|
|
|
targetJson.put("device_brand", data.getJSONArray("deviceBrand"));
|
|
|
}
|
|
|
- if (data.getJSONArray("devicePrice")!=null) {
|
|
|
+ if (data.getJSONArray("devicePrice") != null) {
|
|
|
targetJson.put("device_price", data.getJSONArray("devicePrice"));
|
|
|
}
|
|
|
if (!Check.isNull(data.getInteger("businessInterestType"))) {
|
|
@@ -565,18 +565,12 @@ public class KuaishouDirectionalPackageServiceImpl extends ServiceImpl<KuaishouD
|
|
|
param.put("advertiser_id", accountId);
|
|
|
param.put("template_name", requestJson.getString("templateName"));
|
|
|
JSONObject targetJson = new JSONObject();
|
|
|
- if (!Check.isNull(requestJson.getJSONArray("population"))) {
|
|
|
- targetJson.put("population", requestJson.getJSONArray("population"));
|
|
|
- rel.setPopulation(requestJson.getString("population"));
|
|
|
- }
|
|
|
- if (!Check.isNull(requestJson.getJSONArray("paidAudience"))) {
|
|
|
- targetJson.put("paid_audience", requestJson.getJSONArray("paidAudience"));
|
|
|
- rel.setPaidAudience(requestJson.getString("paidAudience"));
|
|
|
- }
|
|
|
- if (!Check.isNull(requestJson.getJSONArray("excludePopulation"))) {
|
|
|
- targetJson.put("exclude_population", requestJson.getJSONArray("excludePopulation"));
|
|
|
- rel.setExcludePopulation(requestJson.getString("excludePopulation"));
|
|
|
- }
|
|
|
+ targetJson.put("population", requestJson.getJSONArray("population"));
|
|
|
+ rel.setPopulation(requestJson.getString("population"));
|
|
|
+ targetJson.put("paid_audience", requestJson.getJSONArray("paidAudience"));
|
|
|
+ rel.setPaidAudience(requestJson.getString("paidAudience"));
|
|
|
+ targetJson.put("exclude_population", requestJson.getJSONArray("excludePopulation"));
|
|
|
+ rel.setExcludePopulation(requestJson.getString("excludePopulation"));
|
|
|
if (!Check.isNull(targetJson)) {
|
|
|
param.put("target", targetJson);
|
|
|
}
|