|
@@ -1,11 +1,10 @@
|
|
|
-package cn.com.ctop.kuaishou.modules.batch.controller;
|
|
|
+package org.jeecg.modules.ads.controller;
|
|
|
|
|
|
import cn.com.ctop.common.module.annotation.AutoLog;
|
|
|
import cn.com.ctop.common.module.utils.Check;
|
|
|
import cn.com.ctop.kuaishou.modules.batch.entity.KuaishouStrategy;
|
|
|
import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouStrategyService;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
-import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
@@ -13,23 +12,19 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.checkerframework.checker.units.qual.A;
|
|
|
import org.jeecg.common.api.vo.Result;
|
|
|
import org.jeecg.common.system.query.QueryGenerator;
|
|
|
import org.jeecg.common.util.oConvertUtils;
|
|
|
+import org.jeecg.modules.ads.service.IAiKuaishouStrategyService;
|
|
|
+import org.jeecg.modules.ads.service.IAiStrategyService;
|
|
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
|
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
|
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
|
|
import org.jeecgframework.poi.excel.entity.ImportParams;
|
|
|
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
@@ -57,6 +52,8 @@ import java.util.Map;
|
|
|
public class KuaishouStrategyController {
|
|
|
@Autowired
|
|
|
private IKuaishouStrategyService kuaishouStrategyService;
|
|
|
+ @Autowired
|
|
|
+ private IAiStrategyService strategyService;
|
|
|
|
|
|
/**
|
|
|
* 分页列表查询
|
|
@@ -82,11 +79,10 @@ public class KuaishouStrategyController {
|
|
|
result.setResult(pageList);
|
|
|
return result;
|
|
|
}
|
|
|
-
|
|
|
/**
|
|
|
* 添加
|
|
|
*
|
|
|
- * @param kuaishouStrategy
|
|
|
+ * @param data
|
|
|
* @return
|
|
|
*/
|
|
|
@AutoLog(value = "kuaishou.modules.batch-优化评估策略表-添加")
|
|
@@ -100,6 +96,7 @@ public class KuaishouStrategyController {
|
|
|
}
|
|
|
KuaishouStrategy strategy = JSONObject.toJavaObject(data, KuaishouStrategy.class);
|
|
|
kuaishouStrategyService.save(strategy);
|
|
|
+ strategyService.createCreativeByStrategy(strategy);
|
|
|
result.success("添加成功!");
|
|
|
} catch (Exception e) {
|
|
|
log.error(e.getMessage(), e);
|