Explorar o código

删除无用的log代码,修改头条计划时报定时任务

syh %!s(int64=5) %!d(string=hai) anos
pai
achega
fdc10521be
Modificáronse 25 ficheiros con 187 adicións e 1333 borrados
  1. 90 5
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/TestController.java
  2. 5 3
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/entity/Advertiser.java
  3. 9 54
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/BytedancePlanDailyReportLoadJob.java
  4. 59 31
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/BytedancePlanLoadJob.java
  5. 0 118
      log-server/.mvn/wrapper/MavenWrapperDownloader.java
  6. BIN=BIN
      log-server/.mvn/wrapper/maven-wrapper.jar
  7. 0 2
      log-server/.mvn/wrapper/maven-wrapper.properties
  8. 0 376
      log-server/pom.xml
  9. 0 13
      log-server/src/main/java/cn/com/ctop/logserver/LogServerApplication.java
  10. 0 17
      log-server/src/main/java/cn/com/ctop/logserver/controller/LogController.java
  11. 0 160
      log-server/src/main/resources/application-dev.yml
  12. 0 159
      log-server/src/main/resources/application-prod.yml
  13. 0 161
      log-server/src/main/resources/application-test.yml
  14. 0 15
      log-server/src/main/resources/application.yml
  15. 0 14
      log-server/src/main/resources/banner.txt
  16. 0 4
      log-server/src/main/resources/log4j.properties
  17. 0 57
      log-server/src/main/resources/logback-dev.xml
  18. 0 57
      log-server/src/main/resources/logback-prod.xml
  19. 0 57
      log-server/src/main/resources/logback-test.xml
  20. 0 6
      log-server/src/main/resources/quartz.properties
  21. 0 13
      log-server/src/test/java/cn/com/ctop/logserver/LogServerApplicationTests.java
  22. 12 1
      module-report/src/main/java/cn/com/ctop/bytedance/entity/BytedancePlanHourlyReport.java
  23. 4 4
      module-report/src/main/java/cn/com/ctop/bytedance/service/impl/ReportServiceImpl.java
  24. 4 4
      module-toutiao/src/main/java/cn/com/ctop/toutiao/entity/ByteDanceVideoInfo.java
  25. 4 2
      module-toutiao/src/main/java/cn/com/ctop/toutiao/service/impl/ByteDanceAdvertiserDataServiceImpl.java

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

@@ -13,6 +13,7 @@ import cn.com.ctop.common.module.utils.ResultMapUtils;
 import cn.com.ctop.common.module.utils.StatusCode;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouInterfaceService;
 import cn.com.ctop.kuaishou.modules.graphql.service.IKuaishouWebInterfaceService;
+import cn.com.ctop.toutiao.service.IByteDanceAdvertiserDataService;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import lombok.SneakyThrows;
@@ -23,6 +24,7 @@ import org.jeecg.modules.ctop.service.ICreateInternalService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.concurrent.ExecutorService;
@@ -193,11 +195,6 @@ public class TestController {
         thread.start();
     }
 
-
-
-
-
-
     @GetMapping(value = "/gerCreativeByAccount")
     public void gerCreative(Long accountId) {
         QueryWrapper<CtopOauthToken> oauthTokenQueryWrapper = new QueryWrapper<>();
@@ -259,6 +256,94 @@ public class TestController {
     @Autowired
     private ICtopOauthTokenService tokenService;
 
+    @GetMapping("loadBytedanceData")
+    public Map<String, Object> formatZybData(String date) {
+        Map<String,Object>result = new HashMap<>();
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
+        Date getDate = null;
+        try {
+            getDate = simpleDateFormat.parse(date);
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        //1:查询当日数据
+        List<CtopOauthToken> tokens = tokenService.getTokenListByType(CtopAdConstant.PLATFORM_TYPE_BYTEDANCE);
+        if (null == tokens || tokens.size() <= 0) {
+            log.info("定时获取头条数据异常:为获取到可用的token");
+        }
+        Date finalGetDate = getDate;
+        tokens.forEach(token -> {
+            //3:获取广告计划信息数据
+            reportService.getAdvertiserPlanReport(token, finalGetDate, finalGetDate, CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
+        });
+
+        //清洗关于作业帮数据
+        //1:查询作业帮相关的用户数据
+        QueryWrapper<UserAllocation> wrapper = new QueryWrapper<>();
+        wrapper.eq("project_id",215);
+        List<UserAllocation> allocations = userAllocationService.list(wrapper);
+        if(null!=allocations&&allocations.size()>0){
+            allocations.forEach(allocation->{
+                //根据accountId和时间,查询相关的日报表信息
+                QueryWrapper<BytedancePlanDailyReport> queryWrapper = new QueryWrapper<>();
+                SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
+                String dateString = dateFormat.format(finalGetDate)+" 00:00:00";
+                queryWrapper.eq("advertiser_id",allocation.getAccountId())
+                        .eq("stat_datetime",dateString)
+                ;
+                List<BytedancePlanDailyReport>bytedancePlanDailyReports = planDailyReportService.list(queryWrapper);
+                if(null!=bytedancePlanDailyReports&&bytedancePlanDailyReports.size()>0){
+                    bytedancePlanDailyReports.forEach(report->{
+                        String adName = report.getAdName();
+                        String[] tags = adName.split("-");
+                        report.setAdsense(tags[1]);
+                        report.setPlanCode(tags[2]);
+                        String materialName = tags[3];
+                        report.setMaterialName(materialName);
+                        if (materialName.contains("其他")) {
+                            report.setMaterialType("其他");
+                        } else if (materialName.contains("图片轮播")) {
+                            report.setMaterialType("图片轮播");
+                        } else if (materialName.contains("大字报")) {
+                            report.setMaterialType("大字报");
+                        } else if (materialName.contains("文字动画")) {
+                            report.setMaterialType("文字动画");
+                        } else if (materialName.contains("采访形式")) {
+                            report.setMaterialType("采访形式");
+                        } else if (materialName.contains("剧情")) {
+                            report.setMaterialType("剧情");
+                        } else if (materialName.contains("口播")) {
+                            report.setMaterialType("口播");
+                        }else{
+                            report.setMaterialType("其他");
+                        }
+                        planDailyReportService.updateById(report);
+                    });
+                }
+            });
+        }
+        ResultMapUtils.setResultMap(result,StatusCode.COMMON_SUCCESS);
+        return result;
+    }
+
+    @Autowired
+    private IByteDanceAdvertiserDataService advertiserDataService;
+    @GetMapping("getBytedanceData")
+    public Map<String, Object> getBytedanceData() {
+        Map<String,Object>result = new HashMap<>();
+        //1:查询当日数据
+        List<CtopOauthToken> tokens = tokenService.getTokenListByType(CtopAdConstant.PLATFORM_TYPE_BYTEDANCE);
+        if (null == tokens || tokens.size() <= 0) {
+            log.info("定时获取头条数据异常:为获取到可用的token");
+        }
+        tokens.forEach(token -> {
+            //3:获取广告计划信息数据
+            advertiserDataService.getMaterialList(token);
+        });
+        ResultMapUtils.setResultMap(result,StatusCode.COMMON_SUCCESS);
+        return result;
+    }
+
     @GetMapping("formatZybData")
     public Map<String, Object> formatZybData() {
         //清洗关于作业帮数据

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

@@ -60,6 +60,11 @@ public class Advertiser {
     private Integer advertiserType;
 
     /**
+     * 代理商Id
+     */
+    private Long agentId;
+
+    /**
      * 联系人姓名
      */
     @Excel(name = "联系人姓名", width = 15)
@@ -105,9 +110,6 @@ public class Advertiser {
     @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @ApiModelProperty(value = "修改时间")
     private Date updateTime;
-
-
-
     private String userId;
 
     private String companyId;

+ 9 - 54
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/BytedancePlanDailyReportLoadJob.java

@@ -87,69 +87,24 @@ public class BytedancePlanDailyReportLoadJob implements Job {
                 }
             });
         }
+        formatData(113,getDate);
+        formatData(112,getDate);
+        formatData(222,getDate);
+    }
 
+    private void formatData(Integer projectId,Date getDate){
         //清洗关于缘多多数据
-        //1:查询缘多多相关的用户数据
-        QueryWrapper<UserAllocation> yddWrapper = new QueryWrapper<>();
-        wrapper.eq("project_id",113);
-        List<UserAllocation> yddallocations = userAllocationService.list(wrapper);
-        if(null!=yddallocations&&yddallocations.size()>0){
-            yddallocations.forEach(allocation->{
-                //根据accountId和时间,查询相关的日报表信息
-                QueryWrapper<BytedancePlanDailyReport> queryWrapper = new QueryWrapper<>();
-                SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
-                String dateString = dateFormat.format(getDate)+" 00:00:00";
-                queryWrapper.eq("advertiser_id",allocation.getAccountId())
-                        .eq("stat_datetime",dateString)
-                ;
-                List<BytedancePlanDailyReport>bytedancePlanDailyReports = planDailyReportService.list(queryWrapper);
-                if(null!=bytedancePlanDailyReports&&bytedancePlanDailyReports.size()>0){
-                    bytedancePlanDailyReports.forEach(report->{
-                        String adName = report.getAdName();
-                        String[] tags = adName.split("-");
-                        report.setChannelCode(tags[1]);
-                        planDailyReportService.updateById(report);
-                    });
-                }
-            });
-        }
-
-        //清洗关于缘多多数据
-        //1:查询缘多多相关的用户数据
         QueryWrapper<UserAllocation> dsjyWrapper = new QueryWrapper<>();
-        yddWrapper.eq("project_id", 112);
+        dsjyWrapper.eq("project_id", projectId);
         List<UserAllocation> dsjyAllocations = userAllocationService.list(dsjyWrapper);
         if (null != dsjyAllocations && dsjyAllocations.size() > 0) {
             dsjyAllocations.forEach(allocation -> {
                 //根据accountId和时间,查询相关的日报表信息
+                SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
+                String dateString = dateFormat.format(getDate)+" 00:00:00";
                 QueryWrapper<BytedancePlanDailyReport> queryWrapper = new QueryWrapper<>();
                 queryWrapper.eq("advertiser_id", allocation.getAccountId())
-                //.eq("stat_datetime",dateString)
-                ;
-                List<BytedancePlanDailyReport> bytedancePlanDailyReports = planDailyReportService.list(queryWrapper);
-                if (null != bytedancePlanDailyReports && bytedancePlanDailyReports.size() > 0) {
-                    bytedancePlanDailyReports.forEach(report -> {
-                        String adName = report.getAdName();
-                        String[] tags = adName.split("-");
-                        report.setChannelCode(tags[0]);
-                        planDailyReportService.updateById(report);
-                    });
-                }
-            });
-        }
-
-        //清洗关于附近约会数据
-        //1:查询附近约会相关的用户数据
-        QueryWrapper<UserAllocation> fjyhWrapper = new QueryWrapper<>();
-        yddWrapper.eq("project_id", 222);
-        List<UserAllocation> fjyhAllocations = userAllocationService.list(fjyhWrapper);
-        if (null != fjyhAllocations && fjyhAllocations.size() > 0) {
-            fjyhAllocations.forEach(allocation -> {
-                //根据accountId和时间,查询相关的日报表信息
-                QueryWrapper<BytedancePlanDailyReport> queryWrapper = new QueryWrapper<>();
-                queryWrapper.eq("advertiser_id", allocation.getAccountId())
-                //.eq("stat_datetime",dateString)
-                ;
+                .eq("stat_datetime",dateString);
                 List<BytedancePlanDailyReport> bytedancePlanDailyReports = planDailyReportService.list(queryWrapper);
                 if (null != bytedancePlanDailyReports && bytedancePlanDailyReports.size() > 0) {
                     bytedancePlanDailyReports.forEach(report -> {

+ 59 - 31
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/BytedancePlanLoadJob.java

@@ -1,57 +1,85 @@
 package org.jeecg.modules.ctop.job;
 
+import cn.com.ctop.bytedance.entity.BytedancePlanHourlyReport;
+import cn.com.ctop.bytedance.service.IBytedancePlanHourlyReportService;
+import cn.com.ctop.bytedance.service.IReportService;
 import cn.com.ctop.common.module.entity.CtopOauthToken;
+import cn.com.ctop.common.module.entity.UserAllocation;
 import cn.com.ctop.common.module.service.ICtopOauthTokenService;
+import cn.com.ctop.common.module.service.IUserAllocationService;
 import cn.com.ctop.common.module.utils.CtopAdConstant;
-import cn.com.ctop.toutiao.service.IByteDanceAdvertiserDataService;
-import cn.com.ctop.toutiao.service.IByteDanceCreativeService;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import lombok.extern.slf4j.Slf4j;
+import org.jeecg.common.util.DateUtils;
 import org.quartz.Job;
 import org.quartz.JobExecutionContext;
 import org.quartz.JobExecutionException;
 import org.springframework.beans.factory.annotation.Autowired;
 
+import java.text.SimpleDateFormat;
+import java.util.Date;
 import java.util.List;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
 
 @Slf4j
 public class BytedancePlanLoadJob implements Job {
     @Autowired
     private ICtopOauthTokenService tokenService;
-    static ExecutorService executorService = null;
     @Autowired
-    private IByteDanceAdvertiserDataService advertiserDataService;
+    private IBytedancePlanHourlyReportService planHourlyReportService;
     @Autowired
-    private IByteDanceCreativeService creativeService;
+    private IUserAllocationService userAllocationService;
+    @Autowired
+    private IReportService reportService;
 
     @Override
     public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
+        log.info("头条时报数据获取开始");
+        Date getDate = new Date();
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("HH");
+        String hour = simpleDateFormat.format(getDate);
+        if (null != hour && "00".equals(hour)) {
+            getDate = DateUtils.addDay(getDate, -1);
+        }
+        //1:查询当日计划时报数据
+        List<CtopOauthToken> tokens = tokenService.getTokenListByType(CtopAdConstant.PLATFORM_TYPE_BYTEDANCE);
+        Date finalGetDate = getDate;
+        tokens.forEach(token -> {
+            //1:获取当日广告计划数据
+            reportService.getAdvertiserPlanReport(token, finalGetDate, finalGetDate, CtopAdConstant.BYTEDANCE_REPORT_TYPE_HOURLY);
+        });
+        //清洗关于缘多多数据
+        formatData(113,finalGetDate);
+        //清洗关于交友数据
+        formatData(112,finalGetDate);
+        //清洗关于附近约会数据
+        formatData(222,finalGetDate);
 
-        Thread thread = new Thread() {
-            @Override
-            public void run() {
-                //1:查询当日数据
-                List<CtopOauthToken> tokens = tokenService.getTokenListByType(CtopAdConstant.PLATFORM_TYPE_BYTEDANCE);
-                executorService = Executors.newFixedThreadPool(4);
-                tokens.forEach(token -> {
-                    executorService.submit(new Runnable() {
-                        @Override
-                        public void run() {
-                            try {
-                                //1:获取当日广告计划数据
-                                advertiserDataService.getAdvertiserPlan(token, "", null, null);
-                            } catch (Exception e) {
-                                e.printStackTrace();
-                            } finally {
-                            }
-                        }
-                    });
-                });
-                log.info("头条全量计划数据获取完成");
-            }
+        log.info("头条全量计划数据获取完成");
+    }
 
-        };
-        thread.start();
+    private void formatData(Integer projectId,Date finalGetDate){
+        QueryWrapper<UserAllocation> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq("project_id", projectId);
+        List<UserAllocation> fjyhAllocations = userAllocationService.list(queryWrapper);
+        if (null != fjyhAllocations && fjyhAllocations.size() > 0) {
+            fjyhAllocations.forEach(allocation -> {
+                //根据accountId和时间,查询相关的时报报表信息
+                QueryWrapper<BytedancePlanHourlyReport> accountWrapper = new QueryWrapper<>();
+                SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
+                String dateString = dateFormat.format(finalGetDate);
+                accountWrapper.eq("advertiser_id", allocation.getAccountId())
+                        .eq("stat_datetime",dateString)
+                ;
+                List<BytedancePlanHourlyReport> bytedancePlanHourlyReports = planHourlyReportService.list(accountWrapper);
+                if (null != bytedancePlanHourlyReports && bytedancePlanHourlyReports.size() > 0) {
+                    bytedancePlanHourlyReports.forEach(report -> {
+                        String adName = report.getAdName();
+                        String[] tags = adName.split("-");
+                        report.setChannelCode(tags[0]);
+                        planHourlyReportService.updateById(report);
+                    });
+                }
+            });
+        }
     }
 }

+ 0 - 118
log-server/.mvn/wrapper/MavenWrapperDownloader.java

@@ -1,118 +0,0 @@
-/*
- * Copyright 2007-present the original author or authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import java.net.*;
-import java.io.*;
-import java.nio.channels.*;
-import java.util.Properties;
-
-public class MavenWrapperDownloader {
-
-    private static final String WRAPPER_VERSION = "0.5.6";
-    /**
-     * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
-     */
-    private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
-            + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
-
-    /**
-     * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
-     * use instead of the default one.
-     */
-    private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
-            ".mvn/wrapper/maven-wrapper.properties";
-
-    /**
-     * Path where the maven-wrapper.jar will be saved to.
-     */
-    private static final String MAVEN_WRAPPER_JAR_PATH =
-            ".mvn/wrapper/maven-wrapper.jar";
-
-    /**
-     * Name of the property which should be used to override the default download url for the wrapper.
-     */
-    private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
-
-    public static void main(String args[]) {
-        System.out.println("- Downloader started");
-        File baseDirectory = new File(args[0]);
-        System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
-
-        // If the maven-wrapper.properties exists, read it and check if it contains a custom
-        // wrapperUrl parameter.
-        File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
-        String url = DEFAULT_DOWNLOAD_URL;
-        if (mavenWrapperPropertyFile.exists()) {
-            FileInputStream mavenWrapperPropertyFileInputStream = null;
-            try {
-                mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
-                Properties mavenWrapperProperties = new Properties();
-                mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
-                url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
-            } catch (IOException e) {
-                System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
-            } finally {
-                try {
-                    if (mavenWrapperPropertyFileInputStream != null) {
-                        mavenWrapperPropertyFileInputStream.close();
-                    }
-                } catch (IOException e) {
-                    // Ignore ...
-                }
-            }
-        }
-        System.out.println("- Downloading from: " + url);
-
-        File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
-        if (!outputFile.getParentFile().exists()) {
-            if (!outputFile.getParentFile().mkdirs()) {
-                System.out.println(
-                        "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
-            }
-        }
-        System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
-        try {
-            downloadFileFromURL(url, outputFile);
-            System.out.println("Done");
-            System.exit(0);
-        } catch (Throwable e) {
-            System.out.println("- Error downloading");
-            e.printStackTrace();
-            System.exit(1);
-        }
-    }
-
-    private static void downloadFileFromURL(String urlString, File destination) throws Exception {
-        if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
-            String username = System.getenv("MVNW_USERNAME");
-            char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
-            Authenticator.setDefault(new Authenticator() {
-                @Override
-                protected PasswordAuthentication getPasswordAuthentication() {
-                    return new PasswordAuthentication(username, password);
-                }
-            });
-        }
-        URL website = new URL(urlString);
-        ReadableByteChannel rbc;
-        rbc = Channels.newChannel(website.openStream());
-        FileOutputStream fos = new FileOutputStream(destination);
-        fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
-        fos.close();
-        rbc.close();
-    }
-
-}

BIN=BIN
log-server/.mvn/wrapper/maven-wrapper.jar


+ 0 - 2
log-server/.mvn/wrapper/maven-wrapper.properties

@@ -1,2 +0,0 @@
-distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
-wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar

+ 0 - 376
log-server/pom.xml

@@ -1,376 +0,0 @@
-<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>org.springframework.boot</groupId>
-        <artifactId>spring-boot-starter-parent</artifactId>
-        <version>2.2.2.RELEASE</version>
-        <relativePath/>
-    </parent>
-    <groupId>cn.com.ctop</groupId>
-    <artifactId>log-server</artifactId>
-    <version>0.0.1-SNAPSHOT</version>
-    <name>log-server</name>
-    <description>Demo project for Spring Boot</description>
-
-    <properties>
-        <java.version>1.8</java.version>
-        <spring-cloud.version>Hoxton.SR1</spring-cloud.version>
-        <jeecgboot.common.version>2.0.2</jeecgboot.common.version>
-        <java.version>1.8</java.version>
-        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <mybatis-plus.version>3.0.6</mybatis-plus.version>
-        <druid.version>1.1.10</druid.version>
-        <commons.version>2.6</commons.version>
-        <aliyun-java-sdk-core.version>3.5.0</aliyun-java-sdk-core.version>
-        <aliyun-java-sdk-dysmsapi.version>1.0.0</aliyun-java-sdk-dysmsapi.version>
-    </properties>
-
-    <dependencies>
-
-        <!--集成springmvc框架并实现自动配置 -->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-web</artifactId>
-            <exclusions>
-                <exclusion>
-                    <groupId>ch.qos.logback</groupId>
-                    <artifactId>logback-classic</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-mail</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-test</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-aop</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-actuator</artifactId>
-        </dependency>
-        <!-- <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-devtools</artifactId>
-            <optional>true</optional>
-        </dependency> -->
-
-        <!-- commons -->
-        <dependency>
-            <groupId>commons-io</groupId>
-            <artifactId>commons-io</artifactId>
-            <version>${commons.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>commons-lang</groupId>
-            <artifactId>commons-lang</artifactId>
-            <version>${commons.version}</version>
-        </dependency>
-
-        <!-- freemarker -->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-freemarker</artifactId>
-        </dependency>
-
-        <!-- Lombok -->
-        <dependency>
-            <groupId>org.projectlombok</groupId>
-            <artifactId>lombok</artifactId>
-        </dependency>
-
-        <!-- mybatis-plus -->
-        <dependency>
-            <groupId>com.baomidou</groupId>
-            <artifactId>mybatis-plus-boot-starter</artifactId>
-            <version>${mybatis-plus.version}</version>
-        </dependency>
-
-        <!-- druid -->
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>druid-spring-boot-starter</artifactId>
-            <version>${druid.version}</version>
-        </dependency>
-
-        <!-- 动态数据源 -->
-        <dependency>
-            <groupId>com.baomidou</groupId>
-            <artifactId>dynamic-datasource-spring-boot-starter</artifactId>
-            <version>2.5.4</version>
-        </dependency>
-
-        <!-- json -->
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>fastjson</artifactId>
-            <version>1.2.56</version>
-        </dependency>
-
-        <!--mysql-->
-        <dependency>
-            <groupId>mysql</groupId>
-            <artifactId>mysql-connector-java</artifactId>
-            <version>5.1.47</version>
-            <scope>runtime</scope>
-        </dependency>
-        <!--sqlserver-->
-        <dependency>
-            <groupId>net.sourceforge.jtds</groupId>
-            <artifactId>jtds</artifactId>
-            <version>1.3.1</version>
-            <scope>runtime</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.microsoft.sqlserver</groupId>
-            <artifactId>mssql-jdbc</artifactId>
-            <version>7.2.1.jre8</version>
-            <scope>runtime</scope>
-        </dependency>
-
-        <!-- Quartz定时任务 -->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-quartz</artifactId>
-        </dependency>
-
-        <!--JWT-->
-        <dependency>
-            <groupId>com.auth0</groupId>
-            <artifactId>java-jwt</artifactId>
-            <version>3.7.0</version>
-        </dependency>
-
-        <!--shiro-->
-        <dependency>
-            <groupId>org.apache.shiro</groupId>
-            <artifactId>shiro-spring-boot-starter</artifactId>
-            <version>1.4.0</version>
-        </dependency>
-
-        <!-- Swagger API文档 -->
-        <dependency>
-            <groupId>io.springfox</groupId>
-            <artifactId>springfox-swagger2</artifactId>
-            <version>2.9.2</version>
-        </dependency>
-        <dependency>
-            <groupId>io.springfox</groupId>
-            <artifactId>springfox-swagger-ui</artifactId>
-            <version>2.9.2</version>
-        </dependency>
-        <dependency>
-            <groupId>com.github.xiaoymin</groupId>
-            <artifactId>swagger-bootstrap-ui</artifactId>
-            <version>1.9.3</version>
-        </dependency>
-        <dependency>
-            <groupId>io.springfox</groupId>
-            <artifactId>springfox-bean-validators</artifactId>
-            <version>2.9.2</version>
-        </dependency>
-
-
-        <!-- Redis -->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-data-redis</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.commons</groupId>
-            <artifactId>commons-pool2</artifactId>
-        </dependency>
-
-        <!-- 代码生成器 -->
-
-        <!-- AutoPoi Excel工具类-->
-        <dependency>
-            <groupId>org.jeecgframework</groupId>
-            <artifactId>autopoi-web</artifactId>
-            <version>1.0.3</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>commons-codec</groupId>
-                    <artifactId>commons-codec</artifactId>
-                </exclusion>
-            </exclusions>
-        </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>com.squareup.retrofit2</groupId>
-            <artifactId>retrofit</artifactId>
-            <version>2.6.0</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.pdfbox</groupId>
-            <artifactId>fontbox</artifactId>
-            <version>2.0.15</version>
-        </dependency>
-        <dependency>
-            <groupId>org.seleniumhq.selenium</groupId>
-            <artifactId>selenium-java</artifactId>
-            <version>3.141.59</version>
-        </dependency>
-        <dependency>
-            <groupId>org.seleniumhq.selenium</groupId>
-            <artifactId>selenium-firefox-driver</artifactId>
-            <version>3.141.59</version>
-        </dependency>
-        <dependency>
-            <groupId>org.json</groupId>
-            <artifactId>json</artifactId>
-            <version>LATEST</version>
-        </dependency>
-        <dependency>
-            <groupId>com.google.guava</groupId>
-            <artifactId>guava</artifactId>
-            <version>25.0-jre</version>
-        </dependency>
-        <dependency>
-            <groupId>com.github.binarywang</groupId>
-            <artifactId>weixin-java-cp</artifactId>
-            <version>3.6.0</version>
-        </dependency>
-        <dependency>
-            <groupId>us.codecraft</groupId>
-            <artifactId>webmagic-core</artifactId>
-            <version>0.7.3</version>
-        </dependency>
-        <dependency>
-            <groupId>us.codecraft</groupId>
-            <artifactId>webmagic-extension</artifactId>
-            <version>0.7.3</version>
-        </dependency>
-        <dependency>
-            <groupId>net.sourceforge.htmlunit</groupId>
-            <artifactId>htmlunit</artifactId>
-            <version>2.36.0</version>
-        </dependency>
-        <dependency>
-            <groupId>io.appium</groupId>
-            <artifactId>java-client</artifactId>
-            <version>7.2.0</version>
-        </dependency>
-        <dependency>
-            <groupId>commons-codec</groupId>
-            <artifactId>commons-codec</artifactId>
-            <version>1.11</version>
-        </dependency>
-
-        <dependency>
-            <groupId>cn.hutool</groupId>
-            <artifactId>hutool-all</artifactId>
-            <version>4.5.11</version>
-        </dependency>
-
-        <!-- 阿里云短信 -->
-        <dependency>
-            <groupId>com.aliyun</groupId>
-            <artifactId>aliyun-java-sdk-dysmsapi</artifactId>
-            <version>${aliyun-java-sdk-dysmsapi.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.aliyun</groupId>
-            <artifactId>aliyun-java-sdk-core</artifactId>
-            <version>${aliyun-java-sdk-core.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.aliyun.oss</groupId>
-            <artifactId>aliyun-sdk-oss</artifactId>
-            <version>2.8.3</version>
-        </dependency>
-        <dependency>
-            <groupId>com.aliyun</groupId>
-            <artifactId>aliyun-java-sdk-mts</artifactId>
-            <version>2.5.2</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.cloud</groupId>
-            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-test</artifactId>
-            <scope>test</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.junit.vintage</groupId>
-                    <artifactId>junit-vintage-engine</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-    </dependencies>
-
-    <dependencyManagement>
-        <dependencies>
-            <dependency>
-                <groupId>org.jeecgframework.boot</groupId>
-                <artifactId>jeecg-boot-base-common</artifactId>
-                <version>${jeecgboot.common.version}</version>
-            </dependency>
-
-            <dependency>
-                <groupId>org.springframework.cloud</groupId>
-                <artifactId>spring-cloud-dependencies</artifactId>
-                <version>${spring-cloud.version}</version>
-                <type>pom</type>
-                <scope>import</scope>
-            </dependency>
-        </dependencies>
-    </dependencyManagement>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-            </plugin>
-        </plugins>
-    </build>
-
-    <profiles>
-        <profile>
-            <id>dev</id>
-            <properties>
-                <!-- 环境标识,需要与配置文件的名称相对应 -->
-                <activatedProperties>dev</activatedProperties>
-            </properties>
-            <activation>
-                <!-- 默认环境 -->
-                <activeByDefault>true</activeByDefault>
-            </activation>
-        </profile>
-        <profile>
-            <id>test</id>
-            <properties>
-                <activatedProperties>test</activatedProperties>
-            </properties>
-        </profile>
-        <profile>
-            <id>prod</id>
-            <properties>
-                <activatedProperties>prod</activatedProperties>
-            </properties>
-        </profile>
-    </profiles>
-</project>

+ 0 - 13
log-server/src/main/java/cn/com/ctop/logserver/LogServerApplication.java

@@ -1,13 +0,0 @@
-package cn.com.ctop.logserver;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
-
-@SpringBootApplication
-@EnableEurekaClient
-public class LogServerApplication {
-    public static void main(String[] args) {
-        SpringApplication.run(LogServerApplication.class, args);
-    }
-}

+ 0 - 17
log-server/src/main/java/cn/com/ctop/logserver/controller/LogController.java

@@ -1,17 +0,0 @@
-package cn.com.ctop.logserver.controller;
-
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-@RestController
-public class LogController {
-    @Value("${server.port}")
-    String port;
-
-    @GetMapping("hi")
-    public String home(@RequestParam(value = "name", defaultValue = "forezp") String name) {
-        return "hi " + name + " ,i am from port:" + port;
-    }
-}

+ 0 - 160
log-server/src/main/resources/application-dev.yml

@@ -1,160 +0,0 @@
-server:
-  port: 8080
-  servlet:
-    context-path: /jeecg-boot
-    compression:
-      enabled: true
-      mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
-
-management:
-  endpoints:
-    web:
-      exposure:
-        include: metrics,httptrace
-
-spring:
-  rabbitmq:
-    host: 39.106.184.70
-    port: 5672
-    username: guest
-    password: guest
-  servlet:
-    multipart:
-      max-file-size: -1
-      max-request-size: -1
-  mail:
-    host: smtp.163.com
-    username: jeecgos@163.com
-    password: ??
-    properties:
-      mail:
-        smtp:
-          auth: true
-          starttls:
-            enable: true
-            required: true
-  ## quartz定时任务,采用数据库方式
-  quartz:
-    job-store-type: jdbc
-  #json 时间戳统一转换
-  jackson:
-    date-format:   yyyy-MM-dd HH:mm:ss
-    time-zone:   GMT+8
-  aop:
-    proxy-target-class: true
-  #配置freemarker
-  freemarker:
-    # 设置模板后缀名
-    suffix: .ftl
-    # 设置文档类型
-    content-type: text/html
-    # 设置页面编码格式
-    charset: UTF-8
-    # 设置页面缓存
-    cache: false
-    prefer-file-system-access: false
-    # 设置ftl文件路径
-    template-loader-path:
-      - classpath:/templates
-  # 设置静态文件路径,js,css等
-  mvc:
-    static-path-pattern: /**
-  resource:
-    static-locations: classpath:/static/,classpath:/public/
-  autoconfigure:
-    exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
-  datasource:
-    druid:
-      stat-view-servlet:
-        enabled: true
-        loginUsername: admin
-        loginPassword: 123456
-      web-stat-filter:
-        enabled: true
-    dynamic:
-      druid: # 全局druid参数,绝大部分值和默认保持一致。(现已支持的参数如下,不清楚含义不要乱设置)
-        # 连接池的配置信息
-        # 初始化大小,最小,最大
-        connection-init-sql: set names utf8mb4
-
-        initial-size: 5
-        min-idle: 5
-        maxActive: 20
-        # 配置获取连接等待超时的时间
-        maxWait: 60000
-        # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
-        timeBetweenEvictionRunsMillis: 60000
-        # 配置一个连接在池中最小生存的时间,单位是毫秒
-        minEvictableIdleTimeMillis: 300000
-        validationQuery: SELECT 1 FROM DUAL
-        testWhileIdle: true
-        testOnBorrow: false
-        testOnReturn: false
-        # 打开PSCache,并且指定每个连接上PSCache的大小
-        poolPreparedStatements: true
-        maxPoolPreparedStatementPerConnectionSize: 20
-        # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
-        filters: stat,wall,slf4j
-        # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
-        connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
-      datasource:
-        master:
-          url: jdbc:mysql://39.106.184.70:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
-          username: root
-          password: hcst2019
-          driver-class-name: com.mysql.jdbc.Driver
-          # 多数据源配置
-          #multi-datasource1:
-          #url: jdbc:mysql://localhost:3306/jeecg-boot2?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true
-          #username: root
-          #password: root
-          #driver-class-name: com.mysql.jdbc.Driver
-  #redis 配置
-  redis:
-    database: 0
-    host: 127.0.0.1
-    lettuce:
-      pool:
-        max-active: 8   #最大连接数据库连接数,设 0 为没有限制
-        max-idle: 8     #最大等待连接中的数量,设 0 为没有限制
-        max-wait: -1ms  #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
-        min-idle: 0     #最小等待连接中的数量,设 0 为没有限制
-      shutdown-timeout: 100ms
-    password: ''
-    port: 6379
-#mybatis plus 设置
-mybatis-plus:
-  mapper-locations: classpath*:org/jeecg/modules/**/xml/*Mapper.xml,classpath*:cn/com/ctop/**/xml/*Mapper.xml
-  global-config:
-    # 关闭MP3.0自带的banner
-    banner: false
-    db-config:
-      #主键类型  0:"数据库ID自增",1:"该类型为未设置主键类型", 2:"用户输入ID",3:"全局唯一ID (数字类型唯一ID)", 4:"全局唯一ID UUID",5:"字符串全局唯一ID (idWorker 的字符串表示)";
-      id-type: 4
-      # 默认数据库表下划线命名
-      table-underline: true
-    configuration:
-      # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
-      log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
-#jeecg专用配置
-jeecg:
-  path:
-    #文件上传根目录 设置
-    upload: D://upFiles
-    #webapp文件路径
-    webapp: D://webapp
-    video-upload: D://upFiles//video//
-    image-upload: D://upFiles//image//
-    chrome-driver: D://chromedriver.exe
-    csv-upload: D://upFiles//csv//
-kuaishou:
-  group-control:
-    path: http://39.106.184.70
-    port: 4723
-logging:
-  level:
-    root: info
-  config: classpath:logback-dev.xml
-chrome:
-  script:
-    clean: sh /mnt/webapp/cleanProcess.sh

+ 0 - 159
log-server/src/main/resources/application-prod.yml

@@ -1,159 +0,0 @@
-server:
-  port: 8080
-  servlet:
-    context-path: /jeecg-boot
-    compression:
-      enabled: true
-      mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
-
-management:
-  endpoints:
-    web:
-      exposure:
-        include: metrics,httptrace
-
-
-spring:
-  rabbitmq:
-    host: 39.106.184.70
-    port: 5672
-    username: guest
-    password: guest
-  servlet:
-    multipart:
-      max-file-size: -1
-      max-request-size: -1
-  mail:
-    host: smtp.163.com
-    username: jeecgos@163.com
-    password: ??
-    properties:
-      mail:
-        smtp:
-          auth: true
-          starttls:
-            enable: true
-            required: true
-  ## quartz定时任务,采用数据库方式
-  quartz:
-    job-store-type: jdbc
-  #json 时间戳统一转换
-  jackson:
-    date-format:   yyyy-MM-dd HH:mm:ss
-    time-zone:   GMT+8
-  aop:
-    proxy-target-class: true
-  #配置freemarker
-  freemarker:
-    # 设置模板后缀名
-    suffix: .ftl
-    # 设置文档类型
-    content-type: text/html
-    # 设置页面编码格式
-    charset: UTF-8
-    # 设置页面缓存
-    cache: false
-    prefer-file-system-access: false
-    # 设置ftl文件路径
-    template-loader-path:
-      - classpath:/templates
-  # 设置静态文件路径,js,css等
-  mvc:
-    static-path-pattern: /**
-  resource:
-    static-locations: classpath:/static/,classpath:/public/
-  autoconfigure:
-    exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
-  datasource:
-    druid:
-      stat-view-servlet:
-        loginUsername: admin
-        loginPassword: hcst2016
-        enabled: true
-      web-stat-filter:
-        enabled: true
-    #      remove-abandoned: false
-    dynamic:
-      druid: # 全局druid参数,绝大部分值和默认保持一致。(现已支持的参数如下,不清楚含义不要乱设置)
-        # 连接池的配置信息
-        # 初始化大小,最小,最大
-        connection-init-sql: set names utf8mb4
-        initial-size: 5
-        min-idle: 5
-        maxActive: 20
-        # 配置获取连接等待超时的时间
-        maxWait: 60000
-        # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
-        timeBetweenEvictionRunsMillis: 60000
-        # 配置一个连接在池中最小生存的时间,单位是毫秒
-        minEvictableIdleTimeMillis: 300000
-        validationQuery: SELECT 1 FROM DUAL
-        testWhileIdle: true
-        testOnBorrow: false
-        testOnReturn: false
-        # 打开PSCache,并且指定每个连接上PSCache的大小
-        poolPreparedStatements: true
-        maxPoolPreparedStatementPerConnectionSize: 20
-        # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
-        filters: stat,wall,slf4j
-        # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
-        connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
-      datasource:
-        master:
-          url: jdbc:mysql://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
-          username: hcst
-          password: test@20190531
-          driver-class-name: com.mysql.jdbc.Driver
-          # 多数据源配置
-          #multi-datasource1:
-          #url: jdbc:mysql://localhost:3306/jeecg-boot2?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true
-          #username: root
-          #password: root
-          #driver-class-name: com.mysql.jdbc.Driver
-  #redis 配置
-  redis:
-    database: 0
-    host: 127.0.0.1
-    lettuce:
-      pool:
-        max-active: 8   #最大连接数据库连接数,设 0 为没有限制
-        max-idle: 8     #最大等待连接中的数量,设 0 为没有限制
-        max-wait: -1ms  #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
-        min-idle: 0     #最小等待连接中的数量,设 0 为没有限制
-      shutdown-timeout: 100ms
-    password: ''
-    port: 6379
-#mybatis plus 设置
-mybatis-plus:
-  mapper-locations: classpath*:org/jeecg/modules/**/xml/*Mapper.xml,classpath*:cn/com/ctop/**/xml/*Mapper.xml
-  global-config:
-    # 关闭MP3.0自带的banner
-    banner: false
-    db-config:
-      #主键类型  0:"数据库ID自增",1:"该类型为未设置主键类型", 2:"用户输入ID",3:"全局唯一ID (数字类型唯一ID)", 4:"全局唯一ID UUID",5:"字符串全局唯一ID (idWorker 的字符串表示)";
-      id-type: 4
-      # 默认数据库表下划线命名
-      table-underline: true
-#jeecg专用配置
-jeecg:
-  path:
-    #文件上传根目录 设置
-    upload: /mnt/upload
-    #webapp文件路径
-    webapp: /mnt/webapp
-    video-upload: /mnt/upload/video/
-    image-upload: /mnt/upload/image/
-    chrome-driver: /usr/bin/chromedriver
-    csv-upload: /mnt/upload/csv/
-kuaishou:
-  group-control:
-    path: http://39.106.184.70
-    port: 4723
-logging:
-  level:
-    root: info
-  config: classpath:logback-prod.xml
-chrome:
-  script:
-    clean: sh /mnt/webapp/cleanProcess.sh
-

+ 0 - 161
log-server/src/main/resources/application-test.yml

@@ -1,161 +0,0 @@
-server:
-  port: 8080
-  servlet:
-    context-path: /jeecg-boot
-    compression:
-      enabled: true
-      mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
-
-management:
-  endpoints:
-    web:
-      exposure:
-        include: metrics,httptrace
-
-spring:
-  rabbitmq:
-    host: 127.0.0.1
-    port: 5672
-    username: guest
-    password: guest
-  servlet:
-    multipart:
-      max-file-size: -1
-      max-request-size: -1
-  mail:
-    host: smtp.163.com
-    username: jeecgos@163.com
-    password: ??
-    properties:
-      mail:
-        smtp:
-          auth: true
-          starttls:
-            enable: true
-            required: true
-  ## quartz定时任务,采用数据库方式
-  quartz:
-    job-store-type: jdbc
-  #json 时间戳统一转换
-  jackson:
-    date-format:   yyyy-MM-dd HH:mm:ss
-    time-zone:   GMT+8
-  aop:
-    proxy-target-class: true
-  #配置freemarker
-  freemarker:
-    # 设置模板后缀名
-    suffix: .ftl
-    # 设置文档类型
-    content-type: text/html
-    # 设置页面编码格式
-    charset: UTF-8
-    # 设置页面缓存
-    cache: false
-    prefer-file-system-access: false
-    # 设置ftl文件路径
-    template-loader-path:
-      - classpath:/templates
-  # 设置静态文件路径,js,css等
-  mvc:
-    static-path-pattern: /**
-  resource:
-    static-locations: classpath:/static/,classpath:/public/
-  autoconfigure:
-    exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
-  datasource:
-    druid:
-      stat-view-servlet:
-        enabled: true
-        loginUsername: admin
-        loginPassword: 123456
-      web-stat-filter:
-        enabled: true
-    dynamic:
-      druid: # 全局druid参数,绝大部分值和默认保持一致。(现已支持的参数如下,不清楚含义不要乱设置)
-        # 连接池的配置信息
-        # 初始化大小,最小,最大
-        connection-init-sql: set names utf8mb4
-
-        initial-size: 5
-        min-idle: 5
-        maxActive: 20
-        # 配置获取连接等待超时的时间
-        maxWait: 60000
-        # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
-        timeBetweenEvictionRunsMillis: 60000
-        # 配置一个连接在池中最小生存的时间,单位是毫秒
-        minEvictableIdleTimeMillis: 300000
-        validationQuery: SELECT 1 FROM DUAL
-        testWhileIdle: true
-        testOnBorrow: false
-        testOnReturn: false
-        # 打开PSCache,并且指定每个连接上PSCache的大小
-        poolPreparedStatements: true
-        maxPoolPreparedStatementPerConnectionSize: 20
-        # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
-        filters: stat,wall,slf4j
-        # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
-        connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
-      datasource:
-        master:
-          url: jdbc:mysql://39.106.184.70:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
-          username: root
-          password: hcst2019
-          driver-class-name: com.mysql.jdbc.Driver
-          # 多数据源配置
-          #multi-datasource1:
-          #url: jdbc:mysql://localhost:3306/jeecg-boot2?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true
-          #username: root
-          #password: root
-          #driver-class-name: com.mysql.jdbc.Driver
-  #redis 配置
-  redis:
-    database: 0
-    host: 127.0.0.1
-    lettuce:
-      pool:
-        max-active: 8   #最大连接数据库连接数,设 0 为没有限制
-        max-idle: 8     #最大等待连接中的数量,设 0 为没有限制
-        max-wait: -1ms  #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
-        min-idle: 0     #最小等待连接中的数量,设 0 为没有限制
-      shutdown-timeout: 100ms
-    password: ''
-    port: 6379
-#mybatis plus 设置
-mybatis-plus:
-  mapper-locations: classpath*:org/jeecg/modules/**/xml/*Mapper.xml,classpath*:cn/com/ctop/**/xml/*Mapper.xml
-  global-config:
-    # 关闭MP3.0自带的banner
-    banner: false
-    db-config:
-      #主键类型  0:"数据库ID自增",1:"该类型为未设置主键类型", 2:"用户输入ID",3:"全局唯一ID (数字类型唯一ID)", 4:"全局唯一ID UUID",5:"字符串全局唯一ID (idWorker 的字符串表示)";
-      id-type: 4
-      # 默认数据库表下划线命名
-      table-underline: true
-    configuration:
-      # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
-      log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
-#jeecg专用配置
-jeecg:
-  path:
-    #文件上传根目录 设置
-    #文件上传根目录 设置
-    upload: /data/upload
-    #webapp文件路径
-    webapp: /data/webapp
-    video-upload: /data/upload/video/
-    image-upload: /data/upload/image/
-    chrome-driver: /usr/bin/chromedriver
-    csv-upload: /data/upload/csv/
-kuaishou:
-  group-control:
-    path: http://127.0.0.1
-    port: 4723
-logging:
-  level:
-    root: info
-  config: classpath:logback-test.xml
-chrome:
-  script:
-    clean: sh /mnt/webapp/cleanProcess.sh

+ 0 - 15
log-server/src/main/resources/application.yml

@@ -1,15 +0,0 @@
-spring:
-  profiles:
-    active: @activatedProperties@
-  application:
-    name: system-web
-eureka:
-  client:
-    serviceUrl:
-      defaultZone: http://localhost:8761/eureka/
-swagger:
-  production: false
-  basic:
-    enable: true
-    username: jeecg
-    password: jeecg1314

+ 0 - 14
log-server/src/main/resources/banner.txt

@@ -1,14 +0,0 @@
-
-${AnsiColor.BRIGHT_BLUE}
-   (_)                          | |               | |
-    _  ___  ___  ___ __ _ ______| |__   ___   ___ | |_ 
-   | |/ _ \/ _ \/ __/ _` |______| '_ \ / _ \ / _ \| __|
-   | |  __/  __/ (_| (_| |      | |_) | (_) | (_) | |_ 
-   | |\___|\___|\___\__, |      |_.__/ \___/ \___/ \__|
-  _/ |               __/ |                             
- |__/               |___/
-
-${AnsiColor.BRIGHT_GREEN}
-Jeecg  Boot Version: 2.0.2
-Spring Boot Version: ${spring-boot.version}${spring-boot.formatted-version}
-${AnsiColor.BLACK}

+ 0 - 4
log-server/src/main/resources/log4j.properties

@@ -1,4 +0,0 @@
-log4j.rootLogger=INFO,stdout
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS}-[%p] [%t] %-5l - %m%n

+ 0 - 57
log-server/src/main/resources/logback-dev.xml

@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<configuration scan="true" scanPeriod="10 seconds">
-
-    <contextName>logback</contextName>
-
-
-    <!-- 格式化输出:%date表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度 %msg:日志消息,%n是换行符-->
-    <property name="LOG_PATTERN" value="%date{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"/>
-
-    <!-- 定义日志存储的路径,不要配置相对路径 -->
-    <property name="FILE_PATH" value="D:/Desktop/log/spring-log.%d{yyyy-MM-dd}.%i.log"/>
-
-    <!-- 控制台输出日志 -->
-    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
-        <!-- 日志级别过滤INFO以下 -->
-        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
-            <level>INFO</level>
-        </filter>
-        <encoder>
-            <!-- 按照上面配置的LOG_PATTERN来打印日志 -->
-            <pattern>${LOG_PATTERN}</pattern>
-        </encoder>
-    </appender>
-
-    <!--每天生成一个日志文件,保存30天的日志文件。rollingFile用来切分文件的 -->
-    <appender name="rollingFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
-
-        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
-
-            <fileNamePattern>${FILE_PATH}</fileNamePattern>
-
-            <!-- keep 15 days' worth of history -->
-            <maxHistory>30</maxHistory>
-
-            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
-                <!-- 日志文件的最大大小 -->
-                <maxFileSize>2MB</maxFileSize>
-            </timeBasedFileNamingAndTriggeringPolicy>
-
-            <!-- 超出删除老文件 -->
-            <totalSizeCap>1GB</totalSizeCap>
-        </rollingPolicy>
-
-        <encoder>
-            <pattern>${LOG_PATTERN}</pattern>
-        </encoder>
-    </appender>
-
-    <!-- project default level -->
-    <logger name="net.sh.rgface.serive" level="ERROR"/>
-
-    <!-- 日志输出级别 -->
-    <root level="INFO">
-        <appender-ref ref="console"/>
-        <appender-ref ref="rollingFile"/>
-    </root>
-</configuration>

+ 0 - 57
log-server/src/main/resources/logback-prod.xml

@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<configuration scan="true" scanPeriod="10 seconds">
-
-    <contextName>logback</contextName>
-
-
-    <!-- 格式化输出:%date表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度 %msg:日志消息,%n是换行符-->
-    <property name="LOG_PATTERN" value="%date{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"/>
-
-    <!-- 定义日志存储的路径,不要配置相对路径 -->
-    <property name="FILE_PATH" value="/mnt/webapps/logs/spring-log.%d{yyyy-MM-dd}.%i.log"/>
-
-    <!-- 控制台输出日志 -->
-    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
-        <!-- 日志级别过滤INFO以下 -->
-        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
-            <level>INFO</level>
-        </filter>
-        <encoder>
-            <!-- 按照上面配置的LOG_PATTERN来打印日志 -->
-            <pattern>${LOG_PATTERN}</pattern>
-        </encoder>
-    </appender>
-
-    <!--每天生成一个日志文件,保存30天的日志文件。rollingFile用来切分文件的 -->
-    <appender name="rollingFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
-
-        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
-
-            <fileNamePattern>${FILE_PATH}</fileNamePattern>
-
-            <!-- keep 15 days' worth of history -->
-            <maxHistory>30</maxHistory>
-
-            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
-                <!-- 日志文件的最大大小 -->
-                <maxFileSize>2MB</maxFileSize>
-            </timeBasedFileNamingAndTriggeringPolicy>
-
-            <!-- 超出删除老文件 -->
-            <totalSizeCap>1GB</totalSizeCap>
-        </rollingPolicy>
-
-        <encoder>
-            <pattern>${LOG_PATTERN}</pattern>
-        </encoder>
-    </appender>
-
-    <!-- project default level -->
-    <logger name="net.sh.rgface.serive" level="ERROR"/>
-
-    <!-- 日志输出级别 -->
-    <root level="INFO">
-        <appender-ref ref="console"/>
-        <appender-ref ref="rollingFile"/>
-    </root>
-</configuration>

+ 0 - 57
log-server/src/main/resources/logback-test.xml

@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<configuration scan="true" scanPeriod="10 seconds">
-
-    <contextName>logback</contextName>
-
-
-    <!-- 格式化输出:%date表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度 %msg:日志消息,%n是换行符-->
-    <property name="LOG_PATTERN" value="%date{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n"/>
-
-    <!-- 定义日志存储的路径,不要配置相对路径 -->
-    <property name="FILE_PATH" value="/data/webapp/log/spring-log.%d{yyyy-MM-dd}.%i.log"/>
-
-    <!-- 控制台输出日志 -->
-    <appender name="console" class="ch.qos.logback.core.ConsoleAppender">
-        <!-- 日志级别过滤INFO以下 -->
-        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
-            <level>INFO</level>
-        </filter>
-        <encoder>
-            <!-- 按照上面配置的LOG_PATTERN来打印日志 -->
-            <pattern>${LOG_PATTERN}</pattern>
-        </encoder>
-    </appender>
-
-    <!--每天生成一个日志文件,保存30天的日志文件。rollingFile用来切分文件的 -->
-    <appender name="rollingFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
-
-        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
-
-            <fileNamePattern>${FILE_PATH}</fileNamePattern>
-
-            <!-- keep 15 days' worth of history -->
-            <maxHistory>30</maxHistory>
-
-            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
-                <!-- 日志文件的最大大小 -->
-                <maxFileSize>2MB</maxFileSize>
-            </timeBasedFileNamingAndTriggeringPolicy>
-
-            <!-- 超出删除老文件 -->
-            <totalSizeCap>1GB</totalSizeCap>
-        </rollingPolicy>
-
-        <encoder>
-            <pattern>${LOG_PATTERN}</pattern>
-        </encoder>
-    </appender>
-
-    <!-- project default level -->
-    <logger name="net.sh.rgface.serive" level="ERROR"/>
-
-    <!-- 日志输出级别 -->
-    <root level="INFO">
-        <appender-ref ref="console"/>
-        <appender-ref ref="rollingFile"/>
-    </root>
-</configuration>

+ 0 - 6
log-server/src/main/resources/quartz.properties

@@ -1,6 +0,0 @@
-org.quartz.threadPool.class=org.quartz.simpl.SimpleThreadPool
-org.quartz.threadPool.threadCount=20
-org.quartz.threadPool.threadPriority=5
-org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread=true
-org.quartz.jobStore.misfireThreshold=60000
-org.quartz.jobStore.class=org.quartz.simpl.RAMJobStore

+ 0 - 13
log-server/src/test/java/cn/com/ctop/logserver/LogServerApplicationTests.java

@@ -1,13 +0,0 @@
-package cn.com.ctop.logserver;
-
-import org.junit.jupiter.api.Test;
-import org.springframework.boot.test.context.SpringBootTest;
-
-@SpringBootTest
-class LogServerApplicationTests {
-
-    @Test
-    void contextLoads() {
-    }
-
-}

+ 12 - 1
module-report/src/main/java/cn/com/ctop/bytedance/entity/BytedancePlanHourlyReport.java

@@ -8,9 +8,11 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
+import org.jeecg.common.util.DateUtils;
 import org.jeecgframework.poi.excel.annotation.Excel;
 
 import java.math.BigDecimal;
+import java.text.ParseException;
 import java.util.Date;
 
 /**
@@ -44,6 +46,8 @@ public class BytedancePlanHourlyReport {
     @Excel(name = "数据起始时间", width = 15)
     @ApiModelProperty(value = "数据起始时间")
     private String statDatetime;
+
+    private Integer statHour;
     /**
      * 展示量
      */
@@ -391,6 +395,8 @@ public class BytedancePlanHourlyReport {
     @ApiModelProperty(value = "updateTime")
     private Date updateTime;
 
+    private String channelCode;
+
     public BytedancePlanHourlyReport(JSONObject data, Long setAdvertiserId) {
         Long playFeedBreak75 = data.getLong("play_75_feed_break");
         if (null != playFeedBreak75) {
@@ -434,7 +440,12 @@ public class BytedancePlanHourlyReport {
         }
         String statDatetime = data.getString("stat_datetime");
         if (null != statDatetime && !"".equals(statDatetime.trim())) {
-            this.statDatetime = statDatetime;
+            try {
+                this.statDatetime = DateUtils.getDateByDateStr(statDatetime);
+                this.statHour = DateUtils.getHour(statDatetime);
+            } catch (ParseException e) {
+                e.printStackTrace();
+            }
         }
         Long shopping = data.getLong("shopping");
         if (null != shopping) {

+ 4 - 4
module-report/src/main/java/cn/com/ctop/bytedance/service/impl/ReportServiceImpl.java

@@ -236,7 +236,7 @@ public class ReportServiceImpl implements IReportService {
         }
         var dataArray = getObject.getJSONObject("data").getJSONArray("list");
         if (null == dataArray || dataArray.size() <= 0) {
-            log.info("广告计划报表信息为空=》accountId:{}", token.getAccountId());
+            log.info("广告计划报表获取完成=》accountId:{}", token.getAccountId());
             return;
         }
         for (var i = 0; i < dataArray.size(); i++) {
@@ -819,7 +819,7 @@ public class ReportServiceImpl implements IReportService {
      */
     public JSONObject getCreativeStat(CtopOauthToken token, JSONObject conditions) {
         // 请求地址
-        String url = PropertiesUtils.getConfig("bytedance_api_url") + PropertiesUtils.getConfig("bytedance_v2_ad_creative_get");
+        String url = PropertiesUtils.getValue("bytedance_config", "bytedance_api_url") + PropertiesUtils.getValue("bytedance_config", "bytedance_v2_ad_creative_get");
         JSONArray groupBy = new JSONArray();
         groupBy.add("STAT_GROUP_BY_FIELD_ID");
         groupBy.add("STAT_GROUP_BY_FIELD_STAT_TIME");
@@ -836,7 +836,7 @@ public class ReportServiceImpl implements IReportService {
      */
     private JSONObject getAdStat(CtopOauthToken token, JSONObject conditions) {
         // 请求地址
-        String url = PropertiesUtils.getConfig("bytedance_api_url") + PropertiesUtils.getConfig("bytedance_v2_ad_report_get");
+        String url = PropertiesUtils.getValue("bytedance_config", "bytedance_api_url") + PropertiesUtils.getValue("bytedance_config", "bytedance_v2_ad_report_get");
         JSONArray groupBy = new JSONArray();
         groupBy.add("STAT_GROUP_BY_FIELD_ID");
         groupBy.add("STAT_GROUP_BY_FIELD_STAT_TIME");
@@ -853,7 +853,7 @@ public class ReportServiceImpl implements IReportService {
      */
     public JSONObject getCampaignStat(CtopOauthToken token, JSONObject conditions) {
         // 请求地址
-        String url = PropertiesUtils.getConfig("bytedance_api_url") + PropertiesUtils.getConfig("bytedance_v2_campaign_report_get");
+        String url = PropertiesUtils.getValue("bytedance_config", "bytedance_api_url") + PropertiesUtils.getValue("bytedance_config", "bytedance_v2_campaign_report_get");
         JSONArray groupBy = new JSONArray();
         groupBy.add("STAT_GROUP_BY_FIELD_ID");
         groupBy.add("STAT_GROUP_BY_FIELD_STAT_TIME");

+ 4 - 4
module-toutiao/src/main/java/cn/com/ctop/toutiao/entity/ByteDanceVideoInfo.java

@@ -102,15 +102,15 @@ public class ByteDanceVideoInfo {
     private Date updateTime;
 
     public ByteDanceVideoInfo(JSONObject data, CtopOauthToken token) {
-        this.id = data.getString("video_id");
-        this.fileId = id;
+        this.id = data.getString("id");
+        this.fileId = data.getString("video_id");
         this.accountId = token.getAccountId();
         this.advertiserId = token.getAdvertiserId();
         this.width = data.getInteger("width");
-        this.height = data.getInteger("width");
+        this.height = data.getInteger("height");
         this.size = data.getLong("size");
         this.duration = data.getDouble("duration");
-        this.videoUrl = data.getString("video_url");
+        this.videoUrl = "https://aweme.snssdk.com/aweme/v1/playwm/?video_id="+data.getString("id")+"&line=0";
         this.signature = data.getString("signature");
         this.status = 1;
         Date now = new Date();

+ 4 - 2
module-toutiao/src/main/java/cn/com/ctop/toutiao/service/impl/ByteDanceAdvertiserDataServiceImpl.java

@@ -806,7 +806,7 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
 
     @Override
     public void getMaterialList(CtopOauthToken token) {
-        getAdImageByPage(token, "", 1);
+//        getAdImageByPage(token, "", 1);
         getVideoByPage(token, "", 1);
     }
 
@@ -832,6 +832,7 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
         }
 
         JSONObject resultObject = HttpUtils.bytedanceGetRequest(token.getAccessToken(), url, param);
+        System.out.println(resultObject);
         Integer code = resultObject.getInteger("code");
         if (null == code || !code.equals(0)) {
             log.error("获取视频素材库接口异常==》accountId:{},message:{}", token.getAccountId(), resultObject.getString("message"));
@@ -839,7 +840,7 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
         }
         JSONArray data = resultObject.getJSONObject("data").getJSONArray("list");
         if (null == data || data.size() <= 0) {
-            log.info("获取视频素材信息不存在==》accountId:{},message:{}", token.getAccountId(), resultObject.getString("message"));
+            log.info("获取视频素材完成==》accountId:{},message:{}", token.getAccountId(), resultObject.getString("message"));
             return;
         }
         for (int i = 0; i < data.size(); i++) {
@@ -871,6 +872,7 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
         }
 
         JSONObject resultObject = HttpUtils.bytedanceGetRequest(token.getAccessToken(), url, param);
+        System.out.println(resultObject.toJSONString());
         Integer code = resultObject.getInteger("code");
         if (null == code || !code.equals(0)) {
             log.error("获取图片素材库接口异常==》accountId:{},message:{}", token.getAccountId(), resultObject.getString("message"));