فهرست منبع

Merge remote-tracking branch 'origin/master'

xuzuoyun 5 سال پیش
والد
کامیت
c711633fc2
100فایلهای تغییر یافته به همراه3170 افزوده شده و 1680 حذف شده
  1. 1 1
      .gitignore
  2. 96 0
      jeecg-boot-base-common/src/main/java/org/jeecg/common/util/LoadFileUtil.java
  3. 6 0
      jeecg-boot-module-system/pom.xml
  4. 3 13
      jeecg-boot-module-system/src/main/java/org/jeecg/JeecgApplication.java
  5. 1 1
      jeecg-boot-module-system/src/main/java/org/jeecg/config/ShiroConfig.java
  6. 0 6
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/AdCoverController.java
  7. 17 19
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/AuthTaskController.java
  8. 17 22
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceAdvertisePlanController.java
  9. 17 22
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceAdvertiserBudgetController.java
  10. 17 20
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceBudgetTemplateController.java
  11. 17 22
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceCampaignController.java
  12. 17 22
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceCampaignTemplateController.java
  13. 17 22
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceCreativeController.java
  14. 17 22
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceCreativeMaterialController.java
  15. 17 22
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceCreativeTemplateController.java
  16. 17 22
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceCustomAudienceController.java
  17. 17 22
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceImageInfoController.java
  18. 12 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceTemplateController.java
  19. 17 22
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceUserOrientationTemplateController.java
  20. 17 22
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceVideoInfoController.java
  21. 17 22
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/BytedanceAdvertisePlanTemplateController.java
  22. 17 22
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/BytedanceDeliveryTargetTemplateController.java
  23. 253 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/BytedanceNameModelRuleController.java
  24. 17 22
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/BytedanceUrlInfoController.java
  25. 17 19
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/CTopOauthTokenController.java
  26. 4 4
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/CallbackController.java
  27. 17 22
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/FileInfoController.java
  28. 11 5
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/GraphqlController.java
  29. 16 18
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/KuaishouAppAccountController.java
  30. 0 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ReportController.java
  31. 36 7
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/TestController.java
  32. 144 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/crawler/WxAccountCrawler.java
  33. 4 5
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/Advertiser.java
  34. 3 8
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/ByteDanceAdvertiser.java
  35. 0 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/ByteDanceAdvertiserBudget.java
  36. 2 6
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/ByteDanceBudgetTemplate.java
  37. 3 8
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/ByteDanceCampaign.java
  38. 2 6
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/ByteDanceCampaignTemplate.java
  39. 2 7
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/ByteDanceCreative.java
  40. 2 7
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/ByteDanceCreativeMaterial.java
  41. 2 6
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/ByteDanceCreativeTemplate.java
  42. 2 7
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/ByteDanceCustomAudience.java
  43. 2 7
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/ByteDanceImageInfo.java
  44. 2 6
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/ByteDanceUserOrientationTemplate.java
  45. 2 7
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/ByteDanceVideoInfo.java
  46. 2 6
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/BytedanceAdvertisePlanTemplate.java
  47. 3 6
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/BytedanceDeliveryTargetTemplate.java
  48. 66 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/BytedanceNameModelRule.java
  49. 2 6
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/BytedanceUrlInfo.java
  50. 2 6
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/FileInfo.java
  51. 1 4
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/mapper/AdvertiserMapper.java
  52. 1 4
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/mapper/BindAccountAuthMapper.java
  53. 1 4
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/mapper/ByteDanceAdvertisePlanMapper.java
  54. 1 4
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/mapper/BytedanceAdvertisePlanTemplateMapper.java
  55. 17 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/mapper/BytedanceNameModelRuleMapper.java
  56. 5 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/mapper/xml/BytedanceNameModelRuleMapper.xml
  57. 2 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/IByteDanceCampaignTemplateService.java
  58. 14 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/IBytedanceNameModelRuleService.java
  59. 0 11
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ByteDanceAdvertiserDataServiceImpl.java
  60. 2 9
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ByteDanceBudgetTemplateServiceImpl.java
  61. 23 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ByteDanceCampaignTemplateServiceImpl.java
  62. 1 4
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ByteDanceCreativeServiceImpl.java
  63. 1 6
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ByteDanceUserOrientationTemplateServiceImpl.java
  64. 1 4
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/BytedanceAdvertisePlanTemplateServiceImpl.java
  65. 1 16
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/BytedanceDeliveryTargetTemplateServiceImpl.java
  66. 19 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/BytedanceNameModelRuleServiceImpl.java
  67. 1 3
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/BytedanceUrlInfoServiceImpl.java
  68. 1 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/CTopOauthTokenServiceImpl.java
  69. 0 3
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/CreateInternalServiceImpl.java
  70. 2 7
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/FileInfoServiceImpl.java
  71. 0 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ReportServiceImpl.java
  72. 173 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/vue/BytedanceNameModelRuleList.vue
  73. 138 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/vue/modules/BytedanceNameModelRuleModal.vue
  74. 145 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/vue/modules/BytedanceNameModelRuleModal__Style#Drawer.vue
  75. 0 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/mock/MockController.java
  76. 0 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/fileupload/controller/UploadController.java
  77. 266 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouActionBarTextController.java
  78. 17 22
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouAppCreateController.java
  79. 17 19
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouAppInfoController.java
  80. 17 22
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouAppListController.java
  81. 17 19
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouCampaignController.java
  82. 17 22
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouCampaignCreateController.java
  83. 235 224
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouCampaignTemplateController.java
  84. 13 37
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouController.java
  85. 17 19
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouConversionInfosController.java
  86. 207 175
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouConversionTypesController.java
  87. 229 217
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouCreateAppTemplateController.java
  88. 78 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouCreateController.java
  89. 17 22
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouCreativeController.java
  90. 17 22
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouCreativeCreateController.java
  91. 17 22
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouGroupController.java
  92. 17 19
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouGroupCreateController.java
  93. 262 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouGroupCreateLogController.java
  94. 17 19
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouGroupCreateTargetController.java
  95. 83 81
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouGroupCreateTemplateController.java
  96. 17 22
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouImageGetController.java
  97. 17 22
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouImageUploandController.java
  98. 17 22
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouRegionListChildrenController.java
  99. 17 22
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouRegionListParentController.java
  100. 0 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouScheduleController.java

+ 1 - 1
.gitignore

@@ -32,4 +32,4 @@ gen
 # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
 hs_err_pid*
 **/target/
-#application-dev.yml
+application.yml

+ 96 - 0
jeecg-boot-base-common/src/main/java/org/jeecg/common/util/LoadFileUtil.java

@@ -0,0 +1,96 @@
+package org.jeecg.common.util;
+
+import org.jeecg.common.util.encryption.AesEncryptUtil;
+
+import java.io.*;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+public class LoadFileUtil {
+
+    public static void main(String[] args) {
+        try {
+            //  downLoadFromUrl("", "");
+
+            delFile("D:\\tets1\\app\\TEST视频-1565073368755.mp4");
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * 上传文件
+     *
+     * @param urlStr
+     * @param savePath
+     * @return
+     * @throws IOException
+     */
+    public static String downLoadFromUrl(String urlStr, String savePath) throws IOException {
+        String fileName = AesEncryptUtil.getURLDecoderString(urlStr.substring(urlStr.lastIndexOf("/") + 1));
+        URL url = new URL(urlStr);
+        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
+        //设置超时间为3秒
+        conn.setConnectTimeout(60 * 1000);
+        //防止屏蔽程序抓取而返回403错误
+        conn.setRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)");
+        //得到输入流
+        InputStream inputStream = conn.getInputStream();
+        //获取自己数组
+        byte[] getData = readInputStream(inputStream);
+
+        //文件保存位置
+        File saveDir = new File(savePath);
+        if (!saveDir.exists()) {
+            saveDir.mkdir();
+        }
+        String localPath = saveDir + File.separator + fileName;
+        File file = new File(localPath);
+        FileOutputStream fos = new FileOutputStream(file);
+        fos.write(getData);
+        if (fos != null) {
+            fos.close();
+        }
+        if (inputStream != null) {
+            inputStream.close();
+        }
+        return localPath;
+
+
+    }
+
+    public static byte[] readInputStream(InputStream inputStream) throws IOException {
+        byte[] buffer = new byte[1024];
+        int len = 0;
+        ByteArrayOutputStream bos = new ByteArrayOutputStream();
+        while ((len = inputStream.read(buffer)) != -1) {
+            bos.write(buffer, 0, len);
+        }
+        bos.close();
+        return bos.toByteArray();
+    }
+
+
+    /**
+     * 删除文件
+     *
+     * @param path
+     * @return
+     */
+    public static boolean delFile(String path) {
+        boolean flag = false;
+        File file = new File(path);
+        if (!file.exists()) {
+            return flag;
+        }
+        try {
+            flag = file.delete();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return flag;
+    }
+
+
+}

+ 6 - 0
jeecg-boot-module-system/pom.xml

@@ -58,6 +58,12 @@
             <artifactId>aliyun-sdk-oss</artifactId>
             <version>3.5.0</version>
         </dependency>
+
+        <dependency>
+            <groupId>cn.edu.hfut.dmic.webcollector</groupId>
+            <artifactId>WebCollector</artifactId>
+            <version>2.52</version>
+        </dependency>
     </dependencies>
 
     <build>

+ 3 - 13
jeecg-boot-module-system/src/main/java/org/jeecg/JeecgApplication.java

@@ -1,10 +1,11 @@
 package org.jeecg;
 
 import lombok.extern.slf4j.Slf4j;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.boot.web.servlet.MultipartConfigFactory;
 import org.springframework.context.ConfigurableApplicationContext;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.ComponentScan;
@@ -13,7 +14,6 @@ import org.springframework.core.env.Environment;
 import org.springframework.web.client.RestTemplate;
 import springfox.documentation.swagger2.annotations.EnableSwagger2;
 
-import javax.servlet.MultipartConfigElement;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
 
@@ -27,10 +27,8 @@ import java.net.UnknownHostException;
 
 
 public class JeecgApplication {
-
+    Logger logger = LoggerFactory.getLogger(JeecgApplication.class);
     public static void main(String[] args) throws UnknownHostException {
-        //System.setProperty("spring.devtools.restart.enabled", "true");
-
         ConfigurableApplicationContext application = SpringApplication.run(JeecgApplication.class, args);
         Environment env = application.getEnvironment();
         String ip = InetAddress.getLocalHost().getHostAddress();
@@ -49,14 +47,6 @@ public class JeecgApplication {
     }
 
     @Bean
-    public MultipartConfigElement multipartConfigElement() {
-        MultipartConfigFactory factory = new MultipartConfigFactory();
-        factory.setMaxFileSize("10240000KB");
-        factory.setMaxRequestSize("102400000KB");
-        return factory.createMultipartConfig();
-    }
-
-    @Bean
     public RestTemplate restTemplate() {
         return new RestTemplate();
     }

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/config/ShiroConfig.java

@@ -95,7 +95,7 @@ public class ShiroConfig {
         filterChainDefinitionMap.put("/toutiao/industry/list", "anon");
         filterChainDefinitionMap.put("/template/bytedance/industry/list", "anon");
         filterChainDefinitionMap.put("/template/convert/list", "anon");
-		//文件上传接口
+        //文件上传接口
 		filterChainDefinitionMap.put("/upload/**", "anon");
 
 

+ 0 - 6
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/AdCoverController.java

@@ -1,21 +1,15 @@
 package org.jeecg.modules.ctop.controller;
 
-import cn.com.ctop.common.utils.DateUtils;
 import cn.com.ctop.crawler.modules.account.entity.KuaishouAdAccount;
 import cn.com.ctop.crawler.modules.account.service.IKuaishouAdAccountService;
 import cn.com.ctop.kuaishou.modules.app.entity.AppAd;
 import cn.com.ctop.kuaishou.modules.app.entity.AppVideo;
 import cn.com.ctop.kuaishou.modules.app.service.IAppAdService;
 import cn.com.ctop.kuaishou.modules.app.service.IAppVideoService;
-import cn.com.ctop.kuaishou.modules.app.service.IKuaishouAppService;
-import cn.com.ctop.kuaishou.modules.graphql.entity.KuaishouVideo;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.google.gson.Gson;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.system.query.QueryGenerator;
-import org.jeecg.modules.system.entity.SysCategory;
 import org.jeecg.modules.system.service.ISysCategoryService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;

+ 17 - 19
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/AuthTaskController.java

@@ -1,39 +1,37 @@
 package org.jeecg.modules.ctop.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.ctop.entity.AuthTask;
 import org.jeecg.modules.ctop.service.IAuthTaskService;
-import java.util.Date;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
  /**
  * @Description: 关联用户分配

+ 17 - 22
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceAdvertisePlanController.java

@@ -1,42 +1,37 @@
 package org.jeecg.modules.ctop.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.ctop.entity.ByteDanceAdvertisePlan;
 import org.jeecg.modules.ctop.service.IByteDanceAdvertisePlanService;
-
-import java.util.Date;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 今日头条广告计划信息

+ 17 - 22
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceAdvertiserBudgetController.java

@@ -1,42 +1,37 @@
 package org.jeecg.modules.ctop.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.ctop.entity.ByteDanceAdvertiserBudget;
 import org.jeecg.modules.ctop.service.IByteDanceAdvertiserBudgetService;
-
-import java.util.Date;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 今日头条广告主预算信息

+ 17 - 20
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceBudgetTemplateController.java

@@ -1,42 +1,39 @@
 package org.jeecg.modules.ctop.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.ctop.entity.ByteDanceBudgetTemplate;
 import org.jeecg.modules.ctop.service.IByteDanceBudgetTemplateService;
-import java.util.Date;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
  /**
   * @Description: 今日头条预算模板信息

+ 17 - 22
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceCampaignController.java

@@ -1,42 +1,37 @@
 package org.jeecg.modules.ctop.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.ctop.entity.ByteDanceCampaign;
 import org.jeecg.modules.ctop.service.IByteDanceCampaignService;
-
-import java.util.Date;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 今日头条广告组信息

+ 17 - 22
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceCampaignTemplateController.java

@@ -1,44 +1,39 @@
 package org.jeecg.modules.ctop.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.ctop.entity.ByteDanceCampaignTemplate;
 import org.jeecg.modules.ctop.service.IByteDanceCampaignTemplateService;
-
-import java.util.Date;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 今日头条广告组模板信息

+ 17 - 22
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceCreativeController.java

@@ -1,42 +1,37 @@
 package org.jeecg.modules.ctop.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.ctop.entity.ByteDanceCreative;
 import org.jeecg.modules.ctop.service.IByteDanceCreativeService;
-
-import java.util.Date;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 今日头条创意信息

+ 17 - 22
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceCreativeMaterialController.java

@@ -1,42 +1,37 @@
 package org.jeecg.modules.ctop.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.ctop.entity.ByteDanceCreativeMaterial;
 import org.jeecg.modules.ctop.service.IByteDanceCreativeMaterialService;
-
-import java.util.Date;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 今日头条创意素材信息

+ 17 - 22
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceCreativeTemplateController.java

@@ -1,42 +1,37 @@
 package org.jeecg.modules.ctop.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.ctop.entity.ByteDanceCreativeTemplate;
 import org.jeecg.modules.ctop.service.IByteDanceCreativeTemplateService;
-
-import java.util.Date;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 广告创意模板

+ 17 - 22
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceCustomAudienceController.java

@@ -1,42 +1,37 @@
 package org.jeecg.modules.ctop.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.ctop.entity.ByteDanceCustomAudience;
 import org.jeecg.modules.ctop.service.IByteDanceCustomAudienceService;
-
-import java.util.Date;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 人群包信息

+ 17 - 22
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceImageInfoController.java

@@ -1,42 +1,37 @@
 package org.jeecg.modules.ctop.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.ctop.entity.ByteDanceImageInfo;
 import org.jeecg.modules.ctop.service.IByteDanceImageInfoService;
-
-import java.util.Date;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 头条图片素材信息

+ 12 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceTemplateController.java

@@ -36,6 +36,18 @@ public class ByteDanceTemplateController {
     }
 
     /**
+     * 只能封面
+     *
+     * @param accountId
+     * @param videoId
+     * @return
+     */
+    @GetMapping("cover/suggest")
+    public Map<String, Object> suggestCover(String accountId, String videoId) {
+        return campaignTemplateService.getSuggestCover(accountId, videoId);
+    }
+
+    /**
      * 预算与出价模板
      *
      * @param template

+ 17 - 22
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceUserOrientationTemplateController.java

@@ -1,42 +1,37 @@
 package org.jeecg.modules.ctop.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.ctop.entity.ByteDanceUserOrientationTemplate;
 import org.jeecg.modules.ctop.service.IByteDanceUserOrientationTemplateService;
-
-import java.util.Date;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 今日头条受众模板信息

+ 17 - 22
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ByteDanceVideoInfoController.java

@@ -1,42 +1,37 @@
 package org.jeecg.modules.ctop.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.ctop.entity.ByteDanceVideoInfo;
 import org.jeecg.modules.ctop.service.IByteDanceVideoInfoService;
-
-import java.util.Date;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 今日头条视频素材信息

+ 17 - 22
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/BytedanceAdvertisePlanTemplateController.java

@@ -1,42 +1,37 @@
 package org.jeecg.modules.ctop.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.ctop.entity.BytedanceAdvertisePlanTemplate;
 import org.jeecg.modules.ctop.service.IBytedanceAdvertisePlanTemplateService;
-
-import java.util.Date;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 广告计划模板信息

+ 17 - 22
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/BytedanceDeliveryTargetTemplateController.java

@@ -1,44 +1,39 @@
 package org.jeecg.modules.ctop.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.ctop.entity.BytedanceDeliveryTargetTemplate;
 import org.jeecg.modules.ctop.service.IBytedanceDeliveryTargetTemplateService;
-
-import java.util.Date;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 投放目标模板信息

+ 253 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/BytedanceNameModelRuleController.java

@@ -0,0 +1,253 @@
+package org.jeecg.modules.ctop.controller;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.ctop.entity.BytedanceNameModelRule;
+import org.jeecg.modules.ctop.service.IBytedanceNameModelRuleService;
+
+import java.util.Date;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.extern.slf4j.Slf4j;
+
+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.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import org.springframework.web.servlet.ModelAndView;
+import com.alibaba.fastjson.JSON;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+/**
+ * @Description: 名称生成规则模板信息
+ * @Author: jeecg-boot
+ * @Date: 2019-08-15
+ * @Version: V1.0
+ */
+@Slf4j
+@Api(tags = "名称生成规则模板信息")
+@RestController
+@RequestMapping("/ctop/bytedanceNameModelRule")
+public class BytedanceNameModelRuleController {
+    @Autowired
+    private IBytedanceNameModelRuleService bytedanceNameModelRuleService;
+
+    /**
+     * 分页列表查询
+     *
+     * @param bytedanceNameModelRule
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    @AutoLog(value = "名称生成规则模板信息-分页列表查询")
+    @ApiOperation(value = "名称生成规则模板信息-分页列表查询", notes = "名称生成规则模板信息-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<IPage<BytedanceNameModelRule>> queryPageList(BytedanceNameModelRule bytedanceNameModelRule,
+                                                               @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                               @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                               HttpServletRequest req) {
+        Result<IPage<BytedanceNameModelRule>> result = new Result<IPage<BytedanceNameModelRule>>();
+        QueryWrapper<BytedanceNameModelRule> queryWrapper = QueryGenerator.initQueryWrapper(bytedanceNameModelRule, req.getParameterMap());
+        Page<BytedanceNameModelRule> page = new Page<BytedanceNameModelRule>(pageNo, pageSize);
+        IPage<BytedanceNameModelRule> pageList = bytedanceNameModelRuleService.page(page, queryWrapper);
+        result.setSuccess(true);
+        result.setResult(pageList);
+        return result;
+    }
+
+    /**
+     * 添加
+     *
+     * @param bytedanceNameModelRule
+     * @return
+     */
+    @AutoLog(value = "名称生成规则模板信息-添加")
+    @ApiOperation(value = "名称生成规则模板信息-添加", notes = "名称生成规则模板信息-添加")
+    @PostMapping(value = "/add")
+    public Result<BytedanceNameModelRule> add(@RequestBody BytedanceNameModelRule bytedanceNameModelRule) {
+        Result<BytedanceNameModelRule> result = new Result<BytedanceNameModelRule>();
+        try {
+            bytedanceNameModelRuleService.save(bytedanceNameModelRule);
+            result.success("添加成功!");
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            result.error500("操作失败");
+        }
+        return result;
+    }
+
+    /**
+     * 编辑
+     *
+     * @param bytedanceNameModelRule
+     * @return
+     */
+    @AutoLog(value = "名称生成规则模板信息-编辑")
+    @ApiOperation(value = "名称生成规则模板信息-编辑", notes = "名称生成规则模板信息-编辑")
+    @PutMapping(value = "/edit")
+    public Result<BytedanceNameModelRule> edit(@RequestBody BytedanceNameModelRule bytedanceNameModelRule) {
+        Result<BytedanceNameModelRule> result = new Result<BytedanceNameModelRule>();
+        BytedanceNameModelRule bytedanceNameModelRuleEntity = bytedanceNameModelRuleService.getById(bytedanceNameModelRule.getId());
+        if (bytedanceNameModelRuleEntity == null) {
+            result.error500("未找到对应实体");
+        } else {
+            boolean ok = bytedanceNameModelRuleService.updateById(bytedanceNameModelRule);
+            //TODO 返回false说明什么?
+            if (ok) {
+                result.success("修改成功!");
+            }
+        }
+
+        return result;
+    }
+
+    /**
+     * 通过id删除
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "名称生成规则模板信息-通过id删除")
+    @ApiOperation(value = "名称生成规则模板信息-通过id删除", notes = "名称生成规则模板信息-通过id删除")
+    @DeleteMapping(value = "/delete")
+    public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
+        try {
+            bytedanceNameModelRuleService.removeById(id);
+        } catch (Exception e) {
+            log.error("删除失败", e.getMessage());
+            return Result.error("删除失败!");
+        }
+        return Result.ok("删除成功!");
+    }
+
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
+    @AutoLog(value = "名称生成规则模板信息-批量删除")
+    @ApiOperation(value = "名称生成规则模板信息-批量删除", notes = "名称生成规则模板信息-批量删除")
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<BytedanceNameModelRule> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        Result<BytedanceNameModelRule> result = new Result<BytedanceNameModelRule>();
+        if (ids == null || "".equals(ids.trim())) {
+            result.error500("参数不识别!");
+        } else {
+            this.bytedanceNameModelRuleService.removeByIds(Arrays.asList(ids.split(",")));
+            result.success("删除成功!");
+        }
+        return result;
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "名称生成规则模板信息-通过id查询")
+    @ApiOperation(value = "名称生成规则模板信息-通过id查询", notes = "名称生成规则模板信息-通过id查询")
+    @GetMapping(value = "/queryById")
+    public Result<BytedanceNameModelRule> queryById(@RequestParam(name = "id", required = true) String id) {
+        Result<BytedanceNameModelRule> result = new Result<BytedanceNameModelRule>();
+        BytedanceNameModelRule bytedanceNameModelRule = bytedanceNameModelRuleService.getById(id);
+        if (bytedanceNameModelRule == null) {
+            result.error500("未找到对应实体");
+        } else {
+            result.setResult(bytedanceNameModelRule);
+            result.setSuccess(true);
+        }
+        return result;
+    }
+
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param response
+     */
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
+        // Step.1 组装查询条件
+        QueryWrapper<BytedanceNameModelRule> queryWrapper = null;
+        try {
+            String paramsStr = request.getParameter("paramsStr");
+            if (oConvertUtils.isNotEmpty(paramsStr)) {
+                String deString = URLDecoder.decode(paramsStr, "UTF-8");
+                BytedanceNameModelRule bytedanceNameModelRule = JSON.parseObject(deString, BytedanceNameModelRule.class);
+                queryWrapper = QueryGenerator.initQueryWrapper(bytedanceNameModelRule, request.getParameterMap());
+            }
+        } catch (UnsupportedEncodingException e) {
+            e.printStackTrace();
+        }
+
+        //Step.2 AutoPoi 导出Excel
+        ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+        List<BytedanceNameModelRule> pageList = bytedanceNameModelRuleService.list(queryWrapper);
+        //导出文件名称
+        mv.addObject(NormalExcelConstants.FILE_NAME, "名称生成规则模板信息列表");
+        mv.addObject(NormalExcelConstants.CLASS, BytedanceNameModelRule.class);
+        mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("名称生成规则模板信息列表数据", "导出人:Jeecg", "导出信息"));
+        mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
+        return mv;
+    }
+
+    /**
+     * 通过excel导入数据
+     *
+     * @param request
+     * @param response
+     * @return
+     */
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
+        Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
+        for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
+            MultipartFile file = entity.getValue();// 获取上传文件对象
+            ImportParams params = new ImportParams();
+            params.setTitleRows(2);
+            params.setHeadRows(1);
+            params.setNeedSave(true);
+            try {
+                List<BytedanceNameModelRule> listBytedanceNameModelRules = ExcelImportUtil.importExcel(file.getInputStream(), BytedanceNameModelRule.class, params);
+                bytedanceNameModelRuleService.saveBatch(listBytedanceNameModelRules);
+                return Result.ok("文件导入成功!数据行数:" + listBytedanceNameModelRules.size());
+            } catch (Exception e) {
+                log.error(e.getMessage(), e);
+                return Result.error("文件导入失败:" + e.getMessage());
+            } finally {
+                try {
+                    file.getInputStream().close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        return Result.ok("文件导入失败!");
+    }
+
+}

+ 17 - 22
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/BytedanceUrlInfoController.java

@@ -1,44 +1,39 @@
 package org.jeecg.modules.ctop.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.ctop.entity.BytedanceUrlInfo;
 import org.jeecg.modules.ctop.service.IBytedanceUrlInfoService;
-
-import java.util.Date;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 今日头条链接信息

+ 17 - 19
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/CTopOauthTokenController.java

@@ -1,39 +1,37 @@
 package org.jeecg.modules.ctop.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.ctop.entity.CTopOauthToken;
 import org.jeecg.modules.ctop.service.ICTopOauthTokenService;
-import java.util.Date;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
  /**
  * @Description: oauth授权码

+ 4 - 4
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/CallbackController.java

@@ -116,12 +116,12 @@ public class CallbackController {
                     cTopOauthTokenMapper.insert(topOauthToken);
                     bindAccountAuthService.addBindAccount(accountId, KuaishouInterfaceConstant.LOGIN_TYPE_KUAISHOU, advertiser_id); //账号绑定
                 }
-                return "auth_success";
+                return "授权绑定成功";
             }
         } catch (Exception e) {
             e.printStackTrace();
         }
-        return "auth_fail";
+        return "授权绑定失败!";
     }
 
 
@@ -136,10 +136,10 @@ public class CallbackController {
             Map<String, Object> map = this.getByteDanceAccessToken(authCode, state);
             Integer code = (Integer) map.get("code");
             if (code == 0) {
-                return "auth_success";
+                return "授权绑定成功";
             }
         }
-        return "auth_fail";
+        return "授权绑定失败";
     }
 
     @Autowired

+ 17 - 22
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/FileInfoController.java

@@ -1,42 +1,37 @@
 package org.jeecg.modules.ctop.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.ctop.entity.FileInfo;
 import org.jeecg.modules.ctop.service.IFileInfoService;
-
-import java.util.Date;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 文件信息

+ 11 - 5
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/GraphqlController.java

@@ -4,18 +4,16 @@ import cn.com.ctop.kuaishou.modules.graphql.entity.KuaishouVideo;
 import cn.com.ctop.kuaishou.modules.graphql.service.IKuaishouVideoService;
 import cn.com.ctop.kuaishou.modules.graphql.service.IKuaishouWebInterfaceService;
 import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.google.gson.JsonObject;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.system.query.QueryGenerator;
-import org.jeecg.modules.system.entity.SysRole;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.*;
 
+import java.io.IOException;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -28,7 +26,11 @@ public class GraphqlController {
     private IKuaishouVideoService kuaishouVideoService;
     @RequestMapping("/video")
     public void getVideoList(@RequestParam("uid") String uid){
-        kuaishouWebInterfaceService.getVideoList(uid);
+        try {
+            kuaishouWebInterfaceService.getVideoList(uid);
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
     }
     @ResponseBody
     @RequestMapping(value="/addkuaishouuser", method = RequestMethod.POST)
@@ -44,7 +46,11 @@ public class GraphqlController {
             Thread thread = new Thread(){
                 @Override
                 public void run() {
-                    kuaishouWebInterfaceService.getVideoList(uid);
+                    try {
+                        kuaishouWebInterfaceService.getVideoList(uid);
+                    } catch (IOException e) {
+                        e.printStackTrace();
+                    }
                 }
             };
             thread.start();

+ 16 - 18
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/KuaishouAppAccountController.java

@@ -1,39 +1,37 @@
 package org.jeecg.modules.ctop.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
-import org.jeecg.common.aspect.annotation.AutoLog;
-import org.jeecg.common.util.oConvertUtils;
 import cn.com.ctop.crawler.modules.account.entity.KuaishouAppAccount;
 import cn.com.ctop.crawler.modules.account.service.IKuaishouAppAccountService;
-import java.util.Date;
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 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.jeecg.common.api.vo.Result;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.util.oConvertUtils;
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
  /**
  * @Description: 快手APP账号表

+ 0 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/ReportController.java

@@ -3,7 +3,6 @@ package org.jeecg.modules.ctop.controller;
 import com.alibaba.fastjson.JSONObject;
 import org.jeecg.modules.ctop.service.IReportService;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;

+ 36 - 7
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/TestController.java

@@ -1,16 +1,21 @@
 package org.jeecg.modules.ctop.controller;
 
 import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import org.jeecg.common.api.vo.Result;
-import org.jeecg.modules.ctop.entity.BindAccountAuth;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.Row;
+import org.apache.poi.xssf.usermodel.XSSFCell;
+import org.apache.poi.xssf.usermodel.XSSFSheet;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.jeecg.modules.ctop.service.ICreateInternalService;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import retrofit2.http.POST;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
 
-import java.util.HashMap;
-import java.util.Map;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.InputStream;
 
 @RestController
 @RequestMapping("/test")
@@ -24,4 +29,28 @@ public class TestController {
         System.err.println(json);
         createInternalService.createInternal(json);
     }
+
+    public static void main(String[] args) throws Exception {
+        File f = new File("D:\\upload\\excel\\template.xlsx");
+        InputStream inputStream = new FileInputStream(f);
+        XSSFWorkbook xssfWorkbook = new XSSFWorkbook(inputStream);
+//        //获取第一个sheet
+        XSSFSheet xssfSheet = xssfWorkbook.getSheetAt(0);
+        for (int i = 1; i < 6; i++) {
+            System.out.println("i:" + i);
+            Row row = xssfSheet.getRow(i);
+            for (int j = 1; j < 4; j++) {
+                Cell cell = row.createCell(j);
+                if (j == 3) {
+                    cell.setCellType(XSSFCell.CELL_TYPE_FORMULA);
+                    cell.setCellFormula("B2*C2");
+                } else {
+                    cell.setCellValue(i);
+                }
+            }
+        }
+        FileOutputStream fileOutputStream = new FileOutputStream("D:\\upload\\excel\\get.xlsx");
+        xssfWorkbook.write(fileOutputStream);
+        fileOutputStream.close();
+    }
 }

+ 144 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/crawler/WxAccountCrawler.java

@@ -0,0 +1,144 @@
+//package org.jeecg.modules.ctop.crawler;
+//
+//import cn.edu.hfut.dmic.webcollector.model.CrawlDatum;
+//import cn.edu.hfut.dmic.webcollector.model.CrawlDatums;
+//import cn.edu.hfut.dmic.webcollector.model.Page;
+//import cn.edu.hfut.dmic.webcollector.plugin.berkeley.BreadthCrawler;
+//
+//import cn.edu.hfut.dmic.webcollector.plugin.nextfilter.HashSetNextFilter;
+//import com.alibaba.fastjson.JSONArray;
+//import com.alibaba.fastjson.JSONObject;
+//import org.jsoup.nodes.Element;
+//import org.slf4j.Logger;
+//import org.slf4j.LoggerFactory;
+//
+//import java.io.*;
+//import java.net.URLEncoder;
+//
+//public class WxAccountCrawler extends BreadthCrawler {
+//    public static final Logger LOG = LoggerFactory.getLogger(WxAccountCrawler.class);
+//
+//    protected String historyKeysPath;
+//    protected BufferedWriter historyKeysWriter;
+//
+//    public WxAccountCrawler(String crawlPath, String historyKeysPath) throws Exception {
+//        super(crawlPath, false);
+//        this.historyKeysPath = historyKeysPath;
+//        LOG.info("initializing history-keys-filter ......");
+//        this.setNextFilter(new HistoryKeysFilter(historyKeysPath));
+//        LOG.info("creating history-keys-writer");
+//        historyKeysWriter = new BufferedWriter(new OutputStreamWriter(
+//                new FileOutputStream(historyKeysPath, true), "utf-8"));
+//
+//    }
+//
+//    @Override
+//    public void visit(Page page, CrawlDatums next) {
+//        String account = page.meta("account");
+//
+//        if (page.matchType("account_search")) {
+//            //对于账号搜索页面
+//
+//            //抽取公众号文章列表页URL
+//            Element accountLinkEle = page.select("p.tit>a").first();
+//            //防止搜索结果为空
+//            if (accountLinkEle == null) {
+//                LOG.info("公众号\"" + account + "\"不存在,请给出准确的公众号名");
+//                return;
+//            }
+//            //防止公众号名错误
+//            String detectedAccount = accountLinkEle.text().trim();
+//            if (!account.equals(detectedAccount)) {
+//                LOG.info("公众号\"" + account + "\"与搜索结果\"" + detectedAccount + "\"名称不符,请给出准确的公众号名");
+//                return;
+//            }
+//            String accountUrl = accountLinkEle.attr("abs:href");
+//            next.add(new CrawlDatum(accountUrl, "article_list").meta("account", account));
+//
+//        } else if (page.matchType("article_list")) {
+//            //对于公众号文章列表页
+//
+//            String prefix = "msgList = ";
+//            String suffix = "seajs.use";
+//            int startIndex = page.html().indexOf(prefix) + prefix.length();
+//            int endIndex = page.html().indexOf(suffix);
+//            String jsonStr = page.html().substring(startIndex, endIndex);
+//            JSONObject json = JSONObject.parseObject(jsonStr);
+//            JSONArray articleJSONArray = json.getJSONArray("list");
+//            for (int i = 0; i < articleJSONArray.size(); i++) {
+//                JSONObject articleJSON = articleJSONArray.getJSONObject(i).getJSONObject("app_msg_ext_info");
+//                String title = articleJSON.getString("title").trim();
+//                String key = account + "_" + title;
+//                String articleUrl = "http://mp.weixin.qq.com" + articleJSON.getString("content_url").replace("&", "&");
+//                next.add(new CrawlDatum(articleUrl, "article").key(key).meta("account", account));
+//            }
+//
+//        } else if (page.matchType("article")) {
+//            //对于文章页
+//            //抽取标题、内容等信息,此处仅print少数信息作为参考
+//            String title = page.select("h2.rich_media_title").first().text().trim();
+//            String date = page.select("em#post-date").first().text().trim();
+//            String content = page.select("div.rich_media_content").first().text().trim();
+//
+//            try {
+//                writeHistoryKey(page.key());
+//                JSONObject articleJSON = new JSONObject();
+//                articleJSON.put("account", account);
+//                articleJSON.put("title", title);
+//                articleJSON.put("date", date);
+//                articleJSON.put("content", content);
+//                System.out.println(articleJSON);
+//            } catch (IOException ex) {
+//                LOG.info("writer exception", ex);
+//            }
+//
+//        }
+//    }
+//
+//    public synchronized void writeHistoryKey(String key) throws IOException {
+//        historyKeysWriter.write(key + "\n");
+//    }
+//
+//    @Override
+//    public void start(int depth) throws Exception {
+//        super.start(depth);
+//        //关闭文件,保存history keys
+//        historyKeysWriter.close();
+//        LOG.info("save history keys");
+//    }
+//
+//    public void addAccount(String account) throws UnsupportedEncodingException {
+//        String seedUrl = "http://weixin.sogou.com/weixin?type=1&"
+//                + "s_from=input&ie=utf8&query=" + URLEncoder.encode(account, "utf-8");
+//        CrawlDatum seed = new CrawlDatum(seedUrl, "account_search").meta("account", account);
+//        addSeed(seed);
+//    }
+//
+//    //该示例读取文件中的key进行文章去重
+//    //线上应用请老老实实用数据库
+//    public class HistoryKeysFilter extends HashSetNextFilter {
+//
+//        //读取历史文章标题,用于去重
+//        public HistoryKeysFilter(String historyKeysPath) throws Exception {
+//            File historyFile = new File(historyKeysPath);
+//            if (historyFile.exists()) {
+//                FileInputStream fis = new FileInputStream(historyKeysPath);
+//                BufferedReader reader = new BufferedReader(new InputStreamReader(fis, "utf-8"));
+//                String line;
+//                while ((line = reader.readLine()) != null) {
+//                    this.add(line);
+//                }
+//                reader.close();
+//            }
+//        }
+//    }
+//
+//    public static void main(String[] args) throws Exception {
+//        WxAccountCrawler crawler = new WxAccountCrawler("crawl_weixin", "wx_history.txt");
+//        crawler.addAccount("机器之心");
+//        crawler.addAccount("ZEALER订阅号");
+//        crawler.setThreads(5);
+//        crawler.start(10);
+//    }
+//
+//}

+ 4 - 5
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/Advertiser.java

@@ -1,19 +1,18 @@
 package org.jeecg.modules.ctop.entity;
 
-import java.io.Serializable;
-import java.util.Date;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.annotation.TableField;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import org.springframework.format.annotation.DateTimeFormat;
 import org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
 
 /**
  * @Description: 广告主信息表

+ 3 - 8
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/ByteDanceAdvertiser.java

@@ -1,23 +1,18 @@
 package org.jeecg.modules.ctop.entity;
 
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.Date;
-
 import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.annotation.TableField;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import org.springframework.format.annotation.DateTimeFormat;
 import org.jeecgframework.poi.excel.annotation.Excel;
 
+import java.math.BigDecimal;
+import java.util.Date;
+
 /**
  * @Description: 今日头条广告主信息
  * @Author: jeecg-boot

+ 0 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/ByteDanceAdvertiserBudget.java

@@ -1,7 +1,6 @@
 package org.jeecg.modules.ctop.entity;
 
 import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import io.swagger.annotations.ApiModel;

+ 2 - 6
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/ByteDanceBudgetTemplate.java

@@ -1,21 +1,17 @@
 package org.jeecg.modules.ctop.entity;
 
-import java.io.Serializable;
-import java.util.Date;
-
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.annotation.TableField;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import org.springframework.format.annotation.DateTimeFormat;
 import org.jeecgframework.poi.excel.annotation.Excel;
 
+import java.util.Date;
+
 /**
  * @Description: 今日头条预算模板信息
  * @Author: jeecg-boot

+ 3 - 8
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/ByteDanceCampaign.java

@@ -1,23 +1,18 @@
 package org.jeecg.modules.ctop.entity;
 
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.Date;
-
 import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.annotation.TableField;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import org.springframework.format.annotation.DateTimeFormat;
 import org.jeecgframework.poi.excel.annotation.Excel;
 
+import java.math.BigDecimal;
+import java.util.Date;
+
 /**
  * @Description: 今日头条广告组信息
  * @Author: jeecg-boot

+ 2 - 6
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/ByteDanceCampaignTemplate.java

@@ -1,22 +1,18 @@
 package org.jeecg.modules.ctop.entity;
 
-import java.io.Serializable;
-import java.util.Date;
-
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.annotation.TableField;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
-import com.fasterxml.jackson.annotation.JsonFormat;
 import org.jeecg.common.aspect.annotation.Dict;
-import org.springframework.format.annotation.DateTimeFormat;
 import org.jeecgframework.poi.excel.annotation.Excel;
 
+import java.util.Date;
+
 /**
  * @Description: 今日头条广告组模板信息
  * @Author: jeecg-boot

+ 2 - 7
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/ByteDanceCreative.java

@@ -1,22 +1,17 @@
 package org.jeecg.modules.ctop.entity;
 
-import java.io.Serializable;
-import java.util.Date;
-
 import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.annotation.TableField;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import org.springframework.format.annotation.DateTimeFormat;
 import org.jeecgframework.poi.excel.annotation.Excel;
 
+import java.util.Date;
+
 /**
  * @Description: 今日头条创意信息
  * @Author: jeecg-boot

+ 2 - 7
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/ByteDanceCreativeMaterial.java

@@ -1,22 +1,17 @@
 package org.jeecg.modules.ctop.entity;
 
-import java.io.Serializable;
-import java.util.Date;
-
 import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.annotation.TableField;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import org.springframework.format.annotation.DateTimeFormat;
 import org.jeecgframework.poi.excel.annotation.Excel;
 
+import java.util.Date;
+
 /**
  * @Description: 今日头条创意素材信息
  * @Author: jeecg-boot

+ 2 - 6
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/ByteDanceCreativeTemplate.java

@@ -1,21 +1,17 @@
 package org.jeecg.modules.ctop.entity;
 
-import java.io.Serializable;
-import java.util.Date;
-
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.annotation.TableField;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import org.springframework.format.annotation.DateTimeFormat;
 import org.jeecgframework.poi.excel.annotation.Excel;
 
+import java.util.Date;
+
 /**
  * @Description: 广告创意模板
  * @Author: jeecg-boot

+ 2 - 7
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/ByteDanceCustomAudience.java

@@ -1,22 +1,17 @@
 package org.jeecg.modules.ctop.entity;
 
-import java.io.Serializable;
-import java.util.Date;
-
 import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.annotation.TableField;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import org.springframework.format.annotation.DateTimeFormat;
 import org.jeecgframework.poi.excel.annotation.Excel;
 
+import java.util.Date;
+
 /**
  * @Description: 人群包信息
  * @Author: jeecg-boot

+ 2 - 7
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/ByteDanceImageInfo.java

@@ -1,22 +1,17 @@
 package org.jeecg.modules.ctop.entity;
 
-import java.io.Serializable;
-import java.util.Date;
-
 import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.annotation.TableField;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import org.springframework.format.annotation.DateTimeFormat;
 import org.jeecgframework.poi.excel.annotation.Excel;
 
+import java.util.Date;
+
 /**
  * @Description: 头条图片素材信息
  * @Author: jeecg-boot

+ 2 - 6
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/ByteDanceUserOrientationTemplate.java

@@ -1,21 +1,17 @@
 package org.jeecg.modules.ctop.entity;
 
-import java.io.Serializable;
-import java.util.Date;
-
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.annotation.TableField;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import org.springframework.format.annotation.DateTimeFormat;
 import org.jeecgframework.poi.excel.annotation.Excel;
 
+import java.util.Date;
+
 /**
  * @Description: 今日头条受众模板信息
  * @Author: jeecg-boot

+ 2 - 7
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/ByteDanceVideoInfo.java

@@ -1,22 +1,17 @@
 package org.jeecg.modules.ctop.entity;
 
-import java.io.Serializable;
-import java.util.Date;
-
 import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.annotation.TableField;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import org.springframework.format.annotation.DateTimeFormat;
 import org.jeecgframework.poi.excel.annotation.Excel;
 
+import java.util.Date;
+
 /**
  * @Description: 今日头条视频素材信息
  * @Author: jeecg-boot

+ 2 - 6
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/BytedanceAdvertisePlanTemplate.java

@@ -1,22 +1,18 @@
 package org.jeecg.modules.ctop.entity;
 
-import java.io.Serializable;
-import java.util.Date;
-
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.annotation.TableField;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
-import com.fasterxml.jackson.annotation.JsonFormat;
 import org.jeecg.common.aspect.annotation.Dict;
-import org.springframework.format.annotation.DateTimeFormat;
 import org.jeecgframework.poi.excel.annotation.Excel;
 
+import java.util.Date;
+
 /**
  * @Description: 广告计划模板信息
  * @Author: jeecg-boot

+ 3 - 6
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/BytedanceDeliveryTargetTemplate.java

@@ -1,22 +1,19 @@
 package org.jeecg.modules.ctop.entity;
 
-import java.io.Serializable;
-import java.util.Date;
-
 import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.annotation.TableField;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
-import com.fasterxml.jackson.annotation.JsonFormat;
 import org.jeecg.common.aspect.annotation.Dict;
-import org.springframework.format.annotation.DateTimeFormat;
 import org.jeecgframework.poi.excel.annotation.Excel;
 
+import java.util.Date;
+
 /**
  * @Description: 投放目标模板信息
  * @Author: jeecg-boot

+ 66 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/BytedanceNameModelRule.java

@@ -0,0 +1,66 @@
+package org.jeecg.modules.ctop.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableField;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+
+/**
+ * @Description: 名称生成规则模板信息
+ * @Author: jeecg-boot
+ * @Date: 2019-08-15
+ * @Version: V1.0
+ */
+@Data
+@TableName("ctop_bytedance_advertise_name_model_rule_info")
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value = "ctop_bytedance_advertise_name_model_rule_info对象", description = "名称生成规则模板信息")
+public class BytedanceNameModelRule {
+
+    /**
+     * id
+     */
+    @TableId(type = IdType.AUTO)
+    @ApiModelProperty(value = "id")
+    private Long id;
+    /**
+     * 模板名称
+     */
+    @Excel(name = "模板名称", width = 15)
+    @ApiModelProperty(value = "模板名称")
+    private String name;
+    /**
+     * 生成规格
+     */
+    @Excel(name = "生成规格", width = 15)
+    @ApiModelProperty(value = "生成规格")
+    private String rule;
+    /**
+     * 模板状态信息
+     */
+    @Excel(name = "模板状态信息", width = 15)
+    @ApiModelProperty(value = "模板状态信息")
+    private Integer status;
+    /**
+     * createTime
+     */
+    @ApiModelProperty(value = "createTime")
+    private Date createTime;
+    /**
+     * updateTime
+     */
+    @ApiModelProperty(value = "updateTime")
+    private Date updateTime;
+}

+ 2 - 6
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/BytedanceUrlInfo.java

@@ -1,21 +1,17 @@
 package org.jeecg.modules.ctop.entity;
 
-import java.io.Serializable;
-import java.util.Date;
-
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.annotation.TableField;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import org.springframework.format.annotation.DateTimeFormat;
 import org.jeecgframework.poi.excel.annotation.Excel;
 
+import java.util.Date;
+
 /**
  * @Description: 今日头条链接信息
  * @Author: jeecg-boot

+ 2 - 6
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/FileInfo.java

@@ -1,22 +1,18 @@
 package org.jeecg.modules.ctop.entity;
 
-import java.io.Serializable;
-import java.util.Date;
-
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
-import com.baomidou.mybatisplus.annotation.TableField;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import org.springframework.format.annotation.DateTimeFormat;
 import org.jeecgframework.poi.excel.annotation.Excel;
 
+import java.util.Date;
+
 /**
  * @Description: 文件信息
  * @Author: jeecg-boot

+ 1 - 4
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/mapper/AdvertiserMapper.java

@@ -1,10 +1,7 @@
 package org.jeecg.modules.ctop.mapper;
 
-import java.util.List;
-
-import org.apache.ibatis.annotations.Param;
-import org.jeecg.modules.ctop.entity.Advertiser;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.jeecg.modules.ctop.entity.Advertiser;
 
 /**
  * @Description: 广告主信息表

+ 1 - 4
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/mapper/BindAccountAuthMapper.java

@@ -1,10 +1,7 @@
 package org.jeecg.modules.ctop.mapper;
 
-import java.util.List;
-
-import org.apache.ibatis.annotations.Param;
-import org.jeecg.modules.ctop.entity.BindAccountAuth;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.jeecg.modules.ctop.entity.BindAccountAuth;
 
 /**
  * @Description: 账号绑定-授权

+ 1 - 4
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/mapper/ByteDanceAdvertisePlanMapper.java

@@ -1,10 +1,7 @@
 package org.jeecg.modules.ctop.mapper;
 
-import java.util.List;
-
-import org.apache.ibatis.annotations.Param;
-import org.jeecg.modules.ctop.entity.ByteDanceAdvertisePlan;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.jeecg.modules.ctop.entity.ByteDanceAdvertisePlan;
 
 /**
  * @Description: 今日头条广告计划信息

+ 1 - 4
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/mapper/BytedanceAdvertisePlanTemplateMapper.java

@@ -1,10 +1,7 @@
 package org.jeecg.modules.ctop.mapper;
 
-import java.util.List;
-
-import org.apache.ibatis.annotations.Param;
-import org.jeecg.modules.ctop.entity.BytedanceAdvertisePlanTemplate;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.jeecg.modules.ctop.entity.BytedanceAdvertisePlanTemplate;
 
 /**
  * @Description: 广告计划模板信息

+ 17 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/mapper/BytedanceNameModelRuleMapper.java

@@ -0,0 +1,17 @@
+package org.jeecg.modules.ctop.mapper;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.ctop.entity.BytedanceNameModelRule;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * @Description: 名称生成规则模板信息
+ * @Author: jeecg-boot
+ * @Date: 2019-08-15
+ * @Version: V1.0
+ */
+public interface BytedanceNameModelRuleMapper extends BaseMapper<BytedanceNameModelRule> {
+
+}

+ 5 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/mapper/xml/BytedanceNameModelRuleMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.jeecg.modules.ctop.mapper.BytedanceNameModelRuleMapper">
+
+</mapper>

+ 2 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/IByteDanceCampaignTemplateService.java

@@ -26,4 +26,6 @@ public interface IByteDanceCampaignTemplateService extends IService<ByteDanceCam
     Map<String, Object> campaignCreate(String getAccountId, Long campaignId, String getName);
 
     Map<String, Object> campaignCreate(String accountId, String campaignName, String budgetMode, Integer budget, String landingType);
+
+    Map<String, Object> getSuggestCover(String accountId, String videoId);
 }

+ 14 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/IBytedanceNameModelRuleService.java

@@ -0,0 +1,14 @@
+package org.jeecg.modules.ctop.service;
+
+import org.jeecg.modules.ctop.entity.BytedanceNameModelRule;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: 名称生成规则模板信息
+ * @Author: jeecg-boot
+ * @Date: 2019-08-15
+ * @Version: V1.0
+ */
+public interface IBytedanceNameModelRuleService extends IService<BytedanceNameModelRule> {
+
+}

+ 0 - 11
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ByteDanceAdvertiserDataServiceImpl.java

@@ -4,14 +4,6 @@ import cn.com.ctop.common.utils.HttpUtils;
 import cn.com.ctop.common.utils.PropertiesUtils;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import org.apache.http.client.ClientProtocolException;
-import org.apache.http.client.methods.CloseableHttpResponse;
-import org.apache.http.client.methods.HttpPost;
-import org.apache.http.entity.ContentType;
-import org.apache.http.entity.StringEntity;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClientBuilder;
 import org.jeecg.modules.ctop.entity.*;
 import org.jeecg.modules.ctop.mapper.*;
 import org.jeecg.modules.ctop.service.IByteDanceAdvertiserDataService;
@@ -21,9 +13,6 @@ import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
 import java.math.BigDecimal;
 import java.util.HashMap;
 import java.util.Map;

+ 2 - 9
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ByteDanceBudgetTemplateServiceImpl.java

@@ -3,27 +3,20 @@ package org.jeecg.modules.ctop.service.impl;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import org.apache.commons.exec.DaemonExecutor;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.apache.shiro.SecurityUtils;
-import org.apache.shiro.subject.Subject;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.common.util.ResultMapUtils;
 import org.jeecg.common.util.StatusCode;
-import org.jeecg.modules.ctop.entity.*;
-import org.jeecg.modules.ctop.mapper.ByteDanceAdvertiserMapper;
+import org.jeecg.modules.ctop.entity.ByteDanceBudgetTemplate;
 import org.jeecg.modules.ctop.mapper.ByteDanceBudgetTemplateMapper;
-import org.jeecg.modules.ctop.service.IByteDanceAdvertiserBudgetService;
-import org.jeecg.modules.ctop.service.IByteDanceAdvertiserService;
 import org.jeecg.modules.ctop.service.IByteDanceBudgetTemplateService;
 import org.jeecg.modules.ctop.service.ICTopOauthTokenService;
-import org.omg.CORBA.OBJ_ADAPTER;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-
 import javax.servlet.http.HttpServletRequest;
 import java.util.Date;
 import java.util.HashMap;

+ 23 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ByteDanceCampaignTemplateServiceImpl.java

@@ -1,5 +1,6 @@
 package org.jeecg.modules.ctop.service.impl;
 
+import cn.com.ctop.common.utils.HttpUtils;
 import cn.com.ctop.common.utils.PropertiesUtils;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -8,6 +9,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.apache.http.client.ClientProtocolException;
 import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
 import org.apache.http.client.methods.HttpPost;
 import org.apache.http.entity.ContentType;
 import org.apache.http.entity.StringEntity;
@@ -35,6 +37,7 @@ import javax.servlet.http.HttpServletRequest;
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
+import java.net.URI;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.HashMap;
@@ -128,6 +131,26 @@ public class ByteDanceCampaignTemplateServiceImpl extends ServiceImpl<ByteDanceC
     }
 
     @Override
+    public Map<String, Object> getSuggestCover(String accountId, String videoId) {
+        CTopOauthToken token = tokenService.getOAuthTokenByAccountId(accountId);
+        JSONObject result = suggestVideo(token, videoId);
+        return null;
+    }
+
+    public JSONObject suggestVideo(CTopOauthToken token, String videoId) {
+        // 请求地址
+        String url = "https://ad.toutiao.com/open_api/2/tools/video_cover/suggest/";
+        // 请求参数
+        Map data = new HashMap() {
+            {
+                put("advertiser_id", token.getAccountId());
+                put("video_id", videoId);
+            }
+        };
+        return HttpUtils.bytedanceGetRequest(token.getAccessToken(), url, data);
+    }
+
+    @Override
     public Map<String, Object> campaignCreate(CTopOauthToken token, ByteDanceCampaignTemplate template) {
         Map<String, Object> resultMap = new HashMap<>();
         //2: 根据token以及用户id获取用户信息数据

+ 1 - 4
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ByteDanceCreativeServiceImpl.java

@@ -3,7 +3,7 @@ package org.jeecg.modules.ctop.service.impl;
 import cn.com.ctop.common.utils.PropertiesUtils;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
-import io.swagger.models.auth.In;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.apache.http.client.ClientProtocolException;
 import org.apache.http.client.methods.CloseableHttpResponse;
 import org.apache.http.client.methods.HttpPost;
@@ -22,8 +22,6 @@ import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
@@ -140,7 +138,6 @@ public class ByteDanceCreativeServiceImpl extends ServiceImpl<ByteDanceCreativeM
                         Map<String, Object> getImageResult = fileInfoService.uploadImageToBytedance(getAccountId, horizonImageUrl);
                         horizonImageArray = (JSONArray) getImageResult.get("imageIds");
                     }
-//            web.business.image/201908015d0dd63849aa78f142989c70
                     creative.put("image_ids", horizonImageArray);
                     creative.put("title", horizonImageCreativeText);
                     creatives.add(creative);

+ 1 - 6
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ByteDanceUserOrientationTemplateServiceImpl.java

@@ -3,23 +3,18 @@ package org.jeecg.modules.ctop.service.impl;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.system.vo.LoginUser;
-import org.jeecg.modules.ctop.entity.ByteDanceBudgetTemplate;
 import org.jeecg.modules.ctop.entity.ByteDanceUserOrientationTemplate;
-import org.jeecg.modules.ctop.entity.BytedanceDeliveryTargetTemplate;
-import org.jeecg.modules.ctop.entity.CTopOauthToken;
 import org.jeecg.modules.ctop.mapper.ByteDanceUserOrientationTemplateMapper;
-import org.jeecg.modules.ctop.mapper.BytedanceDeliveryTargetTemplateMapper;
 import org.jeecg.modules.ctop.service.IByteDanceUserOrientationTemplateService;
 import org.jeecg.modules.ctop.service.ICTopOauthTokenService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-
 import javax.servlet.http.HttpServletRequest;
 import java.util.HashMap;
 import java.util.Map;

+ 1 - 4
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/BytedanceAdvertisePlanTemplateServiceImpl.java

@@ -1,8 +1,7 @@
 package org.jeecg.modules.ctop.service.impl;
 
 import com.alibaba.fastjson.JSONObject;
-import org.apache.shiro.SecurityUtils;
-import org.jeecg.common.system.vo.LoginUser;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.jeecg.common.util.ResultMapUtils;
 import org.jeecg.common.util.StatusCode;
 import org.jeecg.modules.ctop.entity.*;
@@ -13,8 +12,6 @@ import org.jeecg.modules.ctop.service.ICTopOauthTokenService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;

+ 1 - 16
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/BytedanceDeliveryTargetTemplateServiceImpl.java

@@ -4,23 +4,15 @@ import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import org.apache.http.client.ClientProtocolException;
-import org.apache.http.client.methods.CloseableHttpResponse;
-import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
-import org.apache.http.entity.ContentType;
-import org.apache.http.entity.StringEntity;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.HttpClientBuilder;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.common.util.ResultMapUtils;
 import org.jeecg.common.util.StatusCode;
-import org.jeecg.modules.ctop.entity.ByteDanceCampaignTemplate;
 import org.jeecg.modules.ctop.entity.BytedanceDeliveryTargetTemplate;
 import org.jeecg.modules.ctop.entity.BytedanceUrlInfo;
-import org.jeecg.modules.ctop.entity.CTopOauthToken;
 import org.jeecg.modules.ctop.mapper.BytedanceDeliveryTargetTemplateMapper;
 import org.jeecg.modules.ctop.mapper.BytedanceUrlInfoMapper;
 import org.jeecg.modules.ctop.service.IBytedanceDeliveryTargetTemplateService;
@@ -28,17 +20,10 @@ import org.jeecg.modules.ctop.service.ICTopOauthTokenService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-
 import javax.servlet.http.HttpServletRequest;
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.net.URI;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
-import java.util.concurrent.ConcurrentLinkedDeque;
 
 /**
  * @Description: 投放目标模板信息

+ 19 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/BytedanceNameModelRuleServiceImpl.java

@@ -0,0 +1,19 @@
+package org.jeecg.modules.ctop.service.impl;
+
+import org.jeecg.modules.ctop.entity.BytedanceNameModelRule;
+import org.jeecg.modules.ctop.mapper.BytedanceNameModelRuleMapper;
+import org.jeecg.modules.ctop.service.IBytedanceNameModelRuleService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * @Description: 名称生成规则模板信息
+ * @Author: jeecg-boot
+ * @Date: 2019-08-15
+ * @Version: V1.0
+ */
+@Service
+public class BytedanceNameModelRuleServiceImpl extends ServiceImpl<BytedanceNameModelRuleMapper, BytedanceNameModelRule> implements IBytedanceNameModelRuleService {
+
+}

+ 1 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/BytedanceUrlInfoServiceImpl.java

@@ -1,18 +1,16 @@
 package org.jeecg.modules.ctop.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.common.util.ResultMapUtils;
 import org.jeecg.common.util.StatusCode;
-import org.jeecg.modules.ctop.entity.BytedanceDeliveryTargetTemplate;
 import org.jeecg.modules.ctop.entity.BytedanceUrlInfo;
 import org.jeecg.modules.ctop.mapper.BytedanceUrlInfoMapper;
 import org.jeecg.modules.ctop.service.IBytedanceUrlInfoService;
 import org.springframework.stereotype.Service;
 
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;

+ 1 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/CTopOauthTokenServiceImpl.java

@@ -38,6 +38,7 @@ public class CTopOauthTokenServiceImpl extends ServiceImpl<CTopOauthTokenMapper,
     public CTopOauthToken getOAuthTokenByAccountId(String accountId) {
         QueryWrapper<CTopOauthToken> queryWrapper = new QueryWrapper<>();
         queryWrapper.eq("account_id", accountId).orderByDesc("create_time");
+        queryWrapper.last("limit 1");
         CTopOauthToken cTopOauthToken = cTopOauthTokenMapper.selectOne(queryWrapper);
         return cTopOauthToken;
     }

+ 0 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/CreateInternalServiceImpl.java

@@ -1,10 +1,8 @@
 package org.jeecg.modules.ctop.service.impl;
 
-import cn.com.ctop.common.utils.Check;
 import cn.com.ctop.common.utils.HttpUtils;
 import cn.com.ctop.crawler.modules.core.util.FateadmHttpUtil;
 import cn.com.ctop.crawler.modules.core.util.FateadmUtil;
-import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.fasterxml.jackson.databind.DeserializationFeature;
 import com.fasterxml.jackson.databind.JsonNode;
@@ -21,7 +19,6 @@ import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import sun.misc.BASE64Decoder;
 
-import java.text.SimpleDateFormat;
 import java.util.*;
 
 @Service

+ 2 - 7
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/FileInfoServiceImpl.java

@@ -2,15 +2,11 @@ package org.jeecg.modules.ctop.service.impl;
 
 import cn.com.ctop.common.utils.PropertiesUtils;
 import cn.com.ctop.toutiao.common.BytedanceInterfaceConstant;
-import com.alibaba.druid.support.spring.stat.annotation.Stat;
 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;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.apache.commons.codec.digest.DigestUtils;
-import org.apache.commons.io.FileUtils;
 import org.apache.http.HttpEntity;
 import org.apache.http.client.ClientProtocolException;
 import org.apache.http.client.methods.CloseableHttpResponse;
@@ -22,10 +18,10 @@ import org.apache.http.entity.mime.MultipartEntityBuilder;
 import org.apache.http.entity.mime.content.FileBody;
 import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.http.impl.client.HttpClientBuilder;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.ResultMapUtils;
 import org.jeecg.common.util.StatusCode;
-import org.jeecg.modules.ctop.entity.*;
+import org.jeecg.modules.ctop.entity.CTopOauthToken;
+import org.jeecg.modules.ctop.entity.FileInfo;
 import org.jeecg.modules.ctop.mapper.ByteDanceImageInfoMapper;
 import org.jeecg.modules.ctop.mapper.ByteDanceVideoInfoMapper;
 import org.jeecg.modules.ctop.mapper.FileInfoMapper;
@@ -39,7 +35,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
-import org.springframework.core.io.FileSystemResource;
 import org.springframework.stereotype.Service;
 
 import javax.servlet.http.HttpServletRequest;

+ 0 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/ReportServiceImpl.java

@@ -13,7 +13,6 @@ import org.jeecg.modules.ctop.service.ICTopOauthTokenService;
 import org.jeecg.modules.ctop.service.IReportService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import retrofit2.http.Url;
 
 import java.io.BufferedReader;
 import java.io.IOException;

+ 173 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/vue/BytedanceNameModelRuleList.vue

@@ -0,0 +1,173 @@
+<template>
+    <a-card :bordered="false">
+
+        <!-- 查询区域 -->
+        <div class="table-page-search-wrapper">
+            <a-form layout="inline">
+                <a-row :gutter="24">
+
+                    <a-col :md="6" :sm="8">
+                        <a-form-item label="模板名称">
+                            <a-input placeholder="请输入模板名称" v-model="queryParam.name"></a-input>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :md="6" :sm="8">
+                        <a-form-item label="生成规格">
+                            <a-input placeholder="请输入生成规格" v-model="queryParam.rule"></a-input>
+                        </a-form-item>
+                    </a-col>
+                    <template v-if="toggleSearchStatus">
+                        <a-col :md="6" :sm="8">
+                            <a-form-item label="模板状态信息">
+                                <a-input placeholder="请输入模板状态信息" v-model="queryParam.status"></a-input>
+                            </a-form-item>
+                        </a-col>
+                    </template>
+                    <a-col :md="6" :sm="8">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+              <a @click="handleToggleSearch" style="margin-left: 8px">
+                {{ toggleSearchStatus ? '收起' : '展开' }}
+                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
+              </a>
+            </span>
+                    </a-col>
+
+                </a-row>
+            </a-form>
+        </div>
+
+        <!-- 操作按钮区域 -->
+        <div class="table-operator">
+            <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
+            <a-button type="primary" icon="download" @click="handleExportXls('名称生成规则模板信息')">导出</a-button>
+            <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader"
+                      :action="importExcelUrl" @change="handleImportExcel">
+                <a-button type="primary" icon="import">导入</a-button>
+            </a-upload>
+            <a-dropdown v-if="selectedRowKeys.length > 0">
+                <a-menu slot="overlay">
+                    <a-menu-item key="1" @click="batchDel">
+                        <a-icon type="delete"/>
+                        删除
+                    </a-menu-item>
+                </a-menu>
+                <a-button style="margin-left: 8px"> 批量操作
+                    <a-icon type="down"/>
+                </a-button>
+            </a-dropdown>
+        </div>
+
+        <!-- table区域-begin -->
+        <div>
+            <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+                <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{
+                selectedRowKeys.length }}</a>项
+                <a style="margin-left: 24px" @click="onClearSelected">清空</a>
+            </div>
+
+            <a-table
+                    ref="table"
+                    size="middle"
+                    bordered
+                    rowKey="id"
+                    :columns="columns"
+                    :dataSource="dataSource"
+                    :pagination="ipagination"
+                    :loading="loading"
+                    :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+                    @change="handleTableChange">
+
+        <span slot="action" slot-scope="text, record">
+          <a @click="handleEdit(record)">编辑</a>
+
+          <a-divider type="vertical"/>
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
+            <a-menu slot="overlay">
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+                  <a>删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+          </a-dropdown>
+        </span>
+
+            </a-table>
+        </div>
+        <!-- table区域-end -->
+
+        <!-- 表单区域 -->
+        <bytedanceNameModelRule-modal ref="modalForm" @ok="modalFormOk"></bytedanceNameModelRule-modal>
+    </a-card>
+</template>
+
+<script>
+    import BytedanceNameModelRuleModal from './modules/BytedanceNameModelRuleModal'
+    import {JeecgListMixin} from '@/mixins/JeecgListMixin'
+
+    export default {
+        name: "BytedanceNameModelRuleList",
+        mixins: [JeecgListMixin],
+        components: {
+            BytedanceNameModelRuleModal
+        },
+        data() {
+            return {
+                description: '名称生成规则模板信息管理页面',
+                // 表头
+                columns: [
+                    {
+                        title: '#',
+                        dataIndex: '',
+                        key: 'rowIndex',
+                        width: 60,
+                        align: "center",
+                        customRender: function (t, r, index) {
+                            return parseInt(index) + 1;
+                        }
+                    },
+                    {
+                        title: '模板名称',
+                        align: "center",
+                        dataIndex: 'name'
+                    },
+                    {
+                        title: '生成规格',
+                        align: "center",
+                        dataIndex: 'rule'
+                    },
+                    {
+                        title: '模板状态信息',
+                        align: "center",
+                        dataIndex: 'status'
+                    },
+                    {
+                        title: '操作',
+                        dataIndex: 'action',
+                        align: "center",
+                        scopedSlots: {customRender: 'action'},
+                    }
+                ],
+                url: {
+                    list: "/ctop/bytedanceNameModelRule/list",
+                    delete: "/ctop/bytedanceNameModelRule/delete",
+                    deleteBatch: "/ctop/bytedanceNameModelRule/deleteBatch",
+                    exportXlsUrl: "ctop/bytedanceNameModelRule/exportXls",
+                    importExcelUrl: "ctop/bytedanceNameModelRule/importExcel",
+                },
+            }
+        },
+        computed: {
+            importExcelUrl: function () {
+                return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+            }
+        },
+        methods: {}
+    }
+</script>
+<style scoped>
+    @import '~@assets/less/common.less'
+</style>

+ 138 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/vue/modules/BytedanceNameModelRuleModal.vue

@@ -0,0 +1,138 @@
+<template>
+    <a-modal
+            :title="title"
+            :width="800"
+            :visible="visible"
+            :confirmLoading="confirmLoading"
+            @ok="handleOk"
+            @cancel="handleCancel"
+            cancelText="关闭">
+
+        <a-spin :spinning="confirmLoading">
+            <a-form :form="form">
+
+                <a-form-item
+                        :labelCol="labelCol"
+                        :wrapperCol="wrapperCol"
+                        label="模板名称">
+                    <a-input placeholder="请输入模板名称" v-decorator="['name', validatorRules.name ]"/>
+                </a-form-item>
+                <a-form-item
+                        :labelCol="labelCol"
+                        :wrapperCol="wrapperCol"
+                        label="生成规格">
+                    <a-input placeholder="请输入生成规格" v-decorator="['rule', validatorRules.rule ]"/>
+                </a-form-item>
+                <a-form-item
+                        :labelCol="labelCol"
+                        :wrapperCol="wrapperCol"
+                        label="模板状态信息">
+                    <a-input-number v-decorator="[ 'status', validatorRules.status ]"/>
+                </a-form-item>
+
+            </a-form>
+        </a-spin>
+    </a-modal>
+</template>
+
+<script>
+    import {httpAction} from '@/api/manage'
+    import pick from 'lodash.pick'
+    import moment from "moment"
+
+    export default {
+        name: "BytedanceNameModelRuleModal",
+        data() {
+            return {
+                title: "操作",
+                visible: false,
+                model: {},
+                labelCol: {
+                    xs: {span: 24},
+                    sm: {span: 5},
+                },
+                wrapperCol: {
+                    xs: {span: 24},
+                    sm: {span: 16},
+                },
+
+                confirmLoading: false,
+                form: this.$form.createForm(this),
+                validatorRules: {
+                    name: {rules: [{required: true, message: '请输入模板名称!'}]},
+                    rule: {rules: [{required: true, message: '请输入生成规格!'}]},
+                    status: {rules: [{required: true, message: '请输入模板状态信息!'}]},
+                },
+                url: {
+                    add: "/ctop/bytedanceNameModelRule/add",
+                    edit: "/ctop/bytedanceNameModelRule/edit",
+                },
+            }
+        },
+        created() {
+        },
+        methods: {
+            add() {
+                this.edit({});
+            },
+            edit(record) {
+                this.form.resetFields();
+                this.model = Object.assign({}, record);
+                this.visible = true;
+                this.$nextTick(() => {
+                    this.form.setFieldsValue(pick(this.model, 'name', 'rule', 'status'))
+                    //时间格式化
+                });
+
+            },
+            close() {
+                this.$emit('close');
+                this.visible = false;
+            },
+            handleOk() {
+                const that = this;
+                // 触发表单验证
+                this.form.validateFields((err, values) => {
+                    if (!err) {
+                        that.confirmLoading = true;
+                        let httpurl = '';
+                        let method = '';
+                        if (!this.model.id) {
+                            httpurl += this.url.add;
+                            method = 'post';
+                        } else {
+                            httpurl += this.url.edit;
+                            method = 'put';
+                        }
+                        let formData = Object.assign(this.model, values);
+                        //时间格式化
+
+                        console.log(formData)
+                        httpAction(httpurl, formData, method).then((res) => {
+                            if (res.success) {
+                                that.$message.success(res.message);
+                                that.$emit('ok');
+                            } else {
+                                that.$message.warning(res.message);
+                            }
+                        }).finally(() => {
+                            that.confirmLoading = false;
+                            that.close();
+                        })
+
+
+                    }
+                })
+            },
+            handleCancel() {
+                this.close()
+            },
+
+
+        }
+    }
+</script>
+
+<style lang="less" scoped>
+
+</style>

+ 145 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/vue/modules/BytedanceNameModelRuleModal__Style#Drawer.vue

@@ -0,0 +1,145 @@
+<template>
+    <a-drawer
+            :title="title"
+            :width="800"
+            placement="right"
+            :closable="false"
+            @close="close"
+            :visible="visible"
+    >
+
+        <a-spin :spinning="confirmLoading">
+            <a-form :form="form">
+
+                <a-form-item
+                        :labelCol="labelCol"
+                        :wrapperCol="wrapperCol"
+                        label="模板名称">
+                    <a-input placeholder="请输入模板名称" v-decorator="['name', validatorRules.name ]"/>
+                </a-form-item>
+                <a-form-item
+                        :labelCol="labelCol"
+                        :wrapperCol="wrapperCol"
+                        label="生成规格">
+                    <a-input placeholder="请输入生成规格" v-decorator="['rule', validatorRules.rule ]"/>
+                </a-form-item>
+                <a-form-item
+                        :labelCol="labelCol"
+                        :wrapperCol="wrapperCol"
+                        label="模板状态信息">
+                    <a-input-number v-decorator="[ 'status', validatorRules.status ]"/>
+                </a-form-item>
+
+            </a-form>
+        </a-spin>
+        <a-button type="primary" @click="handleOk">确定</a-button>
+        <a-button type="primary" @click="handleCancel">取消</a-button>
+    </a-drawer>
+</template>
+
+<script>
+    import {httpAction} from '@/api/manage'
+    import pick from 'lodash.pick'
+    import moment from "moment"
+
+    export default {
+        name: "BytedanceNameModelRuleModal",
+        data() {
+            return {
+                title: "操作",
+                visible: false,
+                model: {},
+                labelCol: {
+                    xs: {span: 24},
+                    sm: {span: 5},
+                },
+                wrapperCol: {
+                    xs: {span: 24},
+                    sm: {span: 16},
+                },
+
+                confirmLoading: false,
+                form: this.$form.createForm(this),
+                validatorRules: {
+                    name: {rules: [{required: true, message: '请输入模板名称!'}]},
+                    rule: {rules: [{required: true, message: '请输入生成规格!'}]},
+                    status: {rules: [{required: true, message: '请输入模板状态信息!'}]},
+                },
+                url: {
+                    add: "/ctop/bytedanceNameModelRule/add",
+                    edit: "/ctop/bytedanceNameModelRule/edit",
+                },
+            }
+        },
+        created() {
+        },
+        methods: {
+            add() {
+                this.edit({});
+            },
+            edit(record) {
+                this.form.resetFields();
+                this.model = Object.assign({}, record);
+                this.visible = true;
+                this.$nextTick(() => {
+                    this.form.setFieldsValue(pick(this.model, 'name', 'rule', 'status'))
+                    //时间格式化
+                });
+
+            },
+            close() {
+                this.$emit('close');
+                this.visible = false;
+            },
+            handleOk() {
+                const that = this;
+                // 触发表单验证
+                this.form.validateFields((err, values) => {
+                    if (!err) {
+                        that.confirmLoading = true;
+                        let httpurl = '';
+                        let method = '';
+                        if (!this.model.id) {
+                            httpurl += this.url.add;
+                            method = 'post';
+                        } else {
+                            httpurl += this.url.edit;
+                            method = 'put';
+                        }
+                        let formData = Object.assign(this.model, values);
+                        //时间格式化
+
+                        console.log(formData)
+                        httpAction(httpurl, formData, method).then((res) => {
+                            if (res.success) {
+                                that.$message.success(res.message);
+                                that.$emit('ok');
+                            } else {
+                                that.$message.warning(res.message);
+                            }
+                        }).finally(() => {
+                            that.confirmLoading = false;
+                            that.close();
+                        })
+
+
+                    }
+                })
+            },
+            handleCancel() {
+                this.close()
+            },
+
+
+        }
+    }
+</script>
+
+<style lang="less" scoped>
+    /** Button按钮间距 */
+    .ant-btn {
+        margin-left: 30px;
+        margin-bottom: 30px;
+        float: right;
+    }
+</style>

+ 0 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/mock/MockController.java

@@ -200,5 +200,4 @@ public class MockController {
 		}
 		return json;
 	}
-
 }

+ 0 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/fileupload/controller/UploadController.java

@@ -9,7 +9,6 @@ import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletRequest;
-import java.util.HashMap;
 import java.util.Map;
 
 @RestController

+ 266 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouActionBarTextController.java

@@ -0,0 +1,266 @@
+package org.jeecg.modules.kuaishou.controller;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import cn.com.ctop.common.utils.Check;
+import com.alibaba.fastjson.JSONObject;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.kuaishou.entity.KuaiShouActionBarText;
+import org.jeecg.modules.kuaishou.entity.KuaiShouCampaignCreate;
+import org.jeecg.modules.kuaishou.service.IKuaiShouActionBarTextService;
+
+import java.util.Date;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.extern.slf4j.Slf4j;
+
+import org.jeecg.modules.kuaishou.service.IKuaiShouCampaignCreateService;
+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.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import org.springframework.web.servlet.ModelAndView;
+import com.alibaba.fastjson.JSON;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+/**
+ * @Description: 快手-行动号召文案
+ * @Author: jeecg-boot
+ * @Date: 2019-08-15
+ * @Version: V1.0
+ */
+@Slf4j
+@Api(tags = "快手-行动号召文案")
+@RestController
+@RequestMapping("/kuaishou/kuaiShouActionBarText")
+public class KuaiShouActionBarTextController {
+    @Autowired
+    private IKuaiShouActionBarTextService kuaiShouActionBarTextService;
+    @Autowired
+    private IKuaiShouCampaignCreateService campaignCreateService;
+
+    /**
+     * 分页列表查询
+     *
+     * @param kuaiShouActionBarText
+     * @param pageNo
+     * @param pageSize
+     * @return
+     */
+    @AutoLog(value = "快手-行动号召文案-分页列表查询")
+    @ApiOperation(value = "快手-行动号召文案-分页列表查询", notes = "快手-行动号召文案-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<IPage<KuaiShouActionBarText>> queryPageList(KuaiShouActionBarText kuaiShouActionBarText,
+                                                              @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                              @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                              @RequestParam(name = "campaignId") String campaignId) {
+        Result<IPage<KuaiShouActionBarText>> result = new Result<IPage<KuaiShouActionBarText>>();
+        KuaiShouCampaignCreate campaignCreate = campaignCreateService.selectCampaignByCampaignId(campaignId);
+        if (!Check.isNull(campaignCreate)) {
+            QueryWrapper<KuaiShouActionBarText> queryWrapper = new QueryWrapper<>();
+            queryWrapper.eq("type", campaignCreate.getType());
+            Page<KuaiShouActionBarText> page = new Page<KuaiShouActionBarText>(pageNo, pageSize);
+            IPage<KuaiShouActionBarText> pageList = kuaiShouActionBarTextService.page(page, queryWrapper);
+            result.setSuccess(true);
+            result.setResult(pageList);
+        } else {
+            result.setSuccess(false);
+            result.setMessage("未获取到广告计划信息");
+        }
+
+        return result;
+    }
+
+    /**
+     * 添加
+     *
+     * @param kuaiShouActionBarText
+     * @return
+     */
+    @AutoLog(value = "快手-行动号召文案-添加")
+    @ApiOperation(value = "快手-行动号召文案-添加", notes = "快手-行动号召文案-添加")
+    @PostMapping(value = "/add")
+    public Result<KuaiShouActionBarText> add(@RequestBody KuaiShouActionBarText kuaiShouActionBarText) {
+        Result<KuaiShouActionBarText> result = new Result<KuaiShouActionBarText>();
+        try {
+            kuaiShouActionBarTextService.save(kuaiShouActionBarText);
+            result.success("添加成功!");
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            result.error500("操作失败");
+        }
+        return result;
+    }
+
+    /**
+     * 编辑
+     *
+     * @param kuaiShouActionBarText
+     * @return
+     */
+    @AutoLog(value = "快手-行动号召文案-编辑")
+    @ApiOperation(value = "快手-行动号召文案-编辑", notes = "快手-行动号召文案-编辑")
+    @PutMapping(value = "/edit")
+    public Result<KuaiShouActionBarText> edit(@RequestBody KuaiShouActionBarText kuaiShouActionBarText) {
+        Result<KuaiShouActionBarText> result = new Result<KuaiShouActionBarText>();
+        KuaiShouActionBarText kuaiShouActionBarTextEntity = kuaiShouActionBarTextService.getById(kuaiShouActionBarText.getId());
+        if (kuaiShouActionBarTextEntity == null) {
+            result.error500("未找到对应实体");
+        } else {
+            boolean ok = kuaiShouActionBarTextService.updateById(kuaiShouActionBarText);
+            //TODO 返回false说明什么?
+            if (ok) {
+                result.success("修改成功!");
+            }
+        }
+
+        return result;
+    }
+
+    /**
+     * 通过id删除
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "快手-行动号召文案-通过id删除")
+    @ApiOperation(value = "快手-行动号召文案-通过id删除", notes = "快手-行动号召文案-通过id删除")
+    @DeleteMapping(value = "/delete")
+    public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
+        try {
+            kuaiShouActionBarTextService.removeById(id);
+        } catch (Exception e) {
+            log.error("删除失败", e.getMessage());
+            return Result.error("删除失败!");
+        }
+        return Result.ok("删除成功!");
+    }
+
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
+    @AutoLog(value = "快手-行动号召文案-批量删除")
+    @ApiOperation(value = "快手-行动号召文案-批量删除", notes = "快手-行动号召文案-批量删除")
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<KuaiShouActionBarText> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        Result<KuaiShouActionBarText> result = new Result<KuaiShouActionBarText>();
+        if (ids == null || "".equals(ids.trim())) {
+            result.error500("参数不识别!");
+        } else {
+            this.kuaiShouActionBarTextService.removeByIds(Arrays.asList(ids.split(",")));
+            result.success("删除成功!");
+        }
+        return result;
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "快手-行动号召文案-通过id查询")
+    @ApiOperation(value = "快手-行动号召文案-通过id查询", notes = "快手-行动号召文案-通过id查询")
+    @GetMapping(value = "/queryById")
+    public Result<KuaiShouActionBarText> queryById(@RequestParam(name = "id", required = true) String id) {
+        Result<KuaiShouActionBarText> result = new Result<KuaiShouActionBarText>();
+        KuaiShouActionBarText kuaiShouActionBarText = kuaiShouActionBarTextService.getById(id);
+        if (kuaiShouActionBarText == null) {
+            result.error500("未找到对应实体");
+        } else {
+            result.setResult(kuaiShouActionBarText);
+            result.setSuccess(true);
+        }
+        return result;
+    }
+
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param response
+     */
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
+        // Step.1 组装查询条件
+        QueryWrapper<KuaiShouActionBarText> queryWrapper = null;
+        try {
+            String paramsStr = request.getParameter("paramsStr");
+            if (oConvertUtils.isNotEmpty(paramsStr)) {
+                String deString = URLDecoder.decode(paramsStr, "UTF-8");
+                KuaiShouActionBarText kuaiShouActionBarText = JSON.parseObject(deString, KuaiShouActionBarText.class);
+                queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouActionBarText, request.getParameterMap());
+            }
+        } catch (UnsupportedEncodingException e) {
+            e.printStackTrace();
+        }
+
+        //Step.2 AutoPoi 导出Excel
+        ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+        List<KuaiShouActionBarText> pageList = kuaiShouActionBarTextService.list(queryWrapper);
+        //导出文件名称
+        mv.addObject(NormalExcelConstants.FILE_NAME, "快手-行动号召文案列表");
+        mv.addObject(NormalExcelConstants.CLASS, KuaiShouActionBarText.class);
+        mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("快手-行动号召文案列表数据", "导出人:Jeecg", "导出信息"));
+        mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
+        return mv;
+    }
+
+    /**
+     * 通过excel导入数据
+     *
+     * @param request
+     * @param response
+     * @return
+     */
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
+        Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
+        for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
+            MultipartFile file = entity.getValue();// 获取上传文件对象
+            ImportParams params = new ImportParams();
+            params.setTitleRows(2);
+            params.setHeadRows(1);
+            params.setNeedSave(true);
+            try {
+                List<KuaiShouActionBarText> listKuaiShouActionBarTexts = ExcelImportUtil.importExcel(file.getInputStream(), KuaiShouActionBarText.class, params);
+                kuaiShouActionBarTextService.saveBatch(listKuaiShouActionBarTexts);
+                return Result.ok("文件导入成功!数据行数:" + listKuaiShouActionBarTexts.size());
+            } catch (Exception e) {
+                log.error(e.getMessage(), e);
+                return Result.error("文件导入失败:" + e.getMessage());
+            } finally {
+                try {
+                    file.getInputStream().close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        return Result.ok("文件导入失败!");
+    }
+
+}

+ 17 - 22
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouAppCreateController.java

@@ -1,42 +1,37 @@
 package org.jeecg.modules.kuaishou.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.kuaishou.entity.KuaiShouAppCreate;
 import org.jeecg.modules.kuaishou.service.IKuaiShouAppCreateService;
-
-import java.util.Date;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 创建应用

+ 17 - 19
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouAppInfoController.java

@@ -1,39 +1,37 @@
 package org.jeecg.modules.kuaishou.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.kuaishou.entity.KuaiShouAppInfo;
 import org.jeecg.modules.kuaishou.service.IKuaiShouAppInfoService;
-import java.util.Date;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
  /**
   * @Description: 广告组-app信息

+ 17 - 22
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouAppListController.java

@@ -1,42 +1,37 @@
 package org.jeecg.modules.kuaishou.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.kuaishou.entity.KuaiShouAppList;
 import org.jeecg.modules.kuaishou.service.IKuaiShouAppListService;
-
-import java.util.Date;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 快手-应用列表

+ 17 - 19
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouCampaignController.java

@@ -1,39 +1,37 @@
 package org.jeecg.modules.kuaishou.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.kuaishou.entity.KuaiShouCampaign;
 import org.jeecg.modules.kuaishou.service.IKuaiShouCampaignService;
-import java.util.Date;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
  /**
   * @Description: 快手-获取广告计划信息

+ 17 - 22
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouCampaignCreateController.java

@@ -1,42 +1,37 @@
 package org.jeecg.modules.kuaishou.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.kuaishou.entity.KuaiShouCampaignCreate;
 import org.jeecg.modules.kuaishou.service.IKuaiShouCampaignCreateService;
-
-import java.util.Date;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 快手-创建广告计划

+ 235 - 224
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouCampaignTemplateController.java

@@ -1,252 +1,263 @@
 package org.jeecg.modules.kuaishou.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import cn.com.ctop.common.utils.Check;
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.kuaishou.entity.KuaiShouCampaignTemplate;
 import org.jeecg.modules.kuaishou.service.IKuaiShouCampaignTemplateService;
-import java.util.Date;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
 
- /**
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
  * @Description: 快手-创建广告计划模板
  * @Author: jeecg-boot
- * @Date:   2019-08-06
+ * @Date: 2019-08-06
  * @Version: V1.0
  */
 @Slf4j
-@Api(tags="快手-创建广告计划模板")
+@Api(tags = "快手-创建广告计划模板")
 @RestController
 @RequestMapping("/kuaishou/kuaiShouCampaignTemplate")
 public class KuaiShouCampaignTemplateController {
-	@Autowired
-	private IKuaiShouCampaignTemplateService kuaiShouCampaignTemplateService;
-
-
-
-	 @PostMapping("/insert")
-	 public Map<String, Object> campaignTemplateInsert(@RequestBody KuaiShouCampaignTemplate template, HttpServletRequest req) {
-		 return kuaiShouCampaignTemplateService.insertTemplate(template);
-	 }
-
-
-	 /**
-	  * 分页列表查询
-	 * @param kuaiShouCampaignTemplate
-	 * @param pageNo
-	 * @param pageSize
-	 * @param req
-	 * @return
-	 */
-	@AutoLog(value = "快手-创建广告计划模板-分页列表查询")
-	@ApiOperation(value="快手-创建广告计划模板-分页列表查询", notes="快手-创建广告计划模板-分页列表查询")
-	@GetMapping(value = "/list")
-	public Result<IPage<KuaiShouCampaignTemplate>> queryPageList(KuaiShouCampaignTemplate kuaiShouCampaignTemplate,
-									  @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
-									  @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
-									  HttpServletRequest req) {
-		Result<IPage<KuaiShouCampaignTemplate>> result = new Result<IPage<KuaiShouCampaignTemplate>>();
-		QueryWrapper<KuaiShouCampaignTemplate> queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouCampaignTemplate, req.getParameterMap());
-		Page<KuaiShouCampaignTemplate> page = new Page<KuaiShouCampaignTemplate>(pageNo, pageSize);
-		IPage<KuaiShouCampaignTemplate> pageList = kuaiShouCampaignTemplateService.page(page, queryWrapper);
-		result.setSuccess(true);
-		result.setResult(pageList);
-		return result;
-	}
-	
-	/**
-	  *   添加
-	 * @param kuaiShouCampaignTemplate
-	 * @return
-	 */
-	@AutoLog(value = "快手-创建广告计划模板-添加")
-	@ApiOperation(value="快手-创建广告计划模板-添加", notes="快手-创建广告计划模板-添加")
-	@PostMapping(value = "/add")
-	public Result<KuaiShouCampaignTemplate> add(@RequestBody KuaiShouCampaignTemplate kuaiShouCampaignTemplate) {
-		Result<KuaiShouCampaignTemplate> result = new Result<KuaiShouCampaignTemplate>();
-		try {
-			kuaiShouCampaignTemplateService.save(kuaiShouCampaignTemplate);
-			result.success("添加成功!");
-		} catch (Exception e) {
-			log.error(e.getMessage(),e);
-			result.error500("操作失败");
-		}
-		return result;
-	}
-	
-	/**
-	  *  编辑
-	 * @param kuaiShouCampaignTemplate
-	 * @return
-	 */
-	@AutoLog(value = "快手-创建广告计划模板-编辑")
-	@ApiOperation(value="快手-创建广告计划模板-编辑", notes="快手-创建广告计划模板-编辑")
-	@PutMapping(value = "/edit")
-	public Result<KuaiShouCampaignTemplate> edit(@RequestBody KuaiShouCampaignTemplate kuaiShouCampaignTemplate) {
-		Result<KuaiShouCampaignTemplate> result = new Result<KuaiShouCampaignTemplate>();
-		KuaiShouCampaignTemplate kuaiShouCampaignTemplateEntity = kuaiShouCampaignTemplateService.getById(kuaiShouCampaignTemplate.getId());
-		if(kuaiShouCampaignTemplateEntity==null) {
-			result.error500("未找到对应实体");
-		}else {
-			boolean ok = kuaiShouCampaignTemplateService.updateById(kuaiShouCampaignTemplate);
-			//TODO 返回false说明什么?
-			if(ok) {
-				result.success("修改成功!");
-			}
-		}
-		
-		return result;
-	}
-	
-	/**
-	  *   通过id删除
-	 * @param id
-	 * @return
-	 */
-	@AutoLog(value = "快手-创建广告计划模板-通过id删除")
-	@ApiOperation(value="快手-创建广告计划模板-通过id删除", notes="快手-创建广告计划模板-通过id删除")
-	@DeleteMapping(value = "/delete")
-	public Result<?> delete(@RequestParam(name="id",required=true) String id) {
-		try {
-			kuaiShouCampaignTemplateService.removeById(id);
-		} catch (Exception e) {
-			log.error("删除失败",e.getMessage());
-			return Result.error("删除失败!");
-		}
-		return Result.ok("删除成功!");
-	}
-	
-	/**
-	  *  批量删除
-	 * @param ids
-	 * @return
-	 */
-	@AutoLog(value = "快手-创建广告计划模板-批量删除")
-	@ApiOperation(value="快手-创建广告计划模板-批量删除", notes="快手-创建广告计划模板-批量删除")
-	@DeleteMapping(value = "/deleteBatch")
-	public Result<KuaiShouCampaignTemplate> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
-		Result<KuaiShouCampaignTemplate> result = new Result<KuaiShouCampaignTemplate>();
-		if(ids==null || "".equals(ids.trim())) {
-			result.error500("参数不识别!");
-		}else {
-			this.kuaiShouCampaignTemplateService.removeByIds(Arrays.asList(ids.split(",")));
-			result.success("删除成功!");
-		}
-		return result;
-	}
-	
-	/**
-	  * 通过id查询
-	 * @param id
-	 * @return
-	 */
-	@AutoLog(value = "快手-创建广告计划模板-通过id查询")
-	@ApiOperation(value="快手-创建广告计划模板-通过id查询", notes="快手-创建广告计划模板-通过id查询")
-	@GetMapping(value = "/queryById")
-	public Result<KuaiShouCampaignTemplate> queryById(@RequestParam(name="id",required=true) String id) {
-		Result<KuaiShouCampaignTemplate> result = new Result<KuaiShouCampaignTemplate>();
-		KuaiShouCampaignTemplate kuaiShouCampaignTemplate = kuaiShouCampaignTemplateService.getById(id);
-		if(kuaiShouCampaignTemplate==null) {
-			result.error500("未找到对应实体");
-		}else {
-			result.setResult(kuaiShouCampaignTemplate);
-			result.setSuccess(true);
-		}
-		return result;
-	}
-
-  /**
-      * 导出excel
-   *
-   * @param request
-   * @param response
-   */
-  @RequestMapping(value = "/exportXls")
-  public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
-      // Step.1 组装查询条件
-      QueryWrapper<KuaiShouCampaignTemplate> queryWrapper = null;
-      try {
-          String paramsStr = request.getParameter("paramsStr");
-          if (oConvertUtils.isNotEmpty(paramsStr)) {
-              String deString = URLDecoder.decode(paramsStr, "UTF-8");
-              KuaiShouCampaignTemplate kuaiShouCampaignTemplate = JSON.parseObject(deString, KuaiShouCampaignTemplate.class);
-              queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouCampaignTemplate, request.getParameterMap());
-          }
-      } catch (UnsupportedEncodingException e) {
-          e.printStackTrace();
-      }
-
-      //Step.2 AutoPoi 导出Excel
-      ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
-      List<KuaiShouCampaignTemplate> pageList = kuaiShouCampaignTemplateService.list(queryWrapper);
-      //导出文件名称
-      mv.addObject(NormalExcelConstants.FILE_NAME, "快手-创建广告计划模板列表");
-      mv.addObject(NormalExcelConstants.CLASS, KuaiShouCampaignTemplate.class);
-      mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("快手-创建广告计划模板列表数据", "导出人:Jeecg", "导出信息"));
-      mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
-      return mv;
-  }
-
-  /**
-      * 通过excel导入数据
-   *
-   * @param request
-   * @param response
-   * @return
-   */
-  @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
-  public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
-      MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
-      Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
-      for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
-          MultipartFile file = entity.getValue();// 获取上传文件对象
-          ImportParams params = new ImportParams();
-          params.setTitleRows(2);
-          params.setHeadRows(1);
-          params.setNeedSave(true);
-          try {
-              List<KuaiShouCampaignTemplate> listKuaiShouCampaignTemplates = ExcelImportUtil.importExcel(file.getInputStream(), KuaiShouCampaignTemplate.class, params);
-              kuaiShouCampaignTemplateService.saveBatch(listKuaiShouCampaignTemplates);
-              return Result.ok("文件导入成功!数据行数:" + listKuaiShouCampaignTemplates.size());
-          } catch (Exception e) {
-              log.error(e.getMessage(),e);
-              return Result.error("文件导入失败:"+e.getMessage());
-          } finally {
-              try {
-                  file.getInputStream().close();
-              } catch (IOException e) {
-                  e.printStackTrace();
-              }
-          }
-      }
-      return Result.ok("文件导入失败!");
-  }
+    @Autowired
+    private IKuaiShouCampaignTemplateService kuaiShouCampaignTemplateService;
+
+
+    @PostMapping("/insert")
+    public Map<String, Object> campaignTemplateInsert(@RequestBody KuaiShouCampaignTemplate template, HttpServletRequest req) {
+        return kuaiShouCampaignTemplateService.insertTemplate(template);
+    }
+
+
+    /**
+     * 分页列表查询
+     *
+     * @param kuaiShouCampaignTemplate
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    @AutoLog(value = "快手-创建广告计划模板-分页列表查询")
+    @ApiOperation(value = "快手-创建广告计划模板-分页列表查询", notes = "快手-创建广告计划模板-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<IPage<KuaiShouCampaignTemplate>> queryPageList(KuaiShouCampaignTemplate kuaiShouCampaignTemplate,
+                                                                 @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                                 @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                                 HttpServletRequest req) {
+        Result<IPage<KuaiShouCampaignTemplate>> result = new Result<IPage<KuaiShouCampaignTemplate>>();
+        QueryWrapper<KuaiShouCampaignTemplate> queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouCampaignTemplate, req.getParameterMap());
+        LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+        if(!Check.isNull(user)){
+            queryWrapper.eq("login_id", user.getId());
+        }
+
+        Page<KuaiShouCampaignTemplate> page = new Page<KuaiShouCampaignTemplate>(pageNo, pageSize);
+        IPage<KuaiShouCampaignTemplate> pageList = kuaiShouCampaignTemplateService.page(page, queryWrapper);
+        result.setSuccess(true);
+        result.setResult(pageList);
+        return result;
+    }
+
+    /**
+     * 添加
+     *
+     * @param kuaiShouCampaignTemplate
+     * @return
+     */
+    @AutoLog(value = "快手-创建广告计划模板-添加")
+    @ApiOperation(value = "快手-创建广告计划模板-添加", notes = "快手-创建广告计划模板-添加")
+    @PostMapping(value = "/add")
+    public Result<KuaiShouCampaignTemplate> add(@RequestBody KuaiShouCampaignTemplate kuaiShouCampaignTemplate) {
+        Result<KuaiShouCampaignTemplate> result = new Result<KuaiShouCampaignTemplate>();
+        try {
+            kuaiShouCampaignTemplateService.save(kuaiShouCampaignTemplate);
+            result.success("添加成功!");
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            result.error500("操作失败");
+        }
+        return result;
+    }
+
+    /**
+     * 编辑
+     *
+     * @param kuaiShouCampaignTemplate
+     * @return
+     */
+    @AutoLog(value = "快手-创建广告计划模板-编辑")
+    @ApiOperation(value = "快手-创建广告计划模板-编辑", notes = "快手-创建广告计划模板-编辑")
+    @PutMapping(value = "/edit")
+    public Result<KuaiShouCampaignTemplate> edit(@RequestBody KuaiShouCampaignTemplate kuaiShouCampaignTemplate) {
+        Result<KuaiShouCampaignTemplate> result = new Result<KuaiShouCampaignTemplate>();
+        KuaiShouCampaignTemplate kuaiShouCampaignTemplateEntity = kuaiShouCampaignTemplateService.getById(kuaiShouCampaignTemplate.getId());
+        if (kuaiShouCampaignTemplateEntity == null) {
+            result.error500("未找到对应实体");
+        } else {
+            boolean ok = kuaiShouCampaignTemplateService.updateById(kuaiShouCampaignTemplate);
+            //TODO 返回false说明什么?
+            if (ok) {
+                result.success("修改成功!");
+            }
+        }
+
+        return result;
+    }
+
+    /**
+     * 通过id删除
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "快手-创建广告计划模板-通过id删除")
+    @ApiOperation(value = "快手-创建广告计划模板-通过id删除", notes = "快手-创建广告计划模板-通过id删除")
+    @DeleteMapping(value = "/delete")
+    public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
+        try {
+            kuaiShouCampaignTemplateService.removeById(id);
+        } catch (Exception e) {
+            log.error("删除失败", e.getMessage());
+            return Result.error("删除失败!");
+        }
+        return Result.ok("删除成功!");
+    }
+
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
+    @AutoLog(value = "快手-创建广告计划模板-批量删除")
+    @ApiOperation(value = "快手-创建广告计划模板-批量删除", notes = "快手-创建广告计划模板-批量删除")
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<KuaiShouCampaignTemplate> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        Result<KuaiShouCampaignTemplate> result = new Result<KuaiShouCampaignTemplate>();
+        if (ids == null || "".equals(ids.trim())) {
+            result.error500("参数不识别!");
+        } else {
+            this.kuaiShouCampaignTemplateService.removeByIds(Arrays.asList(ids.split(",")));
+            result.success("删除成功!");
+        }
+        return result;
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "快手-创建广告计划模板-通过id查询")
+    @ApiOperation(value = "快手-创建广告计划模板-通过id查询", notes = "快手-创建广告计划模板-通过id查询")
+    @GetMapping(value = "/queryById")
+    public Result<KuaiShouCampaignTemplate> queryById(@RequestParam(name = "id", required = true) String id) {
+        Result<KuaiShouCampaignTemplate> result = new Result<KuaiShouCampaignTemplate>();
+        KuaiShouCampaignTemplate kuaiShouCampaignTemplate = kuaiShouCampaignTemplateService.getById(id);
+        if (kuaiShouCampaignTemplate == null) {
+            result.error500("未找到对应实体");
+        } else {
+            result.setResult(kuaiShouCampaignTemplate);
+            result.setSuccess(true);
+        }
+        return result;
+    }
+
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param response
+     */
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
+        // Step.1 组装查询条件
+        QueryWrapper<KuaiShouCampaignTemplate> queryWrapper = null;
+        try {
+            String paramsStr = request.getParameter("paramsStr");
+            if (oConvertUtils.isNotEmpty(paramsStr)) {
+                String deString = URLDecoder.decode(paramsStr, "UTF-8");
+                KuaiShouCampaignTemplate kuaiShouCampaignTemplate = JSON.parseObject(deString, KuaiShouCampaignTemplate.class);
+                queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouCampaignTemplate, request.getParameterMap());
+            }
+        } catch (UnsupportedEncodingException e) {
+            e.printStackTrace();
+        }
+
+        //Step.2 AutoPoi 导出Excel
+        ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+        List<KuaiShouCampaignTemplate> pageList = kuaiShouCampaignTemplateService.list(queryWrapper);
+        //导出文件名称
+        mv.addObject(NormalExcelConstants.FILE_NAME, "快手-创建广告计划模板列表");
+        mv.addObject(NormalExcelConstants.CLASS, KuaiShouCampaignTemplate.class);
+        mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("快手-创建广告计划模板列表数据", "导出人:Jeecg", "导出信息"));
+        mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
+        return mv;
+    }
+
+    /**
+     * 通过excel导入数据
+     *
+     * @param request
+     * @param response
+     * @return
+     */
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
+        Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
+        for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
+            MultipartFile file = entity.getValue();// 获取上传文件对象
+            ImportParams params = new ImportParams();
+            params.setTitleRows(2);
+            params.setHeadRows(1);
+            params.setNeedSave(true);
+            try {
+                List<KuaiShouCampaignTemplate> listKuaiShouCampaignTemplates = ExcelImportUtil.importExcel(file.getInputStream(), KuaiShouCampaignTemplate.class, params);
+                kuaiShouCampaignTemplateService.saveBatch(listKuaiShouCampaignTemplates);
+                return Result.ok("文件导入成功!数据行数:" + listKuaiShouCampaignTemplates.size());
+            } catch (Exception e) {
+                log.error(e.getMessage(), e);
+                return Result.error("文件导入失败:" + e.getMessage());
+            } finally {
+                try {
+                    file.getInputStream().close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        return Result.ok("文件导入失败!");
+    }
 
 }

+ 13 - 37
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouController.java

@@ -1,7 +1,10 @@
 package org.jeecg.modules.kuaishou.controller;
 
+import cn.com.ctop.kuaishou.modules.material.entity.KuaishouResult;
+import cn.com.ctop.kuaishou.modules.report.entity.KuaishouReportDailyCampaign;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
+import org.jeecg.modules.ctop.entity.CTopOauthToken;
 import org.jeecg.modules.ctop.service.ICTopOauthTokenService;
 import org.jeecg.modules.ctop.service.IRefreshTokenService;
 import org.jeecg.modules.kuaishou.service.IKuaishouInterfaceService;
@@ -113,13 +116,6 @@ public class KuaiShouController {
     }
 
 
-    @RequestMapping(value = "/video/upload", consumes = "multipart/form-data;charset=utf-8")
-    public void upload(@RequestParam("multipartFile") MultipartFile multipartFile, HttpServletRequest request) throws IOException {
-        String accessToken = "75d8c4291d275c73a00f8f60d821b6bd";
-        Long advertiserId = 23212L;
-        kuaishouInterfaceService.videoUpload(advertiserId, accessToken, multipartFile, request);
-
-    }
 
 
     @RequestMapping("/video/get")
@@ -178,34 +174,6 @@ public class KuaiShouController {
     }
 
 
-    @RequestMapping(value = "/image/upload", consumes = "multipart/form-data;charset=utf-8")
-    public void imgUpload(@RequestParam("multipartFile") MultipartFile multipartFile, HttpServletRequest request) throws IOException {
-
-        String accessToken = "360d43b49553684a011d6607322582b1";
-        Long advertiserId = 23212L;
-
-        kuaishouInterfaceService.imageUpload(advertiserId, accessToken, multipartFile, request);
-
-    }
-
-
-    @RequestMapping(value = "/app/create", consumes = "multipart/form-data;charset=utf-8")
-    public void appCreate(@RequestParam("multipartFile") MultipartFile multipartFile, HttpServletRequest request) throws IOException {
-
-        String accessToken = "360d43b49553684a011d6607322582b1";
-        Long advertiserId = 23212L;
-
-        JSONObject requestJson = new JSONObject();
-        requestJson.put("app_version", "2.3.6");
-        requestJson.put("app_name", "微信开发1");
-        requestJson.put("image_token", "market81dd2187353e4cb19918b61276797ce5.jpg");
-        requestJson.put("advertiser_id", advertiserId);
-        requestJson.put("package_name", "2");
-        requestJson.put("platform", 1);
-        kuaishouInterfaceService.appCreate(advertiserId, accessToken, multipartFile, request, requestJson);
-
-    }
-
     @RequestMapping("/getAppList")
     public void getAppList() throws IOException {
         String accessToken = "360d43b49553684a011d6607322582b1";
@@ -234,8 +202,16 @@ public class KuaiShouController {
     }
 
     @RequestMapping("report")
-    public Map<String, Object> getReport() {
-        return new HashMap<>();
+    public Map<String, Object> getReport(String accountId) {
+        CTopOauthToken token = tokenService.getOAuthTokenByAccountId(accountId);
+        String startDate = "2019-08-14";
+        String endDate = "2019-08-14";
+        KuaishouResult<KuaishouReportDailyCampaign> stringObjectMap = kuaishouInterfaceService.getCampaignDailyReport(token.getAccessToken(), token.getAccountId(), startDate, endDate, 1000, 1);
+        Map<String, Object> result = new HashMap<>();
+        result.put("data", stringObjectMap);
+        return result;
     }
 
+    @Autowired
+    private ICTopOauthTokenService tokenService;
 }

+ 17 - 19
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouConversionInfosController.java

@@ -1,39 +1,37 @@
 package org.jeecg.modules.kuaishou.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.kuaishou.entity.KuaiShouConversionInfos;
 import org.jeecg.modules.kuaishou.service.IKuaiShouConversionInfosService;
-import java.util.Date;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
  /**
   * @Description: 快手-可选深度转化类型

+ 207 - 175
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouConversionTypesController.java

@@ -1,44 +1,46 @@
 package org.jeecg.modules.kuaishou.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import cn.com.ctop.common.utils.Check;
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.ctop.entity.CTopOauthToken;
+import org.jeecg.modules.ctop.service.ICTopOauthTokenService;
 import org.jeecg.modules.kuaishou.entity.KuaiShouConversionTypes;
 import org.jeecg.modules.kuaishou.service.IKuaiShouConversionTypesService;
-import java.util.Date;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
+import org.jeecg.modules.kuaishou.service.IKuaishouInterfaceService;
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
 
- /**
-  * @Description: 快手-可选深度转化类型-详情
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 快手-可选深度转化类型-详情
  * @Author: jeecg-boot
-  * @Date: 2019-07-24
+ * @Date: 2019-07-24
  * @Version: V1.0
  */
 @Slf4j
@@ -46,20 +48,45 @@ import io.swagger.annotations.ApiOperation;
 @RestController
 @RequestMapping("/kuaishou/kuaiShouConversionTypes")
 public class KuaiShouConversionTypesController {
-	@Autowired
+    @Autowired
     private IKuaiShouConversionTypesService kuaiShouConversionTypesService;
-	
-	/**
-	  * 分页列表查询
+    @Autowired
+    private IKuaishouInterfaceService kuaishouInterfaceService;
+    @Autowired
+    private ICTopOauthTokenService oauthTokenService;
+
+    @GetMapping(value = "/getIsActivate")
+    public Result<IPage<KuaiShouConversionTypes>> queryPageList(Long accountId) {
+        Result result = new Result<IPage<KuaiShouConversionTypes>>();
+        CTopOauthToken token = oauthTokenService.getOAuthTokenByAccountId(String.valueOf(accountId));
+        if (Check.isNull(token)) {
+            result.setSuccess(false);
+            result.setMessage("未获取到授权信息");
+            return result;
+        }
+        Map<String, Object> resultMap = kuaishouInterfaceService.getDeepConversionInfos(accountId, token.getAccessToken());
+        if ((Integer) resultMap.get("code") == 0) {
+            result.setResult(resultMap.get("isActivate"));
+        }
+        result.setSuccess(true);
+
+        return result;
+
+    }
+
+
+    /**
+     * 分页列表查询
+     *
      * @param kuaiShouConversionTypes
-	 * @param pageNo
-	 * @param pageSize
-	 * @param req
-	 * @return
-	 */
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
     @AutoLog(value = "快手-可选深度转化类型-详情-分页列表查询")
     @ApiOperation(value = "快手-可选深度转化类型-详情-分页列表查询", notes = "快手-可选深度转化类型-详情-分页列表查询")
-	@GetMapping(value = "/list")
+    @GetMapping(value = "/list")
     public Result<IPage<KuaiShouConversionTypes>> queryPageList(KuaiShouConversionTypes kuaiShouConversionTypes,
                                                                 @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
                                                                 @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
@@ -68,177 +95,182 @@ public class KuaiShouConversionTypesController {
         QueryWrapper<KuaiShouConversionTypes> queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouConversionTypes, req.getParameterMap());
         Page<KuaiShouConversionTypes> page = new Page<KuaiShouConversionTypes>(pageNo, pageSize);
         IPage<KuaiShouConversionTypes> pageList = kuaiShouConversionTypesService.page(page, queryWrapper);
-		result.setSuccess(true);
-		result.setResult(pageList);
-		return result;
-	}
-	
-	/**
-	  *   添加
+        result.setSuccess(true);
+        result.setResult(pageList);
+        return result;
+    }
+
+    /**
+     * 添加
+     *
      * @param kuaiShouConversionTypes
-	 * @return
-	 */
+     * @return
+     */
     @AutoLog(value = "快手-可选深度转化类型-详情-添加")
     @ApiOperation(value = "快手-可选深度转化类型-详情-添加", notes = "快手-可选深度转化类型-详情-添加")
-	@PostMapping(value = "/add")
+    @PostMapping(value = "/add")
     public Result<KuaiShouConversionTypes> add(@RequestBody KuaiShouConversionTypes kuaiShouConversionTypes) {
         Result<KuaiShouConversionTypes> result = new Result<KuaiShouConversionTypes>();
-		try {
+        try {
             kuaiShouConversionTypesService.save(kuaiShouConversionTypes);
-			result.success("添加成功!");
-		} catch (Exception e) {
-			log.error(e.getMessage(),e);
-			result.error500("操作失败");
-		}
-		return result;
-	}
-	
-	/**
-	  *  编辑
+            result.success("添加成功!");
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            result.error500("操作失败");
+        }
+        return result;
+    }
+
+    /**
+     * 编辑
+     *
      * @param kuaiShouConversionTypes
-	 * @return
-	 */
+     * @return
+     */
     @AutoLog(value = "快手-可选深度转化类型-详情-编辑")
     @ApiOperation(value = "快手-可选深度转化类型-详情-编辑", notes = "快手-可选深度转化类型-详情-编辑")
-	@PutMapping(value = "/edit")
+    @PutMapping(value = "/edit")
     public Result<KuaiShouConversionTypes> edit(@RequestBody KuaiShouConversionTypes kuaiShouConversionTypes) {
         Result<KuaiShouConversionTypes> result = new Result<KuaiShouConversionTypes>();
         KuaiShouConversionTypes kuaiShouConversionTypesEntity = kuaiShouConversionTypesService.getById(kuaiShouConversionTypes.getId());
         if (kuaiShouConversionTypesEntity == null) {
-			result.error500("未找到对应实体");
-		}else {
+            result.error500("未找到对应实体");
+        } else {
             boolean ok = kuaiShouConversionTypesService.updateById(kuaiShouConversionTypes);
-			//TODO 返回false说明什么?
-			if(ok) {
-				result.success("修改成功!");
-			}
-		}
-		
-		return result;
-	}
-	
-	/**
-	  *   通过id删除
-	 * @param id
-	 * @return
-	 */
+            //TODO 返回false说明什么?
+            if (ok) {
+                result.success("修改成功!");
+            }
+        }
+
+        return result;
+    }
+
+    /**
+     * 通过id删除
+     *
+     * @param id
+     * @return
+     */
     @AutoLog(value = "快手-可选深度转化类型-详情-通过id删除")
     @ApiOperation(value = "快手-可选深度转化类型-详情-通过id删除", notes = "快手-可选深度转化类型-详情-通过id删除")
-	@DeleteMapping(value = "/delete")
-	public Result<?> delete(@RequestParam(name="id",required=true) String id) {
-		try {
+    @DeleteMapping(value = "/delete")
+    public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
+        try {
             kuaiShouConversionTypesService.removeById(id);
-		} catch (Exception e) {
-			log.error("删除失败",e.getMessage());
-			return Result.error("删除失败!");
-		}
-		return Result.ok("删除成功!");
-	}
-	
-	/**
-	  *  批量删除
-	 * @param ids
-	 * @return
-	 */
+        } catch (Exception e) {
+            log.error("删除失败", e.getMessage());
+            return Result.error("删除失败!");
+        }
+        return Result.ok("删除成功!");
+    }
+
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
     @AutoLog(value = "快手-可选深度转化类型-详情-批量删除")
     @ApiOperation(value = "快手-可选深度转化类型-详情-批量删除", notes = "快手-可选深度转化类型-详情-批量删除")
-	@DeleteMapping(value = "/deleteBatch")
+    @DeleteMapping(value = "/deleteBatch")
     public Result<KuaiShouConversionTypes> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
         Result<KuaiShouConversionTypes> result = new Result<KuaiShouConversionTypes>();
-		if(ids==null || "".equals(ids.trim())) {
-			result.error500("参数不识别!");
-		}else {
+        if (ids == null || "".equals(ids.trim())) {
+            result.error500("参数不识别!");
+        } else {
             this.kuaiShouConversionTypesService.removeByIds(Arrays.asList(ids.split(",")));
-			result.success("删除成功!");
-		}
-		return result;
-	}
-	
-	/**
-	  * 通过id查询
-	 * @param id
-	 * @return
-	 */
+            result.success("删除成功!");
+        }
+        return result;
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
     @AutoLog(value = "快手-可选深度转化类型-详情-通过id查询")
     @ApiOperation(value = "快手-可选深度转化类型-详情-通过id查询", notes = "快手-可选深度转化类型-详情-通过id查询")
-	@GetMapping(value = "/queryById")
+    @GetMapping(value = "/queryById")
     public Result<KuaiShouConversionTypes> queryById(@RequestParam(name = "id", required = true) String id) {
         Result<KuaiShouConversionTypes> result = new Result<KuaiShouConversionTypes>();
         KuaiShouConversionTypes kuaiShouConversionTypes = kuaiShouConversionTypesService.getById(id);
         if (kuaiShouConversionTypes == null) {
-			result.error500("未找到对应实体");
-		}else {
+            result.error500("未找到对应实体");
+        } else {
             result.setResult(kuaiShouConversionTypes);
-			result.setSuccess(true);
-		}
-		return result;
-	}
-
-  /**
-      * 导出excel
-   *
-   * @param request
-   * @param response
-   */
-  @RequestMapping(value = "/exportXls")
-  public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
-      // Step.1 组装查询条件
-      QueryWrapper<KuaiShouConversionTypes> queryWrapper = null;
-      try {
-          String paramsStr = request.getParameter("paramsStr");
-          if (oConvertUtils.isNotEmpty(paramsStr)) {
-              String deString = URLDecoder.decode(paramsStr, "UTF-8");
-              KuaiShouConversionTypes kuaiShouConversionTypes = JSON.parseObject(deString, KuaiShouConversionTypes.class);
-              queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouConversionTypes, request.getParameterMap());
-          }
-      } catch (UnsupportedEncodingException e) {
-          e.printStackTrace();
-      }
-
-      //Step.2 AutoPoi 导出Excel
-      ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
-      List<KuaiShouConversionTypes> pageList = kuaiShouConversionTypesService.list(queryWrapper);
-      //导出文件名称
-      mv.addObject(NormalExcelConstants.FILE_NAME, "快手-可选深度转化类型-详情列表");
-      mv.addObject(NormalExcelConstants.CLASS, KuaiShouConversionTypes.class);
-      mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("快手-可选深度转化类型-详情列表数据", "导出人:Jeecg", "导出信息"));
-      mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
-      return mv;
-  }
-
-  /**
-      * 通过excel导入数据
-   *
-   * @param request
-   * @param response
-   * @return
-   */
-  @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
-  public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
-      MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
-      Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
-      for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
-          MultipartFile file = entity.getValue();// 获取上传文件对象
-          ImportParams params = new ImportParams();
-          params.setTitleRows(2);
-          params.setHeadRows(1);
-          params.setNeedSave(true);
-          try {
-              List<KuaiShouConversionTypes> listKuaiShouConversionTypess = ExcelImportUtil.importExcel(file.getInputStream(), KuaiShouConversionTypes.class, params);
-              kuaiShouConversionTypesService.saveBatch(listKuaiShouConversionTypess);
-              return Result.ok("文件导入成功!数据行数:" + listKuaiShouConversionTypess.size());
-          } catch (Exception e) {
-              log.error(e.getMessage(),e);
-              return Result.error("文件导入失败:"+e.getMessage());
-          } finally {
-              try {
-                  file.getInputStream().close();
-              } catch (IOException e) {
-                  e.printStackTrace();
-              }
-          }
-      }
-      return Result.ok("文件导入失败!");
-  }
+            result.setSuccess(true);
+        }
+        return result;
+    }
+
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param response
+     */
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
+        // Step.1 组装查询条件
+        QueryWrapper<KuaiShouConversionTypes> queryWrapper = null;
+        try {
+            String paramsStr = request.getParameter("paramsStr");
+            if (oConvertUtils.isNotEmpty(paramsStr)) {
+                String deString = URLDecoder.decode(paramsStr, "UTF-8");
+                KuaiShouConversionTypes kuaiShouConversionTypes = JSON.parseObject(deString, KuaiShouConversionTypes.class);
+                queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouConversionTypes, request.getParameterMap());
+            }
+        } catch (UnsupportedEncodingException e) {
+            e.printStackTrace();
+        }
+
+        //Step.2 AutoPoi 导出Excel
+        ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+        List<KuaiShouConversionTypes> pageList = kuaiShouConversionTypesService.list(queryWrapper);
+        //导出文件名称
+        mv.addObject(NormalExcelConstants.FILE_NAME, "快手-可选深度转化类型-详情列表");
+        mv.addObject(NormalExcelConstants.CLASS, KuaiShouConversionTypes.class);
+        mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("快手-可选深度转化类型-详情列表数据", "导出人:Jeecg", "导出信息"));
+        mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
+        return mv;
+    }
+
+    /**
+     * 通过excel导入数据
+     *
+     * @param request
+     * @param response
+     * @return
+     */
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
+        Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
+        for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
+            MultipartFile file = entity.getValue();// 获取上传文件对象
+            ImportParams params = new ImportParams();
+            params.setTitleRows(2);
+            params.setHeadRows(1);
+            params.setNeedSave(true);
+            try {
+                List<KuaiShouConversionTypes> listKuaiShouConversionTypess = ExcelImportUtil.importExcel(file.getInputStream(), KuaiShouConversionTypes.class, params);
+                kuaiShouConversionTypesService.saveBatch(listKuaiShouConversionTypess);
+                return Result.ok("文件导入成功!数据行数:" + listKuaiShouConversionTypess.size());
+            } catch (Exception e) {
+                log.error(e.getMessage(), e);
+                return Result.error("文件导入失败:" + e.getMessage());
+            } finally {
+                try {
+                    file.getInputStream().close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        return Result.ok("文件导入失败!");
+    }
 
 }

+ 229 - 217
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouCreateAppTemplateController.java

@@ -1,250 +1,262 @@
 package org.jeecg.modules.kuaishou.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import cn.com.ctop.common.utils.Check;
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.apache.shiro.SecurityUtils;
 import org.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.kuaishou.entity.KuaiShouCreateAppTemplate;
 import org.jeecg.modules.kuaishou.service.IKuaiShouCreateAppTemplateService;
-import java.util.Date;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
 
- /**
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
  * @Description: 创建应用
  * @Author: jeecg-boot
- * @Date:   2019-08-06
+ * @Date: 2019-08-06
  * @Version: V1.0
  */
 @Slf4j
-@Api(tags="创建应用")
+@Api(tags = "创建应用")
 @RestController
 @RequestMapping("/kuaishou/kuaiShouCreateAppTemplate")
 public class KuaiShouCreateAppTemplateController {
-	@Autowired
-	private IKuaiShouCreateAppTemplateService kuaiShouCreateAppTemplateService;
+    @Autowired
+    private IKuaiShouCreateAppTemplateService kuaiShouCreateAppTemplateService;
+
+    @PostMapping(value = "/insert")
+    public Map<String, Object> insert(@RequestBody KuaiShouCreateAppTemplate appTemplate) {
+        System.err.println(appTemplate.toString());
+        return kuaiShouCreateAppTemplateService.insert(appTemplate);
+    }
+
+    /**
+     * 分页列表查询
+     *
+     * @param kuaiShouCreateAppTemplate
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    @AutoLog(value = "创建应用-分页列表查询")
+    @ApiOperation(value = "创建应用-分页列表查询", notes = "创建应用-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<IPage<KuaiShouCreateAppTemplate>> queryPageList(KuaiShouCreateAppTemplate kuaiShouCreateAppTemplate,
+                                                                  @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                                  @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                                  HttpServletRequest req) {
+        Result<IPage<KuaiShouCreateAppTemplate>> result = new Result<IPage<KuaiShouCreateAppTemplate>>();
+        QueryWrapper<KuaiShouCreateAppTemplate> queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouCreateAppTemplate, req.getParameterMap());
+        LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+        System.err.println(user);
+        if(!Check.isNull(user)){
+            queryWrapper.eq("login_id", user.getId());
+        }
+        Page<KuaiShouCreateAppTemplate> page = new Page<KuaiShouCreateAppTemplate>(pageNo, pageSize);
+        IPage<KuaiShouCreateAppTemplate> pageList = kuaiShouCreateAppTemplateService.page(page, queryWrapper);
+        result.setSuccess(true);
+        result.setResult(pageList);
+        return result;
+    }
+
+    /**
+     * 添加
+     *
+     * @param kuaiShouCreateAppTemplate
+     * @return
+     */
+    @AutoLog(value = "创建应用-添加")
+    @ApiOperation(value = "创建应用-添加", notes = "创建应用-添加")
+    @PostMapping(value = "/add")
+    public Result<KuaiShouCreateAppTemplate> add(@RequestBody KuaiShouCreateAppTemplate kuaiShouCreateAppTemplate) {
+        Result<KuaiShouCreateAppTemplate> result = new Result<KuaiShouCreateAppTemplate>();
+        try {
+            kuaiShouCreateAppTemplateService.save(kuaiShouCreateAppTemplate);
+            result.success("添加成功!");
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            result.error500("操作失败");
+        }
+        return result;
+    }
+
+    /**
+     * 编辑
+     *
+     * @param kuaiShouCreateAppTemplate
+     * @return
+     */
+    @AutoLog(value = "创建应用-编辑")
+    @ApiOperation(value = "创建应用-编辑", notes = "创建应用-编辑")
+    @PutMapping(value = "/edit")
+    public Result<KuaiShouCreateAppTemplate> edit(@RequestBody KuaiShouCreateAppTemplate kuaiShouCreateAppTemplate) {
+        Result<KuaiShouCreateAppTemplate> result = new Result<KuaiShouCreateAppTemplate>();
+        KuaiShouCreateAppTemplate kuaiShouCreateAppTemplateEntity = kuaiShouCreateAppTemplateService.getById(kuaiShouCreateAppTemplate.getId());
+        if (kuaiShouCreateAppTemplateEntity == null) {
+            result.error500("未找到对应实体");
+        } else {
+            boolean ok = kuaiShouCreateAppTemplateService.updateById(kuaiShouCreateAppTemplate);
+            //TODO 返回false说明什么?
+            if (ok) {
+                result.success("修改成功!");
+            }
+        }
+
+        return result;
+    }
+
+    /**
+     * 通过id删除
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "创建应用-通过id删除")
+    @ApiOperation(value = "创建应用-通过id删除", notes = "创建应用-通过id删除")
+    @DeleteMapping(value = "/delete")
+    public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
+        try {
+            kuaiShouCreateAppTemplateService.removeById(id);
+        } catch (Exception e) {
+            log.error("删除失败", e.getMessage());
+            return Result.error("删除失败!");
+        }
+        return Result.ok("删除成功!");
+    }
 
-	 @PostMapping(value = "/insert")
-	 public Map<String, Object> insert(@RequestBody KuaiShouCreateAppTemplate appTemplate) {
-		 System.err.println(appTemplate.toString());
-		 return kuaiShouCreateAppTemplateService.insert(appTemplate);
-	 }
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
+    @AutoLog(value = "创建应用-批量删除")
+    @ApiOperation(value = "创建应用-批量删除", notes = "创建应用-批量删除")
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<KuaiShouCreateAppTemplate> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        Result<KuaiShouCreateAppTemplate> result = new Result<KuaiShouCreateAppTemplate>();
+        if (ids == null || "".equals(ids.trim())) {
+            result.error500("参数不识别!");
+        } else {
+            this.kuaiShouCreateAppTemplateService.removeByIds(Arrays.asList(ids.split(",")));
+            result.success("删除成功!");
+        }
+        return result;
+    }
 
-	/**
-	  * 分页列表查询
-	 * @param kuaiShouCreateAppTemplate
-	 * @param pageNo
-	 * @param pageSize
-	 * @param req
-	 * @return
-	 */
-	@AutoLog(value = "创建应用-分页列表查询")
-	@ApiOperation(value="创建应用-分页列表查询", notes="创建应用-分页列表查询")
-	@GetMapping(value = "/list")
-	public Result<IPage<KuaiShouCreateAppTemplate>> queryPageList(KuaiShouCreateAppTemplate kuaiShouCreateAppTemplate,
-									  @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
-									  @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
-									  HttpServletRequest req) {
-		Result<IPage<KuaiShouCreateAppTemplate>> result = new Result<IPage<KuaiShouCreateAppTemplate>>();
-		QueryWrapper<KuaiShouCreateAppTemplate> queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouCreateAppTemplate, req.getParameterMap());
-		Page<KuaiShouCreateAppTemplate> page = new Page<KuaiShouCreateAppTemplate>(pageNo, pageSize);
-		IPage<KuaiShouCreateAppTemplate> pageList = kuaiShouCreateAppTemplateService.page(page, queryWrapper);
-		result.setSuccess(true);
-		result.setResult(pageList);
-		return result;
-	}
-	
-	/**
-	  *   添加
-	 * @param kuaiShouCreateAppTemplate
-	 * @return
-	 */
-	@AutoLog(value = "创建应用-添加")
-	@ApiOperation(value="创建应用-添加", notes="创建应用-添加")
-	@PostMapping(value = "/add")
-	public Result<KuaiShouCreateAppTemplate> add(@RequestBody KuaiShouCreateAppTemplate kuaiShouCreateAppTemplate) {
-		Result<KuaiShouCreateAppTemplate> result = new Result<KuaiShouCreateAppTemplate>();
-		try {
-			kuaiShouCreateAppTemplateService.save(kuaiShouCreateAppTemplate);
-			result.success("添加成功!");
-		} catch (Exception e) {
-			log.error(e.getMessage(),e);
-			result.error500("操作失败");
-		}
-		return result;
-	}
-	
-	/**
-	  *  编辑
-	 * @param kuaiShouCreateAppTemplate
-	 * @return
-	 */
-	@AutoLog(value = "创建应用-编辑")
-	@ApiOperation(value="创建应用-编辑", notes="创建应用-编辑")
-	@PutMapping(value = "/edit")
-	public Result<KuaiShouCreateAppTemplate> edit(@RequestBody KuaiShouCreateAppTemplate kuaiShouCreateAppTemplate) {
-		Result<KuaiShouCreateAppTemplate> result = new Result<KuaiShouCreateAppTemplate>();
-		KuaiShouCreateAppTemplate kuaiShouCreateAppTemplateEntity = kuaiShouCreateAppTemplateService.getById(kuaiShouCreateAppTemplate.getId());
-		if(kuaiShouCreateAppTemplateEntity==null) {
-			result.error500("未找到对应实体");
-		}else {
-			boolean ok = kuaiShouCreateAppTemplateService.updateById(kuaiShouCreateAppTemplate);
-			//TODO 返回false说明什么?
-			if(ok) {
-				result.success("修改成功!");
-			}
-		}
-		
-		return result;
-	}
-	
-	/**
-	  *   通过id删除
-	 * @param id
-	 * @return
-	 */
-	@AutoLog(value = "创建应用-通过id删除")
-	@ApiOperation(value="创建应用-通过id删除", notes="创建应用-通过id删除")
-	@DeleteMapping(value = "/delete")
-	public Result<?> delete(@RequestParam(name="id",required=true) String id) {
-		try {
-			kuaiShouCreateAppTemplateService.removeById(id);
-		} catch (Exception e) {
-			log.error("删除失败",e.getMessage());
-			return Result.error("删除失败!");
-		}
-		return Result.ok("删除成功!");
-	}
-	
-	/**
-	  *  批量删除
-	 * @param ids
-	 * @return
-	 */
-	@AutoLog(value = "创建应用-批量删除")
-	@ApiOperation(value="创建应用-批量删除", notes="创建应用-批量删除")
-	@DeleteMapping(value = "/deleteBatch")
-	public Result<KuaiShouCreateAppTemplate> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
-		Result<KuaiShouCreateAppTemplate> result = new Result<KuaiShouCreateAppTemplate>();
-		if(ids==null || "".equals(ids.trim())) {
-			result.error500("参数不识别!");
-		}else {
-			this.kuaiShouCreateAppTemplateService.removeByIds(Arrays.asList(ids.split(",")));
-			result.success("删除成功!");
-		}
-		return result;
-	}
-	
-	/**
-	  * 通过id查询
-	 * @param id
-	 * @return
-	 */
-	@AutoLog(value = "创建应用-通过id查询")
-	@ApiOperation(value="创建应用-通过id查询", notes="创建应用-通过id查询")
-	@GetMapping(value = "/queryById")
-	public Result<KuaiShouCreateAppTemplate> queryById(@RequestParam(name="id",required=true) String id) {
-		Result<KuaiShouCreateAppTemplate> result = new Result<KuaiShouCreateAppTemplate>();
-		KuaiShouCreateAppTemplate kuaiShouCreateAppTemplate = kuaiShouCreateAppTemplateService.getById(id);
-		if(kuaiShouCreateAppTemplate==null) {
-			result.error500("未找到对应实体");
-		}else {
-			result.setResult(kuaiShouCreateAppTemplate);
-			result.setSuccess(true);
-		}
-		return result;
-	}
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "创建应用-通过id查询")
+    @ApiOperation(value = "创建应用-通过id查询", notes = "创建应用-通过id查询")
+    @GetMapping(value = "/queryById")
+    public Result<KuaiShouCreateAppTemplate> queryById(@RequestParam(name = "id", required = true) String id) {
+        Result<KuaiShouCreateAppTemplate> result = new Result<KuaiShouCreateAppTemplate>();
+        KuaiShouCreateAppTemplate kuaiShouCreateAppTemplate = kuaiShouCreateAppTemplateService.getById(id);
+        if (kuaiShouCreateAppTemplate == null) {
+            result.error500("未找到对应实体");
+        } else {
+            result.setResult(kuaiShouCreateAppTemplate);
+            result.setSuccess(true);
+        }
+        return result;
+    }
 
-  /**
-      * 导出excel
-   *
-   * @param request
-   * @param response
-   */
-  @RequestMapping(value = "/exportXls")
-  public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
-      // Step.1 组装查询条件
-      QueryWrapper<KuaiShouCreateAppTemplate> queryWrapper = null;
-      try {
-          String paramsStr = request.getParameter("paramsStr");
-          if (oConvertUtils.isNotEmpty(paramsStr)) {
-              String deString = URLDecoder.decode(paramsStr, "UTF-8");
-              KuaiShouCreateAppTemplate kuaiShouCreateAppTemplate = JSON.parseObject(deString, KuaiShouCreateAppTemplate.class);
-              queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouCreateAppTemplate, request.getParameterMap());
-          }
-      } catch (UnsupportedEncodingException e) {
-          e.printStackTrace();
-      }
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param response
+     */
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
+        // Step.1 组装查询条件
+        QueryWrapper<KuaiShouCreateAppTemplate> queryWrapper = null;
+        try {
+            String paramsStr = request.getParameter("paramsStr");
+            if (oConvertUtils.isNotEmpty(paramsStr)) {
+                String deString = URLDecoder.decode(paramsStr, "UTF-8");
+                KuaiShouCreateAppTemplate kuaiShouCreateAppTemplate = JSON.parseObject(deString, KuaiShouCreateAppTemplate.class);
+                queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouCreateAppTemplate, request.getParameterMap());
+            }
+        } catch (UnsupportedEncodingException e) {
+            e.printStackTrace();
+        }
 
-      //Step.2 AutoPoi 导出Excel
-      ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
-      List<KuaiShouCreateAppTemplate> pageList = kuaiShouCreateAppTemplateService.list(queryWrapper);
-      //导出文件名称
-      mv.addObject(NormalExcelConstants.FILE_NAME, "创建应用列表");
-      mv.addObject(NormalExcelConstants.CLASS, KuaiShouCreateAppTemplate.class);
-      mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("创建应用列表数据", "导出人:Jeecg", "导出信息"));
-      mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
-      return mv;
-  }
+        //Step.2 AutoPoi 导出Excel
+        ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+        List<KuaiShouCreateAppTemplate> pageList = kuaiShouCreateAppTemplateService.list(queryWrapper);
+        //导出文件名称
+        mv.addObject(NormalExcelConstants.FILE_NAME, "创建应用列表");
+        mv.addObject(NormalExcelConstants.CLASS, KuaiShouCreateAppTemplate.class);
+        mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("创建应用列表数据", "导出人:Jeecg", "导出信息"));
+        mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
+        return mv;
+    }
 
-  /**
-      * 通过excel导入数据
-   *
-   * @param request
-   * @param response
-   * @return
-   */
-  @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
-  public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
-      MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
-      Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
-      for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
-          MultipartFile file = entity.getValue();// 获取上传文件对象
-          ImportParams params = new ImportParams();
-          params.setTitleRows(2);
-          params.setHeadRows(1);
-          params.setNeedSave(true);
-          try {
-              List<KuaiShouCreateAppTemplate> listKuaiShouCreateAppTemplates = ExcelImportUtil.importExcel(file.getInputStream(), KuaiShouCreateAppTemplate.class, params);
-              kuaiShouCreateAppTemplateService.saveBatch(listKuaiShouCreateAppTemplates);
-              return Result.ok("文件导入成功!数据行数:" + listKuaiShouCreateAppTemplates.size());
-          } catch (Exception e) {
-              log.error(e.getMessage(),e);
-              return Result.error("文件导入失败:"+e.getMessage());
-          } finally {
-              try {
-                  file.getInputStream().close();
-              } catch (IOException e) {
-                  e.printStackTrace();
-              }
-          }
-      }
-      return Result.ok("文件导入失败!");
-  }
+    /**
+     * 通过excel导入数据
+     *
+     * @param request
+     * @param response
+     * @return
+     */
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
+        Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
+        for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
+            MultipartFile file = entity.getValue();// 获取上传文件对象
+            ImportParams params = new ImportParams();
+            params.setTitleRows(2);
+            params.setHeadRows(1);
+            params.setNeedSave(true);
+            try {
+                List<KuaiShouCreateAppTemplate> listKuaiShouCreateAppTemplates = ExcelImportUtil.importExcel(file.getInputStream(), KuaiShouCreateAppTemplate.class, params);
+                kuaiShouCreateAppTemplateService.saveBatch(listKuaiShouCreateAppTemplates);
+                return Result.ok("文件导入成功!数据行数:" + listKuaiShouCreateAppTemplates.size());
+            } catch (Exception e) {
+                log.error(e.getMessage(), e);
+                return Result.error("文件导入失败:" + e.getMessage());
+            } finally {
+                try {
+                    file.getInputStream().close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        return Result.ok("文件导入失败!");
+    }
 
 }

+ 78 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouCreateController.java

@@ -0,0 +1,78 @@
+package org.jeecg.modules.kuaishou.controller;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.modules.kuaishou.entity.KuaiShouGroupCreateLog;
+import org.jeecg.modules.kuaishou.service.IKuaiShouCreateService;
+import org.springframework.beans.factory.annotation.Autowired;
+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.RestController;
+
+import java.util.Map;
+
+@RestController
+@RequestMapping("/kuaishou/create")
+public class KuaiShouCreateController {
+
+    @Autowired
+    private IKuaiShouCreateService kuaiShouCreateService;
+
+    /**
+     * 创建 广告组
+     *
+     * @param groupCreateTemplate
+     * @return
+     */
+    @PostMapping("/createGroups")
+    public Result<KuaiShouGroupCreateLog> createGroups(@RequestBody KuaiShouGroupCreateLog groupCreateTemplate) {
+        Result<KuaiShouGroupCreateLog> result = new Result<KuaiShouGroupCreateLog>();
+        Map<String, Object> map = kuaiShouCreateService.createGroups(groupCreateTemplate);
+        if ((Integer) map.get("code") == 0) {
+            result.setSuccess(true);
+        } else {
+            result.setSuccess(false);
+            result.setMessage((String) map.get("desc"));
+        }
+        return result;
+
+
+    }
+
+    /**
+     * 创建创意
+     *
+     * @param requestJson
+     * @return
+     */
+    @PostMapping("/createCreative")
+    public Result<KuaiShouGroupCreateLog> createCreative(@RequestBody JSONObject requestJson) {
+        Result<KuaiShouGroupCreateLog> result = new Result<KuaiShouGroupCreateLog>();
+        Map<String, Object> map = kuaiShouCreateService.createCreative(requestJson);
+        if ((Integer) map.get("code") == 0) {
+            result.setSuccess(true);
+        } else {
+            result.setSuccess(false);
+            result.setMessage((String) map.get("desc"));
+        }
+        return result;
+
+
+    }
+
+
+    @PostMapping("/getOptions")
+    public JSONArray getOptions(@RequestBody JSONObject requestJson) {
+        return kuaiShouCreateService.getOptions(requestJson.getString("loginId"), requestJson.getLong("accountId"));
+    }
+
+    @PostMapping("/getChildren")
+    public JSONArray getChildren(@RequestBody JSONObject requestJson) {
+        return kuaiShouCreateService.getChildren(requestJson.getString("loginId"), requestJson.getLong("campaignId"), requestJson.getLong("accountId"));
+    }
+
+
+}

+ 17 - 22
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouCreativeController.java

@@ -1,42 +1,37 @@
 package org.jeecg.modules.kuaishou.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.kuaishou.entity.KuaiShouCreative;
 import org.jeecg.modules.kuaishou.service.IKuaiShouCreativeService;
-
-import java.util.Date;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 快手-创意信息

+ 17 - 22
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouCreativeCreateController.java

@@ -1,42 +1,37 @@
 package org.jeecg.modules.kuaishou.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.kuaishou.entity.KuaiShouCreativeCreate;
 import org.jeecg.modules.kuaishou.service.IKuaiShouCreativeCreateService;
-
-import java.util.Date;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 快手-创建创意信息

+ 17 - 22
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouGroupController.java

@@ -1,42 +1,37 @@
 package org.jeecg.modules.kuaishou.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.kuaishou.entity.KuaiShouGroup;
 import org.jeecg.modules.kuaishou.service.IKuaiShouGroupService;
-
-import java.util.Date;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 广告组信息

+ 17 - 19
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouGroupCreateController.java

@@ -1,39 +1,37 @@
 package org.jeecg.modules.kuaishou.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.kuaishou.entity.KuaiShouGroupCreate;
 import org.jeecg.modules.kuaishou.service.IKuaiShouGroupCreateService;
-import java.util.Date;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
  /**
   * @Description: 快手-创建广告组信息

+ 262 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouGroupCreateLogController.java

@@ -0,0 +1,262 @@
+package org.jeecg.modules.kuaishou.controller;
+
+import cn.com.ctop.common.utils.Check;
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.apache.shiro.SecurityUtils;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.system.vo.LoginUser;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.kuaishou.entity.KuaiShouGroupCreateLog;
+import org.jeecg.modules.kuaishou.service.IKuaiShouGroupCreateLogService;
+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.*;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Description: 快手-批量创建广告组
+ * @Author: jeecg-boot
+ * @Date: 2019-08-09
+ * @Version: V1.0
+ */
+@Slf4j
+@Api(tags = "快手-批量创建广告组")
+@RestController
+@RequestMapping("/kuaishou/kuaiShouGroupCreateLog")
+public class KuaiShouGroupCreateLogController {
+    @Autowired
+    private IKuaiShouGroupCreateLogService kuaiShouGroupCreateLogService;
+
+
+    @PostMapping(value = "/insert")
+    public Map<String, Object> insert(@RequestBody KuaiShouGroupCreateLog groupCreateTemplate) {
+        System.err.println(groupCreateTemplate);
+        return kuaiShouGroupCreateLogService.insert(groupCreateTemplate);
+    }
+
+    /**
+     * 分页列表查询
+     *
+     * @param kuaiShouGroupCreateLog
+     * @param pageNo
+     * @param pageSize
+     * @param req
+     * @return
+     */
+    @AutoLog(value = "快手-批量创建广告组-分页列表查询")
+    @ApiOperation(value = "快手-批量创建广告组-分页列表查询", notes = "快手-批量创建广告组-分页列表查询")
+    @GetMapping(value = "/list")
+    public Result<IPage<KuaiShouGroupCreateLog>> queryPageList(KuaiShouGroupCreateLog kuaiShouGroupCreateLog,
+                                                               @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
+                                                               @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
+                                                               HttpServletRequest req) {
+        Result<IPage<KuaiShouGroupCreateLog>> result = new Result<IPage<KuaiShouGroupCreateLog>>();
+        QueryWrapper<KuaiShouGroupCreateLog> queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouGroupCreateLog, req.getParameterMap());
+        LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+        if (!Check.isNull(user)) {
+            queryWrapper.eq("login_id", user.getId());
+        }
+        Page<KuaiShouGroupCreateLog> page = new Page<KuaiShouGroupCreateLog>(pageNo, pageSize);
+        IPage<KuaiShouGroupCreateLog> pageList = kuaiShouGroupCreateLogService.page(page, queryWrapper);
+        result.setSuccess(true);
+        result.setResult(pageList);
+        return result;
+    }
+
+    /**
+     * 添加
+     *
+     * @param kuaiShouGroupCreateLog
+     * @return
+     */
+    @AutoLog(value = "快手-批量创建广告组-添加")
+    @ApiOperation(value = "快手-批量创建广告组-添加", notes = "快手-批量创建广告组-添加")
+    @PostMapping(value = "/add")
+    public Result<KuaiShouGroupCreateLog> add(@RequestBody KuaiShouGroupCreateLog kuaiShouGroupCreateLog) {
+        Result<KuaiShouGroupCreateLog> result = new Result<KuaiShouGroupCreateLog>();
+        try {
+            kuaiShouGroupCreateLogService.save(kuaiShouGroupCreateLog);
+            result.success("添加成功!");
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            result.error500("操作失败");
+        }
+        return result;
+    }
+
+    /**
+     * 编辑
+     *
+     * @param kuaiShouGroupCreateLog
+     * @return
+     */
+    @AutoLog(value = "快手-批量创建广告组-编辑")
+    @ApiOperation(value = "快手-批量创建广告组-编辑", notes = "快手-批量创建广告组-编辑")
+    @PutMapping(value = "/edit")
+    public Result<KuaiShouGroupCreateLog> edit(@RequestBody KuaiShouGroupCreateLog kuaiShouGroupCreateLog) {
+        Result<KuaiShouGroupCreateLog> result = new Result<KuaiShouGroupCreateLog>();
+        KuaiShouGroupCreateLog kuaiShouGroupCreateLogEntity = kuaiShouGroupCreateLogService.getById(kuaiShouGroupCreateLog.getId());
+        if (kuaiShouGroupCreateLogEntity == null) {
+            result.error500("未找到对应实体");
+        } else {
+            boolean ok = kuaiShouGroupCreateLogService.updateById(kuaiShouGroupCreateLog);
+            //TODO 返回false说明什么?
+            if (ok) {
+                result.success("修改成功!");
+            }
+        }
+
+        return result;
+    }
+
+    /**
+     * 通过id删除
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "快手-批量创建广告组-通过id删除")
+    @ApiOperation(value = "快手-批量创建广告组-通过id删除", notes = "快手-批量创建广告组-通过id删除")
+    @DeleteMapping(value = "/delete")
+    public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
+        try {
+            kuaiShouGroupCreateLogService.removeById(id);
+        } catch (Exception e) {
+            log.error("删除失败", e.getMessage());
+            return Result.error("删除失败!");
+        }
+        return Result.ok("删除成功!");
+    }
+
+    /**
+     * 批量删除
+     *
+     * @param ids
+     * @return
+     */
+    @AutoLog(value = "快手-批量创建广告组-批量删除")
+    @ApiOperation(value = "快手-批量创建广告组-批量删除", notes = "快手-批量创建广告组-批量删除")
+    @DeleteMapping(value = "/deleteBatch")
+    public Result<KuaiShouGroupCreateLog> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
+        Result<KuaiShouGroupCreateLog> result = new Result<KuaiShouGroupCreateLog>();
+        if (ids == null || "".equals(ids.trim())) {
+            result.error500("参数不识别!");
+        } else {
+            this.kuaiShouGroupCreateLogService.removeByIds(Arrays.asList(ids.split(",")));
+            result.success("删除成功!");
+        }
+        return result;
+    }
+
+    /**
+     * 通过id查询
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "快手-批量创建广告组-通过id查询")
+    @ApiOperation(value = "快手-批量创建广告组-通过id查询", notes = "快手-批量创建广告组-通过id查询")
+    @GetMapping(value = "/queryById")
+    public Result<KuaiShouGroupCreateLog> queryById(@RequestParam(name = "id", required = true) String id) {
+        Result<KuaiShouGroupCreateLog> result = new Result<KuaiShouGroupCreateLog>();
+        KuaiShouGroupCreateLog kuaiShouGroupCreateLog = kuaiShouGroupCreateLogService.getById(id);
+        if (kuaiShouGroupCreateLog == null) {
+            result.error500("未找到对应实体");
+        } else {
+            result.setResult(kuaiShouGroupCreateLog);
+            result.setSuccess(true);
+        }
+        return result;
+    }
+
+    /**
+     * 导出excel
+     *
+     * @param request
+     * @param response
+     */
+    @RequestMapping(value = "/exportXls")
+    public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
+        // Step.1 组装查询条件
+        QueryWrapper<KuaiShouGroupCreateLog> queryWrapper = null;
+        try {
+            String paramsStr = request.getParameter("paramsStr");
+            if (oConvertUtils.isNotEmpty(paramsStr)) {
+                String deString = URLDecoder.decode(paramsStr, "UTF-8");
+                KuaiShouGroupCreateLog kuaiShouGroupCreateLog = JSON.parseObject(deString, KuaiShouGroupCreateLog.class);
+                queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouGroupCreateLog, request.getParameterMap());
+            }
+        } catch (UnsupportedEncodingException e) {
+            e.printStackTrace();
+        }
+
+        //Step.2 AutoPoi 导出Excel
+        ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+        List<KuaiShouGroupCreateLog> pageList = kuaiShouGroupCreateLogService.list(queryWrapper);
+        //导出文件名称
+        mv.addObject(NormalExcelConstants.FILE_NAME, "快手-批量创建广告组列表");
+        mv.addObject(NormalExcelConstants.CLASS, KuaiShouGroupCreateLog.class);
+        mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("快手-批量创建广告组列表数据", "导出人:Jeecg", "导出信息"));
+        mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
+        return mv;
+    }
+
+    /**
+     * 通过excel导入数据
+     *
+     * @param request
+     * @param response
+     * @return
+     */
+    @RequestMapping(value = "/importExcel", method = RequestMethod.POST)
+    public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
+        MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
+        Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
+        for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
+            MultipartFile file = entity.getValue();// 获取上传文件对象
+            ImportParams params = new ImportParams();
+            params.setTitleRows(2);
+            params.setHeadRows(1);
+            params.setNeedSave(true);
+            try {
+                List<KuaiShouGroupCreateLog> listKuaiShouGroupCreateLogs = ExcelImportUtil.importExcel(file.getInputStream(), KuaiShouGroupCreateLog.class, params);
+                kuaiShouGroupCreateLogService.saveBatch(listKuaiShouGroupCreateLogs);
+                return Result.ok("文件导入成功!数据行数:" + listKuaiShouGroupCreateLogs.size());
+            } catch (Exception e) {
+                log.error(e.getMessage(), e);
+                return Result.error("文件导入失败:" + e.getMessage());
+            } finally {
+                try {
+                    file.getInputStream().close();
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+            }
+        }
+        return Result.ok("文件导入失败!");
+    }
+
+}

+ 17 - 19
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouGroupCreateTargetController.java

@@ -1,39 +1,37 @@
 package org.jeecg.modules.kuaishou.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.kuaishou.entity.KuaiShouGroupCreateTarget;
 import org.jeecg.modules.kuaishou.service.IKuaiShouGroupCreateTargetService;
-import java.util.Date;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
  /**
   * @Description: 快手-创建广告组定向信息

+ 83 - 81
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouGroupCreateTemplateController.java

@@ -1,80 +1,82 @@
 package org.jeecg.modules.kuaishou.controller;
 
-import com.alibaba.fastjson.JSON;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import cn.com.ctop.common.utils.Check;
+import org.apache.shiro.SecurityUtils;
+import org.jeecg.common.api.vo.Result;
+import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.vo.LoginUser;
+import org.jeecg.common.util.oConvertUtils;
+import org.jeecg.modules.kuaishou.entity.KuaiShouImage;
+import org.jeecg.modules.kuaishou.service.IKuaiShouImageService;
+import java.util.Date;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 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.jeecg.common.api.vo.Result;
-import org.jeecg.common.aspect.annotation.AutoLog;
-import org.jeecg.common.system.query.QueryGenerator;
-import org.jeecg.common.util.oConvertUtils;
-import org.jeecg.modules.kuaishou.entity.KuaiShouCreateAppTemplate;
-import org.jeecg.modules.kuaishou.entity.KuaiShouGroupCreateTemplate;
-import org.jeecg.modules.kuaishou.service.IKuaiShouGroupCreateTemplateService;
+
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
+import com.alibaba.fastjson.JSON;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
 
  /**
- * @Description: 快手-创建广告组信息模板
+ * @Description: 快手-本地图片保存
  * @Author: jeecg-boot
- * @Date:   2019-08-07
+ * @Date:   2019-08-14
  * @Version: V1.0
  */
 @Slf4j
-@Api(tags="快手-创建广告组信息模板")
+@Api(tags="快手-本地图片保存")
 @RestController
-@RequestMapping("/kuaishou/kuaiShouGroupCreateTemplate")
-public class KuaiShouGroupCreateTemplateController {
+@RequestMapping("/kuaishou/kuaiShouImage")
+public class KuaiShouImageController {
 	@Autowired
-	private IKuaiShouGroupCreateTemplateService kuaiShouGroupCreateTemplateService;
-
-
-	 @PostMapping(value = "/insert")
-	 public Map<String, Object> insert(@RequestBody KuaiShouGroupCreateTemplate groupCreateTemplate) {
-		 System.err.println(groupCreateTemplate);
-		 return kuaiShouGroupCreateTemplateService.insert(groupCreateTemplate);
-	 }
-
-
+	private IKuaiShouImageService kuaiShouImageService;
+	
 	/**
 	  * 分页列表查询
-	 * @param kuaiShouGroupCreateTemplate
+	 * @param kuaiShouImage
 	 * @param pageNo
 	 * @param pageSize
 	 * @param req
 	 * @return
 	 */
-	@AutoLog(value = "快手-创建广告组信息模板-分页列表查询")
-	@ApiOperation(value="快手-创建广告组信息模板-分页列表查询", notes="快手-创建广告组信息模板-分页列表查询")
+	@AutoLog(value = "快手-本地图片保存-分页列表查询")
+	@ApiOperation(value="快手-本地图片保存-分页列表查询", notes="快手-本地图片保存-分页列表查询")
 	@GetMapping(value = "/list")
-	public Result<IPage<KuaiShouGroupCreateTemplate>> queryPageList(KuaiShouGroupCreateTemplate kuaiShouGroupCreateTemplate,
+	public Result<IPage<KuaiShouImage>> queryPageList(KuaiShouImage kuaiShouImage,
 									  @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
 									  @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
 									  HttpServletRequest req) {
-		Result<IPage<KuaiShouGroupCreateTemplate>> result = new Result<IPage<KuaiShouGroupCreateTemplate>>();
-		QueryWrapper<KuaiShouGroupCreateTemplate> queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouGroupCreateTemplate, req.getParameterMap());
-		Page<KuaiShouGroupCreateTemplate> page = new Page<KuaiShouGroupCreateTemplate>(pageNo, pageSize);
-		IPage<KuaiShouGroupCreateTemplate> pageList = kuaiShouGroupCreateTemplateService.page(page, queryWrapper);
+		Result<IPage<KuaiShouImage>> result = new Result<IPage<KuaiShouImage>>();
+
+		QueryWrapper<KuaiShouImage> queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouImage, req.getParameterMap());
+		LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+		if(!Check.isNull(user)){
+			queryWrapper.eq("login_id", user.getId());
+		}
+		Page<KuaiShouImage> page = new Page<KuaiShouImage>(pageNo, pageSize);
+		IPage<KuaiShouImage> pageList = kuaiShouImageService.page(page, queryWrapper);
 		result.setSuccess(true);
 		result.setResult(pageList);
 		return result;
@@ -82,16 +84,16 @@ public class KuaiShouGroupCreateTemplateController {
 	
 	/**
 	  *   添加
-	 * @param kuaiShouGroupCreateTemplate
+	 * @param kuaiShouImage
 	 * @return
 	 */
-	@AutoLog(value = "快手-创建广告组信息模板-添加")
-	@ApiOperation(value="快手-创建广告组信息模板-添加", notes="快手-创建广告组信息模板-添加")
+	@AutoLog(value = "快手-本地图片保存-添加")
+	@ApiOperation(value="快手-本地图片保存-添加", notes="快手-本地图片保存-添加")
 	@PostMapping(value = "/add")
-	public Result<KuaiShouGroupCreateTemplate> add(@RequestBody KuaiShouGroupCreateTemplate kuaiShouGroupCreateTemplate) {
-		Result<KuaiShouGroupCreateTemplate> result = new Result<KuaiShouGroupCreateTemplate>();
+	public Result<KuaiShouImage> add(@RequestBody KuaiShouImage kuaiShouImage) {
+		Result<KuaiShouImage> result = new Result<KuaiShouImage>();
 		try {
-			kuaiShouGroupCreateTemplateService.save(kuaiShouGroupCreateTemplate);
+			kuaiShouImageService.save(kuaiShouImage);
 			result.success("添加成功!");
 		} catch (Exception e) {
 			log.error(e.getMessage(),e);
@@ -102,19 +104,19 @@ public class KuaiShouGroupCreateTemplateController {
 	
 	/**
 	  *  编辑
-	 * @param kuaiShouGroupCreateTemplate
+	 * @param kuaiShouImage
 	 * @return
 	 */
-	@AutoLog(value = "快手-创建广告组信息模板-编辑")
-	@ApiOperation(value="快手-创建广告组信息模板-编辑", notes="快手-创建广告组信息模板-编辑")
+	@AutoLog(value = "快手-本地图片保存-编辑")
+	@ApiOperation(value="快手-本地图片保存-编辑", notes="快手-本地图片保存-编辑")
 	@PutMapping(value = "/edit")
-	public Result<KuaiShouGroupCreateTemplate> edit(@RequestBody KuaiShouGroupCreateTemplate kuaiShouGroupCreateTemplate) {
-		Result<KuaiShouGroupCreateTemplate> result = new Result<KuaiShouGroupCreateTemplate>();
-		KuaiShouGroupCreateTemplate kuaiShouGroupCreateTemplateEntity = kuaiShouGroupCreateTemplateService.getById(kuaiShouGroupCreateTemplate.getId());
-		if(kuaiShouGroupCreateTemplateEntity==null) {
+	public Result<KuaiShouImage> edit(@RequestBody KuaiShouImage kuaiShouImage) {
+		Result<KuaiShouImage> result = new Result<KuaiShouImage>();
+		KuaiShouImage kuaiShouImageEntity = kuaiShouImageService.getById(kuaiShouImage.getId());
+		if(kuaiShouImageEntity==null) {
 			result.error500("未找到对应实体");
 		}else {
-			boolean ok = kuaiShouGroupCreateTemplateService.updateById(kuaiShouGroupCreateTemplate);
+			boolean ok = kuaiShouImageService.updateById(kuaiShouImage);
 			//TODO 返回false说明什么?
 			if(ok) {
 				result.success("修改成功!");
@@ -129,12 +131,12 @@ public class KuaiShouGroupCreateTemplateController {
 	 * @param id
 	 * @return
 	 */
-	@AutoLog(value = "快手-创建广告组信息模板-通过id删除")
-	@ApiOperation(value="快手-创建广告组信息模板-通过id删除", notes="快手-创建广告组信息模板-通过id删除")
+	@AutoLog(value = "快手-本地图片保存-通过id删除")
+	@ApiOperation(value="快手-本地图片保存-通过id删除", notes="快手-本地图片保存-通过id删除")
 	@DeleteMapping(value = "/delete")
 	public Result<?> delete(@RequestParam(name="id",required=true) String id) {
 		try {
-			kuaiShouGroupCreateTemplateService.removeById(id);
+			kuaiShouImageService.removeById(id);
 		} catch (Exception e) {
 			log.error("删除失败",e.getMessage());
 			return Result.error("删除失败!");
@@ -147,15 +149,15 @@ public class KuaiShouGroupCreateTemplateController {
 	 * @param ids
 	 * @return
 	 */
-	@AutoLog(value = "快手-创建广告组信息模板-批量删除")
-	@ApiOperation(value="快手-创建广告组信息模板-批量删除", notes="快手-创建广告组信息模板-批量删除")
+	@AutoLog(value = "快手-本地图片保存-批量删除")
+	@ApiOperation(value="快手-本地图片保存-批量删除", notes="快手-本地图片保存-批量删除")
 	@DeleteMapping(value = "/deleteBatch")
-	public Result<KuaiShouGroupCreateTemplate> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
-		Result<KuaiShouGroupCreateTemplate> result = new Result<KuaiShouGroupCreateTemplate>();
+	public Result<KuaiShouImage> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		Result<KuaiShouImage> result = new Result<KuaiShouImage>();
 		if(ids==null || "".equals(ids.trim())) {
 			result.error500("参数不识别!");
 		}else {
-			this.kuaiShouGroupCreateTemplateService.removeByIds(Arrays.asList(ids.split(",")));
+			this.kuaiShouImageService.removeByIds(Arrays.asList(ids.split(",")));
 			result.success("删除成功!");
 		}
 		return result;
@@ -166,16 +168,16 @@ public class KuaiShouGroupCreateTemplateController {
 	 * @param id
 	 * @return
 	 */
-	@AutoLog(value = "快手-创建广告组信息模板-通过id查询")
-	@ApiOperation(value="快手-创建广告组信息模板-通过id查询", notes="快手-创建广告组信息模板-通过id查询")
+	@AutoLog(value = "快手-本地图片保存-通过id查询")
+	@ApiOperation(value="快手-本地图片保存-通过id查询", notes="快手-本地图片保存-通过id查询")
 	@GetMapping(value = "/queryById")
-	public Result<KuaiShouGroupCreateTemplate> queryById(@RequestParam(name="id",required=true) String id) {
-		Result<KuaiShouGroupCreateTemplate> result = new Result<KuaiShouGroupCreateTemplate>();
-		KuaiShouGroupCreateTemplate kuaiShouGroupCreateTemplate = kuaiShouGroupCreateTemplateService.getById(id);
-		if(kuaiShouGroupCreateTemplate==null) {
+	public Result<KuaiShouImage> queryById(@RequestParam(name="id",required=true) String id) {
+		Result<KuaiShouImage> result = new Result<KuaiShouImage>();
+		KuaiShouImage kuaiShouImage = kuaiShouImageService.getById(id);
+		if(kuaiShouImage==null) {
 			result.error500("未找到对应实体");
 		}else {
-			result.setResult(kuaiShouGroupCreateTemplate);
+			result.setResult(kuaiShouImage);
 			result.setSuccess(true);
 		}
 		return result;
@@ -190,13 +192,13 @@ public class KuaiShouGroupCreateTemplateController {
   @RequestMapping(value = "/exportXls")
   public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
       // Step.1 组装查询条件
-      QueryWrapper<KuaiShouGroupCreateTemplate> queryWrapper = null;
+      QueryWrapper<KuaiShouImage> queryWrapper = null;
       try {
           String paramsStr = request.getParameter("paramsStr");
           if (oConvertUtils.isNotEmpty(paramsStr)) {
               String deString = URLDecoder.decode(paramsStr, "UTF-8");
-              KuaiShouGroupCreateTemplate kuaiShouGroupCreateTemplate = JSON.parseObject(deString, KuaiShouGroupCreateTemplate.class);
-              queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouGroupCreateTemplate, request.getParameterMap());
+              KuaiShouImage kuaiShouImage = JSON.parseObject(deString, KuaiShouImage.class);
+              queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouImage, request.getParameterMap());
           }
       } catch (UnsupportedEncodingException e) {
           e.printStackTrace();
@@ -204,11 +206,11 @@ public class KuaiShouGroupCreateTemplateController {
 
       //Step.2 AutoPoi 导出Excel
       ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
-      List<KuaiShouGroupCreateTemplate> pageList = kuaiShouGroupCreateTemplateService.list(queryWrapper);
+      List<KuaiShouImage> pageList = kuaiShouImageService.list(queryWrapper);
       //导出文件名称
-      mv.addObject(NormalExcelConstants.FILE_NAME, "快手-创建广告组信息模板列表");
-      mv.addObject(NormalExcelConstants.CLASS, KuaiShouGroupCreateTemplate.class);
-      mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("快手-创建广告组信息模板列表数据", "导出人:Jeecg", "导出信息"));
+      mv.addObject(NormalExcelConstants.FILE_NAME, "快手-本地图片保存列表");
+      mv.addObject(NormalExcelConstants.CLASS, KuaiShouImage.class);
+      mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("快手-本地图片保存列表数据", "导出人:Jeecg", "导出信息"));
       mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
       return mv;
   }
@@ -231,9 +233,9 @@ public class KuaiShouGroupCreateTemplateController {
           params.setHeadRows(1);
           params.setNeedSave(true);
           try {
-              List<KuaiShouGroupCreateTemplate> listKuaiShouGroupCreateTemplates = ExcelImportUtil.importExcel(file.getInputStream(), KuaiShouGroupCreateTemplate.class, params);
-              kuaiShouGroupCreateTemplateService.saveBatch(listKuaiShouGroupCreateTemplates);
-              return Result.ok("文件导入成功!数据行数:" + listKuaiShouGroupCreateTemplates.size());
+              List<KuaiShouImage> listKuaiShouImages = ExcelImportUtil.importExcel(file.getInputStream(), KuaiShouImage.class, params);
+              kuaiShouImageService.saveBatch(listKuaiShouImages);
+              return Result.ok("文件导入成功!数据行数:" + listKuaiShouImages.size());
           } catch (Exception e) {
               log.error(e.getMessage(),e);
               return Result.error("文件导入失败:"+e.getMessage());

+ 17 - 22
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouImageGetController.java

@@ -1,42 +1,37 @@
 package org.jeecg.modules.kuaishou.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.kuaishou.entity.KuaiShouImageGet;
 import org.jeecg.modules.kuaishou.service.IKuaiShouImageGetService;
-
-import java.util.Date;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 快手-获取图片接口

+ 17 - 22
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouImageUploandController.java

@@ -1,42 +1,37 @@
 package org.jeecg.modules.kuaishou.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.kuaishou.entity.KuaiShouImageUploand;
 import org.jeecg.modules.kuaishou.service.IKuaiShouImageUploandService;
-
-import java.util.Date;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 快手-上传图片接口

+ 17 - 22
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouRegionListChildrenController.java

@@ -1,42 +1,37 @@
 package org.jeecg.modules.kuaishou.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.kuaishou.entity.KuaiShouRegionListChildren;
 import org.jeecg.modules.kuaishou.service.IKuaiShouRegionListChildrenService;
-
-import java.util.Date;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 快手-子级地域

+ 17 - 22
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouRegionListParentController.java

@@ -1,42 +1,37 @@
 package org.jeecg.modules.kuaishou.controller;
 
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLDecoder;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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.jeecg.common.api.vo.Result;
-import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.aspect.annotation.AutoLog;
+import org.jeecg.common.system.query.QueryGenerator;
 import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.kuaishou.entity.KuaiShouRegionListParent;
 import org.jeecg.modules.kuaishou.service.IKuaiShouRegionListParentService;
-
-import java.util.Date;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import lombok.extern.slf4j.Slf4j;
-
 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.*;
 import org.springframework.web.multipart.MultipartFile;
 import org.springframework.web.multipart.MultipartHttpServletRequest;
 import org.springframework.web.servlet.ModelAndView;
-import com.alibaba.fastjson.JSON;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 快手-父级地域

+ 0 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouScheduleController.java


برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است