Ver Fonte

Merge branch 'dev-xym-update-common' of Server/growth-manager into master

xueyiming há 5 meses atrás
pai
commit
1f1406d8f8
100 ficheiros alterados com 8940 adições e 840 exclusões
  1. 6 0
      .idea/vcs.xml
  2. 26 2
      api-module/pom.xml
  3. 1 8
      api-module/src/main/java/com/tzld/piaoquan/api/GrowthServerApplication.java
  4. 36 0
      api-module/src/main/java/com/tzld/piaoquan/api/common/enums/GhTypeEnum.java
  5. 25 0
      api-module/src/main/java/com/tzld/piaoquan/api/common/enums/ReplyStrategyServiceEnum.java
  6. 40 0
      api-module/src/main/java/com/tzld/piaoquan/api/common/enums/SecretEnum.java
  7. 32 0
      api-module/src/main/java/com/tzld/piaoquan/api/common/enums/StrategyStatusEnum.java
  8. 76 0
      api-module/src/main/java/com/tzld/piaoquan/api/component/TouLiuHttpClient.java
  9. 8 10
      api-module/src/main/java/com/tzld/piaoquan/api/config/DataSourceConfig.java
  10. 73 0
      api-module/src/main/java/com/tzld/piaoquan/api/config/MqConfig.java
  11. 64 0
      api-module/src/main/java/com/tzld/piaoquan/api/controller/AccountDetailController.java
  12. 3 3
      api-module/src/main/java/com/tzld/piaoquan/api/controller/MessageController.java
  13. 124 0
      api-module/src/main/java/com/tzld/piaoquan/api/controller/TencentWeComController.java
  14. 46 0
      api-module/src/main/java/com/tzld/piaoquan/api/controller/ThirdPartyController.java
  15. 12 105
      api-module/src/main/java/com/tzld/piaoquan/api/controller/WeComController.java
  16. 39 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/AlgGhAutoreplyVideoRankDataMapper.java
  17. 33 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/CgiReplyBucketDataMapper.java
  18. 36 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/GhDetailMapper.java
  19. 36 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/NewPushMessageCallbackMapper.java
  20. 36 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/ReplyStaffMapper.java
  21. 0 37
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/UserMapper.java
  22. 156 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/bo/ArticleInfo.java
  23. 24 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/bo/BucketDataParam.java
  24. 27 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/bo/GroupData.java
  25. 20 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/bo/MiniData.java
  26. 27 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/bo/MsgData.java
  27. 18 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/bo/ReplyBucketData.java
  28. 13 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/bo/ReplyInfo.java
  29. 74 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/bo/SmallPageUrlDetail.java
  30. 115 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/AlgGhAutoreplyVideoRankData.java
  31. 910 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/AlgGhAutoreplyVideoRankDataExample.java
  32. 175 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/CgiReplyBucketData.java
  33. 1310 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/CgiReplyBucketDataExample.java
  34. 125 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/GhDetail.java
  35. 993 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/GhDetailExample.java
  36. 88 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/PushMessageCallback.java
  37. 640 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/PushMessageCallbackExample.java
  38. 65 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/ReplyStaff.java
  39. 580 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/ReplyStaffExample.java
  40. 9 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/AccessTokenParam.java
  41. 11 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/AccessTokenVo.java
  42. 21 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/CallbackParam.java
  43. 35 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/GhDetailVo.java
  44. 16 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/GhTypeVo.java
  45. 13 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/PushMessageParam.java
  46. 14 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/PushMessageVo.java
  47. 12 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/ReportUvVo.java
  48. 16 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/StrategyStatusVo.java
  49. 13 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/WeComPushMessageParam.java
  50. 14 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/WeComPushMessageVo.java
  51. 58 0
      api-module/src/main/java/com/tzld/piaoquan/api/mq/MessageCallbackCustomer.java
  52. 69 0
      api-module/src/main/java/com/tzld/piaoquan/api/mq/MessageCallbackProducer.java
  53. 0 7
      api-module/src/main/java/com/tzld/piaoquan/api/service/AccessTokenService.java
  54. 16 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/GhAccessTokenService.java
  55. 17 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/GhDetailService.java
  56. 0 15
      api-module/src/main/java/com/tzld/piaoquan/api/service/MessageAttachmentService.java
  57. 18 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/ThirdPartyService.java
  58. 0 16
      api-module/src/main/java/com/tzld/piaoquan/api/service/UserService.java
  59. 14 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/WeComService.java
  60. 87 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/impl/GhAccessTokenServiceImpl.java
  61. 144 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/impl/GhDetailServiceImpl.java
  62. 204 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/impl/ThirdPartyServiceImpl.java
  63. 140 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/impl/WeComServiceImpl.java
  64. 12 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/strategy/ReplyStrategyService.java
  65. 262 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/strategy/impl/ThirdPartyPushMessageStrategyV1.java
  66. 261 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/strategy/impl/WeComPushMessageStrategyV1.java
  67. 2 0
      api-module/src/main/resources/application-dev.properties
  68. 6 0
      api-module/src/main/resources/application-prod.properties
  69. 6 0
      api-module/src/main/resources/application-test.properties
  70. 8 1
      api-module/src/main/resources/application.properties
  71. 1 1
      api-module/src/main/resources/log4j2.xml
  72. 324 0
      api-module/src/main/resources/mapper/AlgGhAutoreplyVideoRankDataMapper.xml
  73. 401 0
      api-module/src/main/resources/mapper/CgiReplyBucketDataMapper.xml
  74. 131 103
      api-module/src/main/resources/mapper/GhDetailMapper.xml
  75. 278 0
      api-module/src/main/resources/mapper/NewPushMessageCallbackMapper.xml
  76. 60 78
      api-module/src/main/resources/mapper/ReplyStaffMapper.xml
  77. 0 419
      api-module/src/main/resources/mapper/UserMapper.xml
  78. 1 1
      api-module/src/main/resources/mybatis-generator-config.xml
  79. 13 0
      common-module/pom.xml
  80. 4 4
      common-module/src/main/java/com/tzld/piaoquan/growth/common/common/base/CommonResponse.java
  81. 2 2
      common-module/src/main/java/com/tzld/piaoquan/growth/common/common/constant/MessageConstant.java
  82. 1 1
      common-module/src/main/java/com/tzld/piaoquan/growth/common/common/constant/OtherServerURL.java
  83. 1 1
      common-module/src/main/java/com/tzld/piaoquan/growth/common/common/constant/RedisConstant.java
  84. 1 1
      common-module/src/main/java/com/tzld/piaoquan/growth/common/common/constant/ResponseConstant.java
  85. 1 1
      common-module/src/main/java/com/tzld/piaoquan/growth/common/common/constant/TimeConstant.java
  86. 1 1
      common-module/src/main/java/com/tzld/piaoquan/growth/common/common/constant/WeComConstant.java
  87. 1 1
      common-module/src/main/java/com/tzld/piaoquan/growth/common/common/constant/WeComServerConstant.java
  88. 1 1
      common-module/src/main/java/com/tzld/piaoquan/growth/common/common/enums/CorpEnum.java
  89. 3 3
      common-module/src/main/java/com/tzld/piaoquan/growth/common/common/enums/ExceptionCodeEnum.java
  90. 1 1
      common-module/src/main/java/com/tzld/piaoquan/growth/common/common/enums/MessageAttachmentTypeEnum.java
  91. 1 1
      common-module/src/main/java/com/tzld/piaoquan/growth/common/common/enums/SourceEnum.java
  92. 1 1
      common-module/src/main/java/com/tzld/piaoquan/growth/common/common/enums/TimeEnum.java
  93. 2 2
      common-module/src/main/java/com/tzld/piaoquan/growth/common/common/exception/CustomizeException.java
  94. 1 1
      common-module/src/main/java/com/tzld/piaoquan/growth/common/component/HttpPoolClient.java
  95. 70 0
      common-module/src/main/java/com/tzld/piaoquan/growth/common/component/ODPSManager.java
  96. 1 1
      common-module/src/main/java/com/tzld/piaoquan/growth/common/config/HttpClientConfig.java
  97. 13 1
      common-module/src/main/java/com/tzld/piaoquan/growth/common/config/RedisConfig.java
  98. 1 1
      common-module/src/main/java/com/tzld/piaoquan/growth/common/config/XxlJobConfig.java
  99. 7 5
      common-module/src/main/java/com/tzld/piaoquan/growth/common/dao/mapper/CorpMapper.java
  100. 7 4
      common-module/src/main/java/com/tzld/piaoquan/growth/common/dao/mapper/GuaranteesVideoMapper.java

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+  </component>
+</project>

+ 26 - 2
api-module/pom.xml

@@ -20,16 +20,40 @@
     <dependencies>
     <dependencies>
         <dependency>
         <dependency>
             <groupId>com.tzld.piaoquan</groupId>
             <groupId>com.tzld.piaoquan</groupId>
-            <artifactId>common-module</artifactId>
+            <artifactId>offline-module</artifactId>
             <version>1.0-SNAPSHOT</version>
             <version>1.0-SNAPSHOT</version>
             <scope>compile</scope>
             <scope>compile</scope>
         </dependency>
         </dependency>
         <dependency>
         <dependency>
             <groupId>com.tzld.piaoquan</groupId>
             <groupId>com.tzld.piaoquan</groupId>
-            <artifactId>offline-module</artifactId>
+            <artifactId>common-module</artifactId>
             <version>1.0-SNAPSHOT</version>
             <version>1.0-SNAPSHOT</version>
             <scope>compile</scope>
             <scope>compile</scope>
         </dependency>
         </dependency>
     </dependencies>
     </dependencies>
 
 
+    <build>
+        <!-- 固定包名 避免随着版本变动 -->
+        <finalName>growth-manager</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>
 </project>

+ 1 - 8
api-module/src/main/java/com/tzld/piaoquan/api/GrowthServerApplication.java

@@ -1,6 +1,5 @@
 package com.tzld.piaoquan.api;
 package com.tzld.piaoquan.api;
 
 
-import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.context.annotation.ComponentScan;
 import org.springframework.context.annotation.ComponentScan;
@@ -8,16 +7,10 @@ import org.springframework.context.annotation.ComponentScan;
 
 
 @SpringBootApplication
 @SpringBootApplication
 @ComponentScan({
 @ComponentScan({
-        "com.tzld.piaoquan.common.*",
+        "com.tzld.piaoquan.growth.common.*",
         "com.tzld.piaoquan.offline.*",
         "com.tzld.piaoquan.offline.*",
         "com.tzld.piaoquan.api.*"
         "com.tzld.piaoquan.api.*"
 })
 })
-@MapperScan({
-        "com.tzld.piaoquan.api.dao.mapper",
-        "com.tzld.piaoquan.offline.dao.mapper"
-})
-//@MapperScan("com.tzld.piaoquan.api.dao.mapper")
-//@MapperScan("com.tzld.piaoquan.offline.dao.mapper")
 public class GrowthServerApplication {
 public class GrowthServerApplication {
     public static void main(String[] args) {
     public static void main(String[] args) {
         SpringApplication.run(GrowthServerApplication.class, args);
         SpringApplication.run(GrowthServerApplication.class, args);

+ 36 - 0
api-module/src/main/java/com/tzld/piaoquan/api/common/enums/GhTypeEnum.java

@@ -0,0 +1,36 @@
+package com.tzld.piaoquan.api.common.enums;
+
+import java.util.Objects;
+
+public enum GhTypeEnum {
+
+    GH(1, "内部公众号"),
+    THIRD_PARTY_GH(2, "外部公众号"),
+    WE_COM(3, "企业微信");
+
+    GhTypeEnum(Integer type, String name) {
+        this.type = type;
+        this.name = name;
+    }
+
+    public final Integer type;
+
+    public final String name;
+
+
+    public static String getTypeName(Integer type) {
+        if (type == null) {
+            return null;
+        }
+        for (GhTypeEnum ghTypeEnum : GhTypeEnum.values()) {
+            if (Objects.equals(ghTypeEnum.type, type)) {
+                return ghTypeEnum.name;
+            }
+        }
+        return null;
+    }
+
+
+
+
+}

+ 25 - 0
api-module/src/main/java/com/tzld/piaoquan/api/common/enums/ReplyStrategyServiceEnum.java

@@ -0,0 +1,25 @@
+package com.tzld.piaoquan.api.common.enums;
+
+public enum ReplyStrategyServiceEnum {
+
+
+    THIRD_PARTY_PUSH_MESSAGE_STRATEGY_V1("THIRD_PARTY_PUSH_MESSAGE_STRATEGY_V1", "第三方微信公众号推送策略V1"),
+    WE_COM_PUSH_MESSAGE_STRATEGY_V1("WE_COM_PUSH_MESSAGE_STRATEGY_V1", "企业微信推送策略V1"),
+    ;
+
+    private final String key;
+    private final String desc;
+
+    ReplyStrategyServiceEnum(String key, String desc) {
+        this.key = key;
+        this.desc = desc;
+    }
+
+    public String getKey() {
+        return key;
+    }
+
+    public String getDesc() {
+        return desc;
+    }
+}

+ 40 - 0
api-module/src/main/java/com/tzld/piaoquan/api/common/enums/SecretEnum.java

@@ -0,0 +1,40 @@
+package com.tzld.piaoquan.api.common.enums;
+
+
+import java.util.Objects;
+
+public enum SecretEnum {
+
+    SECRET_ENUM_1("3b83574b477d4c5b8508a6e33f6e35ec", "魅力", "ml"),
+    SECRET_ENUM_2("70d342bf11a84ac7aca6b3e99541e085", "老来福", "llf"),
+    SECRET_ENUM_3("595db67618174499b2bed23d8be6a3c1", "微小盟", "wxm"),
+    SECRET_ENUM_4("9a48498757774ddf8a3878b9c02d0fef", "福州像素", "xs");
+
+    SecretEnum(String secret, String desc, String channel) {
+        this.secret = secret;
+        this.desc = desc;
+        this.channel = channel;
+    }
+
+    public final String secret;
+    public final String desc;
+    public final String channel;
+
+    public static boolean contains(String secret) {
+        for (SecretEnum secretEnum : SecretEnum.values()) {
+            if (Objects.equals(secretEnum.secret, secret)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    public static SecretEnum get(String secret) {
+        for (SecretEnum secretEnum : SecretEnum.values()) {
+            if (Objects.equals(secretEnum.secret, secret)) {
+                return secretEnum;
+            }
+        }
+        return null;
+    }
+}

+ 32 - 0
api-module/src/main/java/com/tzld/piaoquan/api/common/enums/StrategyStatusEnum.java

@@ -0,0 +1,32 @@
+package com.tzld.piaoquan.api.common.enums;
+
+import java.util.Objects;
+
+public enum StrategyStatusEnum {
+
+    DEFAULT(0, "保底视频"),
+    STRATEGY(1, "策略视频");
+
+    StrategyStatusEnum(Integer status, String name) {
+        this.status = status;
+        this.name = name;
+    }
+
+    public final Integer status;
+
+    public final String name;
+
+
+    public static String getStrategyStatusName(Integer status) {
+        if (status == null) {
+            return null;
+        }
+        for (StrategyStatusEnum strategyStatusEnum : StrategyStatusEnum.values()) {
+            if (Objects.equals(strategyStatusEnum.status, status)) {
+                return strategyStatusEnum.name;
+            }
+        }
+        return null;
+    }
+
+}

+ 76 - 0
api-module/src/main/java/com/tzld/piaoquan/api/component/TouLiuHttpClient.java

@@ -0,0 +1,76 @@
+package com.tzld.piaoquan.api.component;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.tzld.piaoquan.growth.common.component.HttpPoolClient;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+@Slf4j
+@Component
+public class TouLiuHttpClient {
+
+    @Autowired
+    private HttpPoolClient httpPoolClient;
+
+    public String sendAdFlowAddRequest(String baseUrl,
+                                       String videoId,
+                                       String putScene,
+                                       String channel,
+                                       String remark,
+                                       String putTypeOne,
+                                       String putTypeTwo,
+                                       String putTypeThree,
+                                       String putCarrierId) {
+        String url = baseUrl + "/ad/put/flow/add/tencent";
+        UUID uuid = UUID.randomUUID();
+        String jsonBody = "{" +
+                "\"videoId\":\"" + videoId + "\"," +
+                "\"putScene\":\"" + putScene + "\"," +
+                "\"channel\":\"" + channel + "\"," +
+                "\"remark\":\"" + remark + "\"," +
+                "\"putTypeOne\":\"" + putTypeOne + "\"," +
+                "\"putTypeTwo\":\"" + putTypeTwo + "\"," +
+                "\"putTypeThree\":\"" + putTypeThree + "\"," +
+                "\"putCarrierId\":\"" + putCarrierId + "\"," +
+                "\"path\":\"" + "pages/category" + "\"," +
+                "\"requestParam\":{" +
+                "\"jumpPage\":\"" + "pages/user-videos?id=" + videoId + "&fromGzh=1&rootShareId=" + uuid + "&shareId=" + uuid + "&rootSourceId=[rootSourceId]" + "\"" +
+                "}" +
+                "}";
+        try {
+            return httpPoolClient.post(url, jsonBody);
+        } catch (Exception e) {
+            log.error("sendAdFlowAddRequest error", e);
+        }
+        return "";
+    }
+
+
+    public Map<Long, String> getVideoDetailRequest(List<Long> videoIds) {
+        Map<Long, String> map = new HashMap<>();
+        try {
+            String url = "https://longvideoapi.piaoquantv.com/longvideoapi/openapi/video/batchSelectVideoInfo";
+            JSONObject params = new JSONObject();
+            params.put("videoIdList", videoIds);
+            String post = httpPoolClient.post(url, JSONObject.toJSONString(params));
+            JSONObject res = JSONObject.parseObject(post);
+            JSONArray data = res.getJSONArray("data");
+            for (int i = 0; i < data.size(); i++) {
+                JSONObject jsonObject = data.getJSONObject(i);
+                Long videoId = jsonObject.getLong("id");
+                String shareImgPath = jsonObject.getString("shareImgPath");
+                map.put(videoId, shareImgPath);
+            }
+        } catch (Exception e) {
+            log.error("getVideoDetailRequest error", e);
+        }
+        return map;
+    }
+}

+ 8 - 10
common-module/src/main/java/com/tzld/piaoquan/common/config/DataSourceConfig.java → api-module/src/main/java/com/tzld/piaoquan/api/config/DataSourceConfig.java

@@ -1,4 +1,4 @@
-package com.tzld.piaoquan.common.config;
+package com.tzld.piaoquan.api.config;
 
 
 import com.alibaba.druid.pool.DruidDataSource;
 import com.alibaba.druid.pool.DruidDataSource;
 import org.apache.ibatis.session.SqlSessionFactory;
 import org.apache.ibatis.session.SqlSessionFactory;
@@ -17,11 +17,10 @@ import javax.sql.DataSource;
 
 
 
 
 @Configuration
 @Configuration
-@MapperScan(basePackages = DataSourceConfig.PACKAGE_MASTER, sqlSessionFactoryRef = "masterSqlSessionFactory")
+@MapperScan(basePackages = "com.tzld.piaoquan.api.dao.mapper", sqlSessionFactoryRef = "growthSqlSessionFactory")
+@MapperScan(basePackages = "com.tzld.piaoquan.growth.common.dao.mapper", sqlSessionFactoryRef = "growthSqlSessionFactory")
 public class DataSourceConfig {
 public class DataSourceConfig {
-    // 数据源
-    static final String PACKAGE_MASTER = "com.tzld.piaoquan.growth.dao";
-    static final String MAPPER_LOCATION_MASTER = "classpath:mapper/*.xml";
+    static final String MAPPER_LOCATION_MASTER = "classpath*:mapper/**/*.xml";
 
 
     @Bean(name = "dataSource")
     @Bean(name = "dataSource")
     @ConfigurationProperties("spring.datasource")
     @ConfigurationProperties("spring.datasource")
@@ -30,19 +29,18 @@ public class DataSourceConfig {
     }
     }
 
 
     @Primary
     @Primary
-    @Bean(name = "masterTransactionManager")
-    public PlatformTransactionManager masterTransactionManager(@Qualifier("dataSource") DataSource dataSource) {
+    @Bean(name = "growthTransactionManager")
+    public PlatformTransactionManager growthTransactionManager(@Qualifier("dataSource") DataSource dataSource) {
         return new DataSourceTransactionManager(dataSource);
         return new DataSourceTransactionManager(dataSource);
     }
     }
 
 
     @Primary
     @Primary
-    @Bean(name = "masterSqlSessionFactory")
-    public SqlSessionFactory masterSqlSessionFactory(@Qualifier("dataSource") DataSource dataSource) throws Exception {
+    @Bean(name = "growthSqlSessionFactory")
+    public SqlSessionFactory growthSqlSessionFactory(@Qualifier("dataSource") DataSource dataSource) throws Exception {
         final SqlSessionFactoryBean sessionFactoryBean = new SqlSessionFactoryBean();
         final SqlSessionFactoryBean sessionFactoryBean = new SqlSessionFactoryBean();
         sessionFactoryBean.setDataSource(dataSource);
         sessionFactoryBean.setDataSource(dataSource);
         sessionFactoryBean.setMapperLocations(new PathMatchingResourcePatternResolver().getResources(DataSourceConfig.MAPPER_LOCATION_MASTER));
         sessionFactoryBean.setMapperLocations(new PathMatchingResourcePatternResolver().getResources(DataSourceConfig.MAPPER_LOCATION_MASTER));
         return sessionFactoryBean.getObject();
         return sessionFactoryBean.getObject();
     }
     }
 
 
-
 }
 }

+ 73 - 0
api-module/src/main/java/com/tzld/piaoquan/api/config/MqConfig.java

@@ -0,0 +1,73 @@
+package com.tzld.piaoquan.api.config;
+
+import com.aliyun.openservices.ons.api.MessageListener;
+import com.aliyun.openservices.ons.api.PropertyKeyConst;
+import com.aliyun.openservices.ons.api.bean.ConsumerBean;
+import com.aliyun.openservices.ons.api.bean.ProducerBean;
+import com.aliyun.openservices.ons.api.bean.Subscription;
+import com.tzld.piaoquan.api.mq.MessageCallbackCustomer;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+@Configuration
+public class MqConfig {
+
+    @Value("${rocketmq.accessKey}")
+    private String accessKey;
+    @Value("${rocketmq.secretKey}")
+    private String secretKey;
+    @Value("${rocketmq.nameSrvAddr}")
+    private String nameSrvAddr;
+    @Value("${pushMessage.callback.topic}")
+    private String callbackTopic;
+    @Value("${pushMessage.callback.tag}")
+    private String callbackTag;
+    @Value("${pushMessage.callback.groupId}")
+    private String callbackGroupId;
+
+    @Autowired
+    private MessageCallbackCustomer messageCallbackCustomer;
+
+    public Properties getMqProperties() {
+        Properties properties = new Properties();
+        properties.setProperty(PropertyKeyConst.AccessKey, this.accessKey);
+        properties.setProperty(PropertyKeyConst.SecretKey, this.secretKey);
+        properties.setProperty(PropertyKeyConst.NAMESRV_ADDR, this.nameSrvAddr);
+        return properties;
+    }
+
+    @Bean(initMethod = "start", destroyMethod = "shutdown")
+    public ProducerBean buildProducer() {
+        ProducerBean producer = new ProducerBean();
+        producer.setProperties(getMqProperties());
+        return producer;
+    }
+
+
+    @Bean(initMethod = "start", destroyMethod = "shutdown")
+    public ConsumerBean buildConsumer() {
+        ConsumerBean consumerBean = new ConsumerBean();
+        //配置文件
+        Properties properties = getMqProperties();
+        properties.setProperty(PropertyKeyConst.ConsumeThreadNums, "20");
+        properties.setProperty(PropertyKeyConst.GROUP_ID, callbackGroupId);
+        consumerBean.setProperties(properties);
+        //订阅关系
+        Map<Subscription, MessageListener> subscriptionTable = new HashMap<>();
+        Subscription subscription = new Subscription();
+        subscription.setTopic(callbackTopic);
+        subscription.setExpression(callbackTag);
+        subscriptionTable.put(subscription, messageCallbackCustomer);
+        //订阅多个topic如上面设置
+        consumerBean.setSubscriptionTable(subscriptionTable);
+        return consumerBean;
+    }
+
+
+}

+ 64 - 0
api-module/src/main/java/com/tzld/piaoquan/api/controller/AccountDetailController.java

@@ -0,0 +1,64 @@
+package com.tzld.piaoquan.api.controller;
+
+import com.tzld.piaoquan.api.common.enums.GhTypeEnum;
+import com.tzld.piaoquan.api.common.enums.StrategyStatusEnum;
+import com.tzld.piaoquan.api.model.vo.GhDetailVo;
+import com.tzld.piaoquan.api.model.vo.GhTypeVo;
+import com.tzld.piaoquan.api.model.vo.StrategyStatusVo;
+import com.tzld.piaoquan.api.service.GhDetailService;
+import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
+import com.tzld.piaoquan.growth.common.utils.page.Page;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@Slf4j
+
+@RestController
+@RequestMapping("/account")
+@CrossOrigin(origins = "*")
+public class AccountDetailController {
+
+    @Autowired
+    private GhDetailService ghDetailService;
+
+    @GetMapping("/getList")
+    public CommonResponse<Page<GhDetailVo>> getAccountDetailList(@RequestParam Integer pageNum,
+                                                                 @RequestParam Integer pageSize,
+                                                                 @RequestParam(defaultValue = "") String accountId) {
+        return ghDetailService.getGhDetailList(pageNum, pageSize, accountId);
+    }
+
+    @PostMapping("/add")
+    public CommonResponse<Void> addAccountDetail(@RequestBody GhDetailVo detailVo) {
+        return ghDetailService.addGhDetail(detailVo);
+    }
+
+    @PostMapping("/update")
+    public CommonResponse<Void> updateAccountDetail(@RequestBody GhDetailVo detailVo) {
+        return ghDetailService.updateDetail(detailVo);
+    }
+
+    @PostMapping("/delete")
+    public CommonResponse<Void> deleteAccountDetail(@RequestBody GhDetailVo detailVo) {
+        return ghDetailService.deleteDetail(detailVo.getId());
+    }
+
+    @GetMapping("/types")
+    public CommonResponse<List<GhTypeVo>> getAllAccountTypes() {
+        return CommonResponse.success(Arrays.stream(GhTypeEnum.values())
+                .map(ghTypeEnum -> new GhTypeVo(ghTypeEnum.type, ghTypeEnum.name))
+                .collect(Collectors.toList()));
+    }
+
+    @GetMapping("/strategyStatus")
+    public CommonResponse<List<StrategyStatusVo>> getAllStrategyStatus() {
+        return CommonResponse.success(Arrays.stream(StrategyStatusEnum.values())
+                .map(strategyStatusEnum -> new StrategyStatusVo(strategyStatusEnum.status, strategyStatusEnum.name))
+                .collect(Collectors.toList()));
+    }
+}

+ 3 - 3
api-module/src/main/java/com/tzld/piaoquan/api/controller/MessageController.java

@@ -1,9 +1,9 @@
 package com.tzld.piaoquan.api.controller;
 package com.tzld.piaoquan.api.controller;
 
 
 
 
-import com.tzld.piaoquan.common.common.base.CommonResponse;
-import com.tzld.piaoquan.common.model.vo.GuaranteedParam;
-import com.tzld.piaoquan.api.service.MessageAttachmentService;
+import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
+import com.tzld.piaoquan.growth.common.model.vo.GuaranteedParam;
+import com.tzld.piaoquan.growth.common.service.MessageAttachmentService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestBody;

+ 124 - 0
api-module/src/main/java/com/tzld/piaoquan/api/controller/TencentWeComController.java

@@ -0,0 +1,124 @@
+package com.tzld.piaoquan.api.controller;
+
+import com.alibaba.fastjson.JSONObject;
+import com.tzld.piaoquan.growth.common.common.constant.WeComServerConstant;
+import com.tzld.piaoquan.growth.common.service.WeComUserService;
+import com.tzld.piaoquan.growth.common.utils.wecom.WXBizMsgCrypt;
+import com.tzld.piaoquan.growth.common.utils.wecom.WxUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.ServletInputStream;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.io.PrintWriter;
+import java.util.Map;
+
+import static com.tzld.piaoquan.growth.common.common.enums.CorpEnum.HNWQ;
+
+@Slf4j
+@RestController
+@RequestMapping("/wecom/server")
+public class TencentWeComController {
+
+
+    @Autowired
+    private WeComUserService weComUserService;
+
+    @GetMapping("/verify")
+    public void verifyGet(HttpServletRequest request, HttpServletResponse response) {
+        try {
+            // 微信加密签名
+            String msgSignature = request.getParameter("msg_signature");
+            // 时间戳
+            String timestamp = request.getParameter("timestamp");
+            // 随机数
+            String nonce = request.getParameter("nonce");
+            // 随机字符串
+            // 如果是刷新,需返回原echostr
+            String echoStr = request.getParameter("echostr");
+            // 微信加密签名
+            WXBizMsgCrypt wxcpt = new WXBizMsgCrypt(WeComServerConstant.TOKEN,
+                    WeComServerConstant.ENCODING_AES_KEY,
+                    WeComServerConstant.CORP_ID);
+
+            String sEchoStr = ""; //需要返回的明文
+            PrintWriter out;
+
+            sEchoStr = wxcpt.VerifyURL(msgSignature, timestamp,
+                    nonce, echoStr);
+            log.info("verifyurl echostr: " + sEchoStr);
+
+            // 验证URL成功,将sEchoStr返回
+            out = response.getWriter();
+            out.print(sEchoStr);
+        } catch (Exception e) {
+            //验证URL失败,错误原因请查看异常
+            log.error("verifyGet error", e);
+        }
+
+    }
+
+    /**
+     * 刷新 ticket
+     */
+    @PostMapping(value = "/verify")
+    public String verifyPost(HttpServletRequest request) {
+
+        try {
+            // 微信加密签名
+            String msg_signature = request.getParameter("msg_signature");
+            // 时间戳
+            String timestamp = request.getParameter("timestamp");
+            // 随机数
+            String nonce = request.getParameter("nonce");
+
+            String id = WeComServerConstant.CORP_ID;
+
+            WXBizMsgCrypt wxcpt = new WXBizMsgCrypt(WeComServerConstant.TOKEN, WeComServerConstant.ENCODING_AES_KEY, id);
+
+            StringBuilder postData = new StringBuilder();   // 密文,对应POST请求的数据
+            //1.获取加密的请求消息:使用输入流获得加密请求消息postData
+            ServletInputStream in = request.getInputStream();
+            BufferedReader reader = new BufferedReader(new InputStreamReader(in));
+
+            String tempStr = "";   //作为输出字符串的临时串,用于判断是否读取完毕
+            while (null != (tempStr = reader.readLine())) {
+                postData.append(tempStr);
+            }
+
+            String suiteXml = wxcpt.DecryptMsg(msg_signature, timestamp, nonce, postData.toString());
+            log.info("suiteXml: " + suiteXml);
+
+            Map suiteMap = WxUtil.transferXmlToMap(suiteXml);
+            log.info("suiteMap = {}", JSONObject.toJSONString(suiteMap));
+            if (suiteMap != null) {
+                String changeType = (String) suiteMap.get("ChangeType");
+                if (StringUtils.isNotEmpty(changeType) && changeType.equals("add_external_contact")) {
+                    String userId = (String) suiteMap.get("UserID");
+                    String externalUserId = (String) suiteMap.get("ExternalUserID");
+                    log.info("addStaffWithUser userId={} externalUserId={}", userId, externalUserId);
+                    weComUserService.addStaffWithUser(externalUserId, userId, HNWQ.getId());
+                }
+
+                if (StringUtils.isNotEmpty(changeType) && changeType.equals("del_follow_user")) {
+                    String userId = (String) suiteMap.get("UserID");
+                    String externalUserId = (String) suiteMap.get("ExternalUserID");
+                    log.info("delStaffWithUser userId={} externalUserId={}", userId, externalUserId);
+                    weComUserService.delStaffWithUser(externalUserId, userId, System.currentTimeMillis());
+                }
+            }
+        } catch (Exception e) {
+            log.error("verifyPost error", e);
+        }
+        String success = "success";
+        return success;
+    }
+}

+ 46 - 0
api-module/src/main/java/com/tzld/piaoquan/api/controller/ThirdPartyController.java

@@ -0,0 +1,46 @@
+package com.tzld.piaoquan.api.controller;
+
+
+import com.tzld.piaoquan.api.model.vo.*;
+import com.tzld.piaoquan.api.mq.MessageCallbackProducer;
+import com.tzld.piaoquan.api.service.GhAccessTokenService;
+import com.tzld.piaoquan.api.service.ThirdPartyService;
+import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@RestController
+@RequestMapping("/3rdParty")
+public class ThirdPartyController {
+
+    @Autowired
+    private GhAccessTokenService ghAccessTokenService;
+
+    @Autowired
+    private ThirdPartyService thirdPartyService;
+
+    @Autowired
+    private MessageCallbackProducer messageCallbackProducer;
+
+    @PostMapping("/accessToken/get")
+    public CommonResponse<AccessTokenVo> getAccessToken(@RequestBody AccessTokenParam param) {
+        return ghAccessTokenService.getAccessToken(param);
+    }
+
+    @PostMapping("/pushMessage/get")
+    public CommonResponse<List<PushMessageVo>> getPushMessage(@RequestBody PushMessageParam param) {
+        return thirdPartyService.getPushMessage(param);
+    }
+
+    @PostMapping("/pushMessage/callback")
+    public CommonResponse<Void> pushMessageCallback(@RequestBody CallbackParam param) {
+        return messageCallbackProducer.sendMessage(param);
+    }
+
+    @GetMapping("/report/uv")
+    public CommonResponse<List<ReportUvVo>> getReportUv(@RequestParam String date, @RequestParam String accessToken) {
+        return thirdPartyService.getReportUv(date, accessToken);
+    }
+}

+ 12 - 105
api-module/src/main/java/com/tzld/piaoquan/api/controller/WeComController.java

@@ -1,124 +1,31 @@
 package com.tzld.piaoquan.api.controller;
 package com.tzld.piaoquan.api.controller;
 
 
-import com.alibaba.fastjson.JSONObject;
-import com.tzld.piaoquan.common.common.constant.WeComServerConstant;
-import com.tzld.piaoquan.api.service.UserService;
-import com.tzld.piaoquan.common.utils.wecom.WXBizMsgCrypt;
-import com.tzld.piaoquan.common.utils.wecom.WxUtil;
+import com.tzld.piaoquan.api.model.vo.WeComPushMessageParam;
+import com.tzld.piaoquan.api.model.vo.WeComPushMessageVo;
+import com.tzld.piaoquan.api.service.WeComService;
+import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 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.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.bind.annotation.RestController;
 
 
-import javax.servlet.ServletInputStream;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import java.io.PrintWriter;
-import java.util.Map;
-
-import static com.tzld.piaoquan.common.common.enums.CorpEnum.HNWQ;
+import java.util.List;
 
 
 @Slf4j
 @Slf4j
 @RestController
 @RestController
-@RequestMapping("/wecom/server")
+@RequestMapping("/wecom")
 public class WeComController {
 public class WeComController {
 
 
 
 
     @Autowired
     @Autowired
-    private UserService userService;
-
-    @GetMapping("/verify")
-    public void verifyGet(HttpServletRequest request, HttpServletResponse response) {
-        try {
-            // 微信加密签名
-            String msgSignature = request.getParameter("msg_signature");
-            // 时间戳
-            String timestamp = request.getParameter("timestamp");
-            // 随机数
-            String nonce = request.getParameter("nonce");
-            // 随机字符串
-            // 如果是刷新,需返回原echostr
-            String echoStr = request.getParameter("echostr");
-            // 微信加密签名
-            WXBizMsgCrypt wxcpt = new WXBizMsgCrypt(WeComServerConstant.TOKEN,
-                    WeComServerConstant.ENCODING_AES_KEY,
-                    WeComServerConstant.CORP_ID);
-
-            String sEchoStr = ""; //需要返回的明文
-            PrintWriter out;
-
-            sEchoStr = wxcpt.VerifyURL(msgSignature, timestamp,
-                    nonce, echoStr);
-            log.info("verifyurl echostr: " + sEchoStr);
-
-            // 验证URL成功,将sEchoStr返回
-            out = response.getWriter();
-            out.print(sEchoStr);
-        } catch (Exception e) {
-            //验证URL失败,错误原因请查看异常
-            log.error("verifyGet error", e);
-        }
-
-    }
-
-    /**
-     * 刷新 ticket
-     */
-    @PostMapping(value = "/verify")
-    public String verifyPost(HttpServletRequest request) {
-
-        try {
-            // 微信加密签名
-            String msg_signature = request.getParameter("msg_signature");
-            // 时间戳
-            String timestamp = request.getParameter("timestamp");
-            // 随机数
-            String nonce = request.getParameter("nonce");
-
-            String id = WeComServerConstant.CORP_ID;
-
-            WXBizMsgCrypt wxcpt = new WXBizMsgCrypt(WeComServerConstant.TOKEN, WeComServerConstant.ENCODING_AES_KEY, id);
-
-            StringBuilder postData = new StringBuilder();   // 密文,对应POST请求的数据
-            //1.获取加密的请求消息:使用输入流获得加密请求消息postData
-            ServletInputStream in = request.getInputStream();
-            BufferedReader reader = new BufferedReader(new InputStreamReader(in));
-
-            String tempStr = "";   //作为输出字符串的临时串,用于判断是否读取完毕
-            while (null != (tempStr = reader.readLine())) {
-                postData.append(tempStr);
-            }
-
-            String suiteXml = wxcpt.DecryptMsg(msg_signature, timestamp, nonce, postData.toString());
-            log.info("suiteXml: " + suiteXml);
+    private WeComService weComService;
 
 
-            Map suiteMap = WxUtil.transferXmlToMap(suiteXml);
-            log.info("suiteMap = {}", JSONObject.toJSONString(suiteMap));
-            if (suiteMap != null) {
-                String changeType = (String) suiteMap.get("ChangeType");
-                if (StringUtils.isNotEmpty(changeType) && changeType.equals("add_external_contact")) {
-                    String userId = (String) suiteMap.get("UserID");
-                    String externalUserId = (String) suiteMap.get("ExternalUserID");
-                    log.info("addStaffWithUser userId={} externalUserId={}", userId, externalUserId);
-                    userService.addStaffWithUser(externalUserId, userId, HNWQ.getId());
-                }
 
 
-                if (StringUtils.isNotEmpty(changeType) && changeType.equals("del_follow_user")) {
-                    String userId = (String) suiteMap.get("UserID");
-                    String externalUserId = (String) suiteMap.get("ExternalUserID");
-                    log.info("delStaffWithUser userId={} externalUserId={}", userId, externalUserId);
-                    userService.delStaffWithUser(externalUserId, userId, System.currentTimeMillis());
-                }
-            }
-        } catch (Exception e) {
-            log.error("verifyPost error", e);
-        }
-        String success = "success";
-        return success;
+    @PostMapping("/pushMessage/get")
+    public CommonResponse<List<WeComPushMessageVo>> getPushMessage(@RequestBody WeComPushMessageParam param) {
+        log.info("param={}", param);
+        return weComService.getPushMessage(param);
     }
     }
 }
 }

+ 39 - 0
api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/AlgGhAutoreplyVideoRankDataMapper.java

@@ -0,0 +1,39 @@
+package com.tzld.piaoquan.api.dao.mapper;
+
+
+import com.tzld.piaoquan.api.model.po.AlgGhAutoreplyVideoRankData;
+import com.tzld.piaoquan.api.model.po.AlgGhAutoreplyVideoRankDataExample;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+@Mapper
+@Repository
+public interface AlgGhAutoreplyVideoRankDataMapper {
+    long countByExample(AlgGhAutoreplyVideoRankDataExample example);
+
+    int deleteByExample(AlgGhAutoreplyVideoRankDataExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(AlgGhAutoreplyVideoRankData row);
+
+    int insertSelective(AlgGhAutoreplyVideoRankData row);
+
+    List<AlgGhAutoreplyVideoRankData> selectByExample(AlgGhAutoreplyVideoRankDataExample example);
+
+    AlgGhAutoreplyVideoRankData selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("row") AlgGhAutoreplyVideoRankData row, @Param("example") AlgGhAutoreplyVideoRankDataExample example);
+
+    int updateByExample(@Param("row") AlgGhAutoreplyVideoRankData row, @Param("example") AlgGhAutoreplyVideoRankDataExample example);
+
+    int updateByPrimaryKeySelective(AlgGhAutoreplyVideoRankData row);
+
+    int updateByPrimaryKey(AlgGhAutoreplyVideoRankData row);
+
+    String selectLatestDtVersionByStrategyKey(String strategyKey);
+
+    String selectLatestDtVersionByStrategyKeyAndGhId(@Param("strategyKey")String strategyKey, @Param("ghId")String ghId);
+}

+ 33 - 0
api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/CgiReplyBucketDataMapper.java

@@ -0,0 +1,33 @@
+package com.tzld.piaoquan.api.dao.mapper;
+
+
+import com.tzld.piaoquan.api.model.po.CgiReplyBucketData;
+import com.tzld.piaoquan.api.model.po.CgiReplyBucketDataExample;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+@Mapper
+public interface CgiReplyBucketDataMapper {
+    long countByExample(CgiReplyBucketDataExample example);
+
+    int deleteByExample(CgiReplyBucketDataExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(CgiReplyBucketData row);
+
+    int insertSelective(CgiReplyBucketData row);
+
+    List<CgiReplyBucketData> selectByExample(CgiReplyBucketDataExample example);
+
+    CgiReplyBucketData selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("row") CgiReplyBucketData row, @Param("example") CgiReplyBucketDataExample example);
+
+    int updateByExample(@Param("row") CgiReplyBucketData row, @Param("example") CgiReplyBucketDataExample example);
+
+    int updateByPrimaryKeySelective(CgiReplyBucketData row);
+
+    int updateByPrimaryKey(CgiReplyBucketData row);
+}

+ 36 - 0
api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/GhDetailMapper.java

@@ -0,0 +1,36 @@
+package com.tzld.piaoquan.api.dao.mapper;
+
+
+import com.tzld.piaoquan.api.model.po.GhDetail;
+import com.tzld.piaoquan.api.model.po.GhDetailExample;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Mapper
+@Repository
+public interface GhDetailMapper {
+    long countByExample(GhDetailExample example);
+
+    int deleteByExample(GhDetailExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(GhDetail row);
+
+    int insertSelective(GhDetail row);
+
+    List<GhDetail> selectByExample(GhDetailExample example);
+
+    GhDetail selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("row") GhDetail row, @Param("example") GhDetailExample example);
+
+    int updateByExample(@Param("row") GhDetail row, @Param("example") GhDetailExample example);
+
+    int updateByPrimaryKeySelective(GhDetail row);
+
+    int updateByPrimaryKey(GhDetail row);
+}

+ 36 - 0
api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/NewPushMessageCallbackMapper.java

@@ -0,0 +1,36 @@
+package com.tzld.piaoquan.api.dao.mapper;
+
+
+import com.tzld.piaoquan.api.model.po.PushMessageCallback;
+import com.tzld.piaoquan.api.model.po.PushMessageCallbackExample;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+@Mapper
+public interface NewPushMessageCallbackMapper {
+    long countByExample(PushMessageCallbackExample example);
+
+    int deleteByExample(PushMessageCallbackExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(PushMessageCallback row);
+
+    int insertSelective(PushMessageCallback row);
+
+    List<PushMessageCallback> selectByExample(PushMessageCallbackExample example);
+
+    PushMessageCallback selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("row") PushMessageCallback row, @Param("example") PushMessageCallbackExample example);
+
+    int updateByExample(@Param("row") PushMessageCallback row, @Param("example") PushMessageCallbackExample example);
+
+    int updateByPrimaryKeySelective(PushMessageCallback row);
+
+    int updateByPrimaryKey(PushMessageCallback row);
+
+    int insertList(@Param("list") List<PushMessageCallback> list);
+}

+ 36 - 0
api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/ReplyStaffMapper.java

@@ -0,0 +1,36 @@
+package com.tzld.piaoquan.api.dao.mapper;
+
+
+import com.tzld.piaoquan.api.model.po.ReplyStaff;
+import com.tzld.piaoquan.api.model.po.ReplyStaffExample;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Mapper
+@Repository
+public interface ReplyStaffMapper {
+    long countByExample(ReplyStaffExample example);
+
+    int deleteByExample(ReplyStaffExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(ReplyStaff row);
+
+    int insertSelective(ReplyStaff row);
+
+    List<ReplyStaff> selectByExample(ReplyStaffExample example);
+
+    ReplyStaff selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("row") ReplyStaff row, @Param("example") ReplyStaffExample example);
+
+    int updateByExample(@Param("row") ReplyStaff row, @Param("example") ReplyStaffExample example);
+
+    int updateByPrimaryKeySelective(ReplyStaff row);
+
+    int updateByPrimaryKey(ReplyStaff row);
+}

+ 0 - 37
api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/UserMapper.java

@@ -1,37 +0,0 @@
-package com.tzld.piaoquan.api.dao.mapper;
-
-import com.tzld.piaoquan.common.model.po.User;
-import com.tzld.piaoquan.common.model.po.UserExample;
-import org.apache.ibatis.annotations.Param;
-import org.springframework.stereotype.Repository;
-
-import java.util.List;
-
-@Repository
-public interface UserMapper {
-    long countByExample(UserExample example);
-
-    int deleteByExample(UserExample example);
-
-    int deleteByPrimaryKey(Long id);
-
-    int insert(User record);
-
-    int insertSelective(User record);
-
-    List<User> selectByExample(UserExample example);
-
-    User selectByPrimaryKey(Long id);
-
-    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);
-
-    int updateByExample(@Param("record") User record, @Param("example") UserExample example);
-
-    int updateByPrimaryKeySelective(User record);
-
-    int updateByPrimaryKey(User record);
-
-    Long selectIdByExternalUserId(String externalUserId);
-
-    void insertList(@Param("list") List<User> list);
-}

+ 156 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/bo/ArticleInfo.java

@@ -0,0 +1,156 @@
+package com.tzld.piaoquan.api.model.bo;
+
+import java.util.List;
+
+public class ArticleInfo {
+
+    private String publishContentId;
+
+    private String title;
+
+    private String content;
+
+    private String coverUrl;
+
+    private List<String> imageUrls;
+
+    private Long createTimestamp;
+
+    private String producePlanName;
+
+    private String crawlerChannelContentId;
+
+    private String crawlerLink;
+
+    private String crawlerTitle;
+
+    private String crawlerCoverUrl;
+
+    private Integer crawlerViewCount;
+
+    private Integer crawlerLikeCount;
+
+    private Long crawlerPublishTimestamp;
+
+    private String crawlerAccountName;
+
+    public String getPublishContentId() {
+        return publishContentId;
+    }
+
+    public void setPublishContentId(String publishContentId) {
+        this.publishContentId = publishContentId;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    public String getCoverUrl() {
+        return coverUrl;
+    }
+
+    public void setCoverUrl(String coverUrl) {
+        this.coverUrl = coverUrl;
+    }
+
+    public List<String> getImageUrls() {
+        return imageUrls;
+    }
+
+    public void setImageUrls(List<String> imageUrls) {
+        this.imageUrls = imageUrls;
+    }
+
+    public Long getCreateTimestamp() {
+        return createTimestamp;
+    }
+
+    public void setCreateTimestamp(Long createTimestamp) {
+        this.createTimestamp = createTimestamp;
+    }
+
+    public String getProducePlanName() {
+        return producePlanName;
+    }
+
+    public void setProducePlanName(String producePlanName) {
+        this.producePlanName = producePlanName;
+    }
+
+    public String getCrawlerChannelContentId() {
+        return crawlerChannelContentId;
+    }
+
+    public void setCrawlerChannelContentId(String crawlerChannelContentId) {
+        this.crawlerChannelContentId = crawlerChannelContentId;
+    }
+
+    public String getCrawlerLink() {
+        return crawlerLink;
+    }
+
+    public void setCrawlerLink(String crawlerLink) {
+        this.crawlerLink = crawlerLink;
+    }
+
+    public String getCrawlerTitle() {
+        return crawlerTitle;
+    }
+
+    public void setCrawlerTitle(String crawlerTitle) {
+        this.crawlerTitle = crawlerTitle;
+    }
+
+    public String getCrawlerCoverUrl() {
+        return crawlerCoverUrl;
+    }
+
+    public void setCrawlerCoverUrl(String crawlerCoverUrl) {
+        this.crawlerCoverUrl = crawlerCoverUrl;
+    }
+
+    public Integer getCrawlerViewCount() {
+        return crawlerViewCount;
+    }
+
+    public void setCrawlerViewCount(Integer crawlerViewCount) {
+        this.crawlerViewCount = crawlerViewCount;
+    }
+
+    public Integer getCrawlerLikeCount() {
+        return crawlerLikeCount;
+    }
+
+    public void setCrawlerLikeCount(Integer crawlerLikeCount) {
+        this.crawlerLikeCount = crawlerLikeCount;
+    }
+
+    public Long getCrawlerPublishTimestamp() {
+        return crawlerPublishTimestamp;
+    }
+
+    public void setCrawlerPublishTimestamp(Long crawlerPublishTimestamp) {
+        this.crawlerPublishTimestamp = crawlerPublishTimestamp;
+    }
+
+    public String getCrawlerAccountName() {
+        return crawlerAccountName;
+    }
+
+    public void setCrawlerAccountName(String crawlerAccountName) {
+        this.crawlerAccountName = crawlerAccountName;
+    }
+}

+ 24 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/bo/BucketDataParam.java

@@ -0,0 +1,24 @@
+package com.tzld.piaoquan.api.model.bo;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class BucketDataParam {
+
+    private String accountId;
+
+    private String accountName;
+
+    private String ghId;
+
+    private String strategy;
+
+    private String planId;
+
+    private List<ArticleInfo> articleList;
+
+    private String channel;
+
+}

+ 27 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/bo/GroupData.java

@@ -0,0 +1,27 @@
+package com.tzld.piaoquan.api.model.bo;
+
+import java.util.List;
+
+public class GroupData {
+
+    private Integer groupIndex;
+
+    private List<MsgData> msgDataList;
+
+
+    public Integer getGroupIndex() {
+        return groupIndex;
+    }
+
+    public void setGroupIndex(Integer groupIndex) {
+        this.groupIndex = groupIndex;
+    }
+
+    public List<MsgData> getMsgDataList() {
+        return msgDataList;
+    }
+
+    public void setMsgDataList(List<MsgData> msgDataList) {
+        this.msgDataList = msgDataList;
+    }
+}

+ 20 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/bo/MiniData.java

@@ -0,0 +1,20 @@
+package com.tzld.piaoquan.api.model.bo;
+
+import lombok.Data;
+
+@Data
+public class MiniData {
+
+    private Integer msgType;
+
+    private String title;
+
+    private String coverUrl;
+
+    private String miniAppId;
+
+    private String miniPagePath;
+
+    private Long miniVideoId;
+
+}

+ 27 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/bo/MsgData.java

@@ -0,0 +1,27 @@
+package com.tzld.piaoquan.api.model.bo;
+
+import lombok.Data;
+import lombok.ToString;
+
+@Data
+@ToString
+public class MsgData {
+
+    private Integer msgType;
+
+    private String title;
+
+    private String coverUrl;
+
+    private String miniAppId;
+
+    private String miniPagePath;
+
+    private Long miniVideoId;
+
+    private String newsPublishContentId;
+
+    private String newsUrl;
+
+    private String newsDescription;
+}

+ 18 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/bo/ReplyBucketData.java

@@ -0,0 +1,18 @@
+package com.tzld.piaoquan.api.model.bo;
+
+import java.util.List;
+
+public class ReplyBucketData {
+
+    private List<GroupData> groupList;
+
+    public List<GroupData> getGroupList() {
+        return groupList;
+    }
+
+    public void setGroupList(List<GroupData> groupList) {
+        this.groupList = groupList;
+    }
+}
+
+

+ 13 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/bo/ReplyInfo.java

@@ -0,0 +1,13 @@
+package com.tzld.piaoquan.api.model.bo;
+
+import lombok.Data;
+import lombok.ToString;
+
+@Data
+@ToString
+public class ReplyInfo {
+
+    private Integer msgType;
+
+    private Long miniVideoId;
+}

+ 74 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/bo/SmallPageUrlDetail.java

@@ -0,0 +1,74 @@
+package com.tzld.piaoquan.api.model.bo;
+
+public class SmallPageUrlDetail {
+
+    private Long id;
+
+    private Long videoId;
+
+    private String putScene;
+
+    private String channel;
+
+    private String remark;
+
+    private String url;
+
+    private String rootSourceId;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getVideoId() {
+        return videoId;
+    }
+
+    public void setVideoId(Long videoId) {
+        this.videoId = videoId;
+    }
+
+    public String getPutScene() {
+        return putScene;
+    }
+
+    public void setPutScene(String putScene) {
+        this.putScene = putScene;
+    }
+
+    public String getChannel() {
+        return channel;
+    }
+
+    public void setChannel(String channel) {
+        this.channel = channel;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getUrl() {
+        return url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    public String getRootSourceId() {
+        return rootSourceId;
+    }
+
+    public void setRootSourceId(String rootSourceId) {
+        this.rootSourceId = rootSourceId;
+    }
+}

+ 115 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/AlgGhAutoreplyVideoRankData.java

@@ -0,0 +1,115 @@
+package com.tzld.piaoquan.api.model.po;
+
+import java.util.Date;
+
+public class AlgGhAutoreplyVideoRankData {
+    private Long id;
+
+    private String strategyKey;
+
+    private String dtVersion;
+
+    private String ghId;
+
+    private Integer sort;
+
+    private Long videoId;
+
+    private String title;
+
+    private String coverUrl;
+
+    private Integer isDelete;
+
+    private Date createTime;
+
+    private Date updateTime;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getStrategyKey() {
+        return strategyKey;
+    }
+
+    public void setStrategyKey(String strategyKey) {
+        this.strategyKey = strategyKey == null ? null : strategyKey.trim();
+    }
+
+    public String getDtVersion() {
+        return dtVersion;
+    }
+
+    public void setDtVersion(String dtVersion) {
+        this.dtVersion = dtVersion == null ? null : dtVersion.trim();
+    }
+
+    public String getGhId() {
+        return ghId;
+    }
+
+    public void setGhId(String ghId) {
+        this.ghId = ghId == null ? null : ghId.trim();
+    }
+
+    public Integer getSort() {
+        return sort;
+    }
+
+    public void setSort(Integer sort) {
+        this.sort = sort;
+    }
+
+    public Long getVideoId() {
+        return videoId;
+    }
+
+    public void setVideoId(Long videoId) {
+        this.videoId = videoId;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title == null ? null : title.trim();
+    }
+
+    public String getCoverUrl() {
+        return coverUrl;
+    }
+
+    public void setCoverUrl(String coverUrl) {
+        this.coverUrl = coverUrl == null ? null : coverUrl.trim();
+    }
+
+    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;
+    }
+}

+ 910 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/AlgGhAutoreplyVideoRankDataExample.java

@@ -0,0 +1,910 @@
+package com.tzld.piaoquan.api.model.po;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class AlgGhAutoreplyVideoRankDataExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    public AlgGhAutoreplyVideoRankDataExample() {
+        oredCriteria = new ArrayList<>();
+    }
+
+    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;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<>();
+        }
+
+        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 andStrategyKeyIsNull() {
+            addCriterion("strategy_key is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyKeyIsNotNull() {
+            addCriterion("strategy_key is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyKeyEqualTo(String value) {
+            addCriterion("strategy_key =", value, "strategyKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyKeyNotEqualTo(String value) {
+            addCriterion("strategy_key <>", value, "strategyKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyKeyGreaterThan(String value) {
+            addCriterion("strategy_key >", value, "strategyKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyKeyGreaterThanOrEqualTo(String value) {
+            addCriterion("strategy_key >=", value, "strategyKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyKeyLessThan(String value) {
+            addCriterion("strategy_key <", value, "strategyKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyKeyLessThanOrEqualTo(String value) {
+            addCriterion("strategy_key <=", value, "strategyKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyKeyLike(String value) {
+            addCriterion("strategy_key like", value, "strategyKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyKeyNotLike(String value) {
+            addCriterion("strategy_key not like", value, "strategyKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyKeyIn(List<String> values) {
+            addCriterion("strategy_key in", values, "strategyKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyKeyNotIn(List<String> values) {
+            addCriterion("strategy_key not in", values, "strategyKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyKeyBetween(String value1, String value2) {
+            addCriterion("strategy_key between", value1, value2, "strategyKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyKeyNotBetween(String value1, String value2) {
+            addCriterion("strategy_key not between", value1, value2, "strategyKey");
+            return (Criteria) this;
+        }
+
+        public Criteria andDtVersionIsNull() {
+            addCriterion("dt_version is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDtVersionIsNotNull() {
+            addCriterion("dt_version is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDtVersionEqualTo(String value) {
+            addCriterion("dt_version =", value, "dtVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andDtVersionNotEqualTo(String value) {
+            addCriterion("dt_version <>", value, "dtVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andDtVersionGreaterThan(String value) {
+            addCriterion("dt_version >", value, "dtVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andDtVersionGreaterThanOrEqualTo(String value) {
+            addCriterion("dt_version >=", value, "dtVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andDtVersionLessThan(String value) {
+            addCriterion("dt_version <", value, "dtVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andDtVersionLessThanOrEqualTo(String value) {
+            addCriterion("dt_version <=", value, "dtVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andDtVersionLike(String value) {
+            addCriterion("dt_version like", value, "dtVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andDtVersionNotLike(String value) {
+            addCriterion("dt_version not like", value, "dtVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andDtVersionIn(List<String> values) {
+            addCriterion("dt_version in", values, "dtVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andDtVersionNotIn(List<String> values) {
+            addCriterion("dt_version not in", values, "dtVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andDtVersionBetween(String value1, String value2) {
+            addCriterion("dt_version between", value1, value2, "dtVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andDtVersionNotBetween(String value1, String value2) {
+            addCriterion("dt_version not between", value1, value2, "dtVersion");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdIsNull() {
+            addCriterion("gh_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdIsNotNull() {
+            addCriterion("gh_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdEqualTo(String value) {
+            addCriterion("gh_id =", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdNotEqualTo(String value) {
+            addCriterion("gh_id <>", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdGreaterThan(String value) {
+            addCriterion("gh_id >", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdGreaterThanOrEqualTo(String value) {
+            addCriterion("gh_id >=", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdLessThan(String value) {
+            addCriterion("gh_id <", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdLessThanOrEqualTo(String value) {
+            addCriterion("gh_id <=", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdLike(String value) {
+            addCriterion("gh_id like", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdNotLike(String value) {
+            addCriterion("gh_id not like", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdIn(List<String> values) {
+            addCriterion("gh_id in", values, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdNotIn(List<String> values) {
+            addCriterion("gh_id not in", values, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdBetween(String value1, String value2) {
+            addCriterion("gh_id between", value1, value2, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdNotBetween(String value1, String value2) {
+            addCriterion("gh_id not between", value1, value2, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortIsNull() {
+            addCriterion("sort is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortIsNotNull() {
+            addCriterion("sort is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortEqualTo(Integer value) {
+            addCriterion("sort =", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortNotEqualTo(Integer value) {
+            addCriterion("sort <>", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortGreaterThan(Integer value) {
+            addCriterion("sort >", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortGreaterThanOrEqualTo(Integer value) {
+            addCriterion("sort >=", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortLessThan(Integer value) {
+            addCriterion("sort <", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortLessThanOrEqualTo(Integer value) {
+            addCriterion("sort <=", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortIn(List<Integer> values) {
+            addCriterion("sort in", values, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortNotIn(List<Integer> values) {
+            addCriterion("sort not in", values, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortBetween(Integer value1, Integer value2) {
+            addCriterion("sort between", value1, value2, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortNotBetween(Integer value1, Integer value2) {
+            addCriterion("sort not between", value1, value2, "sort");
+            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 andTitleIsNull() {
+            addCriterion("title is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleIsNotNull() {
+            addCriterion("title is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleEqualTo(String value) {
+            addCriterion("title =", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotEqualTo(String value) {
+            addCriterion("title <>", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleGreaterThan(String value) {
+            addCriterion("title >", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleGreaterThanOrEqualTo(String value) {
+            addCriterion("title >=", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleLessThan(String value) {
+            addCriterion("title <", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleLessThanOrEqualTo(String value) {
+            addCriterion("title <=", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleLike(String value) {
+            addCriterion("title like", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotLike(String value) {
+            addCriterion("title not like", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleIn(List<String> values) {
+            addCriterion("title in", values, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotIn(List<String> values) {
+            addCriterion("title not in", values, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleBetween(String value1, String value2) {
+            addCriterion("title between", value1, value2, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotBetween(String value1, String value2) {
+            addCriterion("title not between", value1, value2, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverUrlIsNull() {
+            addCriterion("cover_url is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverUrlIsNotNull() {
+            addCriterion("cover_url is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverUrlEqualTo(String value) {
+            addCriterion("cover_url =", value, "coverUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverUrlNotEqualTo(String value) {
+            addCriterion("cover_url <>", value, "coverUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverUrlGreaterThan(String value) {
+            addCriterion("cover_url >", value, "coverUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverUrlGreaterThanOrEqualTo(String value) {
+            addCriterion("cover_url >=", value, "coverUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverUrlLessThan(String value) {
+            addCriterion("cover_url <", value, "coverUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverUrlLessThanOrEqualTo(String value) {
+            addCriterion("cover_url <=", value, "coverUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverUrlLike(String value) {
+            addCriterion("cover_url like", value, "coverUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverUrlNotLike(String value) {
+            addCriterion("cover_url not like", value, "coverUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverUrlIn(List<String> values) {
+            addCriterion("cover_url in", values, "coverUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverUrlNotIn(List<String> values) {
+            addCriterion("cover_url not in", values, "coverUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverUrlBetween(String value1, String value2) {
+            addCriterion("cover_url between", value1, value2, "coverUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverUrlNotBetween(String value1, String value2) {
+            addCriterion("cover_url not between", value1, value2, "coverUrl");
+            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);
+        }
+    }
+}

+ 175 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/CgiReplyBucketData.java

@@ -0,0 +1,175 @@
+package com.tzld.piaoquan.api.model.po;
+
+import java.util.Date;
+
+public class CgiReplyBucketData {
+    private Long id;
+
+    private String strategy;
+
+    private Integer sort;
+
+    private String strategyDt;
+
+    private String ghId;
+
+    private Integer msgType;
+
+    private String title;
+
+    private String coverUrl;
+
+    private String miniAppId;
+
+    private String miniPagePath;
+
+    private Long miniVideoId;
+
+    private Long pagePathUrlId;
+
+    private String newsPublishContentId;
+
+    private String planId;
+
+    private Integer isDelete;
+
+    private Date createTime;
+
+    private Date updateTime;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getStrategy() {
+        return strategy;
+    }
+
+    public void setStrategy(String strategy) {
+        this.strategy = strategy == null ? null : strategy.trim();
+    }
+
+    public Integer getSort() {
+        return sort;
+    }
+
+    public void setSort(Integer sort) {
+        this.sort = sort;
+    }
+
+    public String getStrategyDt() {
+        return strategyDt;
+    }
+
+    public void setStrategyDt(String strategyDt) {
+        this.strategyDt = strategyDt == null ? null : strategyDt.trim();
+    }
+
+    public String getGhId() {
+        return ghId;
+    }
+
+    public void setGhId(String ghId) {
+        this.ghId = ghId == null ? null : ghId.trim();
+    }
+
+    public Integer getMsgType() {
+        return msgType;
+    }
+
+    public void setMsgType(Integer msgType) {
+        this.msgType = msgType;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title == null ? null : title.trim();
+    }
+
+    public String getCoverUrl() {
+        return coverUrl;
+    }
+
+    public void setCoverUrl(String coverUrl) {
+        this.coverUrl = coverUrl == null ? null : coverUrl.trim();
+    }
+
+    public String getMiniAppId() {
+        return miniAppId;
+    }
+
+    public void setMiniAppId(String miniAppId) {
+        this.miniAppId = miniAppId == null ? null : miniAppId.trim();
+    }
+
+    public String getMiniPagePath() {
+        return miniPagePath;
+    }
+
+    public void setMiniPagePath(String miniPagePath) {
+        this.miniPagePath = miniPagePath == null ? null : miniPagePath.trim();
+    }
+
+    public Long getMiniVideoId() {
+        return miniVideoId;
+    }
+
+    public void setMiniVideoId(Long miniVideoId) {
+        this.miniVideoId = miniVideoId;
+    }
+
+    public Long getPagePathUrlId() {
+        return pagePathUrlId;
+    }
+
+    public void setPagePathUrlId(Long pagePathUrlId) {
+        this.pagePathUrlId = pagePathUrlId;
+    }
+
+    public String getNewsPublishContentId() {
+        return newsPublishContentId;
+    }
+
+    public void setNewsPublishContentId(String newsPublishContentId) {
+        this.newsPublishContentId = newsPublishContentId == null ? null : newsPublishContentId.trim();
+    }
+
+    public String getPlanId() {
+        return planId;
+    }
+
+    public void setPlanId(String planId) {
+        this.planId = planId == null ? null : planId.trim();
+    }
+
+    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;
+    }
+}

+ 1310 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/CgiReplyBucketDataExample.java

@@ -0,0 +1,1310 @@
+package com.tzld.piaoquan.api.model.po;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class CgiReplyBucketDataExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    public CgiReplyBucketDataExample() {
+        oredCriteria = new ArrayList<>();
+    }
+
+    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;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<>();
+        }
+
+        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 andStrategyIsNull() {
+            addCriterion("strategy is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyIsNotNull() {
+            addCriterion("strategy is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyEqualTo(String value) {
+            addCriterion("strategy =", value, "strategy");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyNotEqualTo(String value) {
+            addCriterion("strategy <>", value, "strategy");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyGreaterThan(String value) {
+            addCriterion("strategy >", value, "strategy");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyGreaterThanOrEqualTo(String value) {
+            addCriterion("strategy >=", value, "strategy");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyLessThan(String value) {
+            addCriterion("strategy <", value, "strategy");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyLessThanOrEqualTo(String value) {
+            addCriterion("strategy <=", value, "strategy");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyLike(String value) {
+            addCriterion("strategy like", value, "strategy");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyNotLike(String value) {
+            addCriterion("strategy not like", value, "strategy");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyIn(List<String> values) {
+            addCriterion("strategy in", values, "strategy");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyNotIn(List<String> values) {
+            addCriterion("strategy not in", values, "strategy");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyBetween(String value1, String value2) {
+            addCriterion("strategy between", value1, value2, "strategy");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyNotBetween(String value1, String value2) {
+            addCriterion("strategy not between", value1, value2, "strategy");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortIsNull() {
+            addCriterion("sort is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortIsNotNull() {
+            addCriterion("sort is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortEqualTo(Integer value) {
+            addCriterion("sort =", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortNotEqualTo(Integer value) {
+            addCriterion("sort <>", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortGreaterThan(Integer value) {
+            addCriterion("sort >", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortGreaterThanOrEqualTo(Integer value) {
+            addCriterion("sort >=", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortLessThan(Integer value) {
+            addCriterion("sort <", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortLessThanOrEqualTo(Integer value) {
+            addCriterion("sort <=", value, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortIn(List<Integer> values) {
+            addCriterion("sort in", values, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortNotIn(List<Integer> values) {
+            addCriterion("sort not in", values, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortBetween(Integer value1, Integer value2) {
+            addCriterion("sort between", value1, value2, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andSortNotBetween(Integer value1, Integer value2) {
+            addCriterion("sort not between", value1, value2, "sort");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyDtIsNull() {
+            addCriterion("strategy_dt is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyDtIsNotNull() {
+            addCriterion("strategy_dt is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyDtEqualTo(String value) {
+            addCriterion("strategy_dt =", value, "strategyDt");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyDtNotEqualTo(String value) {
+            addCriterion("strategy_dt <>", value, "strategyDt");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyDtGreaterThan(String value) {
+            addCriterion("strategy_dt >", value, "strategyDt");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyDtGreaterThanOrEqualTo(String value) {
+            addCriterion("strategy_dt >=", value, "strategyDt");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyDtLessThan(String value) {
+            addCriterion("strategy_dt <", value, "strategyDt");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyDtLessThanOrEqualTo(String value) {
+            addCriterion("strategy_dt <=", value, "strategyDt");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyDtLike(String value) {
+            addCriterion("strategy_dt like", value, "strategyDt");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyDtNotLike(String value) {
+            addCriterion("strategy_dt not like", value, "strategyDt");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyDtIn(List<String> values) {
+            addCriterion("strategy_dt in", values, "strategyDt");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyDtNotIn(List<String> values) {
+            addCriterion("strategy_dt not in", values, "strategyDt");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyDtBetween(String value1, String value2) {
+            addCriterion("strategy_dt between", value1, value2, "strategyDt");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyDtNotBetween(String value1, String value2) {
+            addCriterion("strategy_dt not between", value1, value2, "strategyDt");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdIsNull() {
+            addCriterion("gh_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdIsNotNull() {
+            addCriterion("gh_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdEqualTo(String value) {
+            addCriterion("gh_id =", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdNotEqualTo(String value) {
+            addCriterion("gh_id <>", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdGreaterThan(String value) {
+            addCriterion("gh_id >", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdGreaterThanOrEqualTo(String value) {
+            addCriterion("gh_id >=", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdLessThan(String value) {
+            addCriterion("gh_id <", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdLessThanOrEqualTo(String value) {
+            addCriterion("gh_id <=", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdLike(String value) {
+            addCriterion("gh_id like", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdNotLike(String value) {
+            addCriterion("gh_id not like", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdIn(List<String> values) {
+            addCriterion("gh_id in", values, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdNotIn(List<String> values) {
+            addCriterion("gh_id not in", values, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdBetween(String value1, String value2) {
+            addCriterion("gh_id between", value1, value2, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdNotBetween(String value1, String value2) {
+            addCriterion("gh_id not between", value1, value2, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTypeIsNull() {
+            addCriterion("msg_type is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTypeIsNotNull() {
+            addCriterion("msg_type is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTypeEqualTo(Integer value) {
+            addCriterion("msg_type =", value, "msgType");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTypeNotEqualTo(Integer value) {
+            addCriterion("msg_type <>", value, "msgType");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTypeGreaterThan(Integer value) {
+            addCriterion("msg_type >", value, "msgType");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTypeGreaterThanOrEqualTo(Integer value) {
+            addCriterion("msg_type >=", value, "msgType");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTypeLessThan(Integer value) {
+            addCriterion("msg_type <", value, "msgType");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTypeLessThanOrEqualTo(Integer value) {
+            addCriterion("msg_type <=", value, "msgType");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTypeIn(List<Integer> values) {
+            addCriterion("msg_type in", values, "msgType");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTypeNotIn(List<Integer> values) {
+            addCriterion("msg_type not in", values, "msgType");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTypeBetween(Integer value1, Integer value2) {
+            addCriterion("msg_type between", value1, value2, "msgType");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTypeNotBetween(Integer value1, Integer value2) {
+            addCriterion("msg_type not between", value1, value2, "msgType");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleIsNull() {
+            addCriterion("title is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleIsNotNull() {
+            addCriterion("title is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleEqualTo(String value) {
+            addCriterion("title =", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotEqualTo(String value) {
+            addCriterion("title <>", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleGreaterThan(String value) {
+            addCriterion("title >", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleGreaterThanOrEqualTo(String value) {
+            addCriterion("title >=", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleLessThan(String value) {
+            addCriterion("title <", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleLessThanOrEqualTo(String value) {
+            addCriterion("title <=", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleLike(String value) {
+            addCriterion("title like", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotLike(String value) {
+            addCriterion("title not like", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleIn(List<String> values) {
+            addCriterion("title in", values, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotIn(List<String> values) {
+            addCriterion("title not in", values, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleBetween(String value1, String value2) {
+            addCriterion("title between", value1, value2, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotBetween(String value1, String value2) {
+            addCriterion("title not between", value1, value2, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverUrlIsNull() {
+            addCriterion("cover_url is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverUrlIsNotNull() {
+            addCriterion("cover_url is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverUrlEqualTo(String value) {
+            addCriterion("cover_url =", value, "coverUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverUrlNotEqualTo(String value) {
+            addCriterion("cover_url <>", value, "coverUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverUrlGreaterThan(String value) {
+            addCriterion("cover_url >", value, "coverUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverUrlGreaterThanOrEqualTo(String value) {
+            addCriterion("cover_url >=", value, "coverUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverUrlLessThan(String value) {
+            addCriterion("cover_url <", value, "coverUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverUrlLessThanOrEqualTo(String value) {
+            addCriterion("cover_url <=", value, "coverUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverUrlLike(String value) {
+            addCriterion("cover_url like", value, "coverUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverUrlNotLike(String value) {
+            addCriterion("cover_url not like", value, "coverUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverUrlIn(List<String> values) {
+            addCriterion("cover_url in", values, "coverUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverUrlNotIn(List<String> values) {
+            addCriterion("cover_url not in", values, "coverUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverUrlBetween(String value1, String value2) {
+            addCriterion("cover_url between", value1, value2, "coverUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverUrlNotBetween(String value1, String value2) {
+            addCriterion("cover_url not between", value1, value2, "coverUrl");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniAppIdIsNull() {
+            addCriterion("mini_app_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniAppIdIsNotNull() {
+            addCriterion("mini_app_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniAppIdEqualTo(String value) {
+            addCriterion("mini_app_id =", value, "miniAppId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniAppIdNotEqualTo(String value) {
+            addCriterion("mini_app_id <>", value, "miniAppId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniAppIdGreaterThan(String value) {
+            addCriterion("mini_app_id >", value, "miniAppId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniAppIdGreaterThanOrEqualTo(String value) {
+            addCriterion("mini_app_id >=", value, "miniAppId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniAppIdLessThan(String value) {
+            addCriterion("mini_app_id <", value, "miniAppId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniAppIdLessThanOrEqualTo(String value) {
+            addCriterion("mini_app_id <=", value, "miniAppId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniAppIdLike(String value) {
+            addCriterion("mini_app_id like", value, "miniAppId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniAppIdNotLike(String value) {
+            addCriterion("mini_app_id not like", value, "miniAppId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniAppIdIn(List<String> values) {
+            addCriterion("mini_app_id in", values, "miniAppId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniAppIdNotIn(List<String> values) {
+            addCriterion("mini_app_id not in", values, "miniAppId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniAppIdBetween(String value1, String value2) {
+            addCriterion("mini_app_id between", value1, value2, "miniAppId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniAppIdNotBetween(String value1, String value2) {
+            addCriterion("mini_app_id not between", value1, value2, "miniAppId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniPagePathIsNull() {
+            addCriterion("mini_page_path is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniPagePathIsNotNull() {
+            addCriterion("mini_page_path is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniPagePathEqualTo(String value) {
+            addCriterion("mini_page_path =", value, "miniPagePath");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniPagePathNotEqualTo(String value) {
+            addCriterion("mini_page_path <>", value, "miniPagePath");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniPagePathGreaterThan(String value) {
+            addCriterion("mini_page_path >", value, "miniPagePath");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniPagePathGreaterThanOrEqualTo(String value) {
+            addCriterion("mini_page_path >=", value, "miniPagePath");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniPagePathLessThan(String value) {
+            addCriterion("mini_page_path <", value, "miniPagePath");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniPagePathLessThanOrEqualTo(String value) {
+            addCriterion("mini_page_path <=", value, "miniPagePath");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniPagePathLike(String value) {
+            addCriterion("mini_page_path like", value, "miniPagePath");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniPagePathNotLike(String value) {
+            addCriterion("mini_page_path not like", value, "miniPagePath");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniPagePathIn(List<String> values) {
+            addCriterion("mini_page_path in", values, "miniPagePath");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniPagePathNotIn(List<String> values) {
+            addCriterion("mini_page_path not in", values, "miniPagePath");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniPagePathBetween(String value1, String value2) {
+            addCriterion("mini_page_path between", value1, value2, "miniPagePath");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniPagePathNotBetween(String value1, String value2) {
+            addCriterion("mini_page_path not between", value1, value2, "miniPagePath");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniVideoIdIsNull() {
+            addCriterion("mini_video_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniVideoIdIsNotNull() {
+            addCriterion("mini_video_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniVideoIdEqualTo(Long value) {
+            addCriterion("mini_video_id =", value, "miniVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniVideoIdNotEqualTo(Long value) {
+            addCriterion("mini_video_id <>", value, "miniVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniVideoIdGreaterThan(Long value) {
+            addCriterion("mini_video_id >", value, "miniVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniVideoIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("mini_video_id >=", value, "miniVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniVideoIdLessThan(Long value) {
+            addCriterion("mini_video_id <", value, "miniVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniVideoIdLessThanOrEqualTo(Long value) {
+            addCriterion("mini_video_id <=", value, "miniVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniVideoIdIn(List<Long> values) {
+            addCriterion("mini_video_id in", values, "miniVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniVideoIdNotIn(List<Long> values) {
+            addCriterion("mini_video_id not in", values, "miniVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniVideoIdBetween(Long value1, Long value2) {
+            addCriterion("mini_video_id between", value1, value2, "miniVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andMiniVideoIdNotBetween(Long value1, Long value2) {
+            addCriterion("mini_video_id not between", value1, value2, "miniVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPagePathUrlIdIsNull() {
+            addCriterion("page_path_url_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPagePathUrlIdIsNotNull() {
+            addCriterion("page_path_url_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPagePathUrlIdEqualTo(Long value) {
+            addCriterion("page_path_url_id =", value, "pagePathUrlId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPagePathUrlIdNotEqualTo(Long value) {
+            addCriterion("page_path_url_id <>", value, "pagePathUrlId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPagePathUrlIdGreaterThan(Long value) {
+            addCriterion("page_path_url_id >", value, "pagePathUrlId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPagePathUrlIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("page_path_url_id >=", value, "pagePathUrlId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPagePathUrlIdLessThan(Long value) {
+            addCriterion("page_path_url_id <", value, "pagePathUrlId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPagePathUrlIdLessThanOrEqualTo(Long value) {
+            addCriterion("page_path_url_id <=", value, "pagePathUrlId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPagePathUrlIdIn(List<Long> values) {
+            addCriterion("page_path_url_id in", values, "pagePathUrlId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPagePathUrlIdNotIn(List<Long> values) {
+            addCriterion("page_path_url_id not in", values, "pagePathUrlId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPagePathUrlIdBetween(Long value1, Long value2) {
+            addCriterion("page_path_url_id between", value1, value2, "pagePathUrlId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPagePathUrlIdNotBetween(Long value1, Long value2) {
+            addCriterion("page_path_url_id not between", value1, value2, "pagePathUrlId");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewsPublishContentIdIsNull() {
+            addCriterion("news_publish_content_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewsPublishContentIdIsNotNull() {
+            addCriterion("news_publish_content_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewsPublishContentIdEqualTo(String value) {
+            addCriterion("news_publish_content_id =", value, "newsPublishContentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewsPublishContentIdNotEqualTo(String value) {
+            addCriterion("news_publish_content_id <>", value, "newsPublishContentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewsPublishContentIdGreaterThan(String value) {
+            addCriterion("news_publish_content_id >", value, "newsPublishContentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewsPublishContentIdGreaterThanOrEqualTo(String value) {
+            addCriterion("news_publish_content_id >=", value, "newsPublishContentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewsPublishContentIdLessThan(String value) {
+            addCriterion("news_publish_content_id <", value, "newsPublishContentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewsPublishContentIdLessThanOrEqualTo(String value) {
+            addCriterion("news_publish_content_id <=", value, "newsPublishContentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewsPublishContentIdLike(String value) {
+            addCriterion("news_publish_content_id like", value, "newsPublishContentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewsPublishContentIdNotLike(String value) {
+            addCriterion("news_publish_content_id not like", value, "newsPublishContentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewsPublishContentIdIn(List<String> values) {
+            addCriterion("news_publish_content_id in", values, "newsPublishContentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewsPublishContentIdNotIn(List<String> values) {
+            addCriterion("news_publish_content_id not in", values, "newsPublishContentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewsPublishContentIdBetween(String value1, String value2) {
+            addCriterion("news_publish_content_id between", value1, value2, "newsPublishContentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewsPublishContentIdNotBetween(String value1, String value2) {
+            addCriterion("news_publish_content_id not between", value1, value2, "newsPublishContentId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPlanIdIsNull() {
+            addCriterion("plan_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPlanIdIsNotNull() {
+            addCriterion("plan_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPlanIdEqualTo(String value) {
+            addCriterion("plan_id =", value, "planId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPlanIdNotEqualTo(String value) {
+            addCriterion("plan_id <>", value, "planId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPlanIdGreaterThan(String value) {
+            addCriterion("plan_id >", value, "planId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPlanIdGreaterThanOrEqualTo(String value) {
+            addCriterion("plan_id >=", value, "planId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPlanIdLessThan(String value) {
+            addCriterion("plan_id <", value, "planId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPlanIdLessThanOrEqualTo(String value) {
+            addCriterion("plan_id <=", value, "planId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPlanIdLike(String value) {
+            addCriterion("plan_id like", value, "planId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPlanIdNotLike(String value) {
+            addCriterion("plan_id not like", value, "planId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPlanIdIn(List<String> values) {
+            addCriterion("plan_id in", values, "planId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPlanIdNotIn(List<String> values) {
+            addCriterion("plan_id not in", values, "planId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPlanIdBetween(String value1, String value2) {
+            addCriterion("plan_id between", value1, value2, "planId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPlanIdNotBetween(String value1, String value2) {
+            addCriterion("plan_id not between", value1, value2, "planId");
+            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);
+        }
+    }
+}

+ 125 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/GhDetail.java

@@ -0,0 +1,125 @@
+package com.tzld.piaoquan.api.model.po;
+
+import java.util.Date;
+
+public class GhDetail {
+    private Long id;
+
+    private String ghId;
+
+    private String ghName;
+
+    private Integer type;
+
+    private String category1;
+
+    private String category2;
+
+    private Integer isDelete;
+
+    private Date createTime;
+
+    private Date updateTime;
+
+    private String channel;
+
+    private String videoIds;
+
+    private Integer strategyStatus;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getGhId() {
+        return ghId;
+    }
+
+    public void setGhId(String ghId) {
+        this.ghId = ghId == null ? null : ghId.trim();
+    }
+
+    public String getGhName() {
+        return ghName;
+    }
+
+    public void setGhName(String ghName) {
+        this.ghName = ghName == null ? null : ghName.trim();
+    }
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public String getCategory1() {
+        return category1;
+    }
+
+    public void setCategory1(String category1) {
+        this.category1 = category1 == null ? null : category1.trim();
+    }
+
+    public String getCategory2() {
+        return category2;
+    }
+
+    public void setCategory2(String category2) {
+        this.category2 = category2 == null ? null : category2.trim();
+    }
+
+    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;
+    }
+
+    public String getChannel() {
+        return channel;
+    }
+
+    public void setChannel(String channel) {
+        this.channel = channel == null ? null : channel.trim();
+    }
+
+    public String getVideoIds() {
+        return videoIds;
+    }
+
+    public void setVideoIds(String videoIds) {
+        this.videoIds = videoIds == null ? null : videoIds.trim();
+    }
+
+    public Integer getStrategyStatus() {
+        return strategyStatus;
+    }
+
+    public void setStrategyStatus(Integer strategyStatus) {
+        this.strategyStatus = strategyStatus;
+    }
+}

+ 993 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/GhDetailExample.java

@@ -0,0 +1,993 @@
+package com.tzld.piaoquan.api.model.po;
+
+
+import com.tzld.piaoquan.growth.common.utils.page.Page;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class GhDetailExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+    protected Page page;
+
+    public GhDetailExample() {
+        oredCriteria = new ArrayList<>();
+    }
+
+    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<>();
+        }
+
+        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 andGhIdIsNull() {
+            addCriterion("gh_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdIsNotNull() {
+            addCriterion("gh_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdEqualTo(String value) {
+            addCriterion("gh_id =", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdNotEqualTo(String value) {
+            addCriterion("gh_id <>", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdGreaterThan(String value) {
+            addCriterion("gh_id >", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdGreaterThanOrEqualTo(String value) {
+            addCriterion("gh_id >=", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdLessThan(String value) {
+            addCriterion("gh_id <", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdLessThanOrEqualTo(String value) {
+            addCriterion("gh_id <=", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdLike(String value) {
+            addCriterion("gh_id like", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdNotLike(String value) {
+            addCriterion("gh_id not like", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdIn(List<String> values) {
+            addCriterion("gh_id in", values, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdNotIn(List<String> values) {
+            addCriterion("gh_id not in", values, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdBetween(String value1, String value2) {
+            addCriterion("gh_id between", value1, value2, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdNotBetween(String value1, String value2) {
+            addCriterion("gh_id not between", value1, value2, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhNameIsNull() {
+            addCriterion("gh_name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhNameIsNotNull() {
+            addCriterion("gh_name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhNameEqualTo(String value) {
+            addCriterion("gh_name =", value, "ghName");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhNameNotEqualTo(String value) {
+            addCriterion("gh_name <>", value, "ghName");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhNameGreaterThan(String value) {
+            addCriterion("gh_name >", value, "ghName");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhNameGreaterThanOrEqualTo(String value) {
+            addCriterion("gh_name >=", value, "ghName");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhNameLessThan(String value) {
+            addCriterion("gh_name <", value, "ghName");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhNameLessThanOrEqualTo(String value) {
+            addCriterion("gh_name <=", value, "ghName");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhNameLike(String value) {
+            addCriterion("gh_name like", value, "ghName");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhNameNotLike(String value) {
+            addCriterion("gh_name not like", value, "ghName");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhNameIn(List<String> values) {
+            addCriterion("gh_name in", values, "ghName");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhNameNotIn(List<String> values) {
+            addCriterion("gh_name not in", values, "ghName");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhNameBetween(String value1, String value2) {
+            addCriterion("gh_name between", value1, value2, "ghName");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhNameNotBetween(String value1, String value2) {
+            addCriterion("gh_name not between", value1, value2, "ghName");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeIsNull() {
+            addCriterion("type is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeIsNotNull() {
+            addCriterion("type is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeEqualTo(Integer value) {
+            addCriterion("type =", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotEqualTo(Integer value) {
+            addCriterion("type <>", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeGreaterThan(Integer value) {
+            addCriterion("type >", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeGreaterThanOrEqualTo(Integer value) {
+            addCriterion("type >=", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeLessThan(Integer value) {
+            addCriterion("type <", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeLessThanOrEqualTo(Integer value) {
+            addCriterion("type <=", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeIn(List<Integer> values) {
+            addCriterion("type in", values, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotIn(List<Integer> values) {
+            addCriterion("type not in", values, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeBetween(Integer value1, Integer value2) {
+            addCriterion("type between", value1, value2, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotBetween(Integer value1, Integer value2) {
+            addCriterion("type not between", value1, value2, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory1IsNull() {
+            addCriterion("category1 is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory1IsNotNull() {
+            addCriterion("category1 is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory1EqualTo(String value) {
+            addCriterion("category1 =", value, "category1");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory1NotEqualTo(String value) {
+            addCriterion("category1 <>", value, "category1");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory1GreaterThan(String value) {
+            addCriterion("category1 >", value, "category1");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory1GreaterThanOrEqualTo(String value) {
+            addCriterion("category1 >=", value, "category1");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory1LessThan(String value) {
+            addCriterion("category1 <", value, "category1");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory1LessThanOrEqualTo(String value) {
+            addCriterion("category1 <=", value, "category1");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory1Like(String value) {
+            addCriterion("category1 like", value, "category1");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory1NotLike(String value) {
+            addCriterion("category1 not like", value, "category1");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory1In(List<String> values) {
+            addCriterion("category1 in", values, "category1");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory1NotIn(List<String> values) {
+            addCriterion("category1 not in", values, "category1");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory1Between(String value1, String value2) {
+            addCriterion("category1 between", value1, value2, "category1");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory1NotBetween(String value1, String value2) {
+            addCriterion("category1 not between", value1, value2, "category1");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory2IsNull() {
+            addCriterion("category2 is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory2IsNotNull() {
+            addCriterion("category2 is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory2EqualTo(String value) {
+            addCriterion("category2 =", value, "category2");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory2NotEqualTo(String value) {
+            addCriterion("category2 <>", value, "category2");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory2GreaterThan(String value) {
+            addCriterion("category2 >", value, "category2");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory2GreaterThanOrEqualTo(String value) {
+            addCriterion("category2 >=", value, "category2");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory2LessThan(String value) {
+            addCriterion("category2 <", value, "category2");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory2LessThanOrEqualTo(String value) {
+            addCriterion("category2 <=", value, "category2");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory2Like(String value) {
+            addCriterion("category2 like", value, "category2");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory2NotLike(String value) {
+            addCriterion("category2 not like", value, "category2");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory2In(List<String> values) {
+            addCriterion("category2 in", values, "category2");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory2NotIn(List<String> values) {
+            addCriterion("category2 not in", values, "category2");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory2Between(String value1, String value2) {
+            addCriterion("category2 between", value1, value2, "category2");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategory2NotBetween(String value1, String value2) {
+            addCriterion("category2 not between", value1, value2, "category2");
+            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 Criteria andChannelIsNull() {
+            addCriterion("channel is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelIsNotNull() {
+            addCriterion("channel is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelEqualTo(String value) {
+            addCriterion("channel =", value, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelNotEqualTo(String value) {
+            addCriterion("channel <>", value, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelGreaterThan(String value) {
+            addCriterion("channel >", value, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelGreaterThanOrEqualTo(String value) {
+            addCriterion("channel >=", value, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelLessThan(String value) {
+            addCriterion("channel <", value, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelLessThanOrEqualTo(String value) {
+            addCriterion("channel <=", value, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelLike(String value) {
+            addCriterion("channel like", value, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelNotLike(String value) {
+            addCriterion("channel not like", value, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelIn(List<String> values) {
+            addCriterion("channel in", values, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelNotIn(List<String> values) {
+            addCriterion("channel not in", values, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelBetween(String value1, String value2) {
+            addCriterion("channel between", value1, value2, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andChannelNotBetween(String value1, String value2) {
+            addCriterion("channel not between", value1, value2, "channel");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdsIsNull() {
+            addCriterion("video_ids is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdsIsNotNull() {
+            addCriterion("video_ids is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdsEqualTo(String value) {
+            addCriterion("video_ids =", value, "videoIds");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdsNotEqualTo(String value) {
+            addCriterion("channel <>", value, "videoIds");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdsGreaterThan(String value) {
+            addCriterion("video_ids >", value, "videoIds");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdsGreaterThanOrEqualTo(String value) {
+            addCriterion("video_ids >=", value, "videoIds");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdsLessThan(String value) {
+            addCriterion("video_ids <", value, "videoIds");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdsLessThanOrEqualTo(String value) {
+            addCriterion("video_ids <=", value, "videoIds");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdsLike(String value) {
+            addCriterion("video_ids like", value, "videoIds");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdsNotLike(String value) {
+            addCriterion("video_ids not like", value, "videoIds");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdsIn(List<String> values) {
+            addCriterion("video_ids in", values, "videoIds");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdsNotIn(List<String> values) {
+            addCriterion("video_ids not in", values, "videoIds");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdsBetween(String value1, String value2) {
+            addCriterion("video_ids between", value1, value2, "videoIds");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdsNotBetween(String value1, String value2) {
+            addCriterion("video_ids not between", value1, value2, "videoIds");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyStatusIsNull() {
+            addCriterion("strategy_status is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyStatusIsNotNull() {
+            addCriterion("strategy_status is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyStatusEqualTo(Integer value) {
+            addCriterion("strategy_status =", value, "strategyStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyStatusNotEqualTo(Integer value) {
+            addCriterion("strategy_status <>", value, "strategyStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyStatusGreaterThan(Integer value) {
+            addCriterion("strategy_status >", value, "strategyStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyStatusGreaterThanOrEqualTo(Integer value) {
+            addCriterion("strategy_status >=", value, "strategyStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyStatusLessThan(Integer value) {
+            addCriterion("strategy_status <", value, "strategyStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyStatusLessThanOrEqualTo(Integer value) {
+            addCriterion("strategy_status <=", value, "strategyStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyStatusIn(List<Integer> values) {
+            addCriterion("strategy_status in", values, "strategyStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyStatusNotIn(List<Integer> values) {
+            addCriterion("strategy_status not in", values, "strategyStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyStatusBetween(Integer value1, Integer value2) {
+            addCriterion("strategy_status between", value1, value2, "strategyStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andStrategyStatusNotBetween(Integer value1, Integer value2) {
+            addCriterion("strategy_status not between", value1, value2, "strategyStatus");
+            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);
+        }
+    }
+}

+ 88 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/PushMessageCallback.java

@@ -0,0 +1,88 @@
+package com.tzld.piaoquan.api.model.po;
+
+import java.util.Date;
+
+public class PushMessageCallback {
+    private Long id;
+
+    private String ghId;
+
+    private String openId;
+
+    private Long timestamp;
+
+    private Integer msgType;
+
+    private Long videoId;
+
+    private Date createTime;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getGhId() {
+        return ghId;
+    }
+
+    public void setGhId(String ghId) {
+        this.ghId = ghId == null ? null : ghId.trim();
+    }
+
+    public String getOpenId() {
+        return openId;
+    }
+
+    public void setOpenId(String openId) {
+        this.openId = openId == null ? null : openId.trim();
+    }
+
+    public Long getTimestamp() {
+        return timestamp;
+    }
+
+    public void setTimestamp(Long timestamp) {
+        this.timestamp = timestamp;
+    }
+
+    public Integer getMsgType() {
+        return msgType;
+    }
+
+    public void setMsgType(Integer msgType) {
+        this.msgType = msgType;
+    }
+
+    public Long getVideoId() {
+        return videoId;
+    }
+
+    public void setVideoId(Long videoId) {
+        this.videoId = videoId;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    @Override
+    public String toString() {
+        return "PushMessageCallback{" +
+                "id=" + id +
+                ", ghId='" + ghId + '\'' +
+                ", openId='" + openId + '\'' +
+                ", timestamp=" + timestamp +
+                ", msgType=" + msgType +
+                ", videoId=" + videoId +
+                ", createTime=" + createTime +
+                '}';
+    }
+}

+ 640 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/PushMessageCallbackExample.java

@@ -0,0 +1,640 @@
+package com.tzld.piaoquan.api.model.po;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class PushMessageCallbackExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    public PushMessageCallbackExample() {
+        oredCriteria = new ArrayList<>();
+    }
+
+    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;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<>();
+        }
+
+        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 andGhIdIsNull() {
+            addCriterion("gh_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdIsNotNull() {
+            addCriterion("gh_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdEqualTo(String value) {
+            addCriterion("gh_id =", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdNotEqualTo(String value) {
+            addCriterion("gh_id <>", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdGreaterThan(String value) {
+            addCriterion("gh_id >", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdGreaterThanOrEqualTo(String value) {
+            addCriterion("gh_id >=", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdLessThan(String value) {
+            addCriterion("gh_id <", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdLessThanOrEqualTo(String value) {
+            addCriterion("gh_id <=", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdLike(String value) {
+            addCriterion("gh_id like", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdNotLike(String value) {
+            addCriterion("gh_id not like", value, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdIn(List<String> values) {
+            addCriterion("gh_id in", values, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdNotIn(List<String> values) {
+            addCriterion("gh_id not in", values, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdBetween(String value1, String value2) {
+            addCriterion("gh_id between", value1, value2, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhIdNotBetween(String value1, String value2) {
+            addCriterion("gh_id not between", value1, value2, "ghId");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenIdIsNull() {
+            addCriterion("open_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenIdIsNotNull() {
+            addCriterion("open_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenIdEqualTo(String value) {
+            addCriterion("open_id =", value, "openId");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenIdNotEqualTo(String value) {
+            addCriterion("open_id <>", value, "openId");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenIdGreaterThan(String value) {
+            addCriterion("open_id >", value, "openId");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenIdGreaterThanOrEqualTo(String value) {
+            addCriterion("open_id >=", value, "openId");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenIdLessThan(String value) {
+            addCriterion("open_id <", value, "openId");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenIdLessThanOrEqualTo(String value) {
+            addCriterion("open_id <=", value, "openId");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenIdLike(String value) {
+            addCriterion("open_id like", value, "openId");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenIdNotLike(String value) {
+            addCriterion("open_id not like", value, "openId");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenIdIn(List<String> values) {
+            addCriterion("open_id in", values, "openId");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenIdNotIn(List<String> values) {
+            addCriterion("open_id not in", values, "openId");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenIdBetween(String value1, String value2) {
+            addCriterion("open_id between", value1, value2, "openId");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenIdNotBetween(String value1, String value2) {
+            addCriterion("open_id not between", value1, value2, "openId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTimestampIsNull() {
+            addCriterion("timestamp is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTimestampIsNotNull() {
+            addCriterion("timestamp is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTimestampEqualTo(Long value) {
+            addCriterion("timestamp =", value, "timestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andTimestampNotEqualTo(Long value) {
+            addCriterion("timestamp <>", value, "timestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andTimestampGreaterThan(Long value) {
+            addCriterion("timestamp >", value, "timestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andTimestampGreaterThanOrEqualTo(Long value) {
+            addCriterion("timestamp >=", value, "timestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andTimestampLessThan(Long value) {
+            addCriterion("timestamp <", value, "timestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andTimestampLessThanOrEqualTo(Long value) {
+            addCriterion("timestamp <=", value, "timestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andTimestampIn(List<Long> values) {
+            addCriterion("timestamp in", values, "timestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andTimestampNotIn(List<Long> values) {
+            addCriterion("timestamp not in", values, "timestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andTimestampBetween(Long value1, Long value2) {
+            addCriterion("timestamp between", value1, value2, "timestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andTimestampNotBetween(Long value1, Long value2) {
+            addCriterion("timestamp not between", value1, value2, "timestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTypeIsNull() {
+            addCriterion("msg_type is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTypeIsNotNull() {
+            addCriterion("msg_type is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTypeEqualTo(Integer value) {
+            addCriterion("msg_type =", value, "msgType");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTypeNotEqualTo(Integer value) {
+            addCriterion("msg_type <>", value, "msgType");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTypeGreaterThan(Integer value) {
+            addCriterion("msg_type >", value, "msgType");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTypeGreaterThanOrEqualTo(Integer value) {
+            addCriterion("msg_type >=", value, "msgType");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTypeLessThan(Integer value) {
+            addCriterion("msg_type <", value, "msgType");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTypeLessThanOrEqualTo(Integer value) {
+            addCriterion("msg_type <=", value, "msgType");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTypeIn(List<Integer> values) {
+            addCriterion("msg_type in", values, "msgType");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTypeNotIn(List<Integer> values) {
+            addCriterion("msg_type not in", values, "msgType");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTypeBetween(Integer value1, Integer value2) {
+            addCriterion("msg_type between", value1, value2, "msgType");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTypeNotBetween(Integer value1, Integer value2) {
+            addCriterion("msg_type not between", value1, value2, "msgType");
+            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 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 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);
+        }
+    }
+}

+ 65 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/ReplyStaff.java

@@ -0,0 +1,65 @@
+package com.tzld.piaoquan.api.model.po;
+
+import java.util.Date;
+
+public class ReplyStaff {
+    private Long id;
+
+    private String userId;
+
+    private String name;
+
+    private Integer isDelete;
+
+    private Date createTime;
+
+    private Date updateTime;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getUserId() {
+        return userId;
+    }
+
+    public void setUserId(String userId) {
+        this.userId = userId == null ? null : userId.trim();
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name == null ? null : name.trim();
+    }
+
+    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;
+    }
+}

+ 580 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/ReplyStaffExample.java

@@ -0,0 +1,580 @@
+package com.tzld.piaoquan.api.model.po;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class ReplyStaffExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    public ReplyStaffExample() {
+        oredCriteria = new ArrayList<>();
+    }
+
+    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;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<>();
+        }
+
+        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 andUserIdIsNull() {
+            addCriterion("user_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUserIdIsNotNull() {
+            addCriterion("user_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUserIdEqualTo(String value) {
+            addCriterion("user_id =", value, "userId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUserIdNotEqualTo(String value) {
+            addCriterion("user_id <>", value, "userId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUserIdGreaterThan(String value) {
+            addCriterion("user_id >", value, "userId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUserIdGreaterThanOrEqualTo(String value) {
+            addCriterion("user_id >=", value, "userId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUserIdLessThan(String value) {
+            addCriterion("user_id <", value, "userId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUserIdLessThanOrEqualTo(String value) {
+            addCriterion("user_id <=", value, "userId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUserIdLike(String value) {
+            addCriterion("user_id like", value, "userId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUserIdNotLike(String value) {
+            addCriterion("user_id not like", value, "userId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUserIdIn(List<String> values) {
+            addCriterion("user_id in", values, "userId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUserIdNotIn(List<String> values) {
+            addCriterion("user_id not in", values, "userId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUserIdBetween(String value1, String value2) {
+            addCriterion("user_id between", value1, value2, "userId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUserIdNotBetween(String value1, String value2) {
+            addCriterion("user_id not between", value1, value2, "userId");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIsNull() {
+            addCriterion("name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIsNotNull() {
+            addCriterion("name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameEqualTo(String value) {
+            addCriterion("name =", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotEqualTo(String value) {
+            addCriterion("name <>", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameGreaterThan(String value) {
+            addCriterion("name >", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameGreaterThanOrEqualTo(String value) {
+            addCriterion("name >=", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLessThan(String value) {
+            addCriterion("name <", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLessThanOrEqualTo(String value) {
+            addCriterion("name <=", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameLike(String value) {
+            addCriterion("name like", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotLike(String value) {
+            addCriterion("name not like", value, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameIn(List<String> values) {
+            addCriterion("name in", values, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotIn(List<String> values) {
+            addCriterion("name not in", values, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameBetween(String value1, String value2) {
+            addCriterion("name between", value1, value2, "name");
+            return (Criteria) this;
+        }
+
+        public Criteria andNameNotBetween(String value1, String value2) {
+            addCriterion("name not between", value1, value2, "name");
+            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);
+        }
+    }
+}

+ 9 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/vo/AccessTokenParam.java

@@ -0,0 +1,9 @@
+package com.tzld.piaoquan.api.model.vo;
+
+import lombok.Data;
+
+@Data
+public class AccessTokenParam {
+
+    private String secret;
+}

+ 11 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/vo/AccessTokenVo.java

@@ -0,0 +1,11 @@
+package com.tzld.piaoquan.api.model.vo;
+
+import lombok.Data;
+
+@Data
+public class AccessTokenVo {
+
+    private String accessToken;
+
+    private Long expires;
+}

+ 21 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/vo/CallbackParam.java

@@ -0,0 +1,21 @@
+package com.tzld.piaoquan.api.model.vo;
+
+import com.tzld.piaoquan.api.model.bo.ReplyInfo;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class CallbackParam {
+
+    private String ghId;
+
+    private String accessToken;
+
+    private String openId;
+
+    private Long timestamp;
+
+    private List<ReplyInfo> replyInfo;
+
+}

+ 35 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/vo/GhDetailVo.java

@@ -0,0 +1,35 @@
+package com.tzld.piaoquan.api.model.vo;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class GhDetailVo {
+
+    private Long id;
+
+    private String accountId;
+
+    private String accountName;
+
+    private Integer type;
+
+    private String typeName;
+
+    private String category1;
+
+    private String category2;
+
+    private String createTime;
+
+    private String updateTime;
+
+    private String channel;
+
+    private List<Long> videoIds;
+
+    private Integer strategyStatus;
+
+    private String strategyStatusName;
+}

+ 16 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/vo/GhTypeVo.java

@@ -0,0 +1,16 @@
+package com.tzld.piaoquan.api.model.vo;
+
+import lombok.Data;
+
+@Data
+public class GhTypeVo {
+
+    private Integer type;
+
+    private String name;
+
+    public GhTypeVo(Integer type, String name) {
+        this.type = type;
+        this.name = name;
+    }
+}

+ 13 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/vo/PushMessageParam.java

@@ -0,0 +1,13 @@
+package com.tzld.piaoquan.api.model.vo;
+
+import lombok.Data;
+import lombok.ToString;
+
+@Data
+@ToString
+public class PushMessageParam {
+
+    private String accessToken;
+
+    private String ghId;
+}

+ 14 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/vo/PushMessageVo.java

@@ -0,0 +1,14 @@
+package com.tzld.piaoquan.api.model.vo;
+
+import com.tzld.piaoquan.api.model.bo.MiniData;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class PushMessageVo {
+
+    private Integer groupIdx;
+
+    private List<MiniData> components;
+}

+ 12 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/vo/ReportUvVo.java

@@ -0,0 +1,12 @@
+package com.tzld.piaoquan.api.model.vo;
+
+import lombok.Data;
+
+@Data
+public class ReportUvVo {
+
+    private String ghId;
+
+    private Long uv;
+
+}

+ 16 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/vo/StrategyStatusVo.java

@@ -0,0 +1,16 @@
+package com.tzld.piaoquan.api.model.vo;
+
+import lombok.Data;
+
+@Data
+public class StrategyStatusVo {
+
+    private Integer status;
+
+    private String name;
+
+    public StrategyStatusVo(Integer status, String name) {
+        this.status = status;
+        this.name = name;
+    }
+}

+ 13 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/vo/WeComPushMessageParam.java

@@ -0,0 +1,13 @@
+package com.tzld.piaoquan.api.model.vo;
+
+import lombok.Data;
+import lombok.ToString;
+
+@Data
+@ToString
+public class WeComPushMessageParam {
+
+    private String corpId;
+
+    private String userId;
+}

+ 14 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/vo/WeComPushMessageVo.java

@@ -0,0 +1,14 @@
+package com.tzld.piaoquan.api.model.vo;
+
+import com.tzld.piaoquan.api.model.bo.MsgData;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class WeComPushMessageVo {
+
+    private Integer groupIndex;
+
+    private List<MsgData> msgDataList;
+}

+ 58 - 0
api-module/src/main/java/com/tzld/piaoquan/api/mq/MessageCallbackCustomer.java

@@ -0,0 +1,58 @@
+package com.tzld.piaoquan.api.mq;
+
+
+import com.alibaba.fastjson.JSONObject;
+
+import com.aliyun.openservices.ons.api.Action;
+import com.aliyun.openservices.ons.api.ConsumeContext;
+import com.aliyun.openservices.ons.api.Message;
+import com.aliyun.openservices.ons.api.MessageListener;
+import com.tzld.piaoquan.api.dao.mapper.NewPushMessageCallbackMapper;
+import com.tzld.piaoquan.api.model.bo.ReplyInfo;
+import com.tzld.piaoquan.api.model.po.PushMessageCallback;
+import com.tzld.piaoquan.api.model.vo.CallbackParam;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.util.CollectionUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Slf4j
+@Component
+public class MessageCallbackCustomer implements MessageListener {
+
+
+    @Autowired
+    private NewPushMessageCallbackMapper newPushMessageCallbackMapper;
+
+    @Override
+    public Action consume(Message message, ConsumeContext consumeContext) {
+        CallbackParam param = JSONObject.parseObject(new String(message.getBody()), CallbackParam.class);
+        log.info("param = {}", param);
+        if (CollectionUtils.isEmpty(param.getReplyInfo())) {
+            log.error("CallbackParam replyInfo is empty {}", param);
+        }
+        PushMessageCallback pushMessageCallback = new PushMessageCallback();
+        pushMessageCallback.setGhId(param.getGhId());
+        pushMessageCallback.setTimestamp(param.getTimestamp());
+        pushMessageCallback.setOpenId(param.getOpenId());
+        List<PushMessageCallback> insertList = new ArrayList<>();
+        for (ReplyInfo replyInfo : param.getReplyInfo()) {
+            PushMessageCallback insertPushMessageCallback = new PushMessageCallback();
+            BeanUtils.copyProperties(pushMessageCallback, insertPushMessageCallback);
+            insertPushMessageCallback.setMsgType(replyInfo.getMsgType());
+            insertPushMessageCallback.setVideoId(replyInfo.getMiniVideoId());
+            insertList.add(insertPushMessageCallback);
+        }
+        try {
+            newPushMessageCallbackMapper.insertList(insertList);
+        } catch (Exception e) {
+            log.error("PushMessageCallback newPushMessageCallbackMapper insert pushMessageCallback={}, error={}", pushMessageCallback, e.getMessage());
+            return Action.ReconsumeLater;
+        }
+        return Action.CommitMessage;
+    }
+}

+ 69 - 0
api-module/src/main/java/com/tzld/piaoquan/api/mq/MessageCallbackProducer.java

@@ -0,0 +1,69 @@
+package com.tzld.piaoquan.api.mq;
+
+import com.alibaba.fastjson.JSON;
+import com.aliyun.openservices.ons.api.Message;
+import com.aliyun.openservices.ons.api.SendResult;
+import com.aliyun.openservices.ons.api.bean.ProducerBean;
+
+import com.tzld.piaoquan.api.model.vo.CallbackParam;
+import com.tzld.piaoquan.api.service.GhAccessTokenService;
+import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
+import com.tzld.piaoquan.growth.common.common.enums.ExceptionCodeEnum;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+import java.nio.charset.StandardCharsets;
+
+@Slf4j
+@Component
+public class MessageCallbackProducer {
+
+    @Value("${pushMessage.callback.topic}")
+    private String TOPIC;
+
+    @Value("${pushMessage.callback.tag}")
+    private String TAG;
+
+    @Autowired
+    private ProducerBean producer;
+
+    @Autowired
+    private GhAccessTokenService ghAccessTokenService;
+
+    public CommonResponse<Void> sendMessage(CallbackParam param) {
+        if (param == null || param.getAccessToken() == null) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAMS_ERROR, "参数错误");
+        }
+        if (!ghAccessTokenService.validateAccessToken(param.getAccessToken())) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAMS_ERROR, "accessToken错误或者已失效");
+        }
+        Message message = new Message();
+        message.setTopic(TOPIC);
+        message.setTag(TAG);
+        message.setBody(JSON.toJSONString(param).getBytes(StandardCharsets.UTF_8));
+        try {
+            log.info("sendMessage = {}", message);
+            producer.send(message);
+        } catch (Exception e) {
+            log.error("error send param = {}", param);
+            log.error("error", e);
+            //重试
+            retry(message);
+        }
+        return CommonResponse.success();
+    }
+
+    private void retry(Message message) {
+        for (int i = 0; i < 3; i++) {
+            try {
+                SendResult sendResult = producer.send(message);
+                log.info("sendResult = {}", sendResult);
+                return;
+            } catch (Exception e) {
+                log.error("retry send error {}", i, e);
+            }
+        }
+    }
+}

+ 0 - 7
api-module/src/main/java/com/tzld/piaoquan/api/service/AccessTokenService.java

@@ -1,7 +0,0 @@
-package com.tzld.piaoquan.api.service;
-
-public interface AccessTokenService {
-
-    String getWeComAccessToken(Long corpId);
-
-}

+ 16 - 0
api-module/src/main/java/com/tzld/piaoquan/api/service/GhAccessTokenService.java

@@ -0,0 +1,16 @@
+package com.tzld.piaoquan.api.service;
+
+import com.tzld.piaoquan.api.common.enums.SecretEnum;
+import com.tzld.piaoquan.api.model.vo.AccessTokenParam;
+import com.tzld.piaoquan.api.model.vo.AccessTokenVo;
+import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
+
+public interface GhAccessTokenService {
+
+    CommonResponse<AccessTokenVo> getAccessToken(AccessTokenParam param);
+
+    boolean validateAccessToken(String accessToken);
+
+    SecretEnum getSecretEnum(String accessToken);
+
+}

+ 17 - 0
api-module/src/main/java/com/tzld/piaoquan/api/service/GhDetailService.java

@@ -0,0 +1,17 @@
+package com.tzld.piaoquan.api.service;
+
+
+import com.tzld.piaoquan.api.model.vo.GhDetailVo;
+import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
+import com.tzld.piaoquan.growth.common.utils.page.Page;
+
+public interface GhDetailService {
+
+    CommonResponse<Page<GhDetailVo>> getGhDetailList(Integer pageNum, Integer pageSize, String accountId);
+
+    CommonResponse<Void> addGhDetail(GhDetailVo ghDetailVo);
+
+    CommonResponse<Void> updateDetail(GhDetailVo ghDetailVo);
+
+    CommonResponse<Void> deleteDetail(Long id);
+}

+ 0 - 15
api-module/src/main/java/com/tzld/piaoquan/api/service/MessageAttachmentService.java

@@ -1,15 +0,0 @@
-package com.tzld.piaoquan.api.service;
-
-import com.tzld.piaoquan.common.common.base.CommonResponse;
-import com.tzld.piaoquan.common.model.po.MessageAttachment;
-import com.tzld.piaoquan.common.model.vo.GuaranteedParam;
-
-import java.util.List;
-
-public interface MessageAttachmentService {
-
-    void addMiniProgram(List<MessageAttachment> messageAttachmentList, Long createTime);
-
-    CommonResponse<Void> createGuaranteedMiniProgram(GuaranteedParam guaranteedParam);
-
-}

+ 18 - 0
api-module/src/main/java/com/tzld/piaoquan/api/service/ThirdPartyService.java

@@ -0,0 +1,18 @@
+package com.tzld.piaoquan.api.service;
+
+
+import com.tzld.piaoquan.api.model.vo.PushMessageParam;
+import com.tzld.piaoquan.api.model.vo.PushMessageVo;
+import com.tzld.piaoquan.api.model.vo.ReportUvVo;
+import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service
+public interface ThirdPartyService {
+    CommonResponse<List<PushMessageVo>> getPushMessage(PushMessageParam param);
+
+
+    CommonResponse<List<ReportUvVo>> getReportUv(String date, String accessToken);
+}

+ 0 - 16
api-module/src/main/java/com/tzld/piaoquan/api/service/UserService.java

@@ -1,16 +0,0 @@
-package com.tzld.piaoquan.api.service;
-
-import com.tzld.piaoquan.common.model.po.Staff;
-
-
-public interface UserService {
-
-
-    void addStaffWithUser(String externalUserId, String staffUserId, Long corpId);
-
-    void insertStaffWithUser(String externalUserId, Staff staff, Long corpId);
-
-    void delStaffWithUser(String externalUserId, String carrierId, Long deleteTime);
-
-    void delStaffWithUser(Long userId, Long staffId, Long deleteTime);
-}

+ 14 - 0
api-module/src/main/java/com/tzld/piaoquan/api/service/WeComService.java

@@ -0,0 +1,14 @@
+package com.tzld.piaoquan.api.service;
+
+
+
+import com.tzld.piaoquan.api.model.vo.WeComPushMessageParam;
+import com.tzld.piaoquan.api.model.vo.WeComPushMessageVo;
+import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
+
+import java.util.List;
+
+public interface WeComService {
+
+    CommonResponse<List<WeComPushMessageVo>> getPushMessage(WeComPushMessageParam param);
+}

+ 87 - 0
api-module/src/main/java/com/tzld/piaoquan/api/service/impl/GhAccessTokenServiceImpl.java

@@ -0,0 +1,87 @@
+package com.tzld.piaoquan.api.service.impl;
+
+import com.tzld.piaoquan.api.common.enums.SecretEnum;
+import com.tzld.piaoquan.api.model.vo.AccessTokenParam;
+import com.tzld.piaoquan.api.model.vo.AccessTokenVo;
+import com.tzld.piaoquan.api.service.GhAccessTokenService;
+import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
+import com.tzld.piaoquan.growth.common.common.enums.ExceptionCodeEnum;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.stereotype.Service;
+
+import java.util.Map;
+import java.util.UUID;
+import java.util.concurrent.TimeUnit;
+
+@Slf4j
+@Service
+public class GhAccessTokenServiceImpl implements GhAccessTokenService {
+
+    private static final String ACCESS_TOKEN_LIST = "access_token_list";
+
+    @Autowired
+    private RedisTemplate<String, String> stringRedisTemplate;
+
+
+    @Override
+    public CommonResponse<AccessTokenVo> getAccessToken(AccessTokenParam param) throws RuntimeException {
+        if (param == null || StringUtils.isEmpty(param.getSecret())) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAMS_ERROR, "未找到 secret");
+        }
+        if (!SecretEnum.contains(param.getSecret())) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAMS_ERROR, "secret 不存在");
+        }
+        AccessTokenVo accessTokenVo = new AccessTokenVo();
+        String accessToken = (String) stringRedisTemplate.opsForValue().get(param.getSecret());
+        if (StringUtils.isNotEmpty(accessToken)) {
+            Long expire = Long.parseLong(String.valueOf(stringRedisTemplate.getExpire(param.getSecret(), TimeUnit.SECONDS)));
+            accessTokenVo.setAccessToken(accessToken);
+            accessTokenVo.setExpires(expire);
+            if (stringRedisTemplate.opsForHash().size(ACCESS_TOKEN_LIST) > 20) {
+                Map<Object, Object> entries = stringRedisTemplate.opsForHash().entries(ACCESS_TOKEN_LIST);
+                entries.forEach((k, v) -> {
+                    long timestamp = Long.parseLong((String) v);
+                    if (System.currentTimeMillis() / 1000 > timestamp) {
+                        stringRedisTemplate.opsForHash().delete(ACCESS_TOKEN_LIST, k);
+                    }
+                });
+            }
+        } else {
+            String newAccessToken = UUID.randomUUID().toString().replace("-", "");
+            stringRedisTemplate.opsForValue().set(param.getSecret(), newAccessToken, 2L, TimeUnit.HOURS);
+            stringRedisTemplate.opsForValue().set(newAccessToken, param.getSecret(), 3L, TimeUnit.HOURS);
+            long expire = 7200L;
+            String timestamp = String.valueOf(System.currentTimeMillis() / 1000 + expire + 600);
+            stringRedisTemplate.opsForHash().put(ACCESS_TOKEN_LIST, newAccessToken, timestamp);
+            accessTokenVo.setAccessToken(newAccessToken);
+            accessTokenVo.setExpires(expire);
+        }
+        return CommonResponse.success(accessTokenVo);
+    }
+
+    @Override
+    public boolean validateAccessToken(String accessToken) {
+        Object o = stringRedisTemplate.opsForHash().get(ACCESS_TOKEN_LIST, accessToken);
+        if (o == null) {
+            return false;
+        }
+        long timestamp = Long.parseLong((String) o);
+        if (System.currentTimeMillis() / 1000 > timestamp) {
+            stringRedisTemplate.opsForHash().delete(ACCESS_TOKEN_LIST, accessToken);
+            return false;
+        }
+        return true;
+    }
+
+    @Override
+    public SecretEnum getSecretEnum(String accessToken) {
+        String secret = (String) stringRedisTemplate.opsForValue().get(accessToken);
+        if(StringUtils.isEmpty(secret)){
+            return null;
+        }
+        return SecretEnum.get(secret);
+    }
+}

+ 144 - 0
api-module/src/main/java/com/tzld/piaoquan/api/service/impl/GhDetailServiceImpl.java

@@ -0,0 +1,144 @@
+package com.tzld.piaoquan.api.service.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.tzld.piaoquan.api.common.enums.GhTypeEnum;
+import com.tzld.piaoquan.api.common.enums.StrategyStatusEnum;
+import com.tzld.piaoquan.api.dao.mapper.GhDetailMapper;
+import com.tzld.piaoquan.api.model.po.GhDetail;
+import com.tzld.piaoquan.api.model.po.GhDetailExample;
+import com.tzld.piaoquan.api.model.vo.GhDetailVo;
+import com.tzld.piaoquan.api.service.GhDetailService;
+import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
+import com.tzld.piaoquan.growth.common.utils.DateUtil;
+import com.tzld.piaoquan.growth.common.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.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Slf4j
+@Service
+public class GhDetailServiceImpl implements GhDetailService {
+
+    @Autowired
+    private GhDetailMapper ghDetailMapper;
+
+
+    @Override
+    public CommonResponse<Page<GhDetailVo>> getGhDetailList(Integer pageNum, Integer pageSize, String accountId) {
+        if (pageNum == null) {
+            pageNum = 1;
+        }
+        if (pageSize == null) {
+            pageSize = 20;
+        }
+        if (pageSize > 100) {
+            pageSize = 100;
+        }
+        Page<GhDetailVo> page = new Page<>();
+        page.setCurrentPage(pageNum);
+        page.setPageSize(pageSize);
+        GhDetailExample example = new GhDetailExample();
+        example.setOrderByClause("create_time desc");
+        GhDetailExample.Criteria criteria = example.createCriteria().andIsDeleteEqualTo(0);
+        if (StringUtils.isNotEmpty(accountId)) {
+            criteria.andGhIdEqualTo(accountId);
+        }
+        example.setPage(page);
+        long total = ghDetailMapper.countByExample(example);
+        page.setTotalSize((int) total);
+        List<GhDetail> ghDetails = ghDetailMapper.selectByExample(example);
+        List<GhDetailVo> ghDetailVos = new ArrayList<>();
+        if (!CollectionUtils.isEmpty(ghDetails)) {
+            for (GhDetail ghDetail : ghDetails) {
+                GhDetailVo ghDetailVo = new GhDetailVo();
+                BeanUtils.copyProperties(ghDetail, ghDetailVo);
+                ghDetailVo.setAccountId(ghDetail.getGhId());
+                ghDetailVo.setAccountName(ghDetail.getGhName());
+                ghDetailVo.setTypeName(GhTypeEnum.getTypeName(ghDetailVo.getType()));
+                ghDetailVo.setCreateTime(DateUtil.getDateString(ghDetail.getCreateTime().getTime(), "yyyy-MM-dd HH:mm:ss"));
+                ghDetailVo.setUpdateTime(DateUtil.getDateString(ghDetail.getUpdateTime().getTime(), "yyyy-MM-dd HH:mm:ss"));
+                ghDetailVo.setChannel(ghDetail.getChannel());
+                if (StringUtils.isNotEmpty(ghDetail.getVideoIds())) {
+                    List<Long> videoIds = JSONObject.parseArray(ghDetail.getVideoIds(), Long.class);
+                    ghDetailVo.setVideoIds(videoIds);
+                }
+                ghDetailVo.setStrategyStatusName(StrategyStatusEnum.getStrategyStatusName(ghDetail.getStrategyStatus()));
+                ghDetailVos.add(ghDetailVo);
+            }
+        }
+        page.setObjs(ghDetailVos);
+        return CommonResponse.success(page);
+    }
+
+
+    @Override
+    public CommonResponse<Void> addGhDetail(GhDetailVo ghDetailVo) {
+        if (ghDetailVo == null
+                || StringUtils.isEmpty(ghDetailVo.getAccountId())
+                || StringUtils.isEmpty(ghDetailVo.getAccountName())
+                || ghDetailVo.getType() == null
+                || StringUtils.isEmpty(ghDetailVo.getCategory1())) {
+            return CommonResponse.create(500, "参数错误");
+        }
+
+        try {
+            GhDetail ghDetail = new GhDetail();
+            BeanUtils.copyProperties(ghDetailVo, ghDetail);
+            if (StringUtils.isNotEmpty(ghDetailVo.getAccountId())) {
+                ghDetail.setGhId(ghDetailVo.getAccountId().trim());
+            }
+            if (StringUtils.isNotEmpty(ghDetailVo.getAccountName())) {
+                ghDetail.setGhName(ghDetailVo.getAccountName());
+            }
+            ghDetail.setGhId(ghDetailVo.getAccountId());
+            ghDetail.setGhName(ghDetailVo.getAccountName());
+            if (!CollectionUtils.isEmpty(ghDetailVo.getVideoIds())) {
+                ghDetail.setVideoIds(JSONObject.toJSONString(ghDetailVo.getVideoIds()));
+            }
+            ghDetailMapper.insertSelective(ghDetail);
+            return CommonResponse.success();
+        } catch (Exception e) {
+            log.error("addGhDetail error", e);
+        }
+        return CommonResponse.create(500, "插入失败,可能已经存在该记录");
+    }
+
+    @Override
+    public CommonResponse<Void> updateDetail(GhDetailVo ghDetailVo) {
+        try {
+            GhDetail ghDetail = new GhDetail();
+            BeanUtils.copyProperties(ghDetailVo, ghDetail);
+            if (StringUtils.isNotEmpty(ghDetailVo.getAccountId())) {
+                ghDetail.setGhId(ghDetailVo.getAccountId().trim());
+            }
+            if (StringUtils.isNotEmpty(ghDetailVo.getAccountName())) {
+                ghDetail.setGhName(ghDetailVo.getAccountName());
+            }
+            ghDetail.setGhId(ghDetailVo.getAccountId());
+            ghDetail.setGhName(ghDetailVo.getAccountName());
+            ghDetail.setVideoIds(JSONObject.toJSONString(ghDetailVo.getVideoIds()));
+            ghDetailMapper.updateByPrimaryKeySelective(ghDetail);
+            return CommonResponse.success();
+        } catch (Exception e) {
+            log.error("updateDetail error", e);
+        }
+        return CommonResponse.create(500, "修改失败");
+    }
+
+
+    @Override
+    public CommonResponse<Void> deleteDetail(Long id) {
+        GhDetail ghDetail = new GhDetail();
+        ghDetail.setId(id);
+        ghDetail.setIsDelete(1);
+        ghDetailMapper.updateByPrimaryKeySelective(ghDetail);
+        return CommonResponse.success();
+    }
+
+}

+ 204 - 0
api-module/src/main/java/com/tzld/piaoquan/api/service/impl/ThirdPartyServiceImpl.java

@@ -0,0 +1,204 @@
+package com.tzld.piaoquan.api.service.impl;
+
+import com.alibaba.fastjson.JSON;
+import com.aliyun.odps.data.Record;
+import com.tzld.piaoquan.api.common.enums.GhTypeEnum;
+import com.tzld.piaoquan.api.common.enums.ReplyStrategyServiceEnum;
+import com.tzld.piaoquan.api.common.enums.SecretEnum;
+import com.tzld.piaoquan.api.dao.mapper.GhDetailMapper;
+import com.tzld.piaoquan.api.model.bo.*;
+import com.tzld.piaoquan.api.model.po.GhDetail;
+import com.tzld.piaoquan.api.model.po.GhDetailExample;
+import com.tzld.piaoquan.api.model.vo.PushMessageParam;
+import com.tzld.piaoquan.api.model.vo.PushMessageVo;
+import com.tzld.piaoquan.api.model.vo.ReportUvVo;
+import com.tzld.piaoquan.api.service.GhAccessTokenService;
+import com.tzld.piaoquan.api.service.ThirdPartyService;
+import com.tzld.piaoquan.api.service.strategy.ReplyStrategyService;
+import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
+import com.tzld.piaoquan.growth.common.common.constant.TimeConstant;
+import com.tzld.piaoquan.growth.common.common.enums.ExceptionCodeEnum;
+import com.tzld.piaoquan.growth.common.component.ODPSManager;
+import com.tzld.piaoquan.growth.common.utils.DateUtil;
+import com.tzld.piaoquan.growth.common.utils.LarkRobotUtil;
+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.context.ApplicationContext;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import javax.annotation.PostConstruct;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.ZoneId;
+import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+@Slf4j
+@Service
+public class ThirdPartyServiceImpl implements ThirdPartyService {
+
+    @Autowired
+    private ApplicationContext applicationContext;
+
+    @Autowired
+    private GhAccessTokenService ghAccessTokenService;
+
+    @Autowired
+    private ODPSManager odpsManager;
+
+    @Autowired
+    private GhDetailMapper ghDetailMapper;
+
+    private static final String canViewReportDate = "2024-10-31";
+
+    private Map<String, ReplyStrategyService> strategyServiceMap;
+
+    @PostConstruct
+    public void init() {
+        strategyServiceMap = applicationContext.getBeansOfType(ReplyStrategyService.class);
+    }
+
+
+    @Override
+    public CommonResponse<List<PushMessageVo>> getPushMessage(PushMessageParam param) {
+        if (param == null || StringUtils.isEmpty(param.getGhId()) || StringUtils.isEmpty(param.getAccessToken())) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAMS_ERROR, "参数错误");
+        }
+        if (!ghAccessTokenService.validateAccessToken(param.getAccessToken())) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAMS_ERROR, "accessToken错误或者已失效");
+        }
+        SecretEnum secretEnum = ghAccessTokenService.getSecretEnum(param.getAccessToken());
+        if (secretEnum == null) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAMS_ERROR, "获取secret失败");
+        }
+        log.info("getPushMessage param={} secretEnum desc={}", param, secretEnum.desc);
+        GhDetailExample example = new GhDetailExample();
+        example.createCriteria().andTypeEqualTo(GhTypeEnum.THIRD_PARTY_GH.type).andGhIdEqualTo(param.getGhId());
+        List<GhDetail> ghDetails = ghDetailMapper.selectByExample(example);
+        if (CollectionUtils.isEmpty(ghDetails)) {
+            return CommonResponse.create(404, "ghId不存在,请联系管理员配置");
+        }
+        String channel = ghDetails.get(0).getChannel();
+        if (channel == null) {
+            LarkRobotUtil.sendMessage("channel不存在,请查看详情 ghId=", param.getGhId());
+            return CommonResponse.create(404, "ghId异常,请联系管理员检查");
+        }
+        if (!Objects.equals(secretEnum.channel, channel)) {
+            LarkRobotUtil.sendMessage(String.format("channel异常 secretEnum.channel=%s ghDetail.channel=%s ghId=%s",
+                    secretEnum.channel, channel, param.getGhId()));
+            return CommonResponse.create(404, "ghId异常,请联系管理员检查");
+        }
+        List<PushMessageVo> pushMessageVoList = new ArrayList<>();
+        ReplyBucketData replyBucketData = getPushMessageData(param, channel);
+        log.info("replyBucketData={}", JSON.toJSONString(replyBucketData));
+        if (replyBucketData == null) {
+            log.error("获取推送策略数据失败");
+            return CommonResponse.create(500, "系统异常,获取失败");
+        }
+        List<GroupData> groupList = replyBucketData.getGroupList();
+        for (GroupData groupData : groupList) {
+            if (CollectionUtils.isEmpty(groupData.getMsgDataList())) {
+                continue;
+            }
+            PushMessageVo pushMessageVo = new PushMessageVo();
+            List<MiniData> components = new ArrayList<>();
+            for (MsgData msgData : groupData.getMsgDataList()) {
+                MiniData miniData = new MiniData();
+                BeanUtils.copyProperties(msgData, miniData);
+                components.add(miniData);
+            }
+            pushMessageVo.setGroupIdx(groupData.getGroupIndex());
+            pushMessageVo.setComponents(components);
+            pushMessageVoList.add(pushMessageVo);
+        }
+        return CommonResponse.success(pushMessageVoList);
+    }
+
+    @Override
+    public CommonResponse<List<ReportUvVo>> getReportUv(String date, String accessToken) {
+        if (StringUtils.isEmpty(date) || !DateUtil.isValidDate(date) || StringUtils.isEmpty(accessToken)) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAMS_ERROR, "参数错误");
+        }
+        if (!ghAccessTokenService.validateAccessToken(accessToken)) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAMS_ERROR, "accessToken错误或者已失效");
+        }
+        SecretEnum secretEnum = ghAccessTokenService.getSecretEnum(accessToken);
+        if (secretEnum == null) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAMS_ERROR, "获取secret失败");
+        }
+        if (!DateUtil.isValidDate(canViewReportDate)) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAMS_ERROR, "系统异常");
+        }
+        //llf只返回2024-11-30后的数据
+        if (secretEnum == SecretEnum.SECRET_ENUM_2) {
+            long targetTime = DateUtil.dateStrToTimestamp(date, "yyyy-MM-dd");
+            long limitTime = DateUtil.dateStrToTimestamp("2024-11-30", "yyyy-MM-dd");
+            if (targetTime < limitTime) {
+                return CommonResponse.create(500, "数据不存在");
+            }
+        }
+
+        //10点后可查询前一天数据
+        long nowTimestamp = System.currentTimeMillis() / 1000;
+        long limitTime = nowTimestamp - 34L * TimeConstant.HOUR;
+        long targetTime = DateUtil.dateStrToTimestamp(date, "yyyy-MM-dd");
+        String channel = secretEnum.channel;
+        if (targetTime > limitTime) {
+            return CommonResponse.create(500, "数据不存在");
+        }
+        String dt = date.replace("-", "").substring(0, 8);
+        String sql = String.format("SELECT * FROM alg_growth_3rd_gh_reply_uv_report WHERE dt = %s AND channel = '%s';",
+                dt, channel);
+        List<ReportUvVo> res = new ArrayList<>();
+        List<Record> recordList = odpsManager.query(sql);
+        if (CollectionUtils.isEmpty(recordList)) {
+            return CommonResponse.success(res);
+        }
+        for (Record record : recordList) {
+            ReportUvVo reportUvVo = new ReportUvVo();
+            reportUvVo.setGhId(record.getString(0));
+            reportUvVo.setUv(record.getBigint(1));
+            res.add(reportUvVo);
+        }
+        return CommonResponse.success(res);
+    }
+
+    private ReplyBucketData getPushMessageData(PushMessageParam param, String channel) {
+        log.info("strategyServiceMap={}", JSON.toJSONString(strategyServiceMap));
+        for (Map.Entry<String, ReplyStrategyService> stringReplyStrategyServiceEntry : strategyServiceMap.entrySet()) {
+            ReplyStrategyService replyStrategyService = stringReplyStrategyServiceEntry.getValue();
+            // 使用策略层
+            if (replyStrategyService.support(ReplyStrategyServiceEnum.THIRD_PARTY_PUSH_MESSAGE_STRATEGY_V1)) {
+                BucketDataParam bucketDataParam = new BucketDataParam();
+                bucketDataParam.setGhId(param.getGhId());
+                bucketDataParam.setChannel(channel);
+                return replyStrategyService.getResult(bucketDataParam);
+            }
+        }
+        // 无执行策略 不会走到这里
+        return null;
+    }
+
+    public static long dateStrToTimestamp(String dateStr, String format) {
+        // 定义日期格式
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern(format);
+
+        // 解析输入的日期字符串为LocalDate对象
+        LocalDate date = LocalDate.parse(dateStr, formatter);
+
+        // 将LocalDate转换为LocalDateTime,时间部分设为00:00:00
+        LocalDateTime dateTime = date.atStartOfDay();
+
+        // 定义北京时区
+        ZoneId zone = ZoneId.of("Asia/Shanghai");
+
+        // 将LocalDateTime转换为时间戳(秒数),使用北京时区
+        return dateTime.toEpochSecond(zone.getRules().getOffset(dateTime));
+    }
+}

+ 140 - 0
api-module/src/main/java/com/tzld/piaoquan/api/service/impl/WeComServiceImpl.java

@@ -0,0 +1,140 @@
+package com.tzld.piaoquan.api.service.impl;
+
+import com.alibaba.fastjson.JSON;
+
+import com.tzld.piaoquan.api.common.enums.ReplyStrategyServiceEnum;
+import com.tzld.piaoquan.api.dao.mapper.ReplyStaffMapper;
+import com.tzld.piaoquan.api.model.bo.BucketDataParam;
+import com.tzld.piaoquan.api.model.bo.GroupData;
+import com.tzld.piaoquan.api.model.bo.MsgData;
+import com.tzld.piaoquan.api.model.bo.ReplyBucketData;
+import com.tzld.piaoquan.api.model.po.ReplyStaff;
+import com.tzld.piaoquan.api.model.po.ReplyStaffExample;
+import com.tzld.piaoquan.api.model.vo.WeComPushMessageParam;
+import com.tzld.piaoquan.api.model.vo.WeComPushMessageVo;
+import com.tzld.piaoquan.api.service.WeComService;
+import com.tzld.piaoquan.api.service.strategy.ReplyStrategyService;
+import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
+import com.tzld.piaoquan.growth.common.common.enums.ExceptionCodeEnum;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.ApplicationContext;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import javax.annotation.PostConstruct;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+
+@Slf4j
+@Service
+public class WeComServiceImpl implements WeComService {
+
+    private static final String CORP_ID = "wwa4015dc7d652a21f";
+
+    private static final int MAX_BYTES = 64;
+
+    @Autowired
+    private ApplicationContext applicationContext;
+
+    @Autowired
+    private ReplyStaffMapper replyStaffMapper;
+
+    private Map<String, ReplyStrategyService> strategyServiceMap;
+
+    @PostConstruct
+    public void init() {
+        strategyServiceMap = applicationContext.getBeansOfType(ReplyStrategyService.class);
+    }
+
+    @Override
+    public CommonResponse<List<WeComPushMessageVo>> getPushMessage(WeComPushMessageParam param) {
+        if (param == null || StringUtils.isEmpty(param.getCorpId()) || !CORP_ID.equals(param.getCorpId()) || StringUtils.isEmpty(param.getUserId())) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAMS_ERROR, "参数错误");
+        }
+        List<WeComPushMessageVo> res = new ArrayList<>();
+        ReplyBucketData replyBucketData = getPushMessageData(param);
+        if(replyBucketData == null){
+            return CommonResponse.create(500, "数据异常");
+        }
+        List<GroupData> groupList = replyBucketData.getGroupList();
+        log.info("groupList={}", groupList);
+        if (CollectionUtils.isEmpty(groupList)) {
+            return CommonResponse.create(500, "数据异常");
+        }
+        ReplyStaffExample example = new ReplyStaffExample();
+        example.createCriteria().andUserIdEqualTo(param.getUserId()).andIsDeleteEqualTo(0);
+        List<ReplyStaff> replyStaffs = replyStaffMapper.selectByExample(example);
+        if (CollectionUtils.isEmpty(replyStaffs)) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAMS_ERROR, "用户查询不到");
+        }
+        String name = replyStaffs.get(0).getName();
+        for (GroupData groupData : groupList) {
+            if (CollectionUtils.isEmpty(groupData.getMsgDataList())) {
+                continue;
+            }
+            WeComPushMessageVo weComPushMessageVo = new WeComPushMessageVo();
+            weComPushMessageVo.setGroupIndex(groupData.getGroupIndex());
+            List<MsgData> msgDataList = groupData.getMsgDataList();
+            for (MsgData msgData : msgDataList) {
+                if (msgData.getTitle().getBytes(StandardCharsets.UTF_8).length > MAX_BYTES) {
+                    String s = truncateString(msgData.getTitle(), MAX_BYTES - 3) + "...";
+                    msgData.setTitle(s);
+                }
+            }
+            MsgData msgData = new MsgData();
+            msgData.setMsgType(3);
+            msgData.setTitle(String.format("很高兴认识您!我是%s,每天给您推荐精彩视频~", name));
+            msgDataList.add(0, msgData);
+            weComPushMessageVo.setMsgDataList(msgDataList);
+            res.add(weComPushMessageVo);
+        }
+        log.info("res={}", res);
+        return CommonResponse.success(res);
+    }
+
+    private ReplyBucketData getPushMessageData(WeComPushMessageParam param) {
+        log.info("strategyServiceMap={}", JSON.toJSONString(strategyServiceMap));
+        for (Map.Entry<String, ReplyStrategyService> stringReplyStrategyServiceEntry : strategyServiceMap.entrySet()) {
+            ReplyStrategyService replyStrategyService = stringReplyStrategyServiceEntry.getValue();
+            // 使用策略层
+            if (replyStrategyService.support(ReplyStrategyServiceEnum.WE_COM_PUSH_MESSAGE_STRATEGY_V1)) {
+                BucketDataParam bucketDataParam = new BucketDataParam();
+                bucketDataParam.setGhId(param.getUserId());
+                return replyStrategyService.getResult(bucketDataParam);
+            }
+        }
+        // 无执行策略 不会走到这里
+        return null;
+    }
+
+    private String truncateString(String input, int maxBytes) {
+        if (input == null || maxBytes <= 0) {
+            return "";
+        }
+
+        byte[] bytes = input.getBytes(StandardCharsets.UTF_8);
+        if (bytes.length <= maxBytes) {
+            return input; // 如果字节数已经在限制内,直接返回原字符串
+        }
+
+        // 截取字节数组
+        byte[] truncatedBytes = new byte[maxBytes];
+        System.arraycopy(bytes, 0, truncatedBytes, 0, maxBytes);
+
+        // 将截取的字节数组转换回字符串
+        String truncatedString = new String(truncatedBytes, StandardCharsets.UTF_8);
+
+        // 处理可能的字符截断问题
+        // 如果截取后字符串的字节数仍然大于 maxBytes,向前查找直到找到有效字符
+        while (truncatedString.getBytes(StandardCharsets.UTF_8).length > maxBytes) {
+            truncatedString = truncatedString.substring(0, truncatedString.length() - 1);
+        }
+
+        return truncatedString;
+    }
+}

+ 12 - 0
api-module/src/main/java/com/tzld/piaoquan/api/service/strategy/ReplyStrategyService.java

@@ -0,0 +1,12 @@
+package com.tzld.piaoquan.api.service.strategy;
+
+import com.tzld.piaoquan.api.common.enums.ReplyStrategyServiceEnum;
+import com.tzld.piaoquan.api.model.bo.BucketDataParam;
+import com.tzld.piaoquan.api.model.bo.ReplyBucketData;
+
+public interface ReplyStrategyService {
+
+    ReplyBucketData getResult(BucketDataParam bucketDataParam);
+
+    Boolean support(ReplyStrategyServiceEnum key);
+}

+ 262 - 0
api-module/src/main/java/com/tzld/piaoquan/api/service/strategy/impl/ThirdPartyPushMessageStrategyV1.java

@@ -0,0 +1,262 @@
+package com.tzld.piaoquan.api.service.strategy.impl;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+
+import com.tzld.piaoquan.api.common.enums.ReplyStrategyServiceEnum;
+import com.tzld.piaoquan.api.component.TouLiuHttpClient;
+import com.tzld.piaoquan.api.dao.mapper.AlgGhAutoreplyVideoRankDataMapper;
+import com.tzld.piaoquan.api.dao.mapper.CgiReplyBucketDataMapper;
+import com.tzld.piaoquan.api.model.bo.*;
+import com.tzld.piaoquan.api.model.po.AlgGhAutoreplyVideoRankData;
+import com.tzld.piaoquan.api.model.po.AlgGhAutoreplyVideoRankDataExample;
+import com.tzld.piaoquan.api.model.po.CgiReplyBucketData;
+import com.tzld.piaoquan.api.model.po.CgiReplyBucketDataExample;
+import com.tzld.piaoquan.api.service.strategy.ReplyStrategyService;
+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.util.*;
+import java.util.stream.Collectors;
+
+@Slf4j
+@Service
+public class ThirdPartyPushMessageStrategyV1 implements ReplyStrategyService {
+
+    /**
+     * 实验分桶数量
+     */
+//    private static final Integer bucketNum = 10;
+
+    /**
+     * 分桶实验策略,key为策略,arr为对应桶
+     * {"base":[0,1,2,3],"stg0909-base":[4,5],"stg0909-explore1":[6,7,8],"stg0909-explore2":[9]}
+     * {"stg0909-base":[5,6],"stg0909-explore1":[7],"stg0909-explore2":[8,9]}
+     */
+    private static final String bucketStrategyConfig = "{\"3rd-party-base\":[0,1,2,3,4,5,6],\"3rd-party-explore1\":[7],\"3rd-party-explore2\":[8,9]}";
+
+    /**
+     * 自动回复使用小程序Id
+     */
+    private static final String SMALL_APP_Id = "wxbdd2a2e93d9a6e25";
+
+    private static final String CDN_URL = "https://rescdn.piaoquantv.com/";
+
+    @Value("${small_page_url}")
+    private String GET_SMALL_PAGE_URL;
+
+    @Autowired
+    private AlgGhAutoreplyVideoRankDataMapper algGhAutoreplyVideoRankDataMapper;
+    @Autowired
+    private CgiReplyBucketDataMapper cgiReplyBucketDataMapper;
+    @Autowired
+    private TouLiuHttpClient touLiuHttpClient;
+
+    @Override
+    public ReplyBucketData getResult(BucketDataParam bucketDataParam) {
+        log.info("ThirdPartyPushMessageStrategyV1 start");
+        // 0 获取策略key
+        JSONObject bucketStrategyConfigJsonObject = JSON.parseObject(bucketStrategyConfig);
+        Set<String> keyedSet = bucketStrategyConfigJsonObject.keySet();
+        // 1 处理文章--算法引擎--排序文章数据
+//        getWenzhangData();
+        // 2 处理小程序--读取离线数据表--获取策略排序小程序数据
+        List<CgiReplyBucketData> smallDataCgiReplyList = readStrategyOrderSmallData(keyedSet, bucketDataParam);
+        // 2.1 获取小程序落地页地址 http调用
+        smallDataCgiReplyList = setSmallPageUrl(smallDataCgiReplyList, bucketDataParam.getChannel());
+        log.info(JSON.toJSONString(smallDataCgiReplyList));
+        // 3 入库读表
+        insertSmallData(smallDataCgiReplyList, keyedSet, bucketDataParam);
+        // 4 组装分桶数据
+        return getReplyBucketData(bucketStrategyConfigJsonObject, keyedSet, bucketDataParam.getGhId());
+    }
+
+    private ReplyBucketData getReplyBucketData(JSONObject bucketStrategyConfigJsonObject, Set<String> keyedSet, String ghId) {
+        // 策略小程序数据
+        ReplyBucketData replyBucketData = new ReplyBucketData();
+        List<GroupData> groupDataList = new ArrayList<>();
+        for (String key : keyedSet) {
+            CgiReplyBucketDataExample cgiReplyBucketDataExample = new CgiReplyBucketDataExample();
+            cgiReplyBucketDataExample.createCriteria().andIsDeleteEqualTo(0).andStrategyEqualTo(key).andGhIdEqualTo(ghId);
+            cgiReplyBucketDataExample.setOrderByClause("sort");
+            List<CgiReplyBucketData> cgiReplyBucketData = cgiReplyBucketDataMapper.selectByExample(cgiReplyBucketDataExample);
+            if (CollectionUtils.isEmpty(cgiReplyBucketData)) {
+                CgiReplyBucketDataExample cgiReplyBucketDataExampleNull = new CgiReplyBucketDataExample();
+                cgiReplyBucketDataExampleNull.createCriteria().andIsDeleteEqualTo(0).andStrategyEqualTo(key).andGhIdEqualTo("default");
+                cgiReplyBucketDataExampleNull.setOrderByClause("sort");
+                cgiReplyBucketData = cgiReplyBucketDataMapper.selectByExample(cgiReplyBucketDataExampleNull);
+            }
+            log.info("cgiReplyBucketData={}", cgiReplyBucketData);
+            if (CollectionUtils.isEmpty(cgiReplyBucketData)) {
+                log.error("getReplyBucketData get data is null,key:" + key);
+                return null;
+            }
+
+            List<Integer> groupList = bucketStrategyConfigJsonObject.getJSONArray(key).toJavaList(Integer.class);
+            for (Integer group : groupList) {
+                GroupData groupData = new GroupData();
+                groupData.setGroupIndex(group);
+                List<MsgData> msgDataList = new ArrayList<>();
+                for (CgiReplyBucketData cgiReplyBucketDatum : cgiReplyBucketData) {
+                    MsgData msgData = new MsgData();
+                    BeanUtils.copyProperties(cgiReplyBucketDatum, msgData);
+                    if (cgiReplyBucketDatum.getMsgType().equals(1)) {
+                        msgData.setMiniAppId(SMALL_APP_Id);
+                    }
+                    msgDataList.add(msgData);
+                }
+                groupData.setMsgDataList(msgDataList);
+                groupDataList.add(groupData);
+            }
+        }
+        // groupDataList排序
+        replyBucketData.setGroupList(groupDataList.stream().sorted(Comparator.comparingInt(GroupData::getGroupIndex)).collect(Collectors.toList()));
+        return replyBucketData;
+    }
+
+
+    private void insertSmallData(List<CgiReplyBucketData> smallDataCgiReplyList, Set<String> keyedSet, BucketDataParam bucketDataParam) {
+        if (CollectionUtils.isEmpty(smallDataCgiReplyList)) {
+            return;
+        }
+        for (String key : keyedSet) {
+            if ("base".equals(key)) {
+                continue;
+            }
+            List<CgiReplyBucketData> collect = smallDataCgiReplyList.stream()
+                    .filter(x -> x.getStrategy().equals(key))
+                    .filter(x -> x.getGhId().equals(bucketDataParam.getGhId()))
+                    .collect(Collectors.toList());
+            if (CollectionUtils.isEmpty(collect)) {
+                log.error("ThirdPartyPushMessageStrategyV1 insertSmallData 算法排序数据异常,data:" + JSON.toJSONString(smallDataCgiReplyList));
+                continue;
+            }
+            // 清上个版本的策略数据
+            CgiReplyBucketDataExample cgiReplyBucketDataExample = new CgiReplyBucketDataExample();
+            cgiReplyBucketDataExample.createCriteria().andIsDeleteEqualTo(0).andMsgTypeEqualTo(1).andStrategyEqualTo(key).andGhIdEqualTo(bucketDataParam.getGhId());
+            List<CgiReplyBucketData> cgiReplyBucketData1 = cgiReplyBucketDataMapper.selectByExample(cgiReplyBucketDataExample);
+            for (CgiReplyBucketData cgiReplyBucketData : cgiReplyBucketData1) {
+                cgiReplyBucketData.setIsDelete(1);
+                cgiReplyBucketDataMapper.updateByPrimaryKeySelective(cgiReplyBucketData);
+            }
+            // 入库
+            for (CgiReplyBucketData cgiReplyBucketData : collect) {
+                cgiReplyBucketDataMapper.insertSelective(cgiReplyBucketData);
+            }
+        }
+    }
+
+    private List<CgiReplyBucketData> setSmallPageUrl(List<CgiReplyBucketData> smallDataCgiReplyList, String channel) {
+        if (CollectionUtils.isEmpty(smallDataCgiReplyList)) {
+            return smallDataCgiReplyList;
+        }
+        Set<String> keys = smallDataCgiReplyList.stream().map(x -> x.getGhId() + "&" + x.getMiniVideoId() + "&" + x.getSort()).collect(Collectors.toSet());
+        Map<String, SmallPageUrlDetail> keyPageUrl = new HashMap<>();
+        // gh-id + videoId + sort 复用同一page_url及落地页id
+        for (String key : keys) {
+            String[] keyArr = key.split("&");
+            String ghId = keyArr[0];
+            String videoId = keyArr[1];
+            String sort = keyArr[2];
+            // 查询库里是否存在,如果存在即复用
+            CgiReplyBucketDataExample cgiReplyBucketDataExample = new CgiReplyBucketDataExample();
+            cgiReplyBucketDataExample.createCriteria().andIsDeleteEqualTo(0).andMiniVideoIdEqualTo(Long.valueOf(videoId)).andGhIdEqualTo(ghId);
+            List<CgiReplyBucketData> cgiReplyBucketData = cgiReplyBucketDataMapper.selectByExample(cgiReplyBucketDataExample);
+            SmallPageUrlDetail smallPageUrlDetail = new SmallPageUrlDetail();
+            if (CollectionUtils.isEmpty(cgiReplyBucketData)) {
+                // 库里不存在,调用新生成
+                String response = touLiuHttpClient.sendAdFlowAddRequest(GET_SMALL_PAGE_URL, videoId, "dyyjs", channel, "自动", "公众号", "自动回复小程序", "位置" + sort, ghId);
+                JSONObject jsonObject = JSON.parseObject(response);
+                if (jsonObject.getInteger("code").equals(0)) {
+                    smallPageUrlDetail = jsonObject.getObject("data", SmallPageUrlDetail.class);
+                    keyPageUrl.put(key, smallPageUrlDetail);
+                } else {
+                    log.error("httpClientService get page url error,response:" + response);
+                    throw new RuntimeException("httpClientService get page url error");
+                }
+            } else {
+                // 复用
+                CgiReplyBucketData cgiReplyBucketData1 = cgiReplyBucketData.get(0);
+                smallPageUrlDetail.setId(cgiReplyBucketData1.getPagePathUrlId());
+                smallPageUrlDetail.setUrl(cgiReplyBucketData1.getMiniPagePath());
+            }
+            keyPageUrl.put(key, smallPageUrlDetail);
+        }
+        // 处理数据
+        for (CgiReplyBucketData cgiReplyBucketData : smallDataCgiReplyList) {
+            String key = cgiReplyBucketData.getGhId() + "&" + cgiReplyBucketData.getMiniVideoId() + "&" + cgiReplyBucketData.getSort();
+            SmallPageUrlDetail smallPageUrlDetail = keyPageUrl.get(key);
+            if (Objects.isNull(smallPageUrlDetail)) {
+                log.error("setSmallPageUrl get map url is null" + JSON.toJSONString(keyPageUrl));
+                throw new RuntimeException("setSmallPageUrl get map url is null");
+            }
+            cgiReplyBucketData.setPagePathUrlId(smallPageUrlDetail.getId());
+            cgiReplyBucketData.setMiniPagePath(smallPageUrlDetail.getUrl());
+        }
+        return smallDataCgiReplyList;
+    }
+
+    private List<CgiReplyBucketData> readStrategyOrderSmallData(Set<String> keyedSet, BucketDataParam bucketDataParam) {
+        List<CgiReplyBucketData> result = new ArrayList<>();
+        for (String key : keyedSet) {
+            if ("base".equals(key)) {
+                // base作为人工控制
+                continue;
+            }
+            // 获取最新dt的策略
+            String dtVersion = algGhAutoreplyVideoRankDataMapper.selectLatestDtVersionByStrategyKeyAndGhId(key, bucketDataParam.getGhId());
+            if (StringUtils.isEmpty(dtVersion)) {
+                bucketDataParam.setGhId("default");
+                dtVersion = algGhAutoreplyVideoRankDataMapper.selectLatestDtVersionByStrategyKeyAndGhId(key, bucketDataParam.getGhId());
+            }
+            // 判断当前的dtVersion是否已经处理过了
+            CgiReplyBucketDataExample cgiReplyBucketDataExample = new CgiReplyBucketDataExample();
+            cgiReplyBucketDataExample.createCriteria().andIsDeleteEqualTo(0).andStrategyDtEqualTo(dtVersion).andStrategyEqualTo(key).andGhIdEqualTo(bucketDataParam.getGhId());
+            long count = cgiReplyBucketDataMapper.countByExample(cgiReplyBucketDataExample);
+            if (count != 0) {
+                // 说明已处理过该dtVersion数据
+                continue;
+            }
+            // 获取最新dt数据
+            List<AlgGhAutoreplyVideoRankData> dtVersionStrategyData = getDtVersionStrategyData(key, dtVersion, bucketDataParam.getGhId());
+            List<Long> videoIds = dtVersionStrategyData.stream().map(AlgGhAutoreplyVideoRankData::getVideoId).collect(Collectors.toList());
+            Map<Long, String> videoDetailMap = touLiuHttpClient.getVideoDetailRequest(videoIds);
+            result.addAll(dtVersionStrategyData.stream().map(x -> {
+                CgiReplyBucketData cgiReplyBucketData = new CgiReplyBucketData();
+                cgiReplyBucketData.setStrategy(key);
+                cgiReplyBucketData.setSort(x.getSort());
+                cgiReplyBucketData.setStrategyDt(x.getDtVersion());
+                cgiReplyBucketData.setGhId(x.getGhId());
+                cgiReplyBucketData.setMsgType(1);
+                cgiReplyBucketData.setTitle(x.getTitle());
+                String cover = videoDetailMap.get(x.getVideoId());
+                if (StringUtils.isNotEmpty(cover)) {
+                    cgiReplyBucketData.setCoverUrl(cover);
+                } else {
+                    cgiReplyBucketData.setCoverUrl(CDN_URL + x.getCoverUrl());
+                }
+                cgiReplyBucketData.setMiniAppId(SMALL_APP_Id);
+                cgiReplyBucketData.setMiniVideoId(x.getVideoId());
+                return cgiReplyBucketData;
+            }).collect(Collectors.toList()));
+        }
+        // 获取最新数据版本
+        return CollectionUtils.isEmpty(result) ? null : result;
+    }
+
+    private List<AlgGhAutoreplyVideoRankData> getDtVersionStrategyData(String key, String dtVersion, String ghId) {
+        AlgGhAutoreplyVideoRankDataExample algGhAutoreplyVideoRankDataExample = new AlgGhAutoreplyVideoRankDataExample();
+        algGhAutoreplyVideoRankDataExample.createCriteria().andIsDeleteEqualTo(0).andDtVersionEqualTo(dtVersion).andStrategyKeyEqualTo(key).andGhIdEqualTo(ghId);
+        return algGhAutoreplyVideoRankDataMapper.selectByExample(algGhAutoreplyVideoRankDataExample);
+    }
+
+    @Override
+    public Boolean support(ReplyStrategyServiceEnum key) {
+        return ReplyStrategyServiceEnum.THIRD_PARTY_PUSH_MESSAGE_STRATEGY_V1.equals(key);
+    }
+}

+ 261 - 0
api-module/src/main/java/com/tzld/piaoquan/api/service/strategy/impl/WeComPushMessageStrategyV1.java

@@ -0,0 +1,261 @@
+package com.tzld.piaoquan.api.service.strategy.impl;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.tzld.piaoquan.api.common.enums.ReplyStrategyServiceEnum;
+import com.tzld.piaoquan.api.component.TouLiuHttpClient;
+import com.tzld.piaoquan.api.dao.mapper.AlgGhAutoreplyVideoRankDataMapper;
+import com.tzld.piaoquan.api.dao.mapper.CgiReplyBucketDataMapper;
+import com.tzld.piaoquan.api.model.bo.*;
+import com.tzld.piaoquan.api.model.po.AlgGhAutoreplyVideoRankData;
+import com.tzld.piaoquan.api.model.po.AlgGhAutoreplyVideoRankDataExample;
+import com.tzld.piaoquan.api.model.po.CgiReplyBucketData;
+import com.tzld.piaoquan.api.model.po.CgiReplyBucketDataExample;
+import com.tzld.piaoquan.api.service.strategy.ReplyStrategyService;
+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.util.*;
+import java.util.stream.Collectors;
+
+@Slf4j
+@Service
+public class WeComPushMessageStrategyV1 implements ReplyStrategyService {
+
+    /**
+     * 实验分桶数量
+     */
+//    private static final Integer bucketNum = 10;
+
+    /**
+     * 分桶实验策略,key为策略,arr为对应桶
+     * {"base":[0,1,2,3],"stg0909-base":[4,5],"stg0909-explore1":[6,7,8],"stg0909-explore2":[9]}
+     * {"stg0909-base":[5,6],"stg0909-explore1":[7],"stg0909-explore2":[8,9]}
+     */
+    private static final String bucketStrategyConfig = "{\"we-com-base\":[0,1,2,3,4,5,6],\"we-com-explore1\":[7],\"we-com-explore2\":[8,9]}";
+
+    /**
+     * 自动回复使用小程序Id
+     */
+    private static final String SMALL_APP_Id = "wx7187c217efef24a7";
+
+    private static final String CDN_URL = "https://rescdn.piaoquantv.com/";
+
+    @Value("${small_page_url}")
+    private String GET_SMALL_PAGE_URL;
+
+    @Autowired
+    private AlgGhAutoreplyVideoRankDataMapper algGhAutoreplyVideoRankDataMapper;
+    @Autowired
+    private CgiReplyBucketDataMapper cgiReplyBucketDataMapper;
+    @Autowired
+    private TouLiuHttpClient touLiuHttpClient;
+
+    @Override
+    public ReplyBucketData getResult(BucketDataParam bucketDataParam) {
+        log.info("ThirdPartyPushMessageStrategyV1 start");
+        // 0 获取策略key
+        JSONObject bucketStrategyConfigJsonObject = JSON.parseObject(bucketStrategyConfig);
+        Set<String> keyedSet = bucketStrategyConfigJsonObject.keySet();
+        // 1 处理文章--算法引擎--排序文章数据
+//        getWenzhangData();
+        // 2 处理小程序--读取离线数据表--获取策略排序小程序数据
+        List<CgiReplyBucketData> smallDataCgiReplyList = readStrategyOrderSmallData(keyedSet, bucketDataParam);
+        // 2.1 获取小程序落地页地址 http调用
+        smallDataCgiReplyList = setSmallPageUrl(smallDataCgiReplyList);
+        log.info(JSON.toJSONString(smallDataCgiReplyList));
+        // 3 入库读表
+        insertSmallData(smallDataCgiReplyList, keyedSet, bucketDataParam);
+        // 4 组装分桶数据
+        return getReplyBucketData(bucketStrategyConfigJsonObject, keyedSet, bucketDataParam.getGhId());
+    }
+
+    private ReplyBucketData getReplyBucketData(JSONObject bucketStrategyConfigJsonObject, Set<String> keyedSet, String ghId) {
+        // 策略小程序数据
+        ReplyBucketData replyBucketData = new ReplyBucketData();
+        List<GroupData> groupDataList = new ArrayList<>();
+        for (String key : keyedSet) {
+            CgiReplyBucketDataExample cgiReplyBucketDataExample = new CgiReplyBucketDataExample();
+            cgiReplyBucketDataExample.createCriteria().andIsDeleteEqualTo(0).andStrategyEqualTo(key).andGhIdEqualTo(ghId);
+            cgiReplyBucketDataExample.setOrderByClause("sort");
+            List<CgiReplyBucketData> cgiReplyBucketData = cgiReplyBucketDataMapper.selectByExample(cgiReplyBucketDataExample);
+            if (CollectionUtils.isEmpty(cgiReplyBucketData)) {
+                CgiReplyBucketDataExample cgiReplyBucketDataExampleNull = new CgiReplyBucketDataExample();
+                cgiReplyBucketDataExampleNull.createCriteria().andIsDeleteEqualTo(0).andStrategyEqualTo(key).andGhIdEqualTo("default");
+                cgiReplyBucketDataExampleNull.setOrderByClause("sort");
+                cgiReplyBucketData = cgiReplyBucketDataMapper.selectByExample(cgiReplyBucketDataExampleNull);
+            }
+            log.info("cgiReplyBucketData={}", cgiReplyBucketData);
+            if (CollectionUtils.isEmpty(cgiReplyBucketData)) {
+                log.error("getReplyBucketData get data is null,key:" + key);
+                return null;
+            }
+
+            List<Integer> groupList = bucketStrategyConfigJsonObject.getJSONArray(key).toJavaList(Integer.class);
+            for (Integer group : groupList) {
+                GroupData groupData = new GroupData();
+                groupData.setGroupIndex(group);
+                List<MsgData> msgDataList = new ArrayList<>();
+                for (CgiReplyBucketData cgiReplyBucketDatum : cgiReplyBucketData) {
+                    MsgData msgData = new MsgData();
+                    BeanUtils.copyProperties(cgiReplyBucketDatum, msgData);
+                    if (cgiReplyBucketDatum.getMsgType().equals(1)) {
+                        msgData.setMiniAppId(SMALL_APP_Id);
+                    }
+                    msgDataList.add(msgData);
+                }
+                groupData.setMsgDataList(msgDataList);
+                groupDataList.add(groupData);
+            }
+        }
+        // groupDataList排序
+        replyBucketData.setGroupList(groupDataList.stream().sorted(Comparator.comparingInt(GroupData::getGroupIndex)).collect(Collectors.toList()));
+        return replyBucketData;
+    }
+
+
+    private void insertSmallData(List<CgiReplyBucketData> smallDataCgiReplyList, Set<String> keyedSet, BucketDataParam bucketDataParam) {
+        if (CollectionUtils.isEmpty(smallDataCgiReplyList)) {
+            return;
+        }
+        for (String key : keyedSet) {
+            if ("base".equals(key)) {
+                continue;
+            }
+            List<CgiReplyBucketData> collect = smallDataCgiReplyList.stream()
+                    .filter(x -> x.getStrategy().equals(key))
+                    .filter(x -> x.getGhId().equals(bucketDataParam.getGhId()))
+                    .collect(Collectors.toList());
+            if (CollectionUtils.isEmpty(collect)) {
+                log.error("ThirdPartyPushMessageStrategyV1 insertSmallData 算法排序数据异常,data:" + JSON.toJSONString(smallDataCgiReplyList));
+                continue;
+            }
+            // 清上个版本的策略数据
+            CgiReplyBucketDataExample cgiReplyBucketDataExample = new CgiReplyBucketDataExample();
+            cgiReplyBucketDataExample.createCriteria().andIsDeleteEqualTo(0).andMsgTypeEqualTo(1).andStrategyEqualTo(key).andGhIdEqualTo(bucketDataParam.getGhId());
+            List<CgiReplyBucketData> cgiReplyBucketData1 = cgiReplyBucketDataMapper.selectByExample(cgiReplyBucketDataExample);
+            for (CgiReplyBucketData cgiReplyBucketData : cgiReplyBucketData1) {
+                cgiReplyBucketData.setIsDelete(1);
+                cgiReplyBucketDataMapper.updateByPrimaryKeySelective(cgiReplyBucketData);
+            }
+            // 入库
+            for (CgiReplyBucketData cgiReplyBucketData : collect) {
+                cgiReplyBucketDataMapper.insertSelective(cgiReplyBucketData);
+            }
+        }
+    }
+
+    private List<CgiReplyBucketData> setSmallPageUrl(List<CgiReplyBucketData> smallDataCgiReplyList) {
+        if (CollectionUtils.isEmpty(smallDataCgiReplyList)) {
+            return smallDataCgiReplyList;
+        }
+        Set<String> keys = smallDataCgiReplyList.stream().map(x -> x.getGhId() + "&" + x.getMiniVideoId() + "&" + x.getSort()).collect(Collectors.toSet());
+        Map<String, SmallPageUrlDetail> keyPageUrl = new HashMap<>();
+        // gh-id + videoId + sort 复用同一page_url及落地页id
+        for (String key : keys) {
+            String[] keyArr = key.split("&");
+            String ghId = keyArr[0];
+            String videoId = keyArr[1];
+            String sort = keyArr[2];
+            // 查询库里是否存在,如果存在即复用
+            CgiReplyBucketDataExample cgiReplyBucketDataExample = new CgiReplyBucketDataExample();
+            cgiReplyBucketDataExample.createCriteria().andIsDeleteEqualTo(0).andMiniVideoIdEqualTo(Long.valueOf(videoId)).andGhIdEqualTo(ghId);
+            List<CgiReplyBucketData> cgiReplyBucketData = cgiReplyBucketDataMapper.selectByExample(cgiReplyBucketDataExample);
+            SmallPageUrlDetail smallPageUrlDetail = new SmallPageUrlDetail();
+            if (CollectionUtils.isEmpty(cgiReplyBucketData)) {
+                // 库里不存在,调用新生成
+                String response = touLiuHttpClient.sendAdFlowAddRequest(GET_SMALL_PAGE_URL, videoId, "touliu", "tencentqw", "自动", "企微", "即时欢迎语", "位置" + sort, ghId);
+                JSONObject jsonObject = JSON.parseObject(response);
+                if (jsonObject.getInteger("code").equals(0)) {
+                    smallPageUrlDetail = jsonObject.getObject("data", SmallPageUrlDetail.class);
+                    keyPageUrl.put(key, smallPageUrlDetail);
+                } else {
+                    log.error("httpClientService get page url error,response:" + response);
+                    throw new RuntimeException("httpClientService get page url error");
+                }
+            } else {
+                // 复用
+                CgiReplyBucketData cgiReplyBucketData1 = cgiReplyBucketData.get(0);
+                smallPageUrlDetail.setId(cgiReplyBucketData1.getPagePathUrlId());
+                smallPageUrlDetail.setUrl(cgiReplyBucketData1.getMiniPagePath());
+            }
+            keyPageUrl.put(key, smallPageUrlDetail);
+        }
+        // 处理数据
+        for (CgiReplyBucketData cgiReplyBucketData : smallDataCgiReplyList) {
+            String key = cgiReplyBucketData.getGhId() + "&" + cgiReplyBucketData.getMiniVideoId() + "&" + cgiReplyBucketData.getSort();
+            SmallPageUrlDetail smallPageUrlDetail = keyPageUrl.get(key);
+            if (Objects.isNull(smallPageUrlDetail)) {
+                log.error("setSmallPageUrl get map url is null" + JSON.toJSONString(keyPageUrl));
+                throw new RuntimeException("setSmallPageUrl get map url is null");
+            }
+            cgiReplyBucketData.setPagePathUrlId(smallPageUrlDetail.getId());
+            cgiReplyBucketData.setMiniPagePath(smallPageUrlDetail.getUrl());
+        }
+        return smallDataCgiReplyList;
+    }
+
+    private List<CgiReplyBucketData> readStrategyOrderSmallData(Set<String> keyedSet, BucketDataParam bucketDataParam) {
+        List<CgiReplyBucketData> result = new ArrayList<>();
+        for (String key : keyedSet) {
+            if ("base".equals(key)) {
+                // base作为人工控制
+                continue;
+            }
+            // 获取最新dt的策略
+            String dtVersion = algGhAutoreplyVideoRankDataMapper.selectLatestDtVersionByStrategyKeyAndGhId(key, bucketDataParam.getGhId());
+            if (StringUtils.isEmpty(dtVersion)) {
+                bucketDataParam.setGhId("default");
+                dtVersion = algGhAutoreplyVideoRankDataMapper.selectLatestDtVersionByStrategyKeyAndGhId(key, bucketDataParam.getGhId());
+            }
+            // 判断当前的dtVersion是否已经处理过了
+            CgiReplyBucketDataExample cgiReplyBucketDataExample = new CgiReplyBucketDataExample();
+            cgiReplyBucketDataExample.createCriteria().andIsDeleteEqualTo(0).andStrategyDtEqualTo(dtVersion).andStrategyEqualTo(key).andGhIdEqualTo(bucketDataParam.getGhId());
+            long count = cgiReplyBucketDataMapper.countByExample(cgiReplyBucketDataExample);
+            if (count != 0) {
+                // 说明已处理过该dtVersion数据
+                continue;
+            }
+            // 获取最新dt数据
+            List<AlgGhAutoreplyVideoRankData> dtVersionStrategyData = getDtVersionStrategyData(key, dtVersion, bucketDataParam.getGhId());
+            List<Long> videoIds = dtVersionStrategyData.stream().map(AlgGhAutoreplyVideoRankData::getVideoId).collect(Collectors.toList());
+            Map<Long, String> videoDetailMap = touLiuHttpClient.getVideoDetailRequest(videoIds);
+            result.addAll(dtVersionStrategyData.stream().map(x -> {
+                CgiReplyBucketData cgiReplyBucketData = new CgiReplyBucketData();
+                cgiReplyBucketData.setStrategy(key);
+                cgiReplyBucketData.setSort(x.getSort());
+                cgiReplyBucketData.setStrategyDt(x.getDtVersion());
+                cgiReplyBucketData.setGhId(x.getGhId());
+                cgiReplyBucketData.setMsgType(1);
+                cgiReplyBucketData.setTitle(x.getTitle());
+                String cover = videoDetailMap.get(x.getVideoId());
+                if (StringUtils.isNotEmpty(cover)) {
+                    cgiReplyBucketData.setCoverUrl(cover);
+                } else {
+                    cgiReplyBucketData.setCoverUrl(CDN_URL + x.getCoverUrl());
+                }
+                cgiReplyBucketData.setMiniAppId(SMALL_APP_Id);
+                cgiReplyBucketData.setMiniVideoId(x.getVideoId());
+                return cgiReplyBucketData;
+            }).collect(Collectors.toList()));
+        }
+        // 获取最新数据版本
+        return CollectionUtils.isEmpty(result) ? null : result;
+    }
+
+    private List<AlgGhAutoreplyVideoRankData> getDtVersionStrategyData(String key, String dtVersion, String ghId) {
+        AlgGhAutoreplyVideoRankDataExample algGhAutoreplyVideoRankDataExample = new AlgGhAutoreplyVideoRankDataExample();
+        algGhAutoreplyVideoRankDataExample.createCriteria().andIsDeleteEqualTo(0).andDtVersionEqualTo(dtVersion).andStrategyKeyEqualTo(key).andGhIdEqualTo(ghId);
+        return algGhAutoreplyVideoRankDataMapper.selectByExample(algGhAutoreplyVideoRankDataExample);
+    }
+
+    @Override
+    public Boolean support(ReplyStrategyServiceEnum key) {
+        return ReplyStrategyServiceEnum.WE_COM_PUSH_MESSAGE_STRATEGY_V1.equals(key);
+    }
+}

+ 2 - 0
api-module/src/main/resources/application-dev.properties

@@ -9,3 +9,5 @@ spring.redis.password=Qingqu2019
 
 
 xxl.job.admin.addresses=http://xxl-job-test-internal.piaoquantv.com/xxl-job-admin
 xxl.job.admin.addresses=http://xxl-job-test-internal.piaoquantv.com/xxl-job-admin
 
 
+small_page_url=https://testapi.piaoquantv.com
+

+ 6 - 0
api-module/src/main/resources/application-prod.properties

@@ -8,5 +8,11 @@ spring.redis.password=Qingqu2019
 
 
 xxl.job.admin.addresses=http://xxl-job-internal.piaoquantv.com/xxl-job-admin
 xxl.job.admin.addresses=http://xxl-job-internal.piaoquantv.com/xxl-job-admin
 
 
+small_page_url=https://api.piaoquantv.com
+
+pushMessage.callback.topic=3rd_party_push_message_callback_prod
+pushMessage.callback.groupId=GID_3RD_PARTY_PUSH_MESSAGE_CALLBACK_PROD
+pushMessage.callback.tag=mini
+
 
 
 
 

+ 6 - 0
api-module/src/main/resources/application-test.properties

@@ -9,3 +9,9 @@ spring.redis.port=6379
 spring.redis.password=Qingqu2019
 spring.redis.password=Qingqu2019
 
 
 xxl.job.admin.addresses=http://xxl-job-test-internal.piaoquantv.com/xxl-job-admin
 xxl.job.admin.addresses=http://xxl-job-test-internal.piaoquantv.com/xxl-job-admin
+
+small_page_url=https://testapi.piaoquantv.com
+
+pushMessage.callback.topic=3rd_party_push_message_callback_prod
+pushMessage.callback.groupId=GID_3RD_PARTY_PUSH_MESSAGE_CALLBACK_PROD
+pushMessage.callback.tag=mini

+ 8 - 1
api-module/src/main/resources/application.properties

@@ -1,6 +1,8 @@
 logging.config=classpath:log4j2.xml
 logging.config=classpath:log4j2.xml
 spring.profiles.active=test
 spring.profiles.active=test
-spring.application.name=we-com-server
+spring.application.name=growth-manager
+
+spring.main.allow-bean-definition-overriding=true
 
 
 spring.datasource.driver-class-name=com.mysql.jdbc.Driver
 spring.datasource.driver-class-name=com.mysql.jdbc.Driver
 spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
 spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
@@ -32,3 +34,8 @@ xxl.job.executor.logretentiondays=30
 
 
 
 
 
 
+rocketmq.accessKey=LTAI4G7puhXtLyHzHQpD6H7A
+rocketmq.secretKey=nEbq3xWNQd1qLpdy2u71qFweHkZjSG
+rocketmq.nameSrvAddr=http://MQ_INST_1894469520484605_BXhXuzkZ.mq-internet-access.mq-internet.aliyuncs.com:80
+
+

+ 1 - 1
api-module/src/main/resources/log4j2.xml

@@ -12,7 +12,7 @@
         <!-- 定义日志存储的路径,不要配置相对路径 -->
         <!-- 定义日志存储的路径,不要配置相对路径 -->
         <property name="FILE_PATH" value="/datalog" />
         <property name="FILE_PATH" value="/datalog" />
         <!--项目名称-->
         <!--项目名称-->
-        <property name="FILE_NAME" value="we_com_server" />
+        <property name="FILE_NAME" value="growth_manager" />
     </Properties>
     </Properties>
 
 
     <appenders>
     <appenders>

+ 324 - 0
api-module/src/main/resources/mapper/AlgGhAutoreplyVideoRankDataMapper.xml

@@ -0,0 +1,324 @@
+<?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.api.dao.mapper.AlgGhAutoreplyVideoRankDataMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.api.model.po.AlgGhAutoreplyVideoRankData">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="strategy_key" jdbcType="VARCHAR" property="strategyKey" />
+    <result column="dt_version" jdbcType="VARCHAR" property="dtVersion" />
+    <result column="gh_id" jdbcType="VARCHAR" property="ghId" />
+    <result column="sort" jdbcType="INTEGER" property="sort" />
+    <result column="video_id" jdbcType="BIGINT" property="videoId" />
+    <result column="title" jdbcType="VARCHAR" property="title" />
+    <result column="cover_url" jdbcType="VARCHAR" property="coverUrl" />
+    <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, strategy_key, dt_version, gh_id, sort, video_id, title, cover_url, is_delete, 
+    create_time, update_time
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.AlgGhAutoreplyVideoRankDataExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from alg_gh_autoreply_video_rank_data
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from alg_gh_autoreply_video_rank_data
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from alg_gh_autoreply_video_rank_data
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.api.model.po.AlgGhAutoreplyVideoRankDataExample">
+    delete from alg_gh_autoreply_video_rank_data
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.AlgGhAutoreplyVideoRankData">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into alg_gh_autoreply_video_rank_data (strategy_key, dt_version, gh_id, 
+      sort, video_id, title, 
+      cover_url, is_delete, create_time, 
+      update_time)
+    values (#{strategyKey,jdbcType=VARCHAR}, #{dtVersion,jdbcType=VARCHAR}, #{ghId,jdbcType=VARCHAR}, 
+      #{sort,jdbcType=INTEGER}, #{videoId,jdbcType=BIGINT}, #{title,jdbcType=VARCHAR}, 
+      #{coverUrl,jdbcType=VARCHAR}, #{isDelete,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{updateTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.AlgGhAutoreplyVideoRankData">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into alg_gh_autoreply_video_rank_data
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="strategyKey != null">
+        strategy_key,
+      </if>
+      <if test="dtVersion != null">
+        dt_version,
+      </if>
+      <if test="ghId != null">
+        gh_id,
+      </if>
+      <if test="sort != null">
+        sort,
+      </if>
+      <if test="videoId != null">
+        video_id,
+      </if>
+      <if test="title != null">
+        title,
+      </if>
+      <if test="coverUrl != null">
+        cover_url,
+      </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="strategyKey != null">
+        #{strategyKey,jdbcType=VARCHAR},
+      </if>
+      <if test="dtVersion != null">
+        #{dtVersion,jdbcType=VARCHAR},
+      </if>
+      <if test="ghId != null">
+        #{ghId,jdbcType=VARCHAR},
+      </if>
+      <if test="sort != null">
+        #{sort,jdbcType=INTEGER},
+      </if>
+      <if test="videoId != null">
+        #{videoId,jdbcType=BIGINT},
+      </if>
+      <if test="title != null">
+        #{title,jdbcType=VARCHAR},
+      </if>
+      <if test="coverUrl != null">
+        #{coverUrl,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.api.model.po.AlgGhAutoreplyVideoRankDataExample" resultType="java.lang.Long">
+    select count(*) from alg_gh_autoreply_video_rank_data
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update alg_gh_autoreply_video_rank_data
+    <set>
+      <if test="row.id != null">
+        id = #{row.id,jdbcType=BIGINT},
+      </if>
+      <if test="row.strategyKey != null">
+        strategy_key = #{row.strategyKey,jdbcType=VARCHAR},
+      </if>
+      <if test="row.dtVersion != null">
+        dt_version = #{row.dtVersion,jdbcType=VARCHAR},
+      </if>
+      <if test="row.ghId != null">
+        gh_id = #{row.ghId,jdbcType=VARCHAR},
+      </if>
+      <if test="row.sort != null">
+        sort = #{row.sort,jdbcType=INTEGER},
+      </if>
+      <if test="row.videoId != null">
+        video_id = #{row.videoId,jdbcType=BIGINT},
+      </if>
+      <if test="row.title != null">
+        title = #{row.title,jdbcType=VARCHAR},
+      </if>
+      <if test="row.coverUrl != null">
+        cover_url = #{row.coverUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="row.isDelete != null">
+        is_delete = #{row.isDelete,jdbcType=INTEGER},
+      </if>
+      <if test="row.createTime != null">
+        create_time = #{row.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="row.updateTime != null">
+        update_time = #{row.updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    <if test="example != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update alg_gh_autoreply_video_rank_data
+    set id = #{row.id,jdbcType=BIGINT},
+      strategy_key = #{row.strategyKey,jdbcType=VARCHAR},
+      dt_version = #{row.dtVersion,jdbcType=VARCHAR},
+      gh_id = #{row.ghId,jdbcType=VARCHAR},
+      sort = #{row.sort,jdbcType=INTEGER},
+      video_id = #{row.videoId,jdbcType=BIGINT},
+      title = #{row.title,jdbcType=VARCHAR},
+      cover_url = #{row.coverUrl,jdbcType=VARCHAR},
+      is_delete = #{row.isDelete,jdbcType=INTEGER},
+      create_time = #{row.createTime,jdbcType=TIMESTAMP},
+      update_time = #{row.updateTime,jdbcType=TIMESTAMP}
+    <if test="example != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.api.model.po.AlgGhAutoreplyVideoRankData">
+    update alg_gh_autoreply_video_rank_data
+    <set>
+      <if test="strategyKey != null">
+        strategy_key = #{strategyKey,jdbcType=VARCHAR},
+      </if>
+      <if test="dtVersion != null">
+        dt_version = #{dtVersion,jdbcType=VARCHAR},
+      </if>
+      <if test="ghId != null">
+        gh_id = #{ghId,jdbcType=VARCHAR},
+      </if>
+      <if test="sort != null">
+        sort = #{sort,jdbcType=INTEGER},
+      </if>
+      <if test="videoId != null">
+        video_id = #{videoId,jdbcType=BIGINT},
+      </if>
+      <if test="title != null">
+        title = #{title,jdbcType=VARCHAR},
+      </if>
+      <if test="coverUrl != null">
+        cover_url = #{coverUrl,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.api.model.po.AlgGhAutoreplyVideoRankData">
+    update alg_gh_autoreply_video_rank_data
+    set strategy_key = #{strategyKey,jdbcType=VARCHAR},
+      dt_version = #{dtVersion,jdbcType=VARCHAR},
+      gh_id = #{ghId,jdbcType=VARCHAR},
+      sort = #{sort,jdbcType=INTEGER},
+      video_id = #{videoId,jdbcType=BIGINT},
+      title = #{title,jdbcType=VARCHAR},
+      cover_url = #{coverUrl,jdbcType=VARCHAR},
+      is_delete = #{isDelete,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_time = #{updateTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+
+  <select id="selectLatestDtVersionByStrategyKey" resultType="string" parameterType="string">
+    SELECT dt_version
+    FROM alg_gh_autoreply_video_rank_data
+    WHERE strategy_key = #{strategyKey}
+    GROUP BY dt_version
+    ORDER BY dt_version DESC
+      LIMIT 1
+  </select>
+
+  <select id="selectLatestDtVersionByStrategyKeyAndGhId" resultType="string" >
+    SELECT dt_version
+    FROM alg_gh_autoreply_video_rank_data
+    WHERE strategy_key = #{strategyKey} and gh_id = #{ghId}
+    GROUP BY dt_version
+    ORDER BY dt_version DESC
+      LIMIT 1
+  </select>
+</mapper>

+ 401 - 0
api-module/src/main/resources/mapper/CgiReplyBucketDataMapper.xml

@@ -0,0 +1,401 @@
+<?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.api.dao.mapper.CgiReplyBucketDataMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.api.model.po.CgiReplyBucketData">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="strategy" jdbcType="VARCHAR" property="strategy" />
+    <result column="sort" jdbcType="INTEGER" property="sort" />
+    <result column="strategy_dt" jdbcType="VARCHAR" property="strategyDt" />
+    <result column="gh_id" jdbcType="VARCHAR" property="ghId" />
+    <result column="msg_type" jdbcType="INTEGER" property="msgType" />
+    <result column="title" jdbcType="VARCHAR" property="title" />
+    <result column="cover_url" jdbcType="VARCHAR" property="coverUrl" />
+    <result column="mini_app_id" jdbcType="VARCHAR" property="miniAppId" />
+    <result column="mini_page_path" jdbcType="VARCHAR" property="miniPagePath" />
+    <result column="mini_video_id" jdbcType="BIGINT" property="miniVideoId" />
+    <result column="page_path_url_id" jdbcType="BIGINT" property="pagePathUrlId" />
+    <result column="news_publish_content_id" jdbcType="VARCHAR" property="newsPublishContentId" />
+    <result column="plan_id" jdbcType="VARCHAR" property="planId" />
+    <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, strategy, sort, strategy_dt, gh_id, msg_type, title, cover_url, mini_app_id,
+    mini_page_path, mini_video_id, page_path_url_id, news_publish_content_id, plan_id,
+    is_delete, create_time, update_time
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.CgiReplyBucketDataExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from cgi_reply_bucket_data
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select
+    <include refid="Base_Column_List" />
+    from cgi_reply_bucket_data
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from cgi_reply_bucket_data
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.api.model.po.CgiReplyBucketDataExample">
+    delete from cgi_reply_bucket_data
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.CgiReplyBucketData">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into cgi_reply_bucket_data (strategy, sort, strategy_dt,
+      gh_id, msg_type, title,
+      cover_url, mini_app_id, mini_page_path,
+      mini_video_id, page_path_url_id, news_publish_content_id,
+      plan_id, is_delete, create_time,
+      update_time)
+    values (#{strategy,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, #{strategyDt,jdbcType=VARCHAR},
+      #{ghId,jdbcType=VARCHAR}, #{msgType,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR},
+      #{coverUrl,jdbcType=VARCHAR}, #{miniAppId,jdbcType=VARCHAR}, #{miniPagePath,jdbcType=VARCHAR},
+      #{miniVideoId,jdbcType=BIGINT}, #{pagePathUrlId,jdbcType=BIGINT}, #{newsPublishContentId,jdbcType=VARCHAR},
+      #{planId,jdbcType=VARCHAR}, #{isDelete,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
+      #{updateTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.CgiReplyBucketData">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into cgi_reply_bucket_data
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="strategy != null">
+        strategy,
+      </if>
+      <if test="sort != null">
+        sort,
+      </if>
+      <if test="strategyDt != null">
+        strategy_dt,
+      </if>
+      <if test="ghId != null">
+        gh_id,
+      </if>
+      <if test="msgType != null">
+        msg_type,
+      </if>
+      <if test="title != null">
+        title,
+      </if>
+      <if test="coverUrl != null">
+        cover_url,
+      </if>
+      <if test="miniAppId != null">
+        mini_app_id,
+      </if>
+      <if test="miniPagePath != null">
+        mini_page_path,
+      </if>
+      <if test="miniVideoId != null">
+        mini_video_id,
+      </if>
+      <if test="pagePathUrlId != null">
+        page_path_url_id,
+      </if>
+      <if test="newsPublishContentId != null">
+        news_publish_content_id,
+      </if>
+      <if test="planId != null">
+        plan_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="strategy != null">
+        #{strategy,jdbcType=VARCHAR},
+      </if>
+      <if test="sort != null">
+        #{sort,jdbcType=INTEGER},
+      </if>
+      <if test="strategyDt != null">
+        #{strategyDt,jdbcType=VARCHAR},
+      </if>
+      <if test="ghId != null">
+        #{ghId,jdbcType=VARCHAR},
+      </if>
+      <if test="msgType != null">
+        #{msgType,jdbcType=INTEGER},
+      </if>
+      <if test="title != null">
+        #{title,jdbcType=VARCHAR},
+      </if>
+      <if test="coverUrl != null">
+        #{coverUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="miniAppId != null">
+        #{miniAppId,jdbcType=VARCHAR},
+      </if>
+      <if test="miniPagePath != null">
+        #{miniPagePath,jdbcType=VARCHAR},
+      </if>
+      <if test="miniVideoId != null">
+        #{miniVideoId,jdbcType=BIGINT},
+      </if>
+      <if test="pagePathUrlId != null">
+        #{pagePathUrlId,jdbcType=BIGINT},
+      </if>
+      <if test="newsPublishContentId != null">
+        #{newsPublishContentId,jdbcType=VARCHAR},
+      </if>
+      <if test="planId != null">
+        #{planId,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.api.model.po.CgiReplyBucketDataExample" resultType="java.lang.Long">
+    select count(*) from cgi_reply_bucket_data
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update cgi_reply_bucket_data
+    <set>
+      <if test="row.id != null">
+        id = #{row.id,jdbcType=BIGINT},
+      </if>
+      <if test="row.strategy != null">
+        strategy = #{row.strategy,jdbcType=VARCHAR},
+      </if>
+      <if test="row.sort != null">
+        sort = #{row.sort,jdbcType=INTEGER},
+      </if>
+      <if test="row.strategyDt != null">
+        strategy_dt = #{row.strategyDt,jdbcType=VARCHAR},
+      </if>
+      <if test="row.ghId != null">
+        gh_id = #{row.ghId,jdbcType=VARCHAR},
+      </if>
+      <if test="row.msgType != null">
+        msg_type = #{row.msgType,jdbcType=INTEGER},
+      </if>
+      <if test="row.title != null">
+        title = #{row.title,jdbcType=VARCHAR},
+      </if>
+      <if test="row.coverUrl != null">
+        cover_url = #{row.coverUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="row.miniAppId != null">
+        mini_app_id = #{row.miniAppId,jdbcType=VARCHAR},
+      </if>
+      <if test="row.miniPagePath != null">
+        mini_page_path = #{row.miniPagePath,jdbcType=VARCHAR},
+      </if>
+      <if test="row.miniVideoId != null">
+        mini_video_id = #{row.miniVideoId,jdbcType=BIGINT},
+      </if>
+      <if test="row.pagePathUrlId != null">
+        page_path_url_id = #{row.pagePathUrlId,jdbcType=BIGINT},
+      </if>
+      <if test="row.newsPublishContentId != null">
+        news_publish_content_id = #{row.newsPublishContentId,jdbcType=VARCHAR},
+      </if>
+      <if test="row.planId != null">
+        plan_id = #{row.planId,jdbcType=VARCHAR},
+      </if>
+      <if test="row.isDelete != null">
+        is_delete = #{row.isDelete,jdbcType=INTEGER},
+      </if>
+      <if test="row.createTime != null">
+        create_time = #{row.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="row.updateTime != null">
+        update_time = #{row.updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    <if test="example != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update cgi_reply_bucket_data
+    set id = #{row.id,jdbcType=BIGINT},
+      strategy = #{row.strategy,jdbcType=VARCHAR},
+      sort = #{row.sort,jdbcType=INTEGER},
+      strategy_dt = #{row.strategyDt,jdbcType=VARCHAR},
+      gh_id = #{row.ghId,jdbcType=VARCHAR},
+      msg_type = #{row.msgType,jdbcType=INTEGER},
+      title = #{row.title,jdbcType=VARCHAR},
+      cover_url = #{row.coverUrl,jdbcType=VARCHAR},
+      mini_app_id = #{row.miniAppId,jdbcType=VARCHAR},
+      mini_page_path = #{row.miniPagePath,jdbcType=VARCHAR},
+      mini_video_id = #{row.miniVideoId,jdbcType=BIGINT},
+      page_path_url_id = #{row.pagePathUrlId,jdbcType=BIGINT},
+      news_publish_content_id = #{row.newsPublishContentId,jdbcType=VARCHAR},
+      plan_id = #{row.planId,jdbcType=VARCHAR},
+      is_delete = #{row.isDelete,jdbcType=INTEGER},
+      create_time = #{row.createTime,jdbcType=TIMESTAMP},
+      update_time = #{row.updateTime,jdbcType=TIMESTAMP}
+    <if test="example != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.api.model.po.CgiReplyBucketData">
+    update cgi_reply_bucket_data
+    <set>
+      <if test="strategy != null">
+        strategy = #{strategy,jdbcType=VARCHAR},
+      </if>
+      <if test="sort != null">
+        sort = #{sort,jdbcType=INTEGER},
+      </if>
+      <if test="strategyDt != null">
+        strategy_dt = #{strategyDt,jdbcType=VARCHAR},
+      </if>
+      <if test="ghId != null">
+        gh_id = #{ghId,jdbcType=VARCHAR},
+      </if>
+      <if test="msgType != null">
+        msg_type = #{msgType,jdbcType=INTEGER},
+      </if>
+      <if test="title != null">
+        title = #{title,jdbcType=VARCHAR},
+      </if>
+      <if test="coverUrl != null">
+        cover_url = #{coverUrl,jdbcType=VARCHAR},
+      </if>
+      <if test="miniAppId != null">
+        mini_app_id = #{miniAppId,jdbcType=VARCHAR},
+      </if>
+      <if test="miniPagePath != null">
+        mini_page_path = #{miniPagePath,jdbcType=VARCHAR},
+      </if>
+      <if test="miniVideoId != null">
+        mini_video_id = #{miniVideoId,jdbcType=BIGINT},
+      </if>
+      <if test="pagePathUrlId != null">
+        page_path_url_id = #{pagePathUrlId,jdbcType=BIGINT},
+      </if>
+      <if test="newsPublishContentId != null">
+        news_publish_content_id = #{newsPublishContentId,jdbcType=VARCHAR},
+      </if>
+      <if test="planId != null">
+        plan_id = #{planId,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.api.model.po.CgiReplyBucketData">
+    update cgi_reply_bucket_data
+    set strategy = #{strategy,jdbcType=VARCHAR},
+      sort = #{sort,jdbcType=INTEGER},
+      strategy_dt = #{strategyDt,jdbcType=VARCHAR},
+      gh_id = #{ghId,jdbcType=VARCHAR},
+      msg_type = #{msgType,jdbcType=INTEGER},
+      title = #{title,jdbcType=VARCHAR},
+      cover_url = #{coverUrl,jdbcType=VARCHAR},
+      mini_app_id = #{miniAppId,jdbcType=VARCHAR},
+      mini_page_path = #{miniPagePath,jdbcType=VARCHAR},
+      mini_video_id = #{miniVideoId,jdbcType=BIGINT},
+      page_path_url_id = #{pagePathUrlId,jdbcType=BIGINT},
+      news_publish_content_id = #{newsPublishContentId,jdbcType=VARCHAR},
+      plan_id = #{planId,jdbcType=VARCHAR},
+      is_delete = #{isDelete,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_time = #{updateTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 131 - 103
offline-module/src/main/resources/StaffMapper.xml → api-module/src/main/resources/mapper/GhDetailMapper.xml

@@ -1,17 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?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">
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.tzld.piaoquan.offline.dao.mapper.OfflineStaffMapper">
-  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.common.model.po.Staff">
+<mapper namespace="com.tzld.piaoquan.api.dao.mapper.GhDetailMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.api.model.po.GhDetail">
     <id column="id" jdbcType="BIGINT" property="id" />
     <id column="id" jdbcType="BIGINT" property="id" />
-    <result column="corp_id" jdbcType="BIGINT" property="corpId" />
-    <result column="staff_ext_id" jdbcType="VARCHAR" property="staffExtId" />
-    <result column="carrier_id" jdbcType="VARCHAR" property="carrierId" />
-    <result column="remark" jdbcType="VARCHAR" property="remark" />
+    <result column="gh_id" jdbcType="VARCHAR" property="ghId" />
+    <result column="gh_name" jdbcType="VARCHAR" property="ghName" />
+    <result column="type" jdbcType="INTEGER" property="type" />
     <result column="category1" jdbcType="VARCHAR" property="category1" />
     <result column="category1" jdbcType="VARCHAR" property="category1" />
     <result column="category2" jdbcType="VARCHAR" property="category2" />
     <result column="category2" jdbcType="VARCHAR" property="category2" />
     <result column="is_delete" jdbcType="INTEGER" property="isDelete" />
     <result column="is_delete" jdbcType="INTEGER" property="isDelete" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
     <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="channel" jdbcType="VARCHAR" property="channel" />
+    <result column="video_ids" jdbcType="VARCHAR" property="videoIds" />
+    <result column="strategy_status" jdbcType="INTEGER" property="strategyStatus" />
   </resultMap>
   </resultMap>
   <sql id="Example_Where_Clause">
   <sql id="Example_Where_Clause">
     <where>
     <where>
@@ -72,16 +74,15 @@
     </where>
     </where>
   </sql>
   </sql>
   <sql id="Base_Column_List">
   <sql id="Base_Column_List">
-    id, corp_id, staff_ext_id, carrier_id, remark, category1, category2, is_delete, create_time, 
-    update_time
+    id, gh_id, gh_name, type, category1, category2, is_delete, create_time, update_time, channel, video_ids, strategy_status
   </sql>
   </sql>
-  <select id="selectByExample" parameterType="com.tzld.piaoquan.common.model.po.StaffExample" resultMap="BaseResultMap">
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.GhDetailExample" resultMap="BaseResultMap">
     select
     select
     <if test="distinct">
     <if test="distinct">
       distinct
       distinct
     </if>
     </if>
     <include refid="Base_Column_List" />
     <include refid="Base_Column_List" />
-    from we_com_staff
+    from gh_detail
     <if test="_parameter != null">
     <if test="_parameter != null">
       <include refid="Example_Where_Clause" />
       <include refid="Example_Where_Clause" />
     </if>
     </if>
@@ -95,46 +96,45 @@
   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
     select 
     select 
     <include refid="Base_Column_List" />
     <include refid="Base_Column_List" />
-    from we_com_staff
+    from gh_detail
     where id = #{id,jdbcType=BIGINT}
     where id = #{id,jdbcType=BIGINT}
   </select>
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
-    delete from we_com_staff
+    delete from gh_detail
     where id = #{id,jdbcType=BIGINT}
     where id = #{id,jdbcType=BIGINT}
   </delete>
   </delete>
-  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.common.model.po.StaffExample">
-    delete from we_com_staff
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.api.model.po.GhDetailExample">
+    delete from gh_detail
     <if test="_parameter != null">
     <if test="_parameter != null">
       <include refid="Example_Where_Clause" />
       <include refid="Example_Where_Clause" />
     </if>
     </if>
   </delete>
   </delete>
-  <insert id="insert" parameterType="com.tzld.piaoquan.common.model.po.Staff">
-    insert into we_com_staff (id, corp_id, staff_ext_id, 
-      carrier_id, remark, category1, 
-      category2, create_time,
-      update_time)
-    values (#{id,jdbcType=BIGINT}, #{corpId,jdbcType=BIGINT}, #{staffExtId,jdbcType=VARCHAR}, 
-      #{carrierId,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{category1,jdbcType=VARCHAR}, 
-      #{category2,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
-      #{updateTime,jdbcType=TIMESTAMP})
+  <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.GhDetail">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into gh_detail (gh_id, gh_name, `type`,
+      category1, category2,
+      create_time, update_time, channel, video_ids, strategy_status)
+    values (#{ghId,jdbcType=VARCHAR}, #{ghName,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, 
+      #{category1,jdbcType=VARCHAR}, #{category2,jdbcType=VARCHAR},
+      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{channel,jdbcType=VARCHAR}
+    #{videoIds,jdbcType=VARCHAR}, #{strategyStatus,jdbcType=INTEGER})
   </insert>
   </insert>
-  <insert id="insertSelective" parameterType="com.tzld.piaoquan.common.model.po.Staff">
-    insert into we_com_staff
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.GhDetail">
+    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+      SELECT LAST_INSERT_ID()
+    </selectKey>
+    insert into gh_detail
     <trim prefix="(" suffix=")" suffixOverrides=",">
     <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        id,
+      <if test="ghId != null">
+        gh_id,
       </if>
       </if>
-      <if test="corpId != null">
-        corp_id,
+      <if test="ghName != null">
+        gh_name,
       </if>
       </if>
-      <if test="staffExtId != null">
-        staff_ext_id,
-      </if>
-      <if test="carrierId != null">
-        carrier_id,
-      </if>
-      <if test="remark != null">
-        remark,
+      <if test="type != null">
+        type,
       </if>
       </if>
       <if test="category1 != null">
       <if test="category1 != null">
         category1,
         category1,
@@ -151,22 +151,25 @@
       <if test="updateTime != null">
       <if test="updateTime != null">
         update_time,
         update_time,
       </if>
       </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        #{id,jdbcType=BIGINT},
+      <if test="channel != null">
+        channel,
       </if>
       </if>
-      <if test="corpId != null">
-        #{corpId,jdbcType=BIGINT},
+      <if test="videoIds != null">
+        video_ids,
       </if>
       </if>
-      <if test="staffExtId != null">
-        #{staffExtId,jdbcType=VARCHAR},
+      <if test="strategyStatus != null">
+        strategy_status,
       </if>
       </if>
-      <if test="carrierId != null">
-        #{carrierId,jdbcType=VARCHAR},
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="ghId != null">
+        #{ghId,jdbcType=VARCHAR},
+      </if>
+      <if test="ghName != null">
+        #{ghName,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="remark != null">
-        #{remark,jdbcType=VARCHAR},
+      <if test="type != null">
+        #{type,jdbcType=INTEGER},
       </if>
       </if>
       <if test="category1 != null">
       <if test="category1 != null">
         #{category1,jdbcType=VARCHAR},
         #{category1,jdbcType=VARCHAR},
@@ -183,82 +186,96 @@
       <if test="updateTime != null">
       <if test="updateTime != null">
         #{updateTime,jdbcType=TIMESTAMP},
         #{updateTime,jdbcType=TIMESTAMP},
       </if>
       </if>
+      <if test="channel != null">
+        #{channel,jdbcType=VARCHAR},
+      </if>
+      <if test="videoIds != null">
+        #{videoIds,jdbcType=VARCHAR},
+      </if>
+      <if test="strategyStatus != null">
+        #{strategyStatus,jdbcType=INTEGER},
+      </if>
     </trim>
     </trim>
   </insert>
   </insert>
-  <select id="countByExample" parameterType="com.tzld.piaoquan.common.model.po.StaffExample" resultType="java.lang.Long">
-    select count(*) from we_com_staff
+  <select id="countByExample" parameterType="com.tzld.piaoquan.api.model.po.GhDetailExample" resultType="java.lang.Long">
+    select count(*) from gh_detail
     <if test="_parameter != null">
     <if test="_parameter != null">
       <include refid="Example_Where_Clause" />
       <include refid="Example_Where_Clause" />
     </if>
     </if>
   </select>
   </select>
   <update id="updateByExampleSelective" parameterType="map">
   <update id="updateByExampleSelective" parameterType="map">
-    update we_com_staff
+    update gh_detail
     <set>
     <set>
-      <if test="record.id != null">
-        id = #{record.id,jdbcType=BIGINT},
+      <if test="row.id != null">
+        id = #{row.id,jdbcType=BIGINT},
+      </if>
+      <if test="row.ghId != null">
+        gh_id = #{row.ghId,jdbcType=VARCHAR},
+      </if>
+      <if test="row.ghName != null">
+        gh_name = #{row.ghName,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="record.corpId != null">
-        corp_id = #{record.corpId,jdbcType=BIGINT},
+      <if test="row.type != null">
+        type = #{row.type,jdbcType=INTEGER},
       </if>
       </if>
-      <if test="record.staffExtId != null">
-        staff_ext_id = #{record.staffExtId,jdbcType=VARCHAR},
+      <if test="row.category1 != null">
+        category1 = #{row.category1,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="record.carrierId != null">
-        carrier_id = #{record.carrierId,jdbcType=VARCHAR},
+      <if test="row.category2 != null">
+        category2 = #{row.category2,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="record.remark != null">
-        remark = #{record.remark,jdbcType=VARCHAR},
+      <if test="row.isDelete != null">
+        is_delete = #{row.isDelete,jdbcType=INTEGER},
       </if>
       </if>
-      <if test="record.category1 != null">
-        category1 = #{record.category1,jdbcType=VARCHAR},
+      <if test="row.createTime != null">
+        create_time = #{row.createTime,jdbcType=TIMESTAMP},
       </if>
       </if>
-      <if test="record.category2 != null">
-        category2 = #{record.category2,jdbcType=VARCHAR},
+      <if test="row.updateTime != null">
+        update_time = #{row.updateTime,jdbcType=TIMESTAMP},
       </if>
       </if>
-      <if test="record.isDelete != null">
-        is_delete = #{record.isDelete,jdbcType=INTEGER},
+      <if test="row.channel != null">
+        channel = #{row.channel,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="record.createTime != null">
-        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      <if test="row.videoIds != null">
+        video_ids = #{row.videoIds,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="record.updateTime != null">
-        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      <if test="row.strategyStatus != null">
+        strategyStatus = #{row.strategyStatus,jdbcType=INTEGER},
       </if>
       </if>
     </set>
     </set>
-    <if test="_parameter != null">
+    <if test="example != null">
       <include refid="Update_By_Example_Where_Clause" />
       <include refid="Update_By_Example_Where_Clause" />
     </if>
     </if>
   </update>
   </update>
   <update id="updateByExample" parameterType="map">
   <update id="updateByExample" parameterType="map">
-    update we_com_staff
-    set id = #{record.id,jdbcType=BIGINT},
-      corp_id = #{record.corpId,jdbcType=BIGINT},
-      staff_ext_id = #{record.staffExtId,jdbcType=VARCHAR},
-      carrier_id = #{record.carrierId,jdbcType=VARCHAR},
-      remark = #{record.remark,jdbcType=VARCHAR},
-      category1 = #{record.category1,jdbcType=VARCHAR},
-      category2 = #{record.category2,jdbcType=VARCHAR},
-      is_delete = #{record.isDelete,jdbcType=INTEGER},
-      create_time = #{record.createTime,jdbcType=TIMESTAMP},
-      update_time = #{record.updateTime,jdbcType=TIMESTAMP}
-    <if test="_parameter != null">
+    update gh_detail
+    set id = #{row.id,jdbcType=BIGINT},
+      gh_id = #{row.ghId,jdbcType=VARCHAR},
+      gh_name = #{row.ghName,jdbcType=VARCHAR},
+      type = #{row.type,jdbcType=INTEGER},
+      category1 = #{row.category1,jdbcType=VARCHAR},
+      category2 = #{row.category2,jdbcType=VARCHAR},
+      is_delete = #{row.isDelete,jdbcType=INTEGER},
+      create_time = #{row.createTime,jdbcType=TIMESTAMP},
+      update_time = #{row.updateTime,jdbcType=TIMESTAMP},
+      channel = #{row.channel,jdbcType=VARCHAR},
+      video_ids = #{row.videoIds,jdbcType=VARCHAR},
+      strategy_status = #{row.strategyStatus,jdbcType=INTEGER}
+    <if test="example != null">
       <include refid="Update_By_Example_Where_Clause" />
       <include refid="Update_By_Example_Where_Clause" />
     </if>
     </if>
   </update>
   </update>
-  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.common.model.po.Staff">
-    update we_com_staff
+  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.api.model.po.GhDetail">
+    update gh_detail
     <set>
     <set>
-      <if test="corpId != null">
-        corp_id = #{corpId,jdbcType=BIGINT},
+      <if test="ghId != null">
+        gh_id = #{ghId,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="staffExtId != null">
-        staff_ext_id = #{staffExtId,jdbcType=VARCHAR},
+      <if test="ghName != null">
+        gh_name = #{ghName,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="carrierId != null">
-        carrier_id = #{carrierId,jdbcType=VARCHAR},
-      </if>
-      <if test="remark != null">
-        remark = #{remark,jdbcType=VARCHAR},
+      <if test="type != null">
+        type = #{type,jdbcType=INTEGER},
       </if>
       </if>
       <if test="category1 != null">
       <if test="category1 != null">
         category1 = #{category1,jdbcType=VARCHAR},
         category1 = #{category1,jdbcType=VARCHAR},
@@ -275,20 +292,31 @@
       <if test="updateTime != null">
       <if test="updateTime != null">
         update_time = #{updateTime,jdbcType=TIMESTAMP},
         update_time = #{updateTime,jdbcType=TIMESTAMP},
       </if>
       </if>
+      <if test="channel != null">
+        channel = #{channel,jdbcType=VARCHAR},
+      </if>
+      <if test="videoIds != null">
+        video_ids = #{videoIds,jdbcType=VARCHAR},
+      </if>
+      <if test="strategyStatus != null">
+        strategy_status = #{strategyStatus,jdbcType=INTEGER},
+      </if>
     </set>
     </set>
     where id = #{id,jdbcType=BIGINT}
     where id = #{id,jdbcType=BIGINT}
   </update>
   </update>
-  <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.common.model.po.Staff">
-    update we_com_staff
-    set corp_id = #{corpId,jdbcType=BIGINT},
-      staff_ext_id = #{staffExtId,jdbcType=VARCHAR},
-      carrier_id = #{carrierId,jdbcType=VARCHAR},
-      remark = #{remark,jdbcType=VARCHAR},
+  <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.api.model.po.GhDetail">
+    update gh_detail
+    set gh_id = #{ghId,jdbcType=VARCHAR},
+      gh_name = #{ghName,jdbcType=VARCHAR},
+      type = #{type,jdbcType=INTEGER},
       category1 = #{category1,jdbcType=VARCHAR},
       category1 = #{category1,jdbcType=VARCHAR},
       category2 = #{category2,jdbcType=VARCHAR},
       category2 = #{category2,jdbcType=VARCHAR},
       is_delete = #{isDelete,jdbcType=INTEGER},
       is_delete = #{isDelete,jdbcType=INTEGER},
       create_time = #{createTime,jdbcType=TIMESTAMP},
       create_time = #{createTime,jdbcType=TIMESTAMP},
-      update_time = #{updateTime,jdbcType=TIMESTAMP}
+      update_time = #{updateTime,jdbcType=TIMESTAMP},
+      channel = #{channel,jdbcType=VARCHAR},
+      video_ids = #{videoIds,jdbcType=VARCHAR},
+      strategy_status = #{strategyStatus,jdbcType=INTEGER}
     where id = #{id,jdbcType=BIGINT}
     where id = #{id,jdbcType=BIGINT}
   </update>
   </update>
 </mapper>
 </mapper>

+ 278 - 0
api-module/src/main/resources/mapper/NewPushMessageCallbackMapper.xml

@@ -0,0 +1,278 @@
+<?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.api.dao.mapper.NewPushMessageCallbackMapper">
+    <resultMap id="BaseResultMap" type="com.tzld.piaoquan.api.model.po.PushMessageCallback">
+        <id column="id" jdbcType="BIGINT" property="id"/>
+        <result column="gh_id" jdbcType="VARCHAR" property="ghId"/>
+        <result column="open_id" jdbcType="VARCHAR" property="openId"/>
+        <result column="timestamp" jdbcType="BIGINT" property="timestamp"/>
+        <result column="msg_type" jdbcType="INTEGER" property="msgType"/>
+        <result column="video_id" jdbcType="BIGINT" property="videoId"/>
+        <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
+    </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
+        , gh_id, open_id, timestamp, msg_type, video_id, create_time
+    </sql>
+    <select id="selectByExample"
+            parameterType="com.tzld.piaoquan.api.model.po.PushMessageCallbackExample"
+            resultMap="BaseResultMap">
+        select
+        <if test="distinct">
+            distinct
+        </if>
+        <include refid="Base_Column_List"/>
+        from push_message_callback
+        <if test="_parameter != null">
+            <include refid="Example_Where_Clause"/>
+        </if>
+        <if test="orderByClause != null">
+            order by ${orderByClause}
+        </if>
+    </select>
+    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+        select
+        <include refid="Base_Column_List"/>
+        from push_message_callback
+        where id = #{id,jdbcType=BIGINT}
+    </select>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+        delete
+        from push_message_callback
+        where id = #{id,jdbcType=BIGINT}
+    </delete>
+    <delete id="deleteByExample"
+            parameterType="com.tzld.piaoquan.api.model.po.PushMessageCallbackExample">
+        delete from push_message_callback
+        <if test="_parameter != null">
+            <include refid="Example_Where_Clause"/>
+        </if>
+    </delete>
+    <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.PushMessageCallback">
+        <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+            SELECT LAST_INSERT_ID()
+        </selectKey>
+        insert into push_message_callback (gh_id, open_id, timestamp,
+        msg_type, video_id, create_time
+        )
+        values (#{ghId,jdbcType=VARCHAR}, #{openId,jdbcType=VARCHAR}, #{timestamp,jdbcType=BIGINT},
+        #{msgType,jdbcType=INTEGER}, #{videoId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}
+        )
+    </insert>
+    <insert id="insertSelective"
+            parameterType="com.tzld.piaoquan.api.model.po.PushMessageCallback">
+        <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
+            SELECT LAST_INSERT_ID()
+        </selectKey>
+        insert into push_message_callback
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="ghId != null">
+                gh_id,
+            </if>
+            <if test="openId != null">
+                open_id,
+            </if>
+            <if test="timestamp != null">
+                timestamp,
+            </if>
+            <if test="msgType != null">
+                msg_type,
+            </if>
+            <if test="videoId != null">
+                video_id,
+            </if>
+            <if test="createTime != null">
+                create_time,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="ghId != null">
+                #{ghId,jdbcType=VARCHAR},
+            </if>
+            <if test="openId != null">
+                #{openId,jdbcType=VARCHAR},
+            </if>
+            <if test="timestamp != null">
+                #{timestamp,jdbcType=BIGINT},
+            </if>
+            <if test="msgType != null">
+                #{msgType,jdbcType=INTEGER},
+            </if>
+            <if test="videoId != null">
+                #{videoId,jdbcType=BIGINT},
+            </if>
+            <if test="createTime != null">
+                #{createTime,jdbcType=TIMESTAMP},
+            </if>
+        </trim>
+    </insert>
+    <select id="countByExample"
+            parameterType="com.tzld.piaoquan.api.model.po.PushMessageCallbackExample"
+            resultType="java.lang.Long">
+        select count(*) from push_message_callback
+        <if test="_parameter != null">
+            <include refid="Example_Where_Clause"/>
+        </if>
+    </select>
+    <update id="updateByExampleSelective" parameterType="map">
+        update push_message_callback
+        <set>
+            <if test="row.id != null">
+                id = #{row.id,jdbcType=BIGINT},
+            </if>
+            <if test="row.ghId != null">
+                gh_id = #{row.ghId,jdbcType=VARCHAR},
+            </if>
+            <if test="row.openId != null">
+                open_id = #{row.openId,jdbcType=VARCHAR},
+            </if>
+            <if test="row.timestamp != null">
+                timestamp = #{row.timestamp,jdbcType=BIGINT},
+            </if>
+            <if test="row.msgType != null">
+                msg_type = #{row.msgType,jdbcType=INTEGER},
+            </if>
+            <if test="row.videoId != null">
+                video_id = #{row.videoId,jdbcType=BIGINT},
+            </if>
+            <if test="row.createTime != null">
+                create_time = #{row.createTime,jdbcType=TIMESTAMP},
+            </if>
+        </set>
+        <if test="example != null">
+            <include refid="Update_By_Example_Where_Clause"/>
+        </if>
+    </update>
+    <update id="updateByExample" parameterType="map">
+        update push_message_callback
+        set id = #{row.id,jdbcType=BIGINT},
+        gh_id = #{row.ghId,jdbcType=VARCHAR},
+        open_id = #{row.openId,jdbcType=VARCHAR},
+        timestamp = #{row.timestamp,jdbcType=BIGINT},
+        msg_type = #{row.msgType,jdbcType=INTEGER},
+        video_id = #{row.videoId,jdbcType=BIGINT},
+        create_time = #{row.createTime,jdbcType=TIMESTAMP}
+        <if test="example != null">
+            <include refid="Update_By_Example_Where_Clause"/>
+        </if>
+    </update>
+    <update id="updateByPrimaryKeySelective"
+            parameterType="com.tzld.piaoquan.api.model.po.PushMessageCallback">
+        update push_message_callback
+        <set>
+            <if test="ghId != null">
+                gh_id = #{ghId,jdbcType=VARCHAR},
+            </if>
+            <if test="openId != null">
+                open_id = #{openId,jdbcType=VARCHAR},
+            </if>
+            <if test="timestamp != null">
+                timestamp = #{timestamp,jdbcType=BIGINT},
+            </if>
+            <if test="msgType != null">
+                msg_type = #{msgType,jdbcType=INTEGER},
+            </if>
+            <if test="videoId != null">
+                video_id = #{videoId,jdbcType=BIGINT},
+            </if>
+            <if test="createTime != null">
+                create_time = #{createTime,jdbcType=TIMESTAMP},
+            </if>
+        </set>
+        where id = #{id,jdbcType=BIGINT}
+    </update>
+    <update id="updateByPrimaryKey"
+            parameterType="com.tzld.piaoquan.api.model.po.PushMessageCallback">
+        update push_message_callback
+        set gh_id       = #{ghId,jdbcType=VARCHAR},
+            open_id     = #{openId,jdbcType=VARCHAR},
+            timestamp   = #{timestamp,jdbcType=BIGINT},
+            msg_type    = #{msgType,jdbcType=INTEGER},
+            video_id    = #{videoId,jdbcType=BIGINT},
+            create_time = #{createTime,jdbcType=TIMESTAMP}
+        where id = #{id,jdbcType=BIGINT}
+    </update>
+
+    <insert id="insertList" parameterType="java.util.List">
+        insert into push_message_callback
+        (
+        gh_id,
+        open_id,
+        timestamp,
+        msg_type,
+        video_id,
+        create_time
+        )
+        values
+        <foreach collection="list" item="item" separator=",">
+            (
+            #{item.ghId,jdbcType=VARCHAR},
+            #{item.openId,jdbcType=VARCHAR},
+            #{item.timestamp,jdbcType=BIGINT},
+            #{item.msgType,jdbcType=INTEGER},
+            #{item.videoId,jdbcType=BIGINT},
+            #{item.createTime,jdbcType=TIMESTAMP}
+            )
+        </foreach>
+    </insert>
+</mapper>

+ 60 - 78
offline-module/src/main/resources/CorpMapper.xml → api-module/src/main/resources/mapper/ReplyStaffMapper.xml

@@ -1,11 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?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">
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.tzld.piaoquan.offline.dao.mapper.OfflineCorpMapper">
-  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.common.model.po.Corp">
+<mapper namespace="com.tzld.piaoquan.api.dao.mapper.ReplyStaffMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.api.model.po.ReplyStaff">
     <id column="id" jdbcType="BIGINT" property="id" />
     <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="user_id" jdbcType="VARCHAR" property="userId" />
     <result column="name" jdbcType="VARCHAR" property="name" />
     <result column="name" jdbcType="VARCHAR" property="name" />
-    <result column="corp_id" jdbcType="VARCHAR" property="corpId" />
-    <result column="secret" jdbcType="VARCHAR" property="secret" />
     <result column="is_delete" jdbcType="INTEGER" property="isDelete" />
     <result column="is_delete" jdbcType="INTEGER" property="isDelete" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
     <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
@@ -69,63 +68,57 @@
     </where>
     </where>
   </sql>
   </sql>
   <sql id="Base_Column_List">
   <sql id="Base_Column_List">
-    id, `name`, corp_id, secret, is_delete, create_time, update_time
+    id, user_id, name, is_delete, create_time, update_time
   </sql>
   </sql>
-  <select id="selectByExample" parameterType="com.tzld.piaoquan.common.model.po.CorpExample" resultMap="BaseResultMap">
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.ReplyStaffExample" resultMap="BaseResultMap">
     select
     select
     <if test="distinct">
     <if test="distinct">
       distinct
       distinct
     </if>
     </if>
     <include refid="Base_Column_List" />
     <include refid="Base_Column_List" />
-    from we_com_corp
+    from reply_staff
     <if test="_parameter != null">
     <if test="_parameter != null">
       <include refid="Example_Where_Clause" />
       <include refid="Example_Where_Clause" />
     </if>
     </if>
     <if test="orderByClause != null">
     <if test="orderByClause != null">
       order by ${orderByClause}
       order by ${orderByClause}
     </if>
     </if>
-    <if test="page != null">
-      limit #{page.offset} , #{page.pageSize}
-    </if>
   </select>
   </select>
   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
     select 
     select 
     <include refid="Base_Column_List" />
     <include refid="Base_Column_List" />
-    from we_com_corp
+    from reply_staff
     where id = #{id,jdbcType=BIGINT}
     where id = #{id,jdbcType=BIGINT}
   </select>
   </select>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
   <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
-    delete from we_com_corp
+    delete from reply_staff
     where id = #{id,jdbcType=BIGINT}
     where id = #{id,jdbcType=BIGINT}
   </delete>
   </delete>
-  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.common.model.po.CorpExample">
-    delete from we_com_corp
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.api.model.po.ReplyStaffExample">
+    delete from reply_staff
     <if test="_parameter != null">
     <if test="_parameter != null">
       <include refid="Example_Where_Clause" />
       <include refid="Example_Where_Clause" />
     </if>
     </if>
   </delete>
   </delete>
-  <insert id="insert" parameterType="com.tzld.piaoquan.common.model.po.Corp">
-    insert into we_com_corp (id, `name`, corp_id, 
-      secret, is_delete, create_time, 
-      update_time)
-    values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{corpId,jdbcType=VARCHAR}, 
-      #{secret,jdbcType=VARCHAR}, #{isDelete,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
-      #{updateTime,jdbcType=TIMESTAMP})
+  <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.ReplyStaff">
+    insert into reply_staff (id, user_id, name, 
+      is_delete, create_time, update_time
+      )
+    values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 
+      #{isDelete,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
+      )
   </insert>
   </insert>
-  <insert id="insertSelective" parameterType="com.tzld.piaoquan.common.model.po.Corp">
-    insert into we_com_corp
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.ReplyStaff">
+    insert into reply_staff
     <trim prefix="(" suffix=")" suffixOverrides=",">
     <trim prefix="(" suffix=")" suffixOverrides=",">
       <if test="id != null">
       <if test="id != null">
         id,
         id,
       </if>
       </if>
-      <if test="name != null">
-        `name`,
-      </if>
-      <if test="corpId != null">
-        corp_id,
+      <if test="userId != null">
+        user_id,
       </if>
       </if>
-      <if test="secret != null">
-        secret,
+      <if test="name != null">
+        name,
       </if>
       </if>
       <if test="isDelete != null">
       <if test="isDelete != null">
         is_delete,
         is_delete,
@@ -141,15 +134,12 @@
       <if test="id != null">
       <if test="id != null">
         #{id,jdbcType=BIGINT},
         #{id,jdbcType=BIGINT},
       </if>
       </if>
+      <if test="userId != null">
+        #{userId,jdbcType=VARCHAR},
+      </if>
       <if test="name != null">
       <if test="name != null">
         #{name,jdbcType=VARCHAR},
         #{name,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="corpId != null">
-        #{corpId,jdbcType=VARCHAR},
-      </if>
-      <if test="secret != null">
-        #{secret,jdbcType=VARCHAR},
-      </if>
       <if test="isDelete != null">
       <if test="isDelete != null">
         #{isDelete,jdbcType=INTEGER},
         #{isDelete,jdbcType=INTEGER},
       </if>
       </if>
@@ -161,65 +151,58 @@
       </if>
       </if>
     </trim>
     </trim>
   </insert>
   </insert>
-  <select id="countByExample" parameterType="com.tzld.piaoquan.common.model.po.CorpExample" resultType="java.lang.Long">
-    select count(*) from we_com_corp
+  <select id="countByExample" parameterType="com.tzld.piaoquan.api.model.po.ReplyStaffExample" resultType="java.lang.Long">
+    select count(*) from reply_staff
     <if test="_parameter != null">
     <if test="_parameter != null">
       <include refid="Example_Where_Clause" />
       <include refid="Example_Where_Clause" />
     </if>
     </if>
   </select>
   </select>
   <update id="updateByExampleSelective" parameterType="map">
   <update id="updateByExampleSelective" parameterType="map">
-    update we_com_corp
+    update reply_staff
     <set>
     <set>
-      <if test="record.id != null">
-        id = #{record.id,jdbcType=BIGINT},
+      <if test="row.id != null">
+        id = #{row.id,jdbcType=BIGINT},
       </if>
       </if>
-      <if test="record.name != null">
-        `name` = #{record.name,jdbcType=VARCHAR},
+      <if test="row.userId != null">
+        user_id = #{row.userId,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="record.corpId != null">
-        corp_id = #{record.corpId,jdbcType=VARCHAR},
+      <if test="row.name != null">
+        name = #{row.name,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="record.secret != null">
-        secret = #{record.secret,jdbcType=VARCHAR},
+      <if test="row.isDelete != null">
+        is_delete = #{row.isDelete,jdbcType=INTEGER},
       </if>
       </if>
-      <if test="record.isDelete != null">
-        is_delete = #{record.isDelete,jdbcType=INTEGER},
+      <if test="row.createTime != null">
+        create_time = #{row.createTime,jdbcType=TIMESTAMP},
       </if>
       </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 test="row.updateTime != null">
+        update_time = #{row.updateTime,jdbcType=TIMESTAMP},
       </if>
       </if>
     </set>
     </set>
-    <if test="_parameter != null">
+    <if test="example != null">
       <include refid="Update_By_Example_Where_Clause" />
       <include refid="Update_By_Example_Where_Clause" />
     </if>
     </if>
   </update>
   </update>
   <update id="updateByExample" parameterType="map">
   <update id="updateByExample" parameterType="map">
-    update we_com_corp
-    set id = #{record.id,jdbcType=BIGINT},
-      `name` = #{record.name,jdbcType=VARCHAR},
-      corp_id = #{record.corpId,jdbcType=VARCHAR},
-      secret = #{record.secret,jdbcType=VARCHAR},
-      is_delete = #{record.isDelete,jdbcType=INTEGER},
-      create_time = #{record.createTime,jdbcType=TIMESTAMP},
-      update_time = #{record.updateTime,jdbcType=TIMESTAMP}
-    <if test="_parameter != null">
+    update reply_staff
+    set id = #{row.id,jdbcType=BIGINT},
+      user_id = #{row.userId,jdbcType=VARCHAR},
+      name = #{row.name,jdbcType=VARCHAR},
+      is_delete = #{row.isDelete,jdbcType=INTEGER},
+      create_time = #{row.createTime,jdbcType=TIMESTAMP},
+      update_time = #{row.updateTime,jdbcType=TIMESTAMP}
+    <if test="example != null">
       <include refid="Update_By_Example_Where_Clause" />
       <include refid="Update_By_Example_Where_Clause" />
     </if>
     </if>
   </update>
   </update>
-  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.common.model.po.Corp">
-    update we_com_corp
+  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.api.model.po.ReplyStaff">
+    update reply_staff
     <set>
     <set>
-      <if test="name != null">
-        `name` = #{name,jdbcType=VARCHAR},
-      </if>
-      <if test="corpId != null">
-        corp_id = #{corpId,jdbcType=VARCHAR},
+      <if test="userId != null">
+        user_id = #{userId,jdbcType=VARCHAR},
       </if>
       </if>
-      <if test="secret != null">
-        secret = #{secret,jdbcType=VARCHAR},
+      <if test="name != null">
+        name = #{name,jdbcType=VARCHAR},
       </if>
       </if>
       <if test="isDelete != null">
       <if test="isDelete != null">
         is_delete = #{isDelete,jdbcType=INTEGER},
         is_delete = #{isDelete,jdbcType=INTEGER},
@@ -233,11 +216,10 @@
     </set>
     </set>
     where id = #{id,jdbcType=BIGINT}
     where id = #{id,jdbcType=BIGINT}
   </update>
   </update>
-  <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.common.model.po.Corp">
-    update we_com_corp
-    set `name` = #{name,jdbcType=VARCHAR},
-      corp_id = #{corpId,jdbcType=VARCHAR},
-      secret = #{secret,jdbcType=VARCHAR},
+  <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.api.model.po.ReplyStaff">
+    update reply_staff
+    set user_id = #{userId,jdbcType=VARCHAR},
+      name = #{name,jdbcType=VARCHAR},
       is_delete = #{isDelete,jdbcType=INTEGER},
       is_delete = #{isDelete,jdbcType=INTEGER},
       create_time = #{createTime,jdbcType=TIMESTAMP},
       create_time = #{createTime,jdbcType=TIMESTAMP},
       update_time = #{updateTime,jdbcType=TIMESTAMP}
       update_time = #{updateTime,jdbcType=TIMESTAMP}

+ 0 - 419
api-module/src/main/resources/mapper/UserMapper.xml

@@ -1,419 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.tzld.piaoquan.api.dao.mapper.UserMapper">
-  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.common.model.po.User">
-    <id column="id" jdbcType="BIGINT" property="id" />
-    <result column="corp_id" jdbcType="BIGINT" property="corpId" />
-    <result column="external_user_id" jdbcType="VARCHAR" property="externalUserId" />
-    <result column="union_id" jdbcType="VARCHAR" property="unionId" />
-    <result column="external_user_id_3rd_party" jdbcType="VARCHAR" property="externalUserId3rdParty" />
-    <result column="type" jdbcType="INTEGER" property="type" />
-    <result column="name" jdbcType="VARCHAR" property="name" />
-    <result column="avatar" jdbcType="VARCHAR" property="avatar" />
-    <result column="gender" jdbcType="INTEGER" property="gender" />
-    <result column="is_delete" jdbcType="INTEGER" property="isDelete" />
-    <result column="created_at" jdbcType="BIGINT" property="createdAt" />
-    <result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
-    <result column="deleted_at" jdbcType="BIGINT" property="deletedAt" />
-    <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, corp_id, external_user_id, union_id, external_user_id_3rd_party, `type`, `name`, 
-    avatar, gender, is_delete, created_at, updated_at, deleted_at, create_time, update_time
-  </sql>
-  <select id="selectByExample" parameterType="com.tzld.piaoquan.common.model.po.UserExample" resultMap="BaseResultMap">
-    select
-    <if test="distinct">
-      distinct
-    </if>
-    <include refid="Base_Column_List" />
-    from we_com_user
-    <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 we_com_user
-    where id = #{id,jdbcType=BIGINT}
-  </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
-    delete from we_com_user
-    where id = #{id,jdbcType=BIGINT}
-  </delete>
-  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.common.model.po.UserExample">
-    delete from we_com_user
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </delete>
-  <insert id="insert" parameterType="com.tzld.piaoquan.common.model.po.User" useGeneratedKeys="true" keyProperty="id">
-    insert into we_com_user (id, corp_id, external_user_id, 
-      union_id, external_user_id_3rd_party, `type`, 
-      `name`, avatar, gender, 
-      created_at, updated_at,
-      deleted_at, create_time, update_time
-      )
-    values (#{id,jdbcType=BIGINT}, #{corpId,jdbcType=BIGINT}, #{externalUserId,jdbcType=VARCHAR}, 
-      #{unionId,jdbcType=VARCHAR}, #{externalUserId3rdParty,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, 
-      #{name,jdbcType=VARCHAR}, #{avatar,jdbcType=VARCHAR}, #{gender,jdbcType=INTEGER}, 
-      #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT},
-      #{deletedAt,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
-      )
-    <selectKey resultType="java.lang.Long" order="AFTER" keyProperty="id">
-      select LAST_INSERT_ID()
-    </selectKey>
-  </insert>
-  <insert id="insertSelective" parameterType="com.tzld.piaoquan.common.model.po.User">
-    insert into we_com_user
-    <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="id != null">
-        id,
-      </if>
-      <if test="corpId != null">
-        corp_id,
-      </if>
-      <if test="externalUserId != null">
-        external_user_id,
-      </if>
-      <if test="unionId != null">
-        union_id,
-      </if>
-      <if test="externalUserId3rdParty != null">
-        external_user_id_3rd_party,
-      </if>
-      <if test="type != null">
-        `type`,
-      </if>
-      <if test="name != null">
-        `name`,
-      </if>
-      <if test="avatar != null">
-        avatar,
-      </if>
-      <if test="gender != null">
-        gender,
-      </if>
-      <if test="isDelete != null">
-        is_delete,
-      </if>
-      <if test="createdAt != null">
-        created_at,
-      </if>
-      <if test="updatedAt != null">
-        updated_at,
-      </if>
-      <if test="deletedAt != null">
-        deleted_at,
-      </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="corpId != null">
-        #{corpId,jdbcType=BIGINT},
-      </if>
-      <if test="externalUserId != null">
-        #{externalUserId,jdbcType=VARCHAR},
-      </if>
-      <if test="unionId != null">
-        #{unionId,jdbcType=VARCHAR},
-      </if>
-      <if test="externalUserId3rdParty != null">
-        #{externalUserId3rdParty,jdbcType=VARCHAR},
-      </if>
-      <if test="type != null">
-        #{type,jdbcType=INTEGER},
-      </if>
-      <if test="name != null">
-        #{name,jdbcType=VARCHAR},
-      </if>
-      <if test="avatar != null">
-        #{avatar,jdbcType=VARCHAR},
-      </if>
-      <if test="gender != null">
-        #{gender,jdbcType=INTEGER},
-      </if>
-      <if test="isDelete != null">
-        #{isDelete,jdbcType=INTEGER},
-      </if>
-      <if test="createdAt != null">
-        #{createdAt,jdbcType=BIGINT},
-      </if>
-      <if test="updatedAt != null">
-        #{updatedAt,jdbcType=BIGINT},
-      </if>
-      <if test="deletedAt != null">
-        #{deletedAt,jdbcType=BIGINT},
-      </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.common.model.po.UserExample" resultType="java.lang.Long">
-    select count(*) from we_com_user
-    <if test="_parameter != null">
-      <include refid="Example_Where_Clause" />
-    </if>
-  </select>
-  <update id="updateByExampleSelective" parameterType="map">
-    update we_com_user
-    <set>
-      <if test="record.id != null">
-        id = #{record.id,jdbcType=BIGINT},
-      </if>
-      <if test="record.corpId != null">
-        corp_id = #{record.corpId,jdbcType=BIGINT},
-      </if>
-      <if test="record.externalUserId != null">
-        external_user_id = #{record.externalUserId,jdbcType=VARCHAR},
-      </if>
-      <if test="record.unionId != null">
-        union_id = #{record.unionId,jdbcType=VARCHAR},
-      </if>
-      <if test="record.externalUserId3rdParty != null">
-        external_user_id_3rd_party = #{record.externalUserId3rdParty,jdbcType=VARCHAR},
-      </if>
-      <if test="record.type != null">
-        `type` = #{record.type,jdbcType=INTEGER},
-      </if>
-      <if test="record.name != null">
-        `name` = #{record.name,jdbcType=VARCHAR},
-      </if>
-      <if test="record.avatar != null">
-        avatar = #{record.avatar,jdbcType=VARCHAR},
-      </if>
-      <if test="record.gender != null">
-        gender = #{record.gender,jdbcType=INTEGER},
-      </if>
-      <if test="record.isDelete != null">
-        is_delete = #{record.isDelete,jdbcType=INTEGER},
-      </if>
-      <if test="record.createdAt != null">
-        created_at = #{record.createdAt,jdbcType=BIGINT},
-      </if>
-      <if test="record.updatedAt != null">
-        updated_at = #{record.updatedAt,jdbcType=BIGINT},
-      </if>
-      <if test="record.deletedAt != null">
-        deleted_at = #{record.deletedAt,jdbcType=BIGINT},
-      </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 we_com_user
-    set id = #{record.id,jdbcType=BIGINT},
-      corp_id = #{record.corpId,jdbcType=BIGINT},
-      external_user_id = #{record.externalUserId,jdbcType=VARCHAR},
-      union_id = #{record.unionId,jdbcType=VARCHAR},
-      external_user_id_3rd_party = #{record.externalUserId3rdParty,jdbcType=VARCHAR},
-      `type` = #{record.type,jdbcType=INTEGER},
-      `name` = #{record.name,jdbcType=VARCHAR},
-      avatar = #{record.avatar,jdbcType=VARCHAR},
-      gender = #{record.gender,jdbcType=INTEGER},
-      is_delete = #{record.isDelete,jdbcType=INTEGER},
-      created_at = #{record.createdAt,jdbcType=BIGINT},
-      updated_at = #{record.updatedAt,jdbcType=BIGINT},
-      deleted_at = #{record.deletedAt,jdbcType=BIGINT},
-      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.common.model.po.User">
-    update we_com_user
-    <set>
-      <if test="corpId != null">
-        corp_id = #{corpId,jdbcType=BIGINT},
-      </if>
-      <if test="externalUserId != null">
-        external_user_id = #{externalUserId,jdbcType=VARCHAR},
-      </if>
-      <if test="unionId != null">
-        union_id = #{unionId,jdbcType=VARCHAR},
-      </if>
-      <if test="externalUserId3rdParty != null">
-        external_user_id_3rd_party = #{externalUserId3rdParty,jdbcType=VARCHAR},
-      </if>
-      <if test="type != null">
-        `type` = #{type,jdbcType=INTEGER},
-      </if>
-      <if test="name != null">
-        `name` = #{name,jdbcType=VARCHAR},
-      </if>
-      <if test="avatar != null">
-        avatar = #{avatar,jdbcType=VARCHAR},
-      </if>
-      <if test="gender != null">
-        gender = #{gender,jdbcType=INTEGER},
-      </if>
-      <if test="isDelete != null">
-        is_delete = #{isDelete,jdbcType=INTEGER},
-      </if>
-      <if test="createdAt != null">
-        created_at = #{createdAt,jdbcType=BIGINT},
-      </if>
-      <if test="updatedAt != null">
-        updated_at = #{updatedAt,jdbcType=BIGINT},
-      </if>
-      <if test="deletedAt != null">
-        deleted_at = #{deletedAt,jdbcType=BIGINT},
-      </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.common.model.po.User">
-    update we_com_user
-    set corp_id = #{corpId,jdbcType=BIGINT},
-      external_user_id = #{externalUserId,jdbcType=VARCHAR},
-      union_id = #{unionId,jdbcType=VARCHAR},
-      external_user_id_3rd_party = #{externalUserId3rdParty,jdbcType=VARCHAR},
-      `type` = #{type,jdbcType=INTEGER},
-      `name` = #{name,jdbcType=VARCHAR},
-      avatar = #{avatar,jdbcType=VARCHAR},
-      gender = #{gender,jdbcType=INTEGER},
-      is_delete = #{isDelete,jdbcType=INTEGER},
-      created_at = #{createdAt,jdbcType=BIGINT},
-      updated_at = #{updatedAt,jdbcType=BIGINT},
-      deleted_at = #{deletedAt,jdbcType=BIGINT},
-      create_time = #{createTime,jdbcType=TIMESTAMP},
-      update_time = #{updateTime,jdbcType=TIMESTAMP}
-    where id = #{id,jdbcType=BIGINT}
-  </update>
-
-    <select id="selectIdByExternalUserId" parameterType="String" resultType="Long">
-        select id
-        from we_com_user
-        where external_user_id = #{externalUserId}
-    </select>
-
-    <insert id="insertList" parameterType="java.util.List">
-        insert into we_com_user
-        (
-        corp_id,
-        external_user_id,
-        union_id,
-        external_user_id_3rd_party,
-        `type`,
-        `name`,
-        avatar,
-        gender,
-        created_at,
-        updated_at,
-        deleted_at,
-        create_time,
-        update_time
-        )
-        values
-        <foreach collection="list" item="item" separator=",">
-            (
-            #{item.corpId,jdbcType=BIGINT}
-            #{item.externalUserId,jdbcType=VARCHAR},
-            #{item.unionId,jdbcType=VARCHAR},
-            #{item.externalUserId3rdParty,jdbcType=VARCHAR},
-            #{item.type,jdbcType=INTEGER},
-            #{item.name,jdbcType=VARCHAR},
-            #{item.avatar,jdbcType=VARCHAR},
-            #{item.gender,jdbcType=INTEGER},
-            #{item.createdAt,jdbcType=BIGINT},
-            #{item.updatedAt,jdbcType=BIGINT},
-            #{item.deletedAt,jdbcType=BIGINT},
-            #{item.createTime,jdbcType=TIMESTAMP},
-            #{item.updateTime,jdbcType=TIMESTAMP}
-            )
-        </foreach>
-    </insert>
-</mapper>

+ 1 - 1
api-module/src/main/resources/mybatis-generator-config.xml

@@ -56,7 +56,7 @@
 <!--        <table tableName="we_com_staff" domainObjectName="Staff" alias=""/>-->
 <!--        <table tableName="we_com_staff" domainObjectName="Staff" alias=""/>-->
 <!--        <table tableName="we_com_staff_with_user" domainObjectName="StaffWithUser" alias=""/>-->
 <!--        <table tableName="we_com_staff_with_user" domainObjectName="StaffWithUser" alias=""/>-->
 <!--        <table tableName="we_com_send_message" domainObjectName="SendMessage" alias=""/>-->
 <!--        <table tableName="we_com_send_message" domainObjectName="SendMessage" alias=""/>-->
-<!--        <table tableName="we_com_user" domainObjectName="User" alias=""/>-->
+<!--        <table tableName="we_com_user" domainObjectName="WeComUser" alias=""/>-->
 <!--        <table tableName="we_com_corp" domainObjectName="Corp" alias=""/>-->
 <!--        <table tableName="we_com_corp" domainObjectName="Corp" alias=""/>-->
 
 
     </context>
     </context>

+ 13 - 0
common-module/pom.xml

@@ -17,4 +17,17 @@
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     </properties>
     </properties>
 
 
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>8</source>
+                    <target>8</target>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
 </project>
 </project>

+ 4 - 4
common-module/src/main/java/com/tzld/piaoquan/common/common/base/CommonResponse.java → common-module/src/main/java/com/tzld/piaoquan/growth/common/common/base/CommonResponse.java

@@ -1,12 +1,12 @@
-package com.tzld.piaoquan.common.common.base;
+package com.tzld.piaoquan.growth.common.common.base;
 
 
-import com.tzld.piaoquan.common.common.enums.ExceptionCodeEnum;
+import com.tzld.piaoquan.growth.common.common.enums.ExceptionCodeEnum;
 import lombok.Getter;
 import lombok.Getter;
 import lombok.Setter;
 import lombok.Setter;
 import lombok.ToString;
 import lombok.ToString;
 
 
-import static com.tzld.piaoquan.common.common.constant.ResponseConstant.SUCCESS_CODE;
-import static com.tzld.piaoquan.common.common.constant.ResponseConstant.SUCCESS_MSG;
+import static com.tzld.piaoquan.growth.common.common.constant.ResponseConstant.SUCCESS_CODE;
+import static com.tzld.piaoquan.growth.common.common.constant.ResponseConstant.SUCCESS_MSG;
 
 
 /**
 /**
  * Common Response
  * Common Response

+ 2 - 2
common-module/src/main/java/com/tzld/piaoquan/common/common/constant/MessageConstant.java → common-module/src/main/java/com/tzld/piaoquan/growth/common/common/constant/MessageConstant.java

@@ -1,4 +1,4 @@
-package com.tzld.piaoquan.common.common.constant;
+package com.tzld.piaoquan.growth.common.common.constant;
 
 
 public interface MessageConstant {
 public interface MessageConstant {
 
 
@@ -8,7 +8,7 @@ public interface MessageConstant {
     String morningText = "早安,新的一天,愿你拥有最好的心情去迎接一切美好!爆款视频抢先观看,点击下方精彩不断~";
     String morningText = "早安,新的一天,愿你拥有最好的心情去迎接一切美好!爆款视频抢先观看,点击下方精彩不断~";
 
 
     //小程序id
     //小程序id
-    String appid = "wx7187c217efef24a7";
+    String appid = "wxbdd2a2e93d9a6e25";
 
 
     String defaultName = "日常push-%s-%s";
     String defaultName = "日常push-%s-%s";
 
 

+ 1 - 1
common-module/src/main/java/com/tzld/piaoquan/common/common/constant/OtherServerURL.java → common-module/src/main/java/com/tzld/piaoquan/growth/common/common/constant/OtherServerURL.java

@@ -1,4 +1,4 @@
-package com.tzld.piaoquan.common.common.constant;
+package com.tzld.piaoquan.growth.common.common.constant;
 
 
 public interface OtherServerURL {
 public interface OtherServerURL {
 
 

+ 1 - 1
common-module/src/main/java/com/tzld/piaoquan/common/common/constant/RedisConstant.java → common-module/src/main/java/com/tzld/piaoquan/growth/common/common/constant/RedisConstant.java

@@ -1,4 +1,4 @@
-package com.tzld.piaoquan.common.common.constant;
+package com.tzld.piaoquan.growth.common.common.constant;
 
 
 public interface RedisConstant {
 public interface RedisConstant {
 
 

+ 1 - 1
common-module/src/main/java/com/tzld/piaoquan/common/common/constant/ResponseConstant.java → common-module/src/main/java/com/tzld/piaoquan/growth/common/common/constant/ResponseConstant.java

@@ -1,4 +1,4 @@
-package com.tzld.piaoquan.common.common.constant;
+package com.tzld.piaoquan.growth.common.common.constant;
 
 
 /**
 /**
  * 响应常量
  * 响应常量

+ 1 - 1
common-module/src/main/java/com/tzld/piaoquan/common/common/constant/TimeConstant.java → common-module/src/main/java/com/tzld/piaoquan/growth/common/common/constant/TimeConstant.java

@@ -1,4 +1,4 @@
-package com.tzld.piaoquan.common.common.constant;
+package com.tzld.piaoquan.growth.common.common.constant;
 
 
 public interface TimeConstant {
 public interface TimeConstant {
 
 

+ 1 - 1
common-module/src/main/java/com/tzld/piaoquan/common/common/constant/WeComConstant.java → common-module/src/main/java/com/tzld/piaoquan/growth/common/common/constant/WeComConstant.java

@@ -1,4 +1,4 @@
-package com.tzld.piaoquan.common.common.constant;
+package com.tzld.piaoquan.growth.common.common.constant;
 
 
 public interface WeComConstant {
 public interface WeComConstant {
 
 

+ 1 - 1
common-module/src/main/java/com/tzld/piaoquan/common/common/constant/WeComServerConstant.java → common-module/src/main/java/com/tzld/piaoquan/growth/common/common/constant/WeComServerConstant.java

@@ -1,4 +1,4 @@
-package com.tzld.piaoquan.common.common.constant;
+package com.tzld.piaoquan.growth.common.common.constant;
 
 
 public interface WeComServerConstant {
 public interface WeComServerConstant {
 
 

+ 1 - 1
common-module/src/main/java/com/tzld/piaoquan/common/common/enums/CorpEnum.java → common-module/src/main/java/com/tzld/piaoquan/growth/common/common/enums/CorpEnum.java

@@ -1,4 +1,4 @@
-package com.tzld.piaoquan.common.common.enums;
+package com.tzld.piaoquan.growth.common.common.enums;
 
 
 import lombok.Getter;
 import lombok.Getter;
 
 

+ 3 - 3
common-module/src/main/java/com/tzld/piaoquan/common/common/enums/ExceptionCodeEnum.java → common-module/src/main/java/com/tzld/piaoquan/growth/common/common/enums/ExceptionCodeEnum.java

@@ -1,4 +1,4 @@
-package com.tzld.piaoquan.common.common.enums;
+package com.tzld.piaoquan.growth.common.common.enums;
 
 
 import lombok.Getter;
 import lombok.Getter;
 
 
@@ -12,8 +12,8 @@ public enum ExceptionCodeEnum {
     /**
     /**
      * 自定义异常信息
      * 自定义异常信息
      */
      */
-    SYSTEM_ERROR(1000, "系统错误"),
-    PARAMS_ERROR(2001, "参数错误")
+    SYSTEM_ERROR(500, "系统错误"),
+    PARAMS_ERROR(400, "参数错误")
     ;
     ;
 
 
     private final int code;
     private final int code;

+ 1 - 1
common-module/src/main/java/com/tzld/piaoquan/common/common/enums/MessageAttachmentTypeEnum.java → common-module/src/main/java/com/tzld/piaoquan/growth/common/common/enums/MessageAttachmentTypeEnum.java

@@ -1,4 +1,4 @@
-package com.tzld.piaoquan.common.common.enums;
+package com.tzld.piaoquan.growth.common.common.enums;
 
 
 import lombok.Getter;
 import lombok.Getter;
 
 

+ 1 - 1
common-module/src/main/java/com/tzld/piaoquan/common/common/enums/SourceEnum.java → common-module/src/main/java/com/tzld/piaoquan/growth/common/common/enums/SourceEnum.java

@@ -1,4 +1,4 @@
-package com.tzld.piaoquan.common.common.enums;
+package com.tzld.piaoquan.growth.common.common.enums;
 
 
 import lombok.Getter;
 import lombok.Getter;
 
 

+ 1 - 1
common-module/src/main/java/com/tzld/piaoquan/common/common/enums/TimeEnum.java → common-module/src/main/java/com/tzld/piaoquan/growth/common/common/enums/TimeEnum.java

@@ -1,4 +1,4 @@
-package com.tzld.piaoquan.common.common.enums;
+package com.tzld.piaoquan.growth.common.common.enums;
 
 
 import lombok.Getter;
 import lombok.Getter;
 
 

+ 2 - 2
common-module/src/main/java/com/tzld/piaoquan/common/common/exception/CustomizeException.java → common-module/src/main/java/com/tzld/piaoquan/growth/common/common/exception/CustomizeException.java

@@ -1,7 +1,7 @@
-package com.tzld.piaoquan.common.common.exception;
+package com.tzld.piaoquan.growth.common.common.exception;
 
 
 
 
-import com.tzld.piaoquan.common.common.enums.ExceptionCodeEnum;
+import com.tzld.piaoquan.growth.common.common.enums.ExceptionCodeEnum;
 import lombok.Getter;
 import lombok.Getter;
 import lombok.Setter;
 import lombok.Setter;
 
 

+ 1 - 1
common-module/src/main/java/com/tzld/piaoquan/common/component/HttpPoolClient.java → common-module/src/main/java/com/tzld/piaoquan/growth/common/component/HttpPoolClient.java

@@ -1,4 +1,4 @@
-package com.tzld.piaoquan.common.component;
+package com.tzld.piaoquan.growth.common.component;
 
 
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.StringUtils;

+ 70 - 0
common-module/src/main/java/com/tzld/piaoquan/growth/common/component/ODPSManager.java

@@ -0,0 +1,70 @@
+package com.tzld.piaoquan.growth.common.component;
+
+import com.aliyun.odps.Instance;
+import com.aliyun.odps.Odps;
+import com.aliyun.odps.OdpsException;
+import com.aliyun.odps.account.Account;
+import com.aliyun.odps.account.AliyunAccount;
+import com.aliyun.odps.data.Record;
+import com.aliyun.odps.task.SQLTask;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+/**
+ * @author xueyiming
+ */
+@Slf4j
+@Component
+public class ODPSManager {
+    private final static String ACCESSID = "LTAIWYUujJAm7CbH";
+    private final static String ACCESSKEY = "RfSjdiWwED1sGFlsjXv0DlfTnZTG1P";
+    private final static String ENDPOINT = "http://service.cn.maxcompute.aliyun.com/api";
+
+    public List<Record> query(String sql) {
+        Account account = new AliyunAccount(ACCESSID, ACCESSKEY);
+        Odps odps = new Odps(account);
+        odps.setEndpoint(ENDPOINT);
+        odps.setDefaultProject("loghubods");
+        Instance i;
+        try {
+            i = SQLTask.run(odps, sql);
+            i.waitForSuccess();
+            List<Record> records = SQLTask.getResultByInstanceTunnel(i);
+            if (Objects.nonNull(records) && records.size() != 0) {
+                return records;
+            }
+        } catch (Exception e) {
+            log.error("odps query error", e);
+        }
+        return Collections.emptyList();
+    }
+
+    public static void main(String[] args) {
+        Calendar cal = Calendar.getInstance();
+        cal.setTime(new Date());
+        cal.add(Calendar.DATE, -1);
+        Date date2 = cal.getTime();
+        SimpleDateFormat format2 = new SimpleDateFormat("yyyyMMdd");
+
+        Account account = new AliyunAccount(ACCESSID, ACCESSKEY);
+        Odps odps = new Odps(account);
+        odps.setEndpoint(ENDPOINT);
+        odps.setDefaultProject("loghubods");
+        String sql = "select * from yesterday_return_top1000 where dt='" + format2.format(date2) + "';";
+        Instance i;
+        try {
+            i = SQLTask.run(odps, sql);
+            i.waitForSuccess();
+            List<Record> records = SQLTask.getResult(i);
+            for (Record r : records) {
+                System.out.println(Integer.parseInt(r.get(0).toString()));
+                System.out.println(r.get(1).toString());
+            }
+        } catch (OdpsException e) {
+            e.printStackTrace();
+        }
+    }
+}

+ 1 - 1
common-module/src/main/java/com/tzld/piaoquan/common/config/HttpClientConfig.java → common-module/src/main/java/com/tzld/piaoquan/growth/common/config/HttpClientConfig.java

@@ -1,4 +1,4 @@
-package com.tzld.piaoquan.common.config;
+package com.tzld.piaoquan.growth.common.config;
 
 
 import org.apache.http.client.config.RequestConfig;
 import org.apache.http.client.config.RequestConfig;
 import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.http.impl.client.CloseableHttpClient;

+ 13 - 1
common-module/src/main/java/com/tzld/piaoquan/common/config/RedisConfig.java → common-module/src/main/java/com/tzld/piaoquan/growth/common/config/RedisConfig.java

@@ -1,4 +1,4 @@
-package com.tzld.piaoquan.common.config;
+package com.tzld.piaoquan.growth.common.config;
 
 
 import com.fasterxml.jackson.annotation.JsonAutoDetect;
 import com.fasterxml.jackson.annotation.JsonAutoDetect;
 import com.fasterxml.jackson.annotation.PropertyAccessor;
 import com.fasterxml.jackson.annotation.PropertyAccessor;
@@ -31,6 +31,18 @@ public class RedisConfig {
         return redisTemplate;
         return redisTemplate;
     }
     }
 
 
+    @Bean
+    public RedisTemplate<String, String> stringRedisTemplate(RedisConnectionFactory redisConnectionFactory){
+        RedisTemplate<String, String> redisTemplate = new RedisTemplate<>();
+        redisTemplate.setConnectionFactory(redisConnectionFactory);
+        redisTemplate.setKeySerializer(new StringRedisSerializer());
+        redisTemplate.setValueSerializer(new StringRedisSerializer());
+        redisTemplate.setHashKeySerializer(new StringRedisSerializer());
+        redisTemplate.setHashValueSerializer(new StringRedisSerializer());
+        redisTemplate.afterPropertiesSet();
+        return redisTemplate;
+    }
+
     public RedisSerializer<Object> redisSerializer() {
     public RedisSerializer<Object> redisSerializer() {
         //创建JSON序列化器
         //创建JSON序列化器
         ObjectMapper objectMapper = new ObjectMapper();
         ObjectMapper objectMapper = new ObjectMapper();

+ 1 - 1
common-module/src/main/java/com/tzld/piaoquan/common/config/XxlJobConfig.java → common-module/src/main/java/com/tzld/piaoquan/growth/common/config/XxlJobConfig.java

@@ -1,4 +1,4 @@
-package com.tzld.piaoquan.common.config;
+package com.tzld.piaoquan.growth.common.config;
 
 
 import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
 import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.beans.factory.annotation.Value;

+ 7 - 5
api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/CorpMapper.java → common-module/src/main/java/com/tzld/piaoquan/growth/common/dao/mapper/CorpMapper.java

@@ -1,12 +1,14 @@
-package com.tzld.piaoquan.api.dao.mapper;
-
-import com.tzld.piaoquan.common.model.po.Corp;
-import com.tzld.piaoquan.common.model.po.CorpExample;
-import java.util.List;
+package com.tzld.piaoquan.growth.common.dao.mapper;
 
 
+import com.tzld.piaoquan.growth.common.model.po.Corp;
+import com.tzld.piaoquan.growth.common.model.po.CorpExample;
+import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 import org.springframework.stereotype.Repository;
 
 
+import java.util.List;
+
+@Mapper
 @Repository
 @Repository
 public interface CorpMapper {
 public interface CorpMapper {
     long countByExample(CorpExample example);
     long countByExample(CorpExample example);

+ 7 - 4
api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/GuaranteesVideoMapper.java → common-module/src/main/java/com/tzld/piaoquan/growth/common/dao/mapper/GuaranteesVideoMapper.java

@@ -1,11 +1,14 @@
-package com.tzld.piaoquan.api.dao.mapper;
+package com.tzld.piaoquan.growth.common.dao.mapper;
 
 
-import com.tzld.piaoquan.common.model.po.GuaranteesVideo;
-import com.tzld.piaoquan.common.model.po.GuaranteesVideoExample;
-import java.util.List;
+import com.tzld.piaoquan.growth.common.model.po.GuaranteesVideo;
+import com.tzld.piaoquan.growth.common.model.po.GuaranteesVideoExample;
+import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 import org.springframework.stereotype.Repository;
 
 
+import java.util.List;
+
+@Mapper
 @Repository
 @Repository
 public interface GuaranteesVideoMapper {
 public interface GuaranteesVideoMapper {
     long countByExample(GuaranteesVideoExample example);
     long countByExample(GuaranteesVideoExample example);

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff