|
@@ -2,7 +2,6 @@ package cn.com.ctop.kuaishou.modules.batch.controller;
|
|
|
|
|
|
import cn.com.ctop.common.module.annotation.AutoLog;
|
|
import cn.com.ctop.common.module.annotation.AutoLog;
|
|
import cn.com.ctop.common.module.utils.Check;
|
|
import cn.com.ctop.common.module.utils.Check;
|
|
-import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouBatchCampaignTemplate;
|
|
|
|
import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouBatchCreativeTemplate;
|
|
import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouBatchCreativeTemplate;
|
|
import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouBatchCreativeTemplateService;
|
|
import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouBatchCreativeTemplateService;
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSON;
|
|
@@ -101,8 +100,7 @@ public class KuaiShouBatchCreativeTemplateController {
|
|
@AutoLog(value = "创建创意预设模板")
|
|
@AutoLog(value = "创建创意预设模板")
|
|
@ApiOperation(value = "创建创意预设模板", notes = "创建创意预设模板")
|
|
@ApiOperation(value = "创建创意预设模板", notes = "创建创意预设模板")
|
|
@PostMapping(value = "/saveOrUpdate")
|
|
@PostMapping(value = "/saveOrUpdate")
|
|
- public Result<KuaiShouBatchCreativeTemplate> saveOrUpdate(@RequestBody KuaiShouBatchCreativeTemplate kuaiShouBatchCreativeTemplate) {
|
|
|
|
- Result<KuaiShouBatchCreativeTemplate> result = new Result<KuaiShouBatchCreativeTemplate>();
|
|
|
|
|
|
+ public Result<Object> saveOrUpdate(@RequestBody KuaiShouBatchCreativeTemplate kuaiShouBatchCreativeTemplate) {
|
|
boolean ok;
|
|
boolean ok;
|
|
try {
|
|
try {
|
|
Long id = kuaiShouBatchCreativeTemplate.getId();
|
|
Long id = kuaiShouBatchCreativeTemplate.getId();
|
|
@@ -117,14 +115,14 @@ public class KuaiShouBatchCreativeTemplateController {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (ok) {
|
|
if (ok) {
|
|
- result.success("操作成功!");
|
|
|
|
|
|
+ return Result.ok(id);
|
|
}
|
|
}
|
|
|
|
+ return Result.error("操作失败");
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
- result.error500(e.getMessage());
|
|
|
|
- e.printStackTrace();
|
|
|
|
|
|
+ return Result.error(e.getMessage());
|
|
}
|
|
}
|
|
- return result;
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 添加
|
|
* 添加
|
|
*
|
|
*
|