Browse Source

修改代码层级结构

syh 4 years ago
parent
commit
5cf6c778e2
100 changed files with 0 additions and 8973 deletions
  1. 0 115
      xxl-job-executor-samples/.mvn/wrapper/MavenWrapperDownloader.java
  2. BIN
      xxl-job-executor-samples/.mvn/wrapper/maven-wrapper.jar
  3. 0 2
      xxl-job-executor-samples/.mvn/wrapper/maven-wrapper.properties
  4. 0 17
      xxl-job-executor-samples/pom.xml
  5. 0 11
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/Dockerfile
  6. 0 171
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/pom.xml
  7. 0 23
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/XxlJobExecutorApplication.java
  8. 0 56
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/KuaiShouAdvertiserBaseInfo.java
  9. 0 65
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/KuaiShouCampaign.java
  10. 0 53
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/KuaiShouCampaignDayBudget.java
  11. 0 158
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/KuaiShouCreative.java
  12. 0 82
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/KuaiShouDailyFlows.java
  13. 0 59
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/KuaiShouDailyReportTask.java
  14. 0 129
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/KuaiShouGroup.java
  15. 0 136
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/KuaiShouGroupTarget.java
  16. 0 61
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/KuaiShouHistoryReportTask.java
  17. 0 66
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/KuaiShouImageGet.java
  18. 0 51
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/KuaiShouVideoGet.java
  19. 0 43
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/KuaishouOperationRecord.java
  20. 0 113
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/KuaishouProgramCreative.java
  21. 0 35
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/vo/ConvertVo.java
  22. 0 25
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/vo/KuaiShouReportDailyMaterialVo.java
  23. 0 107
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/vo/KuaiShouVideoGetVo.java
  24. 0 33
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/vo/SpendVo.java
  25. 0 13
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/vo/VideoGetvo.java
  26. 0 15
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/BatchMapper.java
  27. 0 15
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/KuaiShouAdvertiserBaseInfoMapper.java
  28. 0 14
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/KuaiShouCampaignDayBudgetMapper.java
  29. 0 20
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/KuaiShouCampaignMapper.java
  30. 0 25
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/KuaiShouCreativeMapper.java
  31. 0 15
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/KuaiShouDailyFlowsMapper.java
  32. 0 15
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/KuaiShouDailyReportTaskMapper.java
  33. 0 25
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/KuaiShouGroupMapper.java
  34. 0 19
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/KuaiShouGroupTargetMapper.java
  35. 0 15
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/KuaiShouHistoryReportTaskMapper.java
  36. 0 22
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/KuaiShouImageGetMapper.java
  37. 0 32
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/KuaiShouReportDailyMaterialMapper.java
  38. 0 22
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/KuaiShouVideoGetMapper.java
  39. 0 40
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/KuaishouOperationRecordMapper.java
  40. 0 16
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/KuaishouProgramCreativeMapper.java
  41. 0 10
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/MaterialRefuseMapper.java
  42. 0 55
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/xml/BatchMapper.xml
  43. 0 5
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/xml/KuaiShouAdvertiserBaseInfoMapper.xml
  44. 0 5
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/xml/KuaiShouCampaignDayBudgetMapper.xml
  45. 0 44
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/xml/KuaiShouCampaignMapper.xml
  46. 0 130
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/xml/KuaiShouCreativeMapper.xml
  47. 0 5
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/xml/KuaiShouDailyFlowsMapper.xml
  48. 0 5
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/xml/KuaiShouDailyReportTaskMapper.xml
  49. 0 115
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/xml/KuaiShouGroupMapper.xml
  50. 0 70
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/xml/KuaiShouGroupTargetMapper.xml
  51. 0 5
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/xml/KuaiShouHistoryReportTaskMapper.xml
  52. 0 50
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/xml/KuaiShouImageGetMapper.xml
  53. 0 321
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/xml/KuaiShouReportDailyMaterialMapper.xml
  54. 0 60
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/xml/KuaiShouVideoGetMapper.xml
  55. 0 392
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/xml/KuaishouOperationRecordMapper.xml
  56. 0 5
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/xml/KuaishouProgramCreativeMapper.xml
  57. 0 26
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/xml/MateriaRefuseMapper.xml
  58. 0 20
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/IKuaiShouAdvertiserBaseInfoService.java
  59. 0 14
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/IKuaiShouCampaignDayBudgetService.java
  60. 0 20
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/IKuaiShouCampaignService.java
  61. 0 19
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/IKuaiShouCommentService.java
  62. 0 45
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/IKuaiShouCreativeService.java
  63. 0 15
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/IKuaiShouDailyFlowsService.java
  64. 0 18
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/IKuaiShouDailyReportTaskService.java
  65. 0 19
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/IKuaiShouGroupService.java
  66. 0 15
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/IKuaiShouGroupTargetService.java
  67. 0 21
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/IKuaiShouHistoryReportTaskService.java
  68. 0 18
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/IKuaiShouImageGetService.java
  69. 0 9
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/IKuaiShouMaterialUploadService.java
  70. 0 14
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/IKuaiShouReportDailyMaterialService.java
  71. 0 22
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/IKuaiShouVideoGetService.java
  72. 0 337
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/IKuaishouInterfaceService.java
  73. 0 21
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/IKuaishouProgramCreativeService.java
  74. 0 9
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/IKuaishouRealTimeDataService.java
  75. 0 103
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/impl/IKuaiShouCommentServiceImpl.java
  76. 0 52
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/impl/KuaiShouAdvertiserBaseInfoServiceImpl.java
  77. 0 18
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/impl/KuaiShouCampaignDayBudgetServiceImpl.java
  78. 0 63
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/impl/KuaiShouCampaignServiceImpl.java
  79. 0 189
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/impl/KuaiShouCreativeServiceImpl.java
  80. 0 19
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/impl/KuaiShouDailyFlowsServiceImpl.java
  81. 0 177
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/impl/KuaiShouDailyReportTaskServiceImpl.java
  82. 0 398
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/impl/KuaiShouGroupServiceImpl.java
  83. 0 19
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/impl/KuaiShouGroupTargetServiceImpl.java
  84. 0 366
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/impl/KuaiShouHistoryReportTaskServiceImpl.java
  85. 0 41
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/impl/KuaiShouImageGetServiceImpl.java
  86. 0 216
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/impl/KuaiShouMaterialUploadServiceImpl.java
  87. 0 90
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/impl/KuaiShouReportDailyMaterialServiceImpl.java
  88. 0 123
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/impl/KuaiShouVideoGetServiceImpl.java
  89. 0 2196
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/impl/KuaishouInterfaceServiceImpl.java
  90. 0 250
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/impl/KuaishouProgramCreativeServiceImpl.java
  91. 0 110
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/impl/KuaishouRealTimeDataServiceImpl.java
  92. 0 142
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/common/entity/CtopOauthToken.java
  93. 0 52
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/common/entity/MaterialCutFrame.java
  94. 0 48
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/common/entity/MaterialCutFrameTask.java
  95. 0 157
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/common/entity/MaterialInfo.java
  96. 0 74
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/common/entity/OauthAgentToken.java
  97. 0 115
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/common/entity/UserAllocation.java
  98. 0 59
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/common/mapper/CtopOauthTokenMapper.java
  99. 0 23
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/common/mapper/MaterialCutFrameMapper.java
  100. 0 0
      xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/common/mapper/MaterialCutFrameTaskMapper.java

+ 0 - 115
xxl-job-executor-samples/.mvn/wrapper/MavenWrapperDownloader.java

@@ -1,115 +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.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
xxl-job-executor-samples/.mvn/wrapper/maven-wrapper.jar


+ 0 - 2
xxl-job-executor-samples/.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 - 17
xxl-job-executor-samples/pom.xml

@@ -1,17 +0,0 @@
-<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>
-    <parent>
-        <groupId>com.xuxueli</groupId>
-        <artifactId>xxl-job</artifactId>
-        <version>2.3.0-SNAPSHOT</version>
-    </parent>
-    <artifactId>xxl-job-executor-samples</artifactId>
-    <packaging>pom</packaging>
-
-    <modules>
-        <module>xxl-job-executor-sample-springboot</module>
-    </modules>
-
-</project>

+ 0 - 11
xxl-job-executor-samples/xxl-job-executor-sample-springboot/Dockerfile

@@ -1,11 +0,0 @@
-FROM openjdk:8-jre-slim
-MAINTAINER xuxueli
-
-ENV PARAMS=""
-
-ENV TZ=PRC
-RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
-
-ADD target/xxl-job-executor-sample-springboot-*.jar /app.jar
-
-ENTRYPOINT ["sh","-c","java -jar $JAVA_OPTS /app.jar $PARAMS"]

+ 0 - 171
xxl-job-executor-samples/xxl-job-executor-sample-springboot/pom.xml

@@ -1,171 +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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-    <parent>
-        <groupId>com.xuxueli</groupId>
-        <artifactId>xxl-job-executor-samples</artifactId>
-        <version>2.3.0-SNAPSHOT</version>
-    </parent>
-    <artifactId>xxl-job-executor-sample-springboot</artifactId>
-    <packaging>jar</packaging>
-
-    <name>${project.artifactId}</name>
-    <description>Example executor project for spring boot.</description>
-    <url>https://www.xuxueli.com/</url>
-
-    <properties>
-        <mybatis-plus.version>3.1.2</mybatis-plus.version>
-        <druid.version>1.1.10</druid.version>
-    </properties>
-
-    <dependencyManagement>
-        <dependencies>
-            <dependency>
-                <!-- Import dependency management from Spring Boot (依赖管理:继承一些默认的依赖,工程需要依赖的jar包的管理,申明其他dependency的时候就不需要version) -->
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-starter-parent</artifactId>
-                <version>${spring-boot.version}</version>
-                <type>pom</type>
-                <scope>import</scope>
-            </dependency>
-        </dependencies>
-    </dependencyManagement>
-
-    <dependencies>
-        <!-- spring-boot-starter-web (spring-webmvc + tomcat) -->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-web</artifactId>
-        </dependency>
-        <!--mysql-->
-        <dependency>
-            <groupId>mysql</groupId>
-            <artifactId>mysql-connector-java</artifactId>
-            <version>5.1.47</version>
-            <scope>runtime</scope>
-        </dependency>
-
-        <!-- mybatis-plus -->
-        <dependency>
-            <groupId>com.baomidou</groupId>
-            <artifactId>mybatis-plus-boot-starter</artifactId>
-            <version>${mybatis-plus.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.baomidou</groupId>
-            <artifactId>mybatis-plus-extension</artifactId>
-            <version>${mybatis-plus.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>com.baomidou</groupId>
-            <artifactId>mybatis-plus-annotation</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>
-        <!-- fastjson-->
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>fastjson</artifactId>
-            <version>1.2.56</version>
-        </dependency>
-        <!-- Lombok -->
-        <dependency>
-            <groupId>org.projectlombok</groupId>
-            <artifactId>lombok</artifactId>
-        </dependency>
-        <!-- httpclient-->
-        <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.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-mail</artifactId>
-        </dependency>
-
-        <!-- xxl-job-core -->
-        <dependency>
-            <groupId>com.xuxueli</groupId>
-            <artifactId>xxl-job-core</artifactId>
-            <version>${project.parent.version}</version>
-        </dependency>
-
-        <dependency>
-            <groupId>com.tencentcloudapi</groupId>
-            <artifactId>tencentcloud-sdk-java</artifactId>
-            <version>3.1.62</version><!-- 注:这里只是示例版本号,请获取并替换为 最新的版本号 -->
-        </dependency>
-        <dependency>
-            <groupId>com.qcloud</groupId>
-            <artifactId>cos_api</artifactId>
-            <version>5.6.25</version>
-        </dependency>
-
-        <dependency>
-            <groupId>dom4j</groupId>
-            <artifactId>dom4j</artifactId>
-            <version>1.6.1</version>
-        </dependency>
-
-    </dependencies>
-
-    <build>
-        <resources>
-            <resource>
-                <!-- xml放在java目录下-->
-                <directory>src/main/java</directory>
-                <includes>
-                    <include>**/*.xml</include>
-                    <include>**/*.properties</include>
-                </includes>
-            </resource>
-            <!--指定资源的位置(xml放在resources下,可以不用指定)-->
-            <resource>
-                <directory>src/main/resources</directory>
-            </resource>
-        </resources>
-        <plugins>
-            <!-- spring-boot-maven-plugin (提供了直接运行项目的插件:如果是通过parent方式继承spring-boot-starter-parent则不用此插件) -->
-            <plugin>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-maven-plugin</artifactId>
-                <version>${spring-boot.version}</version>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>repackage</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-
-
-</project>

+ 0 - 23
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/XxlJobExecutorApplication.java

@@ -1,23 +0,0 @@
-package com.xxl.job.executor;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.ComponentScan;
-import org.springframework.web.client.RestTemplate;
-
-/**
- * @author xuxueli 2018-10-28 00:38:13
- */
-@SpringBootApplication
-@ComponentScan("com.xxl")
-public class XxlJobExecutorApplication {
-	public static void main(String[] args) {
-        SpringApplication.run(XxlJobExecutorApplication.class, args);
-	}
-	@Bean
-	public RestTemplate restTemplate() {
-		return new RestTemplate();
-	}
-
-}

+ 0 - 56
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/KuaiShouAdvertiserBaseInfo.java

@@ -1,56 +0,0 @@
-package com.xxl.job.executor.batch.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.util.Date;
-
-/**
- * 快手-广告主基本信息
- *
- * @author jeecg-boot
- * @version V1.0
- * @date 2019-09-18
- */
-@Data
-@TableName("ctop_kuaishou_advertiser_base_info")
-public class KuaiShouAdvertiserBaseInfo {
-
-    /**
-     * id
-     */
-    @TableId(type = IdType.AUTO)
-    private Long id;
-    /**
-     * 账户ID
-     */
-    private Long accountId;
-    /**
-     * 账号快手id
-     */
-    private String userId;
-    /**
-     * 公司名称
-     */
-    private String corporationName;
-    /**
-     * 快手昵称
-     */
-    private String userName;
-    /**
-     * 创建时间
-     */
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date createTime;
-    /**
-     * 修改时间
-     */
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date updateTime;
-}

+ 0 - 65
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/KuaiShouCampaign.java

@@ -1,65 +0,0 @@
-package com.xxl.job.executor.batch.entity;
-
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-
-import java.util.Date;
-
-/**
- * @Description: 快手-获取广告计划信息
- * @Author: jeecg-boot
- * @Date: 2019-07-23
- * @Version: V1.0
- */
-@Data
-@TableName("ctop_kuaishou_campaign")
-public class KuaiShouCampaign {
-
-    /**
-     * id
-     */
-    @TableId
-    private String id;
-    /**
-     * 账户ID
-     */
-    private Long accountId;
-    /**
-     * 计划ID
-     */
-    private Long campaignId;
-    /**
-     * 计划名称
-     */
-    private String campaignName;
-    /**
-     * 状态
-     */
-    private Integer status;
-
-
-    /**
-     * 广告计划类型
-     */
-    private Integer campaignType;
-
-    /**
-     * 创建渠道
-     */
-    private Integer createChannel;
-
-    /**
-     * 投放状态
-     */
-    private Integer putStatus;
-    /**
-     * 每日预算
-     */
-    private Long dayBudget;
-    private String dayBudgetSchedule;
-    private String putCreateTime;
-    private String putUpdateTime;
-    private Date createTime;
-    private Date updateTime;
-}

+ 0 - 53
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/KuaiShouCampaignDayBudget.java

@@ -1,53 +0,0 @@
-package com.xxl.job.executor.batch.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-
-import java.util.Date;
-
-/**
- * @Description: 快手-修改广告计划记录表
- * @Author: jeecg-boot
- * @Date: 2019-09-11
- * @Version: V1.0
- */
-@Data
-@TableName("ctop_kuaishou_campaign_day_budget")
-public class KuaiShouCampaignDayBudget {
-
-    /**
-     * id
-     */
-    @TableId(type = IdType.AUTO)
-    private Long id;
-    /**
-     * 账户ID
-     */
-    private Long accountId;
-    /**
-     * 计划ID
-     */
-    private Long campaignId;
-    /**
-     * 修改前预算
-     */
-    private Long dayBudget;
-    /**
-     * 修改后预算
-     */
-    private Long updateDayBudget;
-    /**
-     * 操作人id
-     */
-    private String userId;
-    /**
-     * 创建时间
-     */
-    private Date createTime;
-    /**
-     * 修改时间
-     */
-    private Date updateTime;
-}

+ 0 - 158
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/KuaiShouCreative.java

@@ -1,158 +0,0 @@
-package com.xxl.job.executor.batch.entity;
-
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-
-import java.util.Date;
-
-/**
- * @Description: 快手-创意信息
- * @Author: jeecg-boot
- * @Date: 2019-07-23
- * @Version: V1.0
- */
-@Data
-@TableName("ctop_kuaishou_creative")
-public class KuaiShouCreative {
-
-    /**
-     * id
-     */
-    @TableId
-    private String id;
-
-    /**
-     * 账户ID
-     */
-    private Long accountId;
-    /**
-     * 广告计划ID
-     */
-    private Long campaignId;
-    /**
-     * 广告组ID
-     */
-    private Long unitId;
-    /**
-     * 广告创意ID
-     */
-    private Long creativeId;
-
-    /**
-     * 素材类型
-     */
-    private Integer creativeMaterialType;
-
-    /**
-     * 广告创意名称
-     */
-    private String creativeName;
-    /**
-     * 单图创意ur
-     */
-    private String materialUrl;
-    /**
-     * 单图创意image_token
-     */
-    private String imageTokens;
-    /**
-     * 视频作品ID
-     */
-    private String photoId;
-    /**
-     * 广告创意状态
-     */
-    private Integer status;
-    /**
-     * 投放状态 1:投放中;2:暂停
-     */
-    private Integer putStatus;
-    /**
-     * 创建渠道  0:投放后台创建;1:Marketing API创建
-     */
-    private Integer createChannel;
-    /**
-     * 审核拒绝理由
-     */
-    private String reviewDetail;
-    /**
-     * 封面URL
-     */
-    private String coverUrl;
-    /**
-     * 视频封面token  若创意使用系统自动生成的首帧图片作为封面,该token无法复用
-     */
-    private String imageToken;
-    /**
-     * 封面图宽度
-     */
-    private String coverWidth;
-    /**
-     * 封面图高度
-     */
-    private String coverHeight;
-    /**
-     * 动态词包原始封面图片URL
-     */
-    private String overlayBgUrl;
-    /**
-     * 动态词包原始封面图片token
-     */
-    private String overlayBgImageToken;
-    /**
-     * stickerTitle
-     */
-    private String stickerTitle;
-    /**
-     * 贴纸样式类型
-     */
-    private String overlayType;
-    /**
-     * 广告语
-     */
-    private String description;
-    /**
-     * 行动号召按钮文案
-     */
-    private String actionBarText;
-    /**
-     * 点击测试链接
-     */
-    private String clickTrackUrl;
-    /**
-     * 第三方开始播放监测链接
-     */
-    private String impressionUrl;
-    /**
-     * 第三方有效播放监测链接
-     */
-    private String adPhotoPlayedT3sUrl; // 第三方有效播放监测链接
-    private String shortSlogan;
-    private String actionbarClickUrl; // 第三方点击按钮监测链接
-    /**
-     * 创建时间
-     */
-    private Date createTime;
-    /**
-     * 修改时间
-     */
-    private Date updateTime;
-
-    private Integer firstFrameType;
-
-    private Date creativeCreateTime;
-
-    private Date creativeUpdateTime;
-
-    private Long siteId;
-
-    private String programmedCreativeMaterial;
-
-
-    private String photoIds;
-
-    private Integer creativeCategory;
-    private String creativeTag;
-
-}

+ 0 - 82
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/KuaiShouDailyFlows.java

@@ -1,82 +0,0 @@
-package com.xxl.job.executor.batch.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-
-import java.util.Date;
-
-/**
- * 快手-日流水信息
- *
- * @author jeecg-boot
- * @version V1.0
- * @date 2019-12-05
- */
-@Data
-@TableName("ctop_kuaishou_daily_flows")
-public class KuaiShouDailyFlows {
-
-    /**
-     * id
-     */
-    @TableId(type = IdType.AUTO)
-    private Long id;
-    /**
-     * 账户ID
-     */
-    private Long accountId;
-    /**
-     * 账户ID
-     */
-    private String date;
-    /**
-     * 总花费(元)
-     */
-    private java.math.BigDecimal dailyCharge;
-    /**
-     * 充值话费(元)
-     */
-    private java.math.BigDecimal realCharged;
-    /**
-     * 框返花费(元)
-     */
-    private java.math.BigDecimal contractRebateRealCharged;
-    /**
-     * 激励花费(元)
-     */
-    private java.math.BigDecimal directRebateRealCharged;
-    /**
-     * 转入(元)
-     */
-    private java.math.BigDecimal dailyTransferIn;
-    /**
-     * 转出(元)
-     */
-    private java.math.BigDecimal dailyTransferOut;
-    /**
-     * 日终结余(元)
-     */
-    private java.math.BigDecimal balance;
-    /**
-     * 充值转入(元)
-     */
-    private java.math.BigDecimal realRecharged;
-    /**
-     * 框返转入(元)
-     */
-    private java.math.BigDecimal contractRebateRealRecharged;
-    /**
-     * 激励转入(元)
-     */
-    private java.math.BigDecimal directRebateRealRecharged;
-    /**
-     * 创建时间
-     */
-    private Date createTime;
-    /**
-     * 修改时间
-     */
-    private Date updateTime;
-}

+ 0 - 59
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/KuaiShouDailyReportTask.java

@@ -1,59 +0,0 @@
-package com.xxl.job.executor.batch.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-
-import java.util.Date;
-
-/**
- * 分天记录表
- *
- * @author jeecg-boot
- * @version V1.0
- * @date 2020-03-12
- */
-@Data
-@TableName("ctop_kuaishou_daily_report_task")
-public class KuaiShouDailyReportTask {
-
-    /**
-     * 主键ID
-     */
-    @TableId(type = IdType.AUTO)
-    private Long id;
-    /**
-     * 广告账户ID(相当于头条返回的access_token数据中的advertiser_id)
-     */
-    private Long accountId;
-    /**
-     * 任务id
-     */
-    private String taskId;
-    /**
-     * 任务名称
-     */
-    private String taskName;
-    /**
-     * 0:新建,1:处理中,2:处理成功,3:处理失败,4:数据已下载 5:文件生成 本地下载失败
-     */
-    private Integer taskStatus;
-    /**
-     * 1:账户维度查询,2:  广告计划维度查询,3:广告组维度查询,4:广告创意维度查询
-     */
-    private Integer viewType;
-    /**
-     * 任务查询数据起始时间
-     */
-    private String statDate;
-
-    /**
-     * 创建时间
-     */
-    private Date createTime;
-    /**
-     * 修改时间
-     */
-    private Date updateTime;
-}

+ 0 - 129
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/KuaiShouGroup.java

@@ -1,129 +0,0 @@
-package com.xxl.job.executor.batch.entity;
-
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-
-import java.util.Date;
-
-/**
- * @Description: 广告组信息
- * @Author: jeecg-boot
- * @Date: 2019-07-23
- * @Version: V1.0
- */
-@Data
-@TableName("ctop_kuaishou_group")
-public class KuaiShouGroup {
-
-    /**
-     * id
-     */
-    @TableId
-    private String id;
-    /**
-     * 账户ID
-     */
-    private Long accountId;
-    /**
-     * 广告活动ID
-     */
-    private Long campaignId;
-
-    @TableField(exist = false)
-    private String campaignName;
-    /**
-     * 广告组ID
-     */
-    private Long unitId;
-    /**
-     * 广告组名称
-     */
-    private String unitName;
-    /**
-     * 广告组状态
-     */
-    private Integer status;
-    private Integer putStatus;
-    private Integer createChannel;
-    /**
-     * 审核拒绝理由
-     */
-    private String reviewDetail;
-    /**
-     * 出价类型
-     */
-    private Integer bidType;
-    /**
-     * 出价
-     */
-    private Long bid;
-    /**
-     * OCPC出价
-     */
-    private Long cpaBid;
-
-    private Integer deepConversionType;
-    private Long deepConversionBid;
-
-    /**
-     * OCPX行为类型   1: CPM, 2: CPC,
-     */
-    private Integer ocpxActionType;
-    /**
-     * 单日预算
-     */
-    private Long dayBudget;
-    /**
-     * 投放方式  0:未知, 1:正常投
-     */
-    private Integer speed;
-    /**
-     * 投放开始时间
-     */
-    private String beginTime;
-    /**
-     * 投放结束时间
-     */
-    private String endTime;
-    private String scheduleTime;
-    private String sceneId;
-
-    /**
-     * 创意展现方式  0:未知, 1:轮播,
-     */
-    private Integer showMode;
-    private Integer unitType;
-    /**
-     * url类型
-     */
-    private Integer urlType;
-    /**
-     * 落地页链接
-     */
-    private Object url;
-    /**
-     * APP ID
-     */
-    private Long appId;
-    /**
-     * APP图标存储地址
-     */
-    private String appIconUrl;
-    private Long convertId; // 转化目标
-    private Integer useAppMarket; // 转化目标
-    private String groupCreateTime;
-    private String groupUpdateTime;
-
-    // 应用商店列表
-    private String appStore;
-    /**
-     * 创建时间
-     */
-    private Date createTime;
-    /**
-     * 修改时间
-     */
-    private Date updateTime;
-}

+ 0 - 136
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/KuaiShouGroupTarget.java

@@ -1,136 +0,0 @@
-package com.xxl.job.executor.batch.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-
-import java.util.Date;
-
-/**
- * 快手-定向信息
- *
- * @author jeecg-boot
- * @version V1.0
- * @date 2019-12-17
- */
-@Data
-@TableName("ctop_kuaishou_group_target")
-public class KuaiShouGroupTarget {
-    /**
-     * id
-     */
-    @TableId(type = IdType.AUTO)
-    private Long id;
-    /**
-     * 账户ID
-     */
-    private Long accountId;
-    /**
-     * 广告组ID
-     */
-    private Long unitId;
-    /**
-     * 地域
-     */
-    private String region;
-    /**
-     * 年龄最小限制
-     */
-    private Integer ageMin;
-    /**
-     * 年龄最大限制
-     */
-    private Integer ageMax;
-    /**
-     * 固定年龄段 【0:表示0-11岁】【12:表示12-17岁】【18:表示18-23岁】【24:表示24-30岁】【31:表示31-40岁】【41:表示41-49岁】【50:表示50-100岁】
-     */
-    private String agesRange;
-    /**
-     * 性别 1:女性, 2:男性, 0:不限
-     */
-    private Integer gender;
-    /**
-     * 操作系统 1: Android, 2: iOS, 0:不限
-     */
-    private Integer platformOs;
-    /**
-     * 安卓版本  3:不限, 4: 4.x+, 5: 5.x+, 6: 6.x+, 7: 7.x+;
-     */
-    private Integer androidOsv;
-    /**
-     * ios版本  6:不限, 7: 7.x+, 8: 8.x+,9: 9.x+, 10: 10.x+
-     */
-    private Integer iosOsv;
-    /**
-     * 网络环境 1: Wi-Fi, 2:移动网络,0:表示不限
-     */
-    private Integer network;
-    /**
-     * 设备品牌 1: OPPO, 2: VIVO,3:华为, 4:小米,5:荣耀, 6:三星,7:金立, 8:魅族,9:乐视, 10:其他,11 : 苹 果
-     */
-    private String deviceBrand;
-    /**
-     * 设备价格 1: 1500 元以下,2: 1501~2000,3: 2001~2500,4: 2501~3000,5: 3001~3500,6: 3501~4000,7: 4001~4500,8: 4501~5000,9: 5001~5500,10: 5500 元以上
-     */
-    private String devicePrice;
-    /**
-     * 商业兴趣类型 0:不限,2:按照兴趣标签
-     */
-    private Integer businessInterestType;
-    /**
-     * 商业兴趣
-     */
-    private String businessInterest;
-    /**
-     * 网红粉丝
-     */
-    private String fansStar;
-    /**
-     * 兴趣视频用户
-     */
-    private String interestVideo;
-    /**
-     * APP行为-按分类
-     */
-    private String appInterest;
-    /**
-     * APP行为-按APP名称
-     */
-    private String appIds;
-
-    private Integer filterConvertedLevel;
-    /**
-     * 人群包定向
-     */
-    private String population;
-    /**
-     * 人群包排除
-     */
-    private String excludePopulation;
-    private String thirdPlatformCode;
-    /**
-     * 0:关闭智能扩量,1:打开智能扩量
-     */
-    private Integer isOpen;
-    /**
-     * 不可突破年龄 0:可突破/无需控制,1:不可突破
-     */
-    private Integer noAgeBreak;
-    /**
-     * 不可突破性别 0:可突破/无需控制,1:不可突破
-     */
-    private Integer noGenderBreak;
-    /**
-     * 不可突破地域 0:可突破/无需控制,1:不可突破
-     */
-    private Integer noAreaBreak;
-    /**
-     * 创建时间
-     */
-    private Date createTime;
-    /**
-     * 修改时间
-     */
-    private Date updateTime;
-}

+ 0 - 61
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/KuaiShouHistoryReportTask.java

@@ -1,61 +0,0 @@
-package com.xxl.job.executor.batch.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-
-import java.util.Date;
-
-/**
- * 快手历史数据任务记录
- *
- * @author jeecg-boot
- * @version V1.0
- * @date 2020-03-09
- */
-@Data
-@TableName("ctop_kuaishou_history_report_task")
-public class KuaiShouHistoryReportTask {
-    /**
-     * 主键ID
-     */
-    @TableId(type = IdType.AUTO)
-    private Long id;
-    /**
-     * 广告账户ID(相当于头条返回的access_token数据中的advertiser_id)
-     */
-    private Long accountId;
-    /**
-     * 任务id
-     */
-    private String taskId;
-    /**
-     * 任务名称
-     */
-    private String taskName;
-    /**
-     * 0:新建,1:处理中,2:处理成功,3:处理失败,4:数据已下载
-     */
-    private Integer taskStatus;
-    /**
-     * 1:账户维度查询,2:  广告计划维度查询,3:广告组维度查询,4:广告创意维度查询
-     */
-    private Integer viewType;
-    /**
-     * 任务查询数据起始时间
-     */
-    private String startDate;
-    /**
-     * 任务查询数据结束时间
-     */
-    private String endDate;
-    /**
-     * 创建时间
-     */
-    private Date createTime;
-    /**
-     * 修改时间
-     */
-    private Date updateTime;
-}

+ 0 - 66
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/KuaiShouImageGet.java

@@ -1,66 +0,0 @@
-package com.xxl.job.executor.batch.entity;
-
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-
-import java.util.Date;
-
-/**
- * @Description: 快手-获取图片接口
- * @Author: jeecg-boot
- * @Date: 2019-07-25
- * @Version: V1.0
- */
-@Data
-@TableName("ctop_kuaishou_image_get")
-public class KuaiShouImageGet {
-    /**
-     * id
-     */
-    @TableId
-    private String id;
-    /**
-     * 账户ID
-     */
-    private Long accountId;
-    /**
-     * 视频预览链接
-     */
-    private Object url;
-    /**
-     * 宽
-     */
-    private Integer width;
-    /**
-     * 高
-     */
-    private Integer height;
-    /**
-     * 图片大小
-     */
-    private Integer size;
-    /**
-     * 图片格式
-     */
-    private String format;
-    private Integer materialType;
-
-    /**
-     * 图片 token
-     */
-    private String imageToken;
-    /**
-     * 图片 md5
-     */
-    private String signature;
-    private Date statDate;
-    /**
-     * 创建时间
-     */
-    private Date createTime;
-    /**
-     * 修改时间
-     */
-    private Date updateTime;
-}

+ 0 - 51
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/KuaiShouVideoGet.java

@@ -1,51 +0,0 @@
-package com.xxl.job.executor.batch.entity;
-
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-
-import java.util.Date;
-
-/**
- * @Description: 快手-获取视频接口
- * @Author: jeecg-boot
- * @Date: 2019-07-25
- * @Version: V1.0
- */
-@Data
-@TableName("ctop_kuaishou_video_get")
-public class KuaiShouVideoGet {
-
-    @TableId
-    private String id;
-    /**
-     * 账户ID
-     */
-    private Long accountId;
-    /**
-     * 视频id
-     */
-    private String photoId;
-    private Integer width;
-    private Integer height;
-    /**
-     * 视频预览链接
-     */
-    private String url;
-    /**
-     * 视频首帧图片链接
-     */
-    private String coverUrl;
-    /**
-     * 视频首帧图片链接
-     */
-    private String signature;
-    private Date statDate;
-    private Integer materialType;
-    private String materialId;
-    private Date createTime;
-    private Date updateTime;
-    private Integer channelType;
-    private Integer status;
-    private Long userId;
-}

+ 0 - 43
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/KuaishouOperationRecord.java

@@ -1,43 +0,0 @@
-package com.xxl.job.executor.batch.entity;
-
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-
-import java.util.Date;
-
-/**
- * 操作记录
- * @author jeecg-boot
- * @date   2020-04-26
- * @version V1.0
- */
-@Data
-@TableName("ctop_kuaishou_operation_record")
-public class KuaishouOperationRecord {
-
-	private Long id;
-
-	private Long accountId;
-
-	private Date operationTime;
-
-	private Integer operationType;
-
-	private Integer roleType;
-
-	private String objectName;
-
-	private Integer operationTarget;
-
-	private String objectId;
-
-	private String fieldName;
-
-	private String originalData;
-
-	private String updateData;
-
-	private String statDate;
-
-	private String log;
-}

+ 0 - 113
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/KuaishouProgramCreative.java

@@ -1,113 +0,0 @@
-package com.xxl.job.executor.batch.entity;
-
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-
-import java.util.Date;
-
-/**
- * 快手-程序化创意
- *
- * @author jeecg-boot
- * @version V1.0
- * @date 2020-09-22
- */
-@Data
-@TableName("ctop_kuaishou_program_creative")
-public class KuaishouProgramCreative {
-
-    /**
-     * id
-     */
-    @TableId
-    private String id;
-    /**
-     * 账户ID
-     */
-    private Long accountId;
-    /**
-     * 广告组ID
-     */
-    private Long unitId;
-    /**
-     * 程序化创意包名称
-     */
-    private String packageName;
-    /**
-     * 横版视频 id list
-     */
-    private String horizontalPhotoIds;
-    /**
-     * 竖版视频 id list
-     */
-    private String verticalPhotoIds;
-    /**
-     * 封面imageToken
-     */
-    private String coverImageTokens;
-    /**
-     * 封面链接地址
-     */
-    private String coverImageUrls;
-    /**
-     * 建站id
-     */
-    private Long siteId;
-    /**
-     * 封面贴纸
-     */
-    private String stickerStyles;
-    /**
-     * 封面广告语
-     */
-    private String coverSlogans;
-    /**
-     * 行动号召按钮
-     */
-    private String actionBar;
-    /**
-     * 作品广告语
-     */
-    private String captions;
-    /**
-     * 第三方监测链接
-     */
-    private String clickUrl;
-    /**
-     * 第三方ActionBar点击监控链接
-     */
-    private String actionbarClickUrl;
-    /**
-     * 程序化创意操作状态,1:投放,2:暂停,3:删除
-     */
-    private Integer putStatus;
-    /**
-     * 程序化创意状态 -1:不限,1:计划已暂停,3:计划超预算,6:余额不足,11:组审核中,12:组审核未通过,14:已结束,15:组已暂停,17:组超预算,19:未达投放时间,40:创意已删除,41:审核中,42:审核未通过,46:已暂停,52:投放中,53:作品异常,55:部分素材审核通过
-     */
-    private Integer viewStatus;
-    /**
-     * 程序化创意状态描述
-     */
-    private String viewStatusReason;
-
-    private Integer creativeCategory;
-    private String creativeTag;
-
-    /**
-     * 创意创建时间
-     */
-    private Date creativeCreateTime;
-    /**
-     * 创意最后修改时间
-     */
-    private Date creativeUpdateTime;
-    /**
-     * 创建时间
-     */
-    private Date createTime;
-    /**
-     * updateTime
-     */
-    private Date updateTime;
-}

+ 0 - 35
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/vo/ConvertVo.java

@@ -1,35 +0,0 @@
-package com.xxl.job.executor.batch.entity.vo;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-import lombok.Data;
-
-import java.io.Serializable;
-
-@Data
-public class ConvertVo implements Serializable {
-    @JsonProperty("app_name")
-    private String appName;
-    @JsonProperty("convert_target")
-    private Integer convertTarget;
-    @JsonProperty("convert_name")
-    private String convertName;
-    @JsonProperty("deep_conversion_count")
-    private Long deepConversionCount;
-    @JsonProperty("deep_conversion_type")
-    private Integer deepConversionType;
-    @JsonProperty("type")
-    private Integer type;
-    @JsonProperty("app_id")
-    private Long appId;
-    @JsonProperty("convert_id")
-    private Long convertId;
-    @JsonProperty("convert_count")
-    private Long convertCount;
-    @JsonProperty("click_url")
-    private String clickUrl;
-    @JsonProperty("create_time")
-    private String createTime;
-    @JsonProperty("update_time")
-    private String updateTime;
-
-}

+ 0 - 25
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/vo/KuaiShouReportDailyMaterialVo.java

@@ -1,25 +0,0 @@
-package com.xxl.job.executor.batch.entity.vo;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-/**
- * 素材
- *
- * @author jeecg-boot
- * @version V1.0
- * @date 2020-09-09
- */
-@Data
-
-@EqualsAndHashCode(callSuper = false)
-@Accessors(chain = true)
-public class KuaiShouReportDailyMaterialVo {
-
-    /**
-     * id
-     */
-    private Long id;
-    private Long photoId;
-}

+ 0 - 107
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/vo/KuaiShouVideoGetVo.java

@@ -1,107 +0,0 @@
-package com.xxl.job.executor.batch.entity.vo;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-
-/**
- * @Description: 快手-获取视频接口
- * @Author: jeecg-boot
- * @Date: 2019-07-25
- * @Version: V1.0
- */
-
-public class KuaiShouVideoGetVo implements Serializable {
-
-    private BigDecimal charge;
-    private String statDate;
-
-    /**
-     * 视频id
-     */
-    private String photoId;
-
-    /**
-     * 视频预览链接
-     */
-    private String url;
-    /**
-     * 视频首帧图片链接
-     */
-    private String coverUrl;
-    /**
-     * 视频首帧图片链接
-     */
-    private String signature;
-
-    private Integer materialType;
-
-
-    public BigDecimal getCharge() {
-        return charge;
-    }
-
-    public void setCharge(BigDecimal charge) {
-        this.charge = charge;
-    }
-
-    public String getStatDate() {
-        return statDate;
-    }
-
-    public void setStatDate(String statDate) {
-        this.statDate = statDate;
-    }
-
-    public String getPhotoId() {
-        return photoId;
-    }
-
-    public void setPhotoId(String photoId) {
-        this.photoId = photoId;
-    }
-
-    public String getUrl() {
-        return url;
-    }
-
-    public void setUrl(String url) {
-        this.url = url;
-    }
-
-    public String getCoverUrl() {
-        return coverUrl;
-    }
-
-    public void setCoverUrl(String coverUrl) {
-        this.coverUrl = coverUrl;
-    }
-
-    public String getSignature() {
-        return signature;
-    }
-
-    public void setSignature(String signature) {
-        this.signature = signature;
-    }
-
-    public Integer getMaterialType() {
-        return materialType;
-    }
-
-    public void setMaterialType(Integer materialType) {
-        this.materialType = materialType;
-    }
-
-    @Override
-    public String toString() {
-        return "KuaiShouVideoGetVo{" +
-                "charge=" + charge +
-                ", statDate='" + statDate + '\'' +
-                ", photoId='" + photoId + '\'' +
-                ", url='" + url + '\'' +
-                ", coverUrl='" + coverUrl + '\'' +
-                ", signature='" + signature + '\'' +
-                ", materialType=" + materialType +
-                '}';
-    }
-}

+ 0 - 33
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/vo/SpendVo.java

@@ -1,33 +0,0 @@
-package com.xxl.job.executor.batch.entity.vo;
-
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-
-import java.math.BigDecimal;
-
-/**
- * @Description: 快手-视频上传
- * @Author: jeecg-boot
- * @Date: 2019-07-26
- * @Version: V1.0
- */
-@Data
-
-@EqualsAndHashCode(callSuper = false)
-@Accessors(chain = true)
-public class SpendVo {
-
-    /**
-     * 总花费
-     */
-    private BigDecimal cost;
-    /**
-     * 预算
-     */
-    private BigDecimal budget;
-    /**
-     * 余额
-     */
-    private BigDecimal balance;
-}

+ 0 - 13
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/entity/vo/VideoGetvo.java

@@ -1,13 +0,0 @@
-package com.xxl.job.executor.batch.entity.vo;
-
-import lombok.Data;
-
-import java.io.Serializable;
-
-
-@Data
-public class VideoGetvo implements Serializable {
-    private String signature;
-    private Integer channelType;
-
-}

+ 0 - 15
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/BatchMapper.java

@@ -1,15 +0,0 @@
-package com.xxl.job.executor.batch.mapper;
-
-import org.apache.ibatis.annotations.Param;
-
-import java.math.BigDecimal;
-
-public interface BatchMapper {
-    BigDecimal getDailyCost(@Param("accountId") Long accountId);
-
-    BigDecimal getHourCost(@Param("accountId") Long accountId, @Param("statDate") String statDate);
-
-    BigDecimal getBudget(@Param("accountId") Long accountId);
-
-    BigDecimal getProjectMaxBidByProject(@Param("projectId") Long projectId);
-}

+ 0 - 15
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/KuaiShouAdvertiserBaseInfoMapper.java

@@ -1,15 +0,0 @@
-package com.xxl.job.executor.batch.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.xxl.job.executor.batch.entity.KuaiShouAdvertiserBaseInfo;
-
-/**
- * 快手-广告主基本信息
- *
- * @author: jeecg-boot
- * @date: 2019-09-18
- * @cersion: V1.0
- */
-public interface KuaiShouAdvertiserBaseInfoMapper extends BaseMapper<KuaiShouAdvertiserBaseInfo> {
-
-}

+ 0 - 14
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/KuaiShouCampaignDayBudgetMapper.java

@@ -1,14 +0,0 @@
-package com.xxl.job.executor.batch.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.xxl.job.executor.batch.entity.KuaiShouCampaignDayBudget;
-
-/**
- * @Description: 快手-修改广告计划记录表
- * @Author: jeecg-boot
- * @Date: 2019-09-11
- * @Version: V1.0
- */
-public interface KuaiShouCampaignDayBudgetMapper extends BaseMapper<KuaiShouCampaignDayBudget> {
-
-}

+ 0 - 20
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/KuaiShouCampaignMapper.java

@@ -1,20 +0,0 @@
-package com.xxl.job.executor.batch.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.xxl.job.executor.batch.entity.KuaiShouCampaign;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * @Description: 快手-获取广告计划信息
- * @Author: jeecg-boot
- * @Date: 2019-07-23
- * @Version: V1.0
- */
-public interface KuaiShouCampaignMapper extends BaseMapper<KuaiShouCampaign> {
-
-    void replaceBatch(@Param(value = "campaigns") List<KuaiShouCampaign> campaigns);
-
-    List<Long> queryIdsByPutStatus(Long accountId, String putStatus);
-}

+ 0 - 25
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/KuaiShouCreativeMapper.java

@@ -1,25 +0,0 @@
-package com.xxl.job.executor.batch.mapper;
-
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.xxl.job.executor.batch.entity.KuaiShouCreative;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * @Description: 快手-创意信息
- * @Author: jeecg-boot
- * @Date: 2019-07-23
- * @Version: V1.0
- */
-public interface KuaiShouCreativeMapper extends BaseMapper<KuaiShouCreative> {
-
-    void replaceBatch(@Param(value = "creatives") List<KuaiShouCreative> creatives);
-
-    Integer checkCreativeCount(@Param("accountId") Long accountId, @Param("unitId") Long unitId);
-
-    Integer getCreateCount(Long accountId, String startTime);
-
-    List<JSONObject> checkZombieProject(String date);
-}

+ 0 - 15
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/KuaiShouDailyFlowsMapper.java

@@ -1,15 +0,0 @@
-package com.xxl.job.executor.batch.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.xxl.job.executor.batch.entity.KuaiShouDailyFlows;
-
-/**
- * 快手-日流水信息
- *
- * @author: jeecg-boot
- * @date: 2019-12-05
- * @cersion: V1.0
- */
-public interface KuaiShouDailyFlowsMapper extends BaseMapper<KuaiShouDailyFlows> {
-
-}

+ 0 - 15
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/KuaiShouDailyReportTaskMapper.java

@@ -1,15 +0,0 @@
-package com.xxl.job.executor.batch.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.xxl.job.executor.batch.entity.KuaiShouDailyReportTask;
-
-/**
- * 分天记录表
- *
- * @author: jeecg-boot
- * @date: 2020-03-12
- * @cersion: V1.0
- */
-public interface KuaiShouDailyReportTaskMapper extends BaseMapper<KuaiShouDailyReportTask> {
-
-}

+ 0 - 25
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/KuaiShouGroupMapper.java

@@ -1,25 +0,0 @@
-package com.xxl.job.executor.batch.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.xxl.job.executor.batch.entity.KuaiShouGroup;
-import org.apache.ibatis.annotations.Param;
-
-import java.math.BigDecimal;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @Description: 广告组信息
- * @Author: jeecg-boot
- * @Date: 2019-07-23
- * @Version: V1.0
- */
-public interface KuaiShouGroupMapper extends BaseMapper<KuaiShouGroup> {
-    void replaceBatch(@Param(value = "groups") List<KuaiShouGroup> groups);
-
-    List<String> selectWarningGroup(@Param("accountId") Long accountId, @Param("maxBid") Long maxBid);
-
-    List<String> selectWarningCpaBid(@Param("accountId") Long accountId, @Param("maxBid") BigDecimal maxDeepCapBid);
-
-    List<KuaiShouGroup> queryByMap(Map<String, Object> map);
-}

+ 0 - 19
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/KuaiShouGroupTargetMapper.java

@@ -1,19 +0,0 @@
-package com.xxl.job.executor.batch.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.xxl.job.executor.batch.entity.KuaiShouGroupTarget;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * 快手-定向信息
- *
- * @author: jeecg-boot
- * @date: 2019-12-17
- * @cersion: V1.0
- */
-public interface KuaiShouGroupTargetMapper extends BaseMapper<KuaiShouGroupTarget> {
-
-    void replaceBatch(@Param("targets") List<KuaiShouGroupTarget> targets);
-}

+ 0 - 15
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/KuaiShouHistoryReportTaskMapper.java

@@ -1,15 +0,0 @@
-package com.xxl.job.executor.batch.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.xxl.job.executor.batch.entity.KuaiShouHistoryReportTask;
-
-/**
- * 快手历史数据任务记录
- *
- * @author: jeecg-boot
- * @date: 2020-03-09
- * @cersion: V1.0
- */
-public interface KuaiShouHistoryReportTaskMapper extends BaseMapper<KuaiShouHistoryReportTask> {
-
-}

+ 0 - 22
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/KuaiShouImageGetMapper.java

@@ -1,22 +0,0 @@
-package com.xxl.job.executor.batch.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.xxl.job.executor.batch.entity.KuaiShouImageGet;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * @Description: 快手-获取图片接口
- * @Author: jeecg-boot
- * @Date: 2019-07-25
- * @Version: V1.0
- */
-public interface KuaiShouImageGetMapper extends BaseMapper<KuaiShouImageGet> {
-
-    void replaceBatch(@Param(value = "images") List<KuaiShouImageGet> imagesGets);
-
-    String getUrlByCode(String signature);
-
-    String getCutFrameUrlByCode(String signature);
-}

+ 0 - 32
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/KuaiShouReportDailyMaterialMapper.java

@@ -1,32 +0,0 @@
-package com.xxl.job.executor.batch.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.xxl.job.executor.batch.entity.vo.KuaiShouReportDailyMaterialVo;
-import com.xxl.job.executor.batch.entity.vo.KuaiShouVideoGetVo;
-import com.xxl.job.executor.batch.entity.vo.VideoGetvo;
-import com.xxl.job.executor.report.entity.KuaiShouReportDailyMaterial;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 素材
- *
- * @author: jeecg-boot
- * @date: 2020-09-09
- * @cersion: V1.0
- */
-public interface KuaiShouReportDailyMaterialMapper extends BaseMapper<KuaiShouReportDailyMaterial> {
-    void loadMaterialDailyReport(@Param("accountId") Long accountId, @Param("localPath") String localPath);
-
-    List<KuaiShouReportDailyMaterialVo> getPhotoList(@Param("accountId") Long accountId, @Param("statDate") String statDate);
-
-    VideoGetvo getVideoGetByPhotoId(@Param("photoId") Long photoId);
-
-    List<KuaiShouReportDailyMaterialVo> getPhotoListByDate(@Param("statDate") String statDate);
-
-    List<KuaiShouVideoGetVo> getVideoList(Map<String, Object> requestMap);
-
-    void batchReplace(@Param("addList") List<KuaiShouReportDailyMaterial> addList);
-}

+ 0 - 22
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/KuaiShouVideoGetMapper.java

@@ -1,22 +0,0 @@
-package com.xxl.job.executor.batch.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.xxl.job.executor.batch.entity.KuaiShouVideoGet;
-import com.xxl.job.executor.batch.entity.vo.KuaiShouVideoGetVo;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * @Description: 快手-获取视频接口
- * @Author: jeecg-boot
- * @Date: 2019-07-25
- * @Version: V1.0
- */
-public interface KuaiShouVideoGetMapper extends BaseMapper<KuaiShouVideoGet> {
-
-    void replaceBatch(@Param(value = "videos") List<KuaiShouVideoGet> videoGets);
-
-    List<KuaiShouVideoGetVo> getVideoList(Map<String, Object> requestMap);
-}

+ 0 - 40
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/KuaishouOperationRecordMapper.java

@@ -1,40 +0,0 @@
-package com.xxl.job.executor.batch.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.xxl.job.executor.batch.entity.KuaishouOperationRecord;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-
-public interface KuaishouOperationRecordMapper extends BaseMapper<KuaishouOperationRecord> {
-
-    void deleteOperationRecordInfoAccount(@Param("record") KuaishouOperationRecord record);
-
-    void insertOperationRecordInfoAccount(@Param("records") List<KuaishouOperationRecord> records);
-
-    void deleteOperationRecordInfoCampaign(@Param("record") KuaishouOperationRecord record);
-
-    void insertOperationRecordInfoCampaign(@Param("records") List<KuaishouOperationRecord> records);
-
-    void deleteOperationRecordInfoUnit(@Param("record") KuaishouOperationRecord record);
-
-    void insertOperationRecordInfoUnit(@Param("records") List<KuaishouOperationRecord> records);
-
-    void deleteOperationRecordInfoCreative(@Param("record") KuaishouOperationRecord record);
-
-    void insertOperationRecordInfoCreative(@Param("records") List<KuaishouOperationRecord> records);
-
-    void deleteOperationRecordInfoVideo(@Param("record") KuaishouOperationRecord record);
-
-    void insertOperationRecordInfoVideo(@Param("records") List<KuaishouOperationRecord> records);
-
-    void deleteOperationRecordInfoApp(@Param("record") KuaishouOperationRecord record);
-
-    void insertOperationRecordInfoApp(@Param("records") List<KuaishouOperationRecord> records);
-
-    void deleteOperationRecordInfoPackage(@Param("record") KuaishouOperationRecord record);
-
-    void insertOperationRecordInfoPackage(@Param("records") List<KuaishouOperationRecord> records);
-
-}

+ 0 - 16
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/KuaishouProgramCreativeMapper.java

@@ -1,16 +0,0 @@
-package com.xxl.job.executor.batch.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.xxl.job.executor.batch.entity.KuaishouProgramCreative;
-
-/**
- * 快手-程序化创意
- *
- * @author: jeecg-boot
- * @date: 2020-09-22
- * @cersion: V1.0
- */
-public interface KuaishouProgramCreativeMapper extends BaseMapper<KuaishouProgramCreative> {
-
-
-}

+ 0 - 10
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/MaterialRefuseMapper.java

@@ -1,10 +0,0 @@
-package com.xxl.job.executor.batch.mapper;
-
-import com.alibaba.fastjson.JSONObject;
-
-import java.util.List;
-
-public interface MaterialRefuseMapper {
-    List<JSONObject> selectRefuseCreativeByAccountId(Long accountId);
-
-}

+ 0 - 55
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/xml/BatchMapper.xml

@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.xxl.job.executor.batch.mapper.BatchMapper">
-
-    <select id="getDailyCost" resultType="java.math.BigDecimal">
-      select
-      (case
-        when sum(charge) != ''
-        then sum(charge)
-        else 0
-        end
-        )
-      from ctop_kuaishou_report_daily_account
-      where account_id = #{accountId}
-    </select>
-
-
-    <select id="getHourCost" resultType="java.math.BigDecimal">
-      select
-      (case
-        when sum(charge) != ''
-        then sum(charge)
-        else 0
-        end
-        )
-
-      from ctop_kuaishou_report_hourly_account
-      where account_id = #{accountId}
-      and stat_date = #{statDate}
-    </select>
-
-    <select id="getBudget" resultType="java.math.BigDecimal">
-      select
-      (case
-        when sum(day_budget) != ''
-        then sum(day_budget)
-        else 0
-        end
-        )
-
-      from ctop_kuaishou_campaign
-      where account_id = #{accountId}
-    </select>
-
-
-    <select id="getProjectMaxBidByProject" resultType="java.math.BigDecimal">
-      select
-      max_bid
-      from
-      ctop_project
-      where id = #{projectId}
-    </select>
-
-
-</mapper>

+ 0 - 5
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/xml/KuaiShouAdvertiserBaseInfoMapper.xml

@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.xxl.job.executor.batch.mapper.KuaiShouAdvertiserBaseInfoMapper">
-
-</mapper>

+ 0 - 5
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/xml/KuaiShouCampaignDayBudgetMapper.xml

@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.xxl.job.executor.batch.mapper.KuaiShouCampaignDayBudgetMapper">
-
-</mapper>

+ 0 - 44
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/xml/KuaiShouCampaignMapper.xml

@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.xxl.job.executor.batch.mapper.KuaiShouCampaignMapper">
-    <insert id="replaceBatch">
-        replace into ctop_kuaishou_campaign(
-        id,
-        account_id,
-        campaign_id,
-        campaign_name,
-        status,
-        day_budget,
-        campaign_type,
-        put_status,
-        create_channel,
-        put_create_time,
-        put_update_time,
-        create_time,
-        update_time)
-        values
-        <foreach collection="campaigns" item="campaign" separator=",">
-            (#{campaign.id},
-            #{campaign.accountId},
-            #{campaign.campaignId},
-            #{campaign.campaignName},
-            #{campaign.status},
-            #{campaign.dayBudget},
-            #{campaign.campaignType},
-            #{campaign.putStatus},
-            #{campaign.createChannel},
-            #{campaign.putCreateTime},
-            #{campaign.putUpdateTime},
-            #{campaign.createTime},
-            #{campaign.updateTime})
-        </foreach>
-    </insert>
-
-    <select id="queryIdsByPutStatus" resultType="java.lang.Long">
-        SELECT campaign_id
-        FROM
-        ctop_kuaishou_campaign
-        WHERE account_id = #{accountId}
-        AND put_status = #{putStatus}
-    </select>
-</mapper>

+ 0 - 130
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/xml/KuaiShouCreativeMapper.xml

@@ -1,130 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.xxl.job.executor.batch.mapper.KuaiShouCreativeMapper">
-    <insert id="replaceBatch">
-        replace into ctop_kuaishou_creative(id,
-        account_id,
-        campaign_id,
-        unit_id,
-        creative_id,
-        creative_name,
-        creative_material_type,
-        photo_id,
-        material_url,
-        image_tokens,
-        status,
-        put_status,
-        create_channel,
-        review_detail,
-        cover_url,
-        image_token,
-        cover_width,
-        cover_height,
-        overlay_bg_url,
-        overlay_bg_image_token,
-        sticker_title,
-        overlay_type,
-        click_track_url,
-        impression_url,
-        ad_photo_played_t3s_url,
-        description,
-        action_bar_text,
-        first_frame_type,
-        site_id,
-        programmed_creative_material,
-        photo_ids,
-        short_slogan,
-        actionbar_click_url,
-        creative_create_time,
-        creative_update_time,
-        creative_category,
-        creative_tag,
-        create_time,
-        update_time)
-        values
-        <foreach collection="creatives" item="creative" separator=",">
-            (#{creative.id},
-            #{creative.accountId},
-            #{creative.campaignId},
-            #{creative.unitId},
-            #{creative.creativeId},
-            #{creative.creativeName},
-            #{creative.creativeMaterialType},
-            #{creative.photoId},
-            #{creative.materialUrl},
-            #{creative.imageTokens},
-            #{creative.status},
-            #{creative.putStatus},
-            #{creative.createChannel},
-            #{creative.reviewDetail},
-            #{creative.coverUrl},
-            #{creative.imageToken},
-            #{creative.coverWidth},
-            #{creative.coverHeight},
-            #{creative.overlayBgUrl},
-            #{creative.overlayBgImageToken},
-            #{creative.stickerTitle},
-            #{creative.overlayType},
-            #{creative.clickTrackUrl},
-            #{creative.impressionUrl},
-            #{creative.adPhotoPlayedT3sUrl},
-            #{creative.description},
-            #{creative.actionBarText},
-            #{creative.firstFrameType},
-            #{creative.siteId},
-            #{creative.programmedCreativeMaterial},
-            #{creative.photoIds},
-            #{creative.shortSlogan},
-            #{creative.actionbarClickUrl},
-            #{creative.creativeCreateTime},
-            #{creative.creativeUpdateTime},
-            #{creative.creativeCategory},
-            #{creative.creativeTag},
-            #{creative.createTime},
-            #{creative.updateTime})
-        </foreach>
-    </insert>
-
-    <select id="checkCreativeCount" resultType="java.lang.Integer">
-     select count(1)
-     from ctop_kuaishou_creative
-     where  account_id = #{accountId}
-     and unit_id = #{unitId}
-    </select>
-
-    <select id="getCreateCount" resultType="java.lang.Integer">
-
-    SELECT
-	count(1)
-   FROM
-	ctop_kuaishou_creative
-   WHERE account_id = #{accountId}
-   AND creative_create_time &gt;= #{startTime}
-   AND create_channel = 1;
-    </select>
-
-    <select id="checkZombieProject" resultType="com.alibaba.fastjson.JSONObject">
-        SELECT
-        t1.id,
-        t1.account_id AS accountId,
-        t1.creative_id AS creativeId,
-        t1.creative_name AS creativeName,
-        t1.campaign_id AS campaignId,
-        t4.campaign_name AS campaignName,
-        t1.unit_id AS unitId,
-        t5.unit_name AS unitName,
-        t3.id AS projectId,
-        t3.project_name AS projectName,
-        t2.user_id AS userId
-        FROM
-        ctop_kuaishou_creative t1
-        LEFT JOIN ctop_user_allocation t2 ON t1.account_id = t2.account_id
-        LEFT JOIN ctop_project t3 ON t2.project_id = t3.id
-        LEFT JOIN ctop_kuaishou_campaign t4 ON t1.campaign_id = t4.campaign_id
-        LEFT JOIN ctop_kuaishou_group t5 ON t1.unit_id = t5.unit_id
-        WHERE
-        creative_create_time &lt;= #{date}
-        AND t1. STATUS = 42
-        and t1.put_status = 1
-    </select>
-</mapper>

+ 0 - 5
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/xml/KuaiShouDailyFlowsMapper.xml

@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.xxl.job.executor.batch.mapper.KuaiShouDailyFlowsMapper">
-
-</mapper>

+ 0 - 5
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/xml/KuaiShouDailyReportTaskMapper.xml

@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.xxl.job.executor.batch.mapper.KuaiShouDailyReportTaskMapper">
-
-</mapper>

+ 0 - 115
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/xml/KuaiShouGroupMapper.xml

@@ -1,115 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.xxl.job.executor.batch.mapper.KuaiShouGroupMapper">
-    <insert id="replaceBatch">
-        replace into ctop_kuaishou_group(
-        id,
-        account_id,
-        campaign_id,
-        unit_id,
-        unit_name,
-        status,
-        put_status,
-        create_channel,
-        review_detail,
-        bid_type,
-        bid,
-        cpa_bid,
-        ocpx_action_type,
-        deep_conversion_type,
-        deep_conversion_bid,
-        day_budget,
-        speed,
-        begin_time,
-        end_time,
-        schedule_time,
-        scene_id,
-        show_mode,
-        unit_type,
-        url_type,
-        url,
-        app_id,
-        app_icon_url,
-        convert_id,
-        use_app_market,
-        app_store,
-        group_create_time,
-        group_update_time,
-        create_time,
-        update_time)
-        values
-        <foreach collection="groups" item="getGroup" separator=",">
-            (
-            #{getGroup.id},
-            #{getGroup.accountId},
-            #{getGroup.campaignId},
-            #{getGroup.unitId},
-            #{getGroup.unitName},
-            #{getGroup.status},
-            #{getGroup.putStatus},
-            #{getGroup.createChannel},
-            #{getGroup.reviewDetail},
-            #{getGroup.bidType},
-            #{getGroup.bid},
-            #{getGroup.cpaBid},
-            #{getGroup.ocpxActionType},
-            #{getGroup.deepConversionType},
-            #{getGroup.deepConversionBid},
-            #{getGroup.dayBudget},
-            #{getGroup.speed},
-            #{getGroup.beginTime},
-            #{getGroup.endTime},
-            #{getGroup.scheduleTime},
-            #{getGroup.sceneId},
-            #{getGroup.showMode},
-            #{getGroup.unitType},
-            #{getGroup.urlType},
-            #{getGroup.url},
-            #{getGroup.appId},
-            #{getGroup.appIconUrl},
-            #{getGroup.convertId},
-            #{getGroup.useAppMarket},
-            #{getGroup.appStore,},
-            #{getGroup.groupCreateTime},
-            #{getGroup.groupUpdateTime},
-            #{getGroup.createTime},
-            #{getGroup.updateTime})
-        </foreach>
-    </insert>
-
-
-    <select id="selectWarningGroup" resultType="java.lang.String">
-   SELECT
-   unit_name
-   FROM ctop_kuaishou_group
-   WHERE account_id = #{accountId}
-   and (cpa_bid &gt; #{maxBid} or bid &gt; #{maxBid})
-   and status = 20
-   group by unit_id
-    </select>
-
-
-    <select id="selectWarningCpaBid" resultType="java.lang.String">
-   SELECT
-   unit_name
-   FROM ctop_kuaishou_group
-   WHERE account_id = #{accountId}
-   and deep_conversion_bid &gt; #{maxBid}
-   group by unit_id
-    </select>
-
-    <select id="queryByMap" resultType="com.xxl.job.executor.batch.entity.KuaiShouGroup">
-        SELECT
-        t1.*,t2.campaign_name as campaignName
-        FROM ctop_kuaishou_group t1
-        LEFT JOIN ctop_kuaishou_campaign t2
-        ON t1.campaign_id = t2.campaign_id
-        WHERE t1.account_id = #{accountId}
-        and t1.put_status = #{putStatus}
-        <if test="campaignId != null">
-            t1.campaign_id = #{campaignId}
-        </if>
-    </select>
-
-
-</mapper>

+ 0 - 70
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/xml/KuaiShouGroupTargetMapper.xml

@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.xxl.job.executor.batch.mapper.KuaiShouGroupTargetMapper">
-
-
-    <insert id="replaceBatch">
-        replace into ctop_kuaishou_group_target(
-        account_id ,
-        unit_id,
-        region,
-        age_min,
-        age_max,
-        ages_range,
-        gender,
-        platform_os,
-        android_osv,
-        ios_osv,
-        network,
-        device_brand,
-        device_price,
-        business_interest_type,
-        business_interest,
-        fans_star,
-        interest_video,
-        app_interest,
-        app_ids,
-        population,
-        exclude_population,
-        third_platform_code,
-        filter_converted_level,
-        is_open,
-        no_age_break,
-        no_gender_break,
-        no_area_break
-        )
-        values
-        <foreach collection="targets" item="targets" separator=",">
-            (
-            #{targets.accountId},
-            #{targets.unitId},
-            #{targets.region},
-            #{targets.ageMin},
-            #{targets.ageMax},
-            #{targets.agesRange},
-            #{targets.gender},
-            #{targets.platformOs},
-            #{targets.androidOsv},
-            #{targets.iosOsv},
-            #{targets.network},
-            #{targets.deviceBrand},
-            #{targets.devicePrice},
-            #{targets.businessInterestType},
-            #{targets.businessInterest},
-            #{targets.fansStar},
-            #{targets.interestVideo},
-            #{targets.appInterest},
-            #{targets.appIds},
-            #{targets.population},
-            #{targets.excludePopulation},
-            #{targets.thirdPlatformCode},
-            #{targets.filterConvertedLevel},
-            #{targets.isOpen},
-            #{targets.noAgeBreak},
-            #{targets.noGenderBreak},
-            #{targets.noAreaBreak}
-            )
-        </foreach>
-    </insert>
-
-</mapper>

+ 0 - 5
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/xml/KuaiShouHistoryReportTaskMapper.xml

@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.xxl.job.executor.batch.mapper.KuaiShouHistoryReportTaskMapper">
-
-</mapper>

+ 0 - 50
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/xml/KuaiShouImageGetMapper.xml

@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.xxl.job.executor.batch.mapper.KuaiShouImageGetMapper">
-
-    <insert id="replaceBatch">
-        replace into ctop_kuaishou_image_get(
-        id,
-        account_id,
-        url,
-        width,
-        height,
-        size,
-        format,
-        material_type,
-        signature,
-        image_token,
-        stat_date
-        )
-        values
-        <foreach collection="images" item="image" separator=",">
-            (
-            #{image.id},
-            #{image.accountId},
-            #{image.url},
-            #{image.width},
-            #{image.height},
-            #{image.size},
-            #{image.format},
-            #{image.materialType},
-            #{image.signature},
-            #{image.imageToken},
-            #{image.statDate}
-            )
-        </foreach>
-    </insert>
-
-    <select id="getUrlByCode" resultType="java.lang.String">
-        select url from ctop_material_image_info
-        where  code = #{signature}
-        limit 1
-    </select>
-
-    <select id="getCutFrameUrlByCode" resultType="java.lang.String">
-        select url from ctop_material_cut_frame
-        where  signature = #{signature}
-        limit 1
-    </select>
-
-
-</mapper>

+ 0 - 321
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/xml/KuaiShouReportDailyMaterialMapper.xml

@@ -1,321 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.xxl.job.executor.batch.mapper.KuaiShouReportDailyMaterialMapper">
-    <insert id="batchReplace">
-        replace into ctop_kuaishou_report_daily_material(
-        account_id,
-        photo_id,
-        channel_type,
-        signature,
-        image_token,
-        cover_url,
-        photo_url,
-        creative_material_type_string,
-        ad_scene,
-        charge,
-        photo_show,
-        aclick,
-        bclick,
-        photo_share,
-        photo_comment,
-        photo_like,
-        follow,
-        cancel_follow,
-        report,
-        block,
-        negative,
-        download_started,
-        download_completed,
-        activation,
-        submit,
-        stat_date,
-        photo_click,
-        photo_click_ratio,
-        action_ratio,
-        impression_1k_cost,
-        photo_click_cost,
-        action_cost,
-        event_pay_first_day,
-        event_pay_purchase_amount_first_day,
-        event_pay_first_day_roi,
-        event_pay,
-        event_pay_purchase_amount,
-        event_pay_roi,
-        event_register,
-        event_register_cost,
-        event_register_ratio,
-        event_jin_jian_app,
-        event_jin_jian_app_cost,
-        event_credit_grant_app,
-        event_credit_grant_app_cost,
-        event_credit_grant_app_ratio,
-        event_order_paid,
-        event_order_paid_purchase_amount,
-        event_jin_jian_landing_page,
-        event_jin_jian_landing_page_cost,
-        event_credit_grant_landing_page,
-        event_credit_grant_landing_page_cost,
-        event_credit_grant_landing_ratio,
-        event_next_day_stay_cost,
-        event_next_day_stay_ratio,
-        form_action_ratio,
-        event_order_paid_cost,
-        event_next_day_stay,
-        form_cost,
-        form_count,
-        play_3s_ratio
-        )
-        values
-        <foreach collection="addList" item="material" separator=",">
-            (
-            #{material.accountId},
-            #{material.photoId},
-            #{material.channelType},
-            #{material.signature},
-            #{material.imageToken},
-            #{material.coverUrl},
-            #{material.photoUrl},
-            #{material.creativeMaterialTypeString},
-            #{material.adScene},
-            #{material.charge},
-            #{material.photoShow},
-            #{material.aclick},
-            #{material.bclick},
-            #{material.photoShare},
-            #{material.photoComment},
-            #{material.photoLike},
-            #{material.follow},
-            #{material.cancelFollow},
-            #{material.report},
-            #{material.block},
-            #{material.negative},
-            #{material.downloadStarted},
-            #{material.downloadCompleted},
-            #{material.activation},
-            #{material.submit},
-            #{material.statDate},
-            #{material.photoClick},
-            #{material.photoClickRatio},
-            #{material.actionRatio},
-            #{material.impression1kCost},
-            #{material.photoClickCost},
-            #{material.actionCost},
-            #{material.eventPayFirstDay},
-            #{material.eventPayPurchaseAmountFirstDay},
-            #{material.eventPayFirstDayRoi},
-            #{material.eventPay},
-            #{material.eventPayPurchaseAmount},
-            #{material.eventPayRoi},
-            #{material.eventRegister},
-            #{material.eventRegisterCost},
-            #{material.eventRegisterRatio},
-            #{material.eventJinJianApp},
-            #{material.eventJinJianAppCost},
-            #{material.eventCreditGrantApp},
-            #{material.eventCreditGrantAppCost},
-            #{material.eventCreditGrantAppRatio},
-            #{material.eventOrderPaid},
-            #{material.eventOrderPaidPurchaseAmount},
-            #{material.eventJinJianLandingPage},
-            #{material.eventJinJianLandingPageCost},
-            #{material.eventCreditGrantLandingPage},
-            #{material.eventCreditGrantLandingPageCost},
-            #{material.eventCreditGrantLandingRatio},
-            #{material.eventNextDayStayCost},
-            #{material.eventNextDayStayRatio},
-            #{material.formActionRatio},
-            #{material.eventOrderPaidCost},
-            #{material.eventNextDayStay},
-            #{material.formCost},
-            #{material.formCount},
-            #{material.play3sRatio}
-            )
-        </foreach>
-
-    </insert>
-
-
-    <insert id="loadMaterialDailyReport">
-		LOAD DATA local INFILE  #{localPath}
-	    INTO TABLE ctop_kuaishou_report_daily_material
-		FIELDS TERMINATED BY ',' enclosed by '"' LINES TERMINATED BY '\n'
-		IGNORE 1 LINES
-		(photo_id,
-		image_token,
-		cover_url,
-		photo_url,
-		@photo_caption,
-		@creative_material_type_string,
-        @ad_scene,
-        charge,
-        photo_show,
-        aclick,
-        bclick,
-        photo_share,
-        photo_comment,
-        photo_like,
-        follow,
-        cancel_follow,
-        report,
-        block,
-        negative,
-        download_started,
-        download_completed,
-        activation,
-        submit,
-        stat_date,
-        @stat_hour,
-        photo_click,
-        photo_click_ratio,
-        action_ratio,
-        impression_1k_cost,
-        photo_click_cost,
-        @click_1k_cost,
-        action_cost,
-        event_pay_first_day,
-        event_pay_purchase_amount_first_day,
-        event_pay_first_day_roi,
-        event_pay,
-        event_pay_purchase_amount,
-        event_pay_roi,
-        event_register,
-        event_register_cost,
-        event_register_ratio,
-        event_jin_jian_app,
-        event_jin_jian_app_cost,
-        event_credit_grant_app,
-        event_credit_grant_app_cost,
-        event_credit_grant_app_ratio,
-        event_order_paid,
-        event_order_paid_purchase_amount,
-        event_order_paid_cost,
-        form_count,
-        form_cost,
-        form_action_ratio,
-        event_jin_jian_landing_page,
-        event_jin_jian_landing_page_cost,
-        event_credit_grant_landing_page,
-        event_credit_grant_landing_page_cost,
-        event_credit_grant_landing_ratio,
-        event_next_day_stay_cost,
-        event_next_day_stay_ratio,
-        event_next_day_stay,
-        play_3s_ratio,
-        @event_valid_clues,
-        @event_valid_clues_cost,
-        @ad_product_cnt,
-        @event_goods_view,
-        @merchant_reco_fans,
-        @event_order_amount_roi,
-        @event_goods_view_cost,
-        @merchant_reco_fans_cost,
-        @event_new_user_pay,
-        @event_new_user_pay_cost,
-        @event_new_user_pay_ratio,
-        @event_button_click,
-        @event_button_click_cost,
-        @event_button_click_ratio,
-        @play_5s_ratio,
-        @play_end_ratio,
-        @event_order_paid_roi,
-        @event_new_user_jinjian_app,
-        @event_new_user_jinjian_app_cost,
-        @event_new_user_jinjian_app_roi,
-        @event_new_user_credit_grant_app,
-        @event_new_user_credit_grant_app_cost,
-        @event_new_user_credit_grant_app_roi,
-        @event_new_user_jinjian_page,
-        @event_new_user_jinjian_page_cost,
-        @event_new_user_jinjian_page_roi,
-        @event_new_user_credit_grant_page,
-        @event_new_user_credit_grant_page_cost,
-        @event_new_user_credit_grant_page_roi,
-        @event_appoint_form,
-        @event_appoint_form_cost,
-        @event_appoint_form_ratio,
-        @event_appoint_jump_click,
-        @event_appoint_jump_click_cost,
-        @event_appoint_jump_click_ratio
-        )
-          set account_id = #{accountId}
-    </insert>
-
-    <select id="getPhotoList" resultType="com.xxl.job.executor.batch.entity.vo.KuaiShouReportDailyMaterialVo">
-        select
-        id as id,
-        photo_id as photoId
-        from
-        ctop_kuaishou_report_daily_material
-        where account_id = #{accountId}
-        <if test="statDate != null and statDate != '' ">
-            and stat_date = #{statDate}
-        </if>
-        group by photo_id
-
-    </select>
-
-    <select id="getPhotoListByDate"
-            resultType="com.xxl.job.executor.batch.entity.vo.KuaiShouReportDailyMaterialVo">
-        select
-        id as id,
-        photo_id as photoId
-        from
-        ctop_kuaishou_report_daily_material
-        WHERE stat_date = #{statDate}
-        and signature is null
-        group by photo_id
-    </select>
-
-    <select id="getVideoGetByPhotoId" resultType="com.xxl.job.executor.batch.entity.vo.VideoGetvo">
-      select
-      signature as 'signature',
-      channel_type as 'channelType'
-      from ctop_kuaishou_video_get
-      where photo_id = #{photoId}
-      and signature is not null
-      limit 1
-    </select>
-
-
-    <select id="getVideoList" parameterType="java.util.Map"
-            resultType="com.xxl.job.executor.batch.entity.vo.KuaiShouVideoGetVo">
-
-        SELECT
-        sum(t1.charge) as 'charge',
-        t1.photo_id AS 'photoId',
-        t1.photo_url AS 'url',
-        t1.cover_url AS 'coverUrl',
-        t1.signature AS 'signature',
-        t2.material_type AS 'materialType'
-        FROM
-        ctop_kuaishou_report_daily_material t1
-        LEFT JOIN (
-        SELECT
-        material_type,
-        signature,
-        status
-        FROM
-        ctop_kuaishou_video_get
-        WHERE
-        account_id = #{accountId} group by signature) t2
-        ON t1.signature = t2.signature
-        WHERE
-        t1.account_id = #{accountId}
-        AND t1.channel_type = #{channelType}
-        AND t2.material_type = #{materialType}
-        AND t2.status = 0
-        <if test="startDate != null and startDate != '' ">
-            and t1.stat_date &gt;= #{startDate}
-        </if>
-        <if test="endDate != null and endDate != '' ">
-            and t1.stat_date &lt;= #{endDate}
-        </if>
-
-        GROUP BY
-        signature
-        ORDER BY
-        sum(t1.charge) DESC
-    </select>
-
-
-</mapper>

+ 0 - 60
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/xml/KuaiShouVideoGetMapper.xml

@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.xxl.job.executor.batch.mapper.KuaiShouVideoGetMapper">
-    <insert id="replaceBatch">
-        replace into ctop_kuaishou_video_get(
-        id,
-        account_id,
-        photo_id,
-        width,
-        height,
-        url,
-        cover_url,
-        material_type,
-        signature,
-        update_time
-        )
-        values
-        <foreach collection="videos" item="video" separator=",">
-            (
-            #{video.id},
-            #{video.accountId},
-            #{video.photoId},
-            #{video.width},
-            #{video.height},
-            #{video.url},
-            #{video.coverUrl},
-            #{video.materialType},
-            #{video.signature},
-            #{video.updateTime}
-
-            )
-        </foreach>
-    </insert>
-
-
-    <select id="getVideoList" parameterType="java.util.Map"
-            resultType="com.xxl.job.executor.batch.entity.vo.KuaiShouVideoGetVo">
-        select
-        stat_date as 'statDate',
-        photo_id as 'photoId',
-        url as 'url',
-        cover_url as 'coverUrl',
-        signature as 'signature',
-        material_type as 'materialType'
-        from ctop_kuaishou_video_get
-        where account_id = #{accountId}
-        and channel_type = #{channelType}
-        and material_type = #{materialType}
-        and status = 0
-        <if test="startDate != null and startDate != '' ">
-            and stat_date &gt;= #{startDate}
-        </if>
-        <if test="endDate != null and endDate != '' ">
-            and stat_date &lt;= #{endDate}
-        </if>
-        group by signature
-        order by stat_date desc
-    </select>
-
-</mapper>

+ 0 - 392
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/xml/KuaishouOperationRecordMapper.xml

@@ -1,392 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.xxl.job.executor.batch.mapper.KuaishouOperationRecordMapper">
-
-    <delete id="deleteOperationRecordInfoAccount">
-        delete
-        from
-        ctop_kuaishou_operation_record_account
-        where
-        account_id = #{record.accountId}
-        and
-        stat_date = #{record.statDate}
-        <!--
-        and
-        object_id = #{record.objectId}
-        and
-        operation_type = #{record.operationType}
-        and
-        operation_target = #{record.operationTarget}
-        and
-        role_type = #{record.roleType}
-        and
-        operation_time = #{record.operationTime}
-        -->
-    </delete>
-
-    <insert id="insertOperationRecordInfoAccount">
-        replace into
-        ctop_kuaishou_operation_record_account
-        (
-        account_id,
-        stat_date,
-        operation_time,
-        operation_type,
-        role_type,
-        object_name,
-        operation_target,
-        object_id,
-        log
-        )
-        values
-        <foreach item="record" index="index" collection="records"  separator="," >
-            (
-            #{record.accountId},
-            #{record.statDate},
-            #{record.operationTime},
-            #{record.operationType},
-            #{record.roleType},
-            #{record.objectName},
-            #{record.operationTarget},
-            #{record.objectId},
-            #{record.log}
-            )
-        </foreach>
-
-    </insert>
-
-
-
-
-
-    <delete id="deleteOperationRecordInfoCampaign">
-        delete
-        from
-        ctop_kuaishou_operation_record_campaign
-        where
-        account_id = #{record.accountId}
-        and
-        stat_date = #{record.statDate}
-        <!--
-           and
-           object_id = #{record.objectId}
-           and
-           operation_type = #{record.operationType}
-           and
-           operation_target = #{record.operationTarget}
-           and
-           role_type = #{record.roleType}
-           and
-           operation_time = #{record.operationTime}
-           -->
-    </delete>
-
-    <insert id="insertOperationRecordInfoCampaign">
-        replace into
-        ctop_kuaishou_operation_record_campaign
-        (
-        account_id,
-        stat_date,
-        operation_time,
-        operation_type,
-        role_type,
-        object_name,
-        operation_target,
-        object_id,
-        log
-        )
-        values
-        <foreach item="record" index="index" collection="records"  separator="," >
-            (
-            #{record.accountId},
-            #{record.statDate},
-            #{record.operationTime},
-            #{record.operationType},
-            #{record.roleType},
-            #{record.objectName},
-            #{record.operationTarget},
-            #{record.objectId},
-            #{record.log}
-            )
-        </foreach>
-
-    </insert>
-
-
-    <delete id="deleteOperationRecordInfoUnit">
-        delete
-        from
-        ctop_kuaishou_operation_record_unit
-        where
-        account_id = #{record.accountId}
-        and
-        stat_date = #{record.statDate}
-        <!--
-         and
-         object_id = #{record.objectId}
-         and
-         operation_type = #{record.operationType}
-         and
-         operation_target = #{record.operationTarget}
-         and
-         role_type = #{record.roleType}
-         and
-         operation_time = #{record.operationTime}
-         -->
-    </delete>
-
-    <insert id="insertOperationRecordInfoUnit">
-        replace into
-        ctop_kuaishou_operation_record_unit
-        (
-        account_id,
-        stat_date,
-        operation_time,
-        operation_type,
-        role_type,
-        object_name,
-        operation_target,
-        object_id,
-        log
-        )
-        values
-        <foreach item="record" index="index" collection="records"  separator="," >
-            (
-            #{record.accountId},
-            #{record.statDate},
-            #{record.operationTime},
-            #{record.operationType},
-            #{record.roleType},
-            #{record.objectName},
-            #{record.operationTarget},
-            #{record.objectId},
-            #{record.log}
-            )
-        </foreach>
-
-    </insert>
-
-
-
-
-    <delete id="deleteOperationRecordInfoCreative">
-        delete
-        from
-        ctop_kuaishou_operation_record_creative
-        where
-        account_id = #{record.accountId}
-        and
-        stat_date = #{record.statDate}
-        <!--
-        and
-        object_id = #{record.objectId}
-        and
-        operation_type = #{record.operationType}
-        and
-        operation_target = #{record.operationTarget}
-        and
-        role_type = #{record.roleType}
-        and
-        operation_time = #{record.operationTime}
-        -->
-    </delete>
-
-    <insert id="insertOperationRecordInfoCreative">
-        replace into
-        ctop_kuaishou_operation_record_creative
-        (
-        account_id,
-        stat_date,
-        operation_time,
-        operation_type,
-        role_type,
-        object_name,
-        operation_target,
-        object_id,
-        log
-        )
-        values
-        <foreach item="record" index="index" collection="records"  separator="," >
-            (
-            #{record.accountId},
-            #{record.statDate},
-            #{record.operationTime},
-            #{record.operationType},
-            #{record.roleType},
-            #{record.objectName},
-            #{record.operationTarget},
-            #{record.objectId},
-            #{record.log}
-            )
-        </foreach>
-
-    </insert>
-
-
-
-    <delete id="deleteOperationRecordInfoVideo">
-        delete
-        from
-        ctop_kuaishou_operation_record_video
-        where
-        account_id = #{record.accountId}
-        and
-        stat_date = #{record.statDate}
-        <!--
-        and
-        object_id = #{record.objectId}
-        and
-        operation_type = #{record.operationType}
-        and
-        operation_target = #{record.operationTarget}
-        and
-        role_type = #{record.roleType}
-        and
-        operation_time = #{record.operationTime}
-        -->
-    </delete>
-
-    <insert id="insertOperationRecordInfoVideo">
-        replace into
-        ctop_kuaishou_operation_record_video
-        (
-        account_id,
-        stat_date,
-        operation_time,
-        operation_type,
-        role_type,
-        object_name,
-        operation_target,
-        object_id,
-        log
-        )
-        values
-        <foreach item="record" index="index" collection="records"  separator="," >
-            (
-            #{record.accountId},
-            #{record.statDate},
-            #{record.operationTime},
-            #{record.operationType},
-            #{record.roleType},
-            #{record.objectName},
-            #{record.operationTarget},
-            #{record.objectId},
-            #{record.log}
-            )
-        </foreach>
-
-    </insert>
-
-
-
-
-    <delete id="deleteOperationRecordInfoApp">
-        delete
-        from
-        ctop_kuaishou_operation_record_app
-        where
-        account_id = #{record.accountId}
-        and
-        stat_date = #{record.statDate}
-        <!--
-        and
-        object_id = #{record.objectId}
-        and
-        operation_type = #{record.operationType}
-        and
-        operation_target = #{record.operationTarget}
-        and
-        role_type = #{record.roleType}
-        and
-        operation_time = #{record.operationTime}
-        -->
-    </delete>
-
-    <insert id="insertOperationRecordInfoApp">
-        replace into
-        ctop_kuaishou_operation_record_app
-        (
-        account_id,
-        stat_date,
-        operation_time,
-        operation_type,
-        role_type,
-        object_name,
-        operation_target,
-        object_id,
-        log
-        )
-        values
-        <foreach item="record" index="index" collection="records"  separator="," >
-            (
-            #{record.accountId},
-            #{record.statDate},
-            #{record.operationTime},
-            #{record.operationType},
-            #{record.roleType},
-            #{record.objectName},
-            #{record.operationTarget},
-            #{record.objectId},
-            #{record.log}
-            )
-        </foreach>
-
-    </insert>
-
-
-
-    <delete id="deleteOperationRecordInfoPackage">
-        delete
-        from
-        ctop_kuaishou_operation_record_package
-        where
-        account_id = #{record.accountId}
-        and
-        stat_date = #{record.statDate}
-        <!--
-        and
-        object_id = #{record.objectId}
-        and
-        operation_type = #{record.operationType}
-        and
-        operation_target = #{record.operationTarget}
-        and
-        role_type = #{record.roleType}
-        and
-        operation_time = #{record.operationTime}
-        -->
-    </delete>
-
-    <insert id="insertOperationRecordInfoPackage">
-        replace into
-        ctop_kuaishou_operation_record_package
-        (
-        account_id,
-        stat_date,
-        operation_time,
-        operation_type,
-        role_type,
-        object_name,
-        operation_target,
-        object_id,
-        log
-        )
-        values
-        <foreach item="record" index="index" collection="records"  separator="," >
-            (
-            #{record.accountId},
-            #{record.statDate},
-            #{record.operationTime},
-            #{record.operationType},
-            #{record.roleType},
-            #{record.objectName},
-            #{record.operationTarget},
-            #{record.objectId},
-            #{record.log}
-            )
-        </foreach>
-
-    </insert>
-
-
-</mapper>

+ 0 - 5
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/xml/KuaishouProgramCreativeMapper.xml

@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.xxl.job.executor.batch.mapper.KuaishouProgramCreativeMapper">
-
-</mapper>

+ 0 - 26
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/mapper/xml/MateriaRefuseMapper.xml

@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.xxl.job.executor.batch.mapper.MaterialRefuseMapper">
-
-    <select id="selectRefuseCreativeByAccountId" resultType="com.alibaba.fastjson.JSONObject">
-        select
-         t1.account_id accountId,
-         t1.campaign_id campaignId,
-         t1.unit_id unitId,
-         t1.creative_id creativeId,
-         t1.creative_name creativeName,
-         t2.url videoUrl,
-         t1.cover_url coverUrl,
-         t1.review_detail reviewDetail,
-         t1.description description
-    from
-        ctop_kuaishou_creative t1
-       left join ctop_kuaishou_video_get t2
-       on t1.account_id = t2.account_id
-       and t1.photo_id = t2.photo_id
-       where  t1.account_id = #{accountId}
-       and t1.status = 42
-       order by t1.creative_id desc
-    </select>
-
-</mapper>

+ 0 - 20
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/IKuaiShouAdvertiserBaseInfoService.java

@@ -1,20 +0,0 @@
-package com.xxl.job.executor.batch.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.xxl.job.executor.batch.entity.KuaiShouAdvertiserBaseInfo;
-
-import java.util.List;
-
-/**
- * 快手-广告主基本信息
- *
- * @author jeecg-boot
- * @version V1.0
- * @date 2019-09-18
- */
-public interface IKuaiShouAdvertiserBaseInfoService extends IService<KuaiShouAdvertiserBaseInfo> {
-
-    KuaiShouAdvertiserBaseInfo getBaseInfo(Long accountId);
-
-    List<KuaiShouAdvertiserBaseInfo> getAccountIdList(String userId);
-}

+ 0 - 14
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/IKuaiShouCampaignDayBudgetService.java

@@ -1,14 +0,0 @@
-package com.xxl.job.executor.batch.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.xxl.job.executor.batch.entity.KuaiShouCampaignDayBudget;
-
-/**
- * @Description: 快手-修改广告计划记录表
- * @Author: jeecg-boot
- * @Date: 2019-09-11
- * @Version: V1.0
- */
-public interface IKuaiShouCampaignDayBudgetService extends IService<KuaiShouCampaignDayBudget> {
-
-}

+ 0 - 20
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/IKuaiShouCampaignService.java

@@ -1,20 +0,0 @@
-package com.xxl.job.executor.batch.service;
-
-import com.alibaba.fastjson.JSONArray;
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.xxl.job.executor.batch.entity.KuaiShouCampaign;
-
-import java.util.List;
-
-/**
- * @Description: 快手-获取广告计划信息
- * @Author: jeecg-boot
- * @Date: 2019-07-23
- * @Version: V1.0
- */
-public interface IKuaiShouCampaignService extends IService<KuaiShouCampaign> {
-
-    void replaceBatch(List<KuaiShouCampaign> campaigns);
-
-    List<JSONArray> getJsonArrByAccount(Long accountId, int idSize);
-}

+ 0 - 19
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/IKuaiShouCommentService.java

@@ -1,19 +0,0 @@
-package com.xxl.job.executor.batch.service;
-
-/**
- * @author jeecg-boot
- * @version V1.0
- * @date 2019-12-19
- */
-public interface IKuaiShouCommentService {
-
-    /**
-     * 屏蔽评论,先查后屏蔽
-     *
-     * @param
-     * @return void
-     * @throws
-     * @author ZHAOXA
-     */
-    void shieldComment(Long accountId);
-}

+ 0 - 45
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/IKuaiShouCreativeService.java

@@ -1,45 +0,0 @@
-package com.xxl.job.executor.batch.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.xxl.job.executor.batch.entity.KuaiShouCreative;
-
-import java.util.List;
-
-/**
- * @Description: 快手-创意信息
- * @Author: jeecg-boot
- * @Date: 2019-07-23
- * @Version: V1.0
- */
-public interface IKuaiShouCreativeService extends IService<KuaiShouCreative> {
-
-    void replaceBatch(List<KuaiShouCreative> creatives);
-
-    /**
-     * 获取MD5
-     *
-     * @param creativeId
-     * @return
-     */
-    String getCodeByCreativeId(Long creativeId);
-
-    /**
-     * 创意条数
-     *
-     * @param accountId
-     * @param unitId
-     * @return
-     */
-    Integer checkCreativeCount(Long accountId, Long unitId);
-
-    void syncCreative(Long accountId, String accessToken, Long campaignId, Integer page);
-
-    /**
-     * 获取当前创意创建数
-     * @param accountId
-     * @param startTime
-     * @return
-     */
-
-    Integer getCreateCount(Long accountId, String startTime);
-}

+ 0 - 15
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/IKuaiShouDailyFlowsService.java

@@ -1,15 +0,0 @@
-package com.xxl.job.executor.batch.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.xxl.job.executor.batch.entity.KuaiShouDailyFlows;
-
-/**
- * 快手-日流水信息
- *
- * @author jeecg-boot
- * @version V1.0
- * @date 2019-12-05
- */
-public interface IKuaiShouDailyFlowsService extends IService<KuaiShouDailyFlows> {
-
-}

+ 0 - 18
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/IKuaiShouDailyReportTaskService.java

@@ -1,18 +0,0 @@
-package com.xxl.job.executor.batch.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.xxl.job.executor.batch.entity.KuaiShouDailyReportTask;
-
-/**
- * 分天记录表
- *
- * @author jeecg-boot
- * @version V1.0
- * @date 2020-03-12
- */
-public interface IKuaiShouDailyReportTaskService extends IService<KuaiShouDailyReportTask> {
-    void formatCreativeDailyReportData(Long accountId, String statDate);
-
-    void getTaskList(Long accountId, String token, String statDate);
-
-}

+ 0 - 19
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/IKuaiShouGroupService.java

@@ -1,19 +0,0 @@
-package com.xxl.job.executor.batch.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.xxl.job.executor.batch.entity.KuaiShouGroup;
-
-/**
- * @Description: 广告组信息
- * @Author: jeecg-boot
- * @Date: 2019-07-23
- * @Version: V1.0
- */
-public interface IKuaiShouGroupService extends IService<KuaiShouGroup> {
-
-    void getGroupList(String accessToken, Long accountId);
-
-    void getGroupByUnitId(String accessToken, Long accountId, Long unitId);
-
-    void getCreativeByUnit(String accessToken, Long accountId, Long unitId);
-}

+ 0 - 15
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/IKuaiShouGroupTargetService.java

@@ -1,15 +0,0 @@
-package com.xxl.job.executor.batch.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.xxl.job.executor.batch.entity.KuaiShouGroupTarget;
-
-/**
- * 快手-定向信息
- *
- * @author jeecg-boot
- * @version V1.0
- * @date 2019-12-17
- */
-public interface IKuaiShouGroupTargetService extends IService<KuaiShouGroupTarget> {
-
-}

+ 0 - 21
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/IKuaiShouHistoryReportTaskService.java

@@ -1,21 +0,0 @@
-package com.xxl.job.executor.batch.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.xxl.job.executor.batch.entity.KuaiShouHistoryReportTask;
-
-/**
- * 快手历史数据任务记录
- *
- * @author jeecg-boot
- * @version V1.0
- * @date 2020-03-09
- */
-public interface IKuaiShouHistoryReportTaskService extends IService<KuaiShouHistoryReportTask> {
-    void createTask(Long accountId, String token, String startDate, String endDate, String taskType);
-
-    void getTaskList();
-
-    void getMd5(String statDate, Long accountId);
-
-    void getMd5V2(String statDate);
-}

+ 0 - 18
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/IKuaiShouImageGetService.java

@@ -1,18 +0,0 @@
-package com.xxl.job.executor.batch.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.xxl.job.executor.batch.entity.KuaiShouImageGet;
-
-import java.util.List;
-
-/**
- * @Description: 快手-获取图片接口
- * @Author: jeecg-boot
- * @Date: 2019-07-25
- * @Version: V1.0
- */
-public interface IKuaiShouImageGetService extends IService<KuaiShouImageGet> {
-    void replaceBatch(List<KuaiShouImageGet> imageGets);
-
-    String getUrlByCode(String signature);
-}

+ 0 - 9
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/IKuaiShouMaterialUploadService.java

@@ -1,9 +0,0 @@
-package com.xxl.job.executor.batch.service;
-
-import com.alibaba.fastjson.JSONObject;
-
-public interface IKuaiShouMaterialUploadService {
-    JSONObject video(String url, Integer type, Long accountId, String accessToken, String signature);
-
-    String kuauiShouImageUpload(String url, String signature, Long accountId, String token);
-}

+ 0 - 14
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/IKuaiShouReportDailyMaterialService.java

@@ -1,14 +0,0 @@
-package com.xxl.job.executor.batch.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.xxl.job.executor.report.entity.KuaiShouReportDailyMaterial;
-
-/**
- * @Description: 素材
- * @Author: jeecg-boot
- * @Date: 2020-09-09
- * @Version: V1.0
- */
-public interface IKuaiShouReportDailyMaterialService extends IService<KuaiShouReportDailyMaterial> {
-    void getMaterialReportByAccountIdAndStatDate(Long accountId, String token, String startDate, String endDate, Integer page);
-}

+ 0 - 22
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/IKuaiShouVideoGetService.java

@@ -1,22 +0,0 @@
-package com.xxl.job.executor.batch.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.xxl.job.executor.batch.entity.KuaiShouVideoGet;
-import com.xxl.job.executor.batch.entity.vo.KuaiShouVideoGetVo;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * @Description: 快手-获取视频接口
- * @Author: jeecg-boot
- * @Date: 2019-07-25
- * @Version: V1.0
- */
-public interface IKuaiShouVideoGetService extends IService<KuaiShouVideoGet> {
-    void replaceBatch(List<KuaiShouVideoGet> videoGets);
-
-    void getKeyFrame(String token, Long accountId, String videoMd5, String photoId);
-
-    List<KuaiShouVideoGetVo> getVideoList(Map<String, Object> stringObjectMap);
-}

+ 0 - 337
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/IKuaishouInterfaceService.java

@@ -1,337 +0,0 @@
-package com.xxl.job.executor.batch.service;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.xxl.job.executor.common.entity.CtopOauthToken;
-import com.xxl.job.executor.material.entity.KuaishouResult;
-import com.xxl.job.executor.material.entity.KuaishouResultToken;
-import com.xxl.job.executor.report.entity.*;
-
-import java.util.Date;
-import java.util.Map;
-
-/**
- * @author yumeng
- * 2019年11月12日11:08:52
- */
-public interface IKuaishouInterfaceService {
-
-    /**
-     * 计划日报
-     *
-     * @param accessToken
-     * @param advertiserId
-     * @param startDate
-     * @param endDate
-     * @param pageSize
-     * @param pageNum
-     * @return
-     */
-    KuaishouResult<KuaishouReportDailyCampaign> getCampaignDailyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum);
-
-    /**
-     * 计划时报
-     *
-     * @param accessToken
-     * @param advertiserId
-     * @param startDate
-     * @param endDate
-     * @param pageSize
-     * @param pageNum
-     * @return
-     */
-    KuaishouResult<KuaishouReportHourlyCampaign> getCampaignHourlyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum);
-
-    /**
-     * 组日报
-     *
-     * @param accessToken
-     * @param advertiserId
-     * @param startDate
-     * @param endDate
-     * @param pageSize
-     * @param pageNum
-     * @return
-     */
-    KuaishouResult<KuaishouReportDailyGroup> getGroupDailyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum);
-
-    /**
-     * 组时报
-     *
-     * @param accessToken
-     * @param advertiserId
-     * @param startDate
-     * @param endDate
-     * @param pageSize
-     * @param pageNum
-     * @return
-     */
-    KuaishouResult<KuaishouReportHourlyGroup> getGroupHourlyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum);
-
-    /**
-     * 创意日报 暂停使用
-     *
-     * @param accessToken
-     * @param advertiserId
-     * @param startDate
-     * @param endDate
-     * @param pageSize
-     * @param pageNum
-     * @return
-     */
-    KuaishouResult<KuaishouReportDailyCreative> getCreativeDailyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum);
-
-    /**
-     * 创意时报 暂停使用
-     *
-     * @param accessToken
-     * @param advertiserId
-     * @param startDate
-     * @param endDate
-     * @param pageSize
-     * @param pageNum
-     * @return
-     */
-    KuaishouResult<KuaishouReportHourlyCreative> getCreativeHourlyReport(String accessToken, Long advertiserId, String startDate, String endDate, int pageSize, int pageNum);
-
-    /**
-     * 获取广告计划信息  单条
-     *
-     * @param accessToken
-     * @param advertiserId
-     */
-    void getCampaign(String accessToken, Long advertiserId, Long campaignId);
-
-
-    /**
-     * 获取创意列表
-     *
-     * @param token
-     * @param startDate
-     * @param endDate
-     */
-    void getCreativeList(CtopOauthToken token, Date startDate, Date endDate);
-
-    /**
-     * 获取视频信息
-     *
-     * @param accessToken
-     * @param advertiserId
-     * @param photoId
-     */
-    void getVideoInfo(String accessToken, Long advertiserId, String photoId);
-
-
-    /**
-     * 获取token
-     *
-     * @param authCode
-     * @return
-     */
-    KuaishouResultToken getAccessToken(String authCode, Integer agentType);
-
-    /**
-     * 取可选的深度转化类型
-     *
-     * @param advertiserId
-     * @param accessToken
-     * @return
-     */
-    JSONObject getDeepConversionInfosV2(Long advertiserId, String accessToken);
-
-    /**
-     * 根据创意id 获取创意信息
-     *
-     * @param accessToken
-     * @param advertiserId
-     * @param creativeId
-     */
-    void getCreativeByCreativeId(String accessToken, Long advertiserId, Long creativeId);
-
-    /**
-     * 获取视频
-     *
-     * @param advertiserId
-     * @param accessToken
-     * @param photoId
-     */
-    void videoGet(Long advertiserId, String accessToken, String photoId, String signature);
-
-    /**
-     * 获取图片信息
-     *
-     * @param advertiserId
-     * @param accessToken
-     * @param imageToken
-     */
-    void imageGet(Long advertiserId, String accessToken, String imageToken);
-
-    /**
-     * 文件上传 发送请求
-     *
-     * @param url
-     * @param paramMap
-     * @param headerMap
-     * @param filePath
-     */
-    String exceptInfoForRestTemplate(String url, Map<String, Object> paramMap, Map<String, String> headerMap, String filePath);
-
-    /**
-     * 快手 广告主信息
-     *
-     * @param accountId
-     * @param accessToken
-     * @return
-     */
-    Map<String, Object> advertiserInfo(Long accountId, String accessToken);
-
-    /**
-     * 获取视频列表
-     *
-     * @param token
-     * @param
-     */
-    void getVideoList(CtopOauthToken token, String startDate, String endDate);
-
-    /**
-     * 获取广告主分天报表
-     *
-     * @param token
-     * @param startDate
-     * @param endDate
-     */
-    void getAdvertiserReportDaily(CtopOauthToken token, Date startDate, Date endDate);
-
-    /**
-     * 获取计划分天报表
-     *
-     * @param token
-     * @param startDate
-     * @param endDate
-     */
-    void getAdvertiserCampaignReportDaily(CtopOauthToken token, Date startDate, Date endDate);
-
-    /**
-     * 获取广告计划分天报表 暂停使用
-     *
-     * @param token
-     * @param startDate
-     * @param endDate
-     */
-    void getAdvertiserGroupReportDaily(CtopOauthToken token, Date startDate, Date endDate);
-
-    /**
-     * 获取创意分天报表 暂停使用
-     *
-     * @param token
-     * @param startDate
-     * @param endDate
-     * @param campaignIds
-     */
-    void getAdvertiserCreativeReportDaily(CtopOauthToken token, Date startDate, Date endDate, JSONArray campaignIds, JSONArray creativeIds);
-
-    /**
-     * 获取广告主时报
-     *
-     * @param token
-     * @param startDate
-     * @param endDate
-     */
-    void getAdvertiserReportHourly(CtopOauthToken token, Date startDate, Date endDate);
-
-    /**
-     * 获取计划时报
-     *
-     * @param token
-     * @param startDate
-     * @param endDate
-     */
-    void getAdvertiserCampaignReportHourly(CtopOauthToken token, Date startDate, Date endDate);
-
-    /**
-     * 获取组时报
-     *
-     * @param token
-     * @param startDate
-     * @param endDate
-     */
-    void getAdvertiserGroupReportHourly(CtopOauthToken token, Date startDate, Date endDate);
-
-    /**
-     * 获取创意时报 暂停使用
-     *
-     * @param token
-     * @param startDate
-     * @param endDate
-     */
-    void getAdvertiserCreativeReportHourly(CtopOauthToken token, Date startDate, Date endDate);
-
-    /**
-     * 获取计划列表
-     *
-     * @param token
-     * @param startDate
-     * @param endDate
-     */
-    void getCampaignList(CtopOauthToken token, Date startDate, Date endDate);
-
-    /**
-     * 获取组列表
-     *
-     * @param token
-     * @param startDate
-     * @param endDate
-     */
-    void getGroupList(CtopOauthToken token, Date startDate, Date endDate);
-
-
-    /**
-     * 获取快手图片列表
-     *
-     * @param token
-     */
-    void getImageList(CtopOauthToken token, String statDate);
-
-
-    /**
-     * 获取账户余额
-     *
-     * @param oauthToken
-     * @return
-     */
-    JSONObject fundGet(CtopOauthToken oauthToken);
-
-
-    /**
-     * 获取账户流水数据
-     *
-     * @param token
-     */
-    void getDailyFlows(CtopOauthToken token);
-
-    /**
-     * 获取素造素材列表
-     *
-     * @param token
-     * @param accountId
-     * @param page
-     */
-    void getSuZaoList(String token, Long accountId, int page, String startDate, String endDate);
-
-    /**
-     * 异步获取创意信息
-     *
-     * @param accountId
-     * @param accessToken
-     * @param campaignId
-     */
-
-    void getAsyncCreativeList(Long accountId, String accessToken, Long campaignId);
-
-    void getCreativeByCreativeIds(String accessToken, Long advertiserId, JSONArray creativeIds);
-
-    void getOperationRecord(Long advertiserId, String accessToken, Integer operationTarget, String startDate, String endDate);
-}
-
-
-

+ 0 - 21
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/IKuaishouProgramCreativeService.java

@@ -1,21 +0,0 @@
-package com.xxl.job.executor.batch.service;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.xxl.job.executor.batch.entity.KuaishouProgramCreative;
-import com.xxl.job.executor.common.entity.CtopOauthToken;
-
-/**
- * @Description: 快手-程序化创意
- * @Author: jeecg-boot
- * @Date: 2020-09-22
- * @Version: V1.0
- */
-public interface IKuaishouProgramCreativeService extends IService<KuaishouProgramCreative> {
-    void getProgramCreative(Long accountId, Long unitId, String accessToken, String startDate, String endDate, Integer page);
-
-    JSONObject createProgramCreative(CtopOauthToken oauthToken, JSONObject requestJson);
-
-    JSONArray getProgramCreativeCover(JSONArray md5Arr);
-}

+ 0 - 9
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/IKuaishouRealTimeDataService.java

@@ -1,9 +0,0 @@
-package com.xxl.job.executor.batch.service;
-
-import com.alibaba.fastjson.JSONArray;
-
-public interface IKuaishouRealTimeDataService {
-    JSONArray getCampaignDate(Long accountId, String token, Long campaignId, String startDate, String endDate);
-
-    JSONArray getUnitDate(Long accountId, String token, Long unitId, String startDate, String endDate);
-}

+ 0 - 103
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/impl/IKuaiShouCommentServiceImpl.java

@@ -1,103 +0,0 @@
-package com.xxl.job.executor.batch.service.impl;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.xxl.job.core.enums.NoEn;
-import com.xxl.job.executor.batch.service.IKuaiShouCommentService;
-import com.xxl.job.executor.common.entity.CtopOauthToken;
-import com.xxl.job.executor.common.service.ICtopOauthTokenService;
-import com.xxl.job.executor.constant.KuaishouInterfaceConstant;
-import com.xxl.job.executor.utils.Check;
-import com.xxl.job.executor.utils.HttpUtils;
-import com.xxl.job.executor.utils.PropertiesUtils;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * 评论
- */
-@Slf4j
-@Service
-public class IKuaiShouCommentServiceImpl implements IKuaiShouCommentService {
-
-    @Autowired
-    private ICtopOauthTokenService oauthTokenService;
-
-    @Override
-    public void shieldComment(Long accountId) {
-        CtopOauthToken oauthToken = oauthTokenService.getTokenByAccountId(accountId);
-        queryComments(oauthToken.getAccessToken(), accountId, 1, 500, 0);
-    }
-
-    /**
-     * 查询评论
-     *
-     * @param
-     * @return com.alibaba.fastjson.JSONArray
-     * @throws
-     * @author ZHAOXA
-     */
-    private JSONArray queryComments(String token, Long accountId, int page, int pageSize, int num) {
-        String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.COMMENT_LIST;
-        Map<String, String> header = new HashMap<>();
-        header.put("Access-Token", token);
-        header.put("Content-Type", "application/json");
-        JSONObject params = new JSONObject();
-        params.put("advertiser_id", accountId);
-        params.put("shield_status", NoEn.NO1.valueInt());//未隐藏数据
-        params.put("page", page);
-        params.put("page_size", pageSize);
-        String result = HttpUtils.httpPostRequest(url, params, header);
-        JSONObject resultJson = JSONObject.parseObject(result);
-        if (!Check.isNull(resultJson)) {
-            Integer code = resultJson.getInteger("code");
-            if (code == 0) {
-                JSONObject dataJson = resultJson.getJSONObject("data");
-                JSONArray details = dataJson.getJSONArray("details");
-                if (!Check.isNull(details)) {
-                    if (num <= 50) {
-                        if (shieldCommentApi(token, accountId, details)) {
-                            queryComments(token, accountId, page, pageSize, ++num);
-                        }
-                    }
-                }
-                return null;
-            } else {
-                log.error("查询评论列表数据接口返回信息错误:accountId:{},返回信息:{}", accountId, resultJson);
-            }
-        }
-        return null;
-    }
-
-    /**
-     * 执行屏蔽接口
-     *
-     * @param
-     * @return com.alibaba.fastjson.JSONArray
-     * @throws
-     * @author ZHAOXA
-     */
-    private boolean shieldCommentApi(String token, Long accountId, JSONArray comments) {
-        if (Check.isNull(comments)) {
-            return false;
-        }
-        String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.COMMENT_SHIELD;
-        Map<String, String> header = new HashMap<>();
-        header.put("Access-Token", token);
-        header.put("Content-Type", "application/json");
-        JSONObject params = new JSONObject();
-        params.put("advertiser_id", accountId);
-        params.put("shield_list", comments);
-        String result = HttpUtils.httpPostRequest(url, params, header);
-        JSONObject resultJson = JSONObject.parseObject(result);
-        if (!Check.isNull(resultJson)) {
-            Integer code = resultJson.getInteger("code");
-            return code == 0;
-        }
-        return false;
-    }
-}

+ 0 - 52
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/impl/KuaiShouAdvertiserBaseInfoServiceImpl.java

@@ -1,52 +0,0 @@
-package com.xxl.job.executor.batch.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.xxl.job.executor.batch.entity.KuaiShouAdvertiserBaseInfo;
-import com.xxl.job.executor.batch.mapper.KuaiShouAdvertiserBaseInfoMapper;
-import com.xxl.job.executor.batch.service.IKuaiShouAdvertiserBaseInfoService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-/**
- * 快手-广告主基本信息
- *
- * @author jeecg-boot
- * @version V1.0
- * @date 2019-09-18
- */
-@Service
-public class KuaiShouAdvertiserBaseInfoServiceImpl extends ServiceImpl<KuaiShouAdvertiserBaseInfoMapper, KuaiShouAdvertiserBaseInfo> implements IKuaiShouAdvertiserBaseInfoService {
-    @Autowired
-    private KuaiShouAdvertiserBaseInfoMapper advertiserBaseInfoMapper;
-
-    /**
-     * 根据accountId获取对象
-     *
-     * @param accountId
-     * @return
-     */
-    @Override
-    public KuaiShouAdvertiserBaseInfo getBaseInfo(Long accountId) {
-        QueryWrapper<KuaiShouAdvertiserBaseInfo> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("account_id", accountId);
-        queryWrapper.last("limit 1");
-        return advertiserBaseInfoMapper.selectOne(queryWrapper);
-    }
-
-    /**
-     * 获取账户列表
-     *
-     * @param userId
-     * @return
-     */
-    @Override
-    public List<KuaiShouAdvertiserBaseInfo> getAccountIdList(String userId) {
-        QueryWrapper<KuaiShouAdvertiserBaseInfo> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("user_id", userId);
-        queryWrapper.groupBy("account_id");
-        return advertiserBaseInfoMapper.selectList(queryWrapper);
-    }
-}

+ 0 - 18
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/impl/KuaiShouCampaignDayBudgetServiceImpl.java

@@ -1,18 +0,0 @@
-package com.xxl.job.executor.batch.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.xxl.job.executor.batch.entity.KuaiShouCampaignDayBudget;
-import com.xxl.job.executor.batch.mapper.KuaiShouCampaignDayBudgetMapper;
-import com.xxl.job.executor.batch.service.IKuaiShouCampaignDayBudgetService;
-import org.springframework.stereotype.Service;
-
-/**
- * @Description: 快手-修改广告计划记录表
- * @Author: jeecg-boot
- * @Date: 2019-09-11
- * @Version: V1.0
- */
-@Service
-public class KuaiShouCampaignDayBudgetServiceImpl extends ServiceImpl<KuaiShouCampaignDayBudgetMapper, KuaiShouCampaignDayBudget> implements IKuaiShouCampaignDayBudgetService {
-
-}

+ 0 - 63
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/impl/KuaiShouCampaignServiceImpl.java

@@ -1,63 +0,0 @@
-package com.xxl.job.executor.batch.service.impl;
-
-import com.alibaba.fastjson.JSONArray;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.xxl.job.executor.batch.entity.KuaiShouCampaign;
-import com.xxl.job.executor.batch.mapper.KuaiShouCampaignMapper;
-import com.xxl.job.executor.batch.service.IKuaiShouCampaignService;
-import com.xxl.job.executor.utils.Check;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @Description: 快手-获取广告计划信息
- * @Author: jeecg-boot
- * @Date: 2019-07-23
- * @Version: V1.0
- */
-@Service
-public class KuaiShouCampaignServiceImpl extends ServiceImpl<KuaiShouCampaignMapper, KuaiShouCampaign> implements IKuaiShouCampaignService {
-    @Autowired
-    private KuaiShouCampaignMapper campaignMapper;
-
-    @Override
-    public void replaceBatch(List<KuaiShouCampaign> campaigns) {
-        campaignMapper.replaceBatch(campaigns);
-    }
-
-
-    /**
-     * 获取创意
-     *
-     * @param accountId
-     * @return
-     */
-    @Override
-    public List<JSONArray> getJsonArrByAccount(Long accountId, int idSize) {
-        QueryWrapper<KuaiShouCampaign> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("account_id", accountId);
-        List<KuaiShouCampaign> list = this.list(queryWrapper);
-        List<JSONArray> campaignArr = new ArrayList<>();
-        if (!Check.isNull(list)) {
-            int arrSize = list.size() % idSize == 0 ? list.size() / idSize : list.size() / idSize + 1;
-            for (int i = 0; i < arrSize; i++) {
-                JSONArray arr = new JSONArray();
-                for (int j = i * idSize; j <= idSize * (i + 1) - 1; j++) {
-                    if (j <= list.size() - 1) {
-                        KuaiShouCampaign campaign = list.get(i);
-                        arr.add(campaign.getCampaignId());
-                    }
-                }
-                campaignArr.add(arr);
-            }
-            return campaignArr;
-        }
-
-        return null;
-    }
-
-}

+ 0 - 189
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/impl/KuaiShouCreativeServiceImpl.java

@@ -1,189 +0,0 @@
-package com.xxl.job.executor.batch.service.impl;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.xxl.job.executor.batch.entity.KuaiShouCreative;
-import com.xxl.job.executor.batch.entity.KuaiShouVideoGet;
-import com.xxl.job.executor.batch.mapper.KuaiShouCreativeMapper;
-import com.xxl.job.executor.batch.mapper.KuaiShouVideoGetMapper;
-import com.xxl.job.executor.batch.service.IKuaiShouCreativeService;
-import com.xxl.job.executor.constant.KuaishouInterfaceConstant;
-import com.xxl.job.executor.utils.Check;
-import com.xxl.job.executor.utils.HttpUtils;
-import com.xxl.job.executor.utils.PropertiesUtils;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.*;
-
-/**
- * @Description: 快手-创意信息
- * @Author: jeecg-boot
- * @Date: 2019-07-23
- * @Version: V1.0
- */
-@Slf4j
-@Service
-public class KuaiShouCreativeServiceImpl extends ServiceImpl<KuaiShouCreativeMapper, KuaiShouCreative> implements IKuaiShouCreativeService {
-    @Autowired
-    private KuaiShouCreativeMapper kuaiShouCreativeMapper;
-    @Autowired
-    private KuaiShouVideoGetMapper kuaiShouVideoGetMapper;
-
-    @Override
-    public void replaceBatch(List<KuaiShouCreative> creatives) {
-        kuaiShouCreativeMapper.replaceBatch(creatives);
-    }
-
-    @Override
-    public String getCodeByCreativeId(Long creativeId) {
-        QueryWrapper<KuaiShouCreative> creativeQueryWrapper = new QueryWrapper<>();
-        creativeQueryWrapper.eq("creative_id", creativeId);
-        creativeQueryWrapper.orderByDesc("create_time");
-        creativeQueryWrapper.last("limit 1");
-        KuaiShouCreative kuaiShouCreative = kuaiShouCreativeMapper.selectOne(creativeQueryWrapper);
-        if (!Check.isNull(kuaiShouCreative)) {
-            String photoId = kuaiShouCreative.getPhotoId();
-            if (!Check.isNull(photoId)) {
-                QueryWrapper<KuaiShouVideoGet> videoGetQueryWrapper = new QueryWrapper<>();
-                videoGetQueryWrapper.eq("photo_id", photoId);
-                videoGetQueryWrapper.orderByDesc("create_time");
-                videoGetQueryWrapper.last("limit 1");
-                KuaiShouVideoGet kuaiShouVideoGet = kuaiShouVideoGetMapper.selectOne(videoGetQueryWrapper);
-                if (!Check.isNull(kuaiShouVideoGet)) {
-                    return kuaiShouVideoGet.getSignature();
-                }
-            }
-        }
-        return null;
-    }
-
-    /**
-     * 创意条数
-     *
-     * @param accountId
-     * @param unitId
-     * @return
-     */
-    @Override
-    public Integer checkCreativeCount(Long accountId, Long unitId) {
-        return kuaiShouCreativeMapper.checkCreativeCount(accountId, unitId);
-    }
-
-    @Override
-    public void syncCreative(Long accountId, String accessToken, Long campaignId, Integer page) {
-
-
-        String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.CREATIVE_LIST;
-        Map<String, String> headers = new HashMap<>();
-        headers.put("Content-Type", " application/json");
-        headers.put("Access-Token", accessToken);
-        JSONObject param = new JSONObject();
-        param.put("advertiser_id", accountId);
-        if (!Check.isNull(campaignId)) {
-            param.put("campaign_id", campaignId);
-        }
-        param.put("page_size", 200);
-        param.put("page", page);
-
-        String result = HttpUtils.kuaiShouhttpPostRequest(url, param.toJSONString(), headers);
-        JSONObject resultJson = JSONObject.parseObject(result);
-        if (Check.isNull(resultJson)) {
-            log.error("获取广告创意返回结果为空,advertiserId:{}", accountId);
-            return;
-        }
-        Integer code = resultJson.getInteger("code");
-        String message = resultJson.getString("message");
-        if (null == code || code != 0) {
-            log.error("获取广告创意返回结果异常,advertiserId:{},message:{}", accountId, message);
-            return;
-        }
-        JSONArray details = resultJson.getJSONObject("data").getJSONArray("details");
-        if (null == details || details.size() <= 0) {
-            return;
-        }
-        List<KuaiShouCreative> creatives = new ArrayList<>();
-        for (int i = 0; i < details.size(); i++) {
-            JSONObject detailJson = JSONObject.parseObject(details.get(i).toString());
-            if (!Check.isNull(detailJson)) {
-                KuaiShouCreative creative = new KuaiShouCreative();
-                creative.setId("" + accountId + detailJson.getLong("creative_id"));
-                creative.setAccountId(accountId);
-                creative.setCampaignId(detailJson.getLong("campaign_id"));
-                creative.setUnitId(detailJson.getLong("unit_id"));
-                creative.setCreativeId(detailJson.getLong("creative_id"));
-                creative.setCreativeName(detailJson.getString("creative_name"));
-                creative.setCreativeMaterialType(detailJson.getInteger("creative_material_type"));
-                if (!Check.isNull(detailJson.getJSONArray("material_url"))) {
-                    creative.setMaterialUrl(detailJson.getJSONArray("material_url").toJSONString());
-                }
-
-                if (!Check.isNull(detailJson.getJSONArray("image_tokens"))) {
-                    creative.setImageTokens(detailJson.getJSONArray("image_tokens").toJSONString());
-                }
-                creative.setStatus(detailJson.getInteger("status"));
-                creative.setPutStatus(detailJson.getInteger("put_status"));
-                creative.setCreateChannel(detailJson.getInteger("create_channel"));
-                creative.setReviewDetail(detailJson.getString("review_detail"));
-                creative.setCoverUrl(detailJson.getString("cover_url"));
-                creative.setImageToken(detailJson.getString("image_token"));
-                creative.setCoverWidth(detailJson.getString("cover_width"));
-                creative.setCoverHeight(detailJson.getString("cover_height"));
-                creative.setOverlayBgUrl(detailJson.getString("overlay_bg_url"));
-                creative.setOverlayBgImageToken(detailJson.getString("overlay_bg_image_token"));
-                creative.setStickerTitle(detailJson.getString("sticker_title"));
-                creative.setOverlayType(detailJson.getString("overlay_type"));
-                creative.setClickTrackUrl(detailJson.getString("click_track_url"));
-                creative.setImpressionUrl(detailJson.getString("impression_url"));
-                creative.setAdPhotoPlayedT3sUrl(detailJson.getString("ad_photo_played_t3s_url"));
-                creative.setCreativeCreateTime(detailJson.getDate("create_time"));
-                creative.setCreativeUpdateTime(detailJson.getDate("update_time"));
-                creative.setFirstFrameType(detailJson.getInteger("first_frame_type"));
-                creative.setShortSlogan(detailJson.getString("short_slogan"));
-                creative.setActionbarClickUrl(detailJson.getString("actionbar_click_url"));
-                JSONObject displayInfoJson = detailJson.getJSONObject("display_info");
-                if (!Check.isNull(displayInfoJson)) {
-                    creative.setDescription(displayInfoJson.getString("description"));
-                    creative.setActionBarText(displayInfoJson.getString("action_bar_text"));
-                }
-                creative.setCreativeCategory(detailJson.getInteger("creative_category"));
-                if (!Check.isNull(detailJson.getJSONArray("creative_tag"))) {
-                    creative.setCreativeTag(detailJson.getJSONArray("creative_tag").toJSONString());
-                }
-                creative.setCreateTime(new Date());
-                creative.setUpdateTime(new Date());
-                creative.setSiteId(detailJson.getLong("site_id"));
-                creative.setPhotoId(detailJson.getString("photo_id"));
-                if (detailJson.getLong("photo_id") == 0) {
-                    JSONArray photoIds = new JSONArray();
-                    JSONObject programmed_creative_material = detailJson.getJSONObject("programmed_creative_material");
-                    if (!Check.isNull(programmed_creative_material)) {
-                        creative.setProgrammedCreativeMaterial(programmed_creative_material.toJSONString());
-                        JSONArray materials = programmed_creative_material.getJSONArray("materials");
-                        if (!Check.isNull(materials)) {
-                            for (int j = 0; j < materials.size(); j++) {
-                                JSONObject materialJson = materials.getJSONObject(j);
-                                if (!Check.isNull(materialJson)) {
-                                    Long photo_id = materialJson.getLong("photo_id");
-                                    photoIds.add(String.valueOf(photo_id));
-                                }
-                            }
-                            creative.setPhotoIds(photoIds.toJSONString());
-                        }
-                    }
-                }
-                creatives.add(creative);
-            }
-        }
-        this.replaceBatch(creatives);
-        this.syncCreative(accountId, accessToken, campaignId, page + 1);
-    }
-
-    @Override
-    public Integer getCreateCount(Long accountId, String startTime) {
-        return kuaiShouCreativeMapper.getCreateCount(accountId, startTime);
-    }
-}

+ 0 - 19
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/impl/KuaiShouDailyFlowsServiceImpl.java

@@ -1,19 +0,0 @@
-package com.xxl.job.executor.batch.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.xxl.job.executor.batch.entity.KuaiShouDailyFlows;
-import com.xxl.job.executor.batch.mapper.KuaiShouDailyFlowsMapper;
-import com.xxl.job.executor.batch.service.IKuaiShouDailyFlowsService;
-import org.springframework.stereotype.Service;
-
-/**
- * 快手-日流水信息
- *
- * @author jeecg-boot
- * @version V1.0
- * @date 2019-12-05
- */
-@Service
-public class KuaiShouDailyFlowsServiceImpl extends ServiceImpl<KuaiShouDailyFlowsMapper, KuaiShouDailyFlows> implements IKuaiShouDailyFlowsService {
-
-}

+ 0 - 177
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/impl/KuaiShouDailyReportTaskServiceImpl.java

@@ -1,177 +0,0 @@
-package com.xxl.job.executor.batch.service.impl;
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.xxl.job.executor.batch.entity.KuaiShouDailyReportTask;
-import com.xxl.job.executor.batch.mapper.KuaiShouDailyReportTaskMapper;
-import com.xxl.job.executor.batch.mapper.KuaiShouReportDailyMaterialMapper;
-import com.xxl.job.executor.batch.service.IKuaiShouDailyReportTaskService;
-import com.xxl.job.executor.batch.service.IKuaiShouHistoryReportTaskService;
-import com.xxl.job.executor.constant.KuaishouInterfaceConstant;
-import com.xxl.job.executor.report.mapper.KuaishouReportDailyCampaignMapper;
-import com.xxl.job.executor.report.mapper.KuaishouReportDailyCreativeMapper;
-import com.xxl.job.executor.report.mapper.KuaishouReportDailyGroupMapper;
-import com.xxl.job.executor.report.mapper.KuaishouReportDailyImageMapper;
-import com.xxl.job.executor.utils.Check;
-import com.xxl.job.executor.utils.HttpUtils;
-import com.xxl.job.executor.utils.LoadFileUtil;
-import com.xxl.job.executor.utils.PropertiesUtils;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Service;
-
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 分天记录表
- *
- * @author jeecg-boot
- * @version V1.0
- * @date 2020-03-12
- */
-@Slf4j
-@Service
-public class KuaiShouDailyReportTaskServiceImpl extends ServiceImpl<KuaiShouDailyReportTaskMapper, KuaiShouDailyReportTask> implements IKuaiShouDailyReportTaskService {
-    @Value("${jeecg.path.report-daily}")
-    private String downloadPath;
-    @Autowired
-    private KuaishouReportDailyCampaignMapper reportDailyCampaignMapper;
-    @Autowired
-    private KuaishouReportDailyGroupMapper reportDailyGroupMapper;
-    @Autowired
-    private KuaishouReportDailyCreativeMapper reportDailyCreativeMapper;
-    @Autowired
-    private KuaiShouReportDailyMaterialMapper kuaishouReportDailyMaterialMapper;
-    @Autowired
-    private IKuaiShouHistoryReportTaskService kuaiShouHistoryReportTaskService;
-    @Autowired
-    private KuaishouReportDailyImageMapper kuaishouReportDailyImageMapper;
-
-    @Override
-    public void formatCreativeDailyReportData(Long accountId, String statDate) {
-        reportDailyCreativeMapper.formatCreativeDailyReportData(accountId, statDate);
-    }
-
-    /**
-     * 获取任务列表
-     */
-    @Override
-    public void getTaskList(Long accountId, String token, String statDate) {
-        QueryWrapper<KuaiShouDailyReportTask> taskQueryWrapper = new QueryWrapper<>();
-        taskQueryWrapper.eq("task_status", 0);
-        taskQueryWrapper.eq("account_id", accountId);
-        taskQueryWrapper.eq("stat_date", statDate);
-        taskQueryWrapper.orderByDesc("create_time");
-        List<KuaiShouDailyReportTask> dailyTaskList = this.list(taskQueryWrapper);
-        if (!Check.isNull(dailyTaskList)) {
-            for (KuaiShouDailyReportTask task : dailyTaskList) {
-                String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.ASYNC_TASK_LIST;
-                Map<String, String> headers = new HashMap<>();
-                headers.put("Content-Type", "application/json");
-                headers.put("Access-Token", token);
-                JSONObject param = new JSONObject();
-                param.put("advertiser_id", task.getAccountId());
-                JSONArray taskIds = new JSONArray();
-                taskIds.add(task.getTaskId());
-                param.put("task_ids", taskIds);
-                String result = HttpUtils.kuaiShouhttpPostRequest(url, param.toJSONString(), headers);
-                JSONObject resultJson = JSONObject.parseObject(result);
-                if (!Check.isNull(resultJson)) {
-                    Integer code = resultJson.getInteger("code");
-                    if (code == 0) {
-                        JSONObject dataJson = resultJson.getJSONObject("data");
-                        if (!Check.isNull(dataJson)) {
-                            JSONArray details = dataJson.getJSONArray("details");
-                            if (!Check.isNull(details)) {
-                                for (int i = 0; i < details.size(); i++) {
-                                    JSONObject detailJson = details.getJSONObject(i);
-                                    if (!Check.isNull(detailJson)) {
-                                        Integer taskStatus = detailJson.getInteger("task_status");
-                                        if (taskStatus == 2) {
-                                            loadFile(token, task);
-                                        } else if (taskStatus == 3) {
-                                            task.setTaskStatus(3);
-                                            task.setUpdateTime(new Date());
-                                            this.updateById(task);
-                                        }
-                                    }
-                                }
-                            }
-                        }
-                    } else {
-                        log.error("快手获取任务列表返回错误,accountId:{},返回结果:{}", task.getAccountId(), resultJson);
-                    }
-                } else {
-                    log.error("快手获取任务列表返回信息为空,accountId:{}", task.getAccountId());
-                }
-            }
-        }
-    }
-
-
-    private void loadFile(String token, KuaiShouDailyReportTask task) {
-        try {
-            String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.ASYNC_TASK_DOWNLOAD;
-            String fileName = task.getAccountId() + "_" + task.getStatDate() + "_" + task.getViewType() + ".csv";
-            Map<String, Object> requestMap = new HashMap<>();
-            requestMap.put("advertiser_id", task.getAccountId());
-            requestMap.put("task_id", task.getTaskId());
-            String localPath = LoadFileUtil.downloadByUrl(requestMap, downloadPath + task.getStatDate() + "//", url, token, fileName);
-            if (!Check.isNull(localPath)) {
-                Map<String, Object> deleteMap = new HashMap<>();
-                deleteMap.put("account_id", task.getAccountId());
-                deleteMap.put("stat_date", task.getStatDate());
-                if (task.getViewType() == 2) {
-                    reportDailyCampaignMapper.deleteByMap(deleteMap);
-                    reportDailyCampaignMapper.loadCampaignDailyReport(task.getAccountId(), localPath);
-                } else if (task.getViewType() == 3) {
-                    reportDailyGroupMapper.deleteByMap(deleteMap);
-                    reportDailyGroupMapper.loadGroupDailyReport(task.getAccountId(), localPath);
-                } else if (task.getViewType() == 4) {
-                    reportDailyCreativeMapper.deleteByMap(deleteMap);
-                    reportDailyCreativeMapper.loadCreativeDailyReport(task.getAccountId(), localPath);
-                } else if (task.getViewType() == 10) {
-                    reportDailyCreativeMapper.deleteByAccountIdAndStatDate(task.getAccountId(), task.getStatDate());
-                    reportDailyCreativeMapper.loadProgramCreativeDailyReport(task.getAccountId(), localPath);
-                } else if (task.getViewType() == 5) {
-                    kuaishouReportDailyMaterialMapper.deleteByMap(deleteMap);
-                    kuaishouReportDailyMaterialMapper.loadMaterialDailyReport(task.getAccountId(), localPath);
-                    Thread thread = new Thread() {
-                        @Override
-                        public void run() {
-                            try {
-                                Thread.sleep(1 * 500L);
-                                kuaiShouHistoryReportTaskService.getMd5(task.getStatDate(), task.getAccountId());
-                            } catch (InterruptedException e) {
-                                e.printStackTrace();
-                            }
-                        }
-
-                    };
-                    thread.start();
-                } else if (task.getViewType() == 7) {
-                    //封面报表
-                    kuaishouReportDailyImageMapper.deleteByMap(deleteMap);
-                    kuaishouReportDailyImageMapper.loadImageDailyReport(task.getAccountId(), localPath);
-                    //清洗数据
-                    kuaishouReportDailyImageMapper.updateImageReportCode();
-                    kuaishouReportDailyImageMapper.updateImageReportUserId();
-                    kuaishouReportDailyImageMapper.updateImageReportRealname();
-                }
-            }
-
-            task.setTaskStatus(4);
-        } catch (Exception e) {
-            e.printStackTrace();
-            task.setTaskStatus(5);
-        }
-        task.setUpdateTime(new Date());
-        this.updateById(task);
-    }
-
-}

+ 0 - 398
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/impl/KuaiShouGroupServiceImpl.java

@@ -1,398 +0,0 @@
-package com.xxl.job.executor.batch.service.impl;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.xxl.job.executor.batch.entity.KuaiShouCampaign;
-import com.xxl.job.executor.batch.entity.KuaiShouCreative;
-import com.xxl.job.executor.batch.entity.KuaiShouGroup;
-import com.xxl.job.executor.batch.entity.KuaiShouGroupTarget;
-import com.xxl.job.executor.batch.mapper.KuaiShouGroupMapper;
-import com.xxl.job.executor.batch.mapper.KuaiShouGroupTargetMapper;
-import com.xxl.job.executor.batch.service.IKuaiShouCampaignService;
-import com.xxl.job.executor.batch.service.IKuaiShouCreativeService;
-import com.xxl.job.executor.batch.service.IKuaiShouGroupService;
-import com.xxl.job.executor.constant.KuaishouInterfaceConstant;
-import com.xxl.job.executor.utils.Check;
-import com.xxl.job.executor.utils.HttpUtils;
-import com.xxl.job.executor.utils.PropertiesUtils;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.*;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-/**
- * @Description: 广告组信息
- * @Author: jeecg-boot
- * @Date: 2019-07-23
- * @Version: V1.0
- */
-
-@Slf4j
-@Service
-public class KuaiShouGroupServiceImpl extends ServiceImpl<KuaiShouGroupMapper, KuaiShouGroup> implements IKuaiShouGroupService {
-    @Autowired
-    private IKuaiShouCampaignService kuaiShouCampaignService;
-    @Autowired
-    private KuaiShouGroupMapper groupMapper;
-    @Autowired
-    private KuaiShouGroupTargetMapper groupTargetMapper;
-    private static ExecutorService executorService = Executors.newFixedThreadPool(10);
-    @Autowired
-    private IKuaiShouCreativeService creativeService;
-
-    /**
-     * 获取广告组
-     *
-     * @param accessToken
-     * @param accountId
-     */
-    @Override
-    public void getGroupList(String accessToken, Long accountId) {
-        QueryWrapper<KuaiShouCampaign> campaignQueryWrapper = new QueryWrapper<>();
-        campaignQueryWrapper.eq("account_id", accountId);
-        campaignQueryWrapper.orderByDesc("put_create_time");
-        campaignQueryWrapper.last("limit 15");
-        List<KuaiShouCampaign> list = kuaiShouCampaignService.list(campaignQueryWrapper);
-        if (Check.isNull(list)) {
-            return;
-        }
-        for (KuaiShouCampaign campaign : list) {
-            executorService.submit(new Runnable() {
-                @Override
-                public void run() {
-                    getGroupListByPage(accessToken, accountId, campaign.getCampaignId(), 1);
-                }
-            });
-        }
-
-
-    }
-
-
-    private void getGroupListByPage(String accessToken, Long accountId, Long campaignId, int page) {
-        String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.GROUP_LIST;
-        JSONObject param = new JSONObject();
-        param.put("advertiser_id", accountId);
-        param.put("campaign_id", campaignId);
-        param.put("page_size", 500);
-        param.put("page", page);
-
-        Map<String, String> headers = new HashMap<>();
-        headers.put("Access-Token", accessToken);
-        headers.put("Content-Type", "application/json");
-
-        String result = HttpUtils.kuaiShouhttpPostRequest(url, param.toJSONString(), headers);
-        JSONObject resultJson = JSONObject.parseObject(result);
-        if (Check.isNull(resultJson)) {
-            log.error("获取广告组接口异常,advertiserId:{}", accountId);
-            return;
-        }
-        Integer code = resultJson.getInteger("code");
-        if (null == code || code != 0) {
-            log.error("获取广告组返回结果异常,advertiserId:{},异常信息:{}", accountId, resultJson);
-            return;
-        }
-        JSONArray details = resultJson.getJSONObject("data").getJSONArray("details");
-        if (Check.isNull(details)) {
-            return;
-        }
-        addGroupV2(accountId, details);
-        getGroupListByPage(accessToken, accountId, campaignId, page + 1);
-    }
-
-
-    @Override
-    public void getGroupByUnitId(String accessToken, Long accountId, Long unitId) {
-        String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.GROUP_LIST;
-        JSONObject param = new JSONObject();
-        param.put("advertiser_id", accountId);
-        param.put("unit_id", unitId);
-
-        Map<String, String> headers = new HashMap<>();
-        headers.put("Access-Token", accessToken);
-        headers.put("Content-Type", "application/json");
-
-        String result = HttpUtils.kuaiShouhttpPostRequest(url, param.toJSONString(), headers);
-        JSONObject resultJson = JSONObject.parseObject(result);
-        if (Check.isNull(resultJson)) {
-            log.error("获取广告组接口异常,advertiserId:{}", accountId);
-            return;
-        }
-        Integer code = resultJson.getInteger("code");
-        if (null == code || code != 0) {
-            log.error("获取广告组返回结果异常,advertiserId:{},异常信息:{}", accountId, resultJson);
-            return;
-        }
-        JSONArray details = resultJson.getJSONObject("data").getJSONArray("details");
-        if (Check.isNull(details)) {
-            return;
-        }
-        addGroupV2(accountId, details);
-    }
-
-
-    /**
-     * 根据组获取创意
-     *
-     * @param accessToken
-     * @param accountId
-     * @param unitId
-     */
-    @Override
-    public void getCreativeByUnit(String accessToken, Long accountId, Long unitId) {
-
-        try {
-            String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.CREATIVE_LIST;
-            Map<String, String> headers = new HashMap<>();
-            headers.put("Content-Type", " application/json");
-            headers.put("Access-Token", accessToken);
-            JSONObject param = new JSONObject();
-            param.put("advertiser_id", accountId);
-            param.put("page_size", 500);
-
-
-            param.put("unit_id", unitId);
-            String result = HttpUtils.kuaiShouhttpPostRequest(url, param.toJSONString(), headers);
-            JSONObject resultJson = JSONObject.parseObject(result);
-            if (Check.isNull(resultJson)) {
-                log.error("获取广告创意返回结果为空,advertiserId:{}", accountId);
-                return;
-            }
-            Integer code = resultJson.getInteger("code");
-            String message = resultJson.getString("message");
-            if (null == code || code != 0) {
-                log.error("获取广告创意返回结果异常,advertiserId:{},message:{}", accountId, message);
-                return;
-            }
-            JSONArray details = resultJson.getJSONObject("data").getJSONArray("details");
-            if (null == details || details.size() <= 0) {
-                return;
-            }
-            for (int i = 0; i < details.size(); i++) {
-                JSONObject detailJson = JSONObject.parseObject(details.get(i).toString());
-                if (!Check.isNull(detailJson)) {
-                    KuaiShouCreative creative = new KuaiShouCreative();
-                    creative.setId("" + accountId + detailJson.getLong("creative_id"));
-                    creative.setAccountId(accountId);
-                    creative.setCampaignId(detailJson.getLong("campaign_id"));
-                    creative.setUnitId(detailJson.getLong("unit_id"));
-                    creative.setCreativeId(detailJson.getLong("creative_id"));
-                    creative.setCreativeName(detailJson.getString("creative_name"));
-                    creative.setCreativeMaterialType(detailJson.getInteger("creative_material_type"));
-                    if (!Check.isNull(detailJson.getJSONArray("material_url"))) {
-                        creative.setMaterialUrl(detailJson.getJSONArray("material_url").toJSONString());
-                    }
-
-                    if (!Check.isNull(detailJson.getJSONArray("image_tokens"))) {
-                        creative.setImageTokens(detailJson.getJSONArray("image_tokens").toJSONString());
-                    }
-                    creative.setStatus(detailJson.getInteger("status"));
-                    creative.setPutStatus(detailJson.getInteger("put_status"));
-                    creative.setCreateChannel(detailJson.getInteger("create_channel"));
-                    creative.setReviewDetail(detailJson.getString("review_detail"));
-                    creative.setCoverUrl(detailJson.getString("cover_url"));
-                    creative.setImageToken(detailJson.getString("image_token"));
-                    creative.setCoverWidth(detailJson.getString("cover_width"));
-                    creative.setCoverHeight(detailJson.getString("cover_height"));
-                    creative.setOverlayBgUrl(detailJson.getString("overlay_bg_url"));
-                    creative.setOverlayBgImageToken(detailJson.getString("overlay_bg_image_token"));
-                    creative.setStickerTitle(detailJson.getString("sticker_title"));
-                    creative.setOverlayType(detailJson.getString("overlay_type"));
-                    creative.setClickTrackUrl(detailJson.getString("click_track_url"));
-                    creative.setImpressionUrl(detailJson.getString("impression_url"));
-                    creative.setAdPhotoPlayedT3sUrl(detailJson.getString("ad_photo_played_t3s_url"));
-                    creative.setCreativeCreateTime(detailJson.getDate("create_time"));
-                    creative.setCreativeUpdateTime(detailJson.getDate("update_time"));
-                    creative.setFirstFrameType(detailJson.getInteger("first_frame_type"));
-                    creative.setShortSlogan(detailJson.getString("short_slogan"));
-                    creative.setActionbarClickUrl(detailJson.getString("actionbar_click_url"));
-                    JSONObject displayInfoJson = detailJson.getJSONObject("display_info");
-                    if (!Check.isNull(displayInfoJson)) {
-                        creative.setDescription(displayInfoJson.getString("description"));
-                        creative.setActionBarText(displayInfoJson.getString("action_bar_text"));
-                    }
-                    creative.setCreativeCategory(detailJson.getInteger("creative_category"));
-                    if (!Check.isNull(detailJson.getJSONArray("creative_tag"))) {
-                        creative.setCreativeTag(detailJson.getJSONArray("creative_tag").toJSONString());
-                    }
-                    creative.setCreateTime(new Date());
-                    creative.setUpdateTime(new Date());
-                    creative.setSiteId(detailJson.getLong("site_id"));
-                    creative.setPhotoId(detailJson.getString("photo_id"));
-                    if (detailJson.getLong("photo_id") == 0) {
-                        JSONArray photoIds = new JSONArray();
-                        JSONObject programmed_creative_material = detailJson.getJSONObject("programmed_creative_material");
-                        if (!Check.isNull(programmed_creative_material)) {
-                            creative.setProgrammedCreativeMaterial(programmed_creative_material.toJSONString());
-                            JSONArray materials = programmed_creative_material.getJSONArray("materials");
-                            if (!Check.isNull(materials)) {
-                                for (int j = 0; j < materials.size(); j++) {
-                                    JSONObject materialJson = materials.getJSONObject(j);
-                                    if (!Check.isNull(materialJson)) {
-                                        Long photo_id = materialJson.getLong("photo_id");
-                                        photoIds.add(String.valueOf(photo_id));
-                                    }
-                                }
-                                creative.setPhotoIds(photoIds.toJSONString());
-                            }
-                        }
-                    }
-                    creativeService.saveOrUpdate(creative);
-                }
-            }
-
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-    private void addGroupV2(Long advertiserId, JSONArray details) {
-        if (!Check.isNull(details)) {
-            List<KuaiShouGroup> groups = new ArrayList<>();
-            List<KuaiShouGroupTarget> targets = new ArrayList<>();
-            for (int i = 0; i < details.size(); i++) {
-                JSONObject detail = JSONObject.parseObject(details.get(i).toString());
-                if (!Check.isNull(detail)) {
-                    Integer bid_type = detail.getInteger("bid_type");
-                    Long bid = detail.getLong("bid");
-                    Integer ocpx_action_type = detail.getInteger("ocpx_action_type");
-                    Long unitId = detail.getLong("unit_id");
-                    String unit_name = detail.getString("unit_name");
-                    Integer status = detail.getInteger("status");
-                    Integer put_status = detail.getInteger("put_status");
-
-                    KuaiShouGroup group = new KuaiShouGroup();
-                    group.setId("" + advertiserId + unitId);
-                    group.setAccountId(advertiserId);
-                    group.setCampaignId(detail.getLong("campaign_id"));
-                    group.setUnitId(unitId);
-                    group.setUnitName(unit_name);
-                    group.setStatus(status);
-                    group.setPutStatus(put_status);
-                    group.setCreateChannel(detail.getInteger("create_channel"));
-                    group.setReviewDetail(detail.getString("review_detail"));
-                    group.setBidType(bid_type);
-                    group.setBid(bid);
-                    group.setCpaBid(detail.getLong("cpa_bid"));
-                    group.setOcpxActionType(ocpx_action_type);
-                    group.setDeepConversionType(detail.getInteger("deep_conversion_type"));
-                    group.setDeepConversionBid(detail.getLong("deep_conversion_bid"));
-                    group.setDayBudget(detail.getLong("day_budget"));
-                    group.setSpeed(detail.getInteger("speed"));
-                    group.setBeginTime(detail.getString("begin_time"));
-                    group.setEndTime(detail.getString("end_time"));
-                    group.setScheduleTime(detail.getString("schedule_time"));
-                    group.setSceneId(detail.getJSONArray("scene_id") + "");
-                    group.setShowMode(detail.getInteger("show_mode"));
-                    group.setUnitType(detail.getInteger("unit_type"));
-                    group.setUrlType(detail.getInteger("url_type"));
-                    group.setUrl(detail.getString("url"));
-                    group.setAppId(detail.getLong("app_id"));
-                    group.setAppIconUrl(detail.getString("app_icon_url"));
-                    group.setGroupCreateTime(detail.getString("create_time"));
-                    group.setGroupUpdateTime(detail.getString("update_time"));
-                    group.setConvertId(detail.getLong("convert_id"));
-                    group.setUseAppMarket(detail.getInteger("use_app_market"));
-                    group.setAppStore(detail.getJSONArray("app_store") + "");
-                    group.setCreateTime(new Date());
-                    group.setUpdateTime(new Date());
-                    groups.add(group);
-
-                    JSONObject targetJson = detail.getJSONObject("target");
-                    if (!Check.isNull(targetJson)) {
-                        KuaiShouGroupTarget groupTarget = new KuaiShouGroupTarget();
-                        groupTarget.setAccountId(advertiserId);
-                        groupTarget.setUnitId(unitId);
-                        if (!Check.isNull(targetJson.getJSONArray("region"))) {
-                            groupTarget.setRegion(targetJson.getJSONArray("region").toJSONString());
-                        }
-
-                        JSONObject age = targetJson.getJSONObject("age");
-                        if (!Check.isNull(age)) {
-                            groupTarget.setAgeMin(age.getInteger("min"));
-                            groupTarget.setAgeMax(age.getInteger("max"));
-                        }
-                        if (!Check.isNull(targetJson.getJSONArray("ages_range"))) {
-                            groupTarget.setAgesRange(targetJson.getJSONArray("ages_range").toJSONString());
-                        }
-
-                        groupTarget.setGender(targetJson.getInteger("gender"));
-                        groupTarget.setPlatformOs(targetJson.getInteger("platform_os"));
-                        groupTarget.setAndroidOsv(targetJson.getInteger("android_osv"));
-                        groupTarget.setIosOsv(targetJson.getInteger("ios_osv"));
-                        groupTarget.setNetwork(targetJson.getInteger("network"));
-                        if (!Check.isNull(targetJson.getJSONArray("device_brand"))) {
-                            groupTarget.setDeviceBrand(targetJson.getJSONArray("device_brand").toJSONString());
-                        }
-
-                        if (!Check.isNull(targetJson.getJSONArray("device_price"))) {
-                            groupTarget.setDevicePrice(targetJson.getJSONArray("device_price").toJSONString());
-                        }
-
-                        groupTarget.setBusinessInterestType(targetJson.getInteger("business_interest_type"));
-                        if (!Check.isNull(targetJson.getJSONArray("business_interest"))) {
-                            groupTarget.setBusinessInterest(targetJson.getJSONArray("business_interest").toJSONString());
-                        }
-
-                        if (!Check.isNull(targetJson.getJSONArray("fans_star"))) {
-                            groupTarget.setFansStar(targetJson.getJSONArray("fans_star").toJSONString());
-                        }
-
-                        if (!Check.isNull(targetJson.getJSONArray("interest_video"))) {
-                            groupTarget.setInterestVideo(targetJson.getJSONArray("interest_video").toJSONString());
-                        }
-
-                        if (!Check.isNull(targetJson.getJSONArray("app_interest"))) {
-                            groupTarget.setAppInterest(targetJson.getJSONArray("app_interest").toJSONString());
-                        }
-
-                        if (!Check.isNull(targetJson.getJSONArray("app_ids"))) {
-                            groupTarget.setAppIds(targetJson.getJSONArray("app_ids").toJSONString());
-                        }
-
-
-                        if (!Check.isNull(targetJson.getInteger("filter_converted_level"))) {
-                            groupTarget.setFilterConvertedLevel(targetJson.getInteger("filter_converted_level"));
-                        }
-
-
-                        if (!Check.isNull(targetJson.getJSONArray("population"))) {
-                            groupTarget.setPopulation(targetJson.getJSONArray("population").toJSONString());
-                        }
-
-                        if (!Check.isNull(targetJson.getJSONArray("exclude_population"))) {
-                            groupTarget.setExcludePopulation(targetJson.getJSONArray("exclude_population").toJSONString());
-                        }
-
-                        if (!Check.isNull(targetJson.getJSONArray("third_platform_code"))) {
-                            groupTarget.setThirdPlatformCode(targetJson.getJSONArray("third_platform_code").toJSONString());
-                        }
-
-
-                        JSONObject intelliExtend = targetJson.getJSONObject("intelli_extend");
-                        if (!Check.isNull(intelliExtend)) {
-                            groupTarget.setIsOpen(intelliExtend.getInteger("is_open"));
-                            groupTarget.setNoAgeBreak(intelliExtend.getInteger("no_age_break"));
-                            groupTarget.setNoGenderBreak(intelliExtend.getInteger("no_gender_break"));
-                            groupTarget.setNoAreaBreak(intelliExtend.getInteger("no_area_break"));
-
-                        }
-                        targets.add(groupTarget);
-                    }
-                }
-            }
-            if (!Check.isNull(groups)) {
-                groupMapper.replaceBatch(groups);
-            }
-            if (!Check.isNull(targets)) {
-                groupTargetMapper.replaceBatch(targets);
-            }
-        }
-    }
-
-}

+ 0 - 19
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/impl/KuaiShouGroupTargetServiceImpl.java

@@ -1,19 +0,0 @@
-package com.xxl.job.executor.batch.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.xxl.job.executor.batch.entity.KuaiShouGroupTarget;
-import com.xxl.job.executor.batch.mapper.KuaiShouGroupTargetMapper;
-import com.xxl.job.executor.batch.service.IKuaiShouGroupTargetService;
-import org.springframework.stereotype.Service;
-
-/**
- * 快手-定向信息
- *
- * @author jeecg-boot
- * @version V1.0
- * @date 2019-12-17
- */
-@Service
-public class KuaiShouGroupTargetServiceImpl extends ServiceImpl<KuaiShouGroupTargetMapper, KuaiShouGroupTarget> implements IKuaiShouGroupTargetService {
-
-}

+ 0 - 366
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/impl/KuaiShouHistoryReportTaskServiceImpl.java

@@ -1,366 +0,0 @@
-package com.xxl.job.executor.batch.service.impl;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.xxl.job.executor.batch.entity.KuaiShouDailyReportTask;
-import com.xxl.job.executor.batch.entity.KuaiShouHistoryReportTask;
-import com.xxl.job.executor.batch.entity.vo.KuaiShouReportDailyMaterialVo;
-import com.xxl.job.executor.batch.entity.vo.VideoGetvo;
-import com.xxl.job.executor.batch.mapper.KuaiShouHistoryReportTaskMapper;
-import com.xxl.job.executor.batch.mapper.KuaiShouReportDailyMaterialMapper;
-import com.xxl.job.executor.batch.service.IKuaiShouDailyReportTaskService;
-import com.xxl.job.executor.batch.service.IKuaiShouHistoryReportTaskService;
-import com.xxl.job.executor.common.entity.CtopOauthToken;
-import com.xxl.job.executor.common.service.ICtopOauthTokenService;
-import com.xxl.job.executor.constant.KuaishouInterfaceConstant;
-import com.xxl.job.executor.report.entity.KuaiShouReportDailyMaterial;
-import com.xxl.job.executor.report.mapper.*;
-import com.xxl.job.executor.utils.*;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-/**
- * 快手历史数据任务记录
- *
- * @author jeecg-boot
- * @version V1.0
- * @date 2020-03-09
- */
-@Slf4j
-@Service
-public class KuaiShouHistoryReportTaskServiceImpl extends ServiceImpl<KuaiShouHistoryReportTaskMapper, KuaiShouHistoryReportTask> implements IKuaiShouHistoryReportTaskService {
-    @Value("${jeecg.path.report-history}")
-    private String downloadPath;
-    static List<Integer> historyTypeList;
-    static List<Integer> dailyTypeList;
-    @Autowired
-    private ICtopOauthTokenService ctopOauthTokenService;
-    @Autowired
-    private KuaishouReportDailyAccountMapper reportDailyAccountMapper;
-    @Autowired
-    private KuaishouReportDailyCampaignMapper reportDailyCampaignMapper;
-    @Autowired
-    private KuaishouReportDailyGroupMapper reportDailyGroupMapper;
-    @Autowired
-    private KuaishouReportDailyCreativeMapper reportDailyCreativeMapper;
-    @Autowired
-    private IKuaiShouDailyReportTaskService dailyReportTaskService;
-    @Autowired
-    private KuaiShouReportDailyMaterialMapper kuaishouReportDailyMaterialMapper;
-    @Autowired
-    private KuaishouReportDailyImageMapper kuaishouReportDailyImageMapper;
-
-
-    @Override
-    public void createTask(Long accountId, String token, String startDate, String endDate, String taskType) {
-        if (Check.isNull(accountId) || Check.isNull(token)) {
-            log.error("token或accountId为空");
-            return;
-        }
-        try {
-            String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.ASYNC_TASK_CREAT;
-            Map<String, String> headers = new HashMap<>();
-            headers.put("Content-Type", "application/json");
-            headers.put("Access-Token", token);
-            JSONObject param = new JSONObject();
-            param.put("advertiser_id", accountId);
-            JSONObject taskParams = new JSONObject();
-            taskParams.put("start_date", startDate);
-            taskParams.put("end_date", endDate);
-
-            if (null != taskType && taskType.equals(CtopAdConstant.KUAISHOU_LOAD_JOB_TYPE_DAILY)) {
-                if (Check.isNull(dailyTypeList)) {
-                    getDailyTypeList();
-                }
-                for (int i = 0; i < dailyTypeList.size(); i++) {
-                    Integer type = dailyTypeList.get(i);
-                    String taskName = accountId + "_" + type + "_" + System.currentTimeMillis();
-                    param.put("task_name", taskName);
-                    taskParams.put("view_type", type);
-                    param.put("task_params", taskParams);
-
-                    String result = HttpUtils.kuaiShouhttpPostRequest(url, param.toJSONString(), headers);
-                    JSONObject resultJson = JSONObject.parseObject(result);
-                    if (!Check.isNull(resultJson)) {
-                        Integer code = resultJson.getInteger("code");
-                        if (code == 0) {
-                            JSONObject dataJson = resultJson.getJSONObject("data");
-                            KuaiShouDailyReportTask dailyReportTask = new KuaiShouDailyReportTask();
-                            dailyReportTask.setAccountId(accountId);
-                            dailyReportTask.setStatDate(endDate);
-                            dailyReportTask.setTaskId(dataJson.getString("task_id"));
-                            dailyReportTask.setViewType(type);
-                            dailyReportTask.setTaskStatus(0);
-                            dailyReportTask.setTaskName(taskName);
-                            dailyReportTaskService.save(dailyReportTask);
-                        } else {
-                            log.error("快手分天报表请求失败,accountId:{},返回数据:{}", accountId, resultJson);
-                        }
-                    }
-                }
-            } else {
-                if (Check.isNull(historyTypeList)) {
-                    getHistoryTypeList();
-                }
-                for (int i = 0; i < historyTypeList.size(); i++) {
-                    Integer type = historyTypeList.get(i);
-                    String taskName = accountId + "_" + type + "_" + System.currentTimeMillis();
-                    param.put("task_name", taskName);
-                    taskParams.put("view_type", type);
-                    param.put("task_params", taskParams);
-                    String result = HttpUtils.kuaiShouhttpPostRequest(url, param.toJSONString(), headers);
-                    JSONObject resultJson = JSONObject.parseObject(result);
-                    log.info("请求状态返回数据:{}", resultJson);
-                    if (!Check.isNull(resultJson)) {
-                        Integer code = resultJson.getInteger("code");
-                        if (code == 0) {
-                            JSONObject dataJson = resultJson.getJSONObject("data");
-                            KuaiShouHistoryReportTask reportTask = new KuaiShouHistoryReportTask();
-                            reportTask.setAccountId(accountId);
-                            reportTask.setStartDate(startDate);
-                            reportTask.setEndDate(endDate);
-                            reportTask.setTaskId(dataJson.getString("task_id"));
-                            reportTask.setViewType(type);
-                            reportTask.setTaskStatus(0);
-                            reportTask.setTaskName(taskName);
-                            this.save(reportTask);
-                        } else {
-                            log.error("快手历史报表请求失败,accountId:{},返回数据:{}", accountId, resultJson);
-                        }
-                    }
-                }
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-
-    /**
-     * 获取任务列表
-     */
-    @Override
-    public void getTaskList() {
-        log.info("开始历史数据文件检查下载");
-        QueryWrapper<KuaiShouHistoryReportTask> taskQueryWrapper = new QueryWrapper<>();
-        taskQueryWrapper.eq("task_status", 0);
-        taskQueryWrapper.orderByDesc("create_time");
-        List<KuaiShouHistoryReportTask> taskList = this.list(taskQueryWrapper);
-        if (!Check.isNull(taskList)) {
-            for (KuaiShouHistoryReportTask task : taskList) {
-                CtopOauthToken token = ctopOauthTokenService.getTokenByAccountId(task.getAccountId());
-                if (!Check.isNull(token)) {
-                    String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.ASYNC_TASK_LIST;
-                    Map<String, String> headers = new HashMap<>();
-                    headers.put("Content-Type", "application/json");
-                    headers.put("Access-Token", token.getAccessToken());
-                    JSONObject param = new JSONObject();
-                    param.put("advertiser_id", task.getAccountId());
-                    JSONArray taskIds = new JSONArray();
-                    taskIds.add(task.getTaskId());
-                    param.put("task_ids", taskIds);
-                    String result = HttpUtils.kuaiShouhttpPostRequest(url, param.toJSONString(), headers);
-                    JSONObject resultJson = JSONObject.parseObject(result);
-                    log.info("请求状态返回数据:{}", resultJson);
-                    if (!Check.isNull(resultJson)) {
-                        Integer code = resultJson.getInteger("code");
-                        if (code == 0) {
-                            JSONObject dataJson = resultJson.getJSONObject("data");
-                            if (!Check.isNull(dataJson)) {
-                                JSONArray details = dataJson.getJSONArray("details");
-                                if (!Check.isNull(details)) {
-                                    for (int i = 0; i < details.size(); i++) {
-                                        JSONObject detailJson = details.getJSONObject(i);
-                                        if (!Check.isNull(detailJson)) {
-                                            Integer taskStatus = detailJson.getInteger("task_status");
-                                            if (taskStatus == 2) {
-                                                loadFile(token.getAccessToken(), task);
-                                            } else if (taskStatus == 3) {
-                                                task.setTaskStatus(3);
-                                                this.updateById(task);
-                                            }
-                                        }
-                                    }
-                                }
-                            }
-                        } else {
-                            log.error("快手获取任务列表返回错误,accountId:{},返回结果:{}", task.getAccountId(), resultJson);
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-
-    private void loadFile(String token, KuaiShouHistoryReportTask task) {
-        try {
-            String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.ASYNC_TASK_DOWNLOAD;
-            String fileName = task.getAccountId() + "_" + task.getViewType() + ".csv";
-            Map<String, Object> requestMap = new HashMap<>();
-            requestMap.put("advertiser_id", task.getAccountId());
-            requestMap.put("task_id", task.getTaskId());
-            String localPath = LoadFileUtil.downloadByUrl(requestMap, downloadPath, url, token, fileName);
-            if (!Check.isNull(localPath)) {
-                Map<String, Object> deleteMap = new HashMap<>();
-                deleteMap.put("account_id", task.getAccountId());
-
-                if (task.getViewType() == 1) {
-                    reportDailyAccountMapper.deleteByMap(deleteMap);
-                    reportDailyAccountMapper.loadAccountDailyReport(task.getAccountId(), localPath);
-                } else if (task.getViewType() == 2) {
-                    reportDailyCampaignMapper.deleteByMap(deleteMap);
-                    reportDailyCampaignMapper.loadCampaignDailyReport(task.getAccountId(), localPath);
-
-                } else if (task.getViewType() == 3) {
-                    reportDailyGroupMapper.deleteByMap(deleteMap);
-                    reportDailyGroupMapper.loadGroupDailyReport(task.getAccountId(), localPath);
-
-                } else if (task.getViewType() == 4) {
-                    reportDailyCreativeMapper.deleteByMap(deleteMap);
-                    reportDailyCreativeMapper.loadCreativeDailyReport(task.getAccountId(), localPath);
-
-                } else if (task.getViewType() == 10) {
-                    reportDailyCreativeMapper.deleteByAccountId(task.getAccountId());
-                    reportDailyCreativeMapper.loadProgramCreativeDailyReport(task.getAccountId(), localPath);
-
-                } else if (task.getViewType() == 5) {
-                    kuaishouReportDailyMaterialMapper.deleteByMap(deleteMap);
-                    kuaishouReportDailyMaterialMapper.loadMaterialDailyReport(task.getAccountId(), localPath);
-                    Thread thread = new Thread() {
-                        @Override
-                        public void run() {
-                            try {
-                                Thread.sleep(1 * 500L);
-                                getMd5(null, task.getAccountId());
-                            } catch (InterruptedException e) {
-                                e.printStackTrace();
-                            }
-                        }
-
-                    };
-                    thread.start();
-                } else if (task.getViewType() == 7) {
-                    kuaishouReportDailyImageMapper.deleteByMap(deleteMap);
-                    //封面报表
-                    kuaishouReportDailyImageMapper.loadImageDailyReport(task.getAccountId(), localPath);
-                    //清洗数据
-                    kuaishouReportDailyImageMapper.updateImageReportCode();
-                    kuaishouReportDailyImageMapper.updateImageReportUserId();
-                    kuaishouReportDailyImageMapper.updateImageReportRealname();
-                }
-
-
-            }
-            task.setTaskStatus(4);
-
-        } catch (Exception e) {
-            e.printStackTrace();
-            task.setTaskStatus(5);
-        }
-        this.updateById(task);
-
-    }
-
-
-    private void getHistoryTypeList() {
-
-        historyTypeList = new ArrayList<>();
-        historyTypeList.add(1);
-        historyTypeList.add(2);
-        historyTypeList.add(3);
-        historyTypeList.add(4);
-        historyTypeList.add(5);
-        historyTypeList.add(7);
-        historyTypeList.add(10);
-
-
-    }
-
-    private void getDailyTypeList() {
-        dailyTypeList = new ArrayList<>();
-        dailyTypeList.add(2);
-        dailyTypeList.add(3);
-        dailyTypeList.add(4);
-        dailyTypeList.add(5);
-        dailyTypeList.add(7);
-        dailyTypeList.add(10);
-    }
-
-
-    static ExecutorService executorService = Executors.newFixedThreadPool(30);
-
-    @Override
-    public void getMd5(String statDate, Long accountId) {
-        executorService.submit(new Runnable() {
-            @Override
-            public void run() {
-                List<KuaiShouReportDailyMaterialVo> photoList = kuaishouReportDailyMaterialMapper.getPhotoList(accountId, statDate);
-                if (!Check.isNull(photoList)) {
-                    for (KuaiShouReportDailyMaterialVo materialVo : photoList) {
-                        Long photoId = materialVo.getPhotoId();
-                        VideoGetvo videoGetvo = kuaishouReportDailyMaterialMapper.getVideoGetByPhotoId(photoId);
-                        if (!Check.isNull(videoGetvo)) {
-                            QueryWrapper<KuaiShouReportDailyMaterial> updateQueryWrapper = new QueryWrapper<>();
-                            updateQueryWrapper.eq("photo_id", photoId);
-                            if (!Check.isNull(statDate)) {
-                                updateQueryWrapper.eq("stat_date", statDate);
-                            }
-
-                            updateQueryWrapper.isNull("signature");
-                            KuaiShouReportDailyMaterial material = new KuaiShouReportDailyMaterial();
-                            material.setSignature(videoGetvo.getSignature());
-                            material.setChannelType(videoGetvo.getChannelType());
-                            kuaishouReportDailyMaterialMapper.update(material, updateQueryWrapper);
-                            log.info("修改成功:photoId:{},accountId:{}", photoId, accountId);
-                        }
-
-                    }
-                }
-            }
-        });
-
-    }
-
-    @Override
-    public void getMd5V2(String statDate) {
-        List<KuaiShouReportDailyMaterialVo> photoList = kuaishouReportDailyMaterialMapper.getPhotoListByDate(statDate);
-        if (!Check.isNull(photoList)) {
-            for (KuaiShouReportDailyMaterialVo materialVo : photoList) {
-                executorService.submit(new Runnable() {
-                    @Override
-                    public void run() {
-                        Long photoId = materialVo.getPhotoId();
-                        VideoGetvo videoGetvo = kuaishouReportDailyMaterialMapper.getVideoGetByPhotoId(photoId);
-                        if (!Check.isNull(videoGetvo)) {
-                            QueryWrapper<KuaiShouReportDailyMaterial> updateQueryWrapper = new QueryWrapper<>();
-                            updateQueryWrapper.eq("photo_id", photoId);
-                            if (!Check.isNull(statDate)) {
-                                updateQueryWrapper.eq("stat_date", statDate);
-                            }
-                            KuaiShouReportDailyMaterial material = new KuaiShouReportDailyMaterial();
-                            material.setSignature(videoGetvo.getSignature());
-                            material.setChannelType(videoGetvo.getChannelType());
-                            kuaishouReportDailyMaterialMapper.update(material, updateQueryWrapper);
-                        }
-                    }
-                });
-            }
-        }
-
-
-    }
-
-
-}

+ 0 - 41
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/impl/KuaiShouImageGetServiceImpl.java

@@ -1,41 +0,0 @@
-package com.xxl.job.executor.batch.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.xxl.job.executor.batch.entity.KuaiShouImageGet;
-import com.xxl.job.executor.batch.mapper.KuaiShouImageGetMapper;
-import com.xxl.job.executor.batch.service.IKuaiShouImageGetService;
-import com.xxl.job.executor.utils.Check;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.List;
-
-/**
- * @Description: 快手-获取图片接口
- * @Author: jeecg-boot
- * @Date: 2019-12-03
- * @Version: V1.0
- */
-@Service
-public class KuaiShouImageGetServiceImpl extends ServiceImpl<KuaiShouImageGetMapper, KuaiShouImageGet> implements IKuaiShouImageGetService {
-    @Autowired
-    private KuaiShouImageGetMapper imageGetMapper;
-
-    @Override
-    public void replaceBatch(List<KuaiShouImageGet> imageGets) {
-        imageGetMapper.replaceBatch(imageGets);
-    }
-
-    @Override
-    public String getUrlByCode(String signature) {
-        String url = imageGetMapper.getUrlByCode(signature);
-        if (!Check.isNull(url)) {
-            return url;
-        } else {
-            return imageGetMapper.getCutFrameUrlByCode(signature);
-        }
-
-
-    }
-
-}

+ 0 - 216
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/impl/KuaiShouMaterialUploadServiceImpl.java

@@ -1,216 +0,0 @@
-package com.xxl.job.executor.batch.service.impl;
-
-import com.alibaba.fastjson.JSONObject;
-import com.xxl.job.executor.batch.entity.KuaiShouImageGet;
-import com.xxl.job.executor.batch.service.IKuaiShouImageGetService;
-import com.xxl.job.executor.batch.service.IKuaiShouMaterialUploadService;
-import com.xxl.job.executor.batch.service.IKuaiShouVideoGetService;
-import com.xxl.job.executor.batch.service.IKuaishouInterfaceService;
-import com.xxl.job.executor.constant.KuaishouInterfaceConstant;
-import com.xxl.job.executor.constant.MaterialEnum;
-import com.xxl.job.executor.utils.Check;
-import com.xxl.job.executor.utils.LoadFileUtil;
-import com.xxl.job.executor.utils.PropertiesUtils;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.core.io.FileSystemResource;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpMethod;
-import org.springframework.http.ResponseEntity;
-import org.springframework.stereotype.Service;
-import org.springframework.util.LinkedMultiValueMap;
-import org.springframework.util.MultiValueMap;
-import org.springframework.web.client.RestTemplate;
-import org.springframework.web.multipart.MultipartFile;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-@Slf4j
-@Service
-public class KuaiShouMaterialUploadServiceImpl implements IKuaiShouMaterialUploadService {
-
-    @Value("${oss.replace.download}")
-    private String downloadUrl;
-
-    @Autowired
-    private IKuaiShouImageGetService iKuaiShouImageGetService;
-    @Autowired
-    private IKuaiShouVideoGetService kuaiShouVideoGetService;
-    @Autowired
-    private IKuaishouInterfaceService kuaishouInterfaceService;
-
-    /**
-     * 上传文件
-     *
-     * @param
-     * @param type
-     * @param accountId
-     */
-    @Override
-    public JSONObject video(String url, Integer type, Long accountId, String accessToken, String signature) {
-        JSONObject returnJson = new JSONObject();
-        try {
-            log.info("开始本地视频上传");
-            String requestUrl = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.VIDEO_UPLOAD;
-            String localUrl = LoadFileUtil.downLoadFromUrl(url, downloadUrl);
-            File file = new File(localUrl);
-            FileSystemResource resource = new FileSystemResource(file);
-            Map<String, String> headerMap = new HashMap<>();
-            headerMap.put("Content-Type", "multipart/form-data");
-            headerMap.put("Access-Token", accessToken);
-            JSONObject requestJson = new JSONObject();
-            requestJson.put("signature", signature);
-            requestJson.put("file", resource);
-            requestJson.put("type", type);
-            requestJson.put("advertiser_id", accountId);
-            String result = exceptInfoForRestTemplate(requestUrl, requestJson, headerMap);
-            JSONObject resultJson = JSONObject.parseObject(result);
-            if (!Check.isNull(resultJson)) {
-                if (resultJson.getInteger("code") == 0) {
-                    JSONObject dataJson = resultJson.getJSONObject("data");
-                    if (!Check.isNull(dataJson)) {
-                        String photoId = dataJson.getString("photo_id");
-                        returnJson.put("success", true);
-                        returnJson.put("photoId", photoId);
-                        returnJson.put("signature", signature);
-                        returnJson.put("message", "上传成功");
-                        try {
-                            Thread.sleep(1 * 1000L);
-                            kuaishouInterfaceService.getVideoInfo(accessToken, accountId, photoId);
-                        } catch (InterruptedException e) {
-                            e.printStackTrace();
-                        }
-
-                    }
-                    LoadFileUtil.delFile(localUrl);
-                    log.info("快手素材上传完成,accountId:{},code:{},返回信息:{}", accountId, signature, resultJson);
-                } else {
-                    log.error("快手上传素材失败,返回信息:{},请求参数:{}", resultJson, requestJson);
-                    returnJson.put("success", false);
-                    returnJson.put("signature", signature);
-                    returnJson.put("message", resultJson.getString("message"));
-                }
-            } else {
-                log.error("快手上传素材返回信息为空请求参数:{}", requestJson);
-                returnJson.put("success", false);
-                returnJson.put("signature", signature);
-                returnJson.put("message", "调用快手后台返回结果为空");
-            }
-
-        } catch (Exception e) {
-            e.printStackTrace();
-            returnJson.put("success", false);
-            returnJson.put("signature", signature);
-            returnJson.put("message", "系统异常");
-
-        }
-        return returnJson;
-
-
-    }
-
-
-    @Override
-    public String kuauiShouImageUpload(String url, String signature, Long accountId, String token) {
-        try {
-            Map<String, String> headerMap = new HashMap<>();
-            headerMap.put("Content-Type", "multipart/form-data");
-            JSONObject requestJson = new JSONObject();
-            requestJson.put("signature", signature);
-            requestJson.put("url", url);
-            requestJson.put("type", 2);
-            requestJson.put("advertiser_id", accountId);
-            headerMap.put("Access-Token", token);
-            String requestUrl = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.IMAGE_UPLOAD;
-            requestJson.put("upload_type", "2");
-            String result = exceptInfoForRestTemplate(requestUrl, requestJson, headerMap);
-            JSONObject resultJson = JSONObject.parseObject(result);
-            if (!Check.isNull(resultJson)) {
-                if (resultJson.getInteger("code") == 0) {
-                    JSONObject dataJson = resultJson.getJSONObject("data");
-                    if (!Check.isNull(dataJson)) {
-                        String image_token = dataJson.getString("image_token");
-                        KuaiShouImageGet imageGet = new KuaiShouImageGet();
-                        imageGet.setId(accountId + image_token);
-                        imageGet.setAccountId(accountId);
-                        imageGet.setUrl(dataJson.getString("url"));
-                        imageGet.setWidth(dataJson.getInteger("width"));
-                        imageGet.setHeight(dataJson.getInteger("height"));
-                        imageGet.setSize(dataJson.getInteger("size"));
-                        imageGet.setFormat(dataJson.getString("format"));
-                        Integer type = MaterialEnum.getTypeBySize(dataJson.getInteger("width"), dataJson.getInteger("height"));
-                        if (!Check.isNull(type)) {
-                            imageGet.setMaterialType(type);
-                        }
-                        imageGet.setSignature(signature);
-                        imageGet.setImageToken(image_token);
-                        iKuaiShouImageGetService.saveOrUpdate(imageGet);
-                        return dataJson.getString("image_token");
-                    }
-
-                } else {
-                    log.error("上传图片失败,accountId:{},code:{},data:{}", accountId, signature, resultJson);
-                }
-
-
-            } else {
-                log.error("上传图片,返回结果为空,accountId:{},code:{},data:{}", accountId, signature, resultJson);
-            }
-
-
-        } catch (Exception e) {
-            e.printStackTrace();
-            return null;
-
-        }
-
-        return null;
-    }
-
-
-    public String uploadFile(MultipartFile multipartFile, String dirPath) throws IOException {
-        String fileName = multipartFile.getOriginalFilename();
-        String fileSuffix = fileName.substring(fileName.lastIndexOf("."), fileName.length());
-        String localFileName = System.currentTimeMillis() + fileSuffix;
-        String filePath = dirPath + File.separator + localFileName;
-        File localFile = new File(filePath);
-        File imagePath = new File(dirPath);
-        if (!imagePath.exists()) {
-            imagePath.mkdirs();
-        }
-        multipartFile.transferTo(localFile);
-        return filePath;
-    }
-
-    @Autowired
-    private RestTemplate rest;
-
-    private String exceptInfoForRestTemplate(String url, Map<String, Object> paramMap, Map<String, String> headerMap) {
-        try {
-            MultiValueMap<String, Object> param = new LinkedMultiValueMap<>();
-            if (!Check.isNullMap(paramMap)) {
-                for (String key : paramMap.keySet()) {
-                    param.add(key, paramMap.get(key));
-                }
-                HttpHeaders headers = new HttpHeaders();
-                if (!Check.isNullMap(headerMap)) {
-                    for (String key : headerMap.keySet()) {
-                        headers.add(key, headerMap.get(key));
-                    }
-                }
-                HttpEntity<MultiValueMap<String, Object>> httpEntity = new HttpEntity<>(param, headers);
-                ResponseEntity<String> responseEntity = rest.exchange(url, HttpMethod.POST, httpEntity, String.class);
-                return responseEntity.getBody();
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        return null;
-    }
-
-}

+ 0 - 90
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/impl/KuaiShouReportDailyMaterialServiceImpl.java

@@ -1,90 +0,0 @@
-package com.xxl.job.executor.batch.service.impl;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.xxl.job.executor.batch.entity.vo.VideoGetvo;
-import com.xxl.job.executor.batch.mapper.KuaiShouReportDailyMaterialMapper;
-import com.xxl.job.executor.batch.service.IKuaiShouReportDailyMaterialService;
-import com.xxl.job.executor.report.entity.KuaiShouReportDailyMaterial;
-import com.xxl.job.executor.utils.Check;
-import com.xxl.job.executor.utils.HttpUtils;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 素材
- *
- * @author jeecg-boot
- * @version V1.0
- * @date 2020-09-09
- */
-@Slf4j
-@Service
-public class KuaiShouReportDailyMaterialServiceImpl extends ServiceImpl<KuaiShouReportDailyMaterialMapper, KuaiShouReportDailyMaterial> implements IKuaiShouReportDailyMaterialService {
-    @Autowired
-    private KuaiShouReportDailyMaterialMapper dailyMaterialMapper;
-
-    /**
-     * 获取素材数据
-     *
-     * @param accountId
-     * @param startDate
-     * @param endDate
-     */
-    @Override
-    public void getMaterialReportByAccountIdAndStatDate(Long accountId, String token, String startDate, String endDate, Integer page) {
-        String url = "https://ad.e.kuaishou.com/rest/openapi/v1/report/material_report";
-        Map<String, String> headers = new HashMap<>();
-        headers.put("Content-Type", "application/json");
-        headers.put("Access-Token", token);
-        Map<String, Object> param = new HashMap<>();
-        param.put("start_date", startDate);
-        param.put("end_date", endDate);
-        param.put("advertiser_id", accountId);
-        param.put("temporal_granularity", "DAILY");
-        param.put("view_type", 5);
-        param.put("page_size", 1000);
-        param.put("page", page);
-
-        String result = HttpUtils.httpPostRequest(url, param, headers);
-        JSONObject resultJson = JSONObject.parseObject(result);
-        if (Check.isNull(resultJson)) {
-            return;
-        }
-
-        Integer totalCount = resultJson.getInteger("total_count");
-        if (null == totalCount||totalCount == 0) {
-            return;
-        }
-        JSONArray details = resultJson.getJSONArray("details");
-        if (Check.isNull(details)) {
-            return;
-        }
-
-        List<KuaiShouReportDailyMaterial> addList = new ArrayList<>();
-        for (int i = 0; i < details.size(); i++) {
-            JSONObject detailJson = details.getJSONObject(i);
-            detailJson.put("photo_like", detailJson.getInteger("like"));
-            detailJson.put("photo_share", detailJson.getInteger("share"));
-            detailJson.put("photo_comment", detailJson.getInteger("comment"));
-            detailJson.put("photo_show", detailJson.getInteger("show"));
-            KuaiShouReportDailyMaterial material = JSONObject.toJavaObject(detailJson, KuaiShouReportDailyMaterial.class);
-            VideoGetvo videoGetvo = dailyMaterialMapper.getVideoGetByPhotoId(material.getPhotoId());
-            if (!Check.isNull(videoGetvo)) {
-                material.setChannelType(videoGetvo.getChannelType());
-                material.setSignature(videoGetvo.getSignature());
-            }
-            material.setAccountId(accountId);
-            addList.add(material);
-        }
-        dailyMaterialMapper.batchReplace(addList);
-        getMaterialReportByAccountIdAndStatDate(accountId, token, startDate, endDate, page + 1);
-    }
-}

+ 0 - 123
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/impl/KuaiShouVideoGetServiceImpl.java

@@ -1,123 +0,0 @@
-package com.xxl.job.executor.batch.service.impl;
-
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.xxl.job.executor.batch.entity.KuaiShouVideoGet;
-import com.xxl.job.executor.batch.entity.vo.KuaiShouVideoGetVo;
-import com.xxl.job.executor.batch.mapper.KuaiShouVideoGetMapper;
-import com.xxl.job.executor.batch.service.IKuaiShouVideoGetService;
-import com.xxl.job.executor.common.entity.MaterialCutFrame;
-import com.xxl.job.executor.common.service.IMaterialCutFrameService;
-import com.xxl.job.executor.utils.Check;
-import com.xxl.job.executor.utils.HttpUtils;
-import com.xxl.job.executor.utils.LoadFileUtil;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Service;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-/**
- * @Description: 快手-获取视频接口
- * @Author: jeecg-boot
- * @Date: 2019-07-25
- * @Version: V1.0
- */
-@Slf4j
-@Service
-public class KuaiShouVideoGetServiceImpl extends ServiceImpl<KuaiShouVideoGetMapper, KuaiShouVideoGet> implements IKuaiShouVideoGetService {
-    @Autowired
-    private KuaiShouVideoGetMapper videoGetMapper;
-    @Autowired
-    private IMaterialCutFrameService materialCutFrameService;
-    static ExecutorService executorService = Executors.newFixedThreadPool(15);
-
-
-    @Value("${oss.replace.download}")
-    private String downloadUrl;
-
-    @Override
-    public void replaceBatch(List<KuaiShouVideoGet> videoGets) {
-        videoGetMapper.replaceBatch(videoGets);
-    }
-
-    /**
-     * 获取关键帧
-     *
-     * @param
-     */
-    @Override
-    public synchronized void getKeyFrame(String token, Long accountId, String videoMd5, String photoId) {
-        try {
-            if (Check.isNull(videoMd5)) {
-                return;
-            }
-            QueryWrapper<MaterialCutFrame> cutFrameQueryWrapper = new QueryWrapper<>();
-            cutFrameQueryWrapper.eq("video_signature", videoMd5);
-            cutFrameQueryWrapper.last("limit 1");
-            MaterialCutFrame one = materialCutFrameService.getOne(cutFrameQueryWrapper);
-            if (!Check.isNull(one)) {
-                return;
-            }
-            log.info("开始视频抽帧,md5:{}", videoMd5);
-            String url = "https://ad.e.kuaishou.com/rest/openapi/v1/tool/key_frame";
-            JSONArray photoArr = new JSONArray();
-            photoArr.add(photoId);
-            Map<String, String> headers = new HashMap<>();
-            headers.put("Access-Token", token);
-            headers.put("Content-Type", "application/json");
-            JSONObject requestJson = new JSONObject();
-            requestJson.put("advertiser_id", accountId);
-            requestJson.put("photo_ids", photoArr);
-            String result = HttpUtils.kuaiShouhttpPostRequest(url, requestJson.toJSONString(), headers);
-            JSONObject resultJson = JSONObject.parseObject(result);
-            if (!Check.isNull(resultJson)) {
-                Integer code = resultJson.getInteger("code");
-                if (code == 0) {
-                    JSONArray dataArr = resultJson.getJSONArray("data");
-                    if (!Check.isNull(dataArr)) {
-                        for (int i = 0; i < dataArr.size(); i++) {
-                            String imageUrl = dataArr.getString(i);
-                            String localPath = LoadFileUtil.downLoadFromUrl(imageUrl, downloadUrl);
-                            String md5 = null;
-                            try {
-                                md5 = LoadFileUtil.getMD5(localPath);
-                            } catch (IOException e) {
-                                e.printStackTrace();
-                                continue;
-                            }
-                            Map<String, Object> deleteMap = new HashMap<>();
-                            deleteMap.put("video_signature", videoMd5);
-                            deleteMap.put("signature", md5);
-                            materialCutFrameService.removeByMap(deleteMap);
-                            MaterialCutFrame materialCutFrame = new MaterialCutFrame();
-                            materialCutFrame.setImageIndex(i);
-                            materialCutFrame.setVideoSignature(videoMd5);
-                            materialCutFrame.setUrl(imageUrl);
-                            materialCutFrame.setSignature(md5);
-                            materialCutFrameService.save(materialCutFrame);
-                            LoadFileUtil.delFile(localPath);
-                        }
-                    }
-                }
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-
-    }
-
-    @Override
-    public List<KuaiShouVideoGetVo> getVideoList(Map<String, Object> requestMap) {
-        return videoGetMapper.getVideoList(requestMap);
-    }
-}

File diff suppressed because it is too large
+ 0 - 2196
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/impl/KuaishouInterfaceServiceImpl.java


+ 0 - 250
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/impl/KuaishouProgramCreativeServiceImpl.java

@@ -1,250 +0,0 @@
-package com.xxl.job.executor.batch.service.impl;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.xxl.job.executor.batch.entity.KuaiShouImageGet;
-import com.xxl.job.executor.batch.entity.KuaishouProgramCreative;
-import com.xxl.job.executor.batch.mapper.KuaishouProgramCreativeMapper;
-import com.xxl.job.executor.batch.service.IKuaiShouImageGetService;
-import com.xxl.job.executor.batch.service.IKuaiShouMaterialUploadService;
-import com.xxl.job.executor.batch.service.IKuaishouProgramCreativeService;
-import com.xxl.job.executor.common.entity.CtopOauthToken;
-import com.xxl.job.executor.common.service.IMaterialCutFrameService;
-import com.xxl.job.executor.constant.KuaishouInterfaceConstant;
-import com.xxl.job.executor.utils.Check;
-import com.xxl.job.executor.utils.HttpUtils;
-import com.xxl.job.executor.utils.PropertiesUtils;
-import lombok.extern.slf4j.Slf4j;
-import lombok.var;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 快手-程序化创意
- *
- * @author jeecg-boot
- * @version V1.0
- * @date 2020-09-22
- */
-@Service
-@Slf4j
-public class KuaishouProgramCreativeServiceImpl extends ServiceImpl<KuaishouProgramCreativeMapper, KuaishouProgramCreative> implements IKuaishouProgramCreativeService {
-
-    @Autowired
-    private IKuaiShouImageGetService imageGetService;
-    @Autowired
-    private IKuaiShouMaterialUploadService uploadService;
-
-    @Autowired
-    private IMaterialCutFrameService materialCutFrameService;
-
-
-    @Override
-    public void getProgramCreative(Long accountId, Long unitId, String accessToken, String startDate, String endDate, Integer page) {
-        String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.PROGRAM_LIST;
-        Map<String, String> headers = new HashMap<>();
-        headers.put("Content-Type", "application/json");
-        headers.put("Access-Token", accessToken);
-        Map<String, Object> param = new HashMap<>();
-        if (!Check.isNull(startDate)) {
-            param.put("start_date", startDate);
-        }
-        if (!Check.isNull(endDate)) {
-            param.put("end_date", endDate);
-        }
-
-        if (!Check.isNull(unitId)) {
-            JSONArray array = new JSONArray();
-            array.add(unitId);
-            param.put("unit_ids", array);
-        }
-
-
-        param.put("advertiser_id", accountId);
-        param.put("page_size", 500);
-        param.put("page", page);
-
-        String result = HttpUtils.httpPostRequest(url, param, headers);
-        JSONObject resultJson = JSONObject.parseObject(result);
-        Integer code = resultJson.getInteger("code");
-        String message = resultJson.getString("message");
-        if (null == code || code != 0) {
-            log.error("获取快手广程序化创意异常:{},accountId:{}", message, accountId);
-            return;
-        }
-        JSONObject dataJson = resultJson.getJSONObject("data");
-        if (Check.isNull(dataJson)) {
-            log.error("获取快手广程序化创意返回data为空,accountId:{}", accountId);
-            return;
-        }
-        JSONArray details = dataJson.getJSONArray("details");
-        if (Check.isNull(details)) {
-            return;
-        }
-
-        List<KuaishouProgramCreative> programCreativeList = new ArrayList<>();
-        for (int i = 0; i < details.size(); i++) {
-            JSONObject detailJson = details.getJSONObject(i);
-            if (!Check.isNull(detailJson)) {
-                detailJson.put("creative_create_time", detailJson.getDate("create_time"));
-                detailJson.put("creative_update_time", detailJson.getDate("update_time"));
-                var programCreative = JSONObject.toJavaObject(detailJson, KuaishouProgramCreative.class);
-                programCreative.setAccountId(accountId);
-                programCreative.setId(accountId + "_" + programCreative.getUnitId());
-                programCreativeList.add(programCreative);
-
-            }
-        }
-
-        this.saveOrUpdateBatch(programCreativeList);
-    }
-
-    /**
-     * 创建程序化2.0
-     *
-     * @param oauthToken
-     * @param requestJson
-     * @return
-     */
-
-    @Override
-    public JSONObject createProgramCreative(CtopOauthToken oauthToken, JSONObject requestJson) {
-
-        JSONObject returnJson = new JSONObject();
-        try {
-
-
-            JSONObject pramsJson = new JSONObject();
-            pramsJson.put("advertiser_id", oauthToken.getAccountId());
-            pramsJson.put("unit_id", requestJson.getLong("unitId"));
-            pramsJson.put("package_name", requestJson.getString("packageName"));
-            pramsJson.put("horizontal_photo_ids", requestJson.getJSONArray("horizontalPhotoIds"));
-            pramsJson.put("vertical_photo_ids", requestJson.getJSONArray("verticalPhotoIds"));
-            pramsJson.put("cover_image_tokens", requestJson.getJSONArray("coverImageTokens"));
-            if (!Check.isNull(requestJson.getLong("siteId"))) {
-                pramsJson.put("site_id", requestJson.getLong("siteId"));
-            }
-
-            if (!Check.isNull(requestJson.getJSONArray("stickerStyles"))) {
-                pramsJson.put("sticker_styles", requestJson.getJSONArray("stickerStyles"));
-            }
-
-            if (!Check.isNull(requestJson.getJSONArray("coverSlogans"))) {
-                pramsJson.put("cover_slogans", requestJson.getJSONArray("coverSlogans"));
-            }
-
-            Integer creativeCategory = requestJson.getInteger("creativeCategory");
-            JSONArray creativeTag = requestJson.getJSONArray("creativeTag");
-
-            if (!Check.isNull(creativeCategory) && !Check.isNull(creativeTag)) {
-                pramsJson.put("creative_category", creativeCategory);
-                pramsJson.put("creative_tag", creativeTag);
-            }
-            pramsJson.put("action_bar", requestJson.getString("actionBarText"));
-            pramsJson.put("captions", requestJson.getJSONArray("captions"));
-            if (!Check.isNull(requestJson.getString("clickUrl"))) {
-                pramsJson.put("click_url", requestJson.getString("clickUrl"));
-            }
-            if (!Check.isNull(requestJson.getString("actionbarClickUrl"))) {
-                pramsJson.put("actionbar_click_url", requestJson.getString("actionbarClickUrl"));
-            }
-            Map<String, String> headers = new HashMap<>();
-            headers.put("Content-Type", "application/json");
-            headers.put("Access-Token", oauthToken.getAccessToken());
-            String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.PROGRAM_CREATE;
-            JSONArray coverImageTokens = requestJson.getJSONArray("coverImageTokens");
-            JSONArray cover_image_tokens = new JSONArray();
-            requestJson.remove(coverImageTokens);
-            if (!Check.isNull(coverImageTokens)) {
-
-                for (int i = 0; i < coverImageTokens.size(); i++) {
-                    String signature = coverImageTokens.getString(i);
-                    if (Check.isNull(signature)) {
-                        continue;
-                    }
-                    String imageToken = null;
-
-                    if (!Check.isNull(signature)) {
-                        QueryWrapper<KuaiShouImageGet> queryWrapper = new QueryWrapper<>();
-                        queryWrapper.eq("account_id", oauthToken.getAccountId());
-                        queryWrapper.eq("signature", signature);
-                        queryWrapper.last("limit 1");
-                        KuaiShouImageGet imageGet = imageGetService.getOne(queryWrapper);
-                        if (!Check.isNull(imageGet)) {
-                            imageToken = imageGet.getImageToken();
-                        } else {
-                            String imageUrl = imageGetService.getUrlByCode(signature);
-                            imageToken = uploadService.kuauiShouImageUpload(imageUrl, signature, oauthToken.getAccountId(), oauthToken.getAccessToken());
-                        }
-                        cover_image_tokens.add(imageToken);
-                    }
-
-
-                }
-
-
-            }
-
-            pramsJson.put("cover_image_tokens", cover_image_tokens);
-
-            String result = HttpUtils.kuaiShouhttpPostRequest(url, pramsJson.toJSONString(), headers);
-            JSONObject jsonObject = JSONObject.parseObject(result);
-            log.info("创建程序化创意返回结果:{}", jsonObject);
-            if (!Check.isNull(jsonObject)) {
-                Integer code = jsonObject.getInteger("code");
-                if (code == 0) {
-                    returnJson.put("isTrueOrFalse", true);
-                    returnJson.put("message", "创建成功");
-                } else {
-                    log.error("创建失败:入参:{}", pramsJson);
-                    returnJson.put("isTrueOrFalse", false);
-                    returnJson.put("message", jsonObject.getString("message"));
-                }
-
-
-            }
-
-        } catch (Exception e) {
-            e.printStackTrace();
-            returnJson.put("isTrueOrFalse", false);
-            returnJson.put("message", "系统错误");
-
-        }
-
-
-        return returnJson;
-    }
-
-    @Override
-    public JSONArray getProgramCreativeCover(JSONArray md5Arr) {
-
-        JSONArray returnArr = new JSONArray();
-        for (int i = 0; i < md5Arr.size(); i++) {
-            String signature = md5Arr.getString(i);
-            if (Check.isNull(signature)) {
-                continue;
-            }
-            List<JSONObject> coverArr = materialCutFrameService.getProgramCreativeCover(signature);
-            if (!Check.isNull(coverArr)) {
-                for (int j = 0; j < coverArr.size(); j++) {
-                    JSONObject jsonObject = JSONObject.parseObject(coverArr.get(j).toJSONString());
-                    if (!Check.isNull(jsonObject)) {
-                        returnArr.add(jsonObject);
-                    }
-                }
-
-            }
-
-        }
-        return returnArr;
-    }
-
-
-}

+ 0 - 110
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/batch/service/impl/KuaishouRealTimeDataServiceImpl.java

@@ -1,110 +0,0 @@
-package com.xxl.job.executor.batch.service.impl;
-
-import com.alibaba.fastjson.JSONArray;
-import com.alibaba.fastjson.JSONObject;
-import com.xxl.job.executor.batch.service.IKuaishouRealTimeDataService;
-import com.xxl.job.executor.constant.KuaishouInterfaceConstant;
-import com.xxl.job.executor.utils.Check;
-import com.xxl.job.executor.utils.HttpUtils;
-import com.xxl.job.executor.utils.PropertiesUtils;
-import org.springframework.stereotype.Service;
-
-import java.util.HashMap;
-import java.util.Map;
-
-@Service
-public class KuaishouRealTimeDataServiceImpl implements IKuaishouRealTimeDataService {
-    /**
-     * 获取计划实时数据
-     *
-     * @param accountId
-     * @param token
-     * @param campaignId
-     * @param startDate
-     * @param endDate
-     * @return
-     */
-    @Override
-    public JSONArray getCampaignDate(Long accountId, String token, Long campaignId, String startDate, String endDate) {
-        String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.CAMPAIGN_REPORT;
-        Map<String, String> headers = new HashMap<>();
-        headers.put("Content-Type", "application/json");
-        headers.put("Access-Token", token);
-        Map<String, Object> param = new HashMap<>();
-        param.put("start_date", startDate);
-        param.put("end_date", endDate);
-        param.put("advertiser_id", accountId);
-        param.put("temporal_granularity", "DAILY");
-        param.put("page_size", 2000);
-        param.put("page", 1);
-
-        JSONArray array = new JSONArray();
-        array.add(campaignId);
-        param.put("campaign_ids", array);
-        try {
-            String result = HttpUtils.httpPostRequest(url, param, headers);
-            System.err.println(result);
-            JSONObject jsonObject = JSONObject.parseObject(result);
-            if (!Check.isNull(jsonObject)) {
-                Integer code = jsonObject.getInteger("code");
-                if (code == 0) {
-                    JSONObject data = jsonObject.getJSONObject("data");
-                    if (!Check.isNull(data)) {
-                        return data.getJSONArray("details");
-                    }
-
-                }
-            }
-
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        return null;
-    }
-
-    /**
-     * 获取组实时数据
-     *
-     * @param accountId
-     * @param token
-     * @param unitId
-     * @param startDate
-     * @param endDate
-     * @return
-     */
-    @Override
-    public JSONArray getUnitDate(Long accountId, String token, Long unitId, String startDate, String endDate) {
-        String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.GTOUP_REPORT;
-        Map<String, String> headers = new HashMap<>();
-        headers.put("Content-Type", "application/json");
-        headers.put("Access-Token", token);
-        Map<String, Object> param = new HashMap<>();
-        param.put("start_date", startDate);
-        param.put("end_date", endDate);
-        param.put("advertiser_id", accountId);
-        param.put("temporal_granularity", "DAILY");
-        param.put("page_size", 2000);
-        param.put("page", 1);
-
-        JSONArray array = new JSONArray();
-        array.add(unitId);
-        param.put("unit_ids", array);
-        try {
-            String result = HttpUtils.httpPostRequest(url, param, headers);
-            JSONObject jsonObject = JSONObject.parseObject(result);
-            if (!Check.isNull(jsonObject)) {
-                Integer code = jsonObject.getInteger("code");
-                if (code == 0) {
-                    JSONObject data = jsonObject.getJSONObject("data");
-                    if (!Check.isNull(data)) {
-                        return data.getJSONArray("details");
-                    }
-                }
-            }
-
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        return null;
-    }
-}

+ 0 - 142
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/common/entity/CtopOauthToken.java

@@ -1,142 +0,0 @@
-package com.xxl.job.executor.common.entity;
-
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.io.Serializable;
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.Date;
-
-/**
- * @Description: oauth授权码
- * @Author: jeecg-boot
- * @Date: 2019-07-09
- * @Version: V1.0
- */
-@Data
-@TableName("ctop_oauth_token")
-public class CtopOauthToken implements Serializable {
-
-    /**
-     * 主键ID
-     */
-    @TableId
-    private String id;
-    /**
-     * 媒体ID(外部广告平台类型,快手/头条/抖音等)
-     */
-    private String mediaId;
-    /**
-     * 广告主ID(自己平台用户内部id)
-     */
-    private String advertiserId;
-    /**
-     * 广告账户ID(相当于头条返回的access_token数据中的advertiser_id)
-     */
-    private Long accountId;
-    /**
-     * 访问令牌
-     */
-    private String accessToken;
-    /**
-     * 访问令牌有效期
-     */
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date accessTokenExpiresIn;
-    /**
-     * 刷新令牌
-     */
-    private String refreshToken;
-
-
-    private Integer agentType;
-
-    /**
-     * 刷新令牌有效期
-     */
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date refreshTokenExpiresIn;
-
-
-    /**
-     * 创建时间
-     */
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date createTime;
-    /**
-     * 修改时间
-     */
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date updateTime;
-
-    public CtopOauthToken(String userId, JSONObject data) {
-        Long accountId = data.getLong("advertiser_id");
-        this.id = String.valueOf(accountId);
-        this.advertiserId = userId;
-        this.mediaId = "1";
-        this.accountId = accountId;
-        String accessToken = data.getString("access_token");
-        Integer refreshTokenExpiresIn = data.getInteger("refresh_token_expires_in");
-        Integer expiresIn = data.getInteger("expires_in");
-        String refreshToken = data.getString("refresh_token");
-        this.accessToken = accessToken;
-        this.refreshToken = refreshToken;
-        Date now = new Date();
-        this.accessTokenExpiresIn = addSecond(now, expiresIn);
-        this.refreshTokenExpiresIn = addSecond(now, refreshTokenExpiresIn);
-        this.createTime = now;
-        this.updateTime = now;
-    }
-
-    public CtopOauthToken() {
-    }
-
-    public CtopOauthToken(CtopOauthToken token, JSONObject data) {
-        this.advertiserId = token.getAdvertiserId();
-        this.mediaId = "1";
-        this.accountId = token.getAccountId();
-        String accessToken = data.getString("access_token");
-        Integer refreshTokenExpiresIn = data.getInteger("refresh_token_expires_in");
-        Integer expiresIn = data.getInteger("expires_in");
-        String refreshToken = data.getString("refresh_token");
-        this.accessToken = accessToken;
-        this.refreshToken = refreshToken;
-        Date now = new Date();
-        this.accessTokenExpiresIn = addSecond(now, expiresIn);
-        this.refreshTokenExpiresIn = addSecond(now, refreshTokenExpiresIn);
-        this.updateTime = now;
-    }
-
-    private static Date addSecond(Date date, int seconds) {
-        Calendar calendar = Calendar.getInstance();
-        calendar.setTime(date);
-        calendar.add(Calendar.SECOND, seconds);
-        return calendar.getTime();
-    }
-
-    @Override
-    public String toString() {
-        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-        return id +
-                "," + mediaId +
-                "," + advertiserId +
-                "," + accountId +
-                "," + accessToken +
-                "," + sdf.format(accessTokenExpiresIn) +
-                "," + refreshToken +
-                "," + sdf.format(refreshTokenExpiresIn) +
-                "," + sdf.format(createTime) +
-                "," + sdf.format(updateTime);
-    }
-}

+ 0 - 52
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/common/entity/MaterialCutFrame.java

@@ -1,52 +0,0 @@
-package com.xxl.job.executor.common.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-
-import java.util.Date;
-
-
-/**
- * 截屏
- *
- * @author jeecg-boot
- * @version V1.0
- * @date 2019-12-25
- */
-@Data
-@TableName("ctop_material_cut_frame")
-public class MaterialCutFrame {
-
-    /**
-     * id
-     */
-    @TableId(type = IdType.AUTO)
-    private Long id;
-    /**
-     * 素材库id
-     */
-    private String videoSignature;
-    /**
-     * url
-     */
-    private String url;
-    /**
-     * md5
-     */
-    private String signature;
-    /**
-     * 素材标
-     */
-    private Integer imageIndex;
-
-    /**
-     * createTime
-     */
-    private Date createTime;
-    /**
-     * updateTime
-     */
-    private Date updateTime;
-}

+ 0 - 48
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/common/entity/MaterialCutFrameTask.java

@@ -1,48 +0,0 @@
-package com.xxl.job.executor.common.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-
-import java.util.Date;
-
-/**
- * 截帧 任务表
- *
- * @author jeecg-boot
- * @version V1.0
- * @date 2020-06-01
- */
-@Data
-@TableName("ctop_material_cut_frame_task")
-public class MaterialCutFrameTask {
-
-    /**
-     * id
-     */
-    @TableId(type = IdType.AUTO)
-    private Long id;
-    /**
-     * 视频md5
-     */
-    private String videoSignature;
-    /**
-     * jobId
-     */
-    private String jobId;
-    /**
-     * 任务状态 0 未执行 1 已完成
-     */
-    private Integer jobStatus;
-    /**
-     * createTime
-     */
-    private Date createTime;
-    /**
-     * updateTime
-     */
-    private Date updateTime;
-
-    private Integer cloud_type;
-}

+ 0 - 157
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/common/entity/MaterialInfo.java

@@ -1,157 +0,0 @@
-package com.xxl.job.executor.common.entity;
-
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import lombok.Data;
-
-import java.math.BigDecimal;
-import java.util.Date;
-
-/**
- * 素材信息
- *
- * @author jeecg-boot
- * @version V1.0
- * @date 2019-10-11
- */
-@Data
-@TableName("ctop_material_info")
-public class MaterialInfo {
-
-    /**
-     * id
-     */
-    @TableId(type = IdType.UUID)
-    private String id;
-    /**
-     * code
-     */
-    private String code;
-    private String watermarkCode;
-    /**
-     * url
-     */
-    private String url;
-    /**
-     * 封面url
-     */
-    private String coverUrl;
-
-    /**
-     * 水印素材链接
-     */
-    private String watermarkUrl;
-
-    private String type;
-    /**
-     * 审核人id
-     */
-    private String auditorId;
-    /**
-     * status
-     * <p>
-     * 0-待审核 1-审核通过 2-审核拒绝
-     */
-    private Integer status;
-    /**
-     * userId
-     */
-    private String userId;
-
-    private String materialDescribe;
-
-    private Long projectId;
-
-    /**
-     * 素材名称
-     */
-    private String materialName;
-
-    /**
-     * 水印素材名称
-     */
-    private String watermarkMaterialName;
-
-    /**
-     * 拒绝原因
-     */
-    private String refuseReason;
-    /**
-     * 拒绝上传文件
-     */
-    private String refuseFile;
-
-    /**
-     * 创意文案
-     */
-    private String creativeCopywriter;
-
-    /**
-     * 是否优秀素材
-     */
-    private Integer excellent;
-    /**
-     * createTime
-     */
-    private Object createTime;
-    /**
-     * updateTime
-     */
-    private Date updateTime;
-
-    private Integer toutiaoEffiType; //判断是否为头条有效素材0否_1是
-
-    private Integer kuaishouEffiType; //判断是否为快手有效素材0否_1是
-
-    @TableField(exist = false)
-    private Integer kuaishouVideoIsUp;  //判断是否已经同步到快手平台0否_1是
-
-    @TableField(exist = false)
-    private Integer toutiaoVideoIsUp;  //判断是否已经同步到头条平台0否_1是
-
-    @TableField(exist = false)
-    private JSONObject byteDance;
-
-    @TableField(exist = false)
-    private JSONObject kuaiShou;
-
-    @TableField(exist = false)
-    private String videoRoleCode;  //拍摄时候担任的角色
-
-    @TableField(exist = false)
-    private String originRoleName;  //原本的角色
-
-    @TableField(exist = false)
-    private BigDecimal cost;
-
-    @TableField(exist = false)
-    private BigDecimal bytedanceCost;
-
-    @TableField(exist = false)
-    private String realname;
-
-    @TableField(exist = false)
-    private Boolean whetherUnaudited;  // 是否有未审核封面
-
-
-    @TableField(exist = false)
-    private String mediaId;  // 是否有未审核封面
-
-    @TableField(exist = false)
-    private String projectName;  // 是否有未审核封面
-
-
-    private String supplierCode; // 素造供应商
-
-
-    @TableField(exist = false)
-    private String startDate;  // 是否有未审核封面
-
-    @TableField(exist = false)
-    private String endDate;  // 是否有未审核封面
-
-
-}

+ 0 - 74
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/common/entity/OauthAgentToken.java

@@ -1,74 +0,0 @@
-package com.xxl.job.executor.common.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.util.Date;
-
-/**
- * 代理商token
- *
- * @author jeecg-boot
- * @version V1.0
- * @date 2020-08-18
- */
-@Data
-@TableName("ctop_oauth_agent_token")
-@EqualsAndHashCode(callSuper = false)
-@Accessors(chain = true)
-public class OauthAgentToken {
-
-    /**
-     * 主键ID
-     */
-    @TableId(type = IdType.UUID)
-    private String id;
-    /**
-     * 媒体ID(外部广告平台类型,快手/头条/抖音等)
-     */
-    private String mediaId;
-
-    private Long agentId;
-    /**
-     * 访问令牌
-     */
-    private String accessToken;
-    /**
-     * 访问令牌有效期
-     */
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date accessTokenExpiresIn;
-    /**
-     * 刷新令牌
-     */
-    private String refreshToken;
-    /**
-     * 刷新令牌有效期
-     */
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date refreshTokenExpiresIn;
-    /**
-     * 代理商类型 0:三方代理商 1:本代理商
-     */
-    private Integer agentType;
-    /**
-     * 创建时间
-     */
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date createTime;
-    /**
-     * 修改时间
-     */
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date updateTime;
-}

+ 0 - 115
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/common/entity/UserAllocation.java

@@ -1,115 +0,0 @@
-package com.xxl.job.executor.common.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-import lombok.experimental.Accessors;
-import org.springframework.format.annotation.DateTimeFormat;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.util.Date;
-
-/**
- * 用户分配
- *
- * @author jeecg-boot
- * @version V1.0
- * @date 2019-08-08
- */
-@Data
-@TableName("ctop_user_allocation")
-@EqualsAndHashCode(callSuper = false)
-@Accessors(chain = true)
-public class UserAllocation implements Serializable {
-
-    /**
-     * 主键ID
-     */
-    @TableId(type = IdType.AUTO)
-    private Long id;
-    /**
-     * 登陆人id
-     */
-    private String userId;
-
-    private String userName;
-
-    /**
-     * 账户id --授权
-     */
-    private Long accountId;
-    /**
-     * 广告主ID
-     */
-    private String advertiserId;
-
-    private String systemType;
-
-    /**
-     * 项目id
-     */
-    private Long projectId;
-
-    /**
-     * 输入账号  --登陆
-     */
-    private String accountName;
-
-    /**
-     * 预警 金额
-     */
-    private BigDecimal warningAmount;
-
-    /**
-     * 预警 比例
-     */
-    private BigDecimal warningProportion;
-
-    /**
-     * 创建时间
-     */
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date createTime;
-
-    /**
-     * 授权名称
-     */
-    private String authName;
-
-
-    /**
-     * 0 启动
-     * 1 禁用
-     */
-    private Integer accountStatus;
-
-    /**
-     * 检测链接预警
-     * 0 启动
-     * 1 禁用
-     */
-    private Integer monitoringLink;
-
-    /**
-     * 检测链接预警
-     * 0 启动
-     * 1 禁用
-     */
-    private Integer landingPage;
-
-    /**
-     * 修改时间
-     */
-    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
-    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
-    private Date updateTime;
-    /**
-     * 平台类型 1 头条 2快手
-     */
-    private String mediaId;
-}

+ 0 - 59
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/common/mapper/CtopOauthTokenMapper.java

@@ -1,59 +0,0 @@
-package com.xxl.job.executor.common.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.xxl.job.executor.common.entity.CtopOauthToken;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * @Description: oauth授权码
- * @Author: jeecg-boot
- * @Date: 2019-07-09
- * @Version: V1.0
- */
-public interface CtopOauthTokenMapper extends BaseMapper<CtopOauthToken> {
-    /**
-     * 更新
-     *
-     * @param oauthToken
-     * @return
-     */
-    int updateByPrimaryKeySelective(CtopOauthToken oauthToken);
-
-    /**
-     * 根据accountId查询
-     *
-     * @param accountId
-     * @return
-     */
-    CtopOauthToken selectByAccountId(Long accountId);
-
-    List<CtopOauthToken> selectKuaiShouToken();
-
-    List<CtopOauthToken> selectKuaiShouTokenBefore();
-
-    List<CtopOauthToken> selectToutiaoToken();
-
-    CtopOauthToken getAccessTokenByAccountIdAndMediaId(@Param("mediaId") Integer mediaId, @Param("accountId") Long accountId);
-
-    List<CtopOauthToken> getToutiaoTokenByCreateTime(@Param("createTime") String createTime);
-
-    /**
-     * 查询头条token
-     *
-     * @param platformTypeByteDance
-     * @return
-     */
-    List<CtopOauthToken> selectByteDanceTokens(@Param("mediaId") String platformTypeByteDance);
-
-
-    /**
-     * 查询头条token
-     *
-     * @param platformTypeByteDance
-     * @return
-     */
-    List<CtopOauthToken> selectKuaiShouTokens(@Param("mediaId") String platformTypeByteDance);
-
-}

+ 0 - 23
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/common/mapper/MaterialCutFrameMapper.java

@@ -1,23 +0,0 @@
-package com.xxl.job.executor.common.mapper;
-
-import com.alibaba.fastjson.JSONObject;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.xxl.job.executor.common.entity.MaterialCutFrame;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-
-/**
- * 截屏
- *
- * @author: jeecg-boot
- * @date: 2019-12-25
- * @cersion: V1.0
- */
-public interface MaterialCutFrameMapper extends BaseMapper<MaterialCutFrame> {
-
-    List<MaterialCutFrame> getListByVideoSignature(@Param(value = "videoSignature") String signature);
-
-    List<JSONObject> getProgramCreativeCover(@Param("signature") String signature);
-}

+ 0 - 0
xxl-job-executor-samples/xxl-job-executor-sample-springboot/src/main/java/com/xxl/job/executor/common/mapper/MaterialCutFrameTaskMapper.java


Some files were not shown because too many files changed in this diff