Browse Source

初始化

xueyiming 4 months ago
commit
1c1c593755
77 changed files with 9703 additions and 0 deletions
  1. 146 0
      pom.xml
  2. 44 0
      tencent-ad-server/pom.xml
  3. 12 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/TencentAdServerApplication.java
  4. 72 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/common/base/CommonResponse.java
  5. 20 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/common/base/ExceptionCodeEnum.java
  6. 13 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/common/constants/ResponseConstant.java
  7. 13 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/common/constants/TimeConstant.java
  8. 40 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/common/enums/AdMuseTaskStatusEnum.java
  9. 37 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/common/enums/AdVideoImageStatusEnum.java
  10. 42 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/common/enums/AdVideoStatusEnum.java
  11. 26 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/common/enums/DimensionSizeEnum.java
  12. 35 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/common/enums/SimilarityCodeEnum.java
  13. 102 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/component/HttpPoolClient.java
  14. 48 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/config/DataSourceConfig.java
  15. 64 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/config/HttpClientConfig.java
  16. 49 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/config/XxlJobConfig.java
  17. 23 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/controller/AdCreativeController.java
  18. 63 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/controller/AdVideoController.java
  19. 31 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/dao/generator/MybatisGeneratorMain.java
  20. 76 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/dao/generator/PaginationPlugin.java
  21. 30 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/dao/mapper/AdCreativeMapper.java
  22. 30 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/dao/mapper/AdGroupMapper.java
  23. 30 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/dao/mapper/AdMuseTaskMapper.java
  24. 30 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/dao/mapper/AdVideoImageMapper.java
  25. 30 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/dao/mapper/AdVideoMapper.java
  26. 24 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/job/AdVideoJobs.java
  27. 26 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/bo/ImageParam.java
  28. 15 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/bo/MuseTask.java
  29. 103 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/po/AdCreative.java
  30. 692 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/po/AdCreativeExample.java
  31. 92 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/po/AdGroup.java
  32. 652 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/po/AdGroupExample.java
  33. 180 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/po/AdMuseTask.java
  34. 1162 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/po/AdMuseTaskExample.java
  35. 158 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/po/AdVideo.java
  36. 1042 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/po/AdVideoExample.java
  37. 136 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/po/AdVideoImage.java
  38. 912 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/po/AdVideoImageExample.java
  39. 15 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdCreativeParam.java
  40. 14 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdMuseImageParam.java
  41. 23 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdMuseImageVo.java
  42. 37 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdPutFlowParam.java
  43. 19 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdVideoImageParam.java
  44. 31 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdVideoImageVo.java
  45. 14 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdVideoParam.java
  46. 34 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdVideoVo.java
  47. 6 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/AdAccountService.java
  48. 10 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/AdCreativeService.java
  49. 8 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/AdGroupService.java
  50. 27 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/AdMuseTaskService.java
  51. 26 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/AdVideoImageService.java
  52. 23 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/AdVideoService.java
  53. 11 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/TencentService.java
  54. 17 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/impl/AdAccountServiceImpl.java
  55. 171 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/impl/AdCreativeServiceImpl.java
  56. 19 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/impl/AdGroupServiceImpl.java
  57. 260 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/impl/AdMuseTaskServiceImpl.java
  58. 141 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/impl/AdVideoImageServiceImpl.java
  59. 280 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/impl/AdVideoServiceImpl.java
  60. 84 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/impl/TencentServiceImpl.java
  61. 26 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/utils/DateUtils.java
  62. 55 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/utils/FfmpegUtil.java
  63. 152 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/utils/ImageUtils.java
  64. 36 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/utils/OSSUploader.java
  65. 108 0
      tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/utils/page/Page.java
  66. 10 0
      tencent-ad-server/src/main/resources/application-prod.properties
  67. 13 0
      tencent-ad-server/src/main/resources/application-test.properties
  68. 33 0
      tencent-ad-server/src/main/resources/application.properties
  69. 0 0
      tencent-ad-server/src/main/resources/ccc
  70. 94 0
      tencent-ad-server/src/main/resources/log4j2.xml
  71. 261 0
      tencent-ad-server/src/main/resources/mapper/AdCreativeMapper.xml
  72. 246 0
      tencent-ad-server/src/main/resources/mapper/AdGroupMapper.xml
  73. 373 0
      tencent-ad-server/src/main/resources/mapper/AdMuseTaskMapper.xml
  74. 309 0
      tencent-ad-server/src/main/resources/mapper/AdVideoImageMapper.xml
  75. 341 0
      tencent-ad-server/src/main/resources/mapper/AdVideoMapper.xml
  76. 13 0
      tencent-ad-server/src/main/resources/mybatis-config.xml
  77. 63 0
      tencent-ad-server/src/main/resources/mybatis-generator-config.xml

+ 146 - 0
pom.xml

@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <packaging>pom</packaging>
+  <modules>
+    <module>tencent-ad-server</module>
+  </modules>
+  <parent>
+    <groupId>com.tzld.commons</groupId>
+    <artifactId>supom</artifactId>
+    <version>1.0.6</version>
+  </parent>
+
+  <groupId>com.tzld.piaoquan</groupId>
+  <artifactId>tencent-ad-manage</artifactId>
+  <version>1.0.0</version>
+  <name>tencent-ad-manage</name>
+  <description>tencent-ad-manage</description>
+
+
+  <dependencies>
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-starter-web</artifactId>
+      <exclusions>
+        <exclusion>
+          <groupId>org.springframework.boot</groupId>
+          <artifactId>spring-boot-starter-logging</artifactId>
+        </exclusion>
+      </exclusions>
+
+    </dependency>
+
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-starter-log4j2</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>mysql</groupId>
+      <artifactId>mysql-connector-java</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.mybatis.spring.boot</groupId>
+      <artifactId>mybatis-spring-boot-starter</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>com.github.pagehelper</groupId>
+      <artifactId>pagehelper-spring-boot-starter</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-starter-data-redis</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>io.lettuce</groupId>
+      <artifactId>lettuce-core</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-pool2</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.mybatis.generator</groupId>
+      <artifactId>mybatis-generator-core</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-starter-test</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-lang3</artifactId>
+    </dependency>
+
+    <!-- druid数据源 -->
+    <dependency>
+      <groupId>com.alibaba</groupId>
+      <artifactId>druid</artifactId>
+      <version>1.1.23</version>
+    </dependency>
+
+    <dependency>
+      <groupId>com.alibaba</groupId>
+      <artifactId>fastjson</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.projectlombok</groupId>
+      <artifactId>lombok</artifactId>
+      <version>1.18.12</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.httpcomponents</groupId>
+      <artifactId>httpclient</artifactId>
+      <version>4.5.14</version> <!-- 使用最新版本 -->
+    </dependency>
+
+    <!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpmime -->
+    <dependency>
+      <groupId>org.apache.httpcomponents</groupId>
+      <artifactId>httpmime</artifactId>
+      <version>4.5.14</version>
+    </dependency>
+
+    <!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore -->
+    <dependency>
+      <groupId>org.apache.httpcomponents</groupId>
+      <artifactId>httpcore</artifactId>
+      <version>4.4.16</version>
+    </dependency>
+
+
+    <!-- https://mvnrepository.com/artifact/ws.schild/jave-all-deps -->
+    <dependency>
+      <groupId>ws.schild</groupId>
+      <artifactId>jave-all-deps</artifactId>
+      <version>3.3.1</version>
+    </dependency>
+
+    <dependency>
+      <groupId>com.aliyun.oss</groupId>
+      <artifactId>aliyun-sdk-oss</artifactId>
+      <version>3.17.0</version> <!-- 请根据需要选择版本 -->
+    </dependency>
+
+    <dependency>
+      <groupId>com.xuxueli</groupId>
+      <artifactId>xxl-job-core</artifactId>
+    </dependency>
+
+  </dependencies>
+
+</project>

+ 44 - 0
tencent-ad-server/pom.xml

@@ -0,0 +1,44 @@
+<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.tzld.piaoquan</groupId>
+        <artifactId>tencent-ad-manage</artifactId>
+        <version>1.0.0</version>
+    </parent>
+
+    <groupId>tencent-ad-manage</groupId>
+    <artifactId>tencent-ad-server</artifactId>
+    <version>1.0-SNAPSHOT</version>
+
+
+    <properties>
+        <maven.compiler.source>8</maven.compiler.source>
+        <maven.compiler.target>8</maven.compiler.target>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    </properties>
+
+    <build>
+        <!-- 固定包名 避免随着版本变动 -->
+        <finalName>tencent-ad-server</finalName>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+                <includes>
+                    <include>**/*.yml</include>
+                    <include>**/*.yaml</include>
+                    <include>**/*.xml</include>
+                    <include>**/*.properties</include>
+                </includes>
+                <filtering>false</filtering>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+
+    </build>
+</project>

+ 12 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/TencentAdServerApplication.java

@@ -0,0 +1,12 @@
+package com.tzld.piaoquan.tencentad;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class TencentAdServerApplication {
+
+    public static void main(String[] args) {
+        SpringApplication.run(TencentAdServerApplication.class, args);
+    }
+}

+ 72 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/common/base/CommonResponse.java

@@ -0,0 +1,72 @@
+package com.tzld.piaoquan.tencentad.common.base;
+
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
+import static com.tzld.piaoquan.tencentad.common.constants.ResponseConstant.SUCCESS_CODE;
+import static com.tzld.piaoquan.tencentad.common.constants.ResponseConstant.SUCCESS_MSG;
+
+
+/**
+ * Common Response
+ *
+ * @author xueyiming
+ */
+@Setter
+@Getter
+@ToString
+public class CommonResponse<T> {
+    /**
+     * 返回状态码,0 表示业务成功
+     */
+    private int code = 0;
+    /**
+     * 返回消息
+     */
+    private String msg = "success";
+    /**
+     * 业务成功时返回数据
+     */
+    private T data;
+
+    public static <T> CommonResponse<T> success() {
+        CommonResponse<T> commonResponse = new CommonResponse<>();
+        commonResponse.setCode(SUCCESS_CODE);
+        commonResponse.setMsg(SUCCESS_MSG);
+        return commonResponse;
+    }
+
+    public static <T> CommonResponse<T> success(T data) {
+        CommonResponse<T> commonResponse = new CommonResponse<>();
+        commonResponse.setCode(SUCCESS_CODE);
+        commonResponse.setMsg(SUCCESS_MSG);
+        commonResponse.setData(data);
+        return commonResponse;
+    }
+
+    public static <T> CommonResponse<T> create() {
+        return create(SUCCESS_CODE, SUCCESS_MSG, null);
+    }
+
+    public static <T> CommonResponse<T> create(T data) {
+        return create(SUCCESS_CODE, SUCCESS_MSG, data);
+    }
+
+    public static <T> CommonResponse<T> create(int code, String msg) {
+        return create(code, msg, null);
+    }
+
+    public static <T> CommonResponse<T> create(int code, String msg, T data) {
+        CommonResponse<T> commonResponse = new CommonResponse<>();
+        commonResponse.setCode(code);
+        commonResponse.setMsg(msg);
+        commonResponse.setData(data);
+        return commonResponse;
+    }
+
+    public boolean isSuccess() {
+        return this.code == SUCCESS_CODE;
+    }
+
+}

+ 20 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/common/base/ExceptionCodeEnum.java

@@ -0,0 +1,20 @@
+package com.tzld.piaoquan.tencentad.common.base;
+
+import lombok.Getter;
+
+@Getter
+public enum ExceptionCodeEnum {
+
+    SYS_ERROR(500, "系统异常"),
+    PARAM_ERROR(400, "参数错误");
+
+    ExceptionCodeEnum(int code, String msg) {
+        this.code = code;
+        this.msg = msg;
+    }
+
+    private final int code;
+    private final String msg;
+
+
+}

+ 13 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/common/constants/ResponseConstant.java

@@ -0,0 +1,13 @@
+package com.tzld.piaoquan.tencentad.common.constants;
+
+/**
+ * 响应常量
+ *
+ * @author xueyiming
+ */
+public interface ResponseConstant {
+
+    int SUCCESS_CODE = 0;
+
+    String SUCCESS_MSG = "success";
+}

+ 13 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/common/constants/TimeConstant.java

@@ -0,0 +1,13 @@
+package com.tzld.piaoquan.tencentad.common.constants;
+
+public interface TimeConstant {
+
+    Integer MINUTE = 60;
+    Integer HOUR = 60 * 60;
+    Integer DAY = 60 * 60 * 24;
+
+    Long MILLISECOND_MINUTE = (long) MINUTE * 1000;
+    Long MILLISECOND_HOUR = (long) HOUR * 1000;
+    Long MILLISECOND_DAY = (long) DAY * 1000;
+
+}

+ 40 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/common/enums/AdMuseTaskStatusEnum.java

@@ -0,0 +1,40 @@
+package com.tzld.piaoquan.tencentad.common.enums;
+
+import lombok.Getter;
+
+import java.util.Objects;
+
+@Getter
+public enum AdMuseTaskStatusEnum {
+
+    DEFAULT(0, "待处理"),
+    CREATE_SUCCESS(1, "创建成功"),
+    CREATE_FAIL(2, "创建失败"),
+    VERIFY_SUCCESS(3, "审核通过"),
+    VERIFY_FAIL(4, "审核不通过"),
+    UPLOAD_SUCCESS(5, "上传成功"),
+    UPLOAD_FAIL(6, "上传失败")
+
+    ;
+
+
+    final Integer status;
+
+    final String desc;
+
+    AdMuseTaskStatusEnum(Integer status, String desc) {
+        this.status = status;
+        this.desc = desc;
+    }
+
+    public static AdMuseTaskStatusEnum getByStatus(Integer status) {
+        for (AdMuseTaskStatusEnum adMuseTaskStatusEnum : AdMuseTaskStatusEnum.values()) {
+            if (Objects.equals(adMuseTaskStatusEnum.getStatus(), status)) {
+                return adMuseTaskStatusEnum;
+            }
+        }
+        return null;
+    }
+
+
+}

+ 37 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/common/enums/AdVideoImageStatusEnum.java

@@ -0,0 +1,37 @@
+package com.tzld.piaoquan.tencentad.common.enums;
+
+import lombok.Getter;
+
+import java.util.Objects;
+
+@Getter
+public enum AdVideoImageStatusEnum {
+
+    DEFAULT(0, "未审核"),
+    VERIFY_SUCCESS(1, "审核成功"),
+    VERIFY_FAIL(2, "审核失败"),
+    UPLOAD_SUCCESS(3,"上传成功"),
+    UPLOAD_FAIL(4,"上传失败")
+    ;
+
+
+    final Integer status;
+
+    final String desc;
+
+    AdVideoImageStatusEnum(Integer status, String desc) {
+        this.status = status;
+        this.desc = desc;
+    }
+
+    public static AdVideoImageStatusEnum getByStatus(Integer status) {
+        for (AdVideoImageStatusEnum adStatusEnum : AdVideoImageStatusEnum.values()) {
+            if (Objects.equals(adStatusEnum.getStatus(), status)) {
+                return adStatusEnum;
+            }
+        }
+        return null;
+    }
+
+
+}

+ 42 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/common/enums/AdVideoStatusEnum.java

@@ -0,0 +1,42 @@
+package com.tzld.piaoquan.tencentad.common.enums;
+
+import lombok.Getter;
+
+import java.util.Objects;
+
+@Getter
+public enum AdVideoStatusEnum {
+
+    DEFAULT(0, "默认"),
+    CROP_SUCCESS(1, "裁剪成功"),
+    CROP_FAIL(2, "裁剪失败"),
+    VERIFY_SUCCESS(3, "审核通过"),
+    VERIFY_FAIL(4, "审核不通过"),
+    UPLOAD_SUCCESS(5, "上传成功"),
+    UPLOAD_FAIL(6, "上传失败"),
+    MUSE_SUCCESS(7, "妙思任务成功"),
+    MUSE_FAIL(8, "妙思任务成功"),
+    MUSE_UPLOAD_SUCCESS(9, "妙思任务二次编辑上传成功"),
+    MUSE_UPLOAD_FAIL(10, "妙思任务二次编辑上传失败");
+
+
+    final Integer status;
+
+    final String desc;
+
+    AdVideoStatusEnum(Integer status, String desc) {
+        this.status = status;
+        this.desc = desc;
+    }
+
+    public static AdVideoStatusEnum getByStatus(Integer status) {
+        for (AdVideoStatusEnum adStatusEnum : AdVideoStatusEnum.values()) {
+            if (Objects.equals(adStatusEnum.getStatus(), status)) {
+                return adStatusEnum;
+            }
+        }
+        return null;
+    }
+
+
+}

+ 26 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/common/enums/DimensionSizeEnum.java

@@ -0,0 +1,26 @@
+package com.tzld.piaoquan.tencentad.common.enums;
+
+import lombok.Getter;
+
+import java.util.Objects;
+
+@Getter
+public enum DimensionSizeEnum {
+
+    SIZE_1280_720("SIZE_1280_720", "1280x720"),
+    SIZE_720_1280("SIZE_720_1280", "720x1280"),
+    SIZE_800_800("SIZE_800_800", "800x800");
+
+
+    final String size;
+
+    final String desc;
+
+    DimensionSizeEnum(String size, String desc) {
+        this.size = size;
+        this.desc = desc;
+    }
+
+
+
+}

+ 35 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/common/enums/SimilarityCodeEnum.java

@@ -0,0 +1,35 @@
+package com.tzld.piaoquan.tencentad.common.enums;
+
+import lombok.Getter;
+
+import java.util.Objects;
+
+@Getter
+public enum SimilarityCodeEnum {
+
+    FIRST(1, "极低"),
+    SECOND(2, "较低"),
+    THIRD(3, "中等"),
+    FOURTH(4, "较高"),
+    FIFTH(5, "极高");
+
+
+    final Integer code;
+
+    final String desc;
+
+    SimilarityCodeEnum(Integer code, String desc) {
+        this.code = code;
+        this.desc = desc;
+    }
+
+    public static SimilarityCodeEnum getByCode(Integer code) {
+        for (SimilarityCodeEnum similarityCodeEnum : SimilarityCodeEnum.values()) {
+            if (Objects.equals(similarityCodeEnum.getCode(), code)) {
+                return similarityCodeEnum;
+            }
+        }
+        return null;
+    }
+
+}

+ 102 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/component/HttpPoolClient.java

@@ -0,0 +1,102 @@
+package com.tzld.piaoquan.tencentad.component;
+
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpStatus;
+import org.apache.http.client.methods.*;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.entity.mime.MultipartEntityBuilder;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.util.EntityUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.util.CollectionUtils;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.SocketTimeoutException;
+import java.nio.charset.StandardCharsets;
+import java.util.Map;
+
+@Slf4j
+@Component
+public class HttpPoolClient {
+
+    @Autowired
+    private CloseableHttpClient httpClient;
+
+    public String get(String url) throws IOException {
+        HttpGet httpGet = new HttpGet(url);
+        return request(httpGet);
+    }
+
+    public String post(String url) throws IOException {
+        HttpPost httpPost = new HttpPost(url);
+        return request(httpPost);
+    }
+
+
+    public String post(String url, String json) throws IOException {
+        HttpPost httpPost = new HttpPost(url);
+        if (StringUtils.isBlank(json)) {
+            return request(httpPost);
+        }
+        StringEntity entity = new StringEntity(json, StandardCharsets.UTF_8);
+        entity.setContentEncoding("UTF-8");
+        entity.setContentType("application/json");
+        httpPost.setEntity(entity);
+        return request(httpPost);
+    }
+
+    public String post(String url, File file, Map<String, String> param) throws IOException {
+        HttpPost httpPost = new HttpPost(url);
+
+        MultipartEntityBuilder builder = MultipartEntityBuilder.create();
+        builder.addBinaryBody("file", file);
+        if (!CollectionUtils.isEmpty(param)) {
+            for (Map.Entry<String, String> map : param.entrySet()) {
+                builder.addTextBody(map.getKey(), map.getValue());
+            }
+        }
+        httpPost.setEntity(builder.build());
+        return request(httpPost);
+    }
+
+    public String request(HttpRequestBase request) throws IOException {
+
+        HttpEntity entity = null;
+        CloseableHttpResponse response = request((HttpUriRequest) request);
+        if (response == null) {
+            log.error("call api exception no response");
+            throw new RuntimeException("call api exception no response");
+        }
+        entity = response.getEntity();
+        String content = null;
+        if (entity != null) {
+            content = EntityUtils.toString(entity, "UTF-8");
+        }
+        int httpStatus = response.getStatusLine().getStatusCode();
+        if (httpStatus == HttpStatus.SC_OK) {
+            return content;
+        }
+        String path = request.getURI().toString();
+        log.error("http call api {} fail response status {} content {}", path, httpStatus, content);
+        return null;
+    }
+
+
+    public CloseableHttpResponse request(HttpUriRequest request) {
+        try {
+            return httpClient.execute(request);
+        } catch (Exception e) {
+            String path = request.getURI().toString();
+            if (e instanceof SocketTimeoutException) {
+                log.error(String.format("http timeout request url = %s .", path));
+            }
+            throw new RuntimeException(String.format("http exception request url = %s ", path), e);
+        }
+    }
+
+
+}

+ 48 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/config/DataSourceConfig.java

@@ -0,0 +1,48 @@
+package com.tzld.piaoquan.tencentad.config;
+
+import com.alibaba.druid.pool.DruidDataSource;
+import org.apache.ibatis.session.SqlSessionFactory;
+import org.mybatis.spring.SqlSessionFactoryBean;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Primary;
+import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
+import org.springframework.jdbc.datasource.DataSourceTransactionManager;
+import org.springframework.transaction.PlatformTransactionManager;
+
+import javax.sql.DataSource;
+
+
+@Configuration
+@MapperScan(basePackages = DataSourceConfig.PACKAGE_MASTER, sqlSessionFactoryRef = "masterSqlSessionFactory")
+public class DataSourceConfig {
+    // 数据源
+    static final String PACKAGE_MASTER = "com.tzld.piaoquan.tencentad.dao";
+    static final String MAPPER_LOCATION_MASTER = "classpath:mapper/*.xml";
+
+    @Bean(name = "dataSource")
+    @ConfigurationProperties("spring.datasource")
+    public DataSource getDataSource(){
+        return new DruidDataSource();
+    }
+
+    @Primary
+    @Bean(name = "masterTransactionManager")
+    public PlatformTransactionManager masterTransactionManager(@Qualifier("dataSource") DataSource dataSource) {
+        return new DataSourceTransactionManager(dataSource);
+    }
+
+    @Primary
+    @Bean(name = "masterSqlSessionFactory")
+    public SqlSessionFactory masterSqlSessionFactory(@Qualifier("dataSource") DataSource dataSource) throws Exception {
+        final SqlSessionFactoryBean sessionFactoryBean = new SqlSessionFactoryBean();
+        sessionFactoryBean.setDataSource(dataSource);
+        sessionFactoryBean.setMapperLocations(new PathMatchingResourcePatternResolver().getResources(DataSourceConfig.MAPPER_LOCATION_MASTER));
+        return sessionFactoryBean.getObject();
+    }
+
+
+}

+ 64 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/config/HttpClientConfig.java

@@ -0,0 +1,64 @@
+package com.tzld.piaoquan.tencentad.config;
+
+import org.apache.http.client.config.RequestConfig;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.DefaultHttpRequestRetryHandler;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+public class HttpClientConfig {
+
+
+    /**
+     * 链接建立的超时时间 ms
+     */
+    private static final int CONNECTION_TIMEOUT = 3000;
+    /**
+     * 响应超时时间 ms
+     */
+    private static final int SOCKET_TIMEOUT = 20000;
+
+    /**
+     * 每个路由的最大连接数
+     */
+    private static final int MAX_PER_ROUTE = 20;
+
+    /**
+     * 最大连接数
+     */
+    private static final int MAX_TOTAL = 100;
+
+    /**
+     * 重试次数,默认0
+     */
+    private static final int RETRY_COUNT = 3;
+
+    /**
+     * 从connection pool中获得一个connection的超时时间 ms
+     */
+    private static final int CONNECTION_WAIT_TIMEOUT = 2000;
+
+
+    @Bean
+    public CloseableHttpClient httpClient() {
+
+        RequestConfig requestConfig = RequestConfig.custom()
+                .setConnectTimeout(CONNECTION_TIMEOUT)
+                .setSocketTimeout(SOCKET_TIMEOUT)
+                .setConnectionRequestTimeout(CONNECTION_WAIT_TIMEOUT)
+                .build();
+
+        PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager();
+        connectionManager.setMaxTotal(MAX_TOTAL); // 设置最大连接数
+        connectionManager.setDefaultMaxPerRoute(MAX_PER_ROUTE); // 每个路由的最大连接数
+
+        return HttpClientBuilder.create()
+                .setDefaultRequestConfig(requestConfig)
+                .setConnectionManager(connectionManager)
+                .setRetryHandler(new DefaultHttpRequestRetryHandler(RETRY_COUNT, false))
+                .build();
+    }
+}

+ 49 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/config/XxlJobConfig.java

@@ -0,0 +1,49 @@
+package com.tzld.piaoquan.tencentad.config;
+
+import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+public class XxlJobConfig {
+
+
+    @Value("${xxl.job.admin.addresses}")
+    private String adminAddresses;
+
+    @Value("${xxl.job.accessToken}")
+    private String accessToken;
+
+    @Value("${xxl.job.executor.appname}")
+    private String appName;
+
+    @Value("${xxl.job.executor.address}")
+    private String address;
+
+    @Value("${xxl.job.executor.ip}")
+    private String ip;
+
+    @Value("${xxl.job.executor.port}")
+    private int port;
+
+    @Value("${xxl.job.executor.logpath}")
+    private String logPath;
+
+    @Value("${xxl.job.executor.logretentiondays}")
+    private int logRetentionDays;
+
+    @Bean
+    public XxlJobSpringExecutor xxlJobExecutor() {
+        XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor();
+        xxlJobSpringExecutor.setAdminAddresses(adminAddresses);
+        xxlJobSpringExecutor.setAppname(appName);
+        xxlJobSpringExecutor.setAddress(address);
+        xxlJobSpringExecutor.setIp(ip);
+        xxlJobSpringExecutor.setPort(port);
+        xxlJobSpringExecutor.setAccessToken(accessToken);
+        xxlJobSpringExecutor.setLogPath(logPath);
+        xxlJobSpringExecutor.setLogRetentionDays(logRetentionDays);
+        return xxlJobSpringExecutor;
+    }
+}

+ 23 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/controller/AdCreativeController.java

@@ -0,0 +1,23 @@
+package com.tzld.piaoquan.tencentad.controller;
+
+import com.tzld.piaoquan.tencentad.common.base.CommonResponse;
+import com.tzld.piaoquan.tencentad.model.vo.AdCreativeParam;
+import com.tzld.piaoquan.tencentad.service.AdVideoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping("/ad/creative")
+public class AdCreativeController {
+
+    @Autowired
+    private AdVideoService adVideoService;
+
+    @PostMapping("/create")
+    public CommonResponse<Void> createAdCreative(@RequestBody AdCreativeParam creativeParam) {
+        return adVideoService.createAdCreative(creativeParam);
+    }
+}

+ 63 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/controller/AdVideoController.java

@@ -0,0 +1,63 @@
+package com.tzld.piaoquan.tencentad.controller;
+
+import com.tzld.piaoquan.tencentad.common.base.CommonResponse;
+import com.tzld.piaoquan.tencentad.model.po.AdVideo;
+import com.tzld.piaoquan.tencentad.model.po.AdVideoImage;
+import com.tzld.piaoquan.tencentad.model.vo.*;
+import com.tzld.piaoquan.tencentad.service.AdMuseTaskService;
+import com.tzld.piaoquan.tencentad.service.AdVideoImageService;
+import com.tzld.piaoquan.tencentad.service.AdVideoService;
+import com.tzld.piaoquan.tencentad.utils.page.Page;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@RestController
+@RequestMapping("/ad/video")
+public class AdVideoController {
+
+    @Autowired
+    private AdVideoService adVideoService;
+
+    @Autowired
+    private AdVideoImageService adVideoImageService;
+
+    @Autowired
+    private AdMuseTaskService adMuseTaskService;
+
+
+    @GetMapping("/get")
+    public CommonResponse<Page<AdVideoVo>> getAdVideoList(@RequestParam(defaultValue = "1") Integer pageNum,
+                                                          @RequestParam(defaultValue = "10") Integer pageSize) {
+        return adVideoService.getAdVideoList(pageNum, pageSize);
+    }
+
+    @PostMapping("/verify")
+    public CommonResponse<Void> verifyAdVideo(@RequestBody AdVideoParam adVideoParam) {
+        return adVideoService.verifyAdVideo(adVideoParam);
+    }
+
+    @GetMapping("/image/get")
+    public CommonResponse<List<AdVideoImageVo>> getAdVideoImageList(@RequestParam Long adVideoId) {
+        return adVideoImageService.getAdVideoImageVoList(adVideoId);
+    }
+
+    @PostMapping("/image/update")
+    public CommonResponse<Void> getAdVideoImageList(@RequestBody AdVideoImageParam adVideoImageParam) {
+        return adVideoImageService.updateAdVideoImage(adVideoImageParam);
+    }
+
+
+    @GetMapping("/muse/get")
+    public CommonResponse<List<AdMuseImageVo>> getAdMuseImageVoList(@RequestParam Long adVideoId) {
+        return adMuseTaskService.getAdMuseImageVoList(adVideoId);
+    }
+
+    @PostMapping("/muse/verify")
+    public CommonResponse<Void> verifyAdMuseImage(@RequestBody AdMuseImageParam adMuseImageParam) {
+        return adMuseTaskService.verifyMuseTask(adMuseImageParam);
+    }
+
+
+}

+ 31 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/dao/generator/MybatisGeneratorMain.java

@@ -0,0 +1,31 @@
+package com.tzld.piaoquan.tencentad.dao.generator;
+
+import org.mybatis.generator.api.MyBatisGenerator;
+import org.mybatis.generator.config.Configuration;
+import org.mybatis.generator.config.xml.ConfigurationParser;
+import org.mybatis.generator.exception.InvalidConfigurationException;
+import org.mybatis.generator.exception.XMLParserException;
+import org.mybatis.generator.internal.DefaultShellCallback;
+
+import java.io.File;
+import java.io.IOException;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.List;
+
+
+public class MybatisGeneratorMain {
+
+    public static void main(String[] args)
+            throws SQLException, IOException, InterruptedException, InvalidConfigurationException, XMLParserException {
+        List<String> warnings = new ArrayList<>();
+
+        File configFile = new File(MybatisGeneratorMain.class.getResource("/mybatis-generator-config.xml").getFile());
+        ConfigurationParser cp = new ConfigurationParser(warnings);
+        Configuration config = cp.parseConfiguration(configFile);
+        DefaultShellCallback callback = new DefaultShellCallback(true);
+        MyBatisGenerator myBatisGenerator = new MyBatisGenerator(config, callback, warnings);
+        myBatisGenerator.generate(null);
+        System.out.println("genreate finish");
+    }
+}

+ 76 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/dao/generator/PaginationPlugin.java

@@ -0,0 +1,76 @@
+package com.tzld.piaoquan.tencentad.dao.generator;
+
+import org.mybatis.generator.api.CommentGenerator;
+import org.mybatis.generator.api.IntrospectedTable;
+import org.mybatis.generator.api.PluginAdapter;
+import org.mybatis.generator.api.dom.java.*;
+import org.mybatis.generator.api.dom.xml.Attribute;
+import org.mybatis.generator.api.dom.xml.TextElement;
+import org.mybatis.generator.api.dom.xml.XmlElement;
+
+import java.util.List;
+
+public class PaginationPlugin extends PluginAdapter {
+
+    @Override
+    public boolean modelExampleClassGenerated(TopLevelClass topLevelClass, IntrospectedTable introspectedTable) {
+        addPage(topLevelClass, introspectedTable, "page");
+        return super.modelExampleClassGenerated(topLevelClass, introspectedTable);
+    }
+
+    @Override
+    public boolean sqlMapSelectByExampleWithoutBLOBsElementGenerated(XmlElement element, IntrospectedTable introspectedTable) {
+        XmlElement page = new XmlElement("if");
+        page.addAttribute(new Attribute("test", "page != null"));
+        page.addElement(new TextElement("limit #{page.offset} , #{page.pageSize}"));
+        element.addElement(page);
+        return super.sqlMapUpdateByExampleWithoutBLOBsElementGenerated(element, introspectedTable);
+    }
+
+    @Override
+    public boolean sqlMapSelectByExampleWithBLOBsElementGenerated(XmlElement element, IntrospectedTable introspectedTable) {
+        XmlElement page = new XmlElement("if");
+        page.addAttribute(new Attribute("test", "page != null"));
+        page.addElement(new TextElement("limit #{page.offset} , #{page.pageSize}"));
+        element.addElement(page);
+        return super.sqlMapSelectByExampleWithBLOBsElementGenerated(element, introspectedTable);
+    }
+
+    /**
+     * @param topLevelClass
+     * @param introspectedTable
+     * @param name
+     */
+    private void addPage(TopLevelClass topLevelClass, IntrospectedTable introspectedTable, String name) {
+        topLevelClass.addImportedType(new FullyQualifiedJavaType("com.tzld.piaoquan.tencentad.utils.page.Page"));
+        CommentGenerator commentGenerator = context.getCommentGenerator();
+        Field field = new Field();
+        field.setVisibility(JavaVisibility.PROTECTED);
+        field.setType(new FullyQualifiedJavaType("com.tzld.piaoquan.tencentad.utils.page.Page"));
+        field.setName(name);
+        commentGenerator.addFieldComment(field, introspectedTable);
+        topLevelClass.addField(field);
+        char c = name.charAt(0);
+        String camel = Character.toUpperCase(c) + name.substring(1);
+        Method method = new Method();
+        method.setVisibility(JavaVisibility.PUBLIC);
+        method.setName("set" + camel);
+        method.addParameter(new Parameter(new FullyQualifiedJavaType("com.tzld.piaoquan.tencentad.utils.page.Page"), name));
+        method.addBodyLine("this." + name + "=" + name + ";");
+        commentGenerator.addGeneralMethodComment(method, introspectedTable);
+        topLevelClass.addMethod(method);
+        method = new Method();
+        method.setVisibility(JavaVisibility.PUBLIC);
+        method.setReturnType(new FullyQualifiedJavaType("com.tzld.piaoquan.tencentad.utils.page.Page"));
+        method.setName("get" + camel);
+        method.addBodyLine("return " + name + ";");
+        commentGenerator.addGeneralMethodComment(method, introspectedTable);
+        topLevelClass.addMethod(method);
+    }
+
+    @Override
+    public boolean validate(List<String> arg0) {
+        return true;
+    }
+
+}

+ 30 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/dao/mapper/AdCreativeMapper.java

@@ -0,0 +1,30 @@
+package com.tzld.piaoquan.tencentad.dao.mapper;
+
+import com.tzld.piaoquan.tencentad.model.po.AdCreative;
+import com.tzld.piaoquan.tencentad.model.po.AdCreativeExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface AdCreativeMapper {
+    long countByExample(AdCreativeExample example);
+
+    int deleteByExample(AdCreativeExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(AdCreative record);
+
+    int insertSelective(AdCreative record);
+
+    List<AdCreative> selectByExample(AdCreativeExample example);
+
+    AdCreative selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") AdCreative record, @Param("example") AdCreativeExample example);
+
+    int updateByExample(@Param("record") AdCreative record, @Param("example") AdCreativeExample example);
+
+    int updateByPrimaryKeySelective(AdCreative record);
+
+    int updateByPrimaryKey(AdCreative record);
+}

+ 30 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/dao/mapper/AdGroupMapper.java

@@ -0,0 +1,30 @@
+package com.tzld.piaoquan.tencentad.dao.mapper;
+
+import com.tzld.piaoquan.tencentad.model.po.AdGroup;
+import com.tzld.piaoquan.tencentad.model.po.AdGroupExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface AdGroupMapper {
+    long countByExample(AdGroupExample example);
+
+    int deleteByExample(AdGroupExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(AdGroup record);
+
+    int insertSelective(AdGroup record);
+
+    List<AdGroup> selectByExample(AdGroupExample example);
+
+    AdGroup selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") AdGroup record, @Param("example") AdGroupExample example);
+
+    int updateByExample(@Param("record") AdGroup record, @Param("example") AdGroupExample example);
+
+    int updateByPrimaryKeySelective(AdGroup record);
+
+    int updateByPrimaryKey(AdGroup record);
+}

+ 30 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/dao/mapper/AdMuseTaskMapper.java

@@ -0,0 +1,30 @@
+package com.tzld.piaoquan.tencentad.dao.mapper;
+
+import com.tzld.piaoquan.tencentad.model.po.AdMuseTask;
+import com.tzld.piaoquan.tencentad.model.po.AdMuseTaskExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface AdMuseTaskMapper {
+    long countByExample(AdMuseTaskExample example);
+
+    int deleteByExample(AdMuseTaskExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(AdMuseTask record);
+
+    int insertSelective(AdMuseTask record);
+
+    List<AdMuseTask> selectByExample(AdMuseTaskExample example);
+
+    AdMuseTask selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") AdMuseTask record, @Param("example") AdMuseTaskExample example);
+
+    int updateByExample(@Param("record") AdMuseTask record, @Param("example") AdMuseTaskExample example);
+
+    int updateByPrimaryKeySelective(AdMuseTask record);
+
+    int updateByPrimaryKey(AdMuseTask record);
+}

+ 30 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/dao/mapper/AdVideoImageMapper.java

@@ -0,0 +1,30 @@
+package com.tzld.piaoquan.tencentad.dao.mapper;
+
+import com.tzld.piaoquan.tencentad.model.po.AdVideoImage;
+import com.tzld.piaoquan.tencentad.model.po.AdVideoImageExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface AdVideoImageMapper {
+    long countByExample(AdVideoImageExample example);
+
+    int deleteByExample(AdVideoImageExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(AdVideoImage record);
+
+    int insertSelective(AdVideoImage record);
+
+    List<AdVideoImage> selectByExample(AdVideoImageExample example);
+
+    AdVideoImage selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") AdVideoImage record, @Param("example") AdVideoImageExample example);
+
+    int updateByExample(@Param("record") AdVideoImage record, @Param("example") AdVideoImageExample example);
+
+    int updateByPrimaryKeySelective(AdVideoImage record);
+
+    int updateByPrimaryKey(AdVideoImage record);
+}

+ 30 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/dao/mapper/AdVideoMapper.java

@@ -0,0 +1,30 @@
+package com.tzld.piaoquan.tencentad.dao.mapper;
+
+import com.tzld.piaoquan.tencentad.model.po.AdVideo;
+import com.tzld.piaoquan.tencentad.model.po.AdVideoExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface AdVideoMapper {
+    long countByExample(AdVideoExample example);
+
+    int deleteByExample(AdVideoExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(AdVideo record);
+
+    int insertSelective(AdVideo record);
+
+    List<AdVideo> selectByExample(AdVideoExample example);
+
+    AdVideo selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") AdVideo record, @Param("example") AdVideoExample example);
+
+    int updateByExample(@Param("record") AdVideo record, @Param("example") AdVideoExample example);
+
+    int updateByPrimaryKeySelective(AdVideo record);
+
+    int updateByPrimaryKey(AdVideo record);
+}

+ 24 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/job/AdVideoJobs.java

@@ -0,0 +1,24 @@
+package com.tzld.piaoquan.tencentad.job;
+
+import com.tzld.piaoquan.tencentad.service.AdVideoService;
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.annotation.XxlJob;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+@Slf4j
+@Component
+public class AdVideoJobs {
+
+    @Autowired
+    private AdVideoService adVideoService;
+
+    @XxlJob("RefreshMuseTaskStatusJob")
+    public ReturnT<String> RefreshMuseTaskStatus(String param) {
+        adVideoService.refreshMuseTaskStatus();
+        return ReturnT.SUCCESS;
+    }
+
+
+}

+ 26 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/bo/ImageParam.java

@@ -0,0 +1,26 @@
+package com.tzld.piaoquan.tencentad.model.bo;
+
+import lombok.Data;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.awt.*;
+
+/**
+ * 存放文本内容的类
+ */
+@Setter
+@Getter
+@Data
+public class ImageParam {
+    //文字内容
+    private String text;
+    //字体颜色和透明度
+    private Color color;
+    //字体和大小
+    private Font font;
+    //所在图片的x坐标
+    private int x;
+    //所在图片的y坐标
+    private int y;
+}

+ 15 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/bo/MuseTask.java

@@ -0,0 +1,15 @@
+package com.tzld.piaoquan.tencentad.model.bo;
+
+import lombok.Data;
+import lombok.ToString;
+
+@Data
+@ToString
+public class MuseTask {
+
+    private Integer taskId;
+
+    private String taskStatus;
+
+    private String taskType;
+}

+ 103 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/po/AdCreative.java

@@ -0,0 +1,103 @@
+package com.tzld.piaoquan.tencentad.model.po;
+
+import java.util.Date;
+
+public class AdCreative {
+    private Long id;
+
+    private Long adId;
+
+    private Long adVideoId;
+
+    private Long dynamicCreativeId;
+
+    private Integer status;
+
+    private Integer isDelete;
+
+    private Date createTime;
+
+    private Date updateTime;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getAdId() {
+        return adId;
+    }
+
+    public void setAdId(Long adId) {
+        this.adId = adId;
+    }
+
+    public Long getAdVideoId() {
+        return adVideoId;
+    }
+
+    public void setAdVideoId(Long adVideoId) {
+        this.adVideoId = adVideoId;
+    }
+
+    public Long getDynamicCreativeId() {
+        return dynamicCreativeId;
+    }
+
+    public void setDynamicCreativeId(Long dynamicCreativeId) {
+        this.dynamicCreativeId = dynamicCreativeId;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public Integer getIsDelete() {
+        return isDelete;
+    }
+
+    public void setIsDelete(Integer isDelete) {
+        this.isDelete = isDelete;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", adId=").append(adId);
+        sb.append(", adVideoId=").append(adVideoId);
+        sb.append(", dynamicCreativeId=").append(dynamicCreativeId);
+        sb.append(", status=").append(status);
+        sb.append(", isDelete=").append(isDelete);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 692 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/po/AdCreativeExample.java

@@ -0,0 +1,692 @@
+package com.tzld.piaoquan.tencentad.model.po;
+
+import com.tzld.piaoquan.tencentad.utils.page.Page;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class AdCreativeExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    protected Page page;
+
+    public AdCreativeExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    public void setPage(Page page) {
+        this.page=page;
+    }
+
+    public Page getPage() {
+        return page;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdIdIsNull() {
+            addCriterion("ad_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdIdIsNotNull() {
+            addCriterion("ad_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdIdEqualTo(Long value) {
+            addCriterion("ad_id =", value, "adId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdIdNotEqualTo(Long value) {
+            addCriterion("ad_id <>", value, "adId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdIdGreaterThan(Long value) {
+            addCriterion("ad_id >", value, "adId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("ad_id >=", value, "adId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdIdLessThan(Long value) {
+            addCriterion("ad_id <", value, "adId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdIdLessThanOrEqualTo(Long value) {
+            addCriterion("ad_id <=", value, "adId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdIdIn(List<Long> values) {
+            addCriterion("ad_id in", values, "adId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdIdNotIn(List<Long> values) {
+            addCriterion("ad_id not in", values, "adId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdIdBetween(Long value1, Long value2) {
+            addCriterion("ad_id between", value1, value2, "adId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdIdNotBetween(Long value1, Long value2) {
+            addCriterion("ad_id not between", value1, value2, "adId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdIsNull() {
+            addCriterion("ad_video_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdIsNotNull() {
+            addCriterion("ad_video_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdEqualTo(Long value) {
+            addCriterion("ad_video_id =", value, "adVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdNotEqualTo(Long value) {
+            addCriterion("ad_video_id <>", value, "adVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdGreaterThan(Long value) {
+            addCriterion("ad_video_id >", value, "adVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("ad_video_id >=", value, "adVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdLessThan(Long value) {
+            addCriterion("ad_video_id <", value, "adVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdLessThanOrEqualTo(Long value) {
+            addCriterion("ad_video_id <=", value, "adVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdIn(List<Long> values) {
+            addCriterion("ad_video_id in", values, "adVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdNotIn(List<Long> values) {
+            addCriterion("ad_video_id not in", values, "adVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdBetween(Long value1, Long value2) {
+            addCriterion("ad_video_id between", value1, value2, "adVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdNotBetween(Long value1, Long value2) {
+            addCriterion("ad_video_id not between", value1, value2, "adVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andDynamicCreativeIdIsNull() {
+            addCriterion("dynamic_creative_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDynamicCreativeIdIsNotNull() {
+            addCriterion("dynamic_creative_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDynamicCreativeIdEqualTo(Long value) {
+            addCriterion("dynamic_creative_id =", value, "dynamicCreativeId");
+            return (Criteria) this;
+        }
+
+        public Criteria andDynamicCreativeIdNotEqualTo(Long value) {
+            addCriterion("dynamic_creative_id <>", value, "dynamicCreativeId");
+            return (Criteria) this;
+        }
+
+        public Criteria andDynamicCreativeIdGreaterThan(Long value) {
+            addCriterion("dynamic_creative_id >", value, "dynamicCreativeId");
+            return (Criteria) this;
+        }
+
+        public Criteria andDynamicCreativeIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("dynamic_creative_id >=", value, "dynamicCreativeId");
+            return (Criteria) this;
+        }
+
+        public Criteria andDynamicCreativeIdLessThan(Long value) {
+            addCriterion("dynamic_creative_id <", value, "dynamicCreativeId");
+            return (Criteria) this;
+        }
+
+        public Criteria andDynamicCreativeIdLessThanOrEqualTo(Long value) {
+            addCriterion("dynamic_creative_id <=", value, "dynamicCreativeId");
+            return (Criteria) this;
+        }
+
+        public Criteria andDynamicCreativeIdIn(List<Long> values) {
+            addCriterion("dynamic_creative_id in", values, "dynamicCreativeId");
+            return (Criteria) this;
+        }
+
+        public Criteria andDynamicCreativeIdNotIn(List<Long> values) {
+            addCriterion("dynamic_creative_id not in", values, "dynamicCreativeId");
+            return (Criteria) this;
+        }
+
+        public Criteria andDynamicCreativeIdBetween(Long value1, Long value2) {
+            addCriterion("dynamic_creative_id between", value1, value2, "dynamicCreativeId");
+            return (Criteria) this;
+        }
+
+        public Criteria andDynamicCreativeIdNotBetween(Long value1, Long value2) {
+            addCriterion("dynamic_creative_id not between", value1, value2, "dynamicCreativeId");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNull() {
+            addCriterion("`status` is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNotNull() {
+            addCriterion("`status` is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusEqualTo(Integer value) {
+            addCriterion("`status` =", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotEqualTo(Integer value) {
+            addCriterion("`status` <>", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThan(Integer value) {
+            addCriterion("`status` >", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
+            addCriterion("`status` >=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThan(Integer value) {
+            addCriterion("`status` <", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThanOrEqualTo(Integer value) {
+            addCriterion("`status` <=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIn(List<Integer> values) {
+            addCriterion("`status` in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotIn(List<Integer> values) {
+            addCriterion("`status` not in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusBetween(Integer value1, Integer value2) {
+            addCriterion("`status` between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
+            addCriterion("`status` not between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteIsNull() {
+            addCriterion("is_delete is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteIsNotNull() {
+            addCriterion("is_delete is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteEqualTo(Integer value) {
+            addCriterion("is_delete =", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteNotEqualTo(Integer value) {
+            addCriterion("is_delete <>", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteGreaterThan(Integer value) {
+            addCriterion("is_delete >", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteGreaterThanOrEqualTo(Integer value) {
+            addCriterion("is_delete >=", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteLessThan(Integer value) {
+            addCriterion("is_delete <", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteLessThanOrEqualTo(Integer value) {
+            addCriterion("is_delete <=", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteIn(List<Integer> values) {
+            addCriterion("is_delete in", values, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteNotIn(List<Integer> values) {
+            addCriterion("is_delete not in", values, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteBetween(Integer value1, Integer value2) {
+            addCriterion("is_delete between", value1, value2, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteNotBetween(Integer value1, Integer value2) {
+            addCriterion("is_delete not between", value1, value2, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNull() {
+            addCriterion("create_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNotNull() {
+            addCriterion("create_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeEqualTo(Date value) {
+            addCriterion("create_time =", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotEqualTo(Date value) {
+            addCriterion("create_time <>", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThan(Date value) {
+            addCriterion("create_time >", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("create_time >=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThan(Date value) {
+            addCriterion("create_time <", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("create_time <=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIn(List<Date> values) {
+            addCriterion("create_time in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotIn(List<Date> values) {
+            addCriterion("create_time not in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeBetween(Date value1, Date value2) {
+            addCriterion("create_time between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("create_time not between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNull() {
+            addCriterion("update_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNotNull() {
+            addCriterion("update_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeEqualTo(Date value) {
+            addCriterion("update_time =", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotEqualTo(Date value) {
+            addCriterion("update_time <>", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThan(Date value) {
+            addCriterion("update_time >", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("update_time >=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThan(Date value) {
+            addCriterion("update_time <", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("update_time <=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIn(List<Date> values) {
+            addCriterion("update_time in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotIn(List<Date> values) {
+            addCriterion("update_time not in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeBetween(Date value1, Date value2) {
+            addCriterion("update_time between", value1, value2, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("update_time not between", value1, value2, "updateTime");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 92 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/po/AdGroup.java

@@ -0,0 +1,92 @@
+package com.tzld.piaoquan.tencentad.model.po;
+
+import java.util.Date;
+
+public class AdGroup {
+    private Long id;
+
+    private String accountId;
+
+    private Long adgroupId;
+
+    private String adgroupName;
+
+    private Integer isDelete;
+
+    private Date createTime;
+
+    private Date updateTime;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getAccountId() {
+        return accountId;
+    }
+
+    public void setAccountId(String accountId) {
+        this.accountId = accountId;
+    }
+
+    public Long getAdgroupId() {
+        return adgroupId;
+    }
+
+    public void setAdgroupId(Long adgroupId) {
+        this.adgroupId = adgroupId;
+    }
+
+    public String getAdgroupName() {
+        return adgroupName;
+    }
+
+    public void setAdgroupName(String adgroupName) {
+        this.adgroupName = adgroupName;
+    }
+
+    public Integer getIsDelete() {
+        return isDelete;
+    }
+
+    public void setIsDelete(Integer isDelete) {
+        this.isDelete = isDelete;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", accountId=").append(accountId);
+        sb.append(", adgroupId=").append(adgroupId);
+        sb.append(", adgroupName=").append(adgroupName);
+        sb.append(", isDelete=").append(isDelete);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 652 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/po/AdGroupExample.java

@@ -0,0 +1,652 @@
+package com.tzld.piaoquan.tencentad.model.po;
+
+import com.tzld.piaoquan.tencentad.utils.page.Page;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class AdGroupExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    protected Page page;
+
+    public AdGroupExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    public void setPage(Page page) {
+        this.page=page;
+    }
+
+    public Page getPage() {
+        return page;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdIsNull() {
+            addCriterion("account_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdIsNotNull() {
+            addCriterion("account_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdEqualTo(String value) {
+            addCriterion("account_id =", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdNotEqualTo(String value) {
+            addCriterion("account_id <>", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdGreaterThan(String value) {
+            addCriterion("account_id >", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdGreaterThanOrEqualTo(String value) {
+            addCriterion("account_id >=", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdLessThan(String value) {
+            addCriterion("account_id <", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdLessThanOrEqualTo(String value) {
+            addCriterion("account_id <=", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdLike(String value) {
+            addCriterion("account_id like", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdNotLike(String value) {
+            addCriterion("account_id not like", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdIn(List<String> values) {
+            addCriterion("account_id in", values, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdNotIn(List<String> values) {
+            addCriterion("account_id not in", values, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdBetween(String value1, String value2) {
+            addCriterion("account_id between", value1, value2, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdNotBetween(String value1, String value2) {
+            addCriterion("account_id not between", value1, value2, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdgroupIdIsNull() {
+            addCriterion("adgroup_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdgroupIdIsNotNull() {
+            addCriterion("adgroup_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdgroupIdEqualTo(Long value) {
+            addCriterion("adgroup_id =", value, "adgroupId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdgroupIdNotEqualTo(Long value) {
+            addCriterion("adgroup_id <>", value, "adgroupId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdgroupIdGreaterThan(Long value) {
+            addCriterion("adgroup_id >", value, "adgroupId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdgroupIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("adgroup_id >=", value, "adgroupId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdgroupIdLessThan(Long value) {
+            addCriterion("adgroup_id <", value, "adgroupId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdgroupIdLessThanOrEqualTo(Long value) {
+            addCriterion("adgroup_id <=", value, "adgroupId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdgroupIdIn(List<Long> values) {
+            addCriterion("adgroup_id in", values, "adgroupId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdgroupIdNotIn(List<Long> values) {
+            addCriterion("adgroup_id not in", values, "adgroupId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdgroupIdBetween(Long value1, Long value2) {
+            addCriterion("adgroup_id between", value1, value2, "adgroupId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdgroupIdNotBetween(Long value1, Long value2) {
+            addCriterion("adgroup_id not between", value1, value2, "adgroupId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdgroupNameIsNull() {
+            addCriterion("adgroup_name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdgroupNameIsNotNull() {
+            addCriterion("adgroup_name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdgroupNameEqualTo(String value) {
+            addCriterion("adgroup_name =", value, "adgroupName");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdgroupNameNotEqualTo(String value) {
+            addCriterion("adgroup_name <>", value, "adgroupName");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdgroupNameGreaterThan(String value) {
+            addCriterion("adgroup_name >", value, "adgroupName");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdgroupNameGreaterThanOrEqualTo(String value) {
+            addCriterion("adgroup_name >=", value, "adgroupName");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdgroupNameLessThan(String value) {
+            addCriterion("adgroup_name <", value, "adgroupName");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdgroupNameLessThanOrEqualTo(String value) {
+            addCriterion("adgroup_name <=", value, "adgroupName");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdgroupNameLike(String value) {
+            addCriterion("adgroup_name like", value, "adgroupName");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdgroupNameNotLike(String value) {
+            addCriterion("adgroup_name not like", value, "adgroupName");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdgroupNameIn(List<String> values) {
+            addCriterion("adgroup_name in", values, "adgroupName");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdgroupNameNotIn(List<String> values) {
+            addCriterion("adgroup_name not in", values, "adgroupName");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdgroupNameBetween(String value1, String value2) {
+            addCriterion("adgroup_name between", value1, value2, "adgroupName");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdgroupNameNotBetween(String value1, String value2) {
+            addCriterion("adgroup_name not between", value1, value2, "adgroupName");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteIsNull() {
+            addCriterion("is_delete is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteIsNotNull() {
+            addCriterion("is_delete is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteEqualTo(Integer value) {
+            addCriterion("is_delete =", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteNotEqualTo(Integer value) {
+            addCriterion("is_delete <>", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteGreaterThan(Integer value) {
+            addCriterion("is_delete >", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteGreaterThanOrEqualTo(Integer value) {
+            addCriterion("is_delete >=", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteLessThan(Integer value) {
+            addCriterion("is_delete <", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteLessThanOrEqualTo(Integer value) {
+            addCriterion("is_delete <=", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteIn(List<Integer> values) {
+            addCriterion("is_delete in", values, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteNotIn(List<Integer> values) {
+            addCriterion("is_delete not in", values, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteBetween(Integer value1, Integer value2) {
+            addCriterion("is_delete between", value1, value2, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteNotBetween(Integer value1, Integer value2) {
+            addCriterion("is_delete not between", value1, value2, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNull() {
+            addCriterion("create_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNotNull() {
+            addCriterion("create_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeEqualTo(Date value) {
+            addCriterion("create_time =", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotEqualTo(Date value) {
+            addCriterion("create_time <>", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThan(Date value) {
+            addCriterion("create_time >", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("create_time >=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThan(Date value) {
+            addCriterion("create_time <", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("create_time <=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIn(List<Date> values) {
+            addCriterion("create_time in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotIn(List<Date> values) {
+            addCriterion("create_time not in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeBetween(Date value1, Date value2) {
+            addCriterion("create_time between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("create_time not between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNull() {
+            addCriterion("update_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNotNull() {
+            addCriterion("update_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeEqualTo(Date value) {
+            addCriterion("update_time =", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotEqualTo(Date value) {
+            addCriterion("update_time <>", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThan(Date value) {
+            addCriterion("update_time >", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("update_time >=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThan(Date value) {
+            addCriterion("update_time <", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("update_time <=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIn(List<Date> values) {
+            addCriterion("update_time in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotIn(List<Date> values) {
+            addCriterion("update_time not in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeBetween(Date value1, Date value2) {
+            addCriterion("update_time between", value1, value2, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("update_time not between", value1, value2, "updateTime");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 180 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/po/AdMuseTask.java

@@ -0,0 +1,180 @@
+package com.tzld.piaoquan.tencentad.model.po;
+
+import java.util.Date;
+
+public class AdMuseTask {
+    private Long id;
+
+    private Long adVideoId;
+
+    private Long adVideoImageId;
+
+    private Integer status;
+
+    private Long taskId;
+
+    private String taskType;
+
+    private String taskStatus;
+
+    private Long museMaterialId;
+
+    private String museUrl;
+
+    private String stitchUrl;
+
+    private String finalUrl;
+
+    private Long mediaId;
+
+    private Integer isDelete;
+
+    private Date createTime;
+
+    private Date updateTime;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getAdVideoId() {
+        return adVideoId;
+    }
+
+    public void setAdVideoId(Long adVideoId) {
+        this.adVideoId = adVideoId;
+    }
+
+    public Long getAdVideoImageId() {
+        return adVideoImageId;
+    }
+
+    public void setAdVideoImageId(Long adVideoImageId) {
+        this.adVideoImageId = adVideoImageId;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public Long getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(Long taskId) {
+        this.taskId = taskId;
+    }
+
+    public String getTaskType() {
+        return taskType;
+    }
+
+    public void setTaskType(String taskType) {
+        this.taskType = taskType;
+    }
+
+    public String getTaskStatus() {
+        return taskStatus;
+    }
+
+    public void setTaskStatus(String taskStatus) {
+        this.taskStatus = taskStatus;
+    }
+
+    public Long getMuseMaterialId() {
+        return museMaterialId;
+    }
+
+    public void setMuseMaterialId(Long museMaterialId) {
+        this.museMaterialId = museMaterialId;
+    }
+
+    public String getMuseUrl() {
+        return museUrl;
+    }
+
+    public void setMuseUrl(String museUrl) {
+        this.museUrl = museUrl;
+    }
+
+    public String getStitchUrl() {
+        return stitchUrl;
+    }
+
+    public void setStitchUrl(String stitchUrl) {
+        this.stitchUrl = stitchUrl;
+    }
+
+    public String getFinalUrl() {
+        return finalUrl;
+    }
+
+    public void setFinalUrl(String finalUrl) {
+        this.finalUrl = finalUrl;
+    }
+
+    public Long getMediaId() {
+        return mediaId;
+    }
+
+    public void setMediaId(Long mediaId) {
+        this.mediaId = mediaId;
+    }
+
+    public Integer getIsDelete() {
+        return isDelete;
+    }
+
+    public void setIsDelete(Integer isDelete) {
+        this.isDelete = isDelete;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", adVideoId=").append(adVideoId);
+        sb.append(", adVideoImageId=").append(adVideoImageId);
+        sb.append(", status=").append(status);
+        sb.append(", taskId=").append(taskId);
+        sb.append(", taskType=").append(taskType);
+        sb.append(", taskStatus=").append(taskStatus);
+        sb.append(", museMaterialId=").append(museMaterialId);
+        sb.append(", museUrl=").append(museUrl);
+        sb.append(", stitchUrl=").append(stitchUrl);
+        sb.append(", finalUrl=").append(finalUrl);
+        sb.append(", mediaId=").append(mediaId);
+        sb.append(", isDelete=").append(isDelete);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 1162 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/po/AdMuseTaskExample.java

@@ -0,0 +1,1162 @@
+package com.tzld.piaoquan.tencentad.model.po;
+
+import com.tzld.piaoquan.tencentad.utils.page.Page;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class AdMuseTaskExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    protected Page page;
+
+    public AdMuseTaskExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    public void setPage(Page page) {
+        this.page=page;
+    }
+
+    public Page getPage() {
+        return page;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdIsNull() {
+            addCriterion("ad_video_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdIsNotNull() {
+            addCriterion("ad_video_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdEqualTo(Long value) {
+            addCriterion("ad_video_id =", value, "adVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdNotEqualTo(Long value) {
+            addCriterion("ad_video_id <>", value, "adVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdGreaterThan(Long value) {
+            addCriterion("ad_video_id >", value, "adVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("ad_video_id >=", value, "adVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdLessThan(Long value) {
+            addCriterion("ad_video_id <", value, "adVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdLessThanOrEqualTo(Long value) {
+            addCriterion("ad_video_id <=", value, "adVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdIn(List<Long> values) {
+            addCriterion("ad_video_id in", values, "adVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdNotIn(List<Long> values) {
+            addCriterion("ad_video_id not in", values, "adVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdBetween(Long value1, Long value2) {
+            addCriterion("ad_video_id between", value1, value2, "adVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdNotBetween(Long value1, Long value2) {
+            addCriterion("ad_video_id not between", value1, value2, "adVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoImageIdIsNull() {
+            addCriterion("ad_video_image_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoImageIdIsNotNull() {
+            addCriterion("ad_video_image_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoImageIdEqualTo(Long value) {
+            addCriterion("ad_video_image_id =", value, "adVideoImageId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoImageIdNotEqualTo(Long value) {
+            addCriterion("ad_video_image_id <>", value, "adVideoImageId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoImageIdGreaterThan(Long value) {
+            addCriterion("ad_video_image_id >", value, "adVideoImageId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoImageIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("ad_video_image_id >=", value, "adVideoImageId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoImageIdLessThan(Long value) {
+            addCriterion("ad_video_image_id <", value, "adVideoImageId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoImageIdLessThanOrEqualTo(Long value) {
+            addCriterion("ad_video_image_id <=", value, "adVideoImageId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoImageIdIn(List<Long> values) {
+            addCriterion("ad_video_image_id in", values, "adVideoImageId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoImageIdNotIn(List<Long> values) {
+            addCriterion("ad_video_image_id not in", values, "adVideoImageId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoImageIdBetween(Long value1, Long value2) {
+            addCriterion("ad_video_image_id between", value1, value2, "adVideoImageId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoImageIdNotBetween(Long value1, Long value2) {
+            addCriterion("ad_video_image_id not between", value1, value2, "adVideoImageId");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNull() {
+            addCriterion("`status` is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNotNull() {
+            addCriterion("`status` is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusEqualTo(Integer value) {
+            addCriterion("`status` =", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotEqualTo(Integer value) {
+            addCriterion("`status` <>", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThan(Integer value) {
+            addCriterion("`status` >", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
+            addCriterion("`status` >=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThan(Integer value) {
+            addCriterion("`status` <", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThanOrEqualTo(Integer value) {
+            addCriterion("`status` <=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIn(List<Integer> values) {
+            addCriterion("`status` in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotIn(List<Integer> values) {
+            addCriterion("`status` not in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusBetween(Integer value1, Integer value2) {
+            addCriterion("`status` between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
+            addCriterion("`status` not between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdIsNull() {
+            addCriterion("task_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdIsNotNull() {
+            addCriterion("task_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdEqualTo(Long value) {
+            addCriterion("task_id =", value, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdNotEqualTo(Long value) {
+            addCriterion("task_id <>", value, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdGreaterThan(Long value) {
+            addCriterion("task_id >", value, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("task_id >=", value, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdLessThan(Long value) {
+            addCriterion("task_id <", value, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdLessThanOrEqualTo(Long value) {
+            addCriterion("task_id <=", value, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdIn(List<Long> values) {
+            addCriterion("task_id in", values, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdNotIn(List<Long> values) {
+            addCriterion("task_id not in", values, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdBetween(Long value1, Long value2) {
+            addCriterion("task_id between", value1, value2, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdNotBetween(Long value1, Long value2) {
+            addCriterion("task_id not between", value1, value2, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskTypeIsNull() {
+            addCriterion("task_type is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskTypeIsNotNull() {
+            addCriterion("task_type is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskTypeEqualTo(String value) {
+            addCriterion("task_type =", value, "taskType");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskTypeNotEqualTo(String value) {
+            addCriterion("task_type <>", value, "taskType");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskTypeGreaterThan(String value) {
+            addCriterion("task_type >", value, "taskType");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskTypeGreaterThanOrEqualTo(String value) {
+            addCriterion("task_type >=", value, "taskType");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskTypeLessThan(String value) {
+            addCriterion("task_type <", value, "taskType");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskTypeLessThanOrEqualTo(String value) {
+            addCriterion("task_type <=", value, "taskType");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskTypeLike(String value) {
+            addCriterion("task_type like", value, "taskType");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskTypeNotLike(String value) {
+            addCriterion("task_type not like", value, "taskType");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskTypeIn(List<String> values) {
+            addCriterion("task_type in", values, "taskType");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskTypeNotIn(List<String> values) {
+            addCriterion("task_type not in", values, "taskType");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskTypeBetween(String value1, String value2) {
+            addCriterion("task_type between", value1, value2, "taskType");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskTypeNotBetween(String value1, String value2) {
+            addCriterion("task_type not between", value1, value2, "taskType");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskStatusIsNull() {
+            addCriterion("task_status is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskStatusIsNotNull() {
+            addCriterion("task_status is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskStatusEqualTo(String value) {
+            addCriterion("task_status =", value, "taskStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskStatusNotEqualTo(String value) {
+            addCriterion("task_status <>", value, "taskStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskStatusGreaterThan(String value) {
+            addCriterion("task_status >", value, "taskStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskStatusGreaterThanOrEqualTo(String value) {
+            addCriterion("task_status >=", value, "taskStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskStatusLessThan(String value) {
+            addCriterion("task_status <", value, "taskStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskStatusLessThanOrEqualTo(String value) {
+            addCriterion("task_status <=", value, "taskStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskStatusLike(String value) {
+            addCriterion("task_status like", value, "taskStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskStatusNotLike(String value) {
+            addCriterion("task_status not like", value, "taskStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskStatusIn(List<String> values) {
+            addCriterion("task_status in", values, "taskStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskStatusNotIn(List<String> values) {
+            addCriterion("task_status not in", values, "taskStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskStatusBetween(String value1, String value2) {
+            addCriterion("task_status between", value1, value2, "taskStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskStatusNotBetween(String value1, String value2) {
+            addCriterion("task_status not between", value1, value2, "taskStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseMaterialIdIsNull() {
+            addCriterion("muse_material_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseMaterialIdIsNotNull() {
+            addCriterion("muse_material_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseMaterialIdEqualTo(Long value) {
+            addCriterion("muse_material_id =", value, "museMaterialId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseMaterialIdNotEqualTo(Long value) {
+            addCriterion("muse_material_id <>", value, "museMaterialId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseMaterialIdGreaterThan(Long value) {
+            addCriterion("muse_material_id >", value, "museMaterialId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseMaterialIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("muse_material_id >=", value, "museMaterialId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseMaterialIdLessThan(Long value) {
+            addCriterion("muse_material_id <", value, "museMaterialId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseMaterialIdLessThanOrEqualTo(Long value) {
+            addCriterion("muse_material_id <=", value, "museMaterialId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseMaterialIdIn(List<Long> values) {
+            addCriterion("muse_material_id in", values, "museMaterialId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseMaterialIdNotIn(List<Long> values) {
+            addCriterion("muse_material_id not in", values, "museMaterialId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseMaterialIdBetween(Long value1, Long value2) {
+            addCriterion("muse_material_id between", value1, value2, "museMaterialId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseMaterialIdNotBetween(Long value1, Long value2) {
+            addCriterion("muse_material_id not between", value1, value2, "museMaterialId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseUrlIsNull() {
+            addCriterion("muse_url is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseUrlIsNotNull() {
+            addCriterion("muse_url is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseUrlEqualTo(String value) {
+            addCriterion("muse_url =", value, "museUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseUrlNotEqualTo(String value) {
+            addCriterion("muse_url <>", value, "museUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseUrlGreaterThan(String value) {
+            addCriterion("muse_url >", value, "museUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseUrlGreaterThanOrEqualTo(String value) {
+            addCriterion("muse_url >=", value, "museUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseUrlLessThan(String value) {
+            addCriterion("muse_url <", value, "museUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseUrlLessThanOrEqualTo(String value) {
+            addCriterion("muse_url <=", value, "museUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseUrlLike(String value) {
+            addCriterion("muse_url like", value, "museUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseUrlNotLike(String value) {
+            addCriterion("muse_url not like", value, "museUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseUrlIn(List<String> values) {
+            addCriterion("muse_url in", values, "museUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseUrlNotIn(List<String> values) {
+            addCriterion("muse_url not in", values, "museUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseUrlBetween(String value1, String value2) {
+            addCriterion("muse_url between", value1, value2, "museUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andMuseUrlNotBetween(String value1, String value2) {
+            addCriterion("muse_url not between", value1, value2, "museUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andStitchUrlIsNull() {
+            addCriterion("stitch_url is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStitchUrlIsNotNull() {
+            addCriterion("stitch_url is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStitchUrlEqualTo(String value) {
+            addCriterion("stitch_url =", value, "stitchUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andStitchUrlNotEqualTo(String value) {
+            addCriterion("stitch_url <>", value, "stitchUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andStitchUrlGreaterThan(String value) {
+            addCriterion("stitch_url >", value, "stitchUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andStitchUrlGreaterThanOrEqualTo(String value) {
+            addCriterion("stitch_url >=", value, "stitchUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andStitchUrlLessThan(String value) {
+            addCriterion("stitch_url <", value, "stitchUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andStitchUrlLessThanOrEqualTo(String value) {
+            addCriterion("stitch_url <=", value, "stitchUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andStitchUrlLike(String value) {
+            addCriterion("stitch_url like", value, "stitchUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andStitchUrlNotLike(String value) {
+            addCriterion("stitch_url not like", value, "stitchUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andStitchUrlIn(List<String> values) {
+            addCriterion("stitch_url in", values, "stitchUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andStitchUrlNotIn(List<String> values) {
+            addCriterion("stitch_url not in", values, "stitchUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andStitchUrlBetween(String value1, String value2) {
+            addCriterion("stitch_url between", value1, value2, "stitchUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andStitchUrlNotBetween(String value1, String value2) {
+            addCriterion("stitch_url not between", value1, value2, "stitchUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andFinalUrlIsNull() {
+            addCriterion("final_url is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFinalUrlIsNotNull() {
+            addCriterion("final_url is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFinalUrlEqualTo(String value) {
+            addCriterion("final_url =", value, "finalUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andFinalUrlNotEqualTo(String value) {
+            addCriterion("final_url <>", value, "finalUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andFinalUrlGreaterThan(String value) {
+            addCriterion("final_url >", value, "finalUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andFinalUrlGreaterThanOrEqualTo(String value) {
+            addCriterion("final_url >=", value, "finalUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andFinalUrlLessThan(String value) {
+            addCriterion("final_url <", value, "finalUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andFinalUrlLessThanOrEqualTo(String value) {
+            addCriterion("final_url <=", value, "finalUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andFinalUrlLike(String value) {
+            addCriterion("final_url like", value, "finalUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andFinalUrlNotLike(String value) {
+            addCriterion("final_url not like", value, "finalUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andFinalUrlIn(List<String> values) {
+            addCriterion("final_url in", values, "finalUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andFinalUrlNotIn(List<String> values) {
+            addCriterion("final_url not in", values, "finalUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andFinalUrlBetween(String value1, String value2) {
+            addCriterion("final_url between", value1, value2, "finalUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andFinalUrlNotBetween(String value1, String value2) {
+            addCriterion("final_url not between", value1, value2, "finalUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andMediaIdIsNull() {
+            addCriterion("media_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMediaIdIsNotNull() {
+            addCriterion("media_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMediaIdEqualTo(Long value) {
+            addCriterion("media_id =", value, "mediaId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMediaIdNotEqualTo(Long value) {
+            addCriterion("media_id <>", value, "mediaId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMediaIdGreaterThan(Long value) {
+            addCriterion("media_id >", value, "mediaId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMediaIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("media_id >=", value, "mediaId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMediaIdLessThan(Long value) {
+            addCriterion("media_id <", value, "mediaId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMediaIdLessThanOrEqualTo(Long value) {
+            addCriterion("media_id <=", value, "mediaId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMediaIdIn(List<Long> values) {
+            addCriterion("media_id in", values, "mediaId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMediaIdNotIn(List<Long> values) {
+            addCriterion("media_id not in", values, "mediaId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMediaIdBetween(Long value1, Long value2) {
+            addCriterion("media_id between", value1, value2, "mediaId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMediaIdNotBetween(Long value1, Long value2) {
+            addCriterion("media_id not between", value1, value2, "mediaId");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteIsNull() {
+            addCriterion("is_delete is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteIsNotNull() {
+            addCriterion("is_delete is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteEqualTo(Integer value) {
+            addCriterion("is_delete =", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteNotEqualTo(Integer value) {
+            addCriterion("is_delete <>", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteGreaterThan(Integer value) {
+            addCriterion("is_delete >", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteGreaterThanOrEqualTo(Integer value) {
+            addCriterion("is_delete >=", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteLessThan(Integer value) {
+            addCriterion("is_delete <", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteLessThanOrEqualTo(Integer value) {
+            addCriterion("is_delete <=", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteIn(List<Integer> values) {
+            addCriterion("is_delete in", values, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteNotIn(List<Integer> values) {
+            addCriterion("is_delete not in", values, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteBetween(Integer value1, Integer value2) {
+            addCriterion("is_delete between", value1, value2, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteNotBetween(Integer value1, Integer value2) {
+            addCriterion("is_delete not between", value1, value2, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNull() {
+            addCriterion("create_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNotNull() {
+            addCriterion("create_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeEqualTo(Date value) {
+            addCriterion("create_time =", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotEqualTo(Date value) {
+            addCriterion("create_time <>", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThan(Date value) {
+            addCriterion("create_time >", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("create_time >=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThan(Date value) {
+            addCriterion("create_time <", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("create_time <=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIn(List<Date> values) {
+            addCriterion("create_time in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotIn(List<Date> values) {
+            addCriterion("create_time not in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeBetween(Date value1, Date value2) {
+            addCriterion("create_time between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("create_time not between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNull() {
+            addCriterion("update_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNotNull() {
+            addCriterion("update_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeEqualTo(Date value) {
+            addCriterion("update_time =", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotEqualTo(Date value) {
+            addCriterion("update_time <>", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThan(Date value) {
+            addCriterion("update_time >", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("update_time >=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThan(Date value) {
+            addCriterion("update_time <", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("update_time <=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIn(List<Date> values) {
+            addCriterion("update_time in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotIn(List<Date> values) {
+            addCriterion("update_time not in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeBetween(Date value1, Date value2) {
+            addCriterion("update_time between", value1, value2, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("update_time not between", value1, value2, "updateTime");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 158 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/po/AdVideo.java

@@ -0,0 +1,158 @@
+package com.tzld.piaoquan.tencentad.model.po;
+
+import java.util.Date;
+
+public class AdVideo {
+    private Long id;
+
+    private Long adGroupId;
+
+    private Long videoId;
+
+    private String videoPath;
+
+    private String videoCover;
+
+    private String category;
+
+    private String copywriter;
+
+    private String caption;
+
+    private Integer status;
+
+    private Integer retryCount;
+
+    private Integer isDelete;
+
+    private Date createTime;
+
+    private Date updateTime;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getAdGroupId() {
+        return adGroupId;
+    }
+
+    public void setAdGroupId(Long adGroupId) {
+        this.adGroupId = adGroupId;
+    }
+
+    public Long getVideoId() {
+        return videoId;
+    }
+
+    public void setVideoId(Long videoId) {
+        this.videoId = videoId;
+    }
+
+    public String getVideoPath() {
+        return videoPath;
+    }
+
+    public void setVideoPath(String videoPath) {
+        this.videoPath = videoPath;
+    }
+
+    public String getVideoCover() {
+        return videoCover;
+    }
+
+    public void setVideoCover(String videoCover) {
+        this.videoCover = videoCover;
+    }
+
+    public String getCategory() {
+        return category;
+    }
+
+    public void setCategory(String category) {
+        this.category = category;
+    }
+
+    public String getCopywriter() {
+        return copywriter;
+    }
+
+    public void setCopywriter(String copywriter) {
+        this.copywriter = copywriter;
+    }
+
+    public String getCaption() {
+        return caption;
+    }
+
+    public void setCaption(String caption) {
+        this.caption = caption;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public Integer getRetryCount() {
+        return retryCount;
+    }
+
+    public void setRetryCount(Integer retryCount) {
+        this.retryCount = retryCount;
+    }
+
+    public Integer getIsDelete() {
+        return isDelete;
+    }
+
+    public void setIsDelete(Integer isDelete) {
+        this.isDelete = isDelete;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", adGroupId=").append(adGroupId);
+        sb.append(", videoId=").append(videoId);
+        sb.append(", videoPath=").append(videoPath);
+        sb.append(", videoCover=").append(videoCover);
+        sb.append(", category=").append(category);
+        sb.append(", copywriter=").append(copywriter);
+        sb.append(", caption=").append(caption);
+        sb.append(", status=").append(status);
+        sb.append(", retryCount=").append(retryCount);
+        sb.append(", isDelete=").append(isDelete);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 1042 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/po/AdVideoExample.java

@@ -0,0 +1,1042 @@
+package com.tzld.piaoquan.tencentad.model.po;
+
+import com.tzld.piaoquan.tencentad.utils.page.Page;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class AdVideoExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    protected Page page;
+
+    public AdVideoExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    public void setPage(Page page) {
+        this.page=page;
+    }
+
+    public Page getPage() {
+        return page;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdGroupIdIsNull() {
+            addCriterion("ad_group_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdGroupIdIsNotNull() {
+            addCriterion("ad_group_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdGroupIdEqualTo(Long value) {
+            addCriterion("ad_group_id =", value, "adGroupId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdGroupIdNotEqualTo(Long value) {
+            addCriterion("ad_group_id <>", value, "adGroupId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdGroupIdGreaterThan(Long value) {
+            addCriterion("ad_group_id >", value, "adGroupId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdGroupIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("ad_group_id >=", value, "adGroupId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdGroupIdLessThan(Long value) {
+            addCriterion("ad_group_id <", value, "adGroupId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdGroupIdLessThanOrEqualTo(Long value) {
+            addCriterion("ad_group_id <=", value, "adGroupId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdGroupIdIn(List<Long> values) {
+            addCriterion("ad_group_id in", values, "adGroupId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdGroupIdNotIn(List<Long> values) {
+            addCriterion("ad_group_id not in", values, "adGroupId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdGroupIdBetween(Long value1, Long value2) {
+            addCriterion("ad_group_id between", value1, value2, "adGroupId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdGroupIdNotBetween(Long value1, Long value2) {
+            addCriterion("ad_group_id not between", value1, value2, "adGroupId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdIsNull() {
+            addCriterion("video_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdIsNotNull() {
+            addCriterion("video_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdEqualTo(Long value) {
+            addCriterion("video_id =", value, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdNotEqualTo(Long value) {
+            addCriterion("video_id <>", value, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdGreaterThan(Long value) {
+            addCriterion("video_id >", value, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("video_id >=", value, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdLessThan(Long value) {
+            addCriterion("video_id <", value, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdLessThanOrEqualTo(Long value) {
+            addCriterion("video_id <=", value, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdIn(List<Long> values) {
+            addCriterion("video_id in", values, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdNotIn(List<Long> values) {
+            addCriterion("video_id not in", values, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdBetween(Long value1, Long value2) {
+            addCriterion("video_id between", value1, value2, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdNotBetween(Long value1, Long value2) {
+            addCriterion("video_id not between", value1, value2, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPathIsNull() {
+            addCriterion("video_path is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPathIsNotNull() {
+            addCriterion("video_path is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPathEqualTo(String value) {
+            addCriterion("video_path =", value, "videoPath");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPathNotEqualTo(String value) {
+            addCriterion("video_path <>", value, "videoPath");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPathGreaterThan(String value) {
+            addCriterion("video_path >", value, "videoPath");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPathGreaterThanOrEqualTo(String value) {
+            addCriterion("video_path >=", value, "videoPath");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPathLessThan(String value) {
+            addCriterion("video_path <", value, "videoPath");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPathLessThanOrEqualTo(String value) {
+            addCriterion("video_path <=", value, "videoPath");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPathLike(String value) {
+            addCriterion("video_path like", value, "videoPath");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPathNotLike(String value) {
+            addCriterion("video_path not like", value, "videoPath");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPathIn(List<String> values) {
+            addCriterion("video_path in", values, "videoPath");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPathNotIn(List<String> values) {
+            addCriterion("video_path not in", values, "videoPath");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPathBetween(String value1, String value2) {
+            addCriterion("video_path between", value1, value2, "videoPath");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPathNotBetween(String value1, String value2) {
+            addCriterion("video_path not between", value1, value2, "videoPath");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoCoverIsNull() {
+            addCriterion("video_cover is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoCoverIsNotNull() {
+            addCriterion("video_cover is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoCoverEqualTo(String value) {
+            addCriterion("video_cover =", value, "videoCover");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoCoverNotEqualTo(String value) {
+            addCriterion("video_cover <>", value, "videoCover");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoCoverGreaterThan(String value) {
+            addCriterion("video_cover >", value, "videoCover");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoCoverGreaterThanOrEqualTo(String value) {
+            addCriterion("video_cover >=", value, "videoCover");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoCoverLessThan(String value) {
+            addCriterion("video_cover <", value, "videoCover");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoCoverLessThanOrEqualTo(String value) {
+            addCriterion("video_cover <=", value, "videoCover");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoCoverLike(String value) {
+            addCriterion("video_cover like", value, "videoCover");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoCoverNotLike(String value) {
+            addCriterion("video_cover not like", value, "videoCover");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoCoverIn(List<String> values) {
+            addCriterion("video_cover in", values, "videoCover");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoCoverNotIn(List<String> values) {
+            addCriterion("video_cover not in", values, "videoCover");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoCoverBetween(String value1, String value2) {
+            addCriterion("video_cover between", value1, value2, "videoCover");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoCoverNotBetween(String value1, String value2) {
+            addCriterion("video_cover not between", value1, value2, "videoCover");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryIsNull() {
+            addCriterion("category is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryIsNotNull() {
+            addCriterion("category is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryEqualTo(String value) {
+            addCriterion("category =", value, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryNotEqualTo(String value) {
+            addCriterion("category <>", value, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryGreaterThan(String value) {
+            addCriterion("category >", value, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryGreaterThanOrEqualTo(String value) {
+            addCriterion("category >=", value, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryLessThan(String value) {
+            addCriterion("category <", value, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryLessThanOrEqualTo(String value) {
+            addCriterion("category <=", value, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryLike(String value) {
+            addCriterion("category like", value, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryNotLike(String value) {
+            addCriterion("category not like", value, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryIn(List<String> values) {
+            addCriterion("category in", values, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryNotIn(List<String> values) {
+            addCriterion("category not in", values, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryBetween(String value1, String value2) {
+            addCriterion("category between", value1, value2, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryNotBetween(String value1, String value2) {
+            addCriterion("category not between", value1, value2, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCopywriterIsNull() {
+            addCriterion("copywriter is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCopywriterIsNotNull() {
+            addCriterion("copywriter is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCopywriterEqualTo(String value) {
+            addCriterion("copywriter =", value, "copywriter");
+            return (Criteria) this;
+        }
+
+        public Criteria andCopywriterNotEqualTo(String value) {
+            addCriterion("copywriter <>", value, "copywriter");
+            return (Criteria) this;
+        }
+
+        public Criteria andCopywriterGreaterThan(String value) {
+            addCriterion("copywriter >", value, "copywriter");
+            return (Criteria) this;
+        }
+
+        public Criteria andCopywriterGreaterThanOrEqualTo(String value) {
+            addCriterion("copywriter >=", value, "copywriter");
+            return (Criteria) this;
+        }
+
+        public Criteria andCopywriterLessThan(String value) {
+            addCriterion("copywriter <", value, "copywriter");
+            return (Criteria) this;
+        }
+
+        public Criteria andCopywriterLessThanOrEqualTo(String value) {
+            addCriterion("copywriter <=", value, "copywriter");
+            return (Criteria) this;
+        }
+
+        public Criteria andCopywriterLike(String value) {
+            addCriterion("copywriter like", value, "copywriter");
+            return (Criteria) this;
+        }
+
+        public Criteria andCopywriterNotLike(String value) {
+            addCriterion("copywriter not like", value, "copywriter");
+            return (Criteria) this;
+        }
+
+        public Criteria andCopywriterIn(List<String> values) {
+            addCriterion("copywriter in", values, "copywriter");
+            return (Criteria) this;
+        }
+
+        public Criteria andCopywriterNotIn(List<String> values) {
+            addCriterion("copywriter not in", values, "copywriter");
+            return (Criteria) this;
+        }
+
+        public Criteria andCopywriterBetween(String value1, String value2) {
+            addCriterion("copywriter between", value1, value2, "copywriter");
+            return (Criteria) this;
+        }
+
+        public Criteria andCopywriterNotBetween(String value1, String value2) {
+            addCriterion("copywriter not between", value1, value2, "copywriter");
+            return (Criteria) this;
+        }
+
+        public Criteria andCaptionIsNull() {
+            addCriterion("caption is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCaptionIsNotNull() {
+            addCriterion("caption is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCaptionEqualTo(String value) {
+            addCriterion("caption =", value, "caption");
+            return (Criteria) this;
+        }
+
+        public Criteria andCaptionNotEqualTo(String value) {
+            addCriterion("caption <>", value, "caption");
+            return (Criteria) this;
+        }
+
+        public Criteria andCaptionGreaterThan(String value) {
+            addCriterion("caption >", value, "caption");
+            return (Criteria) this;
+        }
+
+        public Criteria andCaptionGreaterThanOrEqualTo(String value) {
+            addCriterion("caption >=", value, "caption");
+            return (Criteria) this;
+        }
+
+        public Criteria andCaptionLessThan(String value) {
+            addCriterion("caption <", value, "caption");
+            return (Criteria) this;
+        }
+
+        public Criteria andCaptionLessThanOrEqualTo(String value) {
+            addCriterion("caption <=", value, "caption");
+            return (Criteria) this;
+        }
+
+        public Criteria andCaptionLike(String value) {
+            addCriterion("caption like", value, "caption");
+            return (Criteria) this;
+        }
+
+        public Criteria andCaptionNotLike(String value) {
+            addCriterion("caption not like", value, "caption");
+            return (Criteria) this;
+        }
+
+        public Criteria andCaptionIn(List<String> values) {
+            addCriterion("caption in", values, "caption");
+            return (Criteria) this;
+        }
+
+        public Criteria andCaptionNotIn(List<String> values) {
+            addCriterion("caption not in", values, "caption");
+            return (Criteria) this;
+        }
+
+        public Criteria andCaptionBetween(String value1, String value2) {
+            addCriterion("caption between", value1, value2, "caption");
+            return (Criteria) this;
+        }
+
+        public Criteria andCaptionNotBetween(String value1, String value2) {
+            addCriterion("caption not between", value1, value2, "caption");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNull() {
+            addCriterion("`status` is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNotNull() {
+            addCriterion("`status` is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusEqualTo(Integer value) {
+            addCriterion("`status` =", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotEqualTo(Integer value) {
+            addCriterion("`status` <>", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThan(Integer value) {
+            addCriterion("`status` >", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
+            addCriterion("`status` >=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThan(Integer value) {
+            addCriterion("`status` <", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThanOrEqualTo(Integer value) {
+            addCriterion("`status` <=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIn(List<Integer> values) {
+            addCriterion("`status` in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotIn(List<Integer> values) {
+            addCriterion("`status` not in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusBetween(Integer value1, Integer value2) {
+            addCriterion("`status` between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
+            addCriterion("`status` not between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andRetryCountIsNull() {
+            addCriterion("retry_count is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRetryCountIsNotNull() {
+            addCriterion("retry_count is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRetryCountEqualTo(Integer value) {
+            addCriterion("retry_count =", value, "retryCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andRetryCountNotEqualTo(Integer value) {
+            addCriterion("retry_count <>", value, "retryCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andRetryCountGreaterThan(Integer value) {
+            addCriterion("retry_count >", value, "retryCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andRetryCountGreaterThanOrEqualTo(Integer value) {
+            addCriterion("retry_count >=", value, "retryCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andRetryCountLessThan(Integer value) {
+            addCriterion("retry_count <", value, "retryCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andRetryCountLessThanOrEqualTo(Integer value) {
+            addCriterion("retry_count <=", value, "retryCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andRetryCountIn(List<Integer> values) {
+            addCriterion("retry_count in", values, "retryCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andRetryCountNotIn(List<Integer> values) {
+            addCriterion("retry_count not in", values, "retryCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andRetryCountBetween(Integer value1, Integer value2) {
+            addCriterion("retry_count between", value1, value2, "retryCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andRetryCountNotBetween(Integer value1, Integer value2) {
+            addCriterion("retry_count not between", value1, value2, "retryCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteIsNull() {
+            addCriterion("is_delete is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteIsNotNull() {
+            addCriterion("is_delete is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteEqualTo(Integer value) {
+            addCriterion("is_delete =", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteNotEqualTo(Integer value) {
+            addCriterion("is_delete <>", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteGreaterThan(Integer value) {
+            addCriterion("is_delete >", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteGreaterThanOrEqualTo(Integer value) {
+            addCriterion("is_delete >=", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteLessThan(Integer value) {
+            addCriterion("is_delete <", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteLessThanOrEqualTo(Integer value) {
+            addCriterion("is_delete <=", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteIn(List<Integer> values) {
+            addCriterion("is_delete in", values, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteNotIn(List<Integer> values) {
+            addCriterion("is_delete not in", values, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteBetween(Integer value1, Integer value2) {
+            addCriterion("is_delete between", value1, value2, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteNotBetween(Integer value1, Integer value2) {
+            addCriterion("is_delete not between", value1, value2, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNull() {
+            addCriterion("create_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNotNull() {
+            addCriterion("create_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeEqualTo(Date value) {
+            addCriterion("create_time =", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotEqualTo(Date value) {
+            addCriterion("create_time <>", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThan(Date value) {
+            addCriterion("create_time >", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("create_time >=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThan(Date value) {
+            addCriterion("create_time <", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("create_time <=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIn(List<Date> values) {
+            addCriterion("create_time in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotIn(List<Date> values) {
+            addCriterion("create_time not in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeBetween(Date value1, Date value2) {
+            addCriterion("create_time between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("create_time not between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNull() {
+            addCriterion("update_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNotNull() {
+            addCriterion("update_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeEqualTo(Date value) {
+            addCriterion("update_time =", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotEqualTo(Date value) {
+            addCriterion("update_time <>", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThan(Date value) {
+            addCriterion("update_time >", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("update_time >=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThan(Date value) {
+            addCriterion("update_time <", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("update_time <=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIn(List<Date> values) {
+            addCriterion("update_time in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotIn(List<Date> values) {
+            addCriterion("update_time not in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeBetween(Date value1, Date value2) {
+            addCriterion("update_time between", value1, value2, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("update_time not between", value1, value2, "updateTime");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 136 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/po/AdVideoImage.java

@@ -0,0 +1,136 @@
+package com.tzld.piaoquan.tencentad.model.po;
+
+import java.util.Date;
+
+public class AdVideoImage {
+    private Long id;
+
+    private Long adVideoId;
+
+    private String imageUrl;
+
+    private Integer status;
+
+    private String tencentImageId;
+
+    private Integer similarity;
+
+    private String dimensionSize;
+
+    private String text2imgDesc;
+
+    private Integer isDelete;
+
+    private Date createTime;
+
+    private Date updateTime;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getAdVideoId() {
+        return adVideoId;
+    }
+
+    public void setAdVideoId(Long adVideoId) {
+        this.adVideoId = adVideoId;
+    }
+
+    public String getImageUrl() {
+        return imageUrl;
+    }
+
+    public void setImageUrl(String imageUrl) {
+        this.imageUrl = imageUrl;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public String getTencentImageId() {
+        return tencentImageId;
+    }
+
+    public void setTencentImageId(String tencentImageId) {
+        this.tencentImageId = tencentImageId;
+    }
+
+    public Integer getSimilarity() {
+        return similarity;
+    }
+
+    public void setSimilarity(Integer similarity) {
+        this.similarity = similarity;
+    }
+
+    public String getDimensionSize() {
+        return dimensionSize;
+    }
+
+    public void setDimensionSize(String dimensionSize) {
+        this.dimensionSize = dimensionSize;
+    }
+
+    public String getText2imgDesc() {
+        return text2imgDesc;
+    }
+
+    public void setText2imgDesc(String text2imgDesc) {
+        this.text2imgDesc = text2imgDesc;
+    }
+
+    public Integer getIsDelete() {
+        return isDelete;
+    }
+
+    public void setIsDelete(Integer isDelete) {
+        this.isDelete = isDelete;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", adVideoId=").append(adVideoId);
+        sb.append(", imageUrl=").append(imageUrl);
+        sb.append(", status=").append(status);
+        sb.append(", tencentImageId=").append(tencentImageId);
+        sb.append(", similarity=").append(similarity);
+        sb.append(", dimensionSize=").append(dimensionSize);
+        sb.append(", text2imgDesc=").append(text2imgDesc);
+        sb.append(", isDelete=").append(isDelete);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 912 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/po/AdVideoImageExample.java

@@ -0,0 +1,912 @@
+package com.tzld.piaoquan.tencentad.model.po;
+
+import com.tzld.piaoquan.tencentad.utils.page.Page;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class AdVideoImageExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    protected Page page;
+
+    public AdVideoImageExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    public void setPage(Page page) {
+        this.page=page;
+    }
+
+    public Page getPage() {
+        return page;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdIsNull() {
+            addCriterion("ad_video_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdIsNotNull() {
+            addCriterion("ad_video_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdEqualTo(Long value) {
+            addCriterion("ad_video_id =", value, "adVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdNotEqualTo(Long value) {
+            addCriterion("ad_video_id <>", value, "adVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdGreaterThan(Long value) {
+            addCriterion("ad_video_id >", value, "adVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("ad_video_id >=", value, "adVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdLessThan(Long value) {
+            addCriterion("ad_video_id <", value, "adVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdLessThanOrEqualTo(Long value) {
+            addCriterion("ad_video_id <=", value, "adVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdIn(List<Long> values) {
+            addCriterion("ad_video_id in", values, "adVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdNotIn(List<Long> values) {
+            addCriterion("ad_video_id not in", values, "adVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdBetween(Long value1, Long value2) {
+            addCriterion("ad_video_id between", value1, value2, "adVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAdVideoIdNotBetween(Long value1, Long value2) {
+            addCriterion("ad_video_id not between", value1, value2, "adVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andImageUrlIsNull() {
+            addCriterion("image_url is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andImageUrlIsNotNull() {
+            addCriterion("image_url is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andImageUrlEqualTo(String value) {
+            addCriterion("image_url =", value, "imageUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andImageUrlNotEqualTo(String value) {
+            addCriterion("image_url <>", value, "imageUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andImageUrlGreaterThan(String value) {
+            addCriterion("image_url >", value, "imageUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andImageUrlGreaterThanOrEqualTo(String value) {
+            addCriterion("image_url >=", value, "imageUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andImageUrlLessThan(String value) {
+            addCriterion("image_url <", value, "imageUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andImageUrlLessThanOrEqualTo(String value) {
+            addCriterion("image_url <=", value, "imageUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andImageUrlLike(String value) {
+            addCriterion("image_url like", value, "imageUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andImageUrlNotLike(String value) {
+            addCriterion("image_url not like", value, "imageUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andImageUrlIn(List<String> values) {
+            addCriterion("image_url in", values, "imageUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andImageUrlNotIn(List<String> values) {
+            addCriterion("image_url not in", values, "imageUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andImageUrlBetween(String value1, String value2) {
+            addCriterion("image_url between", value1, value2, "imageUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andImageUrlNotBetween(String value1, String value2) {
+            addCriterion("image_url not between", value1, value2, "imageUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNull() {
+            addCriterion("`status` is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNotNull() {
+            addCriterion("`status` is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusEqualTo(Integer value) {
+            addCriterion("`status` =", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotEqualTo(Integer value) {
+            addCriterion("`status` <>", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThan(Integer value) {
+            addCriterion("`status` >", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
+            addCriterion("`status` >=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThan(Integer value) {
+            addCriterion("`status` <", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThanOrEqualTo(Integer value) {
+            addCriterion("`status` <=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIn(List<Integer> values) {
+            addCriterion("`status` in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotIn(List<Integer> values) {
+            addCriterion("`status` not in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusBetween(Integer value1, Integer value2) {
+            addCriterion("`status` between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
+            addCriterion("`status` not between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andTencentImageIdIsNull() {
+            addCriterion("tencent_image_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTencentImageIdIsNotNull() {
+            addCriterion("tencent_image_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTencentImageIdEqualTo(String value) {
+            addCriterion("tencent_image_id =", value, "tencentImageId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTencentImageIdNotEqualTo(String value) {
+            addCriterion("tencent_image_id <>", value, "tencentImageId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTencentImageIdGreaterThan(String value) {
+            addCriterion("tencent_image_id >", value, "tencentImageId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTencentImageIdGreaterThanOrEqualTo(String value) {
+            addCriterion("tencent_image_id >=", value, "tencentImageId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTencentImageIdLessThan(String value) {
+            addCriterion("tencent_image_id <", value, "tencentImageId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTencentImageIdLessThanOrEqualTo(String value) {
+            addCriterion("tencent_image_id <=", value, "tencentImageId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTencentImageIdLike(String value) {
+            addCriterion("tencent_image_id like", value, "tencentImageId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTencentImageIdNotLike(String value) {
+            addCriterion("tencent_image_id not like", value, "tencentImageId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTencentImageIdIn(List<String> values) {
+            addCriterion("tencent_image_id in", values, "tencentImageId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTencentImageIdNotIn(List<String> values) {
+            addCriterion("tencent_image_id not in", values, "tencentImageId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTencentImageIdBetween(String value1, String value2) {
+            addCriterion("tencent_image_id between", value1, value2, "tencentImageId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTencentImageIdNotBetween(String value1, String value2) {
+            addCriterion("tencent_image_id not between", value1, value2, "tencentImageId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSimilarityIsNull() {
+            addCriterion("similarity is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSimilarityIsNotNull() {
+            addCriterion("similarity is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSimilarityEqualTo(Integer value) {
+            addCriterion("similarity =", value, "similarity");
+            return (Criteria) this;
+        }
+
+        public Criteria andSimilarityNotEqualTo(Integer value) {
+            addCriterion("similarity <>", value, "similarity");
+            return (Criteria) this;
+        }
+
+        public Criteria andSimilarityGreaterThan(Integer value) {
+            addCriterion("similarity >", value, "similarity");
+            return (Criteria) this;
+        }
+
+        public Criteria andSimilarityGreaterThanOrEqualTo(Integer value) {
+            addCriterion("similarity >=", value, "similarity");
+            return (Criteria) this;
+        }
+
+        public Criteria andSimilarityLessThan(Integer value) {
+            addCriterion("similarity <", value, "similarity");
+            return (Criteria) this;
+        }
+
+        public Criteria andSimilarityLessThanOrEqualTo(Integer value) {
+            addCriterion("similarity <=", value, "similarity");
+            return (Criteria) this;
+        }
+
+        public Criteria andSimilarityIn(List<Integer> values) {
+            addCriterion("similarity in", values, "similarity");
+            return (Criteria) this;
+        }
+
+        public Criteria andSimilarityNotIn(List<Integer> values) {
+            addCriterion("similarity not in", values, "similarity");
+            return (Criteria) this;
+        }
+
+        public Criteria andSimilarityBetween(Integer value1, Integer value2) {
+            addCriterion("similarity between", value1, value2, "similarity");
+            return (Criteria) this;
+        }
+
+        public Criteria andSimilarityNotBetween(Integer value1, Integer value2) {
+            addCriterion("similarity not between", value1, value2, "similarity");
+            return (Criteria) this;
+        }
+
+        public Criteria andDimensionSizeIsNull() {
+            addCriterion("dimension_size is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDimensionSizeIsNotNull() {
+            addCriterion("dimension_size is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDimensionSizeEqualTo(String value) {
+            addCriterion("dimension_size =", value, "dimensionSize");
+            return (Criteria) this;
+        }
+
+        public Criteria andDimensionSizeNotEqualTo(String value) {
+            addCriterion("dimension_size <>", value, "dimensionSize");
+            return (Criteria) this;
+        }
+
+        public Criteria andDimensionSizeGreaterThan(String value) {
+            addCriterion("dimension_size >", value, "dimensionSize");
+            return (Criteria) this;
+        }
+
+        public Criteria andDimensionSizeGreaterThanOrEqualTo(String value) {
+            addCriterion("dimension_size >=", value, "dimensionSize");
+            return (Criteria) this;
+        }
+
+        public Criteria andDimensionSizeLessThan(String value) {
+            addCriterion("dimension_size <", value, "dimensionSize");
+            return (Criteria) this;
+        }
+
+        public Criteria andDimensionSizeLessThanOrEqualTo(String value) {
+            addCriterion("dimension_size <=", value, "dimensionSize");
+            return (Criteria) this;
+        }
+
+        public Criteria andDimensionSizeLike(String value) {
+            addCriterion("dimension_size like", value, "dimensionSize");
+            return (Criteria) this;
+        }
+
+        public Criteria andDimensionSizeNotLike(String value) {
+            addCriterion("dimension_size not like", value, "dimensionSize");
+            return (Criteria) this;
+        }
+
+        public Criteria andDimensionSizeIn(List<String> values) {
+            addCriterion("dimension_size in", values, "dimensionSize");
+            return (Criteria) this;
+        }
+
+        public Criteria andDimensionSizeNotIn(List<String> values) {
+            addCriterion("dimension_size not in", values, "dimensionSize");
+            return (Criteria) this;
+        }
+
+        public Criteria andDimensionSizeBetween(String value1, String value2) {
+            addCriterion("dimension_size between", value1, value2, "dimensionSize");
+            return (Criteria) this;
+        }
+
+        public Criteria andDimensionSizeNotBetween(String value1, String value2) {
+            addCriterion("dimension_size not between", value1, value2, "dimensionSize");
+            return (Criteria) this;
+        }
+
+        public Criteria andText2imgDescIsNull() {
+            addCriterion("text2img_desc is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andText2imgDescIsNotNull() {
+            addCriterion("text2img_desc is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andText2imgDescEqualTo(String value) {
+            addCriterion("text2img_desc =", value, "text2imgDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andText2imgDescNotEqualTo(String value) {
+            addCriterion("text2img_desc <>", value, "text2imgDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andText2imgDescGreaterThan(String value) {
+            addCriterion("text2img_desc >", value, "text2imgDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andText2imgDescGreaterThanOrEqualTo(String value) {
+            addCriterion("text2img_desc >=", value, "text2imgDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andText2imgDescLessThan(String value) {
+            addCriterion("text2img_desc <", value, "text2imgDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andText2imgDescLessThanOrEqualTo(String value) {
+            addCriterion("text2img_desc <=", value, "text2imgDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andText2imgDescLike(String value) {
+            addCriterion("text2img_desc like", value, "text2imgDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andText2imgDescNotLike(String value) {
+            addCriterion("text2img_desc not like", value, "text2imgDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andText2imgDescIn(List<String> values) {
+            addCriterion("text2img_desc in", values, "text2imgDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andText2imgDescNotIn(List<String> values) {
+            addCriterion("text2img_desc not in", values, "text2imgDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andText2imgDescBetween(String value1, String value2) {
+            addCriterion("text2img_desc between", value1, value2, "text2imgDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andText2imgDescNotBetween(String value1, String value2) {
+            addCriterion("text2img_desc not between", value1, value2, "text2imgDesc");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteIsNull() {
+            addCriterion("is_delete is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteIsNotNull() {
+            addCriterion("is_delete is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteEqualTo(Integer value) {
+            addCriterion("is_delete =", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteNotEqualTo(Integer value) {
+            addCriterion("is_delete <>", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteGreaterThan(Integer value) {
+            addCriterion("is_delete >", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteGreaterThanOrEqualTo(Integer value) {
+            addCriterion("is_delete >=", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteLessThan(Integer value) {
+            addCriterion("is_delete <", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteLessThanOrEqualTo(Integer value) {
+            addCriterion("is_delete <=", value, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteIn(List<Integer> values) {
+            addCriterion("is_delete in", values, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteNotIn(List<Integer> values) {
+            addCriterion("is_delete not in", values, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteBetween(Integer value1, Integer value2) {
+            addCriterion("is_delete between", value1, value2, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andIsDeleteNotBetween(Integer value1, Integer value2) {
+            addCriterion("is_delete not between", value1, value2, "isDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNull() {
+            addCriterion("create_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNotNull() {
+            addCriterion("create_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeEqualTo(Date value) {
+            addCriterion("create_time =", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotEqualTo(Date value) {
+            addCriterion("create_time <>", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThan(Date value) {
+            addCriterion("create_time >", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("create_time >=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThan(Date value) {
+            addCriterion("create_time <", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("create_time <=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIn(List<Date> values) {
+            addCriterion("create_time in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotIn(List<Date> values) {
+            addCriterion("create_time not in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeBetween(Date value1, Date value2) {
+            addCriterion("create_time between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("create_time not between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNull() {
+            addCriterion("update_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNotNull() {
+            addCriterion("update_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeEqualTo(Date value) {
+            addCriterion("update_time =", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotEqualTo(Date value) {
+            addCriterion("update_time <>", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThan(Date value) {
+            addCriterion("update_time >", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("update_time >=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThan(Date value) {
+            addCriterion("update_time <", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("update_time <=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIn(List<Date> values) {
+            addCriterion("update_time in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotIn(List<Date> values) {
+            addCriterion("update_time not in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeBetween(Date value1, Date value2) {
+            addCriterion("update_time between", value1, value2, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("update_time not between", value1, value2, "updateTime");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 15 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdCreativeParam.java

@@ -0,0 +1,15 @@
+package com.tzld.piaoquan.tencentad.model.vo;
+
+import lombok.Data;
+import lombok.ToString;
+
+import java.util.List;
+
+@Data
+@ToString
+public class AdCreativeParam {
+
+    private Long adVideoId;
+
+    private List<Long> adMuseTaskIds;
+}

+ 14 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdMuseImageParam.java

@@ -0,0 +1,14 @@
+package com.tzld.piaoquan.tencentad.model.vo;
+
+import lombok.Data;
+import lombok.ToString;
+
+@Data
+@ToString
+public class AdMuseImageParam {
+
+    private Long id;
+
+    private Integer status;
+
+}

+ 23 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdMuseImageVo.java

@@ -0,0 +1,23 @@
+package com.tzld.piaoquan.tencentad.model.vo;
+
+import lombok.Data;
+import lombok.ToString;
+
+@Data
+@ToString
+public class AdMuseImageVo {
+
+    private Long id;
+
+    private Integer status;
+
+    private String statusName;
+
+    private String museUrl;
+
+    private String stitchUrl;
+
+    private String createTime;
+
+    private String updateTime;
+}

+ 37 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdPutFlowParam.java

@@ -0,0 +1,37 @@
+package com.tzld.piaoquan.tencentad.model.vo;
+
+import lombok.Data;
+
+import java.util.Map;
+
+@Data
+public class AdPutFlowParam {
+
+    private Long id;
+
+    private Long videoId;
+
+    private String putScene;
+
+    private String channel;
+
+    private String remark;
+
+    private String path;
+
+    private Map<String,String> requestParam;
+
+    private String rootSourceId;
+
+    private String putTypeOne;
+
+    private String putTypeTwo;
+
+    private String putTypeThree;
+
+    private String testId;
+
+    private String putCarrierId;
+
+    private String putStartDate;
+}

+ 19 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdVideoImageParam.java

@@ -0,0 +1,19 @@
+package com.tzld.piaoquan.tencentad.model.vo;
+
+import lombok.Data;
+import lombok.ToString;
+
+@Data
+@ToString
+public class AdVideoImageParam {
+
+    private Long id;
+
+    private Integer status;
+
+    private Integer similarity;
+
+    private String dimensionSize;
+
+    private String text2imgDesc;
+}

+ 31 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdVideoImageVo.java

@@ -0,0 +1,31 @@
+package com.tzld.piaoquan.tencentad.model.vo;
+
+import lombok.Data;
+import lombok.ToString;
+
+import java.util.Date;
+
+@Data
+@ToString
+public class AdVideoImageVo {
+
+    private Long id;
+
+    private String imageUrl;
+
+    private Integer status;
+
+    private String statusName;
+
+    private Integer similarity;
+
+    private String similarityName;
+
+    private String dimensionSize;
+
+    private String text2imgDesc;
+
+    private String createTime;
+
+    private String updateTime;
+}

+ 14 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdVideoParam.java

@@ -0,0 +1,14 @@
+package com.tzld.piaoquan.tencentad.model.vo;
+
+import lombok.Data;
+import lombok.ToString;
+
+@Data
+@ToString
+public class AdVideoParam {
+
+    private Long id;
+
+    private Integer status;
+
+}

+ 34 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/model/vo/AdVideoVo.java

@@ -0,0 +1,34 @@
+package com.tzld.piaoquan.tencentad.model.vo;
+
+import lombok.Data;
+import lombok.ToString;
+
+import java.util.Date;
+
+@Data
+@ToString
+public class AdVideoVo {
+
+    private Long id;
+
+    private Long videoId;
+
+    private String videoPath;
+
+    private String videoCover;
+
+    private String category;
+
+    private String copywriter;
+
+    private String caption;
+
+    private Integer status;
+
+    private String statusName;
+
+    private String createTime;
+
+    private String updateTime;
+
+}

+ 6 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/AdAccountService.java

@@ -0,0 +1,6 @@
+package com.tzld.piaoquan.tencentad.service;
+
+public interface AdAccountService {
+
+    String getAccessToken(String accountId);
+}

+ 10 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/AdCreativeService.java

@@ -0,0 +1,10 @@
+package com.tzld.piaoquan.tencentad.service;
+
+import com.tzld.piaoquan.tencentad.model.po.AdVideo;
+
+import java.util.List;
+
+public interface AdCreativeService {
+
+    boolean addAdCreative(AdVideo adVideo, List<Long> mediaIds, Long adgroupId, String accountId);
+}

+ 8 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/AdGroupService.java

@@ -0,0 +1,8 @@
+package com.tzld.piaoquan.tencentad.service;
+
+import com.tzld.piaoquan.tencentad.model.po.AdGroup;
+
+public interface AdGroupService {
+
+    AdGroup getAdGroupById(Long adGroupId);
+}

+ 27 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/AdMuseTaskService.java

@@ -0,0 +1,27 @@
+package com.tzld.piaoquan.tencentad.service;
+
+import com.tzld.piaoquan.tencentad.common.base.CommonResponse;
+import com.tzld.piaoquan.tencentad.model.po.AdMuseTask;
+import com.tzld.piaoquan.tencentad.model.po.AdVideoImage;
+import com.tzld.piaoquan.tencentad.model.vo.AdMuseImageParam;
+import com.tzld.piaoquan.tencentad.model.vo.AdMuseImageVo;
+import com.tzld.piaoquan.tencentad.model.vo.AdVideoImageVo;
+
+import java.util.List;
+
+public interface AdMuseTaskService {
+
+    void addMuseTask(String accountId, String accessToken, AdVideoImage adVideoImage);
+
+    List<AdMuseTask> getAdMuseTask(Long adVideoId, Integer status);
+
+    List<AdMuseTask> getAdMuseTask(Long adVideoId, Integer status, List<Long> adMuseTaskIds);
+
+    boolean getMuseTaskRes(String accountId, String accessToken, AdMuseTask adMuseTask, String caption);
+
+    long selectCount(Long adVideoId, List<Integer> status);
+
+    CommonResponse<List<AdMuseImageVo>> getAdMuseImageVoList(Long adVideoId);
+
+    CommonResponse<Void> verifyMuseTask(AdMuseImageParam adMuseImageParam);
+}

+ 26 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/AdVideoImageService.java

@@ -0,0 +1,26 @@
+package com.tzld.piaoquan.tencentad.service;
+
+import com.tzld.piaoquan.tencentad.common.base.CommonResponse;
+import com.tzld.piaoquan.tencentad.model.po.AdVideoImage;
+import com.tzld.piaoquan.tencentad.model.vo.AdVideoImageParam;
+import com.tzld.piaoquan.tencentad.model.vo.AdVideoImageVo;
+import com.tzld.piaoquan.tencentad.model.vo.AdVideoParam;
+
+import java.util.List;
+
+public interface AdVideoImageService {
+
+    boolean addAdVideoImage(Long adVideoId, String url);
+
+    CommonResponse<List<AdVideoImageVo>> getAdVideoImageVoList(Long adVideoId);
+
+    List<AdVideoImage> getAdVideoImageList(Long adVideoId, Integer status);
+
+    CommonResponse<Void> updateAdVideoImage(AdVideoImageParam adVideoImageParam);
+
+    boolean uploadImageToTencent(String account, String accessToken, Long adVideoId);
+
+    long selectCount(Long adVideoId, Integer status);
+
+
+}

+ 23 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/AdVideoService.java

@@ -0,0 +1,23 @@
+package com.tzld.piaoquan.tencentad.service;
+
+import com.tzld.piaoquan.tencentad.common.base.CommonResponse;
+import com.tzld.piaoquan.tencentad.model.po.AdVideo;
+import com.tzld.piaoquan.tencentad.model.vo.AdCreativeParam;
+import com.tzld.piaoquan.tencentad.model.vo.AdVideoParam;
+import com.tzld.piaoquan.tencentad.model.vo.AdVideoVo;
+import com.tzld.piaoquan.tencentad.utils.page.Page;
+
+import java.util.List;
+
+public interface AdVideoService {
+
+    CommonResponse<Page<AdVideoVo>> getAdVideoList(Integer pageNum, Integer pageSize);
+
+    void buildVideoImage(AdVideo adVideo);
+
+    CommonResponse<Void> createAdCreative(AdCreativeParam adCreativeParam);
+
+    CommonResponse<Void> verifyAdVideo(AdVideoParam adVideoParam);
+
+    void refreshMuseTaskStatus();
+}

+ 11 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/TencentService.java

@@ -0,0 +1,11 @@
+package com.tzld.piaoquan.tencentad.service;
+
+import com.tzld.piaoquan.tencentad.model.bo.MuseTask;
+import com.tzld.piaoquan.tencentad.model.po.AdMuseTask;
+import com.tzld.piaoquan.tencentad.model.po.AdVideoImage;
+
+public interface TencentService {
+
+    String uploadImage(String accountId, String accessToken, String imageUrl);
+
+}

+ 17 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/impl/AdAccountServiceImpl.java

@@ -0,0 +1,17 @@
+package com.tzld.piaoquan.tencentad.service.impl;
+
+import com.tzld.piaoquan.tencentad.service.AdAccountService;
+import org.springframework.stereotype.Service;
+
+@Service
+public class AdAccountServiceImpl implements AdAccountService {
+
+
+    @Override
+    public String getAccessToken(String accountId) {
+        if ("44981456".equals(accountId)) {
+            return "2e4d37f5da9f441bbc54b03ec7d89eb7";
+        }
+        return null;
+    }
+}

+ 171 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/impl/AdCreativeServiceImpl.java

@@ -0,0 +1,171 @@
+package com.tzld.piaoquan.tencentad.service.impl;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.tzld.piaoquan.tencentad.component.HttpPoolClient;
+import com.tzld.piaoquan.tencentad.dao.mapper.AdCreativeMapper;
+import com.tzld.piaoquan.tencentad.model.po.AdCreative;
+import com.tzld.piaoquan.tencentad.model.po.AdVideo;
+import com.tzld.piaoquan.tencentad.model.vo.AdPutFlowParam;
+import com.tzld.piaoquan.tencentad.service.AdAccountService;
+import com.tzld.piaoquan.tencentad.service.AdCreativeService;
+import com.tzld.piaoquan.tencentad.utils.DateUtils;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.io.IOException;
+import java.net.URLDecoder;
+import java.util.*;
+
+@Slf4j
+@Service
+public class AdCreativeServiceImpl implements AdCreativeService {
+
+    @Autowired
+    private HttpPoolClient httpPoolClient;
+
+    @Autowired
+    private AdAccountService adAccountService;
+
+    @Autowired
+    private AdCreativeMapper adCreativeMapper;
+
+
+    public boolean addAdCreative(AdVideo adVideo, List<Long> mediaIds, Long adgroupId, String accountId) {
+
+        JSONObject param = new JSONObject();
+
+        String page = insertPage(adVideo.getVideoId(), "");
+        if (StringUtils.isEmpty(page)) {
+            return false;
+        }
+        String rootSourceId = getRootSourceId(page);
+
+        param.put("account_id", Integer.parseInt(accountId));
+        param.put("adgroup_id", adgroupId);
+        param.put("delivery_mode", "DELIVERY_MODE_COMPONENT");
+        param.put("dynamic_creative_type", "DYNAMIC_CREATIVE_TYPE_PROGRAM");
+        param.put("dynamic_creative_name", rootSourceId);
+
+
+        JSONObject creativeComponents = new JSONObject();
+        JSONArray descriptions = new JSONArray();
+        JSONObject description1 = new JSONObject();
+        JSONObject descriptionValue = new JSONObject();
+        descriptionValue.put("content", adVideo.getCopywriter());
+        description1.put("value", descriptionValue);
+        descriptions.add(description1);
+        creativeComponents.put("description", descriptions);
+
+
+        JSONArray images = new JSONArray();
+        for (Long mediaId : mediaIds) {
+            JSONObject image = new JSONObject();
+            JSONObject imageValue = new JSONObject();
+            imageValue.put("image_id", String.valueOf(mediaId));
+            image.put("value", imageValue);
+            images.add(image);
+        }
+        creativeComponents.put("image", images);
+
+
+        JSONArray brands = new JSONArray();
+        JSONObject brand1 = new JSONObject();
+        JSONObject brand1Value = new JSONObject();
+        brand1Value.put("brand_name", "一起成行");
+        brand1Value.put("brand_image_id", "10372110611");
+        brand1.put("value", brand1Value);
+        brands.add(brand1);
+        creativeComponents.put("brand", brands);
+
+        JSONArray actionButtons = new JSONArray();
+        JSONObject actionButton1 = new JSONObject();
+        JSONObject actionButton1Value = new JSONObject();
+        actionButton1Value.put("button_text", "了解更多");
+        actionButton1.put("value", actionButton1Value);
+        actionButtons.add(actionButton1);
+        creativeComponents.put("action_button", actionButtons);
+
+        JSONArray jumpInfos = getJumpInfos(page);
+        JSONArray mainJumpInfo = getJumpInfos(page);
+
+        creativeComponents.put("jump_info", jumpInfos);
+        creativeComponents.put("main_jump_info", mainJumpInfo);
+        param.put("creative_components", creativeComponents);
+
+        String accessToken = adAccountService.getAccessToken(accountId);
+        Long timestamp = System.currentTimeMillis() / 1000;
+        System.out.println(JSONObject.toJSONString(param));
+
+        String url = String.format("https://api.e.qq.com/v3.0/dynamic_creatives/add?access_token=%s&timestamp=%s&nonce=%s",
+                accessToken, timestamp, timestamp);
+        try {
+            String res = httpPoolClient.post(url, JSONObject.toJSONString(param));
+            System.out.println(res);
+            JSONObject jsonObject = JSONObject.parseObject(res);
+            if (jsonObject != null && jsonObject.getInteger("code") == 0) {
+                JSONObject data = jsonObject.getJSONObject("data");
+                Long dynamicCreativeId = data.getLong("dynamic_creative_id");
+                AdCreative adCreative = new AdCreative();
+                adCreative.setAdId(adVideo.getAdGroupId());
+                adCreative.setAdVideoId(adVideo.getId());
+                adCreative.setDynamicCreativeId(dynamicCreativeId);
+                adCreativeMapper.insertSelective(adCreative);
+                return true;
+            }
+        } catch (Exception e) {
+            log.error("addAdCreative error", e);
+        }
+        return false;
+    }
+
+    private JSONArray getJumpInfos(String page) {
+        JSONArray jumpInfos = new JSONArray();
+        JSONObject jumpInfo1 = new JSONObject();
+        JSONObject jumpInfo1Value = new JSONObject();
+        jumpInfo1Value.put("page_type", "PAGE_TYPE_WECHAT_MINI_PROGRAM");
+        JSONObject wechatMiniProgramSpec = new JSONObject();
+        wechatMiniProgramSpec.put("mini_program_id", "gh_f8e6629df9c6");
+        wechatMiniProgramSpec.put("mini_program_path", page);
+        JSONObject pageSpec = new JSONObject();
+        pageSpec.put("wechat_mini_program_spec", wechatMiniProgramSpec);
+        jumpInfo1Value.put("page_spec", pageSpec);
+        jumpInfo1.put("value", jumpInfo1Value);
+        jumpInfos.add(jumpInfo1);
+        return jumpInfos;
+    }
+
+    private static String getRootSourceId(String page) {
+        String decode = URLDecoder.decode(page);
+        return decode.split("rootSourceId=")[1].split("&")[0];
+    }
+    private String insertPage(Long videoId, String remark) {
+        AdPutFlowParam param = new AdPutFlowParam();
+        param.setChannel("tencent");
+        param.setPath("pages/category.html");
+        param.setPutCarrierId("wxf7261ed54f2e450e");
+        param.setPutScene("touliu");
+        param.setPutStartDate(DateUtils.getDayDateString("yyyy-MM-dd"));
+        param.setPutTypeOne("小程序");
+        param.setRemark(remark);
+        param.setVideoId(videoId);
+        Map<String, String> requestParam = new HashMap<>();
+        String jumpPage = "pages/user-videos?id=${videoId}&fromGzh=1&rootShareId=${uuid}&shareId=${uuid}&rootSourceId=[rootSourceId]"
+                .replace("${videoId}", "" + videoId)
+                .replace("${uuid}", "" + UUID.randomUUID());
+        requestParam.put("jumpPage", jumpPage);
+        param.setRequestParam(requestParam);
+        try {
+            String res = httpPoolClient.post("https://api.piaoquantv.com/ad/put/flow/add/tencent", JSONObject.toJSONString(param));
+            JSONObject jsonObject = JSONObject.parseObject(res);
+            JSONObject data = jsonObject.getJSONObject("data");
+            return data.getString("url");
+        } catch (Exception e) {
+            log.error("insertPage error");
+        }
+        return null;
+    }
+
+}

+ 19 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/impl/AdGroupServiceImpl.java

@@ -0,0 +1,19 @@
+package com.tzld.piaoquan.tencentad.service.impl;
+
+import com.tzld.piaoquan.tencentad.dao.mapper.AdGroupMapper;
+import com.tzld.piaoquan.tencentad.model.po.AdGroup;
+import com.tzld.piaoquan.tencentad.model.po.AdGroupExample;
+import com.tzld.piaoquan.tencentad.service.AdGroupService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class AdGroupServiceImpl implements AdGroupService {
+
+    @Autowired
+    private AdGroupMapper adGroupMapper;
+
+    public AdGroup getAdGroupById(Long adGroupId) {
+        return adGroupMapper.selectByPrimaryKey(adGroupId);
+    }
+}

+ 260 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/impl/AdMuseTaskServiceImpl.java

@@ -0,0 +1,260 @@
+package com.tzld.piaoquan.tencentad.service.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.tzld.piaoquan.tencentad.common.base.CommonResponse;
+import com.tzld.piaoquan.tencentad.common.base.ExceptionCodeEnum;
+import com.tzld.piaoquan.tencentad.common.constants.TimeConstant;
+import com.tzld.piaoquan.tencentad.common.enums.AdMuseTaskStatusEnum;
+import com.tzld.piaoquan.tencentad.common.enums.AdVideoStatusEnum;
+import com.tzld.piaoquan.tencentad.common.enums.SimilarityCodeEnum;
+import com.tzld.piaoquan.tencentad.component.HttpPoolClient;
+import com.tzld.piaoquan.tencentad.dao.mapper.AdGroupMapper;
+import com.tzld.piaoquan.tencentad.dao.mapper.AdMuseTaskMapper;
+import com.tzld.piaoquan.tencentad.dao.mapper.AdVideoMapper;
+import com.tzld.piaoquan.tencentad.model.bo.ImageParam;
+import com.tzld.piaoquan.tencentad.model.po.*;
+import com.tzld.piaoquan.tencentad.model.vo.AdMuseImageParam;
+import com.tzld.piaoquan.tencentad.model.vo.AdMuseImageVo;
+import com.tzld.piaoquan.tencentad.service.AdAccountService;
+import com.tzld.piaoquan.tencentad.service.AdMuseTaskService;
+import com.tzld.piaoquan.tencentad.utils.ImageUtils;
+import com.tzld.piaoquan.tencentad.utils.OSSUploader;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.awt.*;
+import java.util.*;
+import java.util.List;
+
+@Slf4j
+@Service
+public class AdMuseTaskServiceImpl implements AdMuseTaskService {
+
+    @Value("${image_path}")
+    private String imagePath;
+
+    @Autowired
+    private HttpPoolClient httpPoolClient;
+
+    @Autowired
+    private AdMuseTaskMapper adMuseTaskMapper;
+
+    @Autowired
+    private AdVideoMapper adVideoMapper;
+
+    @Autowired
+    private AdGroupMapper adGroupMapper;
+
+    @Autowired
+    private AdAccountService accountService;
+
+    public void addMuseTask(String accountId, String accessToken, AdVideoImage adVideoImage) {
+        try {
+            String url = String.format("https://api.e.qq.com/v3.0/muse_ai_task/add?access_token=%s&timestamp=%s&nonce=%s",
+                    accessToken, System.currentTimeMillis() / 1000, UUID.randomUUID().toString().replaceAll("-", ""));
+            JSONObject param = new JSONObject();
+            param.put("account_id", accountId);
+            if (StringUtils.isNotEmpty(adVideoImage.getText2imgDesc())) {
+                param.put("task_type", "MUSE_AI_TASK_TYPE_TEXT2IMG");
+                JSONObject text2img = new JSONObject();
+                if (StringUtils.isEmpty(adVideoImage.getDimensionSize())) {
+                    text2img.put("dimension_size", adVideoImage.getDimensionSize());
+                } else {
+                    text2img.put("dimension_size", "SIZE_1280_720");
+                }
+                text2img.put("prompt", adVideoImage.getText2imgDesc());
+                param.put("text2img", text2img);
+            } else {
+                param.put("task_type", "MUSE_AI_TASK_TYPE_IMG2IMG");
+                JSONObject img2img = new JSONObject();
+                //默认取4级相似
+                img2img.put("image_id", adVideoImage.getTencentImageId());
+                img2img.put("similarity", adVideoImage.getSimilarity() == null ?
+                        SimilarityCodeEnum.FOURTH.getCode() : adVideoImage.getSimilarity());
+                img2img.put("img2img_style", "MUSE_AI_IMG2IMG_STYLE_PEOPLE");
+                if (StringUtils.isNotEmpty(adVideoImage.getDimensionSize())) {
+                    img2img.put("dimension_size", adVideoImage.getDimensionSize());
+                } else {
+                    img2img.put("extend_size", true);
+                }
+
+                param.put("img2img", img2img);
+            }
+            String res = httpPoolClient.post(url, param.toJSONString());
+            JSONObject jsonObject = JSONObject.parseObject(res);
+            if (jsonObject != null && jsonObject.getInteger("code") == 0) {
+                JSONObject data = jsonObject.getJSONObject("data");
+                AdMuseTask adMuseTask = new AdMuseTask();
+                adMuseTask.setTaskId(data.getLong("task_id"));
+                adMuseTask.setTaskStatus(data.getString("task_status"));
+                adMuseTask.setTaskType(data.getString("task_type"));
+                adMuseTask.setAdVideoId(adVideoImage.getAdVideoId());
+                adMuseTask.setAdVideoImageId(adVideoImage.getId());
+                adMuseTaskMapper.insertSelective(adMuseTask);
+            }
+        } catch (Exception e) {
+            log.error("createMuseTask error ", e);
+        }
+    }
+
+    public List<AdMuseTask> getAdMuseTask(Long adVideoId, Integer status) {
+        AdMuseTaskExample example = new AdMuseTaskExample();
+        example.createCriteria().andAdVideoIdEqualTo(adVideoId).andStatusEqualTo(status);
+        return adMuseTaskMapper.selectByExample(example);
+    }
+
+    public List<AdMuseTask> getAdMuseTask(Long adVideoId, Integer status, List<Long> adMuseTaskIds) {
+        AdMuseTaskExample example = new AdMuseTaskExample();
+        example.createCriteria().andAdVideoIdEqualTo(adVideoId).andStatusEqualTo(status).andIdIn(adMuseTaskIds);
+        return adMuseTaskMapper.selectByExample(example);
+    }
+
+    public boolean getMuseTaskRes(String accountId, String accessToken, AdMuseTask adMuseTask, String caption) {
+        try {
+            long now = System.currentTimeMillis();
+            long create = adMuseTask.getCreateTime().getTime();
+            if (now < create + 3 * TimeConstant.MILLISECOND_MINUTE) {
+                return false;
+            }
+            long timestamp = System.currentTimeMillis() / 1000;
+            String url = String.format("https://api.e.qq.com/v3.0/muse_ai_task/get?access_token=%s&timestamp=%s&nonce=%s" +
+                            "&account_id=%s&task_id=%s",
+                    accessToken, timestamp, timestamp, accountId, adMuseTask.getTaskId());
+            String res = httpPoolClient.get(url);
+            JSONObject jsonObject = JSONObject.parseObject(res);
+            if (jsonObject != null && jsonObject.getInteger("code") == 0) {
+                JSONObject data = jsonObject.getJSONObject("data");
+                String taskStatus = data.getString("task_status");
+                if ("MUSE_AI_TASK_SUCCESS".equals(taskStatus)) {
+                    adMuseTask.setTaskStatus(taskStatus);
+                    JSONObject result = data.getJSONArray("results").getJSONObject(0);
+                    adMuseTask.setMuseMaterialId(result.getLong("muse_material_id"));
+                    adMuseTask.setMuseUrl(result.getString("url"));
+                    adMuseTask.setStitchUrl(getStitchUrl(result.getString("url"), caption));
+                    adMuseTask.setStatus(AdMuseTaskStatusEnum.CREATE_SUCCESS.getStatus());
+                    adMuseTaskMapper.updateByPrimaryKeySelective(adMuseTask);
+                    return true;
+                }
+                if ("MUSE_AI_TASK_FAIL".equals(taskStatus)) {
+                    adMuseTask.setTaskStatus(taskStatus);
+                    adMuseTask.setStatus(AdMuseTaskStatusEnum.CREATE_FAIL.getStatus());
+                    adMuseTaskMapper.updateByPrimaryKeySelective(adMuseTask);
+                    return true;
+                }
+            }
+        } catch (Exception e) {
+            log.error("createMuseTask error ", e);
+        }
+        return false;
+    }
+
+    public String getStitchUrl(String url, String caption) {
+        if (StringUtils.isEmpty(url)) {
+            return null;
+        }
+        String targetImgPath = imagePath + "/" + UUID.randomUUID() + ".jpg";
+        ImageParam imageParam = new ImageParam();
+        imageParam.setFont(new Font("微软雅黑", Font.PLAIN, 48));
+        imageParam.setColor(new Color(102, 102, 102));
+        imageParam.setText(caption);
+        return ImageUtils.writeImageFromUrl(url, targetImgPath, imageParam);
+    }
+
+    public long selectCount(Long adVideoId, List<Integer> status) {
+        AdMuseTaskExample example = new AdMuseTaskExample();
+        AdMuseTaskExample.Criteria criteria = example.createCriteria().andAdVideoIdEqualTo(adVideoId);
+        if (!CollectionUtils.isEmpty(status)) {
+            criteria.andStatusIn(status);
+        }
+        return adMuseTaskMapper.countByExample(example);
+    }
+
+    @Override
+    public CommonResponse<List<AdMuseImageVo>> getAdMuseImageVoList(Long adVideoId) {
+        AdMuseTaskExample example = new AdMuseTaskExample();
+        List<AdMuseTask> adMuseTasks = adMuseTaskMapper.selectByExample(example);
+        List<AdMuseImageVo> res = new ArrayList<>();
+        if (CollectionUtils.isEmpty(adMuseTasks)) {
+            return CommonResponse.success(res);
+        }
+        for (AdMuseTask adMuseTask : adMuseTasks) {
+            AdMuseImageVo adMuseImageVo = new AdMuseImageVo();
+            BeanUtils.copyProperties(adMuseTask, adMuseImageVo);
+            AdMuseTaskStatusEnum adMuseTaskStatusEnum = AdMuseTaskStatusEnum.getByStatus(adMuseTask.getStatus());
+            if (adMuseTaskStatusEnum != null) {
+                adMuseImageVo.setStatusName(adMuseTaskStatusEnum.getDesc());
+            }
+            res.add(adMuseImageVo);
+        }
+        return CommonResponse.success(res);
+    }
+
+
+    public CommonResponse<Void> verifyMuseTask(AdMuseImageParam adMuseImageParam) {
+        if (adMuseImageParam == null || adMuseImageParam.getId() == null || adMuseImageParam.getStatus() == null) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAM_ERROR.getCode(), "参数错误");
+        }
+        List<Integer> allowStatus = Arrays.asList(AdMuseTaskStatusEnum.VERIFY_SUCCESS.getStatus(), AdMuseTaskStatusEnum.VERIFY_FAIL.getStatus());
+        if (!allowStatus.contains(adMuseImageParam.getStatus())) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAM_ERROR.getCode(), "参数错误,状态无效");
+        }
+        AdMuseTask adMuseTask = adMuseTaskMapper.selectByPrimaryKey(adMuseImageParam.getId());
+        if (adMuseTask == null) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAM_ERROR.getCode(), "参数错误,数据不存在");
+        }
+        if (!Objects.equals(adMuseTask.getStatus(), AdMuseTaskStatusEnum.CREATE_SUCCESS.getStatus())) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAM_ERROR.getCode(), "该状态不允许审核");
+        }
+        adMuseTask.setStatus(adMuseImageParam.getStatus());
+        adMuseTaskMapper.updateByPrimaryKeySelective(adMuseTask);
+        if (AdMuseTaskStatusEnum.VERIFY_SUCCESS.getStatus().equals(adMuseImageParam.getStatus())) {
+            AdVideo adVideo = adVideoMapper.selectByPrimaryKey(adMuseTask.getAdVideoId());
+            AdGroup adGroup = adGroupMapper.selectByPrimaryKey(adVideo.getAdGroupId());
+            String accountId = adGroup.getAccountId();
+            String accessToken = accountService.getAccessToken(accountId);
+            String url = StringUtils.isEmpty(adMuseTask.getFinalUrl()) ? adMuseTask.getStitchUrl() : adMuseTask.getFinalUrl();
+            Long mediaId = uploadImage(accountId, accessToken, url, adMuseTask.getMuseMaterialId());
+            if (mediaId != null) {
+                adMuseTask.setMediaId(mediaId);
+                adMuseTask.setStatus(AdMuseTaskStatusEnum.UPLOAD_SUCCESS.getStatus());
+                adMuseTaskMapper.updateByPrimaryKeySelective(adMuseTask);
+                AdVideo updateAdVideo = new AdVideo();
+                updateAdVideo.setId(adVideo.getId());
+                updateAdVideo.setStatus(AdVideoStatusEnum.MUSE_UPLOAD_SUCCESS.getStatus());
+                adVideoMapper.updateByPrimaryKeySelective(updateAdVideo);
+            } else {
+                adMuseTask.setStatus(AdMuseTaskStatusEnum.UPLOAD_FAIL.getStatus());
+                adMuseTaskMapper.updateByPrimaryKeySelective(adMuseTask);
+            }
+        }
+        return CommonResponse.success();
+    }
+
+    public Long uploadImage(String accountId, String accessToken, String imageUrl, Long museMaterialId) {
+        try {
+            long timestamp = System.currentTimeMillis() / 1000;
+            String url = String.format("https://api.e.qq.com/v3.0/muse_ai_ugc/add?access_token=%s&timestamp=%s&nonce=%s",
+                    accessToken, timestamp, timestamp);
+            JSONObject param = new JSONObject();
+            param.put("account_id", accountId);
+            param.put("muse_material_id", museMaterialId);
+            param.put("media_base64_str", ImageUtils.imageUrlToBase64(imageUrl));
+            String res = httpPoolClient.post(url, param.toJSONString());
+            JSONObject jsonObject = JSONObject.parseObject(res);
+            if (jsonObject != null && jsonObject.getInteger("code") == 0) {
+                JSONObject data = jsonObject.getJSONObject("data");
+                return data.getLong("media_id");
+            }
+        } catch (Exception e) {
+            log.error("uploadImage error", e);
+        }
+        return null;
+    }
+
+
+}

+ 141 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/impl/AdVideoImageServiceImpl.java

@@ -0,0 +1,141 @@
+package com.tzld.piaoquan.tencentad.service.impl;
+
+import com.tzld.piaoquan.tencentad.common.base.CommonResponse;
+import com.tzld.piaoquan.tencentad.common.base.ExceptionCodeEnum;
+import com.tzld.piaoquan.tencentad.common.enums.AdMuseTaskStatusEnum;
+import com.tzld.piaoquan.tencentad.common.enums.AdVideoImageStatusEnum;
+import com.tzld.piaoquan.tencentad.common.enums.SimilarityCodeEnum;
+import com.tzld.piaoquan.tencentad.dao.mapper.AdVideoImageMapper;
+import com.tzld.piaoquan.tencentad.model.po.AdMuseTask;
+import com.tzld.piaoquan.tencentad.model.po.AdVideoImage;
+import com.tzld.piaoquan.tencentad.model.po.AdVideoImageExample;
+import com.tzld.piaoquan.tencentad.model.vo.AdVideoImageParam;
+import com.tzld.piaoquan.tencentad.model.vo.AdVideoImageVo;
+import com.tzld.piaoquan.tencentad.model.vo.AdVideoParam;
+import com.tzld.piaoquan.tencentad.service.AdMuseTaskService;
+import com.tzld.piaoquan.tencentad.service.AdVideoImageService;
+import com.tzld.piaoquan.tencentad.service.TencentService;
+import com.tzld.piaoquan.tencentad.utils.DateUtils;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+import static com.tzld.piaoquan.tencentad.common.base.ExceptionCodeEnum.PARAM_ERROR;
+
+@Slf4j
+@Service
+public class AdVideoImageServiceImpl implements AdVideoImageService {
+
+    @Autowired
+    private AdVideoImageMapper adVideoImageMapper;
+
+    @Autowired
+    private TencentService tencentService;
+
+    @Autowired
+    private AdMuseTaskService adMuseTaskService;
+
+    @Override
+    public boolean addAdVideoImage(Long adVideoId, String url) {
+        try {
+            AdVideoImage adVideoImage = new AdVideoImage();
+            adVideoImage.setAdVideoId(adVideoId);
+            adVideoImage.setImageUrl(url);
+            adVideoImageMapper.insertSelective(adVideoImage);
+            return true;
+        } catch (Exception e) {
+            log.error("addAdVideoImage error {}", e.getMessage());
+        }
+        return false;
+    }
+
+    @Override
+    public CommonResponse<List<AdVideoImageVo>> getAdVideoImageVoList(Long adVideoId) {
+        AdVideoImageExample example = new AdVideoImageExample();
+        example.createCriteria().andAdVideoIdEqualTo(adVideoId).andIsDeleteEqualTo(0);
+        List<AdVideoImage> adVideoImages = adVideoImageMapper.selectByExample(example);
+        List<AdVideoImageVo> adVideoImageVos = new ArrayList<>();
+        for (AdVideoImage adVideoImage : adVideoImages) {
+            AdVideoImageVo adVideoImageVo = new AdVideoImageVo();
+            BeanUtils.copyProperties(adVideoImage, adVideoImageVo);
+            if (adVideoImage.getSimilarity() != null) {
+                SimilarityCodeEnum similarityCodeEnum = SimilarityCodeEnum.getByCode(adVideoImage.getSimilarity());
+                if (similarityCodeEnum != null) {
+                    adVideoImageVo.setSimilarityName(similarityCodeEnum.getDesc());
+                }
+            }
+            AdVideoImageStatusEnum adVideoImageStatusEnum = AdVideoImageStatusEnum.getByStatus(adVideoImage.getStatus());
+            if (adVideoImageStatusEnum != null) {
+                adVideoImageVo.setStatusName(adVideoImageStatusEnum.getDesc());
+            }
+            adVideoImageVo.setCreateTime(DateUtils.getDateString(adVideoImage.getCreateTime().getTime(), "yyyy-MM-dd HH:mm:ss"));
+            adVideoImageVo.setUpdateTime(DateUtils.getDateString(adVideoImage.getUpdateTime().getTime(), "yyyy-MM-dd HH:mm:ss"));
+            adVideoImageVos.add(adVideoImageVo);
+        }
+        return CommonResponse.success(adVideoImageVos);
+    }
+
+    @Override
+    public List<AdVideoImage> getAdVideoImageList(Long adVideoId, Integer status) {
+        AdVideoImageExample example = new AdVideoImageExample();
+        example.createCriteria().andAdVideoIdEqualTo(adVideoId).andStatusEqualTo(status)
+                .andIsDeleteEqualTo(0);
+        return adVideoImageMapper.selectByExample(example);
+    }
+
+    public CommonResponse<Void> updateAdVideoImage(AdVideoImageParam adVideoImageParam) {
+        if (adVideoImageParam == null || adVideoImageParam.getId() == null) {
+            return CommonResponse.create(PARAM_ERROR.getCode(), PARAM_ERROR.getMsg());
+        }
+        AdVideoImage updateAdVideoImage = new AdVideoImage();
+        updateAdVideoImage.setId(adVideoImageParam.getId());
+        updateAdVideoImage.setStatus(adVideoImageParam.getStatus());
+        updateAdVideoImage.setSimilarity(adVideoImageParam.getSimilarity());
+        updateAdVideoImage.setDimensionSize(adVideoImageParam.getDimensionSize());
+        updateAdVideoImage.setText2imgDesc(adVideoImageParam.getText2imgDesc());
+        int update = adVideoImageMapper.updateByPrimaryKeySelective(updateAdVideoImage);
+        if (update > 0) {
+            return CommonResponse.success();
+        } else {
+            return CommonResponse.create(ExceptionCodeEnum.SYS_ERROR.getCode(), "修改失败");
+        }
+    }
+
+    //上传图片到腾讯
+    public boolean uploadImageToTencent(String account, String accessToken, Long adVideoId) {
+        List<AdVideoImage> videoImageList = getAdVideoImageList(adVideoId, AdVideoImageStatusEnum.VERIFY_SUCCESS.getStatus());
+        if (CollectionUtils.isEmpty(videoImageList)) {
+            return false;
+        }
+        boolean flag = false;
+        for (AdVideoImage adVideoImage : videoImageList) {
+            String imageId = tencentService.uploadImage(account, accessToken, adVideoImage.getImageUrl());
+            if (StringUtils.isNotEmpty(imageId)) {
+                adVideoImage.setTencentImageId(imageId);
+                adVideoImage.setStatus(AdVideoImageStatusEnum.UPLOAD_SUCCESS.getStatus());
+                adVideoImageMapper.updateByPrimaryKeySelective(adVideoImage);
+                adMuseTaskService.addMuseTask(account, accessToken, adVideoImage);
+                flag = true;
+            } else {
+                adVideoImage.setStatus(AdVideoImageStatusEnum.UPLOAD_FAIL.getStatus());
+                adVideoImageMapper.updateByPrimaryKeySelective(adVideoImage);
+            }
+        }
+        return flag;
+    }
+
+    public long selectCount(Long adVideoId, Integer status) {
+        AdVideoImageExample example = new AdVideoImageExample();
+        example.createCriteria().andAdVideoIdEqualTo(adVideoId).andStatusEqualTo(status);
+        return adVideoImageMapper.countByExample(example);
+    }
+
+
+}

+ 280 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/impl/AdVideoServiceImpl.java

@@ -0,0 +1,280 @@
+package com.tzld.piaoquan.tencentad.service.impl;
+
+import com.tzld.piaoquan.tencentad.common.base.CommonResponse;
+import com.tzld.piaoquan.tencentad.common.base.ExceptionCodeEnum;
+import com.tzld.piaoquan.tencentad.common.enums.AdMuseTaskStatusEnum;
+import com.tzld.piaoquan.tencentad.common.enums.AdVideoImageStatusEnum;
+import com.tzld.piaoquan.tencentad.common.enums.AdVideoStatusEnum;
+import com.tzld.piaoquan.tencentad.dao.mapper.AdVideoMapper;
+import com.tzld.piaoquan.tencentad.model.po.*;
+import com.tzld.piaoquan.tencentad.model.vo.AdCreativeParam;
+import com.tzld.piaoquan.tencentad.model.vo.AdVideoParam;
+import com.tzld.piaoquan.tencentad.model.vo.AdVideoVo;
+import com.tzld.piaoquan.tencentad.service.*;
+import com.tzld.piaoquan.tencentad.utils.DateUtils;
+import com.tzld.piaoquan.tencentad.utils.FfmpegUtil;
+import com.tzld.piaoquan.tencentad.utils.OSSUploader;
+import com.tzld.piaoquan.tencentad.utils.page.Page;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.*;
+import java.nio.file.attribute.BasicFileAttributes;
+import java.util.*;
+import java.util.stream.Collectors;
+
+@Slf4j
+@Service
+public class AdVideoServiceImpl implements AdVideoService {
+
+    @Value("${image_path}")
+    private String imagePath;
+
+    @Autowired
+    private AdVideoImageService adVideoImageService;
+
+    @Autowired
+    private AdMuseTaskService adMuseTaskService;
+
+    @Autowired
+    private AdVideoMapper adVideoMapper;
+
+    @Autowired
+    private AdAccountService accountService;
+
+    @Autowired
+    private AdGroupService adGroupService;
+
+    @Autowired
+    private AdCreativeService adCreativeService;
+
+
+    @Override
+    public CommonResponse<Page<AdVideoVo>> getAdVideoList(Integer pageNum, Integer pageSize) {
+        Page<AdVideoVo> page = new Page<>();
+        page.setCurrentPage(pageNum);
+        page.setPageSize(pageSize);
+        AdVideoExample example = new AdVideoExample();
+        example.createCriteria().andStatusNotEqualTo(0);
+        example.setOrderByClause("create_time desc");
+        example.setPage(page);
+        List<AdVideo> adVideos = adVideoMapper.selectByExample(example);
+        if (CollectionUtils.isEmpty(adVideos)) {
+            return CommonResponse.success(page);
+        }
+        List<AdVideoVo> adVideoVos = new ArrayList<>();
+        for (AdVideo adVideo : adVideos) {
+            AdVideoVo adVideoVo = new AdVideoVo();
+            BeanUtils.copyProperties(adVideo, adVideoVo);
+            AdVideoStatusEnum adVideoStatusEnum = AdVideoStatusEnum.getByStatus(adVideo.getStatus());
+            if (adVideoStatusEnum != null) {
+                adVideoVo.setStatusName(adVideoStatusEnum.getDesc());
+            }
+            adVideoVo.setCreateTime(DateUtils.getDateString(adVideo.getCreateTime().getTime(), "yyyy-MM-dd HH:mm:ss"));
+            adVideoVo.setUpdateTime(DateUtils.getDateString(adVideo.getUpdateTime().getTime(), "yyyy-MM-dd HH:mm:ss"));
+            adVideoVos.add(adVideoVo);
+        }
+        page.setObjs(adVideoVos);
+        return CommonResponse.success(page);
+    }
+
+    public CommonResponse<Void> createAdCreative(AdCreativeParam adCreativeParam) {
+        if (adCreativeParam == null || adCreativeParam.getAdVideoId() == null) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAM_ERROR.getCode(), "参数错误");
+        }
+        AdVideo adVideo = adVideoMapper.selectByPrimaryKey(adCreativeParam.getAdVideoId());
+        if (adVideo == null) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAM_ERROR.getCode(), "参数错误,adVideoId不存在");
+        }
+        if (!Objects.equals(adVideo.getStatus(), AdVideoStatusEnum.MUSE_UPLOAD_SUCCESS.getStatus())) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAM_ERROR.getCode(), "参数错误,当前状态不允许创建创意");
+        }
+        List<AdMuseTask> adMuseTask;
+        if (CollectionUtils.isEmpty(adCreativeParam.getAdMuseTaskIds())) {
+            adMuseTask = adMuseTaskService.getAdMuseTask(adCreativeParam.getAdVideoId(),
+                    AdMuseTaskStatusEnum.UPLOAD_SUCCESS.getStatus());
+        } else {
+            adMuseTask = adMuseTaskService.getAdMuseTask(adCreativeParam.getAdVideoId(),
+                    AdMuseTaskStatusEnum.UPLOAD_SUCCESS.getStatus(), adCreativeParam.getAdMuseTaskIds());
+        }
+        if (CollectionUtils.isEmpty(adMuseTask)) {
+            return CommonResponse.create(ExceptionCodeEnum.SYS_ERROR.getCode(), "系统错误,当前没有可以创建创意的素材");
+        }
+        List<Long> mediaIds = adMuseTask.stream().map(AdMuseTask::getMediaId).collect(Collectors.toList());
+        AdGroup adGroup = adGroupService.getAdGroupById(adVideo.getAdGroupId());
+        if (adGroup == null) {
+            return CommonResponse.create(ExceptionCodeEnum.SYS_ERROR.getCode(), "系统错误,当前广告组不存在");
+        }
+        boolean res = adCreativeService.addAdCreative(adVideo, mediaIds, adGroup.getAdgroupId(), adGroup.getAccountId());
+        if (res) {
+            return CommonResponse.success();
+        } else {
+            return CommonResponse.create(ExceptionCodeEnum.SYS_ERROR.getCode(), "系统异常,创建失败");
+        }
+    }
+
+
+    //抽取图片
+    public void buildVideoImage(AdVideo adVideo) {
+        String imageFolder = imagePath + "/" + UUID.randomUUID();
+        File dir = new File(imageFolder);
+        if (!dir.exists()) {
+            boolean mkdir = dir.mkdir();
+            if (!mkdir) {
+                return;
+            }
+        }
+        String imagePath = imageFolder + "/" + "%04d.jpg";
+        FfmpegUtil.getTargetThumbnail(adVideo.getVideoPath(), imagePath);
+        File[] fileList = dir.listFiles();
+        if (fileList == null) {
+            return;
+        }
+        int sum = 0;
+        for (File file : fileList) {
+            String imageUrl = OSSUploader.uploadToOSS(file.getPath());
+            if (StringUtils.isEmpty(imageUrl)) {
+                continue;
+            }
+            boolean addTag = adVideoImageService.addAdVideoImage(adVideo.getId(), imageUrl);
+            if (addTag) {
+                sum++;
+            }
+        }
+        if (sum > 0) {
+            updateAdVideoStatus(adVideo.getId(), AdVideoStatusEnum.CROP_SUCCESS.getStatus());
+        } else {
+            updateAdVideoRetry(adVideo);
+            if (adVideo.getRetryCount() >= 2) {
+                updateAdVideoStatus(adVideo.getId(), AdVideoStatusEnum.CROP_FAIL.getStatus());
+            }
+        }
+        Path pathToDelete = Paths.get(imageFolder);
+        try {
+            // 使用 Files.walkFileTree 删除文件夹及其内容
+            Files.walkFileTree(pathToDelete, new SimpleFileVisitor<Path>() {
+                @Override
+                public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
+                    Files.delete(file); // 删除文件
+                    return FileVisitResult.CONTINUE;
+                }
+
+                @Override
+                public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {
+                    Files.delete(dir); // 删除空目录
+                    return FileVisitResult.CONTINUE;
+                }
+            });
+        } catch (IOException e) {
+            log.error("del imageFolder error {}", e.getMessage());
+        }
+    }
+
+    @Override
+    public CommonResponse<Void> verifyAdVideo(AdVideoParam adVideoParam) {
+        if (adVideoParam == null || adVideoParam.getId() == null || adVideoParam.getStatus() == null) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAM_ERROR.getCode(), "参数错误");
+        }
+        List<Integer> allowStatus =
+                Arrays.asList(AdVideoStatusEnum.VERIFY_SUCCESS.getStatus(), AdVideoStatusEnum.VERIFY_FAIL.getStatus());
+        if (!allowStatus.contains(adVideoParam.getStatus())) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAM_ERROR.getCode(), "参数错误");
+        }
+        AdVideo adVideo = adVideoMapper.selectByPrimaryKey(adVideoParam.getId());
+        if (adVideo == null) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAM_ERROR.getCode(), "参数错误,该视频不存在");
+        }
+        if (!Objects.equals(adVideo.getStatus(), AdVideoStatusEnum.CROP_SUCCESS.getStatus())) {
+            return CommonResponse.create(ExceptionCodeEnum.SYS_ERROR.getCode(), "该状态不允许修改审核状态");
+        }
+        updateAdVideoStatus(adVideoParam.getId(), adVideoParam.getStatus());
+        if (Objects.equals(adVideoParam.getStatus(), AdVideoStatusEnum.VERIFY_SUCCESS.getStatus())) {
+            //可以改成异步操作
+            uploadImageToTencent(adVideo);
+
+        }
+        return CommonResponse.success();
+    }
+
+    private void uploadImageToTencent(AdVideo adVideo) {
+        AdGroup adGroup = adGroupService.getAdGroupById(adVideo.getAdGroupId());
+        if (adGroup == null) {
+            return;
+        }
+        String accessToken = accountService.getAccessToken(adGroup.getAccountId());
+        if (accessToken == null) {
+            return;
+        }
+        Long adVideoId = adVideo.getId();
+        boolean res = adVideoImageService.uploadImageToTencent(adGroup.getAccountId(), accessToken, adVideoId);
+        if (res) {
+            updateAdVideoStatus(adVideoId, AdVideoStatusEnum.UPLOAD_SUCCESS.getStatus());
+        } else {
+            updateAdVideoStatus(adVideoId, AdVideoStatusEnum.UPLOAD_FAIL.getStatus());
+        }
+    }
+
+    @Override
+    public void refreshMuseTaskStatus() {
+        AdVideoExample example = new AdVideoExample();
+        example.createCriteria().andStatusEqualTo(AdVideoStatusEnum.UPLOAD_SUCCESS.getStatus());
+        List<AdVideo> adVideos = adVideoMapper.selectByExample(example);
+        for (AdVideo adVideo : adVideos) {
+            AdGroup adGroup = adGroupService.getAdGroupById(adVideo.getAdGroupId());
+            if (adGroup == null) {
+                continue;
+            }
+            String accessToken = accountService.getAccessToken(adGroup.getAccountId());
+            if (accessToken == null) {
+                continue;
+            }
+            long adVideoImageCount = adVideoImageService.selectCount(adVideo.getId(), AdVideoImageStatusEnum.UPLOAD_SUCCESS.getStatus());
+            long adMuseTaskCount = adMuseTaskService.selectCount(adVideo.getId(), new ArrayList<>());
+            if (adVideoImageCount > adMuseTaskCount) {
+                //TODO muse任务上传少
+            } else {
+                boolean flag = true;
+                List<AdMuseTask> adMuseTasks = adMuseTaskService.getAdMuseTask(adVideo.getId(), AdMuseTaskStatusEnum.DEFAULT.getStatus());
+                for (AdMuseTask adMuseTask : adMuseTasks) {
+                    boolean museTaskRes = adMuseTaskService.getMuseTaskRes(adGroup.getAccountId(), accessToken, adMuseTask, adVideo.getCaption());
+                    if (!museTaskRes) {
+                        flag = false;
+                    }
+                }
+                if (flag) {
+                    long successCount = adMuseTaskService.selectCount(adVideo.getId(),
+                            Collections.singletonList(AdMuseTaskStatusEnum.CREATE_SUCCESS.getStatus()));
+                    if (successCount > 0) {
+                        updateAdVideoStatus(adVideo.getId(), AdVideoStatusEnum.MUSE_SUCCESS.getStatus());
+                    } else {
+                        updateAdVideoStatus(adVideo.getId(), AdVideoStatusEnum.MUSE_FAIL.getStatus());
+                    }
+                }
+            }
+        }
+    }
+
+
+    private void updateAdVideoStatus(Long id, Integer status) {
+        AdVideo updateAdVideo = new AdVideo();
+        updateAdVideo.setId(id);
+        updateAdVideo.setStatus(status);
+        adVideoMapper.updateByPrimaryKeySelective(updateAdVideo);
+    }
+
+    private void updateAdVideoRetry(AdVideo adVideo) {
+        AdVideo updateAdVideo = new AdVideo();
+        updateAdVideo.setId(adVideo.getId());
+        updateAdVideo.setRetryCount(adVideo.getRetryCount() + 1);
+        adVideoMapper.updateByPrimaryKeySelective(updateAdVideo);
+    }
+
+
+}

+ 84 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/service/impl/TencentServiceImpl.java

@@ -0,0 +1,84 @@
+package com.tzld.piaoquan.tencentad.service.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.tzld.piaoquan.tencentad.component.HttpPoolClient;
+import com.tzld.piaoquan.tencentad.service.TencentService;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.codec.digest.DigestUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.io.*;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+@Slf4j
+@Service
+public class TencentServiceImpl implements TencentService {
+
+    @Autowired
+    private HttpPoolClient httpPoolClient;
+
+    public String uploadImage(String accountId, String accessToken, String imageUrl) {
+        String filePath = UUID.randomUUID() + ".jpg"; // 临时文件路径
+        Path path = Paths.get(filePath);
+
+        try {
+            // 下载图片
+            downloadImage(imageUrl, path);
+            // 计算文件的 MD5 值
+            String md5 = DigestUtils.md5Hex(Files.newInputStream(path));
+            // 准备上传请求
+            String uploadUrl = String.format("https://api.e.qq.com/v3.0/images/add?access_token=%s&timestamp=%s&nonce=%s",
+                    accessToken, System.currentTimeMillis() / 1000, UUID.randomUUID().toString().replaceAll("-", ""));
+            Map<String, String> param = new HashMap<>();
+            param.put("account_id", accountId);
+            param.put("upload_type", "UPLOAD_TYPE_FILE");
+            param.put("signature", md5); // 使用计算出的 MD5 值
+            // 上传文件
+            File file = path.toFile();
+            String res = httpPoolClient.post(uploadUrl, file, param);
+
+            JSONObject jsonObject = JSONObject.parseObject(res);
+            System.out.println(jsonObject);
+            if (jsonObject != null && jsonObject.getInteger("code") == 0) {
+                JSONObject data = jsonObject.getJSONObject("data");
+                return data.getString("image_id");
+            }
+            return null;
+        } catch (IOException e) {
+            log.error("uploadImage error", e);
+        } finally {
+            // 删除临时文件
+            try {
+                Files.deleteIfExists(path);
+            } catch (IOException e) {
+                log.error("Failed to delete temporary file", e);
+            }
+        }
+        return null;
+    }
+
+    private void downloadImage(String imageUrl, Path path) throws IOException {
+        HttpURLConnection httpUrl = (HttpURLConnection) new URL(imageUrl).openConnection();
+        httpUrl.connect();
+        try (InputStream inputStream = httpUrl.getInputStream();
+             OutputStream outputStream = Files.newOutputStream(path)) {
+            byte[] buffer = new byte[4096];
+            int bytesRead;
+            while ((bytesRead = inputStream.read(buffer)) != -1) {
+                outputStream.write(buffer, 0, bytesRead);
+            }
+        } finally {
+            httpUrl.disconnect();
+        }
+    }
+
+
+}

+ 26 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/utils/DateUtils.java

@@ -0,0 +1,26 @@
+package com.tzld.piaoquan.tencentad.utils;
+
+import java.time.Instant;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.ZoneId;
+import java.time.format.DateTimeFormatter;
+
+public class DateUtils {
+
+    public static String getDateString(Long timestamp, String pattern) {
+        // 创建日期时间格式化器
+        DateTimeFormatter dateFormat = DateTimeFormatter.ofPattern(pattern);
+        // 将时间戳转换为 LocalDateTime
+        ZoneId zone = ZoneId.of("Asia/Shanghai");
+        LocalDateTime dateTime = LocalDateTime.ofInstant(Instant.ofEpochMilli(timestamp), zone);
+        // 格式化日期时间并返回
+        return dateTime.format(dateFormat);
+    }
+
+    public static String getDayDateString(String pattern) {
+        DateTimeFormatter dateFormat = DateTimeFormatter.ofPattern(pattern);
+        LocalDate today = LocalDate.now();
+        return dateFormat.format(today);
+    }
+}

+ 55 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/utils/FfmpegUtil.java

@@ -0,0 +1,55 @@
+package com.tzld.piaoquan.tencentad.utils;
+
+import lombok.extern.slf4j.Slf4j;
+import ws.schild.jave.process.ProcessWrapper;
+import ws.schild.jave.process.ffmpeg.DefaultFFMPEGLocator;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+@Slf4j
+public class FfmpegUtil {
+
+    public static boolean getTargetThumbnail(String url, String targetPath) {
+        try {
+            try (ProcessWrapper ffmpeg = new DefaultFFMPEGLocator().createExecutor();) {
+                ffmpeg.addArgument("-i");
+                ffmpeg.addArgument(url);
+                ffmpeg.addArgument("-vf");
+                ffmpeg.addArgument("select='gt(scene\\,0.3)'");
+                ffmpeg.addArgument("-vsync");
+                ffmpeg.addArgument("vfr");
+                ffmpeg.addArgument(targetPath);
+                ffmpeg.execute();
+                try (BufferedReader br = new BufferedReader(new InputStreamReader(ffmpeg.getErrorStream()))) {
+                    blockFfmpeg(br);
+                }
+            }
+        } catch (IOException e) {
+            System.out.println(e.getMessage());
+            log.error("获取缩略图失败 url={}", url);
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * 等待命令执行成功,退出
+     *
+     * @param br
+     * @throws IOException
+     */
+    private static void blockFfmpeg(BufferedReader br) throws IOException {
+        String line;
+        // 该方法阻塞线程,直至合成成功
+        while ((line = br.readLine()) != null) {
+            doNothing(line);
+        }
+    }
+
+    private static void doNothing(String line) {
+        // FIXME: 2023/1/31 正式使用时注释掉此行,仅用于观察日志
+        System.out.println(line);
+    }
+}

+ 152 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/utils/ImageUtils.java

@@ -0,0 +1,152 @@
+package com.tzld.piaoquan.tencentad.utils;
+
+
+import com.tzld.piaoquan.tencentad.model.bo.ImageParam;
+import lombok.extern.slf4j.Slf4j;
+import sun.misc.BASE64Encoder;
+
+import javax.imageio.ImageIO;
+import java.awt.*;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+@Slf4j
+public class ImageUtils {
+
+    public static void main(String[] args) {
+        ImageParam imageParam = new ImageParam();
+        imageParam.setFont(new Font("微软雅黑", Font.PLAIN, 48));
+        imageParam.setColor(new Color(102, 102, 102));
+        imageParam.setText("这是一个非常长的字幕");
+        System.out.println(writeImageFromUrl("http://videomaker-30171.sz.gfp.tencent-cloud.com/381af314920e2d856f283ccf237eaec05917018d", "/Users/shimeng/Desktop/image_path/sss.jpg", imageParam));
+    }
+
+    public static String writeImageFromUrl(String srcImgUrl, String targetImgPath, ImageParam imageParam) {
+        try {
+            // 读取原图片信息
+            URL url = new URL(srcImgUrl); // 通过 URL 创建
+            Image srcImg = ImageIO.read(url); // 从 URL 读取图片
+            int imageWidth = srcImg.getWidth(null); // 获取图片的宽
+            int imageHeight = srcImg.getHeight(null); // 获取图片的高
+
+            // 创建一个新的图片,宽度和高度加上文字的高度
+            BufferedImage newImage = new BufferedImage(imageWidth, imageHeight, BufferedImage.TYPE_INT_RGB);
+            Graphics2D g2d = newImage.createGraphics();
+
+            // 绘制原始图片
+            g2d.drawImage(srcImg, 0, 0, null);
+
+            // 设置字体和颜色
+            g2d.setFont(new Font("Arial", Font.BOLD, 48)); // 字体和大小
+            g2d.setColor(Color.BLACK); // 字体颜色
+
+            // 计算文字的宽度和位置
+            FontMetrics fontMetrics = g2d.getFontMetrics();
+            int textWidth = fontMetrics.stringWidth(imageParam.getText());
+            int x = (imageWidth - textWidth) / 2; // 中间对齐
+            int y = imageHeight - 50; // 在图片下方添加文字
+
+            // 添加字幕
+            g2d.drawString(imageParam.getText(), x, y);
+            g2d.dispose();
+            ImageIO.write(newImage, "jpg", new File(targetImgPath));
+            String ossPath = OSSUploader.uploadToOSS(targetImgPath);
+            Files.delete(Paths.get(targetImgPath));
+            return ossPath;
+        } catch (Exception e) {
+            log.error("writeImageFromUrl error", e);
+        }
+        return null;
+    }
+
+
+    /**
+     * 图片URL转Base64编码
+     *
+     * @param imgUrl 图片URL
+     * @return Base64编码
+     */
+    public static String imageUrlToBase64(String imgUrl) {
+        URL url = null;
+        InputStream is = null;
+        ByteArrayOutputStream outStream = null;
+        HttpURLConnection httpUrl = null;
+
+        try {
+            url = new URL(imgUrl);
+            httpUrl = (HttpURLConnection) url.openConnection();
+            httpUrl.connect();
+            httpUrl.getInputStream();
+
+            is = httpUrl.getInputStream();
+            outStream = new ByteArrayOutputStream();
+
+            //创建一个Buffer字符串
+            byte[] buffer = new byte[1024];
+            //每次读取的字符串长度,如果为-1,代表全部读取完毕
+            int len = 0;
+            //使用输入流从buffer里把数据读取出来
+            while ((len = is.read(buffer)) != -1) {
+                //用输出流往buffer里写入数据,中间参数代表从哪个位置开始读,len代表读取的长度
+                outStream.write(buffer, 0, len);
+            }
+
+            // 对字节数组Base64编码
+            return encode(outStream.toByteArray());
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            try {
+                if (is != null) {
+                    is.close();
+                }
+                if (outStream != null) {
+                    outStream.close();
+                }
+                if (httpUrl != null) {
+                    httpUrl.disconnect();
+                }
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+
+        return null;
+    }
+
+    /**
+     * 图片转字符串
+     *
+     * @param image 图片Buffer
+     * @return Base64编码
+     */
+    public static String encode(byte[] image) {
+        BASE64Encoder decoder = new BASE64Encoder();
+        return replaceEnter(decoder.encode(image));
+    }
+
+    /**
+     * 字符替换
+     *
+     * @param str 字符串
+     * @return 替换后的字符串
+     */
+    public static String replaceEnter(String str) {
+        String reg = "[\n-\r]";
+        Pattern p = Pattern.compile(reg);
+        Matcher m = p.matcher(str);
+        return m.replaceAll("");
+    }
+
+}
+
+

+ 36 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/utils/OSSUploader.java

@@ -0,0 +1,36 @@
+package com.tzld.piaoquan.tencentad.utils;
+
+import com.aliyun.oss.OSS;
+import com.aliyun.oss.OSSClientBuilder;
+import com.aliyun.oss.model.PutObjectRequest;
+
+import java.io.File;
+import java.util.UUID;
+
+public class OSSUploader {
+
+    private static final String ACCESS_KEY_ID = "LTAIP6x1l3DXfSxm"; // 填写您的 Access Key ID
+    private static final String ACCESS_KEY_SECRET = "KbTaM9ars4OX3PMS6Xm7rtxGr1FLon"; // 填写您的 Access Key Secret
+    private static final String ENDPOINT = "oss-cn-hangzhou.aliyuncs.com"; // OSS 访问域名
+    private static final String BUCKET_NAME = "art-pubbucket"; // 存储空间名称
+
+    public static String uploadToOSS(String localVideoPath) {
+        String ossVideoKey = String.format("ad_video_image/%s", UUID.randomUUID());
+
+        // 创建 OSSClient 实例
+        OSS ossClient = new OSSClientBuilder().build(ENDPOINT, ACCESS_KEY_ID, ACCESS_KEY_SECRET);
+
+        try {
+            // 创建上传请求
+            PutObjectRequest putObjectRequest = new PutObjectRequest(BUCKET_NAME, ossVideoKey, new File(localVideoPath));
+            // 上传文件
+            ossClient.putObject(putObjectRequest);
+            return "http://rescdn.yishihui.com/" + ossVideoKey;
+        } catch (Exception e) {
+            return null;
+        } finally {
+            // 关闭 OSSClient
+            ossClient.shutdown();
+        }
+    }
+}

+ 108 - 0
tencent-ad-server/src/main/java/com/tzld/piaoquan/tencentad/utils/page/Page.java

@@ -0,0 +1,108 @@
+package com.tzld.piaoquan.tencentad.utils.page;
+
+import java.util.List;
+
+public class Page<T> {
+
+    public static final String DEFAULT_PAGE_SIZE = "20";
+    public static final String DEFAULT_CURRENT_PAGE = "1";
+
+    private int currentPage = Integer.valueOf(DEFAULT_CURRENT_PAGE);
+    private int totalSize;
+    private int pageSize = Integer.valueOf(DEFAULT_PAGE_SIZE);
+
+    private List<T> objs;
+
+    private T obj;
+
+    public Page() {
+    }
+
+    public Page(int currentPage) {
+        this.currentPage = currentPage;
+    }
+
+    public Page(int currentPage, int pageSize) {
+        setCurrentPage(currentPage);
+        setPageSize(pageSize);
+    }
+
+    public int getNextPage() {
+        return currentPage == getTotalPage() ? currentPage : currentPage + 1;
+    }
+
+    public int getPrePage() {
+        return currentPage > 1 ? currentPage - 1 : 1;
+    }
+
+    public int getOffset() {
+        return getCurPageFirstRecNum() - 1;
+    }
+
+    public int getCurPageFirstRecNum() {
+        return (getCurrentPage() - 1) * pageSize + 1;
+    }
+
+    public int getCurPageLastRecNum() {
+        return getCurrentPage() * pageSize;
+    }
+
+    public int getTotalPage() {
+        int t = totalSize % pageSize > 0 ? totalSize / pageSize + 1 : totalSize / pageSize;
+        if (t <= 0) {
+            t = 1;
+        }
+        return t;
+    }
+
+    public void setObjs(List<T> objs) {
+        this.objs = objs;
+    }
+
+    public List<T> getObjs() {
+        return objs;
+    }
+
+    public int getCurrentPage() {
+        return currentPage;
+    }
+
+    public void setCurrentPage(int currentPage) {
+        this.currentPage = currentPage;
+    }
+
+    public int getTotalSize() {
+        return totalSize;
+    }
+
+    public void setTotalSize(int totalSize) {
+        this.totalSize = totalSize;
+    }
+
+    public int getPageSize() {
+        return pageSize;
+    }
+
+    public void setPageSize(int pageSize) {
+        if (pageSize > 0) {
+            this.pageSize = pageSize;
+        }
+    }
+
+    public boolean containData() {
+        return getTotalSize() > 0;
+    }
+    @Override
+    public String toString() {
+        return "Page [currentPage=" + getCurrentPage() + ", totalSize=" + getTotalSize() + ", pageSize=" + getPageSize()
+                + "]";
+    }
+
+    public T getObj() {
+        return obj;
+    }
+
+    public void setObj(T obj) {
+        this.obj = obj;
+    }
+}

+ 10 - 0
tencent-ad-server/src/main/resources/application-prod.properties

@@ -0,0 +1,10 @@
+spring.datasource.username=crawler
+spring.datasource.password=crawler123456@
+spring.datasource.url=jdbc:mysql://rm-bp17q95335a99272b.mysql.rds.aliyuncs.com:3306/growth?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true
+
+spring.redis.host=r-bp1m4nvh130sfjjc6f.redis.rds.aliyuncs.com
+spring.redis.port=6379
+spring.redis.password=Qingqu2019
+
+xxl.job.admin.addresses=http://xxl-job-internal.piaoquantv.com/xxl-job-admin
+

+ 13 - 0
tencent-ad-server/src/main/resources/application-test.properties

@@ -0,0 +1,13 @@
+spring.datasource.username=crawler
+spring.datasource.password=crawler123456@
+spring.datasource.url=jdbc:mysql://rm-bp17q95335a99272b.mysql.rds.aliyuncs.com:3306/growth?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true
+
+spring.redis.host=r-bp1m4nvh130sfjjc6fpd.redis.rds.aliyuncs.com
+spring.redis.port=6379
+spring.redis.password=Qingqu2019
+
+image_path=/Users/shimeng/Desktop/image_path
+
+xxl.job.admin.addresses=http://xxl-job-internal.piaoquantv.com/xxl-job-admin
+
+

+ 33 - 0
tencent-ad-server/src/main/resources/application.properties

@@ -0,0 +1,33 @@
+server.port=8080
+spring.profiles.active=test
+spring.application.name=tencent-ad-server
+
+spring.datasource.driver-class-name=com.mysql.jdbc.Driver
+spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
+spring.datasource.initialSize=5
+spring.datasource.maxActive=20
+spring.datasource.maxWait=60000
+spring.datasource.timeBetweenEvictionRunsMillis=60000
+spring.datasource.minEvictableIdleTimeMillis=300000
+spring.datasource.validationQuery=SELECT 1 FROM DUAL
+spring.datasource.testWhileIdle=true
+spring.datasource.testOnBorrow=false
+spring.datasource.testOnReturn=false
+spring.datasource.poolPreparedStatements=true
+
+spring.redis.lettuce.pool.max-active=8
+spring.redis.lettuce.pool.max-wait=-1
+spring.redis.lettuce.pool.max-idle=8
+spring.redis.lettuce.pool.min-idle=0
+
+datalog=/datalog
+
+xxl.job.accessToken=
+xxl.job.executor.appname=${spring.application.name}
+xxl.job.executor.address=
+xxl.job.executor.ip=
+xxl.job.executor.port=9999
+xxl.job.executor.logpath=${datalog}/xxl-job/
+xxl.job.executor.logretentiondays=30
+
+

+ 0 - 0
tencent-ad-server/src/main/resources/ccc


+ 94 - 0
tencent-ad-server/src/main/resources/log4j2.xml

@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--Configuration后面的status,这个用于设置log4j2自身内部的信息输出,可以不设置,当设置成trace时,你会看到log4j2内部各种详细输出-->
+<!--monitorInterval:Log4j能够自动检测修改配置 文件和重新配置本身,设置间隔秒数-->
+<configuration monitorInterval="5">
+    <!--日志级别以及优先级排序: OFF > FATAL > ERROR > WARN > INFO > DEBUG > TRACE > ALL -->
+
+    <!--变量配置-->
+    <Properties>
+        <!-- 格式化输出:%date表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度 %msg:日志消息,%n是换行符-->
+        <!-- %logger{36} 表示 Logger 名字最长36个字符 -->
+        <property name="LOG_PATTERN" value="%date{HH:mm:ss.SSS} [%thread] %-5level %logger{36}  - %msg%n" />
+        <!-- 定义日志存储的路径,不要配置相对路径 -->
+        <property name="FILE_PATH" value="/datalog" />
+        <!--项目名称-->
+        <property name="FILE_NAME" value="tencent_ad_server" />
+    </Properties>
+
+    <appenders>
+
+        <console name="Console" target="SYSTEM_OUT">
+            <!--输出日志的格式-->
+            <PatternLayout pattern="${LOG_PATTERN}"/>
+            <!--控制台只输出level及其以上级别的信息(onMatch),其他的直接拒绝(onMismatch)-->
+            <ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
+        </console>
+
+
+        <!-- 这个会打印出所有的info及以下级别的信息,每次大小超过size,则这size大小的日志会自动存入按年份-月份建立的文件夹下面并进行压缩,作为存档-->
+        <RollingFile name="RollingFileInfo" fileName="${FILE_PATH}/${FILE_NAME}/info.log" filePattern="${FILE_PATH}/${FILE_NAME}-INFO-%d{yyyy-MM-dd}_%i.log.gz">
+            <!--控制台只输出level及以上级别的信息(onMatch),其他的直接拒绝(onMismatch)-->
+            <ThresholdFilter level="info" onMatch="ACCEPT" onMismatch="DENY"/>
+            <PatternLayout pattern="${LOG_PATTERN}"/>
+            <Policies>
+                <!--interval属性用来指定多久滚动一次,默认是1 hour-->
+                <TimeBasedTriggeringPolicy interval="1"/>
+                <SizeBasedTriggeringPolicy size="10MB"/>
+            </Policies>
+            <!-- DefaultRolloverStrategy属性如不设置,则默认为最多同一文件夹下7个文件开始覆盖-->
+            <DefaultRolloverStrategy max="15"/>
+        </RollingFile>
+
+        <!-- 这个会打印出所有的warn及以下级别的信息,每次大小超过size,则这size大小的日志会自动存入按年份-月份建立的文件夹下面并进行压缩,作为存档-->
+        <RollingFile name="RollingFileWarn" fileName="${FILE_PATH}/${FILE_NAME}/warn.log" filePattern="${FILE_PATH}/${FILE_NAME}-WARN-%d{yyyy-MM-dd}_%i.log.gz">
+            <!--控制台只输出level及以上级别的信息(onMatch),其他的直接拒绝(onMismatch)-->
+            <ThresholdFilter level="warn" onMatch="ACCEPT" onMismatch="DENY"/>
+            <PatternLayout pattern="${LOG_PATTERN}"/>
+            <Policies>
+                <!--interval属性用来指定多久滚动一次,默认是1 hour-->
+                <TimeBasedTriggeringPolicy interval="1"/>
+                <SizeBasedTriggeringPolicy size="10MB"/>
+            </Policies>
+            <!-- DefaultRolloverStrategy属性如不设置,则默认为最多同一文件夹下7个文件开始覆盖-->
+            <DefaultRolloverStrategy max="15"/>
+        </RollingFile>
+
+        <!-- 这个会打印出所有的error及以下级别的信息,每次大小超过size,则这size大小的日志会自动存入按年份-月份建立的文件夹下面并进行压缩,作为存档-->
+        <RollingFile name="RollingFileError" fileName="${FILE_PATH}/${FILE_NAME}/error.log" filePattern="${FILE_PATH}/${FILE_NAME}-ERROR-%d{yyyy-MM-dd}_%i.log.gz">
+            <!--控制台只输出level及以上级别的信息(onMatch),其他的直接拒绝(onMismatch)-->
+            <ThresholdFilter level="error" onMatch="ACCEPT" onMismatch="DENY"/>
+            <PatternLayout pattern="${LOG_PATTERN}"/>
+            <Policies>
+                <!--interval属性用来指定多久滚动一次,默认是1 hour-->
+                <TimeBasedTriggeringPolicy interval="1"/>
+                <SizeBasedTriggeringPolicy size="10MB"/>
+            </Policies>
+            <!-- DefaultRolloverStrategy属性如不设置,则默认为最多同一文件夹下7个文件开始覆盖-->
+            <DefaultRolloverStrategy max="15"/>
+        </RollingFile>
+
+    </appenders>
+
+    <!--Logger节点用来单独指定日志的形式,比如要为指定包下的class指定不同的日志级别等。-->
+    <!--然后定义loggers,只有定义了logger并引入的appender,appender才会生效-->
+    <loggers>
+
+        <!--过滤掉spring和mybatis的一些无用的DEBUG信息-->
+        <logger name="org.mybatis" level="info" additivity="false">
+            <AppenderRef ref="Console"/>
+        </logger>
+        <!--监控系统信息-->
+        <!--若是additivity设为false,则 子Logger 只会在自己的appender里输出,而不会在 父Logger 的appender里输出。-->
+        <Logger name="org.springframework" level="info" additivity="false">
+            <AppenderRef ref="Console"/>
+        </Logger>
+
+        <root level="info">
+            <appender-ref ref="Console"/>
+            <appender-ref ref="Filelog"/>
+            <appender-ref ref="RollingFileInfo"/>
+            <appender-ref ref="RollingFileWarn"/>
+            <appender-ref ref="RollingFileError"/>
+        </root>
+    </loggers>
+</configuration>

+ 261 - 0
tencent-ad-server/src/main/resources/mapper/AdCreativeMapper.xml

@@ -0,0 +1,261 @@
+<?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.tzld.piaoquan.tencentad.dao.mapper.AdCreativeMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.tencentad.model.po.AdCreative">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="ad_id" jdbcType="BIGINT" property="adId" />
+    <result column="ad_video_id" jdbcType="BIGINT" property="adVideoId" />
+    <result column="dynamic_creative_id" jdbcType="BIGINT" property="dynamicCreativeId" />
+    <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="is_delete" jdbcType="INTEGER" property="isDelete" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, ad_id, ad_video_id, dynamic_creative_id, `status`, is_delete, create_time, update_time
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.tencentad.model.po.AdCreativeExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from ad_creative
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    <if test="page != null">
+      limit #{page.offset} , #{page.pageSize}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from ad_creative
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from ad_creative
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.tencentad.model.po.AdCreativeExample">
+    delete from ad_creative
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.tencentad.model.po.AdCreative">
+    insert into ad_creative (id, ad_id, ad_video_id, 
+      dynamic_creative_id, `status`, is_delete, 
+      create_time, update_time)
+    values (#{id,jdbcType=BIGINT}, #{adId,jdbcType=BIGINT}, #{adVideoId,jdbcType=BIGINT}, 
+      #{dynamicCreativeId,jdbcType=BIGINT}, #{status,jdbcType=INTEGER}, #{isDelete,jdbcType=INTEGER}, 
+      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.tencentad.model.po.AdCreative">
+    insert into ad_creative
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="adId != null">
+        ad_id,
+      </if>
+      <if test="adVideoId != null">
+        ad_video_id,
+      </if>
+      <if test="dynamicCreativeId != null">
+        dynamic_creative_id,
+      </if>
+      <if test="status != null">
+        `status`,
+      </if>
+      <if test="isDelete != null">
+        is_delete,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="updateTime != null">
+        update_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=BIGINT},
+      </if>
+      <if test="adId != null">
+        #{adId,jdbcType=BIGINT},
+      </if>
+      <if test="adVideoId != null">
+        #{adVideoId,jdbcType=BIGINT},
+      </if>
+      <if test="dynamicCreativeId != null">
+        #{dynamicCreativeId,jdbcType=BIGINT},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=INTEGER},
+      </if>
+      <if test="isDelete != null">
+        #{isDelete,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.tzld.piaoquan.tencentad.model.po.AdCreativeExample" resultType="java.lang.Long">
+    select count(*) from ad_creative
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update ad_creative
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.adId != null">
+        ad_id = #{record.adId,jdbcType=BIGINT},
+      </if>
+      <if test="record.adVideoId != null">
+        ad_video_id = #{record.adVideoId,jdbcType=BIGINT},
+      </if>
+      <if test="record.dynamicCreativeId != null">
+        dynamic_creative_id = #{record.dynamicCreativeId,jdbcType=BIGINT},
+      </if>
+      <if test="record.status != null">
+        `status` = #{record.status,jdbcType=INTEGER},
+      </if>
+      <if test="record.isDelete != null">
+        is_delete = #{record.isDelete,jdbcType=INTEGER},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.updateTime != null">
+        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update ad_creative
+    set id = #{record.id,jdbcType=BIGINT},
+      ad_id = #{record.adId,jdbcType=BIGINT},
+      ad_video_id = #{record.adVideoId,jdbcType=BIGINT},
+      dynamic_creative_id = #{record.dynamicCreativeId,jdbcType=BIGINT},
+      `status` = #{record.status,jdbcType=INTEGER},
+      is_delete = #{record.isDelete,jdbcType=INTEGER},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      update_time = #{record.updateTime,jdbcType=TIMESTAMP}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.tencentad.model.po.AdCreative">
+    update ad_creative
+    <set>
+      <if test="adId != null">
+        ad_id = #{adId,jdbcType=BIGINT},
+      </if>
+      <if test="adVideoId != null">
+        ad_video_id = #{adVideoId,jdbcType=BIGINT},
+      </if>
+      <if test="dynamicCreativeId != null">
+        dynamic_creative_id = #{dynamicCreativeId,jdbcType=BIGINT},
+      </if>
+      <if test="status != null">
+        `status` = #{status,jdbcType=INTEGER},
+      </if>
+      <if test="isDelete != null">
+        is_delete = #{isDelete,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.tencentad.model.po.AdCreative">
+    update ad_creative
+    set ad_id = #{adId,jdbcType=BIGINT},
+      ad_video_id = #{adVideoId,jdbcType=BIGINT},
+      dynamic_creative_id = #{dynamicCreativeId,jdbcType=BIGINT},
+      `status` = #{status,jdbcType=INTEGER},
+      is_delete = #{isDelete,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_time = #{updateTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 246 - 0
tencent-ad-server/src/main/resources/mapper/AdGroupMapper.xml

@@ -0,0 +1,246 @@
+<?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.tzld.piaoquan.tencentad.dao.mapper.AdGroupMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.tencentad.model.po.AdGroup">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="account_id" jdbcType="VARCHAR" property="accountId" />
+    <result column="adgroup_id" jdbcType="BIGINT" property="adgroupId" />
+    <result column="adgroup_name" jdbcType="VARCHAR" property="adgroupName" />
+    <result column="is_delete" jdbcType="INTEGER" property="isDelete" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, account_id, adgroup_id, adgroup_name, is_delete, create_time, update_time
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.tencentad.model.po.AdGroupExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from ad_group
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    <if test="page != null">
+      limit #{page.offset} , #{page.pageSize}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from ad_group
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from ad_group
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.tencentad.model.po.AdGroupExample">
+    delete from ad_group
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.tencentad.model.po.AdGroup">
+    insert into ad_group (id, account_id, adgroup_id, 
+      adgroup_name, is_delete, create_time, 
+      update_time)
+    values (#{id,jdbcType=BIGINT}, #{accountId,jdbcType=VARCHAR}, #{adgroupId,jdbcType=BIGINT}, 
+      #{adgroupName,jdbcType=VARCHAR}, #{isDelete,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{updateTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.tencentad.model.po.AdGroup">
+    insert into ad_group
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="accountId != null">
+        account_id,
+      </if>
+      <if test="adgroupId != null">
+        adgroup_id,
+      </if>
+      <if test="adgroupName != null">
+        adgroup_name,
+      </if>
+      <if test="isDelete != null">
+        is_delete,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="updateTime != null">
+        update_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=BIGINT},
+      </if>
+      <if test="accountId != null">
+        #{accountId,jdbcType=VARCHAR},
+      </if>
+      <if test="adgroupId != null">
+        #{adgroupId,jdbcType=BIGINT},
+      </if>
+      <if test="adgroupName != null">
+        #{adgroupName,jdbcType=VARCHAR},
+      </if>
+      <if test="isDelete != null">
+        #{isDelete,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.tzld.piaoquan.tencentad.model.po.AdGroupExample" resultType="java.lang.Long">
+    select count(*) from ad_group
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update ad_group
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.accountId != null">
+        account_id = #{record.accountId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.adgroupId != null">
+        adgroup_id = #{record.adgroupId,jdbcType=BIGINT},
+      </if>
+      <if test="record.adgroupName != null">
+        adgroup_name = #{record.adgroupName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.isDelete != null">
+        is_delete = #{record.isDelete,jdbcType=INTEGER},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.updateTime != null">
+        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update ad_group
+    set id = #{record.id,jdbcType=BIGINT},
+      account_id = #{record.accountId,jdbcType=VARCHAR},
+      adgroup_id = #{record.adgroupId,jdbcType=BIGINT},
+      adgroup_name = #{record.adgroupName,jdbcType=VARCHAR},
+      is_delete = #{record.isDelete,jdbcType=INTEGER},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      update_time = #{record.updateTime,jdbcType=TIMESTAMP}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.tencentad.model.po.AdGroup">
+    update ad_group
+    <set>
+      <if test="accountId != null">
+        account_id = #{accountId,jdbcType=VARCHAR},
+      </if>
+      <if test="adgroupId != null">
+        adgroup_id = #{adgroupId,jdbcType=BIGINT},
+      </if>
+      <if test="adgroupName != null">
+        adgroup_name = #{adgroupName,jdbcType=VARCHAR},
+      </if>
+      <if test="isDelete != null">
+        is_delete = #{isDelete,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.tencentad.model.po.AdGroup">
+    update ad_group
+    set account_id = #{accountId,jdbcType=VARCHAR},
+      adgroup_id = #{adgroupId,jdbcType=BIGINT},
+      adgroup_name = #{adgroupName,jdbcType=VARCHAR},
+      is_delete = #{isDelete,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_time = #{updateTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 373 - 0
tencent-ad-server/src/main/resources/mapper/AdMuseTaskMapper.xml

@@ -0,0 +1,373 @@
+<?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.tzld.piaoquan.tencentad.dao.mapper.AdMuseTaskMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.tencentad.model.po.AdMuseTask">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="ad_video_id" jdbcType="BIGINT" property="adVideoId" />
+    <result column="ad_video_image_id" jdbcType="BIGINT" property="adVideoImageId" />
+    <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="task_id" jdbcType="BIGINT" property="taskId" />
+    <result column="task_type" jdbcType="VARCHAR" property="taskType" />
+    <result column="task_status" jdbcType="VARCHAR" property="taskStatus" />
+    <result column="muse_material_id" jdbcType="BIGINT" property="museMaterialId" />
+    <result column="muse_url" jdbcType="VARCHAR" property="museUrl" />
+    <result column="stitch_url" jdbcType="VARCHAR" property="stitchUrl" />
+    <result column="final_url" jdbcType="VARCHAR" property="finalUrl" />
+    <result column="media_id" jdbcType="BIGINT" property="mediaId" />
+    <result column="is_delete" jdbcType="INTEGER" property="isDelete" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, ad_video_id, ad_video_image_id, `status`, task_id, task_type, task_status, muse_material_id, 
+    muse_url, stitch_url, final_url, media_id, is_delete, create_time, update_time
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.tencentad.model.po.AdMuseTaskExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from ad_muse_task
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    <if test="page != null">
+      limit #{page.offset} , #{page.pageSize}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from ad_muse_task
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from ad_muse_task
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.tencentad.model.po.AdMuseTaskExample">
+    delete from ad_muse_task
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.tencentad.model.po.AdMuseTask">
+    insert into ad_muse_task (id, ad_video_id, ad_video_image_id, 
+      `status`, task_id, task_type, 
+      task_status, muse_material_id, muse_url, 
+      stitch_url, final_url, media_id, 
+      is_delete, create_time, update_time
+      )
+    values (#{id,jdbcType=BIGINT}, #{adVideoId,jdbcType=BIGINT}, #{adVideoImageId,jdbcType=BIGINT}, 
+      #{status,jdbcType=INTEGER}, #{taskId,jdbcType=BIGINT}, #{taskType,jdbcType=VARCHAR}, 
+      #{taskStatus,jdbcType=VARCHAR}, #{museMaterialId,jdbcType=BIGINT}, #{museUrl,jdbcType=VARCHAR}, 
+      #{stitchUrl,jdbcType=VARCHAR}, #{finalUrl,jdbcType=VARCHAR}, #{mediaId,jdbcType=BIGINT}, 
+      #{isDelete,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.tencentad.model.po.AdMuseTask">
+    insert into ad_muse_task
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="adVideoId != null">
+        ad_video_id,
+      </if>
+      <if test="adVideoImageId != null">
+        ad_video_image_id,
+      </if>
+      <if test="status != null">
+        `status`,
+      </if>
+      <if test="taskId != null">
+        task_id,
+      </if>
+      <if test="taskType != null">
+        task_type,
+      </if>
+      <if test="taskStatus != null">
+        task_status,
+      </if>
+      <if test="museMaterialId != null">
+        muse_material_id,
+      </if>
+      <if test="museUrl != null">
+        muse_url,
+      </if>
+      <if test="stitchUrl != null">
+        stitch_url,
+      </if>
+      <if test="finalUrl != null">
+        final_url,
+      </if>
+      <if test="mediaId != null">
+        media_id,
+      </if>
+      <if test="isDelete != null">
+        is_delete,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="updateTime != null">
+        update_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=BIGINT},
+      </if>
+      <if test="adVideoId != null">
+        #{adVideoId,jdbcType=BIGINT},
+      </if>
+      <if test="adVideoImageId != null">
+        #{adVideoImageId,jdbcType=BIGINT},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=INTEGER},
+      </if>
+      <if test="taskId != null">
+        #{taskId,jdbcType=BIGINT},
+      </if>
+      <if test="taskType != null">
+        #{taskType,jdbcType=VARCHAR},
+      </if>
+      <if test="taskStatus != null">
+        #{taskStatus,jdbcType=VARCHAR},
+      </if>
+      <if test="museMaterialId != null">
+        #{museMaterialId,jdbcType=BIGINT},
+      </if>
+      <if test="museUrl != null">
+        #{museUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="stitchUrl != null">
+        #{stitchUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="finalUrl != null">
+        #{finalUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="mediaId != null">
+        #{mediaId,jdbcType=BIGINT},
+      </if>
+      <if test="isDelete != null">
+        #{isDelete,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.tzld.piaoquan.tencentad.model.po.AdMuseTaskExample" resultType="java.lang.Long">
+    select count(*) from ad_muse_task
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update ad_muse_task
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.adVideoId != null">
+        ad_video_id = #{record.adVideoId,jdbcType=BIGINT},
+      </if>
+      <if test="record.adVideoImageId != null">
+        ad_video_image_id = #{record.adVideoImageId,jdbcType=BIGINT},
+      </if>
+      <if test="record.status != null">
+        `status` = #{record.status,jdbcType=INTEGER},
+      </if>
+      <if test="record.taskId != null">
+        task_id = #{record.taskId,jdbcType=BIGINT},
+      </if>
+      <if test="record.taskType != null">
+        task_type = #{record.taskType,jdbcType=VARCHAR},
+      </if>
+      <if test="record.taskStatus != null">
+        task_status = #{record.taskStatus,jdbcType=VARCHAR},
+      </if>
+      <if test="record.museMaterialId != null">
+        muse_material_id = #{record.museMaterialId,jdbcType=BIGINT},
+      </if>
+      <if test="record.museUrl != null">
+        muse_url = #{record.museUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="record.stitchUrl != null">
+        stitch_url = #{record.stitchUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="record.finalUrl != null">
+        final_url = #{record.finalUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="record.mediaId != null">
+        media_id = #{record.mediaId,jdbcType=BIGINT},
+      </if>
+      <if test="record.isDelete != null">
+        is_delete = #{record.isDelete,jdbcType=INTEGER},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.updateTime != null">
+        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update ad_muse_task
+    set id = #{record.id,jdbcType=BIGINT},
+      ad_video_id = #{record.adVideoId,jdbcType=BIGINT},
+      ad_video_image_id = #{record.adVideoImageId,jdbcType=BIGINT},
+      `status` = #{record.status,jdbcType=INTEGER},
+      task_id = #{record.taskId,jdbcType=BIGINT},
+      task_type = #{record.taskType,jdbcType=VARCHAR},
+      task_status = #{record.taskStatus,jdbcType=VARCHAR},
+      muse_material_id = #{record.museMaterialId,jdbcType=BIGINT},
+      muse_url = #{record.museUrl,jdbcType=VARCHAR},
+      stitch_url = #{record.stitchUrl,jdbcType=VARCHAR},
+      final_url = #{record.finalUrl,jdbcType=VARCHAR},
+      media_id = #{record.mediaId,jdbcType=BIGINT},
+      is_delete = #{record.isDelete,jdbcType=INTEGER},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      update_time = #{record.updateTime,jdbcType=TIMESTAMP}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.tencentad.model.po.AdMuseTask">
+    update ad_muse_task
+    <set>
+      <if test="adVideoId != null">
+        ad_video_id = #{adVideoId,jdbcType=BIGINT},
+      </if>
+      <if test="adVideoImageId != null">
+        ad_video_image_id = #{adVideoImageId,jdbcType=BIGINT},
+      </if>
+      <if test="status != null">
+        `status` = #{status,jdbcType=INTEGER},
+      </if>
+      <if test="taskId != null">
+        task_id = #{taskId,jdbcType=BIGINT},
+      </if>
+      <if test="taskType != null">
+        task_type = #{taskType,jdbcType=VARCHAR},
+      </if>
+      <if test="taskStatus != null">
+        task_status = #{taskStatus,jdbcType=VARCHAR},
+      </if>
+      <if test="museMaterialId != null">
+        muse_material_id = #{museMaterialId,jdbcType=BIGINT},
+      </if>
+      <if test="museUrl != null">
+        muse_url = #{museUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="stitchUrl != null">
+        stitch_url = #{stitchUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="finalUrl != null">
+        final_url = #{finalUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="mediaId != null">
+        media_id = #{mediaId,jdbcType=BIGINT},
+      </if>
+      <if test="isDelete != null">
+        is_delete = #{isDelete,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.tencentad.model.po.AdMuseTask">
+    update ad_muse_task
+    set ad_video_id = #{adVideoId,jdbcType=BIGINT},
+      ad_video_image_id = #{adVideoImageId,jdbcType=BIGINT},
+      `status` = #{status,jdbcType=INTEGER},
+      task_id = #{taskId,jdbcType=BIGINT},
+      task_type = #{taskType,jdbcType=VARCHAR},
+      task_status = #{taskStatus,jdbcType=VARCHAR},
+      muse_material_id = #{museMaterialId,jdbcType=BIGINT},
+      muse_url = #{museUrl,jdbcType=VARCHAR},
+      stitch_url = #{stitchUrl,jdbcType=VARCHAR},
+      final_url = #{finalUrl,jdbcType=VARCHAR},
+      media_id = #{mediaId,jdbcType=BIGINT},
+      is_delete = #{isDelete,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_time = #{updateTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 309 - 0
tencent-ad-server/src/main/resources/mapper/AdVideoImageMapper.xml

@@ -0,0 +1,309 @@
+<?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.tzld.piaoquan.tencentad.dao.mapper.AdVideoImageMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.tencentad.model.po.AdVideoImage">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="ad_video_id" jdbcType="BIGINT" property="adVideoId" />
+    <result column="image_url" jdbcType="VARCHAR" property="imageUrl" />
+    <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="tencent_image_id" jdbcType="VARCHAR" property="tencentImageId" />
+    <result column="similarity" jdbcType="INTEGER" property="similarity" />
+    <result column="dimension_size" jdbcType="VARCHAR" property="dimensionSize" />
+    <result column="text2img_desc" jdbcType="VARCHAR" property="text2imgDesc" />
+    <result column="is_delete" jdbcType="INTEGER" property="isDelete" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, ad_video_id, image_url, `status`, tencent_image_id, similarity, dimension_size, 
+    text2img_desc, is_delete, create_time, update_time
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.tencentad.model.po.AdVideoImageExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from ad_video_image
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    <if test="page != null">
+      limit #{page.offset} , #{page.pageSize}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from ad_video_image
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from ad_video_image
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.tencentad.model.po.AdVideoImageExample">
+    delete from ad_video_image
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.tencentad.model.po.AdVideoImage">
+    insert into ad_video_image (id, ad_video_id, image_url, 
+      `status`, tencent_image_id, similarity, 
+      dimension_size, text2img_desc, is_delete, 
+      create_time, update_time)
+    values (#{id,jdbcType=BIGINT}, #{adVideoId,jdbcType=BIGINT}, #{imageUrl,jdbcType=VARCHAR}, 
+      #{status,jdbcType=INTEGER}, #{tencentImageId,jdbcType=VARCHAR}, #{similarity,jdbcType=INTEGER}, 
+      #{dimensionSize,jdbcType=VARCHAR}, #{text2imgDesc,jdbcType=VARCHAR}, #{isDelete,jdbcType=INTEGER}, 
+      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.tencentad.model.po.AdVideoImage">
+    insert into ad_video_image
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="adVideoId != null">
+        ad_video_id,
+      </if>
+      <if test="imageUrl != null">
+        image_url,
+      </if>
+      <if test="status != null">
+        `status`,
+      </if>
+      <if test="tencentImageId != null">
+        tencent_image_id,
+      </if>
+      <if test="similarity != null">
+        similarity,
+      </if>
+      <if test="dimensionSize != null">
+        dimension_size,
+      </if>
+      <if test="text2imgDesc != null">
+        text2img_desc,
+      </if>
+      <if test="isDelete != null">
+        is_delete,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="updateTime != null">
+        update_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=BIGINT},
+      </if>
+      <if test="adVideoId != null">
+        #{adVideoId,jdbcType=BIGINT},
+      </if>
+      <if test="imageUrl != null">
+        #{imageUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=INTEGER},
+      </if>
+      <if test="tencentImageId != null">
+        #{tencentImageId,jdbcType=VARCHAR},
+      </if>
+      <if test="similarity != null">
+        #{similarity,jdbcType=INTEGER},
+      </if>
+      <if test="dimensionSize != null">
+        #{dimensionSize,jdbcType=VARCHAR},
+      </if>
+      <if test="text2imgDesc != null">
+        #{text2imgDesc,jdbcType=VARCHAR},
+      </if>
+      <if test="isDelete != null">
+        #{isDelete,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.tzld.piaoquan.tencentad.model.po.AdVideoImageExample" resultType="java.lang.Long">
+    select count(*) from ad_video_image
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update ad_video_image
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.adVideoId != null">
+        ad_video_id = #{record.adVideoId,jdbcType=BIGINT},
+      </if>
+      <if test="record.imageUrl != null">
+        image_url = #{record.imageUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="record.status != null">
+        `status` = #{record.status,jdbcType=INTEGER},
+      </if>
+      <if test="record.tencentImageId != null">
+        tencent_image_id = #{record.tencentImageId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.similarity != null">
+        similarity = #{record.similarity,jdbcType=INTEGER},
+      </if>
+      <if test="record.dimensionSize != null">
+        dimension_size = #{record.dimensionSize,jdbcType=VARCHAR},
+      </if>
+      <if test="record.text2imgDesc != null">
+        text2img_desc = #{record.text2imgDesc,jdbcType=VARCHAR},
+      </if>
+      <if test="record.isDelete != null">
+        is_delete = #{record.isDelete,jdbcType=INTEGER},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.updateTime != null">
+        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update ad_video_image
+    set id = #{record.id,jdbcType=BIGINT},
+      ad_video_id = #{record.adVideoId,jdbcType=BIGINT},
+      image_url = #{record.imageUrl,jdbcType=VARCHAR},
+      `status` = #{record.status,jdbcType=INTEGER},
+      tencent_image_id = #{record.tencentImageId,jdbcType=VARCHAR},
+      similarity = #{record.similarity,jdbcType=INTEGER},
+      dimension_size = #{record.dimensionSize,jdbcType=VARCHAR},
+      text2img_desc = #{record.text2imgDesc,jdbcType=VARCHAR},
+      is_delete = #{record.isDelete,jdbcType=INTEGER},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      update_time = #{record.updateTime,jdbcType=TIMESTAMP}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.tencentad.model.po.AdVideoImage">
+    update ad_video_image
+    <set>
+      <if test="adVideoId != null">
+        ad_video_id = #{adVideoId,jdbcType=BIGINT},
+      </if>
+      <if test="imageUrl != null">
+        image_url = #{imageUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        `status` = #{status,jdbcType=INTEGER},
+      </if>
+      <if test="tencentImageId != null">
+        tencent_image_id = #{tencentImageId,jdbcType=VARCHAR},
+      </if>
+      <if test="similarity != null">
+        similarity = #{similarity,jdbcType=INTEGER},
+      </if>
+      <if test="dimensionSize != null">
+        dimension_size = #{dimensionSize,jdbcType=VARCHAR},
+      </if>
+      <if test="text2imgDesc != null">
+        text2img_desc = #{text2imgDesc,jdbcType=VARCHAR},
+      </if>
+      <if test="isDelete != null">
+        is_delete = #{isDelete,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.tencentad.model.po.AdVideoImage">
+    update ad_video_image
+    set ad_video_id = #{adVideoId,jdbcType=BIGINT},
+      image_url = #{imageUrl,jdbcType=VARCHAR},
+      `status` = #{status,jdbcType=INTEGER},
+      tencent_image_id = #{tencentImageId,jdbcType=VARCHAR},
+      similarity = #{similarity,jdbcType=INTEGER},
+      dimension_size = #{dimensionSize,jdbcType=VARCHAR},
+      text2img_desc = #{text2imgDesc,jdbcType=VARCHAR},
+      is_delete = #{isDelete,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_time = #{updateTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 341 - 0
tencent-ad-server/src/main/resources/mapper/AdVideoMapper.xml

@@ -0,0 +1,341 @@
+<?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.tzld.piaoquan.tencentad.dao.mapper.AdVideoMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.tencentad.model.po.AdVideo">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="ad_group_id" jdbcType="BIGINT" property="adGroupId" />
+    <result column="video_id" jdbcType="BIGINT" property="videoId" />
+    <result column="video_path" jdbcType="VARCHAR" property="videoPath" />
+    <result column="video_cover" jdbcType="VARCHAR" property="videoCover" />
+    <result column="category" jdbcType="VARCHAR" property="category" />
+    <result column="copywriter" jdbcType="VARCHAR" property="copywriter" />
+    <result column="caption" jdbcType="VARCHAR" property="caption" />
+    <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="retry_count" jdbcType="INTEGER" property="retryCount" />
+    <result column="is_delete" jdbcType="INTEGER" property="isDelete" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, ad_group_id, video_id, video_path, video_cover, category, copywriter, caption, 
+    `status`, retry_count, is_delete, create_time, update_time
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.tencentad.model.po.AdVideoExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from ad_video
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    <if test="page != null">
+      limit #{page.offset} , #{page.pageSize}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from ad_video
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from ad_video
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.tencentad.model.po.AdVideoExample">
+    delete from ad_video
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.tencentad.model.po.AdVideo">
+    insert into ad_video (id, ad_group_id, video_id, 
+      video_path, video_cover, category, 
+      copywriter, caption, `status`, 
+      retry_count, is_delete, create_time, 
+      update_time)
+    values (#{id,jdbcType=BIGINT}, #{adGroupId,jdbcType=BIGINT}, #{videoId,jdbcType=BIGINT}, 
+      #{videoPath,jdbcType=VARCHAR}, #{videoCover,jdbcType=VARCHAR}, #{category,jdbcType=VARCHAR}, 
+      #{copywriter,jdbcType=VARCHAR}, #{caption,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, 
+      #{retryCount,jdbcType=INTEGER}, #{isDelete,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{updateTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.tencentad.model.po.AdVideo">
+    insert into ad_video
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="adGroupId != null">
+        ad_group_id,
+      </if>
+      <if test="videoId != null">
+        video_id,
+      </if>
+      <if test="videoPath != null">
+        video_path,
+      </if>
+      <if test="videoCover != null">
+        video_cover,
+      </if>
+      <if test="category != null">
+        category,
+      </if>
+      <if test="copywriter != null">
+        copywriter,
+      </if>
+      <if test="caption != null">
+        caption,
+      </if>
+      <if test="status != null">
+        `status`,
+      </if>
+      <if test="retryCount != null">
+        retry_count,
+      </if>
+      <if test="isDelete != null">
+        is_delete,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="updateTime != null">
+        update_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=BIGINT},
+      </if>
+      <if test="adGroupId != null">
+        #{adGroupId,jdbcType=BIGINT},
+      </if>
+      <if test="videoId != null">
+        #{videoId,jdbcType=BIGINT},
+      </if>
+      <if test="videoPath != null">
+        #{videoPath,jdbcType=VARCHAR},
+      </if>
+      <if test="videoCover != null">
+        #{videoCover,jdbcType=VARCHAR},
+      </if>
+      <if test="category != null">
+        #{category,jdbcType=VARCHAR},
+      </if>
+      <if test="copywriter != null">
+        #{copywriter,jdbcType=VARCHAR},
+      </if>
+      <if test="caption != null">
+        #{caption,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=INTEGER},
+      </if>
+      <if test="retryCount != null">
+        #{retryCount,jdbcType=INTEGER},
+      </if>
+      <if test="isDelete != null">
+        #{isDelete,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.tzld.piaoquan.tencentad.model.po.AdVideoExample" resultType="java.lang.Long">
+    select count(*) from ad_video
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update ad_video
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.adGroupId != null">
+        ad_group_id = #{record.adGroupId,jdbcType=BIGINT},
+      </if>
+      <if test="record.videoId != null">
+        video_id = #{record.videoId,jdbcType=BIGINT},
+      </if>
+      <if test="record.videoPath != null">
+        video_path = #{record.videoPath,jdbcType=VARCHAR},
+      </if>
+      <if test="record.videoCover != null">
+        video_cover = #{record.videoCover,jdbcType=VARCHAR},
+      </if>
+      <if test="record.category != null">
+        category = #{record.category,jdbcType=VARCHAR},
+      </if>
+      <if test="record.copywriter != null">
+        copywriter = #{record.copywriter,jdbcType=VARCHAR},
+      </if>
+      <if test="record.caption != null">
+        caption = #{record.caption,jdbcType=VARCHAR},
+      </if>
+      <if test="record.status != null">
+        `status` = #{record.status,jdbcType=INTEGER},
+      </if>
+      <if test="record.retryCount != null">
+        retry_count = #{record.retryCount,jdbcType=INTEGER},
+      </if>
+      <if test="record.isDelete != null">
+        is_delete = #{record.isDelete,jdbcType=INTEGER},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.updateTime != null">
+        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update ad_video
+    set id = #{record.id,jdbcType=BIGINT},
+      ad_group_id = #{record.adGroupId,jdbcType=BIGINT},
+      video_id = #{record.videoId,jdbcType=BIGINT},
+      video_path = #{record.videoPath,jdbcType=VARCHAR},
+      video_cover = #{record.videoCover,jdbcType=VARCHAR},
+      category = #{record.category,jdbcType=VARCHAR},
+      copywriter = #{record.copywriter,jdbcType=VARCHAR},
+      caption = #{record.caption,jdbcType=VARCHAR},
+      `status` = #{record.status,jdbcType=INTEGER},
+      retry_count = #{record.retryCount,jdbcType=INTEGER},
+      is_delete = #{record.isDelete,jdbcType=INTEGER},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      update_time = #{record.updateTime,jdbcType=TIMESTAMP}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.tencentad.model.po.AdVideo">
+    update ad_video
+    <set>
+      <if test="adGroupId != null">
+        ad_group_id = #{adGroupId,jdbcType=BIGINT},
+      </if>
+      <if test="videoId != null">
+        video_id = #{videoId,jdbcType=BIGINT},
+      </if>
+      <if test="videoPath != null">
+        video_path = #{videoPath,jdbcType=VARCHAR},
+      </if>
+      <if test="videoCover != null">
+        video_cover = #{videoCover,jdbcType=VARCHAR},
+      </if>
+      <if test="category != null">
+        category = #{category,jdbcType=VARCHAR},
+      </if>
+      <if test="copywriter != null">
+        copywriter = #{copywriter,jdbcType=VARCHAR},
+      </if>
+      <if test="caption != null">
+        caption = #{caption,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        `status` = #{status,jdbcType=INTEGER},
+      </if>
+      <if test="retryCount != null">
+        retry_count = #{retryCount,jdbcType=INTEGER},
+      </if>
+      <if test="isDelete != null">
+        is_delete = #{isDelete,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.tencentad.model.po.AdVideo">
+    update ad_video
+    set ad_group_id = #{adGroupId,jdbcType=BIGINT},
+      video_id = #{videoId,jdbcType=BIGINT},
+      video_path = #{videoPath,jdbcType=VARCHAR},
+      video_cover = #{videoCover,jdbcType=VARCHAR},
+      category = #{category,jdbcType=VARCHAR},
+      copywriter = #{copywriter,jdbcType=VARCHAR},
+      caption = #{caption,jdbcType=VARCHAR},
+      `status` = #{status,jdbcType=INTEGER},
+      retry_count = #{retryCount,jdbcType=INTEGER},
+      is_delete = #{isDelete,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_time = #{updateTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 13 - 0
tencent-ad-server/src/main/resources/mybatis-config.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-config.dtd">
+<configuration>
+    <properties>
+        <property name="dialect" value="mysql"/>
+    </properties>
+    <settings>
+        <!--<setting name="logImpl" value="LOG4J"/>-->
+        <setting name="mapUnderscoreToCamelCase" value="true" />
+        <!--<setting name="logImpl" value="STDOUT_LOGGING" />-->
+    </settings>
+</configuration>

+ 63 - 0
tencent-ad-server/src/main/resources/mybatis-generator-config.xml

@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE generatorConfiguration
+        PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
+        "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
+<!-- 配置生成器 -->
+<generatorConfiguration>
+    <context id="mysql" defaultModelType="flat">
+        <property name="autoDelimitKeywords" value="true"/>
+        <!-- 生成的Java文件的编码 -->
+        <property name="javaFileEncoding" value="UTF-8"/>
+        <!-- 格式化java代码 -->
+        <property name="javaFormatter" value="org.mybatis.generator.api.dom.DefaultJavaFormatter"/>
+        <!-- 格式化XML代码 -->
+        <property name="xmlFormatter" value="org.mybatis.generator.api.dom.DefaultXmlFormatter"/>
+        <!-- beginningDelimiter和endingDelimiter:指明数据库的用于标记数据库对象名的符号,比如ORACLE就是双引号,MYSQL默认是`反引号; -->
+        <property name="beginningDelimiter" value="`"/>
+        <property name="endingDelimiter" value="`"/>
+
+        <plugin type="org.mybatis.generator.plugins.ToStringPlugin"/>
+        <plugin type="org.mybatis.generator.plugins.UnmergeableXmlMappersPlugin"/>
+        <plugin type="com.tzld.piaoquan.tencentad.dao.generator.PaginationPlugin"/>
+
+        <commentGenerator>
+<!--            <property name="addRemarkComments" value="true"/>-->
+            <property name="suppressDate" value="true"/>
+            <property name="suppressAllComments" value="true"/>
+        </commentGenerator>
+
+        <jdbcConnection driverClass="com.mysql.jdbc.Driver"
+                        connectionURL="jdbc:mysql://rm-bp17q95335a99272b.mysql.rds.aliyuncs.com:3306/growth?useUnicode=true&amp;characterEncoding=utf-8&amp;zeroDateTimeBehavior=convertToNull&amp;useSSL=false"
+                        userId="crawler" password="crawler123456@">
+        </jdbcConnection>
+
+        <javaTypeResolver type="org.mybatis.generator.internal.types.JavaTypeResolverDefaultImpl">
+            <property name="forceBigDecimals" value="false"/>
+        </javaTypeResolver>
+
+        <javaModelGenerator targetPackage="com.tzld.piaoquan.tencentad.model.po" targetProject="/Users/shimeng/Desktop/project/tencent-ad-manage/tencent-ad-server/src/main/java">
+            <property name="constructorBased" value="false"/>
+            <property name="enableSubPackages" value="true"/>
+            <property name="immutable" value="false"/>
+        </javaModelGenerator>
+
+        <sqlMapGenerator targetPackage="mapper" targetProject="/Users/shimeng/Desktop/project/tencent-ad-manage/tencent-ad-server/src/main/resources">
+            <property name="enableSubPackages" value="true"/>
+        </sqlMapGenerator>
+
+        <javaClientGenerator targetPackage="com.tzld.piaoquan.tencentad.dao.mapper" type="XMLMAPPER"
+                             targetProject="/Users/shimeng/Desktop/project/tencent-ad-manage/tencent-ad-server/src/main/java">
+            <property name="enableSubPackages" value="true"/>
+        </javaClientGenerator>
+
+        <table tableName="ad_video" domainObjectName="AdVideo" alias=""/>
+        <table tableName="ad_video_image" domainObjectName="AdVideoImage" alias=""/>
+        <table tableName="ad_muse_task" domainObjectName="AdMuseTask" alias=""/>
+        <table tableName="ad_creative" domainObjectName="AdCreative" alias=""/>
+        <table tableName="ad_group" domainObjectName="AdGroup" alias=""/>
+
+
+
+    </context>
+
+</generatorConfiguration>