Browse Source

公众号部分迁移

xueyiming 6 months ago
parent
commit
901e2638a0
79 changed files with 8896 additions and 95 deletions
  1. 6 0
      .idea/vcs.xml
  2. 0 7
      api-module/src/main/java/com/tzld/piaoquan/api/GrowthServerApplication.java
  3. 36 0
      api-module/src/main/java/com/tzld/piaoquan/api/common/enums/GhTypeEnum.java
  4. 25 0
      api-module/src/main/java/com/tzld/piaoquan/api/common/enums/ReplyStrategyServiceEnum.java
  5. 40 0
      api-module/src/main/java/com/tzld/piaoquan/api/common/enums/SecretEnum.java
  6. 32 0
      api-module/src/main/java/com/tzld/piaoquan/api/common/enums/StrategyStatusEnum.java
  7. 80 0
      api-module/src/main/java/com/tzld/piaoquan/api/compontent/TouLiuHttpClient.java
  8. 8 10
      api-module/src/main/java/com/tzld/piaoquan/api/config/DataSourceConfig.java
  9. 64 0
      api-module/src/main/java/com/tzld/piaoquan/api/controller/AccountDetailController.java
  10. 39 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/AlgGhAutoreplyVideoRankDataMapper.java
  11. 33 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/CgiReplyBucketDataMapper.java
  12. 2 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/CorpMapper.java
  13. 36 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/GhDetailMapper.java
  14. 3 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/GuaranteesVideoMapper.java
  15. 3 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/MessageAttachmentMapper.java
  16. 36 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/NewPushMessageCallbackMapper.java
  17. 36 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/ReplyStaffMapper.java
  18. 3 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/StaffMapper.java
  19. 3 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/StaffWithUserMapper.java
  20. 2 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/UserMapper.java
  21. 156 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/bo/ArticleInfo.java
  22. 24 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/bo/BucketDataParam.java
  23. 27 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/bo/GroupData.java
  24. 20 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/bo/MiniData.java
  25. 27 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/bo/MsgData.java
  26. 18 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/bo/ReplyBucketData.java
  27. 13 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/bo/ReplyInfo.java
  28. 74 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/bo/SmallPageUrlDetail.java
  29. 115 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/AlgGhAutoreplyVideoRankData.java
  30. 910 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/AlgGhAutoreplyVideoRankDataExample.java
  31. 175 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/CgiReplyBucketData.java
  32. 1310 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/CgiReplyBucketDataExample.java
  33. 125 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/GhDetail.java
  34. 993 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/GhDetailExample.java
  35. 88 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/PushMessageCallback.java
  36. 640 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/PushMessageCallbackExample.java
  37. 65 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/ReplyStaff.java
  38. 580 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/ReplyStaffExample.java
  39. 9 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/AccessTokenParam.java
  40. 11 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/AccessTokenVo.java
  41. 35 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/GhDetailVo.java
  42. 16 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/GhTypeVo.java
  43. 13 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/PushMessageParam.java
  44. 14 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/PushMessageVo.java
  45. 12 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/ReportUvVo.java
  46. 16 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/StrategyStatusVo.java
  47. 13 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/WeComPushMessageParam.java
  48. 14 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/WeComPushMessageVo.java
  49. 11 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/AccessTokenService.java
  50. 17 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/GhDetailService.java
  51. 0 68
      api-module/src/main/java/com/tzld/piaoquan/api/service/Impl/AccessTokenServiceImpl.java
  52. 18 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/ThirdPartyService.java
  53. 14 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/WeComService.java
  54. 136 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/impl/AccessTokenServiceImpl.java
  55. 144 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/impl/GhDetailServiceImpl.java
  56. 1 1
      api-module/src/main/java/com/tzld/piaoquan/api/service/impl/MessageAttachmentServiceImpl.java
  57. 204 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/impl/ThirdPartyServiceImpl.java
  58. 1 1
      api-module/src/main/java/com/tzld/piaoquan/api/service/impl/UserServiceImpl.java
  59. 137 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/impl/WeComServiceImpl.java
  60. 12 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/strategy/ReplyStrategyService.java
  61. 262 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/strategy/impl/PushMessageStrategyV1.java
  62. 261 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/strategy/impl/WeComPushMessageStrategyV1.java
  63. 2 0
      api-module/src/main/resources/application-dev.properties
  64. 2 0
      api-module/src/main/resources/application-prod.properties
  65. 2 0
      api-module/src/main/resources/application-test.properties
  66. 324 0
      api-module/src/main/resources/mapper/AlgGhAutoreplyVideoRankDataMapper.xml
  67. 401 0
      api-module/src/main/resources/mapper/CgiReplyBucketDataMapper.xml
  68. 1 1
      api-module/src/main/resources/mapper/CorpMapper.xml
  69. 322 0
      api-module/src/main/resources/mapper/GhDetailMapper.xml
  70. 1 1
      api-module/src/main/resources/mapper/GuaranteesVideoMapper.xml
  71. 1 1
      api-module/src/main/resources/mapper/MessageAttachmentMapper.xml
  72. 278 0
      api-module/src/main/resources/mapper/NewPushMessageCallbackMapper.xml
  73. 228 0
      api-module/src/main/resources/mapper/ReplyStaffMapper.xml
  74. 1 1
      api-module/src/main/resources/mapper/StaffMapper.xml
  75. 1 1
      api-module/src/main/resources/mapper/StaffWithUserMapper.xml
  76. 1 1
      common-module/src/main/java/com/tzld/piaoquan/common/common/constant/MessageConstant.java
  77. 2 2
      common-module/src/main/java/com/tzld/piaoquan/common/common/enums/ExceptionCodeEnum.java
  78. 70 0
      common-module/src/main/java/com/tzld/piaoquan/common/component/ODPSManager.java
  79. 41 0
      common-module/src/main/java/com/tzld/piaoquan/common/utils/DateUtil.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>

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

@@ -1,6 +1,5 @@
 package com.tzld.piaoquan.api;
 
-import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.context.annotation.ComponentScan;
@@ -12,12 +11,6 @@ import org.springframework.context.annotation.ComponentScan;
         "com.tzld.piaoquan.offline.*",
         "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 static void main(String[] 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 {
+
+
+    PUSH_MESSAGE_STRATEGY_V1("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;
+    }
+
+}

+ 80 - 0
api-module/src/main/java/com/tzld/piaoquan/api/compontent/TouLiuHttpClient.java

@@ -0,0 +1,80 @@
+package com.tzld.piaoquan.api.compontent;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.tzld.piaoquan.api.model.bo.GroupData;
+import com.tzld.piaoquan.common.component.HttpPoolClient;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.MediaType;
+import org.springframework.stereotype.Component;
+import reactor.core.publisher.Mono;
+
+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(map));
+            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 org.apache.ibatis.session.SqlSessionFactory;
@@ -17,11 +17,10 @@ import javax.sql.DataSource;
 
 
 @Configuration
-@MapperScan(basePackages = DataSourceConfig.PACKAGE_MASTER, sqlSessionFactoryRef = "masterSqlSessionFactory")
+@MapperScan(basePackages = "com.tzld.piaoquan.api.dao.mapper", sqlSessionFactoryRef = "growthSqlSessionFactory")
+@MapperScan(basePackages = "com.tzld.piaoquan.offline.dao.mapper", sqlSessionFactoryRef = "growthSqlSessionFactory")
 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")
     @ConfigurationProperties("spring.datasource")
@@ -30,19 +29,18 @@ public class DataSourceConfig {
     }
 
     @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);
     }
 
     @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();
         sessionFactoryBean.setDataSource(dataSource);
         sessionFactoryBean.setMapperLocations(new PathMatchingResourcePatternResolver().getResources(DataSourceConfig.MAPPER_LOCATION_MASTER));
         return sessionFactoryBean.getObject();
     }
 
-
 }

+ 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.common.common.base.CommonResponse;
+import com.tzld.piaoquan.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()));
+    }
+}

+ 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);
+}

+ 2 - 0
api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/CorpMapper.java

@@ -4,9 +4,11 @@ import com.tzld.piaoquan.common.model.po.Corp;
 import com.tzld.piaoquan.common.model.po.CorpExample;
 import java.util.List;
 
+import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 
+@Mapper
 @Repository
 public interface CorpMapper {
     long countByExample(CorpExample example);

+ 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);
+}

+ 3 - 0
api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/GuaranteesVideoMapper.java

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

+ 3 - 0
api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/MessageAttachmentMapper.java

@@ -3,9 +3,12 @@ package com.tzld.piaoquan.api.dao.mapper;
 import com.tzld.piaoquan.common.model.po.MessageAttachment;
 import com.tzld.piaoquan.common.model.po.MessageAttachmentExample;
 import java.util.List;
+
+import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 
+@Mapper
 @Repository
 public interface MessageAttachmentMapper {
     long countByExample(MessageAttachmentExample example);

+ 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);
+}

+ 3 - 0
api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/StaffMapper.java

@@ -3,9 +3,12 @@ package com.tzld.piaoquan.api.dao.mapper;
 import com.tzld.piaoquan.common.model.po.Staff;
 import com.tzld.piaoquan.common.model.po.StaffExample;
 import java.util.List;
+
+import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 
+@Mapper
 @Repository
 public interface StaffMapper {
     long countByExample(StaffExample example);

+ 3 - 0
api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/StaffWithUserMapper.java

@@ -3,9 +3,12 @@ package com.tzld.piaoquan.api.dao.mapper;
 import com.tzld.piaoquan.common.model.po.StaffWithUser;
 import com.tzld.piaoquan.common.model.po.StaffWithUserExample;
 import java.util.List;
+
+import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 
+@Mapper
 @Repository
 public interface StaffWithUserMapper {
     long countByExample(StaffWithUserExample example);

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

@@ -2,11 +2,13 @@ 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.Mapper;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 
 import java.util.List;
 
+@Mapper
 @Repository
 public interface UserMapper {
     long countByExample(UserExample example);

+ 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.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;
+}

+ 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;
+}

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

@@ -1,7 +1,18 @@
 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.common.common.base.CommonResponse;
+
 public interface AccessTokenService {
 
     String getWeComAccessToken(Long corpId);
 
+    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.common.common.base.CommonResponse;
+import com.tzld.piaoquan.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 - 68
api-module/src/main/java/com/tzld/piaoquan/api/service/Impl/AccessTokenServiceImpl.java

@@ -1,68 +0,0 @@
-package com.tzld.piaoquan.api.service.Impl;
-
-import com.alibaba.fastjson.JSONObject;
-import com.tzld.piaoquan.common.component.HttpPoolClient;
-import com.tzld.piaoquan.api.dao.mapper.CorpMapper;
-import com.tzld.piaoquan.common.model.po.Corp;
-import com.tzld.piaoquan.common.model.po.CorpExample;
-import com.tzld.piaoquan.api.service.AccessTokenService;
-import com.tzld.piaoquan.common.utils.LarkRobotUtil;
-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 org.springframework.util.CollectionUtils;
-
-import java.io.IOException;
-import java.util.List;
-import java.util.concurrent.TimeUnit;
-
-import static com.tzld.piaoquan.common.common.constant.RedisConstant.WE_COM_ACCESS_TOKEN;
-import static com.tzld.piaoquan.common.common.constant.WeComConstant.GET_WE_COM_ACCESS_TOKEN_URL;
-
-@Slf4j
-@Service
-public class AccessTokenServiceImpl implements AccessTokenService {
-
-    @Autowired
-    private HttpPoolClient httpPoolClient;
-
-    @Autowired
-    private RedisTemplate<String, Object> redisTemplate;
-
-    @Autowired
-    private CorpMapper corpMapper;
-
-    @Override
-    public String getWeComAccessToken(Long corpId) {
-        try {
-            String key = String.format(WE_COM_ACCESS_TOKEN, corpId);
-            String accessToken = (String) redisTemplate.opsForValue().get(key);
-            if (StringUtils.isNotEmpty(accessToken)) {
-                return accessToken;
-            }
-            CorpExample example = new CorpExample();
-            example.createCriteria().andIdEqualTo(corpId);
-            List<Corp> corps = corpMapper.selectByExample(example);
-            if (CollectionUtils.isEmpty(corps)) {
-                LarkRobotUtil.sendMessage("查询不到主体,获取access_token失败");
-                return "";
-            }
-            Corp corp = corps.get(0);
-            String cropId = corp.getCorpId();
-            String secret = corp.getSecret();
-            String res = httpPoolClient.get(String.format(GET_WE_COM_ACCESS_TOKEN_URL +
-                    "?corpid=%s&corpsecret=%s", cropId, secret));
-            JSONObject jsonObject = JSONObject.parseObject(res);
-            Long expiresIn = jsonObject.getLong("expires_in");
-            String newAccessToken = jsonObject.getString("access_token");
-            redisTemplate.opsForValue().set(key, newAccessToken, expiresIn, TimeUnit.SECONDS);
-            return newAccessToken;
-        } catch (IOException e) {
-            LarkRobotUtil.sendMessage("getWeComAccessToken error:" + e);
-            log.error("getWeComAccessToken error", e);
-        }
-        return "";
-    }
-}

+ 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.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);
+}

+ 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.common.common.base.CommonResponse;
+
+import java.util.List;
+
+public interface WeComService {
+
+    CommonResponse<List<WeComPushMessageVo>> getPushMessage(WeComPushMessageParam param);
+}

+ 136 - 0
api-module/src/main/java/com/tzld/piaoquan/api/service/impl/AccessTokenServiceImpl.java

@@ -0,0 +1,136 @@
+package com.tzld.piaoquan.api.service.impl;
+
+import com.alibaba.fastjson.JSONObject;
+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.common.common.base.CommonResponse;
+import com.tzld.piaoquan.common.common.enums.ExceptionCodeEnum;
+import com.tzld.piaoquan.common.component.HttpPoolClient;
+import com.tzld.piaoquan.api.dao.mapper.CorpMapper;
+import com.tzld.piaoquan.common.model.po.Corp;
+import com.tzld.piaoquan.common.model.po.CorpExample;
+import com.tzld.piaoquan.api.service.AccessTokenService;
+import com.tzld.piaoquan.common.utils.LarkRobotUtil;
+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 org.springframework.util.CollectionUtils;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+import java.util.concurrent.TimeUnit;
+
+import static com.tzld.piaoquan.common.common.constant.RedisConstant.WE_COM_ACCESS_TOKEN;
+import static com.tzld.piaoquan.common.common.constant.WeComConstant.GET_WE_COM_ACCESS_TOKEN_URL;
+
+@Slf4j
+@Service
+public class AccessTokenServiceImpl implements AccessTokenService {
+
+    private static final String ACCESS_TOKEN_LIST = "access_token_list";
+
+    @Autowired
+    private HttpPoolClient httpPoolClient;
+
+    @Autowired
+    private RedisTemplate<String, Object> redisTemplate;
+
+    @Autowired
+    private CorpMapper corpMapper;
+
+    @Override
+    public String getWeComAccessToken(Long corpId) {
+        try {
+            String key = String.format(WE_COM_ACCESS_TOKEN, corpId);
+            String accessToken = (String) redisTemplate.opsForValue().get(key);
+            if (StringUtils.isNotEmpty(accessToken)) {
+                return accessToken;
+            }
+            CorpExample example = new CorpExample();
+            example.createCriteria().andIdEqualTo(corpId);
+            List<Corp> corps = corpMapper.selectByExample(example);
+            if (CollectionUtils.isEmpty(corps)) {
+                LarkRobotUtil.sendMessage("查询不到主体,获取access_token失败");
+                return "";
+            }
+            Corp corp = corps.get(0);
+            String cropId = corp.getCorpId();
+            String secret = corp.getSecret();
+            String res = httpPoolClient.get(String.format(GET_WE_COM_ACCESS_TOKEN_URL +
+                    "?corpid=%s&corpsecret=%s", cropId, secret));
+            JSONObject jsonObject = JSONObject.parseObject(res);
+            Long expiresIn = jsonObject.getLong("expires_in");
+            String newAccessToken = jsonObject.getString("access_token");
+            redisTemplate.opsForValue().set(key, newAccessToken, expiresIn, TimeUnit.SECONDS);
+            return newAccessToken;
+        } catch (IOException e) {
+            LarkRobotUtil.sendMessage("getWeComAccessToken error:" + e);
+            log.error("getWeComAccessToken error", e);
+        }
+        return "";
+    }
+
+    @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) redisTemplate.opsForValue().get(param.getSecret());
+        if (StringUtils.isNotEmpty(accessToken)) {
+            Long expire = Long.parseLong(String.valueOf(redisTemplate.getExpire(param.getSecret(), TimeUnit.SECONDS)));
+            accessTokenVo.setAccessToken(accessToken);
+            accessTokenVo.setExpires(expire);
+            if (redisTemplate.opsForHash().size(ACCESS_TOKEN_LIST) > 20) {
+                Map<Object, Object> entries = redisTemplate.opsForHash().entries(ACCESS_TOKEN_LIST);
+                entries.forEach((k, v) -> {
+                    long timestamp = Long.parseLong((String) v);
+                    if (System.currentTimeMillis() / 1000 > timestamp) {
+                        redisTemplate.opsForHash().delete(ACCESS_TOKEN_LIST, k);
+                    }
+                });
+            }
+        } else {
+            String newAccessToken = UUID.randomUUID().toString().replace("-", "");
+            redisTemplate.opsForValue().set(param.getSecret(), newAccessToken, 2L, TimeUnit.HOURS);
+            redisTemplate.opsForValue().set(newAccessToken, param.getSecret(), 3L, TimeUnit.HOURS);
+            long expire = 7200L;
+            String timestamp = String.valueOf(System.currentTimeMillis() / 1000 + expire + 600);
+            redisTemplate.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 = redisTemplate.opsForHash().get(ACCESS_TOKEN_LIST, accessToken);
+        if (o == null) {
+            return false;
+        }
+        long timestamp = Long.parseLong((String) o);
+        if (System.currentTimeMillis() / 1000 > timestamp) {
+            redisTemplate.opsForHash().delete(ACCESS_TOKEN_LIST, accessToken);
+            return false;
+        }
+        return true;
+    }
+
+    @Override
+    public SecretEnum getSecretEnum(String accessToken) {
+        String secret = (String) redisTemplate.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.common.common.base.CommonResponse;
+import com.tzld.piaoquan.common.utils.DateUtil;
+import com.tzld.piaoquan.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();
+    }
+
+}

+ 1 - 1
api-module/src/main/java/com/tzld/piaoquan/api/service/Impl/MessageAttachmentServiceImpl.java → api-module/src/main/java/com/tzld/piaoquan/api/service/impl/MessageAttachmentServiceImpl.java

@@ -1,4 +1,4 @@
-package com.tzld.piaoquan.api.service.Impl;
+package com.tzld.piaoquan.api.service.impl;
 
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;

+ 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.AccessTokenService;
+import com.tzld.piaoquan.api.service.ThirdPartyService;
+import com.tzld.piaoquan.api.service.strategy.ReplyStrategyService;
+import com.tzld.piaoquan.common.common.base.CommonResponse;
+import com.tzld.piaoquan.common.common.constant.TimeConstant;
+import com.tzld.piaoquan.common.common.enums.ExceptionCodeEnum;
+import com.tzld.piaoquan.common.component.ODPSManager;
+import com.tzld.piaoquan.common.utils.DateUtil;
+import com.tzld.piaoquan.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 AccessTokenService accessTokenService;
+
+    @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 (!accessTokenService.validateAccessToken(param.getAccessToken())) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAMS_ERROR, "accessToken错误或者已失效");
+        }
+        SecretEnum secretEnum = accessTokenService.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 (!accessTokenService.validateAccessToken(accessToken)) {
+            return CommonResponse.create(ExceptionCodeEnum.PARAMS_ERROR, "accessToken错误或者已失效");
+        }
+        SecretEnum secretEnum = accessTokenService.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.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));
+    }
+}

+ 1 - 1
api-module/src/main/java/com/tzld/piaoquan/api/service/Impl/UserServiceImpl.java → api-module/src/main/java/com/tzld/piaoquan/api/service/impl/UserServiceImpl.java

@@ -1,4 +1,4 @@
-package com.tzld.piaoquan.api.service.Impl;
+package com.tzld.piaoquan.api.service.impl;
 
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;

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

@@ -0,0 +1,137 @@
+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.common.common.base.CommonResponse;
+import com.tzld.piaoquan.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);
+        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/PushMessageStrategyV1.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.compontent.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 PushMessageStrategyV1 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("PushMessageStrategyV1 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("PushMessageStrategyV1 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.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.compontent.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("PushMessageStrategyV1 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("PushMessageStrategyV1 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
 
+small_page_url=https://testapi.piaoquantv.com
+

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

@@ -8,5 +8,7 @@ spring.redis.password=Qingqu2019
 
 xxl.job.admin.addresses=http://xxl-job-internal.piaoquantv.com/xxl-job-admin
 
+small_page_url=https://api.piaoquantv.com
+
 
 

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

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

+ 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>

+ 1 - 1
api-module/src/main/resources/mapper/CorpMapper.xml

@@ -1,6 +1,6 @@
 <?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.common.dao.mapper.OfflineCorpMapper">
+<mapper namespace="com.tzld.piaoquan.api.dao.mapper.CorpMapper">
   <resultMap id="BaseResultMap" type="com.tzld.piaoquan.common.model.po.Corp">
     <id column="id" jdbcType="BIGINT" property="id" />
     <result column="name" jdbcType="VARCHAR" property="name" />

+ 322 - 0
api-module/src/main/resources/mapper/GhDetailMapper.xml

@@ -0,0 +1,322 @@
+<?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.GhDetailMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.api.model.po.GhDetail">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <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="category2" jdbcType="VARCHAR" property="category2" />
+    <result column="is_delete" jdbcType="INTEGER" property="isDelete" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <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>
+  <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, gh_name, type, category1, category2, is_delete, create_time, update_time, channel, video_ids, strategy_status
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.GhDetailExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from gh_detail
+    <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 gh_detail
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from gh_detail
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.api.model.po.GhDetailExample">
+    delete from gh_detail
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <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 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=",">
+      <if test="ghId != null">
+        gh_id,
+      </if>
+      <if test="ghName != null">
+        gh_name,
+      </if>
+      <if test="type != null">
+        type,
+      </if>
+      <if test="category1 != null">
+        category1,
+      </if>
+      <if test="category2 != null">
+        category2,
+      </if>
+      <if test="isDelete != null">
+        is_delete,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="updateTime != null">
+        update_time,
+      </if>
+      <if test="channel != null">
+        channel,
+      </if>
+      <if test="videoIds != null">
+        video_ids,
+      </if>
+      <if test="strategyStatus != null">
+        strategy_status,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="ghId != null">
+        #{ghId,jdbcType=VARCHAR},
+      </if>
+      <if test="ghName != null">
+        #{ghName,jdbcType=VARCHAR},
+      </if>
+      <if test="type != null">
+        #{type,jdbcType=INTEGER},
+      </if>
+      <if test="category1 != null">
+        #{category1,jdbcType=VARCHAR},
+      </if>
+      <if test="category2 != null">
+        #{category2,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>
+      <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>
+  </insert>
+  <select id="countByExample" parameterType="com.tzld.piaoquan.api.model.po.GhDetailExample" resultType="java.lang.Long">
+    select count(*) from gh_detail
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update gh_detail
+    <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.ghName != null">
+        gh_name = #{row.ghName,jdbcType=VARCHAR},
+      </if>
+      <if test="row.type != null">
+        type = #{row.type,jdbcType=INTEGER},
+      </if>
+      <if test="row.category1 != null">
+        category1 = #{row.category1,jdbcType=VARCHAR},
+      </if>
+      <if test="row.category2 != null">
+        category2 = #{row.category2,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>
+      <if test="row.channel != null">
+        channel = #{row.channel,jdbcType=VARCHAR},
+      </if>
+      <if test="row.videoIds != null">
+        video_ids = #{row.videoIds,jdbcType=VARCHAR},
+      </if>
+      <if test="row.strategyStatus != null">
+        strategyStatus = #{row.strategyStatus,jdbcType=INTEGER},
+      </if>
+    </set>
+    <if test="example != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    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" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.api.model.po.GhDetail">
+    update gh_detail
+    <set>
+      <if test="ghId != null">
+        gh_id = #{ghId,jdbcType=VARCHAR},
+      </if>
+      <if test="ghName != null">
+        gh_name = #{ghName,jdbcType=VARCHAR},
+      </if>
+      <if test="type != null">
+        type = #{type,jdbcType=INTEGER},
+      </if>
+      <if test="category1 != null">
+        category1 = #{category1,jdbcType=VARCHAR},
+      </if>
+      <if test="category2 != null">
+        category2 = #{category2,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>
+      <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>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <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},
+      category2 = #{category2,jdbcType=VARCHAR},
+      is_delete = #{isDelete,jdbcType=INTEGER},
+      create_time = #{createTime,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}
+  </update>
+</mapper>

+ 1 - 1
api-module/src/main/resources/mapper/GuaranteesVideoMapper.xml

@@ -1,6 +1,6 @@
 <?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.common.dao.mapper.OfflineGuaranteesVideoMapper">
+<mapper namespace="com.tzld.piaoquan.api.dao.mapper.GuaranteesVideoMapper">
   <resultMap id="BaseResultMap" type="com.tzld.piaoquan.common.model.po.GuaranteesVideo">
     <id column="id" jdbcType="BIGINT" property="id" />
     <result column="date" jdbcType="VARCHAR" property="date" />

+ 1 - 1
api-module/src/main/resources/mapper/MessageAttachmentMapper.xml

@@ -1,6 +1,6 @@
 <?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.common.dao.mapper.OfflineMessageAttachmentMapper">
+<mapper namespace="com.tzld.piaoquan.api.dao.mapper.MessageAttachmentMapper">
   <resultMap id="BaseResultMap" type="com.tzld.piaoquan.common.model.po.MessageAttachment">
     <id column="id" jdbcType="BIGINT" property="id" />
     <result column="staff_id" jdbcType="BIGINT" property="staffId" />

+ 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>

+ 228 - 0
api-module/src/main/resources/mapper/ReplyStaffMapper.xml

@@ -0,0 +1,228 @@
+<?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.ReplyStaffMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.api.model.po.ReplyStaff">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="user_id" jdbcType="VARCHAR" property="userId" />
+    <result column="name" jdbcType="VARCHAR" property="name" />
+    <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, user_id, name, is_delete, create_time, update_time
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.ReplyStaffExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from reply_staff
+    <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 reply_staff
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from reply_staff
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.api.model.po.ReplyStaffExample">
+    delete from reply_staff
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <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 id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.ReplyStaff">
+    insert into reply_staff
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="userId != null">
+        user_id,
+      </if>
+      <if test="name != null">
+        name,
+      </if>
+      <if test="isDelete != null">
+        is_delete,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="updateTime != null">
+        update_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=BIGINT},
+      </if>
+      <if test="userId != null">
+        #{userId,jdbcType=VARCHAR},
+      </if>
+      <if test="name != null">
+        #{name,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.ReplyStaffExample" resultType="java.lang.Long">
+    select count(*) from reply_staff
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update reply_staff
+    <set>
+      <if test="row.id != null">
+        id = #{row.id,jdbcType=BIGINT},
+      </if>
+      <if test="row.userId != null">
+        user_id = #{row.userId,jdbcType=VARCHAR},
+      </if>
+      <if test="row.name != null">
+        name = #{row.name,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 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" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.api.model.po.ReplyStaff">
+    update reply_staff
+    <set>
+      <if test="userId != null">
+        user_id = #{userId,jdbcType=VARCHAR},
+      </if>
+      <if test="name != null">
+        name = #{name,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.ReplyStaff">
+    update reply_staff
+    set user_id = #{userId,jdbcType=VARCHAR},
+      name = #{name,jdbcType=VARCHAR},
+      is_delete = #{isDelete,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_time = #{updateTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 1 - 1
api-module/src/main/resources/mapper/StaffMapper.xml

@@ -1,6 +1,6 @@
 <?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.common.dao.mapper.OfflineStaffMapper">
+<mapper namespace="com.tzld.piaoquan.api.dao.mapper.StaffMapper">
   <resultMap id="BaseResultMap" type="com.tzld.piaoquan.common.model.po.Staff">
     <id column="id" jdbcType="BIGINT" property="id" />
     <result column="corp_id" jdbcType="BIGINT" property="corpId" />

+ 1 - 1
api-module/src/main/resources/mapper/StaffWithUserMapper.xml

@@ -1,6 +1,6 @@
 <?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.common.dao.mapper.OfflineStaffWithUserMapper">
+<mapper namespace="com.tzld.piaoquan.api.dao.mapper.StaffWithUserMapper">
   <resultMap id="BaseResultMap" type="com.tzld.piaoquan.common.model.po.StaffWithUser">
     <id column="id" jdbcType="BIGINT" property="id" />
     <result column="staff_id" jdbcType="BIGINT" property="staffId" />

+ 1 - 1
common-module/src/main/java/com/tzld/piaoquan/common/common/constant/MessageConstant.java

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

+ 2 - 2
common-module/src/main/java/com/tzld/piaoquan/common/common/enums/ExceptionCodeEnum.java

@@ -12,8 +12,8 @@ public enum ExceptionCodeEnum {
     /**
      * 自定义异常信息
      */
-    SYSTEM_ERROR(1000, "系统错误"),
-    PARAMS_ERROR(2001, "参数错误")
+    SYSTEM_ERROR(500, "系统错误"),
+    PARAMS_ERROR(400, "参数错误")
     ;
 
     private final int code;

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

@@ -0,0 +1,70 @@
+package com.tzld.piaoquan.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();
+        }
+    }
+}

+ 41 - 0
common-module/src/main/java/com/tzld/piaoquan/common/utils/DateUtil.java

@@ -6,6 +6,7 @@ import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.time.ZoneId;
 import java.time.format.DateTimeFormatter;
+import java.time.format.DateTimeParseException;
 import java.util.Calendar;
 import java.util.Date;
 
@@ -65,6 +66,16 @@ public class DateUtil {
         return dateTime.format(dateFormat);
     }
 
+    public static String getDateString(Long timestamp, String pattern) {
+        // 创建日期时间格式化器
+        DateTimeFormatter dateFormat = DateTimeFormatter.ofPattern(pattern);
+        // 将时间戳转换为 LocalDateTime
+        ZoneId zone = ZoneId.of("Asia/Shanghai");
+        LocalDateTime dateTime = LocalDateTime.ofInstant(Instant.ofEpochMilli(timestamp), zone);
+        // 格式化日期时间并返回
+        return dateTime.format(dateFormat);
+    }
+
     public static Long dateDifference(Date date1, Date date2) {
         return Math.abs(date1.getTime() - date2.getTime());
     }
@@ -74,4 +85,34 @@ public class DateUtil {
         return calendar.get(Calendar.HOUR_OF_DAY);
     }
 
+    public static boolean isValidDate(String dateString) {
+        // 定义日期格式
+        DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
+
+        try {
+            // 尝试解析日期字符串
+            LocalDate date = LocalDate.parse(dateString, dateFormatter);
+            return true; // 如果解析成功,返回 true
+        } catch (DateTimeParseException e) {
+            return false; // 如果解析失败,返回 false
+        }
+    }
+
+    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));
+    }
+
 }