Преглед на файлове

快手 提交查询接口

yumeng преди 6 години
родител
ревизия
53d31e44d1
променени са 81 файла, в които са добавени 6838 реда и са изтрити 1804 реда
  1. 612 600
      jeecg-boot-base-common/src/main/java/org/jeecg/common/util/DateUtils.java
  2. 2 1
      jeecg-boot-module-system/src/main/java/org/jeecg/config/ShiroConfig.java
  3. 4 2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/AuthController.java
  4. 22 12
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/CallbackController.java
  5. 6 22
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/SyncDataController.java
  6. 1 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/TouTiaoAdvertiserController.java
  7. 83 66
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/CTopOauthToken.java
  8. 244 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouAppInfoController.java
  9. 244 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouCampaignController.java
  10. 244 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouCampaignCreateController.java
  11. 107 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouController.java
  12. 244 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouCreativeController.java
  13. 244 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/controller/KuaiShouGroupController.java
  14. 82 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/entity/KuaiShouAppInfo.java
  15. 82 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/entity/KuaiShouCampaign.java
  16. 82 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/entity/KuaiShouCampaignCreate.java
  17. 136 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/entity/KuaiShouCreative.java
  18. 173 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/entity/KuaiShouGroup.java
  19. 14 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/mapper/KuaiShouAppInfoMapper.java
  20. 14 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/mapper/KuaiShouCampaignCreateMapper.java
  21. 14 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/mapper/KuaiShouCampaignMapper.java
  22. 14 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/mapper/KuaiShouCreativeMapper.java
  23. 14 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/mapper/KuaiShouGroupMapper.java
  24. 5 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/mapper/xml/KuaiShouAppInfoMapper.xml
  25. 5 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/mapper/xml/KuaiShouCampaignCreateMapper.xml
  26. 5 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/mapper/xml/KuaiShouCampaignMapper.xml
  27. 5 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/mapper/xml/KuaiShouCreativeMapper.xml
  28. 5 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/mapper/xml/KuaiShouGroupMapper.xml
  29. 14 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/service/IKuaiShouAppInfoService.java
  30. 14 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/service/IKuaiShouCampaignCreateService.java
  31. 14 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/service/IKuaiShouCampaignService.java
  32. 14 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/service/IKuaiShouCreativeService.java
  33. 14 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/service/IKuaiShouGroupService.java
  34. 84 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/service/IKuaishouInterfaceService.java
  35. 19 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/service/impl/KuaiShouAppInfoServiceImpl.java
  36. 19 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/service/impl/KuaiShouCampaignCreateServiceImpl.java
  37. 19 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/service/impl/KuaiShouCampaignServiceImpl.java
  38. 19 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/service/impl/KuaiShouCreativeServiceImpl.java
  39. 19 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/service/impl/KuaiShouGroupServiceImpl.java
  40. 711 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/service/impl/KuaishouInterfaceServiceImpl.java
  41. 188 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/KuaiShouAppInfoList.vue
  42. 188 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/KuaiShouCampaignCreateList.vue
  43. 188 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/KuaiShouCampaignList.vue
  44. 233 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/KuaiShouCreativeList.vue
  45. 268 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/KuaiShouGroupList.vue
  46. 149 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/modules/KuaiShouAppInfoModal.vue
  47. 156 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/modules/KuaiShouAppInfoModal__Style#Drawer.vue
  48. 150 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/modules/KuaiShouCampaignCreateModal.vue
  49. 157 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/modules/KuaiShouCampaignCreateModal__Style#Drawer.vue
  50. 152 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/modules/KuaiShouCampaignModal.vue
  51. 159 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/modules/KuaiShouCampaignModal__Style#Drawer.vue
  52. 202 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/modules/KuaiShouCreativeModal.vue
  53. 209 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/modules/KuaiShouCreativeModal__Style#Drawer.vue
  54. 244 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/modules/KuaiShouGroupModal.vue
  55. 251 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/modules/KuaiShouGroupModal__Style#Drawer.vue
  56. 68 0
      module-common/src/main/java/cn/com/ctop/common/utils/Check.java
  57. 126 90
      module-common/src/main/java/cn/com/ctop/common/utils/HttpUtils.java
  58. 74 0
      module-common/src/main/java/cn/com/ctop/common/utils/JsonUtil.java
  59. 1 1
      module-common/src/main/java/cn/com/ctop/common/utils/PropertiesUtils.java
  60. 0 7
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/graphql/service/impl/KuaishouWebInterfaceServiceImpl.java
  61. 0 21
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/entity/KuaishouAppInfo.java
  62. 0 23
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/entity/KuaishouCampaign.java
  63. 0 41
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/entity/KuaishouCreative.java
  64. 0 59
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/entity/KuaishouGroup.java
  65. 0 8
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/mapper/KuaishouAppInfoMapper.java
  66. 0 7
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/mapper/KuaishouCampaignMapper.java
  67. 0 7
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/mapper/KuaishouCreativeMapper.java
  68. 0 7
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/mapper/KuaishouGroupMapper.java
  69. 0 7
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/service/IKuaishouAppInfoService.java
  70. 0 16
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/service/IKuaishouCampaignService.java
  71. 0 7
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/service/IKuaishouCreativeService.java
  72. 0 7
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/service/IKuaishouGroupService.java
  73. 0 20
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/service/IKuaishouInterfaceService.java
  74. 0 7
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/service/IKuaishouService.java
  75. 0 12
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/service/impl/KuaishouAppInfoServiceImpl.java
  76. 0 12
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/service/impl/KuaishouCampaignServiceImpl.java
  77. 0 11
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/service/impl/KuaishouCreativeServiceImpl.java
  78. 0 11
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/service/impl/KuaishouGroupServiceImpl.java
  79. 0 374
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/service/impl/KuaishouInterfaceServiceImpl.java
  80. 0 343
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/service/impl/KuaishouServiceImpl.java
  81. 8 3
      module-kuaishou/src/main/java/constant/KuaishouInterfaceConstant.java

Файловите разлики са ограничени, защото са твърде много
+ 612 - 600
jeecg-boot-base-common/src/main/java/org/jeecg/common/util/DateUtils.java


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

@@ -72,7 +72,8 @@ public class ShiroConfig {
 		filterChainDefinitionMap.put("/swagger**/**", "anon");
 		filterChainDefinitionMap.put("/webjars/**", "anon");
 		filterChainDefinitionMap.put("/v2/**", "anon");
-		
+		filterChainDefinitionMap.put("/kuaishou/**", "anon");
+
 		//性能监控
 		filterChainDefinitionMap.put("/actuator/metrics/**", "anon");
 		filterChainDefinitionMap.put("/actuator/httptrace/**", "anon");

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

@@ -2,7 +2,6 @@ package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.common.utils.HttpUtils;
 import cn.com.ctop.common.utils.PropertiesUtils;
-import cn.com.ctop.kuaishou.modules.material.service.IKuaishouInterfaceService;
 import cn.com.ctop.toutiao.common.BytedanceInterfaceConstant;
 import com.alibaba.fastjson.JSONObject;
 import com.google.gson.Gson;
@@ -10,6 +9,7 @@ import constant.KuaishouInterfaceConstant;
 import org.apache.commons.lang.StringUtils;
 import org.jeecg.modules.ctop.entity.CTopOauthToken;
 import org.jeecg.modules.ctop.mapper.CTopOauthTokenMapper;
+import org.jeecg.modules.kuaishou.service.IKuaishouInterfaceService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -110,12 +110,14 @@ public class AuthController {
                 .append(KuaishouInterfaceConstant.AUTH_PATH)
                 .append("?app_id="+PropertiesUtils.getValue("kuaishou_config","kuaishou_appid"))
                 .append("&state="+state)
-                .append("&scope=%5B%22report_service%22%2C%22ad_query%22%5D")
+                .append("&scope=%5B%22report_service%22%2C%22ad_query%22%2C%22ad_manage%22%5D")
                 .append("&redirect_uri="+ URLEncoder.encode(PropertiesUtils.getValue("kuaishou_config","kuaishou_callback_url"),"UTF-8"));
         return sb.toString();
     }
 
 
+
+
     public String getByteDanceCodeUrl(String state) throws UnsupportedEncodingException {
         StringBuffer sb = new StringBuffer();
         sb.append(PropertiesUtils.getValue("bytedance_config","bytedance_auth_url"))

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

@@ -3,8 +3,10 @@ package org.jeecg.modules.ctop.controller;
 import cn.com.ctop.kuaishou.modules.material.entity.KuaishouAccessToken;
 import cn.com.ctop.kuaishou.modules.material.entity.KuaishouResultToken;
 import cn.com.ctop.kuaishou.modules.material.service.IKuaishouAccessTokenService;
-import cn.com.ctop.kuaishou.modules.material.service.IKuaishouInterfaceService;
 import org.apache.commons.lang.StringUtils;
+import org.jeecg.modules.ctop.entity.CTopOauthToken;
+import org.jeecg.modules.ctop.mapper.CTopOauthTokenMapper;
+import org.jeecg.modules.kuaishou.service.IKuaishouInterfaceService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -22,25 +24,33 @@ public class CallbackController {
     private IKuaishouInterfaceService kuaishouInterfaceService;
     @Autowired
     private IKuaishouAccessTokenService kuaishouAccessTokenService;
+    @Autowired
+    private CTopOauthTokenMapper cTopOauthTokenMapper;
+
     @RequestMapping("/kuaishou")
     @ResponseBody
     public String kuaishou(HttpServletRequest request,
                            HttpServletResponse response,
-                           @RequestParam("auth_code")String authCode,
-                           @RequestParam("state")String state) {
-        System.out.println(request.getQueryString());
-        if(StringUtils.isNotBlank(authCode)){
+                           @RequestParam("auth_code") String authCode,
+                           @RequestParam("state") String state) {
+        if (StringUtils.isNotBlank(authCode)) {
             KuaishouResultToken accessToken = kuaishouInterfaceService.getAccessToken(authCode);
             KuaishouAccessToken token = accessToken.getData();
-            if(token != null){
-                long now = System.currentTimeMillis();
+            if (token != null) {
+                CTopOauthToken topOauthToken = new CTopOauthToken();
+                topOauthToken.setAccountId(token.getAccountId());
+                topOauthToken.setMediaId("2");
+                topOauthToken.setAdvertiserId(state);
+                topOauthToken.setAccessToken(token.getAccessToken());
                 long accessTokenExpireIn = token.getAccessTokenExpiresIn() * 1000L;
+                long now = System.currentTimeMillis();
+                Date accessTokenExpireInDate = new Date(now + accessTokenExpireIn);
+                topOauthToken.setAccessTokenExpiresIn(accessTokenExpireInDate);
+                topOauthToken.setRefreshToken(token.getRefreshToken());
                 long refreshTokenExpireIn = token.getRefreshTokenExpiresIn() * 1000L;
-                Date accessTokenExpireInDate = new Date(now+accessTokenExpireIn);
-                Date refreshTokenExpireInDate = new Date(now+refreshTokenExpireIn);
-                token.setAccessTokenExpiresInDate(accessTokenExpireInDate);
-                token.setRefreshTokenExpiresInDate(refreshTokenExpireInDate);
-                kuaishouAccessTokenService.saveOrUpdate(token);
+                Date refreshTokenExpireInDate = new Date(now + refreshTokenExpireIn);
+                topOauthToken.setRefreshTokenExpiresIn(refreshTokenExpireInDate);
+                cTopOauthTokenMapper.insert(topOauthToken);
             }
             return "auth_success";
         }

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

@@ -2,50 +2,34 @@ package org.jeecg.modules.ctop.controller;
 
 import cn.com.ctop.crawler.modules.account.entity.KuaishouAppAccount;
 import cn.com.ctop.crawler.modules.account.service.IKuaishouAppAccountService;
-import cn.com.ctop.crawler.modules.core.util.KuaishouUtil;
-import cn.com.ctop.crawler.modules.log.entity.CrawlerLog;
 import cn.com.ctop.kuaishou.modules.app.service.IKuaishouAppService;
-import cn.com.ctop.kuaishou.modules.material.service.IKuaishouService;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import io.swagger.annotations.Api;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.system.query.QueryGenerator;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import java.util.Date;
 import java.util.List;
 
 @Slf4j
 @RestController
 @RequestMapping("/ctop/syncdata")
 public class SyncDataController {
-    @Autowired
-    private IKuaishouService kuaishouService;
+
     @Autowired
     private IKuaishouAppService kuaishouAppService;
     @Autowired
     private IKuaishouAppAccountService kuaishouAppAccountService;
-    @RequestMapping("/test")
-    public void test(){
-        try {
-            System.out.println(1);
-            kuaishouService.getMaterial("97ec4cbc9a26ec24a8ba952b24856e6e",2289L);
-//            kuaishouService.getReportByDay("97ec4cbc9a26ec24a8ba952b24856e6e",2289L,"2019-06-01","2019-06-14");
-//            kuaishouService.getReportByHour("97ec4cbc9a26ec24a8ba952b24856e6e",2289L,"2019-06-11","2019-06-17");
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
+
 
     @RequestMapping("/test2")
-    public void test2(){
+    public void test2() {
         try {
             Integer page = 1;
-            while (page < 1000){
-                QueryWrapper<KuaishouAppAccount> queryWrapper = QueryGenerator.initQueryWrapper(new KuaishouAppAccount(),null);
-                queryWrapper.eq("path","/rest/n/feed/hot");
+            while (page < 1000) {
+                QueryWrapper<KuaishouAppAccount> queryWrapper = QueryGenerator.initQueryWrapper(new KuaishouAppAccount(), null);
+                queryWrapper.eq("path", "/rest/n/feed/hot");
                 List<KuaishouAppAccount> list = kuaishouAppAccountService.list(queryWrapper);
                 if (list != null) {
                     for (KuaishouAppAccount kuaishouAppAccount : list) {

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

@@ -162,6 +162,7 @@ public class TouTiaoAdvertiserController {
         queryWrapper.orderByAsc("sort_order");
         Page<SysDictItem> page = new Page<SysDictItem>(pageNo, pageSize);
         IPage<SysDictItem> pageList = sysDictItemService.page(page, queryWrapper);
+        System.err.println(pageList);
         result.setSuccess(true);
         result.setResult(pageList);
         return result;

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

@@ -1,103 +1,120 @@
 package org.jeecg.modules.ctop.entity;
 
-import java.io.Serializable;
-import java.text.ParseException;
-import java.util.Date;
-
 import cn.com.ctop.common.utils.DateUtils;
 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 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: oauth授权码
  * @Author: jeecg-boot
- * @Date:   2019-07-09
+ * @Date: 2019-07-09
  * @Version: V1.0
  */
 @Data
 @TableName("ctop_oauth_token")
 @EqualsAndHashCode(callSuper = false)
 @Accessors(chain = true)
-@ApiModel(value="ctop_oauth_token对象", description="oauth授权码")
+@ApiModel(value = "ctop_oauth_token对象", description = "oauth授权码")
 public class CTopOauthToken {
-    
-	/**主键ID*/
-	@TableId(type = IdType.UUID)
+
+    /**
+     * 主键ID
+     */
+    @TableId(type = IdType.UUID)
     @ApiModelProperty(value = "主键ID")
-	private String id;
-	/**媒体ID(外部广告平台类型,快手/头条/抖音等)*/
-	@Excel(name = "媒体ID(外部广告平台类型,快手/头条/抖音等)", width = 15)
+    private String id;
+    /**
+     * 媒体ID(外部广告平台类型,快手/头条/抖音等)
+     */
+    @Excel(name = "媒体ID(外部广告平台类型,快手/头条/抖音等)", width = 15)
     @ApiModelProperty(value = "媒体ID(外部广告平台类型,快手/头条/抖音等)")
-	private String mediaId;
-	/**广告主ID(自己平台用户内部id)*/
-	@Excel(name = "广告主ID(自己平台用户内部id)", width = 15)
+    private String mediaId;
+    /**
+     * 广告主ID(自己平台用户内部id)
+     */
+    @Excel(name = "广告主ID(自己平台用户内部id)", width = 15)
     @ApiModelProperty(value = "广告主ID(自己平台用户内部id)")
-	private String advertiserId;
-	/**广告账户ID(相当于头条返回的access_token数据中的advertiser_id)*/
-	@Excel(name = "广告账户ID(相当于头条返回的access_token数据中的advertiser_id)", width = 15)
+    private String advertiserId;
+    /**
+     * 广告账户ID(相当于头条返回的access_token数据中的advertiser_id)
+     */
+    @Excel(name = "广告账户ID(相当于头条返回的access_token数据中的advertiser_id)", width = 15)
     @ApiModelProperty(value = "广告账户ID(相当于头条返回的access_token数据中的advertiser_id)")
-	private Long accountId;
-	/**访问令牌*/
-	@Excel(name = "访问令牌", width = 15)
+    private Long accountId;
+    /**
+     * 访问令牌
+     */
+    @Excel(name = "访问令牌", width = 15)
     @ApiModelProperty(value = "访问令牌")
-	private String accessToken;
-	/**访问令牌有效期*/
-	@Excel(name = "访问令牌有效期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private String accessToken;
+    /**
+     * 访问令牌有效期
+     */
+    @Excel(name = "访问令牌有效期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @ApiModelProperty(value = "访问令牌有效期")
-	private Date accessTokenExpiresIn;
-	/**刷新令牌*/
-	@Excel(name = "刷新令牌", width = 15)
+    private Date accessTokenExpiresIn;
+    /**
+     * 刷新令牌
+     */
+    @Excel(name = "刷新令牌", width = 15)
     @ApiModelProperty(value = "刷新令牌")
-	private String refreshToken;
-	/**刷新令牌有效期*/
-	@Excel(name = "刷新令牌有效期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private String refreshToken;
+    /**
+     * 刷新令牌有效期
+     */
+    @Excel(name = "刷新令牌有效期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @ApiModelProperty(value = "刷新令牌有效期")
-	private Date refreshTokenExpiresIn;
-	/**创建时间*/
-	@Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private Date refreshTokenExpiresIn;
+    /**
+     * 创建时间
+     */
+    @Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @ApiModelProperty(value = "创建时间")
-	private Date createTime;
-	/**修改时间*/
-	@Excel(name = "修改时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+    /**
+     * 修改时间
+     */
+    @Excel(name = "修改时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @ApiModelProperty(value = "修改时间")
-	private Date updateTime;
+    private Date updateTime;
 
-	public CTopOauthToken(String accountId, JSONObject data) {
-		this.advertiserId = accountId;
-		this.mediaId = "toutiao";
-		Long advertiserId = data.getLong("advertiser_id");
-		this.accountId = advertiserId;
-		String advertiserName = data.getString("advertiser_name");
-		String accessToken = data.getString("access_token");
-		Integer refreshTokenExpiresIn = data.getInteger("refresh_token_expires_in");
-		Integer expiresIn = data.getInteger("expires_in");
-		String refreshToken = data.getString("refresh_token");
-		this.accessToken = accessToken;
-		this.refreshToken = refreshToken;
-		Date now = new Date();
-		this.accessTokenExpiresIn = DateUtils.addSecond(now,expiresIn);
-		this.refreshTokenExpiresIn = DateUtils.addSecond(now,refreshTokenExpiresIn);
-	}
+    public CTopOauthToken(String accountId, JSONObject data) {
+        this.advertiserId = accountId;
+        this.mediaId = "toutiao";
+        Long advertiserId = data.getLong("advertiser_id");
+        this.accountId = advertiserId;
+        String advertiserName = data.getString("advertiser_name");
+        String accessToken = data.getString("access_token");
+        Integer refreshTokenExpiresIn = data.getInteger("refresh_token_expires_in");
+        Integer expiresIn = data.getInteger("expires_in");
+        String refreshToken = data.getString("refresh_token");
+        this.accessToken = accessToken;
+        this.refreshToken = refreshToken;
+        Date now = new Date();
+        this.accessTokenExpiresIn = DateUtils.addSecond(now, expiresIn);
+        this.refreshTokenExpiresIn = DateUtils.addSecond(now, refreshTokenExpiresIn);
+    }
 
-	public CTopOauthToken() {
-	}
+    public CTopOauthToken() {
+    }
 }

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

@@ -0,0 +1,244 @@
+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 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.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;
+
+ /**
+ * @Description: 广告组-app信息
+ * @Author: jeecg-boot
+ * @Date:   2019-07-23
+ * @Version: V1.0
+ */
+@Slf4j
+@Api(tags="广告组-app信息")
+@RestController
+@RequestMapping("/kuaishou/kuaiShouAppInfo")
+public class KuaiShouAppInfoController {
+	@Autowired
+	private IKuaiShouAppInfoService kuaiShouAppInfoService;
+	
+	/**
+	  * 分页列表查询
+	 * @param kuaiShouAppInfo
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	@AutoLog(value = "广告组-app信息-分页列表查询")
+	@ApiOperation(value="广告组-app信息-分页列表查询", notes="广告组-app信息-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<KuaiShouAppInfo>> queryPageList(KuaiShouAppInfo kuaiShouAppInfo,
+									  @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+									  @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+									  HttpServletRequest req) {
+		Result<IPage<KuaiShouAppInfo>> result = new Result<IPage<KuaiShouAppInfo>>();
+		QueryWrapper<KuaiShouAppInfo> queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouAppInfo, req.getParameterMap());
+		Page<KuaiShouAppInfo> page = new Page<KuaiShouAppInfo>(pageNo, pageSize);
+		IPage<KuaiShouAppInfo> pageList = kuaiShouAppInfoService.page(page, queryWrapper);
+		result.setSuccess(true);
+		result.setResult(pageList);
+		return result;
+	}
+	
+	/**
+	  *   添加
+	 * @param kuaiShouAppInfo
+	 * @return
+	 */
+	@AutoLog(value = "广告组-app信息-添加")
+	@ApiOperation(value="广告组-app信息-添加", notes="广告组-app信息-添加")
+	@PostMapping(value = "/add")
+	public Result<KuaiShouAppInfo> add(@RequestBody KuaiShouAppInfo kuaiShouAppInfo) {
+		Result<KuaiShouAppInfo> result = new Result<KuaiShouAppInfo>();
+		try {
+			kuaiShouAppInfoService.save(kuaiShouAppInfo);
+			result.success("添加成功!");
+		} catch (Exception e) {
+			log.error(e.getMessage(),e);
+			result.error500("操作失败");
+		}
+		return result;
+	}
+	
+	/**
+	  *  编辑
+	 * @param kuaiShouAppInfo
+	 * @return
+	 */
+	@AutoLog(value = "广告组-app信息-编辑")
+	@ApiOperation(value="广告组-app信息-编辑", notes="广告组-app信息-编辑")
+	@PutMapping(value = "/edit")
+	public Result<KuaiShouAppInfo> edit(@RequestBody KuaiShouAppInfo kuaiShouAppInfo) {
+		Result<KuaiShouAppInfo> result = new Result<KuaiShouAppInfo>();
+		KuaiShouAppInfo kuaiShouAppInfoEntity = kuaiShouAppInfoService.getById(kuaiShouAppInfo.getId());
+		if(kuaiShouAppInfoEntity==null) {
+			result.error500("未找到对应实体");
+		}else {
+			boolean ok = kuaiShouAppInfoService.updateById(kuaiShouAppInfo);
+			//TODO 返回false说明什么?
+			if(ok) {
+				result.success("修改成功!");
+			}
+		}
+		
+		return result;
+	}
+	
+	/**
+	  *   通过id删除
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "广告组-app信息-通过id删除")
+	@ApiOperation(value="广告组-app信息-通过id删除", notes="广告组-app信息-通过id删除")
+	@DeleteMapping(value = "/delete")
+	public Result<?> delete(@RequestParam(name="id",required=true) String id) {
+		try {
+			kuaiShouAppInfoService.removeById(id);
+		} catch (Exception e) {
+			log.error("删除失败",e.getMessage());
+			return Result.error("删除失败!");
+		}
+		return Result.ok("删除成功!");
+	}
+	
+	/**
+	  *  批量删除
+	 * @param ids
+	 * @return
+	 */
+	@AutoLog(value = "广告组-app信息-批量删除")
+	@ApiOperation(value="广告组-app信息-批量删除", notes="广告组-app信息-批量删除")
+	@DeleteMapping(value = "/deleteBatch")
+	public Result<KuaiShouAppInfo> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		Result<KuaiShouAppInfo> result = new Result<KuaiShouAppInfo>();
+		if(ids==null || "".equals(ids.trim())) {
+			result.error500("参数不识别!");
+		}else {
+			this.kuaiShouAppInfoService.removeByIds(Arrays.asList(ids.split(",")));
+			result.success("删除成功!");
+		}
+		return result;
+	}
+	
+	/**
+	  * 通过id查询
+	 * @param id
+	 * @return
+	 */
+	@AutoLog(value = "广告组-app信息-通过id查询")
+	@ApiOperation(value="广告组-app信息-通过id查询", notes="广告组-app信息-通过id查询")
+	@GetMapping(value = "/queryById")
+	public Result<KuaiShouAppInfo> queryById(@RequestParam(name="id",required=true) String id) {
+		Result<KuaiShouAppInfo> result = new Result<KuaiShouAppInfo>();
+		KuaiShouAppInfo kuaiShouAppInfo = kuaiShouAppInfoService.getById(id);
+		if(kuaiShouAppInfo==null) {
+			result.error500("未找到对应实体");
+		}else {
+			result.setResult(kuaiShouAppInfo);
+			result.setSuccess(true);
+		}
+		return result;
+	}
+
+  /**
+      * 导出excel
+   *
+   * @param request
+   * @param response
+   */
+  @RequestMapping(value = "/exportXls")
+  public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
+      // Step.1 组装查询条件
+      QueryWrapper<KuaiShouAppInfo> queryWrapper = null;
+      try {
+          String paramsStr = request.getParameter("paramsStr");
+          if (oConvertUtils.isNotEmpty(paramsStr)) {
+              String deString = URLDecoder.decode(paramsStr, "UTF-8");
+              KuaiShouAppInfo kuaiShouAppInfo = JSON.parseObject(deString, KuaiShouAppInfo.class);
+              queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouAppInfo, request.getParameterMap());
+          }
+      } catch (UnsupportedEncodingException e) {
+          e.printStackTrace();
+      }
+
+      //Step.2 AutoPoi 导出Excel
+      ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+      List<KuaiShouAppInfo> pageList = kuaiShouAppInfoService.list(queryWrapper);
+      //导出文件名称
+      mv.addObject(NormalExcelConstants.FILE_NAME, "广告组-app信息列表");
+      mv.addObject(NormalExcelConstants.CLASS, KuaiShouAppInfo.class);
+      mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("广告组-app信息列表数据", "导出人: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<KuaiShouAppInfo> listKuaiShouAppInfos = ExcelImportUtil.importExcel(file.getInputStream(), KuaiShouAppInfo.class, params);
+              kuaiShouAppInfoService.saveBatch(listKuaiShouAppInfos);
+              return Result.ok("文件导入成功!数据行数:" + listKuaiShouAppInfos.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("文件导入失败!");
+  }
+
+}

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

@@ -0,0 +1,244 @@
+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 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.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;
+
+ /**
+ * @Description: 快手-获取广告计划信息
+ * @Author: jeecg-boot
+ * @Date:   2019-07-23
+ * @Version: V1.0
+ */
+@Slf4j
+@Api(tags="快手-获取广告计划信息")
+@RestController
+@RequestMapping("/kuaishou/kuaiShouCampaign")
+public class KuaiShouCampaignController {
+	@Autowired
+	private IKuaiShouCampaignService kuaiShouCampaignService;
+	
+	/**
+	  * 分页列表查询
+	 * @param kuaiShouCampaign
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	@AutoLog(value = "快手-获取广告计划信息-分页列表查询")
+	@ApiOperation(value="快手-获取广告计划信息-分页列表查询", notes="快手-获取广告计划信息-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<KuaiShouCampaign>> queryPageList(KuaiShouCampaign kuaiShouCampaign,
+									  @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+									  @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+									  HttpServletRequest req) {
+		Result<IPage<KuaiShouCampaign>> result = new Result<IPage<KuaiShouCampaign>>();
+		QueryWrapper<KuaiShouCampaign> queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouCampaign, req.getParameterMap());
+		Page<KuaiShouCampaign> page = new Page<KuaiShouCampaign>(pageNo, pageSize);
+		IPage<KuaiShouCampaign> pageList = kuaiShouCampaignService.page(page, queryWrapper);
+		result.setSuccess(true);
+		result.setResult(pageList);
+		return result;
+	}
+	
+	/**
+	  *   添加
+	 * @param kuaiShouCampaign
+	 * @return
+	 */
+	@AutoLog(value = "快手-获取广告计划信息-添加")
+	@ApiOperation(value="快手-获取广告计划信息-添加", notes="快手-获取广告计划信息-添加")
+	@PostMapping(value = "/add")
+	public Result<KuaiShouCampaign> add(@RequestBody KuaiShouCampaign kuaiShouCampaign) {
+		Result<KuaiShouCampaign> result = new Result<KuaiShouCampaign>();
+		try {
+			kuaiShouCampaignService.save(kuaiShouCampaign);
+			result.success("添加成功!");
+		} catch (Exception e) {
+			log.error(e.getMessage(),e);
+			result.error500("操作失败");
+		}
+		return result;
+	}
+	
+	/**
+	  *  编辑
+	 * @param kuaiShouCampaign
+	 * @return
+	 */
+	@AutoLog(value = "快手-获取广告计划信息-编辑")
+	@ApiOperation(value="快手-获取广告计划信息-编辑", notes="快手-获取广告计划信息-编辑")
+	@PutMapping(value = "/edit")
+	public Result<KuaiShouCampaign> edit(@RequestBody KuaiShouCampaign kuaiShouCampaign) {
+		Result<KuaiShouCampaign> result = new Result<KuaiShouCampaign>();
+		KuaiShouCampaign kuaiShouCampaignEntity = kuaiShouCampaignService.getById(kuaiShouCampaign.getId());
+		if(kuaiShouCampaignEntity==null) {
+			result.error500("未找到对应实体");
+		}else {
+			boolean ok = kuaiShouCampaignService.updateById(kuaiShouCampaign);
+			//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 {
+			kuaiShouCampaignService.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<KuaiShouCampaign> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		Result<KuaiShouCampaign> result = new Result<KuaiShouCampaign>();
+		if(ids==null || "".equals(ids.trim())) {
+			result.error500("参数不识别!");
+		}else {
+			this.kuaiShouCampaignService.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<KuaiShouCampaign> queryById(@RequestParam(name="id",required=true) String id) {
+		Result<KuaiShouCampaign> result = new Result<KuaiShouCampaign>();
+		KuaiShouCampaign kuaiShouCampaign = kuaiShouCampaignService.getById(id);
+		if(kuaiShouCampaign==null) {
+			result.error500("未找到对应实体");
+		}else {
+			result.setResult(kuaiShouCampaign);
+			result.setSuccess(true);
+		}
+		return result;
+	}
+
+  /**
+      * 导出excel
+   *
+   * @param request
+   * @param response
+   */
+  @RequestMapping(value = "/exportXls")
+  public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
+      // Step.1 组装查询条件
+      QueryWrapper<KuaiShouCampaign> queryWrapper = null;
+      try {
+          String paramsStr = request.getParameter("paramsStr");
+          if (oConvertUtils.isNotEmpty(paramsStr)) {
+              String deString = URLDecoder.decode(paramsStr, "UTF-8");
+              KuaiShouCampaign kuaiShouCampaign = JSON.parseObject(deString, KuaiShouCampaign.class);
+              queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouCampaign, request.getParameterMap());
+          }
+      } catch (UnsupportedEncodingException e) {
+          e.printStackTrace();
+      }
+
+      //Step.2 AutoPoi 导出Excel
+      ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+      List<KuaiShouCampaign> pageList = kuaiShouCampaignService.list(queryWrapper);
+      //导出文件名称
+      mv.addObject(NormalExcelConstants.FILE_NAME, "快手-获取广告计划信息列表");
+      mv.addObject(NormalExcelConstants.CLASS, KuaiShouCampaign.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<KuaiShouCampaign> listKuaiShouCampaigns = ExcelImportUtil.importExcel(file.getInputStream(), KuaiShouCampaign.class, params);
+              kuaiShouCampaignService.saveBatch(listKuaiShouCampaigns);
+              return Result.ok("文件导入成功!数据行数:" + listKuaiShouCampaigns.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("文件导入失败!");
+  }
+
+}

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

@@ -0,0 +1,244 @@
+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 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.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;
+
+ /**
+ * @Description: 快手-创建广告计划
+ * @Author: jeecg-boot
+ * @Date:   2019-07-23
+ * @Version: V1.0
+ */
+@Slf4j
+@Api(tags="快手-创建广告计划")
+@RestController
+@RequestMapping("/kuaishou/kuaiShouCampaignCreate")
+public class KuaiShouCampaignCreateController {
+	@Autowired
+	private IKuaiShouCampaignCreateService kuaiShouCampaignCreateService;
+	
+	/**
+	  * 分页列表查询
+	 * @param kuaiShouCampaignCreate
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	@AutoLog(value = "快手-创建广告计划-分页列表查询")
+	@ApiOperation(value="快手-创建广告计划-分页列表查询", notes="快手-创建广告计划-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<KuaiShouCampaignCreate>> queryPageList(KuaiShouCampaignCreate kuaiShouCampaignCreate,
+									  @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+									  @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+									  HttpServletRequest req) {
+		Result<IPage<KuaiShouCampaignCreate>> result = new Result<IPage<KuaiShouCampaignCreate>>();
+		QueryWrapper<KuaiShouCampaignCreate> queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouCampaignCreate, req.getParameterMap());
+		Page<KuaiShouCampaignCreate> page = new Page<KuaiShouCampaignCreate>(pageNo, pageSize);
+		IPage<KuaiShouCampaignCreate> pageList = kuaiShouCampaignCreateService.page(page, queryWrapper);
+		result.setSuccess(true);
+		result.setResult(pageList);
+		return result;
+	}
+	
+	/**
+	  *   添加
+	 * @param kuaiShouCampaignCreate
+	 * @return
+	 */
+	@AutoLog(value = "快手-创建广告计划-添加")
+	@ApiOperation(value="快手-创建广告计划-添加", notes="快手-创建广告计划-添加")
+	@PostMapping(value = "/add")
+	public Result<KuaiShouCampaignCreate> add(@RequestBody KuaiShouCampaignCreate kuaiShouCampaignCreate) {
+		Result<KuaiShouCampaignCreate> result = new Result<KuaiShouCampaignCreate>();
+		try {
+			kuaiShouCampaignCreateService.save(kuaiShouCampaignCreate);
+			result.success("添加成功!");
+		} catch (Exception e) {
+			log.error(e.getMessage(),e);
+			result.error500("操作失败");
+		}
+		return result;
+	}
+	
+	/**
+	  *  编辑
+	 * @param kuaiShouCampaignCreate
+	 * @return
+	 */
+	@AutoLog(value = "快手-创建广告计划-编辑")
+	@ApiOperation(value="快手-创建广告计划-编辑", notes="快手-创建广告计划-编辑")
+	@PutMapping(value = "/edit")
+	public Result<KuaiShouCampaignCreate> edit(@RequestBody KuaiShouCampaignCreate kuaiShouCampaignCreate) {
+		Result<KuaiShouCampaignCreate> result = new Result<KuaiShouCampaignCreate>();
+		KuaiShouCampaignCreate kuaiShouCampaignCreateEntity = kuaiShouCampaignCreateService.getById(kuaiShouCampaignCreate.getId());
+		if(kuaiShouCampaignCreateEntity==null) {
+			result.error500("未找到对应实体");
+		}else {
+			boolean ok = kuaiShouCampaignCreateService.updateById(kuaiShouCampaignCreate);
+			//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 {
+			kuaiShouCampaignCreateService.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<KuaiShouCampaignCreate> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		Result<KuaiShouCampaignCreate> result = new Result<KuaiShouCampaignCreate>();
+		if(ids==null || "".equals(ids.trim())) {
+			result.error500("参数不识别!");
+		}else {
+			this.kuaiShouCampaignCreateService.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<KuaiShouCampaignCreate> queryById(@RequestParam(name="id",required=true) String id) {
+		Result<KuaiShouCampaignCreate> result = new Result<KuaiShouCampaignCreate>();
+		KuaiShouCampaignCreate kuaiShouCampaignCreate = kuaiShouCampaignCreateService.getById(id);
+		if(kuaiShouCampaignCreate==null) {
+			result.error500("未找到对应实体");
+		}else {
+			result.setResult(kuaiShouCampaignCreate);
+			result.setSuccess(true);
+		}
+		return result;
+	}
+
+  /**
+      * 导出excel
+   *
+   * @param request
+   * @param response
+   */
+  @RequestMapping(value = "/exportXls")
+  public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
+      // Step.1 组装查询条件
+      QueryWrapper<KuaiShouCampaignCreate> queryWrapper = null;
+      try {
+          String paramsStr = request.getParameter("paramsStr");
+          if (oConvertUtils.isNotEmpty(paramsStr)) {
+              String deString = URLDecoder.decode(paramsStr, "UTF-8");
+              KuaiShouCampaignCreate kuaiShouCampaignCreate = JSON.parseObject(deString, KuaiShouCampaignCreate.class);
+              queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouCampaignCreate, request.getParameterMap());
+          }
+      } catch (UnsupportedEncodingException e) {
+          e.printStackTrace();
+      }
+
+      //Step.2 AutoPoi 导出Excel
+      ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+      List<KuaiShouCampaignCreate> pageList = kuaiShouCampaignCreateService.list(queryWrapper);
+      //导出文件名称
+      mv.addObject(NormalExcelConstants.FILE_NAME, "快手-创建广告计划列表");
+      mv.addObject(NormalExcelConstants.CLASS, KuaiShouCampaignCreate.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<KuaiShouCampaignCreate> listKuaiShouCampaignCreates = ExcelImportUtil.importExcel(file.getInputStream(), KuaiShouCampaignCreate.class, params);
+              kuaiShouCampaignCreateService.saveBatch(listKuaiShouCampaignCreates);
+              return Result.ok("文件导入成功!数据行数:" + listKuaiShouCampaignCreates.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("文件导入失败!");
+  }
+
+}

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

@@ -0,0 +1,107 @@
+package org.jeecg.modules.kuaishou.controller;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import org.jeecg.modules.kuaishou.service.IKuaishouInterfaceService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Map;
+
+@RestController
+@RequestMapping("/kuaishou")
+public class KuaiShouController {
+
+    @Autowired
+    private IKuaishouInterfaceService kuaishouInterfaceService;
+
+    @RequestMapping("/campaignCreate")
+    public void campaignCreate() {
+        String accessToken = "f60f51a8f7d8938d6147d38357fed70c";
+        Long advertiserId = 23212L;
+        JSONObject requestJson = new JSONObject();
+        requestJson.put("campaign_name", "Test Api");
+        requestJson.put("type", 2);
+        requestJson.put("day_budget", 0L);
+        Map<String, Object> stringObjectMap = kuaishouInterfaceService.campaignCreate(accessToken, advertiserId, requestJson);
+        System.err.println(JSON.toJSONString(stringObjectMap));
+    }
+
+    /**
+     * 创建组
+     */
+    @RequestMapping("/adUnitCreate")
+    public void adUnitCcreate() {
+        String accessToken = "f60f51a8f7d8938d6147d38357fed70c";
+        Long advertiserId = 23212L;
+        JSONObject requestJson = new JSONObject();
+        requestJson.put("campaign_id", 4178072L);
+        requestJson.put("unit_name", "测试广告组名称");
+        requestJson.put("bid_type", 2);
+        requestJson.put("bid", 100000);
+        // requestJson.put("cpa_bid",100000 );
+        // requestJson.put("ocpx_action_type", 2);
+        requestJson.put("deep_conversion_type", 3);
+        requestJson.put("page", 2);
+        requestJson.put("begin_time", "2019-07-24");
+        requestJson.put("end_time", "2019-07-25");
+        // requestJson.put("schedule", 00000000000000000000000000000);
+        requestJson.put("day_budget", 10000000);
+        //   requestJson.put("url_type", );
+        //   requestJson.put("url", );
+        requestJson.put("app_id", 156982);
+        requestJson.put("show_mode", 1);
+        requestJson.put("speed", 1);
+
+
+        JSONObject targetJson = new JSONObject();
+
+        //   targetJson.put("region", "");
+
+
+        JSONObject ageJson = new JSONObject();
+        ageJson.put("min", 15);
+        ageJson.put("max", 50);
+        targetJson.put("age", ageJson);
+
+        targetJson.put("gender", 0);
+        targetJson.put("platform_os", 0);
+        targetJson.put("android_osv", 3);
+        //  targetJson.put("ios_osv", 3);
+        targetJson.put("network", 0);
+
+
+        Map<String, Object> stringObjectMap = kuaishouInterfaceService.adUnitCreate(accessToken, advertiserId, requestJson);
+        System.err.println(JSON.toJSONString(stringObjectMap));
+    }
+
+
+    @RequestMapping("/getCampaignList")
+    public void getCampaignList() {
+        String accessToken = "f60f51a8f7d8938d6147d38357fed70c";
+        Long advertiserId = 23212L;
+        kuaishouInterfaceService.getCampaignList(accessToken, advertiserId,1);
+
+    }
+
+    @RequestMapping("/getGroupList")
+    public void getGroupList() {
+        String accessToken = "f60f51a8f7d8938d6147d38357fed70c";
+        Long advertiserId = 23212L;
+        kuaishouInterfaceService.getGroupList(accessToken, advertiserId,1);
+
+    }
+
+    @RequestMapping("/getCreativeList")
+    public void getCreativeList() {
+        String accessToken = "f60f51a8f7d8938d6147d38357fed70c";
+        Long advertiserId = 23212L;
+        kuaishouInterfaceService.getCreativeList(accessToken, advertiserId,1);
+
+    }
+
+
+
+
+}

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

@@ -0,0 +1,244 @@
+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 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.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;
+
+ /**
+ * @Description: 快手-创意信息
+ * @Author: jeecg-boot
+ * @Date:   2019-07-23
+ * @Version: V1.0
+ */
+@Slf4j
+@Api(tags="快手-创意信息")
+@RestController
+@RequestMapping("/kuaishou/kuaiShouCreative")
+public class KuaiShouCreativeController {
+	@Autowired
+	private IKuaiShouCreativeService kuaiShouCreativeService;
+	
+	/**
+	  * 分页列表查询
+	 * @param kuaiShouCreative
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	@AutoLog(value = "快手-创意信息-分页列表查询")
+	@ApiOperation(value="快手-创意信息-分页列表查询", notes="快手-创意信息-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<KuaiShouCreative>> queryPageList(KuaiShouCreative kuaiShouCreative,
+									  @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+									  @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+									  HttpServletRequest req) {
+		Result<IPage<KuaiShouCreative>> result = new Result<IPage<KuaiShouCreative>>();
+		QueryWrapper<KuaiShouCreative> queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouCreative, req.getParameterMap());
+		Page<KuaiShouCreative> page = new Page<KuaiShouCreative>(pageNo, pageSize);
+		IPage<KuaiShouCreative> pageList = kuaiShouCreativeService.page(page, queryWrapper);
+		result.setSuccess(true);
+		result.setResult(pageList);
+		return result;
+	}
+	
+	/**
+	  *   添加
+	 * @param kuaiShouCreative
+	 * @return
+	 */
+	@AutoLog(value = "快手-创意信息-添加")
+	@ApiOperation(value="快手-创意信息-添加", notes="快手-创意信息-添加")
+	@PostMapping(value = "/add")
+	public Result<KuaiShouCreative> add(@RequestBody KuaiShouCreative kuaiShouCreative) {
+		Result<KuaiShouCreative> result = new Result<KuaiShouCreative>();
+		try {
+			kuaiShouCreativeService.save(kuaiShouCreative);
+			result.success("添加成功!");
+		} catch (Exception e) {
+			log.error(e.getMessage(),e);
+			result.error500("操作失败");
+		}
+		return result;
+	}
+	
+	/**
+	  *  编辑
+	 * @param kuaiShouCreative
+	 * @return
+	 */
+	@AutoLog(value = "快手-创意信息-编辑")
+	@ApiOperation(value="快手-创意信息-编辑", notes="快手-创意信息-编辑")
+	@PutMapping(value = "/edit")
+	public Result<KuaiShouCreative> edit(@RequestBody KuaiShouCreative kuaiShouCreative) {
+		Result<KuaiShouCreative> result = new Result<KuaiShouCreative>();
+		KuaiShouCreative kuaiShouCreativeEntity = kuaiShouCreativeService.getById(kuaiShouCreative.getId());
+		if(kuaiShouCreativeEntity==null) {
+			result.error500("未找到对应实体");
+		}else {
+			boolean ok = kuaiShouCreativeService.updateById(kuaiShouCreative);
+			//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 {
+			kuaiShouCreativeService.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<KuaiShouCreative> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		Result<KuaiShouCreative> result = new Result<KuaiShouCreative>();
+		if(ids==null || "".equals(ids.trim())) {
+			result.error500("参数不识别!");
+		}else {
+			this.kuaiShouCreativeService.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<KuaiShouCreative> queryById(@RequestParam(name="id",required=true) String id) {
+		Result<KuaiShouCreative> result = new Result<KuaiShouCreative>();
+		KuaiShouCreative kuaiShouCreative = kuaiShouCreativeService.getById(id);
+		if(kuaiShouCreative==null) {
+			result.error500("未找到对应实体");
+		}else {
+			result.setResult(kuaiShouCreative);
+			result.setSuccess(true);
+		}
+		return result;
+	}
+
+  /**
+      * 导出excel
+   *
+   * @param request
+   * @param response
+   */
+  @RequestMapping(value = "/exportXls")
+  public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
+      // Step.1 组装查询条件
+      QueryWrapper<KuaiShouCreative> queryWrapper = null;
+      try {
+          String paramsStr = request.getParameter("paramsStr");
+          if (oConvertUtils.isNotEmpty(paramsStr)) {
+              String deString = URLDecoder.decode(paramsStr, "UTF-8");
+              KuaiShouCreative kuaiShouCreative = JSON.parseObject(deString, KuaiShouCreative.class);
+              queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouCreative, request.getParameterMap());
+          }
+      } catch (UnsupportedEncodingException e) {
+          e.printStackTrace();
+      }
+
+      //Step.2 AutoPoi 导出Excel
+      ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+      List<KuaiShouCreative> pageList = kuaiShouCreativeService.list(queryWrapper);
+      //导出文件名称
+      mv.addObject(NormalExcelConstants.FILE_NAME, "快手-创意信息列表");
+      mv.addObject(NormalExcelConstants.CLASS, KuaiShouCreative.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<KuaiShouCreative> listKuaiShouCreatives = ExcelImportUtil.importExcel(file.getInputStream(), KuaiShouCreative.class, params);
+              kuaiShouCreativeService.saveBatch(listKuaiShouCreatives);
+              return Result.ok("文件导入成功!数据行数:" + listKuaiShouCreatives.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("文件导入失败!");
+  }
+
+}

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

@@ -0,0 +1,244 @@
+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 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.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;
+
+ /**
+ * @Description: 广告组信息
+ * @Author: jeecg-boot
+ * @Date:   2019-07-23
+ * @Version: V1.0
+ */
+@Slf4j
+@Api(tags="广告组信息")
+@RestController
+@RequestMapping("/kuaishou/kuaiShouGroup")
+public class KuaiShouGroupController {
+	@Autowired
+	private IKuaiShouGroupService kuaiShouGroupService;
+	
+	/**
+	  * 分页列表查询
+	 * @param kuaiShouGroup
+	 * @param pageNo
+	 * @param pageSize
+	 * @param req
+	 * @return
+	 */
+	@AutoLog(value = "广告组信息-分页列表查询")
+	@ApiOperation(value="广告组信息-分页列表查询", notes="广告组信息-分页列表查询")
+	@GetMapping(value = "/list")
+	public Result<IPage<KuaiShouGroup>> queryPageList(KuaiShouGroup kuaiShouGroup,
+									  @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
+									  @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
+									  HttpServletRequest req) {
+		Result<IPage<KuaiShouGroup>> result = new Result<IPage<KuaiShouGroup>>();
+		QueryWrapper<KuaiShouGroup> queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouGroup, req.getParameterMap());
+		Page<KuaiShouGroup> page = new Page<KuaiShouGroup>(pageNo, pageSize);
+		IPage<KuaiShouGroup> pageList = kuaiShouGroupService.page(page, queryWrapper);
+		result.setSuccess(true);
+		result.setResult(pageList);
+		return result;
+	}
+	
+	/**
+	  *   添加
+	 * @param kuaiShouGroup
+	 * @return
+	 */
+	@AutoLog(value = "广告组信息-添加")
+	@ApiOperation(value="广告组信息-添加", notes="广告组信息-添加")
+	@PostMapping(value = "/add")
+	public Result<KuaiShouGroup> add(@RequestBody KuaiShouGroup kuaiShouGroup) {
+		Result<KuaiShouGroup> result = new Result<KuaiShouGroup>();
+		try {
+			kuaiShouGroupService.save(kuaiShouGroup);
+			result.success("添加成功!");
+		} catch (Exception e) {
+			log.error(e.getMessage(),e);
+			result.error500("操作失败");
+		}
+		return result;
+	}
+	
+	/**
+	  *  编辑
+	 * @param kuaiShouGroup
+	 * @return
+	 */
+	@AutoLog(value = "广告组信息-编辑")
+	@ApiOperation(value="广告组信息-编辑", notes="广告组信息-编辑")
+	@PutMapping(value = "/edit")
+	public Result<KuaiShouGroup> edit(@RequestBody KuaiShouGroup kuaiShouGroup) {
+		Result<KuaiShouGroup> result = new Result<KuaiShouGroup>();
+		KuaiShouGroup kuaiShouGroupEntity = kuaiShouGroupService.getById(kuaiShouGroup.getId());
+		if(kuaiShouGroupEntity==null) {
+			result.error500("未找到对应实体");
+		}else {
+			boolean ok = kuaiShouGroupService.updateById(kuaiShouGroup);
+			//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 {
+			kuaiShouGroupService.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<KuaiShouGroup> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
+		Result<KuaiShouGroup> result = new Result<KuaiShouGroup>();
+		if(ids==null || "".equals(ids.trim())) {
+			result.error500("参数不识别!");
+		}else {
+			this.kuaiShouGroupService.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<KuaiShouGroup> queryById(@RequestParam(name="id",required=true) String id) {
+		Result<KuaiShouGroup> result = new Result<KuaiShouGroup>();
+		KuaiShouGroup kuaiShouGroup = kuaiShouGroupService.getById(id);
+		if(kuaiShouGroup==null) {
+			result.error500("未找到对应实体");
+		}else {
+			result.setResult(kuaiShouGroup);
+			result.setSuccess(true);
+		}
+		return result;
+	}
+
+  /**
+      * 导出excel
+   *
+   * @param request
+   * @param response
+   */
+  @RequestMapping(value = "/exportXls")
+  public ModelAndView exportXls(HttpServletRequest request, HttpServletResponse response) {
+      // Step.1 组装查询条件
+      QueryWrapper<KuaiShouGroup> queryWrapper = null;
+      try {
+          String paramsStr = request.getParameter("paramsStr");
+          if (oConvertUtils.isNotEmpty(paramsStr)) {
+              String deString = URLDecoder.decode(paramsStr, "UTF-8");
+              KuaiShouGroup kuaiShouGroup = JSON.parseObject(deString, KuaiShouGroup.class);
+              queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouGroup, request.getParameterMap());
+          }
+      } catch (UnsupportedEncodingException e) {
+          e.printStackTrace();
+      }
+
+      //Step.2 AutoPoi 导出Excel
+      ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
+      List<KuaiShouGroup> pageList = kuaiShouGroupService.list(queryWrapper);
+      //导出文件名称
+      mv.addObject(NormalExcelConstants.FILE_NAME, "广告组信息列表");
+      mv.addObject(NormalExcelConstants.CLASS, KuaiShouGroup.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<KuaiShouGroup> listKuaiShouGroups = ExcelImportUtil.importExcel(file.getInputStream(), KuaiShouGroup.class, params);
+              kuaiShouGroupService.saveBatch(listKuaiShouGroups);
+              return Result.ok("文件导入成功!数据行数:" + listKuaiShouGroups.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("文件导入失败!");
+  }
+
+}

+ 82 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/entity/KuaiShouAppInfo.java

@@ -0,0 +1,82 @@
+package org.jeecg.modules.kuaishou.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+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 org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/**
+ * @Description: 广告组-app信息
+ * @Author: jeecg-boot
+ * @Date: 2019-07-23
+ * @Version: V1.0
+ */
+@Data
+@TableName("ctop_kuaishou_app_info")
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value = "ctop_kuaishou_app_info对象", description = "广告组-app信息")
+public class KuaiShouAppInfo {
+
+    /**
+     * id
+     */
+    @TableId(type = IdType.AUTO)
+    @ApiModelProperty(value = "id")
+    private Long id;
+    /**
+     * accountId
+     */
+    @Excel(name = "accountId", width = 15)
+    @ApiModelProperty(value = "accountId")
+    private Long accountId;
+    /**
+     * 广告组id
+     */
+    @Excel(name = "广告组id", width = 15)
+    @ApiModelProperty(value = "广告组id")
+    private Long unitId;
+    /**
+     * appPackageName
+     */
+    @Excel(name = "appPackageName", width = 15)
+    @ApiModelProperty(value = "appPackageName")
+    private String appPackageName;
+    /**
+     * appName
+     */
+    @Excel(name = "appName", width = 15)
+    @ApiModelProperty(value = "appName")
+    private String appName;
+    /**
+     * deviceOsType
+     */
+    @Excel(name = "deviceOsType", width = 15)
+    @ApiModelProperty(value = "deviceOsType")
+    private Integer deviceOsType;
+    /**
+     * createTime
+     */
+    @Excel(name = "createTime", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "createTime")
+    private Date createTime;
+    /**
+     * updateTime
+     */
+    @Excel(name = "updateTime", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "updateTime")
+    private Date updateTime;
+}

+ 82 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/entity/KuaiShouCampaign.java

@@ -0,0 +1,82 @@
+package org.jeecg.modules.kuaishou.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+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 org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/**
+ * @Description: 快手-获取广告计划信息
+ * @Author: jeecg-boot
+ * @Date: 2019-07-23
+ * @Version: V1.0
+ */
+@Data
+@TableName("ctop_kuaishou_campaign")
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value = "ctop_kuaishou_campaign对象", description = "快手-获取广告计划信息")
+public class KuaiShouCampaign {
+
+    /**
+     * id
+     */
+    @TableId(type = IdType.AUTO)
+    @ApiModelProperty(value = "id")
+    private Long id;
+    /**
+     * 账户ID
+     */
+    @Excel(name = "账户ID", width = 15)
+    @ApiModelProperty(value = "账户ID")
+    private Long accountId;
+    /**
+     * 计划ID
+     */
+    @Excel(name = "计划ID", width = 15)
+    @ApiModelProperty(value = "计划ID")
+    private Long campaignId;
+    /**
+     * 计划名称
+     */
+    @Excel(name = "计划名称", width = 15)
+    @ApiModelProperty(value = "计划名称")
+    private String campaignName;
+    /**
+     * 状态
+     */
+    @Excel(name = "状态", width = 15)
+    @ApiModelProperty(value = "状态")
+    private Integer status;
+    /**
+     * 每日预算
+     */
+    @Excel(name = "每日预算", width = 15)
+    @ApiModelProperty(value = "每日预算")
+    private Long dayBudget;
+    /**
+     * 创建时间
+     */
+    @Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+    /**
+     * 修改时间
+     */
+    @Excel(name = "修改时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "修改时间")
+    private Date updateTime;
+}

+ 82 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/entity/KuaiShouCampaignCreate.java

@@ -0,0 +1,82 @@
+package org.jeecg.modules.kuaishou.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+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 org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/**
+ * @Description: 快手-创建广告计划
+ * @Author: jeecg-boot
+ * @Date: 2019-07-23
+ * @Version: V1.0
+ */
+@Data
+@TableName("ctop_kuaishou_campaign_create")
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value = "ctop_kuaishou_campaign_create对象", description = "快手-创建广告计划")
+public class KuaiShouCampaignCreate {
+
+    /**
+     * 账户ID
+     */
+    @TableId(type = IdType.AUTO)
+    @ApiModelProperty(value = "账户ID")
+    private Long id;
+    /**
+     * 账户ID
+     */
+    @Excel(name = "账户ID", width = 15)
+    @ApiModelProperty(value = "账户ID")
+    private Long accountId;
+    /**
+     * 广告计划名称
+     */
+    @Excel(name = "广告计划名称", width = 15)
+    @ApiModelProperty(value = "广告计划名称")
+    private String campaignName;
+    /**
+     * 2:提升应用安装 3:获取电商下单 4:推广品牌活动 5:收集销售线索
+     */
+    @Excel(name = "2:提升应用安装 3:获取电商下单 4:推广品牌活动 5:收集销售线索", width = 15)
+    @ApiModelProperty(value = "2:提升应用安装 3:获取电商下单 4:推广品牌活动 5:收集销售线索")
+    private Integer type;
+    /**
+     * 计划单日预算金额 单位:厘 0表示预算不限,不小于500元,不超过100000000
+     */
+    @Excel(name = "计划单日预算金额 单位:厘 0表示预算不限,不小于500元,不超过100000000", width = 15)
+    @ApiModelProperty(value = "计划单日预算金额 单位:厘 0表示预算不限,不小于500元,不超过100000000")
+    private Integer dayBudget;
+    /**
+     * 广告计划id
+     */
+    @Excel(name = "广告计划id", width = 15)
+    @ApiModelProperty(value = "广告计划id")
+    private Long campaignId;
+    /**
+     * 创建时间
+     */
+    @Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+    /**
+     * 修改时间
+     */
+    @Excel(name = "修改时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "修改时间")
+    private Date updateTime;
+}

+ 136 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/entity/KuaiShouCreative.java

@@ -0,0 +1,136 @@
+package org.jeecg.modules.kuaishou.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+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 org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/**
+ * @Description: 快手-创意信息
+ * @Author: jeecg-boot
+ * @Date: 2019-07-23
+ * @Version: V1.0
+ */
+@Data
+@TableName("ctop_kuaishou_creative")
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value = "ctop_kuaishou_creative对象", description = "快手-创意信息")
+public class KuaiShouCreative {
+
+    /**
+     * id
+     */
+    @TableId(type = IdType.AUTO)
+    @ApiModelProperty(value = "id")
+    private Long id;
+    /**
+     * 账户ID
+     */
+    @Excel(name = "账户ID", width = 15)
+    @ApiModelProperty(value = "账户ID")
+    private Long accountId;
+    /**
+     * 广告计划ID
+     */
+    @Excel(name = "广告计划ID", width = 15)
+    @ApiModelProperty(value = "广告计划ID")
+    private Long campaignId;
+    /**
+     * 广告组ID
+     */
+    @Excel(name = "广告组ID", width = 15)
+    @ApiModelProperty(value = "广告组ID")
+    private Long unitId;
+    /**
+     * 广告创意ID
+     */
+    @Excel(name = "广告创意ID", width = 15)
+    @ApiModelProperty(value = "广告创意ID")
+    private Long creativeId;
+    /**
+     * 广告创意名称
+     */
+    @Excel(name = "广告创意名称", width = 15)
+    @ApiModelProperty(value = "广告创意名称")
+    private String creativeName;
+    /**
+     * 视频作品ID
+     */
+    @Excel(name = "视频作品ID", width = 15)
+    @ApiModelProperty(value = "视频作品ID")
+    private String photoId;
+    /**
+     * 广告创意状态
+     */
+    @Excel(name = "广告创意状态", width = 15)
+    @ApiModelProperty(value = "广告创意状态")
+    private Integer status;
+    /**
+     * 审核拒绝理由
+     */
+    @Excel(name = "审核拒绝理由", width = 15)
+    @ApiModelProperty(value = "审核拒绝理由")
+    private String reviewDetail;
+    /**
+     * 封面URL
+     */
+    @Excel(name = "封面URL", width = 15)
+    @ApiModelProperty(value = "封面URL")
+    private String coverUrl;
+    /**
+     * 封面图宽度
+     */
+    @Excel(name = "封面图宽度", width = 15)
+    @ApiModelProperty(value = "封面图宽度")
+    private String coverWidth;
+    /**
+     * 封面图高度
+     */
+    @Excel(name = "封面图高度", width = 15)
+    @ApiModelProperty(value = "封面图高度")
+    private String coverHeight;
+    /**
+     * description
+     */
+    @Excel(name = "description", width = 15)
+    @ApiModelProperty(value = "description")
+    private String description;
+    /**
+     * 行动号召按钮文案
+     */
+    @Excel(name = "行动号召按钮文案", width = 15)
+    @ApiModelProperty(value = "行动号召按钮文案")
+    private String actionBarText;
+    /**
+     * 点击测试链接
+     */
+    @Excel(name = "点击测试链接", width = 15)
+    @ApiModelProperty(value = "点击测试链接")
+    private String clickTrackUrl;
+    /**
+     * 创建时间
+     */
+    @Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+    /**
+     * 修改时间
+     */
+    @Excel(name = "修改时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "修改时间")
+    private Date updateTime;
+}

+ 173 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/entity/KuaiShouGroup.java

@@ -0,0 +1,173 @@
+package org.jeecg.modules.kuaishou.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+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 org.jeecgframework.poi.excel.annotation.Excel;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+/**
+ * @Description: 广告组信息
+ * @Author: jeecg-boot
+ * @Date: 2019-07-23
+ * @Version: V1.0
+ */
+@Data
+@TableName("ctop_kuaishou_group")
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value = "ctop_kuaishou_group对象", description = "广告组信息")
+public class KuaiShouGroup {
+
+    /**
+     * id
+     */
+    @TableId(type = IdType.AUTO)
+    @ApiModelProperty(value = "id")
+    private Long id;
+    /**
+     * 账户ID
+     */
+    @Excel(name = "账户ID", width = 15)
+    @ApiModelProperty(value = "账户ID")
+    private Long accountId;
+    /**
+     * 广告活动ID
+     */
+    @Excel(name = "广告活动ID", width = 15)
+    @ApiModelProperty(value = "广告活动ID")
+    private Long campaignId;
+    /**
+     * 广告组ID
+     */
+    @Excel(name = "广告组ID", width = 15)
+    @ApiModelProperty(value = "广告组ID")
+    private Long unitId;
+    /**
+     * 广告组名称
+     */
+    @Excel(name = "广告组名称", width = 15)
+    @ApiModelProperty(value = "广告组名称")
+    private String unitName;
+    /**
+     * 广告组状态
+     */
+    @Excel(name = "广告组状态", width = 15)
+    @ApiModelProperty(value = "广告组状态")
+    private Integer status;
+    /**
+     * 审核拒绝理由
+     */
+    @Excel(name = "审核拒绝理由", width = 15)
+    @ApiModelProperty(value = "审核拒绝理由")
+    private String reviewDetail;
+    /**
+     * 出价类型
+     */
+    @Excel(name = "出价类型", width = 15)
+    @ApiModelProperty(value = "出价类型")
+    private Integer bidType;
+    /**
+     * 出价
+     */
+    @Excel(name = "出价", width = 15)
+    @ApiModelProperty(value = "出价")
+    private Long bid;
+    /**
+     * OCPC出价
+     */
+    @Excel(name = "OCPC出价", width = 15)
+    @ApiModelProperty(value = "OCPC出价")
+    private Long cpaBid;
+    /**
+     * OCPX行为类型   1: CPM, 2: CPC,
+     */
+    @Excel(name = "OCPX行为类型   1: CPM, 2: CPC,", width = 15)
+    @ApiModelProperty(value = "OCPX行为类型   1: CPM, 2: CPC,")
+    private Integer ocpxActionType;
+    /**
+     * 单日预算
+     */
+    @Excel(name = "单日预算", width = 15)
+    @ApiModelProperty(value = "单日预算")
+    private Long dayBudget;
+    /**
+     * 投放方式  0:未知, 1:正常投
+     */
+    @Excel(name = "投放方式  0:未知, 1:正常投", width = 15)
+    @ApiModelProperty(value = "投放方式  0:未知, 1:正常投")
+    private Integer speed;
+    /**
+     * 投放开始时间
+     */
+    @Excel(name = "投放开始时间", width = 15)
+    @ApiModelProperty(value = "投放开始时间")
+    private String beginTime;
+    /**
+     * 投放结束时间
+     */
+    @Excel(name = "投放结束时间", width = 15)
+    @ApiModelProperty(value = "投放结束时间")
+    private String endTime;
+    /**
+     * 投放时段
+     */
+    @Excel(name = "投放时段", width = 15)
+    @ApiModelProperty(value = "投放时段")
+    private String schedule;
+    /**
+     * 创意展现方式  0:未知, 1:轮播,
+     */
+    @Excel(name = "创意展现方式  0:未知, 1:轮播,", width = 15)
+    @ApiModelProperty(value = "创意展现方式  0:未知, 1:轮播,")
+    private Integer showModel;
+    /**
+     * url类型
+     */
+    @Excel(name = "url类型 ", width = 15)
+    @ApiModelProperty(value = "url类型 ")
+    private Integer urlType;
+    /**
+     * 落地页链接
+     */
+    @Excel(name = "落地页链接", width = 15)
+    @ApiModelProperty(value = "落地页链接")
+    private Object url;
+    /**
+     * APP ID
+     */
+    @Excel(name = "APP ID", width = 15)
+    @ApiModelProperty(value = "APP ID")
+    private Long appId;
+    /**
+     * APP图标存储地址
+     */
+    @Excel(name = "APP图标存储地址", width = 15)
+    @ApiModelProperty(value = "APP图标存储地址")
+    private String appIconUrl;
+
+    /**
+     * 创建时间
+     */
+    @Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+    /**
+     * 修改时间
+     */
+    @Excel(name = "修改时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "修改时间")
+    private Date updateTime;
+}

+ 14 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/mapper/KuaiShouAppInfoMapper.java

@@ -0,0 +1,14 @@
+package org.jeecg.modules.kuaishou.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.jeecg.modules.kuaishou.entity.KuaiShouAppInfo;
+
+/**
+ * @Description: 广告组-app信息
+ * @Author: jeecg-boot
+ * @Date: 2019-07-23
+ * @Version: V1.0
+ */
+public interface KuaiShouAppInfoMapper extends BaseMapper<KuaiShouAppInfo> {
+
+}

+ 14 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/mapper/KuaiShouCampaignCreateMapper.java

@@ -0,0 +1,14 @@
+package org.jeecg.modules.kuaishou.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.jeecg.modules.kuaishou.entity.KuaiShouCampaignCreate;
+
+/**
+ * @Description: 快手-创建广告计划
+ * @Author: jeecg-boot
+ * @Date: 2019-07-23
+ * @Version: V1.0
+ */
+public interface KuaiShouCampaignCreateMapper extends BaseMapper<KuaiShouCampaignCreate> {
+
+}

+ 14 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/mapper/KuaiShouCampaignMapper.java

@@ -0,0 +1,14 @@
+package org.jeecg.modules.kuaishou.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.jeecg.modules.kuaishou.entity.KuaiShouCampaign;
+
+/**
+ * @Description: 快手-获取广告计划信息
+ * @Author: jeecg-boot
+ * @Date: 2019-07-23
+ * @Version: V1.0
+ */
+public interface KuaiShouCampaignMapper extends BaseMapper<KuaiShouCampaign> {
+
+}

+ 14 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/mapper/KuaiShouCreativeMapper.java

@@ -0,0 +1,14 @@
+package org.jeecg.modules.kuaishou.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.jeecg.modules.kuaishou.entity.KuaiShouCreative;
+
+/**
+ * @Description: 快手-创意信息
+ * @Author: jeecg-boot
+ * @Date: 2019-07-23
+ * @Version: V1.0
+ */
+public interface KuaiShouCreativeMapper extends BaseMapper<KuaiShouCreative> {
+
+}

+ 14 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/mapper/KuaiShouGroupMapper.java

@@ -0,0 +1,14 @@
+package org.jeecg.modules.kuaishou.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.jeecg.modules.kuaishou.entity.KuaiShouGroup;
+
+/**
+ * @Description: 广告组信息
+ * @Author: jeecg-boot
+ * @Date: 2019-07-23
+ * @Version: V1.0
+ */
+public interface KuaiShouGroupMapper extends BaseMapper<KuaiShouGroup> {
+
+}

+ 5 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/mapper/xml/KuaiShouAppInfoMapper.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.kuaishou.mapper.KuaiShouAppInfoMapper">
+
+</mapper>

+ 5 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/mapper/xml/KuaiShouCampaignCreateMapper.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.kuaishou.mapper.KuaiShouCampaignCreateMapper">
+
+</mapper>

+ 5 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/mapper/xml/KuaiShouCampaignMapper.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.kuaishou.mapper.KuaiShouCampaignMapper">
+
+</mapper>

+ 5 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/mapper/xml/KuaiShouCreativeMapper.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.kuaishou.mapper.KuaiShouCreativeMapper">
+
+</mapper>

+ 5 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/mapper/xml/KuaiShouGroupMapper.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.kuaishou.mapper.KuaiShouGroupMapper">
+
+</mapper>

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

@@ -0,0 +1,14 @@
+package org.jeecg.modules.kuaishou.service;
+
+import org.jeecg.modules.kuaishou.entity.KuaiShouAppInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: 广告组-app信息
+ * @Author: jeecg-boot
+ * @Date:   2019-07-23
+ * @Version: V1.0
+ */
+public interface IKuaiShouAppInfoService extends IService<KuaiShouAppInfo> {
+
+}

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

@@ -0,0 +1,14 @@
+package org.jeecg.modules.kuaishou.service;
+
+import org.jeecg.modules.kuaishou.entity.KuaiShouCampaignCreate;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: 快手-创建广告计划
+ * @Author: jeecg-boot
+ * @Date:   2019-07-23
+ * @Version: V1.0
+ */
+public interface IKuaiShouCampaignCreateService extends IService<KuaiShouCampaignCreate> {
+
+}

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

@@ -0,0 +1,14 @@
+package org.jeecg.modules.kuaishou.service;
+
+import org.jeecg.modules.kuaishou.entity.KuaiShouCampaign;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: 快手-获取广告计划信息
+ * @Author: jeecg-boot
+ * @Date:   2019-07-23
+ * @Version: V1.0
+ */
+public interface IKuaiShouCampaignService extends IService<KuaiShouCampaign> {
+
+}

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

@@ -0,0 +1,14 @@
+package org.jeecg.modules.kuaishou.service;
+
+import org.jeecg.modules.kuaishou.entity.KuaiShouCreative;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: 快手-创意信息
+ * @Author: jeecg-boot
+ * @Date:   2019-07-23
+ * @Version: V1.0
+ */
+public interface IKuaiShouCreativeService extends IService<KuaiShouCreative> {
+
+}

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

@@ -0,0 +1,14 @@
+package org.jeecg.modules.kuaishou.service;
+
+import org.jeecg.modules.kuaishou.entity.KuaiShouGroup;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: 广告组信息
+ * @Author: jeecg-boot
+ * @Date:   2019-07-23
+ * @Version: V1.0
+ */
+public interface IKuaiShouGroupService extends IService<KuaiShouGroup> {
+
+}

+ 84 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/service/IKuaishouInterfaceService.java

@@ -0,0 +1,84 @@
+package org.jeecg.modules.kuaishou.service;
+
+
+import cn.com.ctop.kuaishou.modules.material.entity.KuaishouResult;
+import cn.com.ctop.kuaishou.modules.material.entity.KuaishouResultToken;
+import cn.com.ctop.kuaishou.modules.report.entity.*;
+import com.alibaba.fastjson.JSONObject;
+
+import java.util.Map;
+
+public interface IKuaishouInterfaceService {
+    KuaishouResult<KuaishouReportHourlyAccount> getAccountHourlyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum);
+
+    KuaishouResult<KuaishouReportDailyAccount> getAccountDailyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum);
+
+    KuaishouResult<KuaishouReportDailyCampaign> getCampaignDailyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum);
+
+    KuaishouResult<KuaishouReportHourlyCampaign> getCampaignHourlyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum);
+
+    KuaishouResult<KuaishouReportDailyGroup> getGroupDailyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum);
+
+    KuaishouResult<KuaishouReportHourlyGroup> getGroupHourlyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum);
+
+    KuaishouResult<KuaishouReportDailyCreative> getCreativeDailyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum);
+
+    KuaishouResult<KuaishouReportHourlyCreative> getCreativeHourlyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum);
+
+
+    /**
+     * 创建广告计划
+     *
+     * @param accessToken
+     * @param advertiser_id
+     * @param requestJson
+     * @return
+     */
+    Map<String, Object> campaignCreate(String accessToken, Long advertiser_id, JSONObject requestJson);
+
+
+    /**
+     * 创建广告组
+     *
+     * @param accessToken
+     * @param advertiser_id
+     * @param requestJson
+     * @return
+     */
+    Map<String, Object> adUnitCreate(String accessToken, Long advertiser_id, JSONObject requestJson);
+
+
+    /**
+     * 获取广告计划信息
+     *
+     * @param accessToken
+     * @param advertiserId
+     */
+    void getCampaignList(String accessToken, Long advertiserId, Integer page);
+
+    /**
+     * 获取广告组信息
+     *
+     * @param accessToken
+     * @param advertiserId
+     * @param page
+     */
+    void getGroupList(String accessToken, Long advertiserId, Integer page);
+
+    /**
+     * 获取创意信息
+     *
+     * @param accessToken
+     * @param advertiserId
+     */
+    void getCreativeList(String accessToken, Long advertiserId, Integer page);
+
+    /**
+     * 获取token
+     * @param authCode
+     * @return
+     */
+    KuaishouResultToken getAccessToken(String authCode);
+
+    KuaishouResultToken getRefreshToken(String refreshToken);
+}

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

@@ -0,0 +1,19 @@
+package org.jeecg.modules.kuaishou.service.impl;
+
+import org.jeecg.modules.kuaishou.entity.KuaiShouAppInfo;
+import org.jeecg.modules.kuaishou.mapper.KuaiShouAppInfoMapper;
+import org.jeecg.modules.kuaishou.service.IKuaiShouAppInfoService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * @Description: 广告组-app信息
+ * @Author: jeecg-boot
+ * @Date:   2019-07-23
+ * @Version: V1.0
+ */
+@Service
+public class KuaiShouAppInfoServiceImpl extends ServiceImpl<KuaiShouAppInfoMapper, KuaiShouAppInfo> implements IKuaiShouAppInfoService {
+
+}

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

@@ -0,0 +1,19 @@
+package org.jeecg.modules.kuaishou.service.impl;
+
+import org.jeecg.modules.kuaishou.entity.KuaiShouCampaignCreate;
+import org.jeecg.modules.kuaishou.mapper.KuaiShouCampaignCreateMapper;
+import org.jeecg.modules.kuaishou.service.IKuaiShouCampaignCreateService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * @Description: 快手-创建广告计划
+ * @Author: jeecg-boot
+ * @Date:   2019-07-23
+ * @Version: V1.0
+ */
+@Service
+public class KuaiShouCampaignCreateServiceImpl extends ServiceImpl<KuaiShouCampaignCreateMapper, KuaiShouCampaignCreate> implements IKuaiShouCampaignCreateService {
+
+}

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

@@ -0,0 +1,19 @@
+package org.jeecg.modules.kuaishou.service.impl;
+
+import org.jeecg.modules.kuaishou.entity.KuaiShouCampaign;
+import org.jeecg.modules.kuaishou.mapper.KuaiShouCampaignMapper;
+import org.jeecg.modules.kuaishou.service.IKuaiShouCampaignService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * @Description: 快手-获取广告计划信息
+ * @Author: jeecg-boot
+ * @Date:   2019-07-23
+ * @Version: V1.0
+ */
+@Service
+public class KuaiShouCampaignServiceImpl extends ServiceImpl<KuaiShouCampaignMapper, KuaiShouCampaign> implements IKuaiShouCampaignService {
+
+}

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

@@ -0,0 +1,19 @@
+package org.jeecg.modules.kuaishou.service.impl;
+
+import org.jeecg.modules.kuaishou.entity.KuaiShouCreative;
+import org.jeecg.modules.kuaishou.mapper.KuaiShouCreativeMapper;
+import org.jeecg.modules.kuaishou.service.IKuaiShouCreativeService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * @Description: 快手-创意信息
+ * @Author: jeecg-boot
+ * @Date:   2019-07-23
+ * @Version: V1.0
+ */
+@Service
+public class KuaiShouCreativeServiceImpl extends ServiceImpl<KuaiShouCreativeMapper, KuaiShouCreative> implements IKuaiShouCreativeService {
+
+}

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

@@ -0,0 +1,19 @@
+package org.jeecg.modules.kuaishou.service.impl;
+
+import org.jeecg.modules.kuaishou.entity.KuaiShouGroup;
+import org.jeecg.modules.kuaishou.mapper.KuaiShouGroupMapper;
+import org.jeecg.modules.kuaishou.service.IKuaiShouGroupService;
+import org.springframework.stereotype.Service;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ * @Description: 广告组信息
+ * @Author: jeecg-boot
+ * @Date:   2019-07-23
+ * @Version: V1.0
+ */
+@Service
+public class KuaiShouGroupServiceImpl extends ServiceImpl<KuaiShouGroupMapper, KuaiShouGroup> implements IKuaiShouGroupService {
+
+}

+ 711 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/service/impl/KuaishouInterfaceServiceImpl.java

@@ -0,0 +1,711 @@
+package org.jeecg.modules.kuaishou.service.impl;
+
+import cn.com.ctop.common.utils.Check;
+import cn.com.ctop.common.utils.HttpUtils;
+import cn.com.ctop.common.utils.PropertiesUtils;
+import cn.com.ctop.kuaishou.modules.material.entity.KuaishouResult;
+import cn.com.ctop.kuaishou.modules.material.entity.KuaishouResultToken;
+import cn.com.ctop.kuaishou.modules.report.entity.*;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.JavaType;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.type.TypeFactory;
+import constant.KuaishouInterfaceConstant;
+import org.apache.http.HttpEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.util.EntityUtils;
+import org.jeecg.modules.kuaishou.entity.*;
+import org.jeecg.modules.kuaishou.mapper.*;
+import org.jeecg.modules.kuaishou.service.IKuaishouInterfaceService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.io.IOException;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.util.HashMap;
+import java.util.Map;
+
+@Service
+public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
+    private static final Logger logger = LoggerFactory.getLogger(KuaishouInterfaceServiceImpl.class);
+
+
+    public KuaishouResult<KuaishouReportHourlyAccount> getAccountHourlyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum) {
+        String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.ACCOUNT_REPORT;
+        Map<String, String> headers = new HashMap<String, String>();
+        headers.put("Access-Token", accessToken);
+        Map<String, Object> param = new HashMap<String, Object>();
+        param.put("start_date", startDate);
+        param.put("end_date", endDate);
+        param.put("advertiser_id", advertiserId);
+        param.put("temporal_granularity", "HOURLY");
+        param.put("page_size", pageSize);
+        param.put("page", pageNum);
+        KuaishouResult<KuaishouReportHourlyAccount> kuaishouResult = null;
+        try {
+            String result = HttpUtils.httpPostRequest(url, param, headers);
+            JSONObject resultJson = JSONArray.parseObject(result);
+            if (!Check.isNull(resultJson)) {
+
+            }
+            System.out.println(result);
+            ObjectMapper mapper = new ObjectMapper();
+            mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+            kuaishouResult = mapper.readValue(result, new TypeReference<KuaishouResult<KuaishouReportHourlyAccount>>() {
+            });
+//            kuaishouResult = (KuaishouResult<KuaishouReportHourlyAccount>)jsonToObj(KuaishouResult.class,result);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return kuaishouResult;
+    }
+
+    public KuaishouResult<KuaishouReportDailyAccount> getAccountDailyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum) {
+        String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.ACCOUNT_REPORT;
+        Map<String, String> headers = new HashMap<String, String>();
+        headers.put("Content-Type", "application/json");
+        headers.put("Access-Token", accessToken);
+        Map<String, Object> param = new HashMap<String, Object>();
+        param.put("start_date", startDate);
+        param.put("end_date", endDate);
+        param.put("advertiser_id", advertiserId);
+        param.put("temporal_granularity", "DAILY");
+        param.put("page_size", pageSize);
+        param.put("page", pageNum);
+        KuaishouResult<KuaishouReportDailyAccount> kuaishouResult = null;
+        try {
+            String result = HttpUtils.httpPostRequest(url, param, headers);
+            System.out.println(result);
+            ObjectMapper mapper = new ObjectMapper();
+            mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+            kuaishouResult = mapper.readValue(result, new TypeReference<KuaishouResult<KuaishouReportDailyAccount>>() {
+            });
+//            kuaishouResult = (KuaishouResult<KuaishouReportDailyAccount>)jsonToObj(KuaishouResult.class,result);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return kuaishouResult;
+    }
+
+    public KuaishouResult<KuaishouReportDailyCampaign> getCampaignDailyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum) {
+        String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.CAMPAIGN_REPORT;
+        Map<String, String> headers = new HashMap<String, String>();
+        headers.put("Content-Type", "application/json");
+        headers.put("Access-Token", accessToken);
+        Map<String, Object> param = new HashMap<String, Object>();
+        param.put("start_date", startDate);
+        param.put("end_date", endDate);
+        param.put("advertiser_id", advertiserId);
+        param.put("temporal_granularity", "DAILY");
+        param.put("page_size", pageSize);
+        param.put("page", pageNum);
+        KuaishouResult<KuaishouReportDailyCampaign> kuaishouResult = null;
+        try {
+            String result = HttpUtils.httpPostRequest(url, param, headers);
+            System.out.println(result);
+            ObjectMapper mapper = new ObjectMapper();
+            mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+            kuaishouResult = mapper.readValue(result, new TypeReference<KuaishouResult<KuaishouReportDailyCampaign>>() {
+            });
+//            kuaishouResult = (KuaishouResult<KuaishouReportDailyCampaign>)jsonToObj(KuaishouResult.class,result);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return kuaishouResult;
+    }
+
+    public KuaishouResult<KuaishouReportHourlyCampaign> getCampaignHourlyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum) {
+        String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.CAMPAIGN_REPORT;
+        Map<String, String> headers = new HashMap<String, String>();
+        headers.put("Content-Type", "application/json");
+        headers.put("Access-Token", accessToken);
+        Map<String, Object> param = new HashMap<String, Object>();
+        param.put("start_date", startDate);
+        param.put("end_date", endDate);
+        param.put("advertiser_id", advertiserId);
+        param.put("temporal_granularity", "HOURLY");
+        param.put("page_size", pageSize);
+        param.put("page", pageNum);
+        KuaishouResult<KuaishouReportHourlyCampaign> kuaishouResult = null;
+        try {
+            String result = HttpUtils.httpPostRequest(url, param, headers);
+            System.out.println(result);
+            ObjectMapper mapper = new ObjectMapper();
+            mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+            kuaishouResult = mapper.readValue(result, new TypeReference<KuaishouResult<KuaishouReportHourlyCampaign>>() {
+            });
+//            kuaishouResult = (KuaishouResult<KuaishouReportDailyCampaign>)jsonToObj(KuaishouResult.class,result);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return kuaishouResult;
+    }
+
+    public KuaishouResult<KuaishouReportDailyGroup> getGroupDailyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum) {
+        String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.GTOUP_REPORT;
+        Map<String, String> headers = new HashMap<String, String>();
+        headers.put("Content-Type", "application/json");
+        headers.put("Access-Token", accessToken);
+        Map<String, Object> param = new HashMap<String, Object>();
+        param.put("start_date", startDate);
+        param.put("end_date", endDate);
+        param.put("advertiser_id", advertiserId);
+        param.put("temporal_granularity", "DAILY");
+        param.put("page_size", pageSize);
+        param.put("page", pageNum);
+        KuaishouResult<KuaishouReportDailyGroup> kuaishouResult = null;
+        try {
+            String result = HttpUtils.httpPostRequest(url, param, headers);
+            System.out.println(result);
+            ObjectMapper mapper = new ObjectMapper();
+            mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+            kuaishouResult = mapper.readValue(result, new TypeReference<KuaishouResult<KuaishouReportDailyGroup>>() {
+            });
+//            kuaishouResult = (KuaishouResult<KuaishouReportDailyGroup>)jsonToObj(KuaishouResult.class,result);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return kuaishouResult;
+    }
+
+    public KuaishouResult<KuaishouReportHourlyGroup> getGroupHourlyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum) {
+        String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.GTOUP_REPORT;
+        Map<String, String> headers = new HashMap<String, String>();
+        headers.put("Content-Type", "application/json");
+        headers.put("Access-Token", accessToken);
+        Map<String, Object> param = new HashMap<String, Object>();
+        param.put("start_date", startDate);
+        param.put("end_date", endDate);
+        param.put("advertiser_id", advertiserId);
+        param.put("temporal_granularity", "HOURLY");
+        param.put("page_size", pageSize);
+        param.put("page", pageNum);
+        KuaishouResult<KuaishouReportHourlyGroup> kuaishouResult = null;
+        try {
+            String result = HttpUtils.httpPostRequest(url, param, headers);
+            System.out.println(result);
+            ObjectMapper mapper = new ObjectMapper();
+            mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+            kuaishouResult = mapper.readValue(result, new TypeReference<KuaishouResult<KuaishouReportHourlyGroup>>() {
+            });
+//            kuaishouResult = (KuaishouResult<KuaishouReportDailyGroup>)jsonToObj(KuaishouResult.class,result);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return kuaishouResult;
+    }
+
+    public KuaishouResult<KuaishouReportDailyCreative> getCreativeDailyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum) {
+        String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.CREATIVE_REPORT;
+        Map<String, String> headers = new HashMap<String, String>();
+        headers.put("Content-Type", "application/json");
+        headers.put("Access-Token", accessToken);
+        Map<String, Object> param = new HashMap<String, Object>();
+        param.put("start_date", startDate);
+        param.put("end_date", endDate);
+        param.put("advertiser_id", advertiserId);
+        param.put("temporal_granularity", "DAILY");
+        param.put("page_size", pageSize);
+        param.put("page", pageNum);
+        KuaishouResult<KuaishouReportDailyCreative> kuaishouResult = null;
+        try {
+            String result = HttpUtils.httpPostRequest(url, param, headers);
+            System.out.println(result);
+            ObjectMapper mapper = new ObjectMapper();
+            mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+            kuaishouResult = mapper.readValue(result, new TypeReference<KuaishouResult<KuaishouReportDailyCreative>>() {
+            });
+//            kuaishouResult = (KuaishouResult<KuaishouReportDailyCreative>)jsonToObj(KuaishouResult.class,result);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return kuaishouResult;
+    }
+
+    public KuaishouResult<KuaishouReportHourlyCreative> getCreativeHourlyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum) {
+        String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.CREATIVE_REPORT;
+        Map<String, String> headers = new HashMap<String, String>();
+        headers.put("Content-Type", "application/json");
+        headers.put("Access-Token", accessToken);
+        Map<String, Object> param = new HashMap<String, Object>();
+        param.put("start_date", startDate);
+        param.put("end_date", endDate);
+        param.put("advertiser_id", advertiserId);
+        param.put("temporal_granularity", "HOURLY");
+        param.put("page_size", pageSize);
+        param.put("page", pageNum);
+        KuaishouResult<KuaishouReportHourlyCreative> kuaishouResult = null;
+        try {
+            String result = HttpUtils.httpPostRequest(url, param, headers);
+            System.out.println(result);
+            ObjectMapper mapper = new ObjectMapper();
+            mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+            kuaishouResult = mapper.readValue(result, new TypeReference<KuaishouResult<KuaishouReportHourlyCreative>>() {
+            });
+//            kuaishouResult = (KuaishouResult<KuaishouReportDailyCreative>)jsonToObj(KuaishouResult.class,result);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return kuaishouResult;
+    }
+
+    /**
+     * 创建广告计划
+     *
+     * @param accessToken
+     * @param advertiser_id
+     * @param requestJson
+     * @return
+     */
+    @Autowired
+    private KuaiShouCampaignCreateMapper kuaiShouCampaignCreateMapper;
+
+    @Override
+    public Map<String, Object> campaignCreate(String accessToken, Long advertiser_id, JSONObject requestJson) {
+        Map<String, Object> returnMap = new HashMap<>();
+        try {
+            String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.CAMPAIGN_CREATE;
+            Map<String, String> headers = new HashMap<String, String>();
+            headers.put("Access-Token", accessToken);
+            requestJson.put("advertiser_id", advertiser_id);
+            String result = HttpUtils.kuaiShouhttpPostRequest(url, requestJson.toJSONString(), headers);
+            JSONObject resultJson = JSONObject.parseObject(result);
+            if (!Check.isNull(resultJson)) {
+                Integer code = resultJson.getInteger("code");
+                if (code == 0) {
+                    KuaiShouCampaignCreate campaignCreate = new KuaiShouCampaignCreate();
+                    JSONObject dataJson = resultJson.getJSONObject("data");
+                    Long campaign_id = dataJson.getLong("campaign_id");
+                    campaignCreate.setCampaignId(campaign_id);
+                    campaignCreate.setAccountId(advertiser_id);
+                    campaignCreate.setCampaignName(requestJson.getString("campaign_name"));
+                    campaignCreate.setDayBudget(requestJson.getInteger("day_budget"));
+                    campaignCreate.setType(requestJson.getInteger("type"));
+                    int i = kuaiShouCampaignCreateMapper.insert(campaignCreate);
+                    if (i > 0) {
+                        logger.info("创建广告信息入库完成,advertiser_id:{}", advertiser_id);
+                    }
+                    returnMap.put("code", 0);
+                    returnMap.put("message", "success");
+
+                } else {
+                    logger.error("创建广告信息失败,advertiser_id:{},返回信息:{}", advertiser_id, resultJson);
+                    returnMap.put("code", -1);
+                    returnMap.put("message", "error");
+                    returnMap.put("desc", resultJson.getString("message"));
+                }
+
+
+            } else {
+                logger.error("快手创建广告计划返回内容为空,advertiser_id:{}", advertiser_id);
+                returnMap.put("code", -1);
+                returnMap.put("message", "error");
+                returnMap.put("desc", "result is null");
+            }
+
+
+        } catch (Exception e) {
+            logger.error("创建广告计划失败,advertiser_id:{}", advertiser_id);
+            returnMap.put("code", -1);
+            returnMap.put("message", "error");
+            returnMap.put("desc", "Interface exception");
+            e.printStackTrace();
+        }
+
+        return returnMap;
+    }
+
+
+    /**
+     * 创建 广告组
+     *
+     * @param accessToken
+     * @param advertiser_id
+     * @param requestJson
+     * @return
+     */
+
+    @Override
+    public Map<String, Object> adUnitCreate(String accessToken, Long advertiser_id, JSONObject requestJson) {
+        Map<String, Object> returnMap = new HashMap<>();
+        try {
+            String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.AD_UNIT_CREATE;
+            Map<String, String> headers = new HashMap<String, String>();
+            requestJson.put("advertiser_id", advertiser_id);
+            headers.put("Access-Token", accessToken);
+
+            String result = HttpUtils.kuaiShouhttpPostRequest(url, requestJson.toJSONString(), headers);
+            JSONObject resultJson = JSONObject.parseObject(result);
+            if (!Check.isNull(resultJson)) {
+                Integer code = resultJson.getInteger("code");
+                if (code == 0) {
+                    //TODO  未写完--------------------------
+                    returnMap.put("code", 0);
+                    returnMap.put("message", "success");
+
+                } else {
+                    logger.error("创建广告信息失败,advertiser_id:{},返回信息:{}", advertiser_id, resultJson);
+                    returnMap.put("code", -1);
+                    returnMap.put("message", "error");
+                    returnMap.put("desc", resultJson.getString("message"));
+                }
+
+
+            } else {
+                logger.error("快手创建广告计划返回内容为空,advertiser_id:{}", advertiser_id);
+                returnMap.put("code", -1);
+                returnMap.put("message", "error");
+                returnMap.put("desc", "result is null");
+            }
+
+
+        } catch (Exception e) {
+            logger.error("创建广告计划失败,advertiser_id:{}", advertiser_id);
+            returnMap.put("code", -1);
+            returnMap.put("message", "error");
+            returnMap.put("desc", "Interface exception");
+            e.printStackTrace();
+        }
+
+        return returnMap;
+    }
+
+
+    /**
+     * 获取广告计划信息
+     *
+     * @param accessToken
+     * @param advertiserId
+     * @return
+     */
+    @Autowired
+    private KuaiShouCampaignMapper campaignMapper;
+
+    @Override
+    public void getCampaignList(String accessToken, Long advertiserId, Integer page) {
+        if (page == 1) { // 第一次请求删除历史数据
+            Map<String, Object> map = new HashMap<>();
+            map.put("account_id", advertiserId);
+            campaignMapper.deleteByMap(map);
+        }
+        String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.CAMPAIGN_LIST;
+        Map<String, String> headers = new HashMap<>();
+        headers.put("Access-Token", accessToken);
+        JSONObject param = new JSONObject();
+        param.put("advertiser_id", advertiserId);
+        param.put("page", page);
+        param.put("page_size", 200);
+        try {
+            String result = HttpUtils.kuaiShouhttpPostRequest(url, param.toJSONString(), headers);
+            JSONObject resultJson = JSONObject.parseObject(result);
+            if (!Check.isNull(resultJson)) {
+                Integer code = resultJson.getInteger("code");
+                if (code == 0) {
+                    JSONObject dataJson = resultJson.getJSONObject("data");
+                    JSONArray details = dataJson.getJSONArray("details");
+                    if (!Check.isNull(details)) {
+                        for (int i = 0; i < details.size(); i++) {
+                            JSONObject detail = JSONObject.parseObject(details.get(i).toString());
+                            if (!Check.isNull(detail)) {
+                                KuaiShouCampaign campaign = new KuaiShouCampaign();
+                                campaign.setAccountId(advertiserId);
+                                campaign.setCampaignId(detail.getLong("campaign_id"));
+                                campaign.setCampaignName(detail.getString("campaign_name"));
+                                campaign.setDayBudget(detail.getLong("day_budget"));
+                                campaign.setStatus(detail.getInteger("status"));
+                                campaignMapper.insert(campaign);
+                            }
+                        }
+
+                        getCampaignList(accessToken, advertiserId, page + 1);
+                    }
+
+                } else {
+                    logger.error("获取广告计划信息返回结果异常,advertiserId:{},异常信息:{}", advertiserId, resultJson);
+                }
+
+            } else {
+                logger.error("获取广告计划信息返回结果为空,advertiserId:{}", advertiserId);
+            }
+
+        } catch (Exception e) {
+            e.printStackTrace();
+
+        }
+
+
+    }
+
+
+    /**
+     * 获取广告组信息
+     *
+     * @param accessToken
+     * @param advertiserId
+     * @return
+     */
+    @Autowired
+    private KuaiShouGroupMapper groupMapper;
+    @Autowired
+    private KuaiShouAppInfoMapper appInfoMapper;
+
+    @Override
+    public void getGroupList(String accessToken, Long advertiserId, Integer page) {
+        if (page == 1) { // 第一次请求删除历史数据
+            Map<String, Object> map = new HashMap<>();
+            map.put("account_id", advertiserId);
+            groupMapper.deleteByMap(map);
+            appInfoMapper.deleteByMap(map);
+        }
+        String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.GROUP_LIST;
+        JSONObject param = new JSONObject();
+        param.put("advertiser_id", advertiserId);
+        param.put("page_size", 200);
+        param.put("page", page);
+        Map<String, String> headers = new HashMap<>();
+        headers.put("Access-Token", accessToken);
+        try {
+            String result = HttpUtils.kuaiShouhttpPostRequest(url, param.toJSONString(), headers);
+            JSONObject resultJson = JSONObject.parseObject(result);
+            if (!Check.isNull(resultJson)) {
+                Integer code = resultJson.getInteger("code");
+                if (code == 0) {
+                    JSONObject dataJson = resultJson.getJSONObject("data");
+                    if (!Check.isNull(dataJson)) {
+                        JSONArray details = dataJson.getJSONArray("details");
+                        if (!Check.isNull(details)) {
+                            for (int i = 0; i < details.size(); i++) {
+                                JSONObject detail = JSONObject.parseObject(details.get(i).toString());
+                                if (!Check.isNull(detail)) {
+                                    KuaiShouGroup group = new KuaiShouGroup();
+                                    group.setAccountId(advertiserId);
+                                    group.setStatus(detail.getInteger("status"));
+                                    group.setBid(detail.getLong("bid"));
+                                    group.setSpeed(detail.getInteger("speed"));
+                                    group.setSchedule(detail.getString("schedule"));
+                                    group.setUrl(detail.getString("url"));
+                                    group.setCampaignId(detail.getLong("campaign_id"));
+                                    Long unitId = detail.getLong("unit_id");
+                                    group.setUnitId(unitId);
+                                    group.setUnitName(detail.getString("unit_name"));
+                                    group.setBidType(detail.getInteger("bid_type"));
+                                    group.setReviewDetail(detail.getString("review_detail"));
+                                    group.setCpaBid(detail.getLong("cpa_bid"));
+                                    group.setOcpxActionType(detail.getInteger("ocpx_action_type"));
+                                    group.setDayBudget(detail.getLong("day_budget"));
+                                    group.setBeginTime(detail.getString("begin_time"));
+                                    group.setEndTime(detail.getString("end_time"));
+                                    group.setShowModel(detail.getInteger("show_mode"));
+                                    group.setUrlType(detail.getInteger("url_type"));
+                                    group.setAppId(detail.getLong("app_id"));
+                                    group.setAppIconUrl(detail.getString("app_icon_url"));
+                                    groupMapper.insert(group);
+
+                                    // 添加应用信息
+                                    JSONObject diverseJson = detail.getJSONObject("diverse_data");
+                                    if (!Check.isNull(diverseJson)) {
+                                        KuaiShouAppInfo appInfo = new KuaiShouAppInfo();
+                                        appInfo.setAccountId(advertiserId);
+                                        appInfo.setAppName(diverseJson.getString("app_name"));
+                                        appInfo.setAppPackageName(diverseJson.getString("app_package_name"));
+                                        appInfo.setDeviceOsType(diverseJson.getInteger("device_os_type"));
+                                        appInfo.setUnitId(unitId);
+                                        appInfoMapper.insert(appInfo);
+                                    }
+                                }
+
+                                getGroupList(accessToken, advertiserId, page + 1);
+
+                            }
+                        }
+
+                    } else {
+                        logger.error("获取广告组返回结果异常,advertiserId:{},异常信息:{}", advertiserId, resultJson);
+                    }
+
+                } else {
+                    logger.error("获取广告组返回结果为空,advertiserId:{}", advertiserId);
+                }
+            }
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+
+    /**
+     * 获取 创意信息
+     *
+     * @param accessToken
+     * @param advertiserId
+     */
+    @Autowired
+    private KuaiShouCreativeMapper creativeMapper;
+
+    @Override
+    public void getCreativeList(String accessToken, Long advertiserId, Integer page) {
+        if (page == 1) { // 第一次请求删除历史数据
+            Map<String, Object> map = new HashMap<>();
+            map.put("account_id", advertiserId);
+            creativeMapper.deleteByMap(map);
+        }
+
+        String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.CREATIVE_LIST;
+        Map<String, String> headers = new HashMap<String, String>();
+        headers.put("Content-Type", "application/json");
+        headers.put("Access-Token", accessToken);
+        JSONObject param = new JSONObject();
+        param.put("advertiser_id", advertiserId);
+        param.put("page_size", 200);
+        param.put("page", page);
+        try {
+            String result = HttpUtils.kuaiShouhttpPostRequest(url, param.toJSONString(), headers);
+            JSONObject resultJson = JSONObject.parseObject(result);
+            if (!Check.isNull(resultJson)) {
+                Integer code = resultJson.getInteger("code");
+                if (code == 0) {
+                    JSONObject dataJson = resultJson.getJSONObject("data");
+                    if (!Check.isNull(dataJson)) {
+                        JSONArray details = dataJson.getJSONArray("details");
+                        if (!Check.isNull(details)) {
+                            for (int i = 0; i < details.size(); i++) {
+                                JSONObject detailJson = JSONObject.parseObject(details.get(i).toString());
+                                if (!Check.isNull(detailJson)) {
+                                    KuaiShouCreative creative = new KuaiShouCreative();
+                                    creative.setAccountId(advertiserId);
+                                    creative.setStatus(detailJson.getInteger("status"));
+                                    creative.setCampaignId(dataJson.getLong("campaign_id"));
+                                    creative.setUnitId(dataJson.getLong("unit_id"));
+                                    creative.setCreativeId(dataJson.getLong("creative_id"));
+                                    creative.setCreativeName(dataJson.getString("creative_name"));
+                                    creative.setPhotoId(dataJson.getString("photo_id"));
+                                    creative.setReviewDetail(dataJson.getString("review_detail"));
+                                    creative.setCoverUrl(dataJson.getString("cover_url"));
+                                    creative.setCoverHeight(dataJson.getString("cover_height"));
+                                    creative.setCoverWidth(dataJson.getString("cover_width"));
+                                    creative.setClickTrackUrl(dataJson.getString("click_track_url"));
+                                    JSONObject displayInfoJson = detailJson.getJSONObject("display_info");
+                                    if (!Check.isNull(displayInfoJson)) {
+                                        creative.setDescription(displayInfoJson.getString("description"));
+                                        creative.setActionBarText(displayInfoJson.getString("action_bar_text"));
+                                    }
+                                    creativeMapper.insert(creative);
+                                }
+
+                            }
+                            getCreativeList(accessToken, advertiserId, page + 1);
+                        }
+
+                    }
+
+                } else {
+                    logger.error("获取广告创意组返回结果异常,advertiserId:{},异常信息:{}", advertiserId, resultJson);
+                }
+
+            } else {
+                logger.error("获取广告创意返回结果异常,advertiserId:{},异常信息:{}", advertiserId, resultJson);
+            }
+
+
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * 获取token
+     *
+     * @param authCode
+     * @return
+     */
+    @Override
+    public KuaishouResultToken getAccessToken(String authCode) {
+        String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.AUTH_TOKEN;
+        JSONObject requestJson = new JSONObject();
+        requestJson.put("auth_code", authCode);
+        requestJson.put("app_id", PropertiesUtils.getConfig("kuaishou_appid"));
+        requestJson.put("secret", PropertiesUtils.getConfig("kuaishou_secret"));
+        KuaishouResultToken kuaiShouResult = null;
+        try {
+            String result = HttpUtils.kuaiShouhttpPostRequest(url, requestJson.toJSONString(), null);
+            ObjectMapper mapper = new ObjectMapper();
+            mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+            kuaiShouResult = mapper.readValue(result, new TypeReference<KuaishouResultToken>() {
+            });
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return kuaiShouResult;
+    }
+
+    /**
+     * 刷新token
+     *
+     * @param refreshToken
+     * @return
+     */
+    @Override
+    public KuaishouResultToken getRefreshToken(String refreshToken) {
+        String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.REFRESH_TOKEN;
+        Map<String, String> headers = new HashMap<String, String>();
+        headers.put("Content-Type", "application/json");
+        Map<String, Object> param = new HashMap<String, Object>();
+        param.put("app_id", PropertiesUtils.getConfig("kuaishou_appid"));
+        param.put("secret", PropertiesUtils.getConfig("kuaishou_secret"));
+        param.put("refresh_token", refreshToken);
+        KuaishouResultToken kuaishouResult = null;
+        try {
+            String result = HttpUtils.httpPostRequest(url, param, headers);
+            ObjectMapper mapper = new ObjectMapper();
+            mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+            kuaishouResult = mapper.readValue(result, new TypeReference<KuaishouResultToken>() {
+            });
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return kuaishouResult;
+    }
+
+    public Object jsonToObj(Object t, String jsonStr) throws
+            JsonParseException, JsonMappingException, IOException {
+        ObjectMapper mapper = new ObjectMapper();
+
+        mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+        return mapper.readValue(jsonStr, new TypeReference<Object>() {
+        });
+    }
+
+    public JavaType getJavaType(Type type) {
+        //判断是否带有泛型
+        if (type instanceof ParameterizedType) {
+            Type[] actualTypeArguments = ((ParameterizedType) type).getActualTypeArguments();
+            //获取泛型类型
+            Class rowClass = (Class) ((ParameterizedType) type).getRawType();
+            JavaType[] javaTypes = new JavaType[actualTypeArguments.length];
+            for (int i = 0; i < actualTypeArguments.length; i++) {
+                //泛型也可能带有泛型,递归获取
+                javaTypes[i] = getJavaType(actualTypeArguments[i]);
+            }
+            return TypeFactory.defaultInstance().constructParametricType(rowClass, javaTypes);
+        } else {
+            //简单类型直接用该类构建
+            Class cla = (Class) type;
+            return TypeFactory.defaultInstance().constructParametricType(cla, new JavaType[0]);
+        }
+    }
+
+
+}

+ 188 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/KuaiShouAppInfoList.vue

@@ -0,0 +1,188 @@
+<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="accountId">
+              <a-input placeholder="请输入accountId" v-model="queryParam.accountId"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="广告组id">
+              <a-input placeholder="请输入广告组id" v-model="queryParam.unitId"></a-input>
+            </a-form-item>
+          </a-col>
+        <template v-if="toggleSearchStatus">
+        <a-col :md="6" :sm="8">
+            <a-form-item label="appPackageName">
+              <a-input placeholder="请输入appPackageName" v-model="queryParam.appPackageName"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="appName">
+              <a-input placeholder="请输入appName" v-model="queryParam.appName"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="deviceOsType">
+              <a-input placeholder="请输入deviceOsType" v-model="queryParam.deviceOsType"></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('广告组-app信息')">导出</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 -->
+
+    <!-- 表单区域 -->
+    <kuaiShouAppInfo-modal ref="modalForm" @ok="modalFormOk"></kuaiShouAppInfo-modal>
+  </a-card>
+</template>
+
+<script>
+  import KuaiShouAppInfoModal from './modules/KuaiShouAppInfoModal'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+
+  export default {
+    name: "KuaiShouAppInfoList",
+    mixins:[JeecgListMixin],
+    components: {
+      KuaiShouAppInfoModal
+    },
+    data () {
+      return {
+        description: '广告组-app信息管理页面',
+        // 表头
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+           },
+		   {
+            title: 'accountId',
+            align:"center",
+            dataIndex: 'accountId'
+           },
+		   {
+            title: '广告组id',
+            align:"center",
+            dataIndex: 'unitId'
+           },
+		   {
+            title: 'appPackageName',
+            align:"center",
+            dataIndex: 'appPackageName'
+           },
+		   {
+            title: 'appName',
+            align:"center",
+            dataIndex: 'appName'
+           },
+		   {
+            title: 'deviceOsType',
+            align:"center",
+            dataIndex: 'deviceOsType'
+           },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            scopedSlots: { customRender: 'action' },
+          }
+        ],
+		url: {
+          list: "/kuaishou/kuaiShouAppInfo/list",
+          delete: "/kuaishou/kuaiShouAppInfo/delete",
+          deleteBatch: "/kuaishou/kuaiShouAppInfo/deleteBatch",
+          exportXlsUrl: "kuaishou/kuaiShouAppInfo/exportXls",
+          importExcelUrl: "kuaishou/kuaiShouAppInfo/importExcel",
+       },
+    }
+  },
+  computed: {
+    importExcelUrl: function(){
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+    }
+  },
+    methods: {
+     
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less'
+</style>

+ 188 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/KuaiShouCampaignCreateList.vue

@@ -0,0 +1,188 @@
+<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="账户ID">
+              <a-input placeholder="请输入账户ID" v-model="queryParam.accountId"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="广告计划名称">
+              <a-input placeholder="请输入广告计划名称" v-model="queryParam.campaignName"></a-input>
+            </a-form-item>
+          </a-col>
+        <template v-if="toggleSearchStatus">
+        <a-col :md="6" :sm="8">
+            <a-form-item label="2:提升应用安装 3:获取电商下单 4:推广品牌活动 5:收集销售线索">
+              <a-input placeholder="请输入2:提升应用安装 3:获取电商下单 4:推广品牌活动 5:收集销售线索" v-model="queryParam.type"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="计划单日预算金额 单位:厘 0表示预算不限,不小于500元,不超过100000000">
+              <a-input placeholder="请输入计划单日预算金额 单位:厘 0表示预算不限,不小于500元,不超过100000000" v-model="queryParam.dayBudget"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="广告计划id">
+              <a-input placeholder="请输入广告计划id" v-model="queryParam.campaignId"></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 -->
+
+    <!-- 表单区域 -->
+    <kuaiShouCampaignCreate-modal ref="modalForm" @ok="modalFormOk"></kuaiShouCampaignCreate-modal>
+  </a-card>
+</template>
+
+<script>
+  import KuaiShouCampaignCreateModal from './modules/KuaiShouCampaignCreateModal'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+
+  export default {
+    name: "KuaiShouCampaignCreateList",
+    mixins:[JeecgListMixin],
+    components: {
+      KuaiShouCampaignCreateModal
+    },
+    data () {
+      return {
+        description: '快手-创建广告计划管理页面',
+        // 表头
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+           },
+		   {
+            title: '账户ID',
+            align:"center",
+            dataIndex: 'accountId'
+           },
+		   {
+            title: '广告计划名称',
+            align:"center",
+            dataIndex: 'campaignName'
+           },
+		   {
+            title: '2:提升应用安装 3:获取电商下单 4:推广品牌活动 5:收集销售线索',
+            align:"center",
+            dataIndex: 'type'
+           },
+		   {
+            title: '计划单日预算金额 单位:厘 0表示预算不限,不小于500元,不超过100000000',
+            align:"center",
+            dataIndex: 'dayBudget'
+           },
+		   {
+            title: '广告计划id',
+            align:"center",
+            dataIndex: 'campaignId'
+           },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            scopedSlots: { customRender: 'action' },
+          }
+        ],
+		url: {
+          list: "/kuaishou/kuaiShouCampaignCreate/list",
+          delete: "/kuaishou/kuaiShouCampaignCreate/delete",
+          deleteBatch: "/kuaishou/kuaiShouCampaignCreate/deleteBatch",
+          exportXlsUrl: "kuaishou/kuaiShouCampaignCreate/exportXls",
+          importExcelUrl: "kuaishou/kuaiShouCampaignCreate/importExcel",
+       },
+    }
+  },
+  computed: {
+    importExcelUrl: function(){
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+    }
+  },
+    methods: {
+     
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less'
+</style>

+ 188 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/KuaiShouCampaignList.vue

@@ -0,0 +1,188 @@
+<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="账户ID">
+              <a-input placeholder="请输入账户ID" v-model="queryParam.accountId"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="计划ID">
+              <a-input placeholder="请输入计划ID" v-model="queryParam.campaignId"></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.campaignName"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="状态">
+              <a-input placeholder="请输入状态" v-model="queryParam.status"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="每日预算">
+              <a-input placeholder="请输入每日预算" v-model="queryParam.dayBudget"></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 -->
+
+    <!-- 表单区域 -->
+    <kuaiShouCampaign-modal ref="modalForm" @ok="modalFormOk"></kuaiShouCampaign-modal>
+  </a-card>
+</template>
+
+<script>
+  import KuaiShouCampaignModal from './modules/KuaiShouCampaignModal'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+
+  export default {
+    name: "KuaiShouCampaignList",
+    mixins:[JeecgListMixin],
+    components: {
+      KuaiShouCampaignModal
+    },
+    data () {
+      return {
+        description: '快手-获取广告计划信息管理页面',
+        // 表头
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+           },
+		   {
+            title: '账户ID',
+            align:"center",
+            dataIndex: 'accountId'
+           },
+		   {
+            title: '计划ID',
+            align:"center",
+            dataIndex: 'campaignId'
+           },
+		   {
+            title: '计划名称',
+            align:"center",
+            dataIndex: 'campaignName'
+           },
+		   {
+            title: '状态',
+            align:"center",
+            dataIndex: 'status'
+           },
+		   {
+            title: '每日预算',
+            align:"center",
+            dataIndex: 'dayBudget'
+           },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            scopedSlots: { customRender: 'action' },
+          }
+        ],
+		url: {
+          list: "/kuaishou/kuaiShouCampaign/list",
+          delete: "/kuaishou/kuaiShouCampaign/delete",
+          deleteBatch: "/kuaishou/kuaiShouCampaign/deleteBatch",
+          exportXlsUrl: "kuaishou/kuaiShouCampaign/exportXls",
+          importExcelUrl: "kuaishou/kuaiShouCampaign/importExcel",
+       },
+    }
+  },
+  computed: {
+    importExcelUrl: function(){
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+    }
+  },
+    methods: {
+     
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less'
+</style>

+ 233 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/KuaiShouCreativeList.vue

@@ -0,0 +1,233 @@
+<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="账户ID">
+              <a-input placeholder="请输入账户ID" v-model="queryParam.accountId"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="广告计划ID">
+              <a-input placeholder="请输入广告计划ID" v-model="queryParam.campaignId"></a-input>
+            </a-form-item>
+          </a-col>
+        <template v-if="toggleSearchStatus">
+        <a-col :md="6" :sm="8">
+            <a-form-item label="广告组ID">
+              <a-input placeholder="请输入广告组ID" v-model="queryParam.unitId"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="广告创意ID">
+              <a-input placeholder="请输入广告创意ID" v-model="queryParam.creativeId"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="广告创意名称">
+              <a-input placeholder="请输入广告创意名称" v-model="queryParam.creativeName"></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 -->
+
+    <!-- 表单区域 -->
+    <kuaiShouCreative-modal ref="modalForm" @ok="modalFormOk"></kuaiShouCreative-modal>
+  </a-card>
+</template>
+
+<script>
+  import KuaiShouCreativeModal from './modules/KuaiShouCreativeModal'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+
+  export default {
+    name: "KuaiShouCreativeList",
+    mixins:[JeecgListMixin],
+    components: {
+      KuaiShouCreativeModal
+    },
+    data () {
+      return {
+        description: '快手-创意信息管理页面',
+        // 表头
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+           },
+		   {
+            title: '账户ID',
+            align:"center",
+            dataIndex: 'accountId'
+           },
+		   {
+            title: '广告计划ID',
+            align:"center",
+            dataIndex: 'campaignId'
+           },
+		   {
+            title: '广告组ID',
+            align:"center",
+            dataIndex: 'unitId'
+           },
+		   {
+            title: '广告创意ID',
+            align:"center",
+            dataIndex: 'creativeId'
+           },
+		   {
+            title: '广告创意名称',
+            align:"center",
+            dataIndex: 'creativeName'
+           },
+		   {
+            title: '视频作品ID',
+            align:"center",
+            dataIndex: 'photoId'
+           },
+		   {
+            title: '广告创意状态',
+            align:"center",
+            dataIndex: 'status'
+           },
+		   {
+            title: '审核拒绝理由',
+            align:"center",
+            dataIndex: 'reviewDetail'
+           },
+		   {
+            title: '封面URL',
+            align:"center",
+            dataIndex: 'coverUrl'
+           },
+		   {
+            title: '封面图宽度',
+            align:"center",
+            dataIndex: 'coverWidth'
+           },
+		   {
+            title: '封面图高度',
+            align:"center",
+            dataIndex: 'coverHeight'
+           },
+		   {
+            title: 'description',
+            align:"center",
+            dataIndex: 'description'
+           },
+		   {
+            title: '行动号召按钮文案',
+            align:"center",
+            dataIndex: 'actionBarText'
+           },
+		   {
+            title: '点击测试链接',
+            align:"center",
+            dataIndex: 'clickTrackUrl'
+           },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            scopedSlots: { customRender: 'action' },
+          }
+        ],
+		url: {
+          list: "/kuaishou/kuaiShouCreative/list",
+          delete: "/kuaishou/kuaiShouCreative/delete",
+          deleteBatch: "/kuaishou/kuaiShouCreative/deleteBatch",
+          exportXlsUrl: "kuaishou/kuaiShouCreative/exportXls",
+          importExcelUrl: "kuaishou/kuaiShouCreative/importExcel",
+       },
+    }
+  },
+  computed: {
+    importExcelUrl: function(){
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+    }
+  },
+    methods: {
+     
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less'
+</style>

+ 268 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/KuaiShouGroupList.vue

@@ -0,0 +1,268 @@
+<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="账户ID">
+              <a-input placeholder="请输入账户ID" v-model="queryParam.accountId"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="广告活动ID">
+              <a-input placeholder="请输入广告活动ID" v-model="queryParam.campaignId"></a-input>
+            </a-form-item>
+          </a-col>
+        <template v-if="toggleSearchStatus">
+        <a-col :md="6" :sm="8">
+            <a-form-item label="广告组ID">
+              <a-input placeholder="请输入广告组ID" v-model="queryParam.unitId"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="广告组名称">
+              <a-input placeholder="请输入广告组名称" v-model="queryParam.unitName"></a-input>
+            </a-form-item>
+          </a-col>
+          <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 -->
+
+    <!-- 表单区域 -->
+    <kuaiShouGroup-modal ref="modalForm" @ok="modalFormOk"></kuaiShouGroup-modal>
+  </a-card>
+</template>
+
+<script>
+  import KuaiShouGroupModal from './modules/KuaiShouGroupModal'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+
+  export default {
+    name: "KuaiShouGroupList",
+    mixins:[JeecgListMixin],
+    components: {
+      KuaiShouGroupModal
+    },
+    data () {
+      return {
+        description: '广告组信息管理页面',
+        // 表头
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key:'rowIndex',
+            width:60,
+            align:"center",
+            customRender:function (t,r,index) {
+              return parseInt(index)+1;
+            }
+           },
+		   {
+            title: '账户ID',
+            align:"center",
+            dataIndex: 'accountId'
+           },
+		   {
+            title: '广告活动ID',
+            align:"center",
+            dataIndex: 'campaignId'
+           },
+		   {
+            title: '广告组ID',
+            align:"center",
+            dataIndex: 'unitId'
+           },
+		   {
+            title: '广告组名称',
+            align:"center",
+            dataIndex: 'unitName'
+           },
+		   {
+            title: '广告组状态',
+            align:"center",
+            dataIndex: 'status'
+           },
+		   {
+            title: '审核拒绝理由',
+            align:"center",
+            dataIndex: 'reviewDetail'
+           },
+		   {
+            title: '出价类型',
+            align:"center",
+            dataIndex: 'bidType'
+           },
+		   {
+            title: '出价',
+            align:"center",
+            dataIndex: 'bid'
+           },
+		   {
+            title: 'OCPC出价',
+            align:"center",
+            dataIndex: 'cpaBid'
+           },
+		   {
+            title: 'OCPX行为类型   1: CPM, 2: CPC,',
+            align:"center",
+            dataIndex: 'ocpxActionType'
+           },
+		   {
+            title: '单日预算',
+            align:"center",
+            dataIndex: 'dayBudget'
+           },
+		   {
+            title: '投放方式  0:未知, 1:正常投',
+            align:"center",
+            dataIndex: 'speed'
+           },
+		   {
+            title: '投放开始时间',
+            align:"center",
+            dataIndex: 'beginTime'
+           },
+		   {
+            title: '投放结束时间',
+            align:"center",
+            dataIndex: 'endTime'
+           },
+		   {
+            title: '投放时段',
+            align:"center",
+            dataIndex: 'schedule'
+           },
+		   {
+            title: '创意展现方式  0:未知, 1:轮播,',
+            align:"center",
+            dataIndex: 'showModel'
+           },
+		   {
+            title: 'url类型 ',
+            align:"center",
+            dataIndex: 'urlType'
+           },
+		   {
+            title: '落地页链接',
+            align:"center",
+            dataIndex: 'url'
+           },
+		   {
+            title: 'APP ID',
+            align:"center",
+            dataIndex: 'appId'
+           },
+		   {
+            title: 'APP图标存储地址',
+            align:"center",
+            dataIndex: 'appIconUrl'
+           },
+		   {
+            title: '应用信息',
+            align:"center",
+            dataIndex: 'diverseData'
+           },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            scopedSlots: { customRender: 'action' },
+          }
+        ],
+		url: {
+          list: "/kuaishou/kuaiShouGroup/list",
+          delete: "/kuaishou/kuaiShouGroup/delete",
+          deleteBatch: "/kuaishou/kuaiShouGroup/deleteBatch",
+          exportXlsUrl: "kuaishou/kuaiShouGroup/exportXls",
+          importExcelUrl: "kuaishou/kuaiShouGroup/importExcel",
+       },
+    }
+  },
+  computed: {
+    importExcelUrl: function(){
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+    }
+  },
+    methods: {
+     
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less'
+</style>

+ 149 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/modules/KuaiShouAppInfoModal.vue

@@ -0,0 +1,149 @@
+<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="accountId">
+          <a-input placeholder="请输入accountId" v-decorator="['accountId', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="广告组id">
+          <a-input placeholder="请输入广告组id" v-decorator="['unitId', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="appPackageName">
+          <a-input placeholder="请输入appPackageName" v-decorator="['appPackageName', validatorRules.appPackageName ]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="appName">
+          <a-input placeholder="请输入appName" v-decorator="['appName', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="deviceOsType">
+          <a-input-number v-decorator="[ 'deviceOsType', {}]" />
+        </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: "KuaiShouAppInfoModal",
+    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:{
+        appPackageName:{rules: [{ required: true, message: '请输入appPackageName!' }]},
+        },
+        url: {
+          add: "/kuaishou/kuaiShouAppInfo/add",
+          edit: "/kuaishou/kuaiShouAppInfo/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,'accountId','unitId','appPackageName','appName','deviceOsType'))
+		  //时间格式化
+        });
+
+      },
+      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>

+ 156 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/modules/KuaiShouAppInfoModal__Style#Drawer.vue

@@ -0,0 +1,156 @@
+<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="accountId">
+          <a-input placeholder="请输入accountId" v-decorator="['accountId', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="广告组id">
+          <a-input placeholder="请输入广告组id" v-decorator="['unitId', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="appPackageName">
+          <a-input placeholder="请输入appPackageName" v-decorator="['appPackageName', validatorRules.appPackageName ]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="appName">
+          <a-input placeholder="请输入appName" v-decorator="['appName', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="deviceOsType">
+          <a-input-number v-decorator="[ 'deviceOsType', {}]" />
+        </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: "KuaiShouAppInfoModal",
+    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:{
+        appPackageName:{rules: [{ required: true, message: '请输入appPackageName!' }]},
+        },
+        url: {
+          add: "/kuaishou/kuaiShouAppInfo/add",
+          edit: "/kuaishou/kuaiShouAppInfo/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,'accountId','unitId','appPackageName','appName','deviceOsType'))
+		  //时间格式化
+        });
+
+      },
+      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>

+ 150 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/modules/KuaiShouCampaignCreateModal.vue

@@ -0,0 +1,150 @@
+<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="账户ID">
+          <a-input placeholder="请输入账户ID" v-decorator="['accountId', validatorRules.accountId ]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="广告计划名称">
+          <a-input placeholder="请输入广告计划名称" v-decorator="['campaignName', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="2:提升应用安装 3:获取电商下单 4:推广品牌活动 5:收集销售线索">
+          <a-input-number v-decorator="[ 'type', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="计划单日预算金额 单位:厘 0表示预算不限,不小于500元,不超过100000000">
+          <a-input placeholder="请输入计划单日预算金额 单位:厘 0表示预算不限,不小于500元,不超过100000000" v-decorator="['dayBudget', validatorRules.dayBudget ]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="广告计划id">
+          <a-input placeholder="请输入广告计划id" v-decorator="['campaignId', {}]" />
+        </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: "KuaiShouCampaignCreateModal",
+    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:{
+        accountId:{rules: [{ required: true, message: '请输入账户ID!' }]},
+        dayBudget:{rules: [{ required: true, message: '请输入计划单日预算金额 单位:厘 0表示预算不限,不小于500元,不超过100000000!' }]},
+        },
+        url: {
+          add: "/kuaishou/kuaiShouCampaignCreate/add",
+          edit: "/kuaishou/kuaiShouCampaignCreate/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,'accountId','campaignName','type','dayBudget','campaignId'))
+		  //时间格式化
+        });
+
+      },
+      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>

+ 157 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/modules/KuaiShouCampaignCreateModal__Style#Drawer.vue

@@ -0,0 +1,157 @@
+<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="账户ID">
+          <a-input placeholder="请输入账户ID" v-decorator="['accountId', validatorRules.accountId ]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="广告计划名称">
+          <a-input placeholder="请输入广告计划名称" v-decorator="['campaignName', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="2:提升应用安装 3:获取电商下单 4:推广品牌活动 5:收集销售线索">
+          <a-input-number v-decorator="[ 'type', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="计划单日预算金额 单位:厘 0表示预算不限,不小于500元,不超过100000000">
+          <a-input placeholder="请输入计划单日预算金额 单位:厘 0表示预算不限,不小于500元,不超过100000000" v-decorator="['dayBudget', validatorRules.dayBudget ]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="广告计划id">
+          <a-input placeholder="请输入广告计划id" v-decorator="['campaignId', {}]" />
+        </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: "KuaiShouCampaignCreateModal",
+    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:{
+        accountId:{rules: [{ required: true, message: '请输入账户ID!' }]},
+        dayBudget:{rules: [{ required: true, message: '请输入计划单日预算金额 单位:厘 0表示预算不限,不小于500元,不超过100000000!' }]},
+        },
+        url: {
+          add: "/kuaishou/kuaiShouCampaignCreate/add",
+          edit: "/kuaishou/kuaiShouCampaignCreate/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,'accountId','campaignName','type','dayBudget','campaignId'))
+		  //时间格式化
+        });
+
+      },
+      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>

+ 152 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/modules/KuaiShouCampaignModal.vue

@@ -0,0 +1,152 @@
+<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="账户ID">
+          <a-input placeholder="请输入账户ID" v-decorator="['accountId', validatorRules.accountId ]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="计划ID">
+          <a-input placeholder="请输入计划ID" v-decorator="['campaignId', validatorRules.campaignId ]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="计划名称">
+          <a-input placeholder="请输入计划名称" v-decorator="['campaignName', validatorRules.campaignName ]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="状态">
+          <a-input-number v-decorator="[ 'status', validatorRules.status ]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="每日预算">
+          <a-input-number v-decorator="[ 'dayBudget', {}]" />
+        </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: "KuaiShouCampaignModal",
+    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:{
+        accountId:{rules: [{ required: true, message: '请输入账户ID!' }]},
+        campaignId:{rules: [{ required: true, message: '请输入计划ID!' }]},
+        campaignName:{rules: [{ required: true, message: '请输入计划名称!' }]},
+        status:{rules: [{ required: true, message: '请输入状态!' }]},
+        },
+        url: {
+          add: "/kuaishou/kuaiShouCampaign/add",
+          edit: "/kuaishou/kuaiShouCampaign/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,'accountId','campaignId','campaignName','status','dayBudget'))
+		  //时间格式化
+        });
+
+      },
+      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>

+ 159 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/modules/KuaiShouCampaignModal__Style#Drawer.vue

@@ -0,0 +1,159 @@
+<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="账户ID">
+          <a-input placeholder="请输入账户ID" v-decorator="['accountId', validatorRules.accountId ]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="计划ID">
+          <a-input placeholder="请输入计划ID" v-decorator="['campaignId', validatorRules.campaignId ]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="计划名称">
+          <a-input placeholder="请输入计划名称" v-decorator="['campaignName', validatorRules.campaignName ]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="状态">
+          <a-input-number v-decorator="[ 'status', validatorRules.status ]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="每日预算">
+          <a-input-number v-decorator="[ 'dayBudget', {}]" />
+        </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: "KuaiShouCampaignModal",
+    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:{
+        accountId:{rules: [{ required: true, message: '请输入账户ID!' }]},
+        campaignId:{rules: [{ required: true, message: '请输入计划ID!' }]},
+        campaignName:{rules: [{ required: true, message: '请输入计划名称!' }]},
+        status:{rules: [{ required: true, message: '请输入状态!' }]},
+        },
+        url: {
+          add: "/kuaishou/kuaiShouCampaign/add",
+          edit: "/kuaishou/kuaiShouCampaign/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,'accountId','campaignId','campaignName','status','dayBudget'))
+		  //时间格式化
+        });
+
+      },
+      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>

+ 202 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/modules/KuaiShouCreativeModal.vue

@@ -0,0 +1,202 @@
+<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="账户ID">
+          <a-input placeholder="请输入账户ID" v-decorator="['accountId', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="广告计划ID">
+          <a-input placeholder="请输入广告计划ID" v-decorator="['campaignId', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="广告组ID">
+          <a-input placeholder="请输入广告组ID" v-decorator="['unitId', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="广告创意ID">
+          <a-input placeholder="请输入广告创意ID" v-decorator="['creativeId', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="广告创意名称">
+          <a-input placeholder="请输入广告创意名称" v-decorator="['creativeName', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="视频作品ID">
+          <a-input placeholder="请输入视频作品ID" v-decorator="['photoId', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="广告创意状态">
+          <a-input-number v-decorator="[ 'status', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="审核拒绝理由">
+          <a-input placeholder="请输入审核拒绝理由" v-decorator="['reviewDetail', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="封面URL">
+          <a-input placeholder="请输入封面URL" v-decorator="['coverUrl', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="封面图宽度">
+          <a-input placeholder="请输入封面图宽度" v-decorator="['coverWidth', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="封面图高度">
+          <a-input placeholder="请输入封面图高度" v-decorator="['coverHeight', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="description">
+          <a-input placeholder="请输入description" v-decorator="['description', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="行动号召按钮文案">
+          <a-input placeholder="请输入行动号召按钮文案" v-decorator="['actionBarText', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="点击测试链接">
+          <a-input placeholder="请输入点击测试链接" v-decorator="['clickTrackUrl', {}]" />
+        </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: "KuaiShouCreativeModal",
+    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:{
+        },
+        url: {
+          add: "/kuaishou/kuaiShouCreative/add",
+          edit: "/kuaishou/kuaiShouCreative/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,'accountId','campaignId','unitId','creativeId','creativeName','photoId','status','reviewDetail','coverUrl','coverWidth','coverHeight','description','actionBarText','clickTrackUrl'))
+		  //时间格式化
+        });
+
+      },
+      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>

+ 209 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/modules/KuaiShouCreativeModal__Style#Drawer.vue

@@ -0,0 +1,209 @@
+<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="账户ID">
+          <a-input placeholder="请输入账户ID" v-decorator="['accountId', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="广告计划ID">
+          <a-input placeholder="请输入广告计划ID" v-decorator="['campaignId', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="广告组ID">
+          <a-input placeholder="请输入广告组ID" v-decorator="['unitId', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="广告创意ID">
+          <a-input placeholder="请输入广告创意ID" v-decorator="['creativeId', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="广告创意名称">
+          <a-input placeholder="请输入广告创意名称" v-decorator="['creativeName', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="视频作品ID">
+          <a-input placeholder="请输入视频作品ID" v-decorator="['photoId', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="广告创意状态">
+          <a-input-number v-decorator="[ 'status', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="审核拒绝理由">
+          <a-input placeholder="请输入审核拒绝理由" v-decorator="['reviewDetail', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="封面URL">
+          <a-input placeholder="请输入封面URL" v-decorator="['coverUrl', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="封面图宽度">
+          <a-input placeholder="请输入封面图宽度" v-decorator="['coverWidth', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="封面图高度">
+          <a-input placeholder="请输入封面图高度" v-decorator="['coverHeight', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="description">
+          <a-input placeholder="请输入description" v-decorator="['description', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="行动号召按钮文案">
+          <a-input placeholder="请输入行动号召按钮文案" v-decorator="['actionBarText', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="点击测试链接">
+          <a-input placeholder="请输入点击测试链接" v-decorator="['clickTrackUrl', {}]" />
+        </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: "KuaiShouCreativeModal",
+    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:{
+        },
+        url: {
+          add: "/kuaishou/kuaiShouCreative/add",
+          edit: "/kuaishou/kuaiShouCreative/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,'accountId','campaignId','unitId','creativeId','creativeName','photoId','status','reviewDetail','coverUrl','coverWidth','coverHeight','description','actionBarText','clickTrackUrl'))
+		  //时间格式化
+        });
+
+      },
+      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>

+ 244 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/modules/KuaiShouGroupModal.vue

@@ -0,0 +1,244 @@
+<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="账户ID">
+          <a-input placeholder="请输入账户ID" v-decorator="['accountId', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="广告活动ID">
+          <a-input placeholder="请输入广告活动ID" v-decorator="['campaignId', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="广告组ID">
+          <a-input placeholder="请输入广告组ID" v-decorator="['unitId', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="广告组名称">
+          <a-input placeholder="请输入广告组名称" v-decorator="['unitName', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="广告组状态">
+          <a-input-number v-decorator="[ 'status', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="审核拒绝理由">
+          <a-input placeholder="请输入审核拒绝理由" v-decorator="['reviewDetail', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="出价类型">
+          <a-input-number v-decorator="[ 'bidType', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="出价">
+          <a-input placeholder="请输入出价" v-decorator="['bid', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="OCPC出价">
+          <a-input placeholder="请输入OCPC出价" v-decorator="['cpaBid', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="OCPX行为类型   1: CPM, 2: CPC,">
+          <a-input-number v-decorator="[ 'ocpxActionType', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="单日预算">
+          <a-input placeholder="请输入单日预算" v-decorator="['dayBudget', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="投放方式  0:未知, 1:正常投">
+          <a-input-number v-decorator="[ 'speed', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="投放开始时间">
+          <a-input placeholder="请输入投放开始时间" v-decorator="['beginTime', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="投放结束时间">
+          <a-input placeholder="请输入投放结束时间" v-decorator="['endTime', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="投放时段">
+          <a-input placeholder="请输入投放时段" v-decorator="['schedule', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="创意展现方式  0:未知, 1:轮播,">
+          <a-input-number v-decorator="[ 'showModel', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="url类型 ">
+          <a-input-number v-decorator="[ 'urlType', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="落地页链接">
+          <a-input placeholder="请输入落地页链接" v-decorator="['url', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="APP ID">
+          <a-input placeholder="请输入APP ID" v-decorator="['appId', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="APP图标存储地址">
+          <a-input placeholder="请输入APP图标存储地址" v-decorator="['appIconUrl', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="应用信息">
+          <a-input placeholder="请输入应用信息" v-decorator="['diverseData', {}]" />
+        </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: "KuaiShouGroupModal",
+    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:{
+        },
+        url: {
+          add: "/kuaishou/kuaiShouGroup/add",
+          edit: "/kuaishou/kuaiShouGroup/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,'accountId','campaignId','unitId','unitName','status','reviewDetail','bidType','bid','cpaBid','ocpxActionType','dayBudget','speed','beginTime','endTime','schedule','showModel','urlType','url','appId','appIconUrl','diverseData'))
+		  //时间格式化
+        });
+
+      },
+      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>

+ 251 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/kuaishou/vue/modules/KuaiShouGroupModal__Style#Drawer.vue

@@ -0,0 +1,251 @@
+<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="账户ID">
+          <a-input placeholder="请输入账户ID" v-decorator="['accountId', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="广告活动ID">
+          <a-input placeholder="请输入广告活动ID" v-decorator="['campaignId', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="广告组ID">
+          <a-input placeholder="请输入广告组ID" v-decorator="['unitId', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="广告组名称">
+          <a-input placeholder="请输入广告组名称" v-decorator="['unitName', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="广告组状态">
+          <a-input-number v-decorator="[ 'status', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="审核拒绝理由">
+          <a-input placeholder="请输入审核拒绝理由" v-decorator="['reviewDetail', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="出价类型">
+          <a-input-number v-decorator="[ 'bidType', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="出价">
+          <a-input placeholder="请输入出价" v-decorator="['bid', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="OCPC出价">
+          <a-input placeholder="请输入OCPC出价" v-decorator="['cpaBid', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="OCPX行为类型   1: CPM, 2: CPC,">
+          <a-input-number v-decorator="[ 'ocpxActionType', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="单日预算">
+          <a-input placeholder="请输入单日预算" v-decorator="['dayBudget', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="投放方式  0:未知, 1:正常投">
+          <a-input-number v-decorator="[ 'speed', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="投放开始时间">
+          <a-input placeholder="请输入投放开始时间" v-decorator="['beginTime', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="投放结束时间">
+          <a-input placeholder="请输入投放结束时间" v-decorator="['endTime', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="投放时段">
+          <a-input placeholder="请输入投放时段" v-decorator="['schedule', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="创意展现方式  0:未知, 1:轮播,">
+          <a-input-number v-decorator="[ 'showModel', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="url类型 ">
+          <a-input-number v-decorator="[ 'urlType', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="落地页链接">
+          <a-input placeholder="请输入落地页链接" v-decorator="['url', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="APP ID">
+          <a-input placeholder="请输入APP ID" v-decorator="['appId', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="APP图标存储地址">
+          <a-input placeholder="请输入APP图标存储地址" v-decorator="['appIconUrl', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="应用信息">
+          <a-input placeholder="请输入应用信息" v-decorator="['diverseData', {}]" />
+        </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: "KuaiShouGroupModal",
+    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:{
+        },
+        url: {
+          add: "/kuaishou/kuaiShouGroup/add",
+          edit: "/kuaishou/kuaiShouGroup/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,'accountId','campaignId','unitId','unitName','status','reviewDetail','bidType','bid','cpaBid','ocpxActionType','dayBudget','speed','beginTime','endTime','schedule','showModel','urlType','url','appId','appIconUrl','diverseData'))
+		  //时间格式化
+        });
+
+      },
+      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>

+ 68 - 0
module-common/src/main/java/cn/com/ctop/common/utils/Check.java

@@ -0,0 +1,68 @@
+package cn.com.ctop.common.utils;
+
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+public class Check {
+    public static boolean isNull(List list) {
+        return list == null || list.size() == 0 ? true : false;
+    }
+
+    public static boolean isNull(Long l) {
+        return l == null || l == 0;
+    }
+
+    public static boolean isNull(Collection collection) {
+        return collection == null || collection.size() == 0 ? true : false;
+    }
+
+    public static boolean isNull(String str) {
+        return str == null || str.length() <= 0;
+    }
+
+    public static boolean isNullSet(Set set) {
+        return set == null || set.size() == 0 ? true : false;
+    }
+
+    public static boolean isNull(byte[] bytes) {
+        return bytes == null || bytes.length == 0 ? true : false;
+    }
+
+    public static boolean hasNull(Object... objects) {
+        for (Object obj : objects) {
+            if (obj == null) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    public static boolean allEmpty(String... strs) {
+        for (String str : strs) {
+            if (StringUtils.isNotEmpty(str)) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    public static boolean blankStr(String str) {
+        return str == null || str.length() == 0 ? true : false;
+    }
+
+    public static boolean isBlank(String str) {
+        return str == null || "".equals(str) ? true : false;
+    }
+
+    public static boolean isNull(Object object) {
+        return object == null ? true : false;
+    }
+
+    public static boolean isNullMap(Map map) {
+        return map == null || map.size() == 0 ? true : false;
+    }
+}

+ 126 - 90
module-common/src/main/java/cn/com/ctop/common/utils/HttpUtils.java

@@ -54,9 +54,10 @@ public class HttpUtils {
     private static final Logger logger = LoggerFactory.getLogger(HttpUtils.class);
     public static CookieStore cookieStore = new BasicCookieStore();
     //.setProxy(new HttpHost("106.125.239.179", 4245))
-    public static Map<String,Map<String,String>> fontsMap = new HashMap<String,Map<String,String>>();
+    public static Map<String, Map<String, String>> fontsMap = new HashMap<String, Map<String, String>>();
     public static String USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36";
-    public static CloseableHttpClient createSSLClientDefault(){
+
+    public static CloseableHttpClient createSSLClientDefault() {
         try {
             SSLContext sslContext = new SSLContextBuilder().loadTrustMaterial(null, new TrustStrategy() {
                 //信任所有证书
@@ -66,32 +67,32 @@ public class HttpUtils {
             }).build();
             RequestConfig globalConfig = RequestConfig.custom().setConnectTimeout(30000).setSocketTimeout(30000).setCookieSpec(CookieSpecs.STANDARD).build();
             SSLConnectionSocketFactory sslFactory = new SSLConnectionSocketFactory(sslContext);
-            return HttpClients.custom().setDefaultCookieStore(cookieStore).setDefaultRequestConfig(globalConfig).setConnectionReuseStrategy((response, context) -> false ).setSSLSocketFactory(sslFactory).build();
+            return HttpClients.custom().setDefaultCookieStore(cookieStore).setDefaultRequestConfig(globalConfig).setConnectionReuseStrategy((response, context) -> false).setSSLSocketFactory(sslFactory).build();
         } catch (Exception e) {
-            logger.error("处理Https证书异常",e);
+            logger.error("处理Https证书异常", e);
         }
-        return  HttpClients.createDefault();
+        return HttpClients.createDefault();
     }
 
-    public static String httpPostParamRequest(String url,Map<String,Object> param,Map<String,String> headers){
+    public static String httpPostParamRequest(String url, Map<String, Object> param, Map<String, String> headers) {
         HttpClient httpClient = createSSLClientDefault();
         String strReturn = "";
         try {
             HttpPost httppost = new HttpPost(url);
-            httppost.setHeader("User-Agent",USER_AGENT);
+            httppost.setHeader("User-Agent", USER_AGENT);
 
             List<Cookie> list = cookieStore.getCookies();
             System.out.println("httpPostRequest");
-            for(Cookie ck :list){
-                System.out.println(ck.getName()+"="+ck.getValue()+","+ck.getDomain());
+            for (Cookie ck : list) {
+                System.out.println(ck.getName() + "=" + ck.getValue() + "," + ck.getDomain());
             }
             System.out.println("-------------------------------------");
-            for (String key :headers.keySet()) {
+            for (String key : headers.keySet()) {
                 httppost.setHeader(key, headers.get(key));
-                System.out.println(key+"="+headers.get(key));
+                System.out.println(key + "=" + headers.get(key));
             }
             List<NameValuePair> paramList = new ArrayList<NameValuePair>();
-            for(String key : param.keySet()){
+            for (String key : param.keySet()) {
                 BasicNameValuePair basicNameValuePair = new BasicNameValuePair(key, String.valueOf(param.get(key)));
                 paramList.add(basicNameValuePair);
             }
@@ -108,10 +109,10 @@ public class HttpUtils {
             HttpResponse response = httpClient.execute(httppost);
             int statusCode = response.getStatusLine().getStatusCode();
             System.out.println(statusCode);
-            if(statusCode == HttpStatus.SC_MOVED_PERMANENTLY || statusCode==HttpStatus.SC_MOVED_TEMPORARILY){
+            if (statusCode == HttpStatus.SC_MOVED_PERMANENTLY || statusCode == HttpStatus.SC_MOVED_TEMPORARILY) {
                 String newUrl = response.getFirstHeader("Location").getValue();
-                return httpPostParamRequest(newUrl,param,headers);
-            }else if(statusCode == HttpStatus.SC_OK){
+                return httpPostParamRequest(newUrl, param, headers);
+            } else if (statusCode == HttpStatus.SC_OK) {
                 respentity = response.getEntity();
                 strReturn = EntityUtils.toString(respentity);
                 return strReturn;
@@ -122,22 +123,23 @@ public class HttpUtils {
         }
         return strReturn;
     }
-    public static String httpPostRequest(String url,Map<String,Object> param,Map<String,String> headers){
+
+    public static String httpPostRequest(String url, Map<String, Object> param, Map<String, String> headers) {
 //        HttpClient httpclient = HttpClientBuilder.create().setRedirectStrategy(new LaxRedirectStrategy()).build();
         HttpClient httpClient = createSSLClientDefault();
         String strReturn = "";
         try {
             HttpPost httppost = new HttpPost(url);
-            httppost.setHeader("User-Agent",USER_AGENT);
+            httppost.setHeader("User-Agent", USER_AGENT);
             httppost.addHeader("Content-Type", "application/json");
             List<Cookie> list = cookieStore.getCookies();
             System.out.println("httpPostRequest");
-            for(Cookie ck :list){
-                System.out.println(ck.getName()+"="+ck.getValue()+","+ck.getDomain());
+            for (Cookie ck : list) {
+                System.out.println(ck.getName() + "=" + ck.getValue() + "," + ck.getDomain());
             }
-            for (String key :headers.keySet()) {
+            for (String key : headers.keySet()) {
                 httppost.setHeader(key, headers.get(key));
-                System.out.println(key+"="+headers.get(key));
+                System.out.println(key + "=" + headers.get(key));
             }
             //httppost.setHeader("Content-Type", "application/json");
             httppost.setEntity(new StringEntity(new Gson().toJson(param), Charset.forName("UTF-8")));
@@ -145,10 +147,10 @@ public class HttpUtils {
 
             HttpResponse response = httpClient.execute(httppost);
             int statusCode = response.getStatusLine().getStatusCode();
-            if(statusCode == HttpStatus.SC_MOVED_PERMANENTLY || statusCode==HttpStatus.SC_MOVED_TEMPORARILY){
+            if (statusCode == HttpStatus.SC_MOVED_PERMANENTLY || statusCode == HttpStatus.SC_MOVED_TEMPORARILY) {
                 String newUrl = response.getFirstHeader("Location").getValue();
-                return httpPostRequest(newUrl,param,headers);
-            }else if(statusCode == HttpStatus.SC_OK){
+                return httpPostRequest(newUrl, param, headers);
+            } else if (statusCode == HttpStatus.SC_OK) {
                 respentity = response.getEntity();
                 strReturn = EntityUtils.toString(respentity);
                 return strReturn;
@@ -160,22 +162,53 @@ public class HttpUtils {
         return strReturn;
     }
 
-    public static String httpPostRequest(String url,JSONObject params,Map<String,String> headers){
+
+    public static String kuaiShouhttpPostRequest(String url, String body, Map<String, String> headers) {
+        HttpClient httpClient = createSSLClientDefault();
+        String strReturn = "";
+        try {
+            HttpPost httppost = new HttpPost(url);
+            if (!Check.isNullMap(headers)) {
+                for (String key : headers.keySet()) {
+                    httppost.setHeader(key, headers.get(key));
+                }
+            }
+            httppost.setHeader("User-Agent", USER_AGENT);
+            httppost.addHeader("Content-Type", "application/json");
+            headers.put("Content-Type", "application/json");
+            httppost.setEntity(new StringEntity(body, Charset.forName("UTF-8")));
+            HttpEntity respentity;
+            HttpResponse response = httpClient.execute(httppost);
+            int statusCode = response.getStatusLine().getStatusCode();
+            if (statusCode == HttpStatus.SC_OK) {
+                respentity = response.getEntity();
+                strReturn = EntityUtils.toString(respentity);
+                return strReturn;
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            logger.error(e.getMessage());
+        }
+        return strReturn;
+    }
+
+
+    public static String httpPostRequest(String url, JSONObject params, Map<String, String> headers) {
 //        HttpClient httpclient = HttpClientBuilder.create().setRedirectStrategy(new LaxRedirectStrategy()).build();
         HttpClient httpClient = createSSLClientDefault();
         String strReturn = "";
         try {
             HttpPost httppost = new HttpPost(url);
-            httppost.setHeader("User-Agent",USER_AGENT);
+            httppost.setHeader("User-Agent", USER_AGENT);
             httppost.addHeader("Content-Type", "application/json");
             List<Cookie> list = cookieStore.getCookies();
             System.out.println("httpPostRequest");
-            for(Cookie ck :list){
-                System.out.println(ck.getName()+"="+ck.getValue()+","+ck.getDomain());
+            for (Cookie ck : list) {
+                System.out.println(ck.getName() + "=" + ck.getValue() + "," + ck.getDomain());
             }
-            for (String key :headers.keySet()) {
+            for (String key : headers.keySet()) {
                 httppost.setHeader(key, headers.get(key));
-                System.out.println(key+"="+headers.get(key));
+                System.out.println(key + "=" + headers.get(key));
             }
             //httppost.setHeader("Content-Type", "application/json");
             httppost.setEntity(new StringEntity(params.toJSONString(), Charset.forName("UTF-8")));
@@ -183,10 +216,10 @@ public class HttpUtils {
 
             HttpResponse response = httpClient.execute(httppost);
             int statusCode = response.getStatusLine().getStatusCode();
-            if(statusCode == HttpStatus.SC_MOVED_PERMANENTLY || statusCode==HttpStatus.SC_MOVED_TEMPORARILY){
+            if (statusCode == HttpStatus.SC_MOVED_PERMANENTLY || statusCode == HttpStatus.SC_MOVED_TEMPORARILY) {
                 String newUrl = response.getFirstHeader("Location").getValue();
-                return httpPostRequest(newUrl,params,headers);
-            }else if(statusCode == HttpStatus.SC_OK){
+                return httpPostRequest(newUrl, params, headers);
+            } else if (statusCode == HttpStatus.SC_OK) {
                 respentity = response.getEntity();
                 strReturn = EntityUtils.toString(respentity);
                 return strReturn;
@@ -198,32 +231,32 @@ public class HttpUtils {
         return strReturn;
     }
 
-    public static String httpGetRequest(String url){
+    public static String httpGetRequest(String url) {
         HttpClient httpClient = createSSLClientDefault();
         HttpResponse response = null;
         HttpGet httpGet = new HttpGet(url);
 //        httpPost.setHeader("Content-Type", "application/json");
         String result = null;
         try {
-            httpGet.setHeader("User-Agent",USER_AGENT);
+            httpGet.setHeader("User-Agent", USER_AGENT);
             List<Cookie> list2 = cookieStore.getCookies();
             System.out.println("httpGetRequest");
-            for(Cookie ck :list2){
-                System.out.println(ck.getName()+"="+ck.getValue()+","+ck.getDomain());
+            for (Cookie ck : list2) {
+                System.out.println(ck.getName() + "=" + ck.getValue() + "," + ck.getDomain());
             }
             response = httpClient.execute(httpGet);
             List<Cookie> list = cookieStore.getCookies();
             System.out.println("httpGetRequest");
-            for(Cookie ck :list){
-                System.out.println(ck.getName()+"="+ck.getValue()+","+ck.getDomain());
+            for (Cookie ck : list) {
+                System.out.println(ck.getName() + "=" + ck.getValue() + "," + ck.getDomain());
             }
             System.out.println("-------------------------------------");
             System.out.println(response.getStatusLine().getStatusCode());
             int statusCode = response.getStatusLine().getStatusCode();
-            if(statusCode == HttpStatus.SC_MOVED_PERMANENTLY || statusCode==HttpStatus.SC_MOVED_TEMPORARILY){
+            if (statusCode == HttpStatus.SC_MOVED_PERMANENTLY || statusCode == HttpStatus.SC_MOVED_TEMPORARILY) {
                 String newUrl = response.getFirstHeader("Location").getValue();
                 return httpGetRequest(newUrl);
-            }else if(statusCode == HttpStatus.SC_OK){
+            } else if (statusCode == HttpStatus.SC_OK) {
                 BufferedReader reader = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
                 String line = null;
                 StringBuilder builder = new StringBuilder();
@@ -238,6 +271,7 @@ public class HttpUtils {
         }
         return result;
     }
+
     public static String httpRequest(String url, String strParams) throws Exception {
 //        HttpClient httpclient = HttpClientBuilder.create().build();
         HttpClient httpClient = createSSLClientDefault();
@@ -261,7 +295,7 @@ public class HttpUtils {
         return strReturn;
     }
 
-    public static String httpRequest(String url, CookieStore cookies,Map<String,String> parameterMap) throws Exception {
+    public static String httpRequest(String url, CookieStore cookies, Map<String, String> parameterMap) throws Exception {
 //        HttpClient httpclient = getHttpclient();
         HttpClient httpClient = createSSLClientDefault();
         String strReturn = "";
@@ -300,24 +334,24 @@ public class HttpUtils {
         return httpclient;
     }
 
-    public static String callingGraph(String url,String json) {
+    public static String callingGraph(String url, String json) {
         HttpClient httpClient = createSSLClientDefault();
         HttpResponse response = null;
         HttpPost httpPost = new HttpPost(url);
         List<Cookie> list = cookieStore.getCookies();
 //        cookieStore.clear();
         System.out.println("callingGraph");
-        for(Cookie ck :list){
+        for (Cookie ck : list) {
 
-            System.out.println(ck.getName()+"="+ck.getValue()+","+ck.getDomain());
+            System.out.println(ck.getName() + "=" + ck.getValue() + "," + ck.getDomain());
         }
         System.out.println("-------------------------------------");
         httpPost.setHeader("Content-Type", "application/json");
         String result = null;
 
         try {
-            StringEntity entity = new StringEntity(json,"utf-8");
-            httpPost.setHeader("User-Agent",USER_AGENT);
+            StringEntity entity = new StringEntity(json, "utf-8");
+            httpPost.setHeader("User-Agent", USER_AGENT);
             httpPost.setEntity(entity);
             response = httpClient.execute(httpPost);
             System.out.println(response.getStatusLine().getStatusCode());
@@ -328,9 +362,9 @@ public class HttpUtils {
                 builder.append(line);
             }
             System.out.println("callingGraph");
-            for(Cookie ck :list){
+            for (Cookie ck : list) {
 
-                System.out.println(ck.getName()+"="+ck.getValue()+","+ck.getDomain());
+                System.out.println(ck.getName() + "=" + ck.getValue() + "," + ck.getDomain());
             }
             result = builder.toString();
         } catch (Exception e) {
@@ -338,9 +372,11 @@ public class HttpUtils {
         }
         return result;
     }
-    public static Map<String,Integer> kuaishouNumberMap;
-    public static Integer getKuaishouNumber(String key){
-        if(kuaishouNumberMap == null){
+
+    public static Map<String, Integer> kuaishouNumberMap;
+
+    public static Integer getKuaishouNumber(String key) {
+        if (kuaishouNumberMap == null) {
             kuaishouNumberMap = new HashMap<>();
 //            kuaishouNumberMap.put("32.0#-6.0#526.0#729.0",0);//735
 //            kuaishouNumberMap.put("98.0#13.0#363.0#726.0",1);//713
@@ -352,27 +388,27 @@ public class HttpUtils {
 //            kuaishouNumberMap.put("38.0#13.0#536.0#717.0",7);//704
 //            kuaishouNumberMap.put("33.0#-7.0#525.0#731.0",8);//738
 //            kuaishouNumberMap.put("37.0#-7.0#521.0#730.0",9);//737
-            kuaishouNumberMap.put("494.0#735.0",0);
-            kuaishouNumberMap.put("265.0#713.0",1);
-            kuaishouNumberMap.put("495.0#719.0",2);
-            kuaishouNumberMap.put("500.0#736.0",3);
-            kuaishouNumberMap.put("510.0#718.0",4);
-            kuaishouNumberMap.put("493.0#722.0",5);
-            kuaishouNumberMap.put("491.0#737.0",6);
-            kuaishouNumberMap.put("498.0#704.0",7);
-            kuaishouNumberMap.put("492.0#738.0",8);
-            kuaishouNumberMap.put("484.0#737.0",9);
+            kuaishouNumberMap.put("494.0#735.0", 0);
+            kuaishouNumberMap.put("265.0#713.0", 1);
+            kuaishouNumberMap.put("495.0#719.0", 2);
+            kuaishouNumberMap.put("500.0#736.0", 3);
+            kuaishouNumberMap.put("510.0#718.0", 4);
+            kuaishouNumberMap.put("493.0#722.0", 5);
+            kuaishouNumberMap.put("491.0#737.0", 6);
+            kuaishouNumberMap.put("498.0#704.0", 7);
+            kuaishouNumberMap.put("492.0#738.0", 8);
+            kuaishouNumberMap.put("484.0#737.0", 9);
         }
         return kuaishouNumberMap.get(key);
     }
 
-    public static void kuaishouTtf(String ttfName){
+    public static void kuaishouTtf(String ttfName) {
         try {
-            URL url =new URL("https://static.yximgs.com/udata/pkg/kuaishou-front-end-live/"+ttfName); // 创建URL
+            URL url = new URL("https://static.yximgs.com/udata/pkg/kuaishou-front-end-live/" + ttfName); // 创建URL
 
             URLConnection urlconn = url.openConnection();
 
-            TTFParser ttfParser= new TTFParser();
+            TTFParser ttfParser = new TTFParser();
             TrueTypeFont ttf = ttfParser.parse(urlconn.getInputStream());
             System.out.println(new Gson().toJson(ttf.getGlyph().getGlyphs()));
             GlyphData[] datas = ttf.getGlyph().getGlyphs();
@@ -380,35 +416,35 @@ public class HttpUtils {
             Gson gson = new Gson();
             System.out.println(gson.toJson(tables));
             CmapSubtable table = tables[0];
-            Map<String,Integer> numberMap = new HashMap<String,Integer>();
-            System.out.println("datas="+datas.length);
-            Map<String,String> fontMap = new HashMap<String,String>();
-            for(int i = 0; i <=13; i++){
+            Map<String, Integer> numberMap = new HashMap<String, Integer>();
+            System.out.println("datas=" + datas.length);
+            Map<String, String> fontMap = new HashMap<String, String>();
+            for (int i = 0; i <= 13; i++) {
                 GlyphData data = datas[i];
-                if(data != null) {
+                if (data != null) {
                     System.out.println("getBoundingBox" + data.getBoundingBox());
                     float fx = data.getBoundingBox().getLowerLeftX();
                     float fy = data.getBoundingBox().getLowerLeftY();
                     float rx = data.getBoundingBox().getUpperRightX();
                     float ry = data.getBoundingBox().getUpperRightY();
-                    Integer num = getKuaishouNumber(String.valueOf(rx-fx)+"#"+String.valueOf(ry-fy));
-                    if(num != null){
+                    Integer num = getKuaishouNumber(String.valueOf(rx - fx) + "#" + String.valueOf(ry - fy));
+                    if (num != null) {
                         System.out.println(num);
                     }
-                    fontMap.put(String.valueOf((char) table.getCharCodes(i).get(0).intValue()),String.valueOf(num));
+                    fontMap.put(String.valueOf((char) table.getCharCodes(i).get(0).intValue()), String.valueOf(num));
 
                 }
             }
             System.out.println(new Gson().toJson(fontMap));
-            fontsMap.put(ttfName,fontMap);
-            for(GlyphData data : datas){
-                if(data != null){
-                    System.out.println("getBoundingBox"+data.getBoundingBox());
-                    float fx=data.getBoundingBox().getLowerLeftX();
-                    float fy=data.getBoundingBox().getLowerLeftY();
-                    float rx=data.getBoundingBox().getUpperRightX();
-                    float ry=data.getBoundingBox().getUpperRightY();
-                    Integer num = getKuaishouNumber(String.valueOf(fx)+"#"+String.valueOf(fy)+"#"+String.valueOf(rx)+"#"+String.valueOf(ry));
+            fontsMap.put(ttfName, fontMap);
+            for (GlyphData data : datas) {
+                if (data != null) {
+                    System.out.println("getBoundingBox" + data.getBoundingBox());
+                    float fx = data.getBoundingBox().getLowerLeftX();
+                    float fy = data.getBoundingBox().getLowerLeftY();
+                    float rx = data.getBoundingBox().getUpperRightX();
+                    float ry = data.getBoundingBox().getUpperRightY();
+                    Integer num = getKuaishouNumber(String.valueOf(fx) + "#" + String.valueOf(fy) + "#" + String.valueOf(rx) + "#" + String.valueOf(ry));
                     System.out.println(num);
                 }
             }
@@ -419,27 +455,27 @@ public class HttpUtils {
 
     }
 
-    public static String mapParamsSortToStringBySeperator(TreeMap<String,Object> treeMap,String seperator){
+    public static String mapParamsSortToStringBySeperator(TreeMap<String, Object> treeMap, String seperator) {
         String result = "";
-        if(null!=treeMap&&!treeMap.isEmpty()){
-            for (Map.Entry<String, Object> entry: treeMap.entrySet()) {
+        if (null != treeMap && !treeMap.isEmpty()) {
+            for (Map.Entry<String, Object> entry : treeMap.entrySet()) {
                 String key = entry.getKey();
                 String value = UrlEncoded.encodeString((String) entry.getValue());
-                result+=(key+"="+value+seperator);
+                result += (key + "=" + value + seperator);
             }
-            if(result.length()>0){
-                result = result.substring(0,result.length()-seperator.length());
+            if (result.length() > 0) {
+                result = result.substring(0, result.length() - seperator.length());
             }
         }
         return result;
     }
 
 
-    public static String httpGetRequest(String url, Map<String, String> headers, TreeMap<String,Object> params) {
+    public static String httpGetRequest(String url, Map<String, String> headers, TreeMap<String, Object> params) {
         HttpClient httpClient = createSSLClientDefault();
         String strReturn = "";
         try {
-            String uri = url+"?"+mapParamsSortToStringBySeperator(params,"&");
+            String uri = url + "?" + mapParamsSortToStringBySeperator(params, "&");
             HttpGet httpGet = new HttpGet(uri);
             if (headers != null) {
                 Iterator<String> keyIter = headers.keySet().iterator();

+ 74 - 0
module-common/src/main/java/cn/com/ctop/common/utils/JsonUtil.java

@@ -0,0 +1,74 @@
+package cn.com.ctop.common.utils;
+
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.JavaType;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import java.util.List;
+
+/**
+ *
+ */
+public class JsonUtil {
+
+    // 定义jackson对象
+    private static final ObjectMapper MAPPER = new ObjectMapper();
+
+    /**
+     * 将对象转换成json字符串。
+     * <p>Title: pojoToJson</p>
+     * <p>Description: </p>
+     *
+     * @param data
+     * @return
+     */
+    public static String objectToJson(Object data) {
+        try {
+            String string = MAPPER.writeValueAsString(data);
+            return string;
+        } catch (JsonProcessingException e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+    /**
+     * 将json结果集转化为对象
+     *
+     * @param jsonData json数据
+     * @return
+     */
+    public static <T> T jsonToObj(String jsonData, Class<T> beanType) {
+        try {
+            T t = MAPPER.readValue(jsonData, beanType);
+            return t;
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+    /**
+     * 将json数据转换成pojo对象list
+     * <p>Title: jsonToList</p>
+     * <p>Description: </p>
+     *
+     * @param jsonData
+     * @param beanType
+     * @return
+     */
+    public static <T> List<T> jsonToList(String jsonData, Class<T> beanType) {
+        JavaType javaType = MAPPER.getTypeFactory().constructParametricType(List.class, beanType);
+        try {
+            List<T> list = MAPPER.readValue(jsonData, javaType);
+            return list;
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+        return null;
+    }
+
+
+}

+ 1 - 1
module-common/src/main/java/cn/com/ctop/common/utils/PropertiesUtils.java

@@ -14,7 +14,7 @@ public class PropertiesUtils {
 	private static Map<String, String> cache = new HashMap<String, String>();
 	
 	public static String getConfig(String key){
-		return getValue("config",key);
+		return getValue("kuaishou_config",key);
 	}
 
 	public static String getValue(String name, String key) {

+ 0 - 7
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/graphql/service/impl/KuaishouWebInterfaceServiceImpl.java

@@ -5,14 +5,9 @@ import cn.com.ctop.kuaishou.modules.graphql.entity.*;
 import cn.com.ctop.kuaishou.modules.graphql.service.IKuaishouUserService;
 import cn.com.ctop.kuaishou.modules.graphql.service.IKuaishouVideoService;
 import cn.com.ctop.kuaishou.modules.graphql.service.IKuaishouWebInterfaceService;
-import cn.com.ctop.kuaishou.modules.material.service.impl.KuaishouInterfaceServiceImpl;
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.DeserializationFeature;
 import com.fasterxml.jackson.databind.ObjectMapper;
-import com.gargoylesoftware.htmlunit.BrowserVersion;
-import com.gargoylesoftware.htmlunit.NicelyResynchronizingAjaxController;
-import com.gargoylesoftware.htmlunit.WebClient;
-import com.gargoylesoftware.htmlunit.html.HtmlPage;
 import org.apache.http.client.methods.CloseableHttpResponse;
 import org.apache.http.client.methods.HttpGet;
 import org.apache.http.impl.client.CloseableHttpClient;
@@ -26,10 +21,8 @@ import org.openqa.selenium.chrome.ChromeOptions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.io.File;
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
-import java.net.HttpCookie;
 import java.net.URLEncoder;
 import java.text.SimpleDateFormat;
 import java.util.*;

+ 0 - 21
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/entity/KuaishouAppInfo.java

@@ -1,21 +0,0 @@
-package cn.com.ctop.kuaishou.modules.material.entity;
-
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-@Data
-@TableName("ctop_kuaishou_app_info")
-public class KuaishouAppInfo implements Serializable {
-    private static final long serialVersionUID = 1L;
-    @JsonProperty("app_name")
-    private String appName;
-    @TableId
-    @JsonProperty("app_package_name")
-    private String appPackageName;
-    @TableId
-    @JsonProperty("device_os_type")
-    private Integer deviceOsType;
-}

+ 0 - 23
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/entity/KuaishouCampaign.java

@@ -1,23 +0,0 @@
-package cn.com.ctop.kuaishou.modules.material.entity;
-
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-@Data
-@TableName("ctop_kuaishou_campaign")
-public class KuaishouCampaign implements Serializable {
-    private static final long serialVersionUID = 1L;
-    private Long accountId;
-    @JsonProperty("campaign_id")
-    @TableId
-    private Long campaignId;
-    @JsonProperty("campaign_name")
-    private String campaignName;
-    @JsonProperty("day_budget")
-    private Long dayBudget;
-    @JsonProperty
-    private Integer status;
-}

+ 0 - 41
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/entity/KuaishouCreative.java

@@ -1,41 +0,0 @@
-package cn.com.ctop.kuaishou.modules.material.entity;
-
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-@Data
-@TableName("ctop_kuaishou_creative")
-public class KuaishouCreative implements Serializable {
-    private static final long serialVersionUID = 1L;
-    private Long accountId;
-    @JsonProperty("campaign_id")
-    private Long campaignId;
-    @JsonProperty("unit_id")
-    private Long groupId;
-    @TableId
-    @JsonProperty("creative_id")
-    private Long creativeId;
-    @JsonProperty("creative_name")
-    private String creativeName;
-    @JsonProperty("photo_id")
-    private String photoId;
-    @JsonProperty("status")
-    private Integer status;
-    @JsonProperty("review_detail")
-    private String reviewDetail;
-    @JsonProperty("cover_url")
-    private String coverUrl;
-    @JsonProperty("cover_width")
-    private String coverWidth;
-    @JsonProperty("cover_height")
-    private String coverHeight;
-    @JsonProperty("display_info")
-    @TableField(exist = false)
-    private KuaishouDisplayInfo displayInfo;
-    @JsonProperty("click_trapage_size")
-    private Integer clickTrapageSize;
-}

+ 0 - 59
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/entity/KuaishouGroup.java

@@ -1,59 +0,0 @@
-package cn.com.ctop.kuaishou.modules.material.entity;
-
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-@Data
-@TableName("ctop_kuaishou_group")
-public class KuaishouGroup implements Serializable {
-    private static final long serialVersionUID = 1L;
-    private Long accountId;
-    @JsonProperty("campaign_id")
-    private Long campaignId;
-    @JsonProperty("unit_id")
-    @TableId
-    private Long groupId;
-    @JsonProperty("unit_name")
-    private String groupName;
-    @JsonProperty("status")
-    private Integer status;
-    @JsonProperty("review_detail")
-    private String reviewDetail;
-    @JsonProperty("bid_type")
-    private Integer bidType;
-    @JsonProperty()
-    private Integer bid;
-    @JsonProperty("cpa_bid")
-    private Integer cpaBid;
-    @JsonProperty("ocpx_action_type")
-    private Integer ocpxActionType;
-    @JsonProperty("day_budget")
-    private Long dayBudget;
-    @JsonProperty()
-    private Integer speed;
-    @JsonProperty("begin_time")
-    private String beginTime;
-    @JsonProperty("end_time")
-    private String endTime;
-    @JsonProperty()
-    @TableField(exist = false)
-    private KuaishouSchedule schedule;
-    @JsonProperty("show_model")
-    private Integer showModel;
-    @JsonProperty("url_type")
-    private Integer urlType;
-    @JsonProperty()
-    private String url;
-    @JsonProperty("app_id")
-    private Long appId;
-    @JsonProperty("app_icon_url")
-    private String appIconUrl;
-    @JsonProperty("diverse_data")
-    @TableField(exist = false)
-    private KuaishouAppInfo DiverseData;
-
-}

+ 0 - 8
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/mapper/KuaishouAppInfoMapper.java

@@ -1,8 +0,0 @@
-package cn.com.ctop.kuaishou.modules.material.mapper;
-
-import cn.com.ctop.kuaishou.modules.material.entity.KuaishouAppInfo;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.extension.service.IService;
-
-public interface KuaishouAppInfoMapper extends BaseMapper<KuaishouAppInfo> {
-}

+ 0 - 7
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/mapper/KuaishouCampaignMapper.java

@@ -1,7 +0,0 @@
-package cn.com.ctop.kuaishou.modules.material.mapper;
-
-import cn.com.ctop.kuaishou.modules.material.entity.KuaishouCampaign;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-
-public interface KuaishouCampaignMapper extends BaseMapper<KuaishouCampaign> {
-}

+ 0 - 7
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/mapper/KuaishouCreativeMapper.java

@@ -1,7 +0,0 @@
-package cn.com.ctop.kuaishou.modules.material.mapper;
-
-import cn.com.ctop.kuaishou.modules.material.entity.KuaishouCreative;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-
-public interface KuaishouCreativeMapper extends BaseMapper<KuaishouCreative> {
-}

+ 0 - 7
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/mapper/KuaishouGroupMapper.java

@@ -1,7 +0,0 @@
-package cn.com.ctop.kuaishou.modules.material.mapper;
-
-import cn.com.ctop.kuaishou.modules.material.entity.KuaishouGroup;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-
-public interface KuaishouGroupMapper extends BaseMapper<KuaishouGroup> {
-}

+ 0 - 7
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/service/IKuaishouAppInfoService.java

@@ -1,7 +0,0 @@
-package cn.com.ctop.kuaishou.modules.material.service;
-
-import cn.com.ctop.kuaishou.modules.material.entity.KuaishouAppInfo;
-import com.baomidou.mybatisplus.extension.service.IService;
-
-public interface IKuaishouAppInfoService extends IService<KuaishouAppInfo> {
-}

+ 0 - 16
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/service/IKuaishouCampaignService.java

@@ -1,16 +0,0 @@
-package cn.com.ctop.kuaishou.modules.material.service;
-
-import cn.com.ctop.kuaishou.modules.material.entity.KuaishouCampaign;
-import com.baomidou.mybatisplus.extension.service.IService;
-import okhttp3.ResponseBody;
-import retrofit2.Call;
-import retrofit2.http.Body;
-import retrofit2.http.Header;
-import retrofit2.http.Headers;
-import retrofit2.http.POST;
-
-import java.util.Map;
-
-public interface IKuaishouCampaignService extends IService<KuaishouCampaign> {
-
-}

+ 0 - 7
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/service/IKuaishouCreativeService.java

@@ -1,7 +0,0 @@
-package cn.com.ctop.kuaishou.modules.material.service;
-
-import cn.com.ctop.kuaishou.modules.material.entity.KuaishouCreative;
-import com.baomidou.mybatisplus.extension.service.IService;
-
-public interface IKuaishouCreativeService extends IService<KuaishouCreative> {
-}

+ 0 - 7
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/service/IKuaishouGroupService.java

@@ -1,7 +0,0 @@
-package cn.com.ctop.kuaishou.modules.material.service;
-
-import cn.com.ctop.kuaishou.modules.material.entity.KuaishouGroup;
-import com.baomidou.mybatisplus.extension.service.IService;
-
-public interface IKuaishouGroupService extends IService<KuaishouGroup> {
-}

+ 0 - 20
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/service/IKuaishouInterfaceService.java

@@ -1,20 +0,0 @@
-package cn.com.ctop.kuaishou.modules.material.service;
-
-import cn.com.ctop.kuaishou.modules.material.entity.*;
-import cn.com.ctop.kuaishou.modules.report.entity.*;
-
-public interface IKuaishouInterfaceService {
-    public KuaishouResult<KuaishouReportHourlyAccount> getAccountHourlyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum);
-    public KuaishouResult<KuaishouReportDailyAccount> getAccountDailyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum);
-    public KuaishouResult<KuaishouReportDailyCampaign> getCampaignDailyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum);
-    public KuaishouResult<KuaishouReportHourlyCampaign> getCampaignHourlyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum);
-    public KuaishouResult<KuaishouReportDailyGroup> getGroupDailyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum);
-    public KuaishouResult<KuaishouReportHourlyGroup> getGroupHourlyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum);
-    public KuaishouResult<KuaishouReportDailyCreative> getCreativeDailyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum);
-    public KuaishouResult<KuaishouReportHourlyCreative> getCreativeHourlyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum);
-    public KuaishouResult<KuaishouCampaign> getCampaignList(String accessToken, Long advertiserId);
-    public KuaishouResult<KuaishouGroup> getGroupList(String accessToken, Long advertiserId);
-    public KuaishouResult<KuaishouCreative> getCreativeList(String accessToken, Long advertiserId);
-    public KuaishouResultToken getAccessToken(String authCode);
-    public KuaishouResultToken getRefreshToken(String refreshToken);
-}

+ 0 - 7
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/service/IKuaishouService.java

@@ -1,7 +0,0 @@
-package cn.com.ctop.kuaishou.modules.material.service;
-
-public interface IKuaishouService {
-    public void getReportByDay(String accessToken,Long advertiserId,String startDate,String endDate) throws Exception;
-    public void getReportByHour(String accessToken,Long advertiserId,String startDate,String endDate) throws Exception;
-    public void getMaterial(String accessToken,Long advertiserId) throws Exception;
-}

+ 0 - 12
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/service/impl/KuaishouAppInfoServiceImpl.java

@@ -1,12 +0,0 @@
-package cn.com.ctop.kuaishou.modules.material.service.impl;
-
-import cn.com.ctop.kuaishou.modules.material.entity.KuaishouAppInfo;
-import cn.com.ctop.kuaishou.modules.material.mapper.KuaishouAppInfoMapper;
-import cn.com.ctop.kuaishou.modules.material.service.IKuaishouAppInfoService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springframework.stereotype.Service;
-
-@Service
-public class KuaishouAppInfoServiceImpl extends ServiceImpl<KuaishouAppInfoMapper, KuaishouAppInfo> implements IKuaishouAppInfoService {
-
-}

+ 0 - 12
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/service/impl/KuaishouCampaignServiceImpl.java

@@ -1,12 +0,0 @@
-package cn.com.ctop.kuaishou.modules.material.service.impl;
-
-import cn.com.ctop.kuaishou.modules.material.entity.KuaishouCampaign;
-import cn.com.ctop.kuaishou.modules.material.mapper.KuaishouCampaignMapper;
-import cn.com.ctop.kuaishou.modules.material.service.IKuaishouCampaignService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springframework.stereotype.Service;
-
-@Service
-public class KuaishouCampaignServiceImpl extends ServiceImpl<KuaishouCampaignMapper, KuaishouCampaign> implements IKuaishouCampaignService {
-
-}

+ 0 - 11
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/service/impl/KuaishouCreativeServiceImpl.java

@@ -1,11 +0,0 @@
-package cn.com.ctop.kuaishou.modules.material.service.impl;
-
-import cn.com.ctop.kuaishou.modules.material.entity.KuaishouCreative;
-import cn.com.ctop.kuaishou.modules.material.mapper.KuaishouCreativeMapper;
-import cn.com.ctop.kuaishou.modules.material.service.IKuaishouCreativeService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springframework.stereotype.Service;
-
-@Service
-public class KuaishouCreativeServiceImpl extends ServiceImpl<KuaishouCreativeMapper, KuaishouCreative> implements IKuaishouCreativeService {
-}

+ 0 - 11
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/service/impl/KuaishouGroupServiceImpl.java

@@ -1,11 +0,0 @@
-package cn.com.ctop.kuaishou.modules.material.service.impl;
-
-import cn.com.ctop.kuaishou.modules.material.entity.KuaishouGroup;
-import cn.com.ctop.kuaishou.modules.material.mapper.KuaishouGroupMapper;
-import cn.com.ctop.kuaishou.modules.material.service.IKuaishouGroupService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springframework.stereotype.Service;
-
-@Service
-public class KuaishouGroupServiceImpl extends ServiceImpl<KuaishouGroupMapper, KuaishouGroup> implements IKuaishouGroupService {
-}

+ 0 - 374
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/service/impl/KuaishouInterfaceServiceImpl.java

@@ -1,374 +0,0 @@
-package cn.com.ctop.kuaishou.modules.material.service.impl;
-
-import cn.com.ctop.common.utils.HttpUtils;
-import cn.com.ctop.common.utils.PropertiesUtils;
-import cn.com.ctop.kuaishou.modules.material.entity.*;
-import cn.com.ctop.kuaishou.modules.material.service.IKuaishouInterfaceService;
-import cn.com.ctop.kuaishou.modules.report.entity.*;
-import com.fasterxml.jackson.core.JsonParseException;
-
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.DeserializationFeature;
-import com.fasterxml.jackson.databind.JavaType;
-import com.fasterxml.jackson.databind.JsonMappingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-import com.fasterxml.jackson.databind.type.TypeFactory;
-import constant.KuaishouInterfaceConstant;
-import org.springframework.stereotype.Service;
-
-import java.io.IOException;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
-import java.util.HashMap;
-import java.util.Map;
-
-@Service
-public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
-
-
-    public KuaishouResult<KuaishouReportHourlyAccount> getAccountHourlyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum){
-        String url = PropertiesUtils.getConfig("kuaishou_api_url")+ KuaishouInterfaceConstant.ACCOUNT_REPORT;
-        Map<String,String> headers = new HashMap<String,String>();
-        headers.put("Content-Type","application/json");
-        headers.put("Access-Token",accessToken);
-        Map<String,Object> param = new HashMap<String,Object>();
-        param.put("start_date",startDate);
-        param.put("end_date",endDate);
-        param.put("advertiser_id",advertiserId);
-        param.put("temporal_granularity","HOURLY");
-        param.put("page_size",pageSize);
-        param.put("page",pageNum);
-        KuaishouResult<KuaishouReportHourlyAccount> kuaishouResult = null;
-        try{
-            String result = HttpUtils.httpPostRequest(url,param,headers);
-            System.out.println(result);
-            ObjectMapper mapper = new ObjectMapper();
-            mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
-            kuaishouResult = mapper.readValue(result,new TypeReference<KuaishouResult<KuaishouReportHourlyAccount>>(){});
-//            kuaishouResult = (KuaishouResult<KuaishouReportHourlyAccount>)jsonToObj(KuaishouResult.class,result);
-        }catch (Exception e){
-            e.printStackTrace();
-        }
-        return kuaishouResult;
-    }
-
-    public KuaishouResult<KuaishouReportDailyAccount> getAccountDailyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum){
-        String url = PropertiesUtils.getConfig("kuaishou_api_url")+ KuaishouInterfaceConstant.ACCOUNT_REPORT;
-        Map<String,String> headers = new HashMap<String,String>();
-        headers.put("Content-Type","application/json");
-        headers.put("Access-Token",accessToken);
-        Map<String,Object> param = new HashMap<String,Object>();
-        param.put("start_date",startDate);
-        param.put("end_date",endDate);
-        param.put("advertiser_id",advertiserId);
-        param.put("temporal_granularity","DAILY");
-        param.put("page_size",pageSize);
-        param.put("page",pageNum);
-        KuaishouResult<KuaishouReportDailyAccount> kuaishouResult = null;
-        try{
-            String result = HttpUtils.httpPostRequest(url,param,headers);
-            System.out.println(result);
-            ObjectMapper mapper = new ObjectMapper();
-            mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
-            kuaishouResult = mapper.readValue(result,new TypeReference<KuaishouResult<KuaishouReportDailyAccount>>(){});
-//            kuaishouResult = (KuaishouResult<KuaishouReportDailyAccount>)jsonToObj(KuaishouResult.class,result);
-        }catch (Exception e){
-            e.printStackTrace();
-        }
-        return kuaishouResult;
-    }
-
-    public KuaishouResult<KuaishouReportDailyCampaign> getCampaignDailyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum){
-        String url = PropertiesUtils.getConfig("kuaishou_api_url")+ KuaishouInterfaceConstant.CAMPAIGN_REPORT;
-        Map<String,String> headers = new HashMap<String,String>();
-        headers.put("Content-Type","application/json");
-        headers.put("Access-Token",accessToken);
-        Map<String,Object> param = new HashMap<String,Object>();
-        param.put("start_date",startDate);
-        param.put("end_date",endDate);
-        param.put("advertiser_id",advertiserId);
-        param.put("temporal_granularity","DAILY");
-        param.put("page_size",pageSize);
-        param.put("page",pageNum);
-        KuaishouResult<KuaishouReportDailyCampaign> kuaishouResult = null;
-        try{
-            String result = HttpUtils.httpPostRequest(url,param,headers);
-            System.out.println(result);
-            ObjectMapper mapper = new ObjectMapper();
-            mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
-            kuaishouResult = mapper.readValue(result,new TypeReference<KuaishouResult<KuaishouReportDailyCampaign>>(){});
-//            kuaishouResult = (KuaishouResult<KuaishouReportDailyCampaign>)jsonToObj(KuaishouResult.class,result);
-        }catch (Exception e){
-            e.printStackTrace();
-        }
-        return kuaishouResult;
-    }
-
-    public KuaishouResult<KuaishouReportHourlyCampaign> getCampaignHourlyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum){
-        String url = PropertiesUtils.getConfig("kuaishou_api_url")+ KuaishouInterfaceConstant.CAMPAIGN_REPORT;
-        Map<String,String> headers = new HashMap<String,String>();
-        headers.put("Content-Type","application/json");
-        headers.put("Access-Token",accessToken);
-        Map<String,Object> param = new HashMap<String,Object>();
-        param.put("start_date",startDate);
-        param.put("end_date",endDate);
-        param.put("advertiser_id",advertiserId);
-        param.put("temporal_granularity","HOURLY");
-        param.put("page_size",pageSize);
-        param.put("page",pageNum);
-        KuaishouResult<KuaishouReportHourlyCampaign> kuaishouResult = null;
-        try{
-            String result = HttpUtils.httpPostRequest(url,param,headers);
-            System.out.println(result);
-            ObjectMapper mapper = new ObjectMapper();
-            mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
-            kuaishouResult = mapper.readValue(result,new TypeReference<KuaishouResult<KuaishouReportHourlyCampaign>>(){});
-//            kuaishouResult = (KuaishouResult<KuaishouReportDailyCampaign>)jsonToObj(KuaishouResult.class,result);
-        }catch (Exception e){
-            e.printStackTrace();
-        }
-        return kuaishouResult;
-    }
-
-    public KuaishouResult<KuaishouReportDailyGroup> getGroupDailyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum){
-        String url = PropertiesUtils.getConfig("kuaishou_api_url")+ KuaishouInterfaceConstant.GTOUP_REPORT;
-        Map<String,String> headers = new HashMap<String,String>();
-        headers.put("Content-Type","application/json");
-        headers.put("Access-Token",accessToken);
-        Map<String,Object> param = new HashMap<String,Object>();
-        param.put("start_date",startDate);
-        param.put("end_date",endDate);
-        param.put("advertiser_id",advertiserId);
-        param.put("temporal_granularity","DAILY");
-        param.put("page_size",pageSize);
-        param.put("page",pageNum);
-        KuaishouResult<KuaishouReportDailyGroup> kuaishouResult = null;
-        try{
-            String result = HttpUtils.httpPostRequest(url,param,headers);
-            System.out.println(result);
-            ObjectMapper mapper = new ObjectMapper();
-            mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
-            kuaishouResult = mapper.readValue(result,new TypeReference<KuaishouResult<KuaishouReportDailyGroup>>(){});
-//            kuaishouResult = (KuaishouResult<KuaishouReportDailyGroup>)jsonToObj(KuaishouResult.class,result);
-        }catch (Exception e){
-            e.printStackTrace();
-        }
-        return kuaishouResult;
-    }
-
-    public KuaishouResult<KuaishouReportHourlyGroup> getGroupHourlyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum){
-        String url = PropertiesUtils.getConfig("kuaishou_api_url")+ KuaishouInterfaceConstant.GTOUP_REPORT;
-        Map<String,String> headers = new HashMap<String,String>();
-        headers.put("Content-Type","application/json");
-        headers.put("Access-Token",accessToken);
-        Map<String,Object> param = new HashMap<String,Object>();
-        param.put("start_date",startDate);
-        param.put("end_date",endDate);
-        param.put("advertiser_id",advertiserId);
-        param.put("temporal_granularity","HOURLY");
-        param.put("page_size",pageSize);
-        param.put("page",pageNum);
-        KuaishouResult<KuaishouReportHourlyGroup> kuaishouResult = null;
-        try{
-            String result = HttpUtils.httpPostRequest(url,param,headers);
-            System.out.println(result);
-            ObjectMapper mapper = new ObjectMapper();
-            mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
-            kuaishouResult = mapper.readValue(result,new TypeReference<KuaishouResult<KuaishouReportHourlyGroup>>(){});
-//            kuaishouResult = (KuaishouResult<KuaishouReportDailyGroup>)jsonToObj(KuaishouResult.class,result);
-        }catch (Exception e){
-            e.printStackTrace();
-        }
-        return kuaishouResult;
-    }
-
-    public KuaishouResult<KuaishouReportDailyCreative> getCreativeDailyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum){
-        String url = PropertiesUtils.getConfig("kuaishou_api_url")+ KuaishouInterfaceConstant.CREATIVE_REPORT;
-        Map<String,String> headers = new HashMap<String,String>();
-        headers.put("Content-Type","application/json");
-        headers.put("Access-Token",accessToken);
-        Map<String,Object> param = new HashMap<String,Object>();
-        param.put("start_date",startDate);
-        param.put("end_date",endDate);
-        param.put("advertiser_id",advertiserId);
-        param.put("temporal_granularity","DAILY");
-        param.put("page_size",pageSize);
-        param.put("page",pageNum);
-        KuaishouResult<KuaishouReportDailyCreative> kuaishouResult = null;
-        try{
-            String result = HttpUtils.httpPostRequest(url,param,headers);
-            System.out.println(result);
-            ObjectMapper mapper = new ObjectMapper();
-            mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
-            kuaishouResult = mapper.readValue(result,new TypeReference<KuaishouResult<KuaishouReportDailyCreative>>(){});
-//            kuaishouResult = (KuaishouResult<KuaishouReportDailyCreative>)jsonToObj(KuaishouResult.class,result);
-        }catch (Exception e){
-            e.printStackTrace();
-        }
-        return kuaishouResult;
-    }
-
-    public KuaishouResult<KuaishouReportHourlyCreative> getCreativeHourlyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum){
-        String url = PropertiesUtils.getConfig("kuaishou_api_url")+ KuaishouInterfaceConstant.CREATIVE_REPORT;
-        Map<String,String> headers = new HashMap<String,String>();
-        headers.put("Content-Type","application/json");
-        headers.put("Access-Token",accessToken);
-        Map<String,Object> param = new HashMap<String,Object>();
-        param.put("start_date",startDate);
-        param.put("end_date",endDate);
-        param.put("advertiser_id",advertiserId);
-        param.put("temporal_granularity","HOURLY");
-        param.put("page_size",pageSize);
-        param.put("page",pageNum);
-        KuaishouResult<KuaishouReportHourlyCreative> kuaishouResult = null;
-        try{
-            String result = HttpUtils.httpPostRequest(url,param,headers);
-            System.out.println(result);
-            ObjectMapper mapper = new ObjectMapper();
-            mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
-            kuaishouResult = mapper.readValue(result,new TypeReference<KuaishouResult<KuaishouReportHourlyCreative>>(){});
-//            kuaishouResult = (KuaishouResult<KuaishouReportDailyCreative>)jsonToObj(KuaishouResult.class,result);
-        }catch (Exception e){
-            e.printStackTrace();
-        }
-        return kuaishouResult;
-    }
-
-    public KuaishouResult<KuaishouCampaign> getCampaignList(String accessToken, Long advertiserId){
-        String url = PropertiesUtils.getConfig("kuaishou_api_url")+ KuaishouInterfaceConstant.CAMPAIGN_LIST;
-        Map<String,String> headers = new HashMap<String,String>();
-        headers.put("Content-Type","application/json");
-        headers.put("Access-Token",accessToken);
-        Map<String,Object> param = new HashMap<String,Object>();
-        param.put("advertiser_id",advertiserId);
-        KuaishouResult<KuaishouCampaign> kuaishouResult = null;
-        try{
-            String result = HttpUtils.httpPostRequest(url,param,headers);
-            System.out.println(result);
-            ObjectMapper mapper = new ObjectMapper();
-            mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
-            kuaishouResult = mapper.readValue(result,new TypeReference<KuaishouResult<KuaishouCampaign>>(){});
-//            kuaishouResult = (KuaishouResult<KuaishouCampaign>)jsonToObj(KuaishouResult.class,result);
-        }catch (Exception e){
-            e.printStackTrace();
-        }
-        return kuaishouResult;
-    }
-
-    public KuaishouResult<KuaishouGroup> getGroupList(String accessToken, Long advertiserId){
-        String url = PropertiesUtils.getConfig("kuaishou_api_url")+ KuaishouInterfaceConstant.GROUP_LIST;
-        Map<String,String> headers = new HashMap<String,String>();
-        headers.put("Content-Type","application/json");
-        headers.put("Access-Token",accessToken);
-        Map<String,Object> param = new HashMap<String,Object>();
-        param.put("advertiser_id",advertiserId);
-        KuaishouResult<KuaishouGroup> kuaishouResult = null;
-        try{
-            String result = HttpUtils.httpPostRequest(url,param,headers);
-            System.out.println(result);
-            ObjectMapper mapper = new ObjectMapper();
-            mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
-            kuaishouResult = mapper.readValue(result,new TypeReference<KuaishouResult<KuaishouGroup>>(){});
-//            kuaishouResult = (KuaishouResult<KuaishouGroup>)jsonToObj(KuaishouResult.class,result);
-        }catch (Exception e){
-            e.printStackTrace();
-        }
-        return kuaishouResult;
-    }
-
-    public KuaishouResult<KuaishouCreative> getCreativeList(String accessToken, Long advertiserId){
-        String url = PropertiesUtils.getConfig("kuaishou_api_url")+ KuaishouInterfaceConstant.CREATIVE_LIST;
-        Map<String,String> headers = new HashMap<String,String>();
-        headers.put("Content-Type","application/json");
-        headers.put("Access-Token",accessToken);
-        Map<String,Object> param = new HashMap<String,Object>();
-        param.put("advertiser_id",advertiserId);
-        KuaishouResult<KuaishouCreative> kuaishouResult = null;
-        try{
-            String result = HttpUtils.httpPostRequest(url,param,headers);
-            System.out.println(result);
-            ObjectMapper mapper = new ObjectMapper();
-            mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
-            kuaishouResult = mapper.readValue(result,new TypeReference<KuaishouResult<KuaishouCreative>>(){});
-//            kuaishouResult = (KuaishouResult<KuaishouCreative>)jsonToObj(KuaishouResult.class,result);
-        }catch (Exception e){
-            e.printStackTrace();
-        }
-        return kuaishouResult;
-    }
-
-    public KuaishouResultToken getAccessToken(String authCode){
-        String url = PropertiesUtils.getConfig("kuaishou_api_url")+KuaishouInterfaceConstant.AUTH_TOKEN;
-        Map<String,String> headers = new HashMap<String,String>();
-        headers.put("Content-Type","application/json");
-        Map<String, Object> param = new HashMap<String, Object>();
-        param.put("app_id",PropertiesUtils.getConfig("kuaishou_appid"));
-        param.put("secret",PropertiesUtils.getConfig("kuaishou_secret"));
-        param.put("auth_code",authCode);
-
-        KuaishouResultToken kuaishouResult = null;
-        try{
-            String result = HttpUtils.httpPostRequest(url,param,headers);
-            System.out.println(result);
-            ObjectMapper mapper = new ObjectMapper();
-            mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
-            kuaishouResult = mapper.readValue(result,new TypeReference<KuaishouResultToken>(){});
-//            kuaishouResult = (KuaishouResultToken)jsonToObj(KuaishouResultToken.class,result);
-        }catch (Exception e){
-            e.printStackTrace();
-        }
-        return kuaishouResult;
-    }
-
-    public KuaishouResultToken getRefreshToken(String refreshToken){
-        String url = PropertiesUtils.getConfig("kuaishou_api_url")+KuaishouInterfaceConstant.REFRESH_TOKEN;
-        Map<String,String> headers = new HashMap<String,String>();
-        headers.put("Content-Type","application/json");
-        Map<String, Object> param = new HashMap<String, Object>();
-        param.put("app_id",PropertiesUtils.getConfig("kuaishou_appid"));
-        param.put("secret",PropertiesUtils.getConfig("kuaishou_secret"));
-        param.put("refresh_token",refreshToken);
-
-        KuaishouResultToken kuaishouResult = null;
-        try{
-            String result = HttpUtils.httpPostRequest(url,param,headers);
-            System.out.println(result);
-            ObjectMapper mapper = new ObjectMapper();
-            mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
-            kuaishouResult = mapper.readValue(result,new TypeReference<KuaishouResultToken>(){});
-//            kuaishouResult = (KuaishouResultToken)jsonToObj(KuaishouResultToken.class,result);
-        }catch (Exception e){
-            e.printStackTrace();
-        }
-        return kuaishouResult;
-    }
-
-    public Object jsonToObj(Object t,String jsonStr) throws JsonParseException, JsonMappingException, IOException {
-        ObjectMapper mapper = new ObjectMapper();
-
-        mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
-        return mapper.readValue(jsonStr, new TypeReference<Object>(){});
-    }
-
-    public JavaType getJavaType(Type type) {
-        //判断是否带有泛型
-        if (type instanceof ParameterizedType)
-        {
-            Type[] actualTypeArguments = ((ParameterizedType) type).getActualTypeArguments();
-            //获取泛型类型
-            Class rowClass = (Class) ((ParameterizedType) type).getRawType();
-            JavaType[] javaTypes = new JavaType[actualTypeArguments.length];
-            for (int i = 0; i < actualTypeArguments.length; i++)
-            {
-                //泛型也可能带有泛型,递归获取
-                javaTypes[i] = getJavaType(actualTypeArguments[i]);
-            }
-            return TypeFactory.defaultInstance().constructParametricType(rowClass, javaTypes);
-        } else {
-            //简单类型直接用该类构建
-            Class cla = (Class) type;
-            return TypeFactory.defaultInstance().constructParametricType(cla, new JavaType[0]);
-        }
-    }
-}

+ 0 - 343
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/service/impl/KuaishouServiceImpl.java

@@ -1,343 +0,0 @@
-package cn.com.ctop.kuaishou.modules.material.service.impl;
-
-import cn.com.ctop.common.utils.DateUtils;
-import cn.com.ctop.kuaishou.modules.material.entity.*;
-import cn.com.ctop.kuaishou.modules.material.service.*;
-import cn.com.ctop.kuaishou.modules.report.entity.*;
-import cn.com.ctop.kuaishou.modules.report.service.*;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-import java.util.Map;
-
-@Service
-public class KuaishouServiceImpl implements IKuaishouService {
-    @Autowired
-    private IKuaishouInterfaceService kuaishouInterfaceService;
-    @Autowired
-    private IKuaishouReportDailyAccountService kuaishouReportDailyAccountService;
-    @Autowired
-    private IKuaishouReportHourlyAccountService kuaishouReportHourlyAccountService;
-    @Autowired
-    private IKuaishouReportDailyCampaignService kuaishouReportDailyCampaignService;
-    @Autowired
-    private IKuaishouReportHourlyCampaignService kuaishouReportHourlyCampaignService;
-    @Autowired
-    private IKuaishouReportDailyGroupService kuaishouReportDailyGroupService;
-    @Autowired
-    private IKuaishouReportHourlyGroupService kuaishouReportHourlyGroupService;
-    @Autowired
-    private IKuaishouReportDailyCreativeService kuaishouReportDailyCreativeService;
-    @Autowired
-    private IKuaishouReportHourlyCreativeService kuaishouReportHourlyCreativeService;
-    @Autowired
-    private IKuaishouCreativeService kuaishouCreativeService;
-    @Autowired
-    private IKuaishouGroupService kuaishouGroupService;
-    @Autowired
-    private IKuaishouCampaignService kuaishouCampaignService;
-    @Autowired
-    private IKuaishouAppInfoService kuaishouAppInfoService;
-    @Autowired
-    private IKuaishouDisplayInfoService kuaishouDisplayInfoService;
-    @Autowired
-    private IKuaishouScheduleService kuaishouScheduleService;
-
-    public static void main(String[] args){
-        KuaishouServiceImpl i = new KuaishouServiceImpl();
-        try {
-            List<Map<String,String>> list = DateUtils.getDateDayRange("2019-01-01","2019-06-21");
-            for (Map<String,String> map :list){
-                System.out.println(map.get("startDate")+"-"+map.get("endDate"));
-            }
-//            i.getReportByDay("297c47b469d1391e5e048fe14abc2a01",2289L,"2019-01-01","2019-06-14");
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-    @Override
-    public void getReportByDay(String accessToken, Long advertiserId, String startDate, String endDate) throws Exception{
-        //按月做分段 最大6个月
-        if(DateUtils.compareDate(startDate,endDate) > 0){
-            return;
-        }else{
-            List<Map<String,String>> list = DateUtils.getDateMonthRange(startDate,endDate);
-            for (Map<String,String> map :list){
-                System.out.println(map.get("startDate")+"-"+map.get("endDate"));
-                this.getAccountDailyReportByPage(accessToken,advertiserId,map.get("startDate"),map.get("endDate"),null,null);
-                this.getCampaignDailyReportByPage(accessToken,advertiserId,map.get("startDate"),map.get("endDate"),null,null);
-                this.getGroupDailyReportByPage(accessToken,advertiserId,map.get("startDate"),map.get("endDate"),null,null);
-                this.getCreativeDailyReportByPage(accessToken,advertiserId,map.get("startDate"),map.get("endDate"),null,null);
-            }
-        }
-    }
-
-    @Override
-    public void getReportByHour(String accessToken, Long advertiserId, String startDate, String endDate) throws Exception{
-        //按日期做分段  最大七天
-        if(DateUtils.compareDate(startDate,endDate) > 0){
-            return;
-        }else{
-            List<Map<String,String>> list = DateUtils.getDateDayRange(startDate,endDate);
-            for (Map<String,String> map :list){
-                System.out.println(map.get("startDate")+"-"+map.get("endDate"));
-                this.getAccountHourlyReportByPage(accessToken,advertiserId,map.get("startDate"),map.get("endDate"),null,null);
-                this.getCampaignHourlyReportByPage(accessToken,advertiserId,map.get("startDate"),map.get("endDate"),null,null);
-                this.getGroupHourlyReportByPage(accessToken,advertiserId,map.get("startDate"),map.get("endDate"),null,null);
-                this.getCreativeHourlyReportByPage(accessToken,advertiserId,map.get("startDate"),map.get("endDate"),null,null);
-            }
-        }
-    }
-
-    @Override
-    public void getMaterial(String accessToken, Long advertiserId) {
-        getCampaignList(accessToken,advertiserId);
-        getGroupList(accessToken,advertiserId);
-        getCreativeList(accessToken,advertiserId);
-    }
-
-    private void getCampaignList(String accessToken, Long advertiserId){
-        KuaishouResult<KuaishouCampaign> campaignResult = kuaishouInterfaceService.getCampaignList(accessToken,advertiserId);
-        List<KuaishouCampaign> list = campaignResult.getData().getDetails();
-        for(KuaishouCampaign campaign : list){
-            campaign.setAccountId(advertiserId);
-            kuaishouCampaignService.saveOrUpdate(campaign);
-        }
-    }
-
-    private void getGroupList(String accessToken, Long advertiserId){
-        KuaishouResult<KuaishouGroup> groupResult = kuaishouInterfaceService.getGroupList(accessToken,advertiserId);
-        List<KuaishouGroup> list = groupResult.getData().getDetails();
-        for(KuaishouGroup group : list){
-            group.setAccountId(advertiserId);
-            KuaishouAppInfo appInfo = group.getDiverseData();
-            KuaishouSchedule schedule = group.getSchedule();
-            if(appInfo != null){
-                kuaishouAppInfoService.saveOrUpdate(appInfo);
-
-            }
-            if(schedule != null){
-                schedule.setGroupId(group.getGroupId());
-                kuaishouScheduleService.saveOrUpdate(schedule);
-
-            }
-            kuaishouGroupService.saveOrUpdate(group);
-        }
-    }
-
-    private void getCreativeList(String accessToken, Long advertiserId){
-        KuaishouResult<KuaishouCreative> creativeResult = kuaishouInterfaceService.getCreativeList(accessToken,advertiserId);
-        List<KuaishouCreative> list = creativeResult.getData().getDetails();
-        for(KuaishouCreative creative : list){
-            creative.setAccountId(advertiserId);
-            kuaishouCreativeService.saveOrUpdate(creative);
-        }
-    }
-
-    private void getAccountDailyReportByPage(String accessToken, Long advertiserId, String startDate, String endDate,Integer pageSize,Integer pageNum){
-        if(pageSize == null){
-            pageSize = 100;
-        }
-        if(pageNum == null){
-            pageNum = 1;
-        }
-        KuaishouResult<KuaishouReportDailyAccount> result = null;
-        result = kuaishouInterfaceService.getAccountDailyReport(accessToken,advertiserId,startDate,endDate,pageSize,pageNum);
-        List<KuaishouReportDailyAccount> list = result.getData().getDetails();
-        for(KuaishouReportDailyAccount account : list){
-            account.setAccountId(advertiserId);
-            kuaishouReportDailyAccountService.remove(
-                    new QueryWrapper<KuaishouReportDailyAccount>().lambda()
-                            .eq(KuaishouReportDailyAccount::getAccountId,account.getAccountId())
-                            .eq(KuaishouReportDailyAccount::getStatDate,account.getStatDate()));
-            kuaishouReportDailyAccountService.save(account);
-        }
-        int totalCount = result.getData().getTotalCount();
-        if(pageNum*pageSize < totalCount){
-            pageNum++;
-            getAccountDailyReportByPage(accessToken,advertiserId,startDate,endDate,pageSize,pageNum);
-        }
-    }
-
-    private void getAccountHourlyReportByPage(String accessToken, Long advertiserId, String startDate, String endDate, Integer pageSize,Integer pageNum){
-        if(pageSize == null){
-            pageSize = 100;
-        }
-        if(pageNum == null){
-            pageNum = 1;
-        }
-        KuaishouResult<KuaishouReportHourlyAccount> result = null;
-        result = kuaishouInterfaceService.getAccountHourlyReport(accessToken,advertiserId,startDate,endDate,pageSize,pageNum);
-        List<KuaishouReportHourlyAccount> list = result.getData().getDetails();
-        for(KuaishouReportHourlyAccount account : list){
-            account.setAccountId(advertiserId);
-            kuaishouReportHourlyAccountService.remove(
-                    new QueryWrapper<KuaishouReportHourlyAccount>().lambda()
-                            .eq(KuaishouReportHourlyAccount::getAccountId,account.getAccountId())
-                            .eq(KuaishouReportHourlyAccount::getStatHour,account.getStatHour())
-                            .eq(KuaishouReportHourlyAccount::getStatDate,account.getStatDate()));
-            kuaishouReportHourlyAccountService.save(account);
-        }
-        int totalCount = result.getData().getTotalCount();
-        if(pageNum*pageSize < totalCount){
-            pageNum++;
-            getAccountHourlyReportByPage(accessToken,advertiserId,startDate,endDate,pageSize,pageNum);
-        }
-    }
-
-    private void getCampaignDailyReportByPage(String accessToken, Long advertiserId, String startDate, String endDate,Integer pageSize,Integer pageNum){
-        if(pageSize == null){
-            pageSize = 100;
-        }
-        if(pageNum == null){
-            pageNum = 1;
-        }
-        KuaishouResult<KuaishouReportDailyCampaign> result = kuaishouInterfaceService.getCampaignDailyReport(accessToken,advertiserId,startDate,endDate,pageSize,pageNum);
-        List<KuaishouReportDailyCampaign> list = result.getData().getDetails();
-        for(KuaishouReportDailyCampaign campaign : list){
-            campaign.setAccountId(advertiserId);
-            kuaishouReportDailyCampaignService.remove(
-                    new QueryWrapper<KuaishouReportDailyCampaign>().lambda()
-                            .eq(KuaishouReportDailyCampaign::getAccountId,campaign.getAccountId())
-                            .eq(KuaishouReportDailyCampaign::getCampaignId,campaign.getCampaignId())
-                            .eq(KuaishouReportDailyCampaign::getStatDate,campaign.getStatDate()));
-            kuaishouReportDailyCampaignService.save(campaign);
-        }
-        int totalCount = result.getData().getTotalCount();
-        if(pageNum*pageSize < totalCount){
-            pageNum++;
-            getCampaignDailyReportByPage(accessToken,advertiserId,startDate,endDate,pageSize,pageNum);
-        }
-    }
-
-    private void getCampaignHourlyReportByPage(String accessToken, Long advertiserId, String startDate, String endDate,Integer pageSize,Integer pageNum){
-        if(pageSize == null){
-            pageSize = 100;
-        }
-        if(pageNum == null){
-            pageNum = 1;
-        }
-        KuaishouResult<KuaishouReportHourlyCampaign> result = kuaishouInterfaceService.getCampaignHourlyReport(accessToken,advertiserId,startDate,endDate,pageSize,pageNum);
-        List<KuaishouReportHourlyCampaign> list = result.getData().getDetails();
-        for(KuaishouReportHourlyCampaign campaign : list){
-            campaign.setAccountId(advertiserId);
-            kuaishouReportHourlyCampaignService.remove(
-                    new QueryWrapper<KuaishouReportHourlyCampaign>().lambda()
-                            .eq(KuaishouReportHourlyCampaign::getAccountId,campaign.getAccountId())
-                            .eq(KuaishouReportHourlyCampaign::getCampaignId,campaign.getCampaignId())
-                            .eq(KuaishouReportHourlyCampaign::getStatHour,campaign.getStatHour())
-                            .eq(KuaishouReportHourlyCampaign::getStatDate,campaign.getStatDate()));
-            kuaishouReportHourlyCampaignService.save(campaign);
-        }
-        int totalCount = result.getData().getTotalCount();
-        if(pageNum*pageSize < totalCount){
-            pageNum++;
-            getCampaignHourlyReportByPage(accessToken,advertiserId,startDate,endDate,pageSize,pageNum);
-        }
-    }
-
-    private void getGroupDailyReportByPage(String accessToken, Long advertiserId, String startDate, String endDate,Integer pageSize,Integer pageNum){
-        if(pageSize == null){
-            pageSize = 100;
-        }
-        if(pageNum == null){
-            pageNum = 1;
-        }
-        KuaishouResult<KuaishouReportDailyGroup> result = kuaishouInterfaceService.getGroupDailyReport(accessToken,advertiserId,startDate,endDate,pageSize,pageNum);
-        List<KuaishouReportDailyGroup> list = result.getData().getDetails();
-        for(KuaishouReportDailyGroup group : list){
-            group.setAccountId(advertiserId);
-            kuaishouReportDailyGroupService.remove(
-                    new QueryWrapper<KuaishouReportDailyGroup>().lambda()
-                            .eq(KuaishouReportDailyGroup::getAccountId,group.getAccountId())
-                            .eq(KuaishouReportDailyGroup::getGroupId,group.getGroupId())
-                            .eq(KuaishouReportDailyGroup::getStatDate,group.getStatDate()));
-            kuaishouReportDailyGroupService.save(group);
-        }
-        int totalCount = result.getData().getTotalCount();
-        if(pageNum*pageSize < totalCount){
-            pageNum++;
-            getGroupDailyReportByPage(accessToken,advertiserId,startDate,endDate,pageSize,pageNum);
-        }
-    }
-
-    private void getGroupHourlyReportByPage(String accessToken, Long advertiserId, String startDate, String endDate,Integer pageSize,Integer pageNum){
-        if(pageSize == null){
-            pageSize = 100;
-        }
-        if(pageNum == null){
-            pageNum = 1;
-        }
-        KuaishouResult<KuaishouReportHourlyGroup> result = kuaishouInterfaceService.getGroupHourlyReport(accessToken,advertiserId,startDate,endDate,pageSize,pageNum);
-        List<KuaishouReportHourlyGroup> list = result.getData().getDetails();
-        for(KuaishouReportHourlyGroup group : list){
-            group.setAccountId(advertiserId);
-            kuaishouReportHourlyGroupService.remove(
-                    new QueryWrapper<KuaishouReportHourlyGroup>().lambda()
-                            .eq(KuaishouReportHourlyGroup::getAccountId,group.getAccountId())
-                            .eq(KuaishouReportHourlyGroup::getGroupId,group.getGroupId())
-                            .eq(KuaishouReportHourlyGroup::getStatHour,group.getStatHour())
-                            .eq(KuaishouReportHourlyGroup::getStatDate,group.getStatDate()));
-            kuaishouReportHourlyGroupService.save(group);
-        }
-        int totalCount = result.getData().getTotalCount();
-        if(pageNum*pageSize < totalCount){
-            pageNum++;
-            getGroupHourlyReportByPage(accessToken,advertiserId,startDate,endDate,pageSize,pageNum);
-        }
-    }
-
-    private void getCreativeDailyReportByPage(String accessToken, Long advertiserId, String startDate, String endDate,Integer pageSize,Integer pageNum){
-        if(pageSize == null){
-            pageSize = 100;
-        }
-        if(pageNum == null){
-            pageNum = 1;
-        }
-        KuaishouResult<KuaishouReportDailyCreative> result = kuaishouInterfaceService.getCreativeDailyReport(accessToken,advertiserId,startDate,endDate,pageSize,pageNum);
-        List<KuaishouReportDailyCreative> list = result.getData().getDetails();
-        for(KuaishouReportDailyCreative creative : list){
-            creative.setAccountId(advertiserId);
-            kuaishouReportDailyCreativeService.remove(
-                    new QueryWrapper<KuaishouReportDailyCreative>().lambda()
-                            .eq(KuaishouReportDailyCreative::getAccountId,creative.getAccountId())
-                            .eq(KuaishouReportDailyCreative::getCreativeId,creative.getCreativeId())
-                            .eq(KuaishouReportDailyCreative::getStatDate,creative.getStatDate()));
-            kuaishouReportDailyCreativeService.save(creative);
-        }
-        int totalCount = result.getData().getTotalCount();
-        if(pageNum*pageSize < totalCount){
-            pageNum++;
-            getCreativeDailyReportByPage(accessToken,advertiserId,startDate,endDate,pageSize,pageNum);
-        }
-    }
-
-    private void getCreativeHourlyReportByPage(String accessToken, Long advertiserId, String startDate, String endDate,Integer pageSize,Integer pageNum){
-        if(pageSize == null){
-            pageSize = 100;
-        }
-        if(pageNum == null){
-            pageNum = 1;
-        }
-        KuaishouResult<KuaishouReportHourlyCreative> result = kuaishouInterfaceService.getCreativeHourlyReport(accessToken,advertiserId,startDate,endDate,pageSize,pageNum);
-        List<KuaishouReportHourlyCreative> list = result.getData().getDetails();
-        for(KuaishouReportHourlyCreative creative : list){
-            creative.setAccountId(advertiserId);
-            kuaishouReportHourlyCreativeService.remove(
-                    new QueryWrapper<KuaishouReportHourlyCreative>().lambda()
-                            .eq(KuaishouReportHourlyCreative::getAccountId,creative.getAccountId())
-                            .eq(KuaishouReportHourlyCreative::getCreativeId,creative.getCreativeId())
-                            .eq(KuaishouReportHourlyCreative::getStatHour,creative.getStatHour())
-                            .eq(KuaishouReportHourlyCreative::getStatDate,creative.getStatDate()));
-            kuaishouReportHourlyCreativeService.save(creative);
-        }
-        int totalCount = result.getData().getTotalCount();
-        if(pageNum*pageSize < totalCount){
-            pageNum++;
-            getCreativeHourlyReportByPage(accessToken,advertiserId,startDate,endDate,pageSize,pageNum);
-        }
-    }
-}

+ 8 - 3
module-kuaishou/src/main/java/constant/KuaishouInterfaceConstant.java

@@ -8,7 +8,12 @@ public class KuaishouInterfaceConstant {
     public static final String CAMPAIGN_REPORT = "/rest/openapi/v1/report/campaign_report";
     public static final String GTOUP_REPORT = "/rest/openapi/v1/report/unit_report";
     public static final String CREATIVE_REPORT = "/rest/openapi/v1/report/creative_report";
-    public static final String CAMPAIGN_LIST = "/rest/openapi/v1/campaign/list";
-    public static final String GROUP_LIST = "/rest/openapi/v1/ad_unit/list";
-    public static final String CREATIVE_LIST = "/rest/openapi/v1/creative/list";
+    public static final String CAMPAIGN_LIST = "/rest/openapi/v1/campaign/list"; // 广告计划信息
+    public static final String GROUP_LIST = "/rest/openapi/v1/ad_unit/list"; //广告组信息
+    public static final String CREATIVE_LIST = "/rest/openapi/v1/creative/list"; //创意信息
+    public static final String CAMPAIGN_CREATE = "/rest/openapi/v1/campaign/create"; //创建广告计划
+    public static final String AD_UNIT_CREATE = "/rest/openapi/v1/ad_unit/create"; //创建广告组
+    public static final String APP_LIST = "/rest/openapi/v1/file/ad/app/list"; //创建广告获取应用列表
+
+
 }