ソースを参照

增加飞书sdk模块

xuzuoyun 5 年 前
コミット
e1b21e125a

+ 103 - 0
feishu-sdk/pom.xml

@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>cn.feishu.sdk</groupId>
+  <artifactId>feishu-sdk</artifactId>
+  <version>2.0.2</version>
+
+  <name>feishu-sdk</name>
+  <!-- FIXME change it to the project's website -->
+  <url>http://www.example.com</url>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <maven.compiler.source>1.7</maven.compiler.source>
+    <maven.compiler.target>1.7</maven.compiler.target>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>commons-io</groupId>
+      <artifactId>commons-io</artifactId>
+      <version>2.6</version>
+    </dependency>
+    <dependency>
+      <groupId>commons-lang</groupId>
+      <artifactId>commons-lang</artifactId>
+      <version>2.6</version>
+    </dependency>
+    <dependency>
+      <groupId>org.projectlombok</groupId>
+      <artifactId>lombok</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>com.alibaba</groupId>
+      <artifactId>fastjson</artifactId>
+      <version>1.2.56</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.httpcomponents</groupId>
+      <artifactId>httpclient</artifactId>
+      <version>4.5.9</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.httpcomponents</groupId>
+      <artifactId>httpcore</artifactId>
+      <version>4.4</version>
+    </dependency>
+    <dependency>
+      <groupId>cn.hutool</groupId>
+      <artifactId>hutool-all</artifactId>
+      <version>4.5.11</version>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
+      <plugins>
+        <!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
+        <plugin>
+          <artifactId>maven-clean-plugin</artifactId>
+          <version>3.1.0</version>
+        </plugin>
+        <!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
+        <plugin>
+          <artifactId>maven-resources-plugin</artifactId>
+          <version>3.0.2</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-compiler-plugin</artifactId>
+          <version>3.8.0</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <version>2.22.1</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-jar-plugin</artifactId>
+          <version>3.0.2</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-install-plugin</artifactId>
+          <version>2.5.2</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-deploy-plugin</artifactId>
+          <version>2.8.2</version>
+        </plugin>
+        <!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
+        <plugin>
+          <artifactId>maven-site-plugin</artifactId>
+          <version>3.7.1</version>
+        </plugin>
+        <plugin>
+          <artifactId>maven-project-info-reports-plugin</artifactId>
+          <version>3.0.0</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+</project>

+ 18 - 0
feishu-sdk/src/main/java/cn/feishu/sdk/Test.java

@@ -0,0 +1,18 @@
+package cn.feishu.sdk;
+
+import cn.feishu.sdk.provider.AuthProvider;
+
+import java.io.UnsupportedEncodingException;
+
+public class Test {
+    public static void main(String[] args){
+        AuthProvider authProvider = new AuthProvider();
+        try {
+//            authProvider.getAuthUrl("state");
+            authProvider.getAppAccessToken();
+            authProvider.getTenantAccessToken();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+}

+ 18 - 0
feishu-sdk/src/main/java/cn/feishu/sdk/common/ApiConstant.java

@@ -0,0 +1,18 @@
+package cn.feishu.sdk.common;
+
+import cn.feishu.sdk.util.PropertiesUtils;
+
+public class ApiConstant {
+    public static final String FEISHU_API_URL = PropertiesUtils.getConfig("feishu_api_url");
+    public static final String FEISHU_APP_ID = PropertiesUtils.getConfig("feishu_app_id");
+    public static final String FEISHU_APP_SECRET = PropertiesUtils.getConfig("feishu_app_secret");
+    public static final String APP_ACCESS_TOKEN = "/auth/v3/app_access_token/internal/";
+    public static final String TENANT_ACCESS_TOKEN = "/auth/v3/tenant_access_token/internal/";
+    public static final String AUTH_INDEX = "/authen/v1/index";
+    public static final String AUTH_ACCESS_TOKEN = "/authen/v1/access_token";
+    public static final String REFRESH_AUTH_ACCESS_TOKEN = "/authen/v1/refresh_access_token";
+    public static final String USER_INFO = "/authen/v1/user_info";
+    public static final String MESSAGE_BATCH_SEND = "/message/v4/batch_send/";
+    public static final String MESSAGE_SEND = "/message/v4/send/";
+    public static final String NOTIFY_SEND = "/notify/v4/appnotify";
+}

+ 61 - 0
feishu-sdk/src/main/java/cn/feishu/sdk/provider/AuthProvider.java

@@ -0,0 +1,61 @@
+package cn.feishu.sdk.provider;
+
+import cn.feishu.sdk.common.ApiConstant;
+import cn.feishu.sdk.util.HttpUtil;
+import cn.feishu.sdk.util.PropertiesUtils;
+import com.alibaba.fastjson.JSONObject;
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URLEncoder;
+
+public class AuthProvider {
+    public String getAuthUrl(String state) throws UnsupportedEncodingException, MalformedURLException {
+        String redirectUri = PropertiesUtils.getConfig("callback_url");
+        return HttpUtil.feishuGetRequestString(ApiConstant.FEISHU_API_URL+ApiConstant.AUTH_INDEX+"?redirect_uri="+ URLEncoder.encode(redirectUri,"UTF-8")+"&app_id="+ApiConstant.FEISHU_APP_ID+"&state="+state);
+    }
+    public JSONObject getAccessToken(String code) throws Exception {
+        JSONObject params = new JSONObject();
+        params.put("app_access_token",getAppAccessToken());
+        params.put("grant_type","authorization_code");
+        params.put("code",code);
+        return HttpUtil.feishuPostRequest(ApiConstant.FEISHU_API_URL+ApiConstant.AUTH_ACCESS_TOKEN,params);
+    }
+
+    public JSONObject refreshAccessToken(String refreshToken) throws Exception{
+        JSONObject params = new JSONObject();
+        params.put("app_access_token",getAppAccessToken());
+        params.put("grant_type","refresh_token");
+        params.put("refresh_token",refreshToken);
+        return HttpUtil.feishuPostRequest(ApiConstant.FEISHU_API_URL+ApiConstant.REFRESH_AUTH_ACCESS_TOKEN,params);
+    }
+
+    public JSONObject getUserInfo(String accessToken){
+        JSONObject params = new JSONObject();
+        params.put("user_access_token",accessToken);
+        return HttpUtil.feishuGetRequest("Bearer user_access_token",ApiConstant.FEISHU_API_URL+ApiConstant.USER_INFO,params);
+    }
+
+    public String getAppAccessToken() throws Exception {
+        JSONObject params = new JSONObject();
+        params.put("app_id",ApiConstant.FEISHU_APP_ID);
+        params.put("app_secret",ApiConstant.FEISHU_APP_SECRET);
+        JSONObject resultNode = HttpUtil.feishuPostRequest(ApiConstant.FEISHU_API_URL+ApiConstant.APP_ACCESS_TOKEN,params);
+        if (resultNode.getIntValue("code")==0){
+            return resultNode.getString("app_access_token");
+        }else {
+            throw new Exception();
+        }
+    }
+
+    public String getTenantAccessToken() throws Exception {
+        JSONObject params = new JSONObject();
+        params.put("app_id",ApiConstant.FEISHU_APP_ID);
+        params.put("app_secret",ApiConstant.FEISHU_APP_SECRET);
+        JSONObject resultNode = HttpUtil.feishuPostRequest(ApiConstant.FEISHU_API_URL+ApiConstant.TENANT_ACCESS_TOKEN,params);
+        if (resultNode.getIntValue("code")==0){
+            return resultNode.getString("tenant_access_token");
+        }else {
+            throw new Exception();
+        }
+    }
+}

+ 25 - 0
feishu-sdk/src/main/java/cn/feishu/sdk/provider/MessageProvider.java

@@ -0,0 +1,25 @@
+package cn.feishu.sdk.provider;
+
+import cn.feishu.sdk.common.ApiConstant;
+import cn.feishu.sdk.util.HttpUtil;
+import com.alibaba.fastjson.JSONObject;
+
+import java.util.List;
+
+public class MessageProvider {
+    public JSONObject batchSend(List<String> departmentIds,List<String> openIds,List<String> userIds,String content) throws Exception {
+        AuthProvider authProvider = new AuthProvider();
+        String tenantAccessToken = authProvider.getTenantAccessToken();
+        JSONObject contentJson = new JSONObject();
+        contentJson.put("text",content);
+        JSONObject params = new JSONObject();
+        params.put("department_ids",departmentIds);
+        params.put("open_ids",openIds);
+        params.put("user_ids",userIds);
+        params.put("msg_type","text");
+        params.put("content",contentJson);
+        return HttpUtil.feishuPostRequest("Bearer"+tenantAccessToken, ApiConstant.FEISHU_API_URL+ApiConstant.MESSAGE_BATCH_SEND,params);
+    }
+
+
+}

+ 167 - 0
feishu-sdk/src/main/java/cn/feishu/sdk/util/HttpUtil.java

@@ -0,0 +1,167 @@
+package cn.feishu.sdk.util;
+
+import cn.hutool.extra.ssh.JschRuntimeException;
+import com.alibaba.fastjson.JSONObject;
+import org.apache.http.client.config.RequestConfig;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.ContentType;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.URI;
+
+public class HttpUtil {
+
+    public static JSONObject feishuGetRequest(String url, JSONObject params){
+        return HttpUtil.feishuGetRequest(null,url,params);
+    }
+    public static JSONObject feishuPostRequest(String url,JSONObject params){
+        return HttpUtil.feishuPostRequest(null,url,params);
+    }
+
+    public static String feishuGetRequestString(String url) {
+        System.out.println(url);
+        // 构造请求
+        HttpEntityEnclosingRequestBase httpEntity = new HttpEntityEnclosingRequestBase() {
+            @Override
+            public String getMethod() {
+                return "GET";
+            }
+        };
+        CloseableHttpResponse response = null;
+        CloseableHttpClient client = null;
+        try {
+            client = HttpClientBuilder.create().build();
+            httpEntity.setURI(URI.create(url));
+            RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(12000).setConnectTimeout(12000).build();
+            httpEntity.setConfig(requestConfig);
+            response = client.execute(httpEntity);
+            if (response != null && response.getStatusLine().getStatusCode() == 200) {
+                BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
+                StringBuilder result = new StringBuilder();
+                String line = "";
+                while ((line = bufferedReader.readLine()) != null) {
+                    result.append(line);
+                }
+                bufferedReader.close();
+                System.out.println(result.toString());
+                return result.toString();
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            try {
+                if (response != null) {
+                    response.close();
+                }
+                if (client != null) {
+                    client.close();
+                }
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+        return null;
+    }
+
+    public static JSONObject feishuGetRequest(String accessToken, String url, JSONObject params) {
+        System.out.println(url);
+        // 构造请求
+        HttpEntityEnclosingRequestBase httpEntity = new HttpEntityEnclosingRequestBase() {
+            @Override
+            public String getMethod() {
+                return "GET";
+            }
+        };
+        if(accessToken != null){
+            httpEntity.setHeader("Authorization", accessToken);
+        }
+        CloseableHttpResponse response = null;
+        CloseableHttpClient client = null;
+        try {
+            client = HttpClientBuilder.create().build();
+            httpEntity.setURI(URI.create(url));
+            if (params != null){
+                httpEntity.setEntity(new StringEntity(params.toJSONString(), ContentType.APPLICATION_JSON));
+            }
+            RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(12000).setConnectTimeout(12000).build();
+            httpEntity.setConfig(requestConfig);
+            response = client.execute(httpEntity);
+            if (response != null && response.getStatusLine().getStatusCode() == 200) {
+                BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
+                StringBuilder result = new StringBuilder();
+                String line = "";
+                while ((line = bufferedReader.readLine()) != null) {
+                    result.append(line);
+                }
+                bufferedReader.close();
+                System.out.println(result.toString());
+                return JSONObject.parseObject(result.toString());
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            try {
+                if (response != null) {
+                    response.close();
+                }
+                if (client != null) {
+                    client.close();
+                }
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+        return null;
+    }
+
+
+
+    public static JSONObject feishuPostRequest(String accessToken, String url, JSONObject params) {
+        // 构造请求
+        HttpPost httpEntity = new HttpPost(url);
+        if(accessToken != null){
+            httpEntity.setHeader("Authorization", accessToken);
+        }
+        CloseableHttpResponse response = null;
+        CloseableHttpClient client = null;
+        try {
+            client = HttpClientBuilder.create().build();
+            httpEntity.setEntity(new StringEntity(params.toJSONString(), ContentType.APPLICATION_JSON));
+            RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(12000).setConnectTimeout(12000).build();
+            httpEntity.setConfig(requestConfig);
+            response = client.execute(httpEntity);
+            if (response != null && response.getStatusLine().getStatusCode() == 200) {
+                BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
+                StringBuilder result = new StringBuilder();
+                String line = "";
+                while ((line = bufferedReader.readLine()) != null) {
+                    result.append(line);
+                }
+                bufferedReader.close();
+                System.out.println(result.toString());
+                return JSONObject.parseObject(result.toString());
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            try {
+                if (response != null) {
+                    response.close();
+                }
+                if (client != null) {
+                    client.close();
+                }
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+        return null;
+    }
+}

+ 62 - 0
feishu-sdk/src/main/java/cn/feishu/sdk/util/PropertiesUtils.java

@@ -0,0 +1,62 @@
+package cn.feishu.sdk.util;
+
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
+
+/**
+ * @author jeecg-boot
+ * 2019年11月12日10:04:00
+ */
+public class PropertiesUtils {
+    private static Map<String, String> cache = new HashMap<String, String>();
+
+    public static String getConfig(String key) {
+        return getValue("config", key);
+    }
+
+    public static String getValue(String name, String key) {
+        try {
+            String cacheValue = (String) cache.get(name + key);
+            if (cacheValue != null) {
+                return cacheValue;
+            }
+            Properties props = new Properties();
+            InputStream in = PropertiesUtils.class.getResourceAsStream("/"
+                    + name + ".properties");
+            props.load(in);
+            String value = props.getProperty(key);
+            cache.put(name + key, value);
+            props.clone();
+            in.close();
+            return value;
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+    public static Map<String, String> getMap(String name) {
+        try {
+            Properties props = new Properties();
+            InputStream in = PropertiesUtils.class.getResourceAsStream("/"
+                    + name + ".properties");
+            props.load(in);
+            Iterator<Object> it = props.keySet().iterator();
+            Map<String, String> map = new HashMap<String, String>();
+            while (it.hasNext()) {
+                String key = it.next().toString();
+                String value = props.getProperty(key);
+                map.put(key, value);
+            }
+            props.clone();
+            in.close();
+            return map;
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return null;
+    }
+}

+ 4 - 0
feishu-sdk/src/main/resources/config.properties

@@ -0,0 +1,4 @@
+feishu_api_url=https://open.feishu.cn/open-apis
+feishu_app_id=cli_9e68af69ca34d00e
+feishu_app_secret=0RsCBRCLx1rG8HKfeZNeAbddxZ3Rsnwv
+callback_url=https://callback.tjyourong.com.cn/jeecg-boot/feishu/auth

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

@@ -56,7 +56,13 @@ public class CallbackController {
     @Autowired
     @Autowired
     private IByteDanceAdvertiserDataService advertiserDataService;
     private IByteDanceAdvertiserDataService advertiserDataService;
 
 
-
+    @GetMapping("/feishu/auth")
+    public void feishuAuth(HttpServletRequest request,
+                        HttpServletResponse response,
+                        @RequestParam("code") String code,
+                        @RequestParam("state") String state) throws IOException {
+        System.out.println(request.getQueryString());
+    }
     @GetMapping("/qywexin")
     @GetMapping("/qywexin")
     public void qywexin(HttpServletRequest request,
     public void qywexin(HttpServletRequest request,
                         HttpServletResponse response,
                         HttpServletResponse response,

+ 1 - 6
module-common/src/main/java/cn/com/ctop/common/module/service/impl/MaterialInfoServiceImpl.java

@@ -63,7 +63,7 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
         VideoWatermarkTemplate videoWatermarkTemplate = videoWatermarkTemplateService.getById(videoWatermarkTemplateId);
         VideoWatermarkTemplate videoWatermarkTemplate = videoWatermarkTemplateService.getById(videoWatermarkTemplateId);
         MaterialInfo materialInfo = this.getById(materialId);
         MaterialInfo materialInfo = this.getById(materialId);
         MpsUtils mpsUtils = new MpsUtils();
         MpsUtils mpsUtils = new MpsUtils();
-        String path = materialInfo.getUrl().substring(materialInfo.getUrl().indexOf("/", 10) + 1, materialInfo.getUrl().length());
+        String path = materialInfo.getUrl().substring(materialInfo.getUrl().indexOf('/', 10) + 1, materialInfo.getUrl().length());
         String jobId = mpsUtils.videoWaterMark(path, videoWatermarkTemplate.getTemplatePath(), videoWatermarkTemplate.getTemplateId(), videoWatermarkTemplate.getHeight());
         String jobId = mpsUtils.videoWaterMark(path, videoWatermarkTemplate.getTemplatePath(), videoWatermarkTemplate.getTemplateId(), videoWatermarkTemplate.getHeight());
         QueryJobListResponse.Job job = MpsUtils.getJobStatus(jobId);
         QueryJobListResponse.Job job = MpsUtils.getJobStatus(jobId);
         VideoWatermarkTask videoWatermarkTask = new VideoWatermarkTask();
         VideoWatermarkTask videoWatermarkTask = new VideoWatermarkTask();
@@ -115,11 +115,6 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
         return p.matcher(fileName).find();
         return p.matcher(fileName).find();
     }
     }
 
 
-    public static void main(String[] args) {
-        String reg = "(mp4|flv|avi|rm|rmvb|wmv)";
-        Pattern p = Pattern.compile(reg);
-    }
-
     @Autowired
     @Autowired
     private MaterialAscriptionMapper materialAscriptionMapper;
     private MaterialAscriptionMapper materialAscriptionMapper;
     @Autowired
     @Autowired

+ 1 - 5
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouInterfaceServiceImpl.java

@@ -16,7 +16,6 @@ import cn.com.ctop.kuaishou.modules.report.entity.*;
 import cn.com.ctop.kuaishou.modules.report.mapper.KuaishouReportDailyAccountMapper;
 import cn.com.ctop.kuaishou.modules.report.mapper.KuaishouReportDailyAccountMapper;
 import cn.com.ctop.kuaishou.modules.report.mapper.KuaishouReportDailyCampaignMapper;
 import cn.com.ctop.kuaishou.modules.report.mapper.KuaishouReportDailyCampaignMapper;
 import cn.com.ctop.kuaishou.modules.report.service.*;
 import cn.com.ctop.kuaishou.modules.report.service.*;
-import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -126,12 +125,10 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
     private IUserAllocationService userAllocationService;
     private IUserAllocationService userAllocationService;
     @Autowired
     @Autowired
     private IKuaishouReportDailyCreativeStatisticService dailyCreativeStatisticService;
     private IKuaishouReportDailyCreativeStatisticService dailyCreativeStatisticService;
-
     @Autowired
     @Autowired
     private IKuaiShouHistoryReportTaskService historyReportTaskService;
     private IKuaiShouHistoryReportTaskService historyReportTaskService;
-
     @Autowired
     @Autowired
-    IKuaiShouImageGetService kuaiShouImageGetService;
+    private IKuaiShouImageGetService kuaiShouImageGetService;
     @Autowired
     @Autowired
     private IKuaiShouDailyFlowsService kuaiShouDailyFlowsService;
     private IKuaiShouDailyFlowsService kuaiShouDailyFlowsService;
     @Autowired
     @Autowired
@@ -218,7 +215,6 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
                 log.info("快手视频列表信息为空=》accountId:{}", token.getAccountId());
                 log.info("快手视频列表信息为空=》accountId:{}", token.getAccountId());
                 return;
                 return;
             }
             }
-            List<KuaiShouVideoGet> videoGets = new ArrayList<>();
             for (int i = 0; i < details.size(); i++) {
             for (int i = 0; i < details.size(); i++) {
                 var detailJson = details.getJSONObject(i);
                 var detailJson = details.getJSONObject(i);
                 var kuaiShouVideoGet = JSONObject.toJavaObject(detailJson, KuaiShouVideoGet.class);
                 var kuaiShouVideoGet = JSONObject.toJavaObject(detailJson, KuaiShouVideoGet.class);

+ 508 - 307
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/entity/ByteDanceVideoReportDaily.java

@@ -15,421 +15,622 @@ import org.springframework.format.annotation.DateTimeFormat;
 
 
 /**
 /**
  * 视频按时间段统计
  * 视频按时间段统计
+ *
  * @author jeecg-boot
  * @author jeecg-boot
- * @date   2020-05-13
  * @version V1.0
  * @version V1.0
+ * @date 2020-05-13
  */
  */
 @Data
 @Data
 @TableName("ctop_bytedance_video_report_daily")
 @TableName("ctop_bytedance_video_report_daily")
 @EqualsAndHashCode(callSuper = false)
 @EqualsAndHashCode(callSuper = false)
 @Accessors(chain = true)
 @Accessors(chain = true)
-@ApiModel(value="ctop_bytedance_video_report_daily对象", description="视频按时间段统计")
+@ApiModel(value = "ctop_bytedance_video_report_daily对象", description = "视频按时间段统计")
 public class ByteDanceVideoReportDaily {
 public class ByteDanceVideoReportDaily {
 
 
-	/**id*/
-	@TableId(type = IdType.AUTO)
+    /**
+     * id
+     */
+    @TableId(type = IdType.AUTO)
     @ApiModelProperty(value = "id")
     @ApiModelProperty(value = "id")
-	private Integer id;
-	/**项目id*/
-	@Excel(name = "项目id", width = 15)
+    private Integer id;
+    /**
+     * 项目id
+     */
+    @Excel(name = "项目id", width = 15)
     @ApiModelProperty(value = "项目id")
     @ApiModelProperty(value = "项目id")
-	private Integer projectId;
-	/**项目名称*/
-	@Excel(name = "项目名称", width = 15)
+    private Integer projectId;
+    /**
+     * 项目名称
+     */
+    @Excel(name = "项目名称", width = 15)
     @ApiModelProperty(value = "项目名称")
     @ApiModelProperty(value = "项目名称")
-	private String projectName;
-	/**广告主id*/
-	@Excel(name = "广告主id", width = 15)
+    private String projectName;
+    /**
+     * 广告主id
+     */
+    @Excel(name = "广告主id", width = 15)
     @ApiModelProperty(value = "广告主id")
     @ApiModelProperty(value = "广告主id")
-	private String advertiserId;
-	/**广告主名称*/
-	@Excel(name = "广告主名称", width = 15)
+    private String advertiserId;
+    /**
+     * 广告主名称
+     */
+    @Excel(name = "广告主名称", width = 15)
     @ApiModelProperty(value = "广告主名称")
     @ApiModelProperty(value = "广告主名称")
-	private String advertiserName;
-	/**广告主id*/
-	@Excel(name = "账户id", width = 15)
-	@ApiModelProperty(value = "账户id")
-	private Long accountId;
-	/**md5*/
-	@Excel(name = "md5", width = 15)
+    private String advertiserName;
+    /**
+     * 广告主id
+     */
+    @Excel(name = "账户id", width = 15)
+    @ApiModelProperty(value = "账户id")
+    private Long accountId;
+    /**
+     * md5
+     */
+    @Excel(name = "md5", width = 15)
     @ApiModelProperty(value = "md5")
     @ApiModelProperty(value = "md5")
-	private String signature;
-	/**视频url-头条视频报表提供*/
-	@Excel(name = "视频url-头条视频报表提供", width = 15)
+    private String signature;
+    /**
+     * 视频url-头条视频报表提供
+     */
+    @Excel(name = "视频url-头条视频报表提供", width = 15)
     @ApiModelProperty(value = "视频url-头条视频报表提供")
     @ApiModelProperty(value = "视频url-头条视频报表提供")
-	private String videoUrl;
-	/**公司素材库提供*/
-	@Excel(name = "公司素材库提供", width = 15)
+    private String videoUrl;
+    /**
+     * 公司素材库提供
+     */
+    @Excel(name = "公司素材库提供", width = 15)
     @ApiModelProperty(value = "公司素材库提供")
     @ApiModelProperty(value = "公司素材库提供")
-	private String url;
-	/**环比*/
-	@Excel(name = "环比", width = 15)
+    private String url;
+    /**
+     * 环比
+     */
+    @Excel(name = "环比", width = 15)
     @ApiModelProperty(value = "环比")
     @ApiModelProperty(value = "环比")
-	private java.math.BigDecimal huanbi;
-	/**素材名称*/
-	@Excel(name = "素材名称", width = 15)
+    private java.math.BigDecimal huanbi;
+    /**
+     * 素材名称
+     */
+    @Excel(name = "素材名称", width = 15)
     @ApiModelProperty(value = "素材名称")
     @ApiModelProperty(value = "素材名称")
-	private String materialName;
-	/**媒体类型*/
-	@Excel(name = "媒体类型", width = 15)
+    private String materialName;
+    /**
+     * 媒体类型
+     */
+    @Excel(name = "媒体类型", width = 15)
     @ApiModelProperty(value = "媒体类型")
     @ApiModelProperty(value = "媒体类型")
-	private Integer appType;
-	/**公司id*/
-	@Excel(name = "公司id", width = 15)
+    private Integer appType;
+    /**
+     * 公司id
+     */
+    @Excel(name = "公司id", width = 15)
     @ApiModelProperty(value = "公司id")
     @ApiModelProperty(value = "公司id")
-	private String companyId;
-	/**素材id*/
-	@Excel(name = "素材id", width = 15)
+    private String companyId;
+    /**
+     * 素材id
+     */
+    @Excel(name = "素材id", width = 15)
     @ApiModelProperty(value = "素材id")
     @ApiModelProperty(value = "素材id")
-	private Integer materialId;
-	/**数据起始时间*/
-	@Excel(name = "数据起始时间", width = 15, format = "yyyy-MM-dd")
-	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
-    @DateTimeFormat(pattern="yyyy-MM-dd")
+    private Integer materialId;
+    /**
+     * 数据起始时间
+     */
+    @Excel(name = "数据起始时间", width = 15, format = "yyyy-MM-dd")
+    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
     @ApiModelProperty(value = "数据起始时间")
     @ApiModelProperty(value = "数据起始时间")
-	private java.util.Date statDatetime;
-	/**点击量*/
-	@Excel(name = "点击量", width = 15)
+    private java.util.Date statDatetime;
+    /**
+     * 点击量
+     */
+    @Excel(name = "点击量", width = 15)
     @ApiModelProperty(value = "点击量")
     @ApiModelProperty(value = "点击量")
-	private Integer click;
-	/**总花费*/
-	@Excel(name = "总花费", width = 15)
+    private Integer click;
+    /**
+     * 总花费
+     */
+    @Excel(name = "总花费", width = 15)
     @ApiModelProperty(value = "总花费")
     @ApiModelProperty(value = "总花费")
-	private java.math.BigDecimal cost;
-	/**应用下载-激活*/
-	@Excel(name = "应用下载-激活", width = 15)
+    private java.math.BigDecimal cost;
+    /**
+     * 应用下载-激活
+     */
+    @Excel(name = "应用下载-激活", width = 15)
     @ApiModelProperty(value = "应用下载-激活")
     @ApiModelProperty(value = "应用下载-激活")
-	private Integer active;
-	/**应用下载-安卓下载完成*/
-	@Excel(name = "应用下载-安卓下载完成", width = 15)
+    private Integer active;
+    /**
+     * 应用下载-安卓下载完成
+     */
+    @Excel(name = "应用下载-安卓下载完成", width = 15)
     @ApiModelProperty(value = "应用下载-安卓下载完成")
     @ApiModelProperty(value = "应用下载-安卓下载完成")
-	private Integer downloadFinish;
-	/**应用下载-安卓下载开始*/
-	@Excel(name = "应用下载-安卓下载开始", width = 15)
+    private Integer downloadFinish;
+    /**
+     * 应用下载-安卓下载开始
+     */
+    @Excel(name = "应用下载-安卓下载开始", width = 15)
     @ApiModelProperty(value = "应用下载-安卓下载开始")
     @ApiModelProperty(value = "应用下载-安卓下载开始")
-	private Integer downloadStart;
-	/**应用下载-安卓安装完成*/
-	@Excel(name = "应用下载-安卓安装完成", width = 15)
+    private Integer downloadStart;
+    /**
+     * 应用下载-安卓安装完成
+     */
+    @Excel(name = "应用下载-安卓安装完成", width = 15)
     @ApiModelProperty(value = "应用下载-安卓安装完成")
     @ApiModelProperty(value = "应用下载-安卓安装完成")
-	private Integer installFinish;
-	/**应用下载-注册*/
-	@Excel(name = "应用下载-注册", width = 15)
+    private Integer installFinish;
+    /**
+     * 应用下载-注册
+     */
+    @Excel(name = "应用下载-注册", width = 15)
     @ApiModelProperty(value = "应用下载-注册")
     @ApiModelProperty(value = "应用下载-注册")
-	private Integer register;
-	/**应用下载-付费数*/
-	@Excel(name = "应用下载-付费数", width = 15)
+    private Integer register;
+    /**
+     * 应用下载-付费数
+     */
+    @Excel(name = "应用下载-付费数", width = 15)
     @ApiModelProperty(value = "应用下载-付费数")
     @ApiModelProperty(value = "应用下载-付费数")
-	private Integer payCount;
-	/**应用下载-到达uv*/
-	@Excel(name = "应用下载-到达uv", width = 15)
+    private Integer payCount;
+    /**
+     * 应用下载-到达uv
+     */
+    @Excel(name = "应用下载-到达uv", width = 15)
     @ApiModelProperty(value = "应用下载-到达uv")
     @ApiModelProperty(value = "应用下载-到达uv")
-	private Integer inAppUv;
-	/**应用下载-详情页到站uv*/
-	@Excel(name = "应用下载-详情页到站uv", width = 15)
+    private Integer inAppUv;
+    /**
+     * 应用下载-详情页到站uv
+     */
+    @Excel(name = "应用下载-详情页到站uv", width = 15)
     @ApiModelProperty(value = "应用下载-详情页到站uv")
     @ApiModelProperty(value = "应用下载-详情页到站uv")
-	private Integer inAppDetailUv;
-	/**应用下载-加入购物车*/
-	@Excel(name = "应用下载-加入购物车", width = 15)
+    private Integer inAppDetailUv;
+    /**
+     * 应用下载-加入购物车
+     */
+    @Excel(name = "应用下载-加入购物车", width = 15)
     @ApiModelProperty(value = "应用下载-加入购物车")
     @ApiModelProperty(value = "应用下载-加入购物车")
-	private Integer inAppCart;
-	/**应用下载-提交订单*/
-	@Excel(name = "应用下载-提交订单", width = 15)
+    private Integer inAppCart;
+    /**
+     * 应用下载-提交订单
+     */
+    @Excel(name = "应用下载-提交订单", width = 15)
     @ApiModelProperty(value = "应用下载-提交订单")
     @ApiModelProperty(value = "应用下载-提交订单")
-	private Integer inAppOrder;
-	/**应用下载-付费*/
-	@Excel(name = "应用下载-付费", width = 15)
+    private Integer inAppOrder;
+    /**
+     * 应用下载-付费
+     */
+    @Excel(name = "应用下载-付费", width = 15)
     @ApiModelProperty(value = "应用下载-付费")
     @ApiModelProperty(value = "应用下载-付费")
-	private Integer inAppPay;
-	/**落地页-电话拨打数*/
-	@Excel(name = "落地页-电话拨打数", width = 15)
+    private Integer inAppPay;
+    /**
+     * 落地页-电话拨打数
+     */
+    @Excel(name = "落地页-电话拨打数", width = 15)
     @ApiModelProperty(value = "落地页-电话拨打数")
     @ApiModelProperty(value = "落地页-电话拨打数")
-	private Integer phone;
-	/**表单提交数*/
-	@Excel(name = "表单提交数", width = 15)
+    private Integer phone;
+    /**
+     * 表单提交数
+     */
+    @Excel(name = "表单提交数", width = 15)
     @ApiModelProperty(value = "表单提交数")
     @ApiModelProperty(value = "表单提交数")
-	private Integer form;
-	/**落地页-地图搜索*/
-	@Excel(name = "落地页-地图搜索", width = 15)
+    private Integer form;
+    /**
+     * 落地页-地图搜索
+     */
+    @Excel(name = "落地页-地图搜索", width = 15)
     @ApiModelProperty(value = "落地页-地图搜索")
     @ApiModelProperty(value = "落地页-地图搜索")
-	private Integer mapSearch;
-	/**落地页-按钮button*/
-	@Excel(name = "落地页-按钮button", width = 15)
+    private Integer mapSearch;
+    /**
+     * 落地页-按钮button
+     */
+    @Excel(name = "落地页-按钮button", width = 15)
     @ApiModelProperty(value = "落地页-按钮button")
     @ApiModelProperty(value = "落地页-按钮button")
-	private Integer button;
-	/**落地页-关键页面浏览*/
-	@Excel(name = "落地页-关键页面浏览", width = 15)
+    private Integer button;
+    /**
+     * 落地页-关键页面浏览
+     */
+    @Excel(name = "落地页-关键页面浏览", width = 15)
     @ApiModelProperty(value = "落地页-关键页面浏览")
     @ApiModelProperty(value = "落地页-关键页面浏览")
-	private Integer viewMaterial;
-	/**落地页-QQ咨询数*/
-	@Excel(name = "落地页-QQ咨询数", width = 15)
+    private Integer viewMaterial;
+    /**
+     * 落地页-QQ咨询数
+     */
+    @Excel(name = "落地页-QQ咨询数", width = 15)
     @ApiModelProperty(value = "落地页-QQ咨询数")
     @ApiModelProperty(value = "落地页-QQ咨询数")
-	private Integer qq;
-	/**落地页-抽奖数*/
-	@Excel(name = "落地页-抽奖数", width = 15)
+    private Integer qq;
+    /**
+     * 落地页-抽奖数
+     */
+    @Excel(name = "落地页-抽奖数", width = 15)
     @ApiModelProperty(value = "落地页-抽奖数")
     @ApiModelProperty(value = "落地页-抽奖数")
-	private Integer lottery;
-	/**落地页-投票*/
-	@Excel(name = "落地页-投票", width = 15)
+    private Integer lottery;
+    /**
+     * 落地页-投票
+     */
+    @Excel(name = "落地页-投票", width = 15)
     @ApiModelProperty(value = "落地页-投票")
     @ApiModelProperty(value = "落地页-投票")
-	private Integer vote;
-	/**落地页-页面跳转*/
-	@Excel(name = "落地页-页面跳转", width = 15)
+    private Integer vote;
+    /**
+     * 落地页-页面跳转
+     */
+    @Excel(name = "落地页-页面跳转", width = 15)
     @ApiModelProperty(value = "落地页-页面跳转")
     @ApiModelProperty(value = "落地页-页面跳转")
-	private Integer redirect;
-	/**落地页-商品购买*/
-	@Excel(name = "落地页-商品购买", width = 15)
+    private Integer redirect;
+    /**
+     * 落地页-商品购买
+     */
+    @Excel(name = "落地页-商品购买", width = 15)
     @ApiModelProperty(value = "落地页-商品购买")
     @ApiModelProperty(value = "落地页-商品购买")
-	private Integer shopping;
-	/**落地页-在线咨询*/
-	@Excel(name = "落地页-在线咨询", width = 15)
+    private Integer shopping;
+    /**
+     * 落地页-在线咨询
+     */
+    @Excel(name = "落地页-在线咨询", width = 15)
     @ApiModelProperty(value = "落地页-在线咨询")
     @ApiModelProperty(value = "落地页-在线咨询")
-	private Integer consult;
-	/**落地页-微信*/
-	@Excel(name = "落地页-微信", width = 15)
+    private Integer consult;
+    /**
+     * 落地页-微信
+     */
+    @Excel(name = "落地页-微信", width = 15)
     @ApiModelProperty(value = "落地页-微信")
     @ApiModelProperty(value = "落地页-微信")
-	private Integer wechat;
-	/**落地页-智能电话确认拨打*/
-	@Excel(name = "落地页-智能电话确认拨打", width = 15)
+    private Integer wechat;
+    /**
+     * 落地页-智能电话确认拨打
+     */
+    @Excel(name = "落地页-智能电话确认拨打", width = 15)
     @ApiModelProperty(value = "落地页-智能电话确认拨打")
     @ApiModelProperty(value = "落地页-智能电话确认拨打")
-	private Integer phoneConfirm;
-	/**落地页-智能电话确认接通*/
-	@Excel(name = "落地页-智能电话确认接通", width = 15)
+    private Integer phoneConfirm;
+    /**
+     * 落地页-智能电话确认接通
+     */
+    @Excel(name = "落地页-智能电话确认接通", width = 15)
     @ApiModelProperty(value = "落地页-智能电话确认接通")
     @ApiModelProperty(value = "落地页-智能电话确认接通")
-	private Integer phoneConnect;
-	/**落地页-智能电话有效咨询*/
-	@Excel(name = "落地页-智能电话有效咨询", width = 15)
+    private Integer phoneConnect;
+    /**
+     * 落地页-智能电话有效咨询
+     */
+    @Excel(name = "落地页-智能电话有效咨询", width = 15)
     @ApiModelProperty(value = "落地页-智能电话有效咨询")
     @ApiModelProperty(value = "落地页-智能电话有效咨询")
-	private Integer consultEffective;
-	/**视频-总播放*/
-	@Excel(name = "视频-总播放", width = 15)
+    private Integer consultEffective;
+    /**
+     * 视频-总播放
+     */
+    @Excel(name = "视频-总播放", width = 15)
     @ApiModelProperty(value = "视频-总播放")
     @ApiModelProperty(value = "视频-总播放")
-	private Integer totalPlay;
-	/**视频-有效播放*/
-	@Excel(name = "视频-有效播放", width = 15)
+    private Integer totalPlay;
+    /**
+     * 视频-有效播放
+     */
+    @Excel(name = "视频-有效播放", width = 15)
     @ApiModelProperty(value = "视频-有效播放")
     @ApiModelProperty(value = "视频-有效播放")
-	private Integer validPlay;
-	/**视频-wifi播放*/
-	@Excel(name = "视频-wifi播放", width = 15)
+    private Integer validPlay;
+    /**
+     * 视频-wifi播放
+     */
+    @Excel(name = "视频-wifi播放", width = 15)
     @ApiModelProperty(value = "视频-wifi播放")
     @ApiModelProperty(value = "视频-wifi播放")
-	private Integer wifiPlay;
-	/**视频-播放25%进度播放率*/
-	@Excel(name = "视频-播放25%进度播放率", width = 15)
-	@ApiModelProperty(value = "视频-播放25%进度播放率")
-	private java.math.BigDecimal play25FeedBreakRate;
-	/**视频-播放25%进度总数*/
-	@Excel(name = "视频-播放25%进度总数", width = 15)
+    private Integer wifiPlay;
+    /**
+     * 视频-播放25%进度播放率
+     */
+    @Excel(name = "视频-播放25%进度播放率", width = 15)
+    @ApiModelProperty(value = "视频-播放25%进度播放率")
+    private java.math.BigDecimal play25FeedBreakRate;
+    /**
+     * 视频-播放25%进度总数
+     */
+    @Excel(name = "视频-播放25%进度总数", width = 15)
     @ApiModelProperty(value = "视频-播放25%进度总数")
     @ApiModelProperty(value = "视频-播放25%进度总数")
-	private Integer play25FeedBreak;
-	/**视频-播放50%进度总数*/
-	@Excel(name = "视频-播放50%进度总数", width = 15)
+    private Integer play25FeedBreak;
+    /**
+     * 视频-播放50%进度总数
+     */
+    @Excel(name = "视频-播放50%进度总数", width = 15)
     @ApiModelProperty(value = "视频-播放50%进度总数")
     @ApiModelProperty(value = "视频-播放50%进度总数")
-	private Integer play50FeedBreak;
-	/**视频-播放75%进度总数*/
-	@Excel(name = "视频-播放75%进度总数", width = 15)
+    private Integer play50FeedBreak;
+    /**
+     * 视频-播放75%进度总数
+     */
+    @Excel(name = "视频-播放75%进度总数", width = 15)
     @ApiModelProperty(value = "视频-播放75%进度总数")
     @ApiModelProperty(value = "视频-播放75%进度总数")
-	private Integer play75FeedBreak;
-	/**视频-播放100%进度总数*/
-	@Excel(name = "视频-播放100%进度总数", width = 15)
+    private Integer play75FeedBreak;
+    /**
+     * 视频-播放100%进度总数
+     */
+    @Excel(name = "视频-播放100%进度总数", width = 15)
     @ApiModelProperty(value = "视频-播放100%进度总数")
     @ApiModelProperty(value = "视频-播放100%进度总数")
-	private Integer play100FeedBreak;
-	/**附加创意-电话按钮*/
-	@Excel(name = "附加创意-电话按钮", width = 15)
+    private Integer play100FeedBreak;
+    /**
+     * 附加创意-电话按钮
+     */
+    @Excel(name = "附加创意-电话按钮", width = 15)
     @ApiModelProperty(value = "附加创意-电话按钮")
     @ApiModelProperty(value = "附加创意-电话按钮")
-	private Integer advancedCreativePhoneClick;
-	/**附加创意-在线咨询*/
-	@Excel(name = "附加创意-在线咨询", width = 15)
+    private Integer advancedCreativePhoneClick;
+    /**
+     * 附加创意-在线咨询
+     */
+    @Excel(name = "附加创意-在线咨询", width = 15)
     @ApiModelProperty(value = "附加创意-在线咨询")
     @ApiModelProperty(value = "附加创意-在线咨询")
-	private Integer advancedCreativeCounselClick;
-	/**附加创意-表单提交*/
-	@Excel(name = "附加创意-表单提交", width = 15)
+    private Integer advancedCreativeCounselClick;
+    /**
+     * 附加创意-表单提交
+     */
+    @Excel(name = "附加创意-表单提交", width = 15)
     @ApiModelProperty(value = "附加创意-表单提交")
     @ApiModelProperty(value = "附加创意-表单提交")
-	private Integer advancedCreativeFormClick;
-	/**互动数据-分享数*/
-	@Excel(name = "互动数据-分享数", width = 15)
+    private Integer advancedCreativeFormClick;
+    /**
+     * 互动数据-分享数
+     */
+    @Excel(name = "互动数据-分享数", width = 15)
     @ApiModelProperty(value = "互动数据-分享数")
     @ApiModelProperty(value = "互动数据-分享数")
-	private Integer shareMaterial;
-	/**互动数据-评论数*/
-	@Excel(name = "互动数据-评论数", width = 15)
+    private Integer shareMaterial;
+    /**
+     * 互动数据-评论数
+     */
+    @Excel(name = "互动数据-评论数", width = 15)
     @ApiModelProperty(value = "互动数据-评论数")
     @ApiModelProperty(value = "互动数据-评论数")
-	private Integer commentMaterial;
-	/**互动数据-新增关注数*/
-	@Excel(name = "互动数据-新增关注数", width = 15)
+    private Integer commentMaterial;
+    /**
+     * 互动数据-新增关注数
+     */
+    @Excel(name = "互动数据-新增关注数", width = 15)
     @ApiModelProperty(value = "互动数据-新增关注数")
     @ApiModelProperty(value = "互动数据-新增关注数")
-	private Integer follow;
-	/**互动数据-主页访问量*/
-	@Excel(name = "互动数据-主页访问量", width = 15)
+    private Integer follow;
+    /**
+     * 互动数据-主页访问量
+     */
+    @Excel(name = "互动数据-主页访问量", width = 15)
     @ApiModelProperty(value = "互动数据-主页访问量")
     @ApiModelProperty(value = "互动数据-主页访问量")
-	private Integer homeVisited;
-	/**互动数据-挑战赛查看数*/
-	@Excel(name = "互动数据-挑战赛查看数", width = 15)
+    private Integer homeVisited;
+    /**
+     * 互动数据-挑战赛查看数
+     */
+    @Excel(name = "互动数据-挑战赛查看数", width = 15)
     @ApiModelProperty(value = "互动数据-挑战赛查看数")
     @ApiModelProperty(value = "互动数据-挑战赛查看数")
-	private Integer iesChallengeClick;
-	/**互动数据-音乐查看数*/
-	@Excel(name = "互动数据-音乐查看数", width = 15)
+    private Integer iesChallengeClick;
+    /**
+     * 互动数据-音乐查看数
+     */
+    @Excel(name = "互动数据-音乐查看数", width = 15)
     @ApiModelProperty(value = "互动数据-音乐查看数")
     @ApiModelProperty(value = "互动数据-音乐查看数")
-	private Integer iesMusicClick;
-	/**次留数*/
-	@Excel(name = "次留数", width = 15)
+    private Integer iesMusicClick;
+    /**
+     * 次留数
+     */
+    @Excel(name = "次留数", width = 15)
     @ApiModelProperty(value = "次留数")
     @ApiModelProperty(value = "次留数")
-	private Integer nextDayOpen;
-	/**次留率*/
-	@Excel(name = "次留率", width = 15)
+    private Integer nextDayOpen;
+    /**
+     * 次留率
+     */
+    @Excel(name = "次留率", width = 15)
     @ApiModelProperty(value = "次留率")
     @ApiModelProperty(value = "次留率")
-	private java.math.BigDecimal nextDayOpenRate;
-	/**次留成本*/
-	@Excel(name = "次留成本", width = 15)
+    private java.math.BigDecimal nextDayOpenRate;
+    /**
+     * 次留成本
+     */
+    @Excel(name = "次留成本", width = 15)
     @ApiModelProperty(value = "次留成本")
     @ApiModelProperty(value = "次留成本")
-	private java.math.BigDecimal nextDayOpenCost;
-	/**activePayAmount*/
-	@Excel(name = "activePayAmount", width = 15)
+    private java.math.BigDecimal nextDayOpenCost;
+    /**
+     * activePayAmount
+     */
+    @Excel(name = "activePayAmount", width = 15)
     @ApiModelProperty(value = "activePayAmount")
     @ApiModelProperty(value = "activePayAmount")
-	private Integer activePayAmount;
-	/**视频数据-有效播放成本*/
-	@Excel(name = "视频数据-有效播放成本", width = 15)
+    private Integer activePayAmount;
+    /**
+     * 视频数据-有效播放成本
+     */
+    @Excel(name = "视频数据-有效播放成本", width = 15)
     @ApiModelProperty(value = "视频数据-有效播放成本")
     @ApiModelProperty(value = "视频数据-有效播放成本")
-	private java.math.BigDecimal validPlayCost;
-	/**附加创意-附加创意卡券领取*/
-	@Excel(name = "附加创意-附加创意卡券领取", width = 15)
+    private java.math.BigDecimal validPlayCost;
+    /**
+     * 附加创意-附加创意卡券领取
+     */
+    @Excel(name = "附加创意-附加创意卡券领取", width = 15)
     @ApiModelProperty(value = "附加创意-附加创意卡券领取")
     @ApiModelProperty(value = "附加创意-附加创意卡券领取")
-	private Integer advancedCreativeCouponAddition;
-	/**convertMaterial*/
-	@Excel(name = "convertMaterial", width = 15)
+    private Integer advancedCreativeCouponAddition;
+    /**
+     * convertMaterial
+     */
+    @Excel(name = "convertMaterial", width = 15)
     @ApiModelProperty(value = "convertMaterial")
     @ApiModelProperty(value = "convertMaterial")
-	private Integer convertMaterial;
-	/**应用下载广告数据-付费成本*/
-	@Excel(name = "应用下载广告数据-付费成本", width = 15)
+    private Integer convertMaterial;
+    /**
+     * 应用下载广告数据-付费成本
+     */
+    @Excel(name = "应用下载广告数据-付费成本", width = 15)
     @ApiModelProperty(value = "应用下载广告数据-付费成本")
     @ApiModelProperty(value = "应用下载广告数据-付费成本")
-	private java.math.BigDecimal activePayCost;
-	/**落地页转化数据-下载开始*/
-	@Excel(name = "落地页转化数据-下载开始", width = 15)
+    private java.math.BigDecimal activePayCost;
+    /**
+     * 落地页转化数据-下载开始
+     */
+    @Excel(name = "落地页转化数据-下载开始", width = 15)
     @ApiModelProperty(value = "落地页转化数据-下载开始")
     @ApiModelProperty(value = "落地页转化数据-下载开始")
-	private Integer download;
-	/**cpc*/
-	@Excel(name = "cpc", width = 15)
+    private Integer download;
+    /**
+     * cpc
+     */
+    @Excel(name = "cpc", width = 15)
     @ApiModelProperty(value = "cpc")
     @ApiModelProperty(value = "cpc")
-	private java.math.BigDecimal cpc;
-	/**互动数据-POI点击数*/
-	@Excel(name = "互动数据-POI点击数", width = 15)
+    private java.math.BigDecimal cpc;
+    /**
+     * 互动数据-POI点击数
+     */
+    @Excel(name = "互动数据-POI点击数", width = 15)
     @ApiModelProperty(value = "互动数据-POI点击数")
     @ApiModelProperty(value = "互动数据-POI点击数")
-	private Integer locationClick;
-	/**	视频数据-播完率*/
-	@Excel(name = "	视频数据-播完率", width = 15)
+    private Integer locationClick;
+    /**
+     * 视频数据-播完率
+     */
+    @Excel(name = "	视频数据-播完率", width = 15)
     @ApiModelProperty(value = "	视频数据-播完率")
     @ApiModelProperty(value = "	视频数据-播完率")
-	private java.math.BigDecimal playOverRate;
-	/**展现数据-点击率*/
-	@Excel(name = "展现数据-点击率", width = 15)
+    private java.math.BigDecimal playOverRate;
+    /**
+     * 展现数据-点击率
+     */
+    @Excel(name = "展现数据-点击率", width = 15)
     @ApiModelProperty(value = "展现数据-点击率")
     @ApiModelProperty(value = "展现数据-点击率")
-	private java.math.BigDecimal ctr;
-	/**cpm*/
-	@Excel(name = "cpm", width = 15)
+    private java.math.BigDecimal ctr;
+    /**
+     * cpm
+     */
+    @Excel(name = "cpm", width = 15)
     @ApiModelProperty(value = "cpm")
     @ApiModelProperty(value = "cpm")
-	private java.math.BigDecimal cpm;
-	/**视频数据-WiFi播放占比*/
-	@Excel(name = "视频数据-WiFi播放占比", width = 15)
+    private java.math.BigDecimal cpm;
+    /**
+     * 视频数据-WiFi播放占比
+     */
+    @Excel(name = "视频数据-WiFi播放占比", width = 15)
     @ApiModelProperty(value = "视频数据-WiFi播放占比")
     @ApiModelProperty(value = "视频数据-WiFi播放占比")
-	private java.math.BigDecimal wifiPlayRate;
-	/**互动数据-点赞数*/
-	@Excel(name = "互动数据-点赞数", width = 15)
+    private java.math.BigDecimal wifiPlayRate;
+    /**
+     * 互动数据-点赞数
+     */
+    @Excel(name = "互动数据-点赞数", width = 15)
     @ApiModelProperty(value = "互动数据-点赞数")
     @ApiModelProperty(value = "互动数据-点赞数")
-	private Integer likeMaterial;
-	/**应用下载广告数据-激活成本*/
-	@Excel(name = "应用下载广告数据-激活成本", width = 15)
+    private Integer likeMaterial;
+    /**
+     * 应用下载广告数据-激活成本
+     */
+    @Excel(name = "应用下载广告数据-激活成本", width = 15)
     @ApiModelProperty(value = "应用下载广告数据-激活成本")
     @ApiModelProperty(value = "应用下载广告数据-激活成本")
-	private java.math.BigDecimal activeCost;
-	/**应用下载广告数据-关键行为成本*/
-	@Excel(name = "应用下载广告数据-关键行为成本", width = 15)
+    private java.math.BigDecimal activeCost;
+    /**
+     * 应用下载广告数据-关键行为成本
+     */
+    @Excel(name = "应用下载广告数据-关键行为成本", width = 15)
     @ApiModelProperty(value = "应用下载广告数据-关键行为成本")
     @ApiModelProperty(value = "应用下载广告数据-关键行为成本")
-	private java.math.BigDecimal gameAddictionCost;
-	/**应用下载广告数据-关键行为数*/
-	@Excel(name = "应用下载广告数据-关键行为数", width = 15)
+    private java.math.BigDecimal gameAddictionCost;
+    /**
+     * 应用下载广告数据-关键行为数
+     */
+    @Excel(name = "应用下载广告数据-关键行为数", width = 15)
     @ApiModelProperty(value = "应用下载广告数据-关键行为数")
     @ApiModelProperty(value = "应用下载广告数据-关键行为数")
-	private Integer gameAddiction;
-	/**应用下载广告数据-激活率*/
-	@Excel(name = "应用下载广告数据-激活率", width = 15)
+    private Integer gameAddiction;
+    /**
+     * 应用下载广告数据-激活率
+     */
+    @Excel(name = "应用下载广告数据-激活率", width = 15)
     @ApiModelProperty(value = "应用下载广告数据-激活率")
     @ApiModelProperty(value = "应用下载广告数据-激活率")
-	private java.math.BigDecimal activeRate;
-	/**	应用下载广告数据-关键行为率*/
-	@Excel(name = "	应用下载广告数据-关键行为率", width = 15)
+    private java.math.BigDecimal activeRate;
+    /**
+     * 应用下载广告数据-关键行为率
+     */
+    @Excel(name = "	应用下载广告数据-关键行为率", width = 15)
     @ApiModelProperty(value = "	应用下载广告数据-关键行为率")
     @ApiModelProperty(value = "	应用下载广告数据-关键行为率")
-	private java.math.BigDecimal gameAddictionRate;
-	/**应用下载广告数据-注册率*/
-	@Excel(name = "应用下载广告数据-注册率", width = 15)
+    private java.math.BigDecimal gameAddictionRate;
+    /**
+     * 应用下载广告数据-注册率
+     */
+    @Excel(name = "应用下载广告数据-注册率", width = 15)
     @ApiModelProperty(value = "应用下载广告数据-注册率")
     @ApiModelProperty(value = "应用下载广告数据-注册率")
-	private java.math.BigDecimal activeRegisterRate;
-	/**应用下载广告数据-安卓下载完成成本*/
-	@Excel(name = "应用下载广告数据-安卓下载完成成本", width = 15)
+    private java.math.BigDecimal activeRegisterRate;
+    /**
+     * 应用下载广告数据-安卓下载完成成本
+     */
+    @Excel(name = "应用下载广告数据-安卓下载完成成本", width = 15)
     @ApiModelProperty(value = "应用下载广告数据-安卓下载完成成本")
     @ApiModelProperty(value = "应用下载广告数据-安卓下载完成成本")
-	private java.math.BigDecimal downloadFinishCost;
-	/**应用下载广告数据-注册成本*/
-	@Excel(name = "应用下载广告数据-注册成本", width = 15)
+    private java.math.BigDecimal downloadFinishCost;
+    /**
+     * 应用下载广告数据-注册成本
+     */
+    @Excel(name = "应用下载广告数据-注册成本", width = 15)
     @ApiModelProperty(value = "应用下载广告数据-注册成本")
     @ApiModelProperty(value = "应用下载广告数据-注册成本")
-	private java.math.BigDecimal activeRegisterCost;
-	/**showMaterial*/
-	@Excel(name = "showMaterial", width = 15)
+    private java.math.BigDecimal activeRegisterCost;
+    /**
+     * showMaterial
+     */
+    @Excel(name = "showMaterial", width = 15)
     @ApiModelProperty(value = "showMaterial")
     @ApiModelProperty(value = "showMaterial")
-	private Integer showMaterial;
-	/**转化数据-转化率*/
-	@Excel(name = "转化数据-转化率", width = 15)
+    private Integer showMaterial;
+    /**
+     * 转化数据-转化率
+     */
+    @Excel(name = "转化数据-转化率", width = 15)
     @ApiModelProperty(value = "转化数据-转化率")
     @ApiModelProperty(value = "转化数据-转化率")
-	private java.math.BigDecimal convertRate;
-	/**应用下载广告数据-安卓下载完成率*/
-	@Excel(name = "应用下载广告数据-安卓下载完成率", width = 15)
+    private java.math.BigDecimal convertRate;
+    /**
+     * 应用下载广告数据-安卓下载完成率
+     */
+    @Excel(name = "应用下载广告数据-安卓下载完成率", width = 15)
     @ApiModelProperty(value = "应用下载广告数据-安卓下载完成率")
     @ApiModelProperty(value = "应用下载广告数据-安卓下载完成率")
-	private java.math.BigDecimal downloadFinishRate;
-	/**应用下载广告数据-安卓安装完成率*/
-	@Excel(name = "应用下载广告数据-安卓安装完成率", width = 15)
+    private java.math.BigDecimal downloadFinishRate;
+    /**
+     * 应用下载广告数据-安卓安装完成率
+     */
+    @Excel(name = "应用下载广告数据-安卓安装完成率", width = 15)
     @ApiModelProperty(value = "应用下载广告数据-安卓安装完成率")
     @ApiModelProperty(value = "应用下载广告数据-安卓安装完成率")
-	private java.math.BigDecimal installFinishRate;
-	/**	落地页转化数据-建站卡券领取*/
-	@Excel(name = "	落地页转化数据-建站卡券领取", width = 15)
+    private java.math.BigDecimal installFinishRate;
+    /**
+     * 落地页转化数据-建站卡券领取
+     */
+    @Excel(name = "	落地页转化数据-建站卡券领取", width = 15)
     @ApiModelProperty(value = "	落地页转化数据-建站卡券领取")
     @ApiModelProperty(value = "	落地页转化数据-建站卡券领取")
-	private Integer coupon;
-	/**落地页转化数据-卡券页领取*/
-	@Excel(name = "落地页转化数据-卡券页领取", width = 15)
+    private Integer coupon;
+    /**
+     * 落地页转化数据-卡券页领取
+     */
+    @Excel(name = "落地页转化数据-卡券页领取", width = 15)
     @ApiModelProperty(value = "落地页转化数据-卡券页领取")
     @ApiModelProperty(value = "落地页转化数据-卡券页领取")
-	private Integer couponSinglePage;
-	/**playOver*/
-	@Excel(name = "playOver", width = 15)
+    private Integer couponSinglePage;
+    /**
+     * playOver
+     */
+    @Excel(name = "playOver", width = 15)
     @ApiModelProperty(value = "playOver")
     @ApiModelProperty(value = "playOver")
-	private Integer playOver;
-	/**应用下载广告数据-安卓下载开始成本*/
-	@Excel(name = "应用下载广告数据-安卓下载开始成本", width = 15)
+    private Integer playOver;
+    /**
+     * 应用下载广告数据-安卓下载开始成本
+     */
+    @Excel(name = "应用下载广告数据-安卓下载开始成本", width = 15)
     @ApiModelProperty(value = "应用下载广告数据-安卓下载开始成本")
     @ApiModelProperty(value = "应用下载广告数据-安卓下载开始成本")
-	private java.math.BigDecimal downloadStartCost;
-	/**落地页转化数据-短信咨询*/
-	@Excel(name = "落地页转化数据-短信咨询", width = 15)
+    private java.math.BigDecimal downloadStartCost;
+    /**
+     * 落地页转化数据-短信咨询
+     */
+    @Excel(name = "落地页转化数据-短信咨询", width = 15)
     @ApiModelProperty(value = "落地页转化数据-短信咨询")
     @ApiModelProperty(value = "落地页转化数据-短信咨询")
-	private Integer message;
-	/**视频数据-有效播放率*/
-	@Excel(name = "视频数据-有效播放率", width = 15)
+    private Integer message;
+    /**
+     * 视频数据-有效播放率
+     */
+    @Excel(name = "视频数据-有效播放率", width = 15)
     @ApiModelProperty(value = "视频数据-有效播放率")
     @ApiModelProperty(value = "视频数据-有效播放率")
-	private java.math.BigDecimal validPlayRate;
-	/**视频数据-平均单次播放时长*/
-	@Excel(name = "视频数据-平均单次播放时长", width = 15)
+    private java.math.BigDecimal validPlayRate;
+    /**
+     * 视频数据-平均单次播放时长
+     */
+    @Excel(name = "视频数据-平均单次播放时长", width = 15)
     @ApiModelProperty(value = "视频数据-平均单次播放时长")
     @ApiModelProperty(value = "视频数据-平均单次播放时长")
-	private java.math.BigDecimal averagePlayTimePerPlay;
-	/**转化数据-转化成本*/
-	@Excel(name = "转化数据-转化成本", width = 15)
+    private java.math.BigDecimal averagePlayTimePerPlay;
+    /**
+     * 转化数据-转化成本
+     */
+    @Excel(name = "转化数据-转化成本", width = 15)
     @ApiModelProperty(value = "转化数据-转化成本")
     @ApiModelProperty(value = "转化数据-转化成本")
-	private java.math.BigDecimal convertCost;
-	/**应用下载广告数据-安卓安装完成成本*/
-	@Excel(name = "应用下载广告数据-安卓安装完成成本", width = 15)
+    private java.math.BigDecimal convertCost;
+    /**
+     * 应用下载广告数据-安卓安装完成成本
+     */
+    @Excel(name = "应用下载广告数据-安卓安装完成成本", width = 15)
     @ApiModelProperty(value = "应用下载广告数据-安卓安装完成成本")
     @ApiModelProperty(value = "应用下载广告数据-安卓安装完成成本")
-	private java.math.BigDecimal installFinishCost;
-	/**应用下载广告数据-安卓下载开始率*/
-	@Excel(name = "应用下载广告数据-安卓下载开始率", width = 15)
+    private java.math.BigDecimal installFinishCost;
+    /**
+     * 应用下载广告数据-安卓下载开始率
+     */
+    @Excel(name = "应用下载广告数据-安卓下载开始率", width = 15)
     @ApiModelProperty(value = "应用下载广告数据-安卓下载开始率")
     @ApiModelProperty(value = "应用下载广告数据-安卓下载开始率")
-	private java.math.BigDecimal downloadStartRate;
-	/**createTime*/
+    private java.math.BigDecimal downloadStartRate;
+    /**
+     * createTime
+     */
     @ApiModelProperty(value = "createTime")
     @ApiModelProperty(value = "createTime")
-	private java.util.Date createTime;
-	/**updateTime*/
+    private java.util.Date createTime;
+    /**
+     * updateTime
+     */
     @ApiModelProperty(value = "updateTime")
     @ApiModelProperty(value = "updateTime")
-	private java.util.Date updateTime;
+    private java.util.Date updateTime;
 
 
-	@TableField(exist = false)
+    @TableField(exist = false)
     private Integer clickMaterial;
     private Integer clickMaterial;
 
 
-	@TableField(exist = false)
-	private String materialDesc;
+    @TableField(exist = false)
+    private String materialDesc;
 }
 }

+ 2 - 9
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceReportServiceImpl.java

@@ -771,8 +771,7 @@ public class BytedanceReportServiceImpl implements IBytedanceReportService {
 
 
         JSONObject json = HttpUtils.bytedanceGetRequest(access_token, open_api_domain + path, JSONObject.parseObject(JSONObject.toJSONString(data)));
         JSONObject json = HttpUtils.bytedanceGetRequest(access_token, open_api_domain + path, JSONObject.parseObject(JSONObject.toJSONString(data)));
         if (json == null) {
         if (json == null) {
-            //insertMaterialRetry(accountId, startDate, endDate, -2);
-            log.error("请求有误:" + JSONObject.toJSONString(data));
+            log.error("请求有误:{}", JSONObject.toJSONString(data));
             return -2;
             return -2;
         }
         }
 
 
@@ -909,24 +908,18 @@ public class BytedanceReportServiceImpl implements IBytedanceReportService {
                         bytedanceReportMaterialDailyList.add(daily);
                         bytedanceReportMaterialDailyList.add(daily);
                     }
                     }
                 }
                 }
-                //Long insertStartTime = System.currentTimeMillis();
                 bytedanceReportMaterialDailyMapper.replaceIntoBatch(bytedanceReportMaterialDailyList);
                 bytedanceReportMaterialDailyMapper.replaceIntoBatch(bytedanceReportMaterialDailyList);
-                //Long insertEndTime = System.currentTimeMillis();
                 //log.info("头条获取素材报表插入数据结束,执行耗时:{}秒", (insertEndTime - insertStartTime) / 1000);
                 //log.info("头条获取素材报表插入数据结束,执行耗时:{}秒", (insertEndTime - insertStartTime) / 1000);
                 if (currentPage >= totalPage) {
                 if (currentPage >= totalPage) {
-                    //log.info("accountId:" + accountId + "数据同步完成,开始时间:" + startDate + ",结束时间:"+ endDate);
                     return 1;
                     return 1;
                 } else {
                 } else {
-                    int pageCode = bytedanceMaterialReportByPage(page + 1, pageSize, token, accountId, startDate, endDate);
-                    return pageCode;
+                    return  bytedanceMaterialReportByPage(page + 1, pageSize, token, accountId, startDate, endDate);
                 }
                 }
             } else {
             } else {
-                //returnCode = -1;
                 log.error("服务器返回为空,json:" + JSONObject.toJSONString(data));
                 log.error("服务器返回为空,json:" + JSONObject.toJSONString(data));
                 return -1;
                 return -1;
             }
             }
         } catch (Exception e) {
         } catch (Exception e) {
-            e.printStackTrace();
             log.error("头条报表其他错误,accountId:" + accountId + ",json:" + JSONObject.toJSONString(data));
             log.error("头条报表其他错误,accountId:" + accountId + ",json:" + JSONObject.toJSONString(data));
             returnCode = -3;
             returnCode = -3;
         }
         }

+ 0 - 2
performance-appraisal/src/main/java/cn/com/ctop/uservideomap/controller/UserVideoMapController.java

@@ -16,8 +16,6 @@ import org.jeecg.common.util.oConvertUtils;
 import cn.com.ctop.uservideomap.entity.UserVideoMap;
 import cn.com.ctop.uservideomap.entity.UserVideoMap;
 import cn.com.ctop.uservideomap.service.IUserVideoMapService;
 import cn.com.ctop.uservideomap.service.IUserVideoMapService;
 
 
-import java.util.Date;
-
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

+ 1 - 0
pom.xml

@@ -26,6 +26,7 @@
         <module>jeecg-boot-module-system</module>
         <module>jeecg-boot-module-system</module>
         <module>module-job-bytedance</module>
         <module>module-job-bytedance</module>
         <module>module-job-kuaishou</module>
         <module>module-job-kuaishou</module>
+        <module>feishu-sdk</module>
 
 
     </modules>
     </modules>