|
@@ -60,7 +60,22 @@ public class KuaiShouCreateServiceImpl implements IKuaiShouCreateService {
|
|
}
|
|
}
|
|
String group_uuid = groupCreateJson.getString("group_uuid");
|
|
String group_uuid = groupCreateJson.getString("group_uuid");
|
|
try {
|
|
try {
|
|
|
|
+
|
|
|
|
+ Integer unit_type = groupCreateJson.getInteger("unit_type");
|
|
|
|
+ if (Check.isNull(unit_type)) {
|
|
|
|
+ throw new Exception("请选择创意制作方式");
|
|
|
|
+ }
|
|
|
|
+ if (unit_type == 4) { // 自定义创意
|
|
|
|
+ if (Check.isNull(groupCreateJson.getJSONArray("creative_list"))) {
|
|
|
|
+ throw new Exception("组下面创意信息不能为空");
|
|
|
|
+ }
|
|
|
|
+ } else if (unit_type == 7) { // 程序化创意
|
|
|
|
+ if (Check.isNull(groupCreateJson.getJSONObject("programCreative"))) {
|
|
|
|
+ throw new Exception("组下程序化创意信息不能为空");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
JSONObject createJson = new JSONObject();
|
|
JSONObject createJson = new JSONObject();
|
|
|
|
+ createJson.put("unit_type", groupCreateJson.getInteger("unit_type")); //创意制作方式
|
|
createJson.put("advertiser_id", oauthToken.getAccountId());
|
|
createJson.put("advertiser_id", oauthToken.getAccountId());
|
|
createJson.put("campaign_id", campaign_id);
|
|
createJson.put("campaign_id", campaign_id);
|
|
createJson.put("unit_name", groupCreateJson.getString("unit_name")); // 组名称
|
|
createJson.put("unit_name", groupCreateJson.getString("unit_name")); // 组名称
|
|
@@ -98,11 +113,7 @@ public class KuaiShouCreateServiceImpl implements IKuaiShouCreateService {
|
|
sceneId = groupCreateJson.getJSONArray("scene_id").getInteger(0);
|
|
sceneId = groupCreateJson.getJSONArray("scene_id").getInteger(0);
|
|
createJson.put("scene_id", groupCreateJson.getJSONArray("scene_id")); //资源位置
|
|
createJson.put("scene_id", groupCreateJson.getJSONArray("scene_id")); //资源位置
|
|
}
|
|
}
|
|
- Integer unit_type = groupCreateJson.getInteger("unit_type");
|
|
|
|
- if (Check.isNull(unit_type)) {
|
|
|
|
- throw new Exception("请选择创意制作方式");
|
|
|
|
- }
|
|
|
|
- createJson.put("unit_type", groupCreateJson.getInteger("unit_type")); //创意制作方式
|
|
|
|
|
|
+
|
|
if (!Check.isNull(groupCreateJson.getString("begin_time"))) {
|
|
if (!Check.isNull(groupCreateJson.getString("begin_time"))) {
|
|
createJson.put("begin_time", groupCreateJson.getString("begin_time")); //投放开始时间
|
|
createJson.put("begin_time", groupCreateJson.getString("begin_time")); //投放开始时间
|
|
}
|
|
}
|