浏览代码

Merge branch '20250905-wyp-contentPlatformGzhPush' into test

wangyunpeng 1 天之前
父节点
当前提交
4bfadca6cf
共有 82 个文件被更改,包括 11913 次插入244 次删除
  1. 4 0
      api-module/src/main/java/com/tzld/piaoquan/api/common/enums/ExceptionEnum.java
  2. 1 0
      api-module/src/main/java/com/tzld/piaoquan/api/common/enums/contentplatform/BussinessTypeEnum.java
  3. 1 0
      api-module/src/main/java/com/tzld/piaoquan/api/common/enums/contentplatform/ContentPlatformGzhPlanTypeEnum.java
  4. 65 35
      api-module/src/main/java/com/tzld/piaoquan/api/component/WeComThirdPartyApiClient.java
  5. 91 2
      api-module/src/main/java/com/tzld/piaoquan/api/controller/TencentWeComController.java
  6. 6 0
      api-module/src/main/java/com/tzld/piaoquan/api/controller/WeComThirdPartyController.java
  7. 16 0
      api-module/src/main/java/com/tzld/piaoquan/api/controller/contentplatform/ContentPlatformDatastatController.java
  8. 3 3
      api-module/src/main/java/com/tzld/piaoquan/api/dao/generator/MybatisGeneratorMain.java
  9. 35 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/GhDetailExtMapper.java
  10. 5 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/ReplyStaffMapper.java
  11. 30 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/contentplatform/ContentPlatformGzhPushDataStatMapper.java
  12. 30 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/contentplatform/ContentPlatformGzhPushDataStatTotalMapper.java
  13. 22 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/contentplatform/ext/ContentPlatformDataStatMapperExt.java
  14. 30 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/wecom/thirdpart/ThirdPartWeComRoomUserMapper.java
  15. 30 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/wecom/thirdpart/ThirdPartWeComStaffUserMapper.java
  16. 16 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/wecom/thirdpart/ext/ThirdPartWeComMapperExt.java
  17. 147 0
      api-module/src/main/java/com/tzld/piaoquan/api/job/contentplatform/ContentPlatformDatastatJob.java
  18. 233 0
      api-module/src/main/java/com/tzld/piaoquan/api/job/wecom/thirdpart/WeComCreateRoomJob.java
  19. 2 10
      api-module/src/main/java/com/tzld/piaoquan/api/job/wecom/thirdpart/WeComSendMsgJob.java
  20. 238 33
      api-module/src/main/java/com/tzld/piaoquan/api/job/wecom/thirdpart/WeComUserDetailJob.java
  21. 3 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/bo/BucketDataParam.java
  22. 15 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/bo/MiniPageData.java
  23. 1 1
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/GzhDatastatListParam.java
  24. 1 1
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/GzhPlanListParam.java
  25. 1 1
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/GzhPlanSaveParam.java
  26. 1 1
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/VideoContentListParam.java
  27. 23 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/wecom/thirdpart/AntiSpamRuleResponse.java
  28. 11 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/wecom/thirdpart/CreateRoomWxResponse.java
  29. 10 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/wecom/thirdpart/DisableRenameChatroomRequest.java
  30. 4 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/wecom/thirdpart/GetExternalContactsRequest.java
  31. 5 1
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/wecom/thirdpart/GetRoomUserListRequest.java
  32. 9 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/wecom/thirdpart/QueryCRMAntiSpamRuleRequest.java
  33. 11 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/wecom/thirdpart/SetRoomAntiRequest.java
  34. 14 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/wecom/thirdpart/UpdateRoomSendStatusRequest.java
  35. 114 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/GhDetailExt.java
  36. 782 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/GhDetailExtExample.java
  37. 90 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformGzhPushDataStat.java
  38. 641 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformGzhPushDataStatExample.java
  39. 112 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformGzhPushDataStatTotal.java
  40. 771 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformGzhPushDataStatTotalExample.java
  41. 44 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComRoom.java
  42. 250 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComRoomExample.java
  43. 235 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComRoomUser.java
  44. 1522 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComRoomUserExample.java
  45. 11 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComStaff.java
  46. 60 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComStaffExample.java
  47. 268 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComStaffUser.java
  48. 1722 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComStaffUserExample.java
  49. 6 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/WeComThirdPartyService.java
  50. 61 2
      api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/impl/ContentPlatformDatastatServiceImpl.java
  51. 10 1
      api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/impl/ContentPlatformPlanServiceImpl.java
  52. 23 4
      api-module/src/main/java/com/tzld/piaoquan/api/service/impl/CgiReplyServiceImpl.java
  53. 28 4
      api-module/src/main/java/com/tzld/piaoquan/api/service/impl/ThirdPartyServiceImpl.java
  54. 0 6
      api-module/src/main/java/com/tzld/piaoquan/api/service/impl/WeComAutoReplyImpl.java
  55. 32 18
      api-module/src/main/java/com/tzld/piaoquan/api/service/impl/WeComServiceImpl.java
  56. 70 1
      api-module/src/main/java/com/tzld/piaoquan/api/service/impl/WeComThirdPartyServiceImpl.java
  57. 94 48
      api-module/src/main/java/com/tzld/piaoquan/api/service/strategy/impl/BuckStrategyV1.java
  58. 95 49
      api-module/src/main/java/com/tzld/piaoquan/api/service/strategy/impl/ThirdPartyPushMessageStrategyV1.java
  59. 278 0
      api-module/src/main/resources/mapper/GhDetailExtMapper.xml
  60. 246 0
      api-module/src/main/resources/mapper/contentplatform/ContentPlatformGzhPushDataStatMapper.xml
  61. 279 0
      api-module/src/main/resources/mapper/contentplatform/ContentPlatformGzhPushDataStatTotalMapper.xml
  62. 69 1
      api-module/src/main/resources/mapper/contentplatform/ext/ContentPlatformDataStatMapperExt.xml
  63. 67 5
      api-module/src/main/resources/mapper/wecom/thirdpart/ThirdPartWeComRoomMapper.xml
  64. 451 0
      api-module/src/main/resources/mapper/wecom/thirdpart/ThirdPartWeComRoomUserMapper.xml
  65. 21 6
      api-module/src/main/resources/mapper/wecom/thirdpart/ThirdPartWeComStaffMapper.xml
  66. 498 0
      api-module/src/main/resources/mapper/wecom/thirdpart/ThirdPartWeComStaffUserMapper.xml
  67. 46 0
      api-module/src/main/resources/mapper/wecom/thirdpart/ext/ThirdPartWeComMapperExt.xml
  68. 2 0
      api-module/src/main/resources/mybatis-api-contentPlatform-generator-config.xml
  69. 2 1
      api-module/src/main/resources/mybatis-api-generator-config.xml
  70. 2 0
      api-module/src/main/resources/mybatis-api-wecomThirdpart-generator-config.xml
  71. 2 3
      api-module/src/main/resources/mybatis-generator-config.xml
  72. 2 0
      api-module/src/test/java/com/tzld/piaoquan/api/ContentPlatformTest.java
  73. 13 1
      api-module/src/test/java/com/tzld/piaoquan/api/WeComThirdPartTest.java
  74. 3 0
      common-module/src/main/java/com/tzld/piaoquan/growth/common/common/constant/WeComConstant.java
  75. 6 0
      common-module/src/main/java/com/tzld/piaoquan/growth/common/common/constant/WeComServerConstant.java
  76. 2 1
      common-module/src/main/java/com/tzld/piaoquan/growth/common/common/enums/CorpEnum.java
  77. 35 0
      common-module/src/main/java/com/tzld/piaoquan/growth/common/dao/mapper/StaffGroupStatisticsTotalMapper.java
  78. 180 0
      common-module/src/main/java/com/tzld/piaoquan/growth/common/model/po/StaffGroupStatisticsTotal.java
  79. 1122 0
      common-module/src/main/java/com/tzld/piaoquan/growth/common/model/po/StaffGroupStatisticsTotalExample.java
  80. 374 0
      common-module/src/main/resources/mapper/StaffGroupStatisticsTotalMapper.xml
  81. 1 1
      offline-module/src/main/java/com/tzld/piaoquan/offline/job/WeComHistoryDataJob.java
  82. 57 4
      offline-module/src/main/java/com/tzld/piaoquan/offline/job/WeComStaffDataJob.java

+ 4 - 0
api-module/src/main/java/com/tzld/piaoquan/api/common/enums/ExceptionEnum.java

@@ -48,6 +48,10 @@ public enum ExceptionEnum {
     API_PAGE_SIZE_TOO_LARGE(4002, "每页获取数量不能超过500条"),
     API_PAGE_URL_SIZE_TOO_LARGE(4002, "获取视频嵌入路径 每次最多3条"),
 
+    // 三方平台 自动拉群群发
+    THIRD_PART_STAFF_NOT_FOUND(5001, "账号不存在"),
+    THIRD_PART_ROOM_NOT_FOUND(5002, "群不存在"),
+
     // 自动回复
     CGI_REPLY_BUCKET_DATA_NOT_FOUND(10000, "自动回复数据不存在"),
     CGI_REPLY_BUCKET_DATA_NOT_AUTO_REPLY(10001, "非自动回复数据"),

+ 1 - 0
api-module/src/main/java/com/tzld/piaoquan/api/common/enums/contentplatform/BussinessTypeEnum.java

@@ -8,6 +8,7 @@ import java.util.Objects;
 public enum BussinessTypeEnum {
     GZH_AUTO_REPLY("gzh_autoReply", "gongzhonghaozidonghuifu", "公众号自动回复"),
     FWH_PUSH("fwh_push", "fuwuhaodaiyunying", "服务号推送"),
+    GZH_PUSH("gzh_push", "gongzhonghaotuisong", "公众号推送"),
     QW("qw", "qiweihezuo", "企微"),
 
     ;

+ 1 - 0
api-module/src/main/java/com/tzld/piaoquan/api/common/enums/contentplatform/ContentPlatformGzhPlanTypeEnum.java

@@ -6,6 +6,7 @@ import lombok.Getter;
 public enum ContentPlatformGzhPlanTypeEnum {
     AUTO_REPLY(0, "自动回复"),
     FWH_PUSH(1, "服务号推送"),
+    GZH_PUSH(2, "公众号推送"),
 
     other(999, "其他");
 

+ 65 - 35
api-module/src/main/java/com/tzld/piaoquan/api/component/WeComThirdPartyApiClient.java

@@ -149,6 +149,36 @@ public class WeComThirdPartyApiClient {
         return postRequest("/wxwork/setRoomManagement", request);
     }
 
+    /**
+     * 禁止修改群名
+     *
+     * @param request 请求体
+     * @return 响应结果
+     */
+    public String disableRenameChatroom(DisableRenameChatroomRequest request) {
+        return postRequest("/wxwork/DisableRenameChatroom", request);
+    }
+
+    /**
+     * 获取群防骚扰规则列表
+     *
+     * @param request 请求体
+     * @return 响应结果
+     */
+    public String queryCRMAntiSpamRule(QueryCRMAntiSpamRuleRequest request) {
+        return postRequest("/wxwork/queryCRMAntiSpamRule", request);
+    }
+
+    /**
+     * 设置或者移除群防骚扰规则
+     *
+     * @param request 请求体
+     * @return 响应结果
+     */
+    public String setRoomAnti(SetRoomAntiRequest request) {
+        return postRequest("/wxwork/setRoomAnti", request);
+    }
+
     /**
      * 直接邀请进群
      *
@@ -160,7 +190,35 @@ public class WeComThirdPartyApiClient {
     }
 
     /**
-     * 发送消息
+     * 获取客户群列表
+     * @param request
+     * @return
+     */
+    public String getChatroomMembers(GetChatroomMembersRequest request) {
+        return postRequest("/wxwork/GetChatroomMembers", request);
+    }
+
+    /**
+     * 获取群成员列表
+     * @param request
+     * @return
+     */
+    public String getRoomUserList(GetRoomUserListRequest request) {
+        return postRequest("/wxwork/GetRoomUserList", request);
+    }
+
+    /**
+     * 转让群主
+     *
+     * @param request 请求体
+     * @return 响应结果
+     */
+    public String transferChatroomOwner(TransferChatroomOwnerRequest request) {
+        return postRequest("/wxwork/TransferChatroomOwner", request);
+    }
+
+    /**
+     * 发送文本消息
      *
      * @param request 请求体
      * {
@@ -177,7 +235,7 @@ public class WeComThirdPartyApiClient {
     }
 
     /**
-     * 发送消息
+     * 发送小程序消息
      *
      * @param request 请求体
      * {
@@ -203,13 +261,12 @@ public class WeComThirdPartyApiClient {
     }
 
     /**
-     * 转让群主
-     *
-     * @param request 请求体
-     * @return 响应结果
+     * CDN上传网络图片
+     * @param request
+     * @return
      */
-    public String transferChatroomOwner(TransferChatroomOwnerRequest request) {
-        return postRequest("/wxwork/TransferChatroomOwner", request);
+    public String cdnUploadImgLink(CdnUploadImgLinkRequest request) {
+        return postRequest("/wxwork/CdnUploadImgLink", request);
     }
 
     /**
@@ -222,33 +279,6 @@ public class WeComThirdPartyApiClient {
         return postRequest("/wxwork/LoginOut", request);
     }
 
-    /**
-     * 获取客户群列表
-     * @param request
-     * @return
-     */
-    public String getChatroomMembers(GetChatroomMembersRequest request) {
-        return postRequest("/wxwork/GetChatroomMembers", request);
-    }
-
-    /**
-     * 获取群成员列表
-     * @param request
-     * @return
-     */
-    public String getRoomUserList(GetRoomUserListRequest request) {
-        return postRequest("/wxwork/GetRoomUserList", request);
-    }
-
-    /**
-     * CDN上传网络图片
-     * @param request
-     * @return
-     */
-    public String cdnUploadImgLink(CdnUploadImgLinkRequest request) {
-        return postRequest("/wxwork/CdnUploadImgLink", request);
-    }
-
     private String postRequest(String path, Object requestBody) {
         String url = baseUrl + path;
         String json = JSONObject.toJSONString(requestBody);

+ 91 - 2
api-module/src/main/java/com/tzld/piaoquan/api/controller/TencentWeComController.java

@@ -28,8 +28,7 @@ import java.util.Base64;
 import java.util.Map;
 import java.util.UUID;
 
-import static com.tzld.piaoquan.growth.common.common.enums.CorpEnum.HNWQ;
-import static com.tzld.piaoquan.growth.common.common.enums.CorpEnum.YLQ;
+import static com.tzld.piaoquan.growth.common.common.enums.CorpEnum.*;
 
 @Slf4j
 @RestController
@@ -229,6 +228,96 @@ public class TencentWeComController {
         return success;
     }
 
+    //赛博成行验证接口
+    @GetMapping("/sbcx/verify")
+    public void sbcxVerifyGet(HttpServletRequest request, HttpServletResponse response) {
+        try {
+            // 微信加密签名
+            String msgSignature = request.getParameter("msg_signature");
+            // 时间戳
+            String timestamp = request.getParameter("timestamp");
+            // 随机数
+            String nonce = request.getParameter("nonce");
+            // 随机字符串
+            // 如果是刷新,需返回原echostr
+            String echoStr = request.getParameter("echostr");
+            // 微信加密签名
+            WXBizMsgCrypt wxcpt = new WXBizMsgCrypt(WeComServerConstant.SBCX_TOKEN,
+                    WeComServerConstant.SBCX_ENCODING_AES_KEY,
+                    WeComServerConstant.SBCX_CORP_ID);
+
+            String sEchoStr = ""; //需要返回的明文
+            PrintWriter out;
+
+            sEchoStr = wxcpt.VerifyURL(msgSignature, timestamp,
+                    nonce, echoStr);
+            log.info("verifyurl echostr: " + sEchoStr);
+
+            // 验证URL成功,将sEchoStr返回
+            out = response.getWriter();
+            out.print(sEchoStr);
+        } catch (Exception e) {
+            //验证URL失败,错误原因请查看异常
+            log.error("verifyGet error", e);
+        }
+
+    }
+
+    //优量圈回调消息接口
+    @PostMapping(value = "/sbcx/verify")
+    public String sbcxVerifyPost(HttpServletRequest request) {
+        try {
+            // 微信加密签名
+            String msg_signature = request.getParameter("msg_signature");
+            // 时间戳
+            String timestamp = request.getParameter("timestamp");
+            // 随机数
+            String nonce = request.getParameter("nonce");
+
+            String id = WeComServerConstant.SBCX_CORP_ID;
+
+            WXBizMsgCrypt wxcpt = new WXBizMsgCrypt(WeComServerConstant.SBCX_TOKEN, WeComServerConstant.SBCX_ENCODING_AES_KEY, id);
+
+            StringBuilder postData = new StringBuilder();   // 密文,对应POST请求的数据
+            //1.获取加密的请求消息:使用输入流获得加密请求消息postData
+            ServletInputStream in = request.getInputStream();
+            BufferedReader reader = new BufferedReader(new InputStreamReader(in));
+
+            String tempStr = "";   //作为输出字符串的临时串,用于判断是否读取完毕
+            while (null != (tempStr = reader.readLine())) {
+                postData.append(tempStr);
+            }
+
+            String suiteXml = wxcpt.DecryptMsg(msg_signature, timestamp, nonce, postData.toString());
+            log.info("suiteXml: " + suiteXml);
+
+            Map suiteMap = WxUtil.transferXmlToMap(suiteXml);
+            log.info("suiteMap = {}", JSONObject.toJSONString(suiteMap));
+            if (suiteMap != null) {
+                String changeType = (String) suiteMap.get("ChangeType");
+                if (StringUtils.isNotEmpty(changeType) && changeType.equals("add_external_contact")) {
+                    String userId = (String) suiteMap.get("UserID");
+                    String externalUserId = (String) suiteMap.get("ExternalUserID");
+                    String welcomeCode = (String) suiteMap.get("WelcomeCode");
+                    log.info("SBCX addStaffWithUser userId={} externalUserId={}", userId, externalUserId);
+                    weComUserService.addStaffWithUser(externalUserId, userId, SBCX.getId());
+                    weComAutoReply.AutoReplyMessage(welcomeCode, externalUserId, userId, SBCX.getId());
+                }
+
+                if (StringUtils.isNotEmpty(changeType) && changeType.equals("del_follow_user")) {
+                    String userId = (String) suiteMap.get("UserID");
+                    String externalUserId = (String) suiteMap.get("ExternalUserID");
+                    log.info("SBCX delStaffWithUser userId={} externalUserId={}", userId, externalUserId);
+                    weComUserService.delStaffWithUser(externalUserId, userId, SBCX.getId(), System.currentTimeMillis());
+                }
+            }
+        } catch (Exception e) {
+            log.error("verifyPost error", e);
+        }
+        String success = "success";
+        return success;
+    }
+
 
     @PostMapping("/send/post")
     public String sendPost(@RequestBody SendRequestParam sendRequestParam) throws IOException {

+ 6 - 0
api-module/src/main/java/com/tzld/piaoquan/api/controller/WeComThirdPartyController.java

@@ -72,4 +72,10 @@ public class WeComThirdPartyController {
         return CommonResponse.success(service.getRoomUserList(request));
     }
 
+    @PostMapping("/updateRoomSendStatus")
+    public CommonResponse<Void> updateRoomSendStatus(@RequestBody UpdateRoomSendStatusRequest request) {
+        service.updateRoomSendStatus(request);
+        return CommonResponse.success();
+    }
+
 }

+ 16 - 0
api-module/src/main/java/com/tzld/piaoquan/api/controller/contentplatform/ContentPlatformDatastatController.java

@@ -88,6 +88,22 @@ public class ContentPlatformDatastatController {
         return CommonResponse.success();
     }
 
+    @ApiOperation(value = "公众号推送总计数据统计同步任务", hidden = true)
+    @GetMapping("/job/syncGzhPushDatastatTotal")
+    @JwtIgnore
+    public CommonResponse<String> syncContentPlatformGzhPushDatastatTotalJob(String dateStr) {
+        job.syncContentPlatformGzhPushDatastatTotalJob(dateStr);
+        return CommonResponse.success();
+    }
+
+    @ApiOperation(value = "公众号推送分账号数据统计同步任务", hidden = true)
+    @GetMapping("/job/syncGzhPushDatastat")
+    @JwtIgnore
+    public CommonResponse<String> syncContentPlatformGzhPushDatastatJob(String dateStr) {
+        job.syncContentPlatformGzhPushDatastatJob(dateStr);
+        return CommonResponse.success();
+    }
+
     @ApiOperation(value = "企微数据统计同步任务", hidden = true)
     @GetMapping("/job/syncQwDatastat")
     @JwtIgnore

+ 3 - 3
api-module/src/main/java/com/tzld/piaoquan/api/dao/generator/MybatisGeneratorMain.java

@@ -20,10 +20,10 @@ public class MybatisGeneratorMain {
             throws SQLException, IOException, InterruptedException, InvalidConfigurationException, XMLParserException {
         List<String> warnings = new ArrayList<>();
 
-//        File configFile = new File(MybatisGeneratorMain.class.getResource("/mybatis-generator-config.xml").getFile());
+        //File configFile = new File(MybatisGeneratorMain.class.getResource("/mybatis-generator-config.xml").getFile());
 //        File configFile = new File(MybatisGeneratorMain.class.getResource("/mybatis-api-generator-config.xml").getFile());
-//        File configFile = new File(MybatisGeneratorMain.class.getResource("/mybatis-api-contentPlatform-generator-config.xml").getFile());
-        File configFile = new File(MybatisGeneratorMain.class.getResource("/mybatis-api-wecomThirdpart-generator-config.xml").getFile());
+        File configFile = new File(MybatisGeneratorMain.class.getResource("/mybatis-api-contentPlatform-generator-config.xml").getFile());
+//        File configFile = new File(MybatisGeneratorMain.class.getResource("/mybatis-api-wecomThirdpart-generator-config.xml").getFile());
         ConfigurationParser cp = new ConfigurationParser(warnings);
         Configuration config = cp.parseConfiguration(configFile);
         DefaultShellCallback callback = new DefaultShellCallback(true);

+ 35 - 0
api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/GhDetailExtMapper.java

@@ -0,0 +1,35 @@
+package com.tzld.piaoquan.api.dao.mapper;
+
+import com.tzld.piaoquan.api.model.po.GhDetailExt;
+import com.tzld.piaoquan.api.model.po.GhDetailExtExample;
+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 GhDetailExtMapper {
+    long countByExample(GhDetailExtExample example);
+
+    int deleteByExample(GhDetailExtExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(GhDetailExt record);
+
+    int insertSelective(GhDetailExt record);
+
+    List<GhDetailExt> selectByExample(GhDetailExtExample example);
+
+    GhDetailExt selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") GhDetailExt record, @Param("example") GhDetailExtExample example);
+
+    int updateByExample(@Param("record") GhDetailExt record, @Param("example") GhDetailExtExample example);
+
+    int updateByPrimaryKeySelective(GhDetailExt record);
+
+    int updateByPrimaryKey(GhDetailExt record);
+}

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

@@ -3,8 +3,13 @@ package com.tzld.piaoquan.api.dao.mapper;
 import com.tzld.piaoquan.api.model.po.ReplyStaff;
 import com.tzld.piaoquan.api.model.po.ReplyStaffExample;
 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 ReplyStaffMapper {
     long countByExample(ReplyStaffExample example);
 

+ 30 - 0
api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/contentplatform/ContentPlatformGzhPushDataStatMapper.java

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

+ 30 - 0
api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/contentplatform/ContentPlatformGzhPushDataStatTotalMapper.java

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

+ 22 - 0
api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/contentplatform/ext/ContentPlatformDataStatMapperExt.java

@@ -44,6 +44,20 @@ public interface ContentPlatformDataStatMapperExt {
                                                                   @Param("offset") int offset,
                                                                   @Param("pageSize") Integer pageSize);
 
+    int getGzhPushTotalDatastatCount(@Param("param") GzhDatastatListParam param, @Param("createAccountId") Long createAccountId);
+
+    List<ContentPlatformGzhPushDataStatTotal> getGzhPushTotalDatastatList(@Param("param") GzhDatastatListParam param,
+                                                                      @Param("createAccountId") Long createAccountId,
+                                                                      @Param("offset") int offset,
+                                                                      @Param("pageSize") Integer pageSize);
+
+    int getGzhPushAccountDatastatCount(@Param("param") GzhDatastatListParam param, @Param("createAccountId") Long createAccountId);
+
+    List<ContentPlatformGzhDataStat> getGzhPushAccountDatastatList(@Param("param") GzhDatastatListParam param,
+                                                                  @Param("createAccountId") Long createAccountId,
+                                                                  @Param("offset") int offset,
+                                                                  @Param("pageSize") Integer pageSize);
+
     Integer getQwRootSourceIdDatastatCount(@Param("param") QwDatastatListParam param, @Param("createAccountId") Long createAccountId);
 
     List<ContentPlatformQwDataStat> getQwRootSourceIdDatastatList(@Param("param") QwDatastatListParam param,
@@ -107,6 +121,10 @@ public interface ContentPlatformDataStatMapperExt {
 
     void batchInsertQwDatastatSubChannel(@Param("records") List<ContentPlatformQwDataStatSubChannel> saveList);
 
+    void batchInsertGzhPushDatastat(@Param("records") List<ContentPlatformGzhPushDataStat> saveList);
+
+    void batchInsertGzhPushDatastatTotal(@Param("records") List<ContentPlatformGzhPushDataStatTotal> saveList);
+
     List<ContentPlatformQwDataStatTotal> getQwTotalDatastatScoreList(@Param("dt") String dt, @Param("channels") List<String> channels);
 
     List<ContentPlatformQwDataStatReplyTotal> getQwTotalDatastatReplyScoreList(@Param("dt") String dt, @Param("channels") List<String> channels);
@@ -128,4 +146,8 @@ public interface ContentPlatformDataStatMapperExt {
     void deleteFwhDatastatTotal(@Param("dt") String dt);
 
     void deleteGzhVideoDatastat(@Param("dt") String dt);
+
+    void deleteGzhPushDatastat(@Param("dt") String dt);
+
+    void deleteGzhPushDatastatTotal(@Param("dt") String dt);
 }

+ 30 - 0
api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/wecom/thirdpart/ThirdPartWeComRoomUserMapper.java

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

+ 30 - 0
api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/wecom/thirdpart/ThirdPartWeComStaffUserMapper.java

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

+ 16 - 0
api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/wecom/thirdpart/ext/ThirdPartWeComMapperExt.java

@@ -0,0 +1,16 @@
+package com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ext;
+
+import com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomUser;
+import com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffUser;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface ThirdPartWeComMapperExt {
+
+    void batchInsertThirdPartWeComRoomUser(@Param("records") List<ThirdPartWeComRoomUser> records);
+
+    void batchInsertThirdPartWeComStaffUser(@Param("records") List<ThirdPartWeComStaffUser> saveList);
+
+    List<ThirdPartWeComStaffUser> getNoGroupStaffUserList(@Param("thirdStaffId") Long thirdStaffId);
+}

+ 147 - 0
api-module/src/main/java/com/tzld/piaoquan/api/job/contentplatform/ContentPlatformDatastatJob.java

@@ -408,6 +408,153 @@ public class ContentPlatformDatastatJob {
         return ReturnT.SUCCESS;
     }
 
+    @XxlJob("syncContentPlatformGzhPushDatastatJob")
+    public ReturnT<String> syncContentPlatformGzhPushDatastatJob(String param) {
+        String dt = DateUtil.getBeforeDayDateString("yyyyMMdd");
+        if (StringUtils.hasText(param)) {
+            dt = param;
+        }
+        Long now = System.currentTimeMillis();
+        // 公众号自动回复数据统计
+        String sql = String.format(
+                "SELECT first_level.subchannel, first_level.first_uv, fission.split_uv " +
+                "FROM loghubods.out_channel_mid_first_total first_level " +
+                "left join loghubods.out_channel_mid_split_total fission " +
+                "on first_level.subchannel = fission.subchannel and first_level.dt = fission.dt " +
+                "and first_level.type = fission.type and first_level.tag = fission.tag " +
+                "WHERE first_level.dt = %s and first_level.type = '公众号推送' and first_level.tag = '分投放渠道客户分账号去重' ;", dt);
+        List<Record> dataList = OdpsUtil.getOdpsData(sql);
+        // 所有公众号
+        List<ContentPlatformGzhAccount> accountList = getAllGzhAccount();
+        Map<String, ContentPlatformGzhAccount> accountMap = accountList.stream()
+                .collect(Collectors.toMap(ContentPlatformGzhAccount::getGhId, account -> account));
+        List<String> ghIds = accountList.stream().map(ContentPlatformGzhAccount::getGhId).collect(Collectors.toList());
+        List<String> accountExternalIds = accountList.stream().map(ContentPlatformGzhAccount::getExternalId)
+                .collect(Collectors.toList());
+        String dateStr = dt.substring(0, 4) + "-" + dt.substring(4, 6) + "-" + dt.substring(6, 8);
+        List<WxAccountDatastatVO> wxAccountDatastatVOList = aigcApiService.getWxAccountDatastat(dateStr, accountExternalIds);
+        Map<String, WxAccountDatastatVO> wxAccountDatastatMap = wxAccountDatastatVOList.stream()
+                .collect(Collectors.toMap(WxAccountDatastatVO::getAccountId, wxAccountDatastatVO -> wxAccountDatastatVO));
+        if (CollectionUtils.isNotEmpty(dataList)) {
+            List<ContentPlatformGzhPushDataStat> saveList = new ArrayList<>();
+            for (Record record : dataList) {
+                ContentPlatformGzhPushDataStat item = new ContentPlatformGzhPushDataStat();
+                String ghId = (String) record.get(0);
+                int firstLevelCount = Integer.parseInt((String) record.get(1));
+                Integer fissionCount = parseInteger(record.get(2));
+                item.setDateStr(dt);
+                if (!ghIds.contains(ghId)) {
+                    continue;
+                }
+                ContentPlatformGzhAccount gzhAccount = accountMap.get(ghId);
+                item.setAccountId(gzhAccount.getId());
+                item.setFirstLevelCount(firstLevelCount);
+                WxAccountDatastatVO wxAccountDatastatVO = wxAccountDatastatMap.get(gzhAccount.getExternalId());
+                if (Objects.nonNull(wxAccountDatastatVO)) {
+                    item.setFansIncreaseCount(wxAccountDatastatVO.getFansIncreaseCount());
+                }
+
+                if (fissionCount > 0 && firstLevelCount > 0) {
+                    BigDecimal num = BigDecimal.valueOf(fissionCount.doubleValue() * 10 / firstLevelCount);
+                    BigDecimal rounded = num.setScale(2, RoundingMode.HALF_UP);
+                    item.setScore(rounded.doubleValue());
+                }
+                item.setCreateTimestamp(now);
+                saveList.add(item);
+            }
+            if (CollectionUtils.isNotEmpty(saveList)) {
+                dataStatMapperExt.deleteGzhPushDatastat(dt);
+                dataStatMapperExt.batchInsertGzhPushDatastat(saveList);
+            }
+        }
+        return ReturnT.SUCCESS;
+    }
+
+    @XxlJob("syncContentPlatformGzhPushDatastatTotalJob")
+    public ReturnT<String> syncContentPlatformGzhPushDatastatTotalJob(String param) {
+        String dt = DateUtil.getBeforeDayDateString("yyyyMMdd");
+        if (StringUtils.hasText(param)) {
+            dt = param;
+        }
+        Long now = System.currentTimeMillis();
+        // 公众号自动回复数据统计
+        String sql = String.format(
+                "SELECT first_level.channel_shortname, first_level.first_uv, fission.split_uv, price.arpu " +
+                "FROM loghubods.out_channel_mid_first_total first_level " +
+                "left join loghubods.out_channel_mid_split_total fission " +
+                "on first_level.channel_shortname = fission.channel_shortname and first_level.dt = fission.dt " +
+                "and first_level.type = fission.type and first_level.tag = fission.tag " +
+                "left join loghubods.wecom_cooperation_dynamic_unit_price price " +
+                "on first_level.channel_shortname = price.channel_shortname and first_level.dt = price.dt " +
+                "and first_level.type = price.type and first_level.tag = price.tag " +
+                "WHERE first_level.dt = %s and first_level.type = '公众号推送' and first_level.tag = '投放渠道内去重' ;", dt);
+        List<Record> dataList = OdpsUtil.getOdpsData(sql);
+        // 所有公众号
+        List<ContentPlatformAccount> accountList = getAllAccount();
+        Map<String, ContentPlatformAccount> accountMap = accountList.stream()
+                .collect(Collectors.toMap(ContentPlatformAccount::getChannel, account -> account));
+        List<ContentPlatformGzhAccount> gzhAccountList = getAllGzhAccount();
+        Map<Long, List<ContentPlatformGzhAccount>> gzhAccountMap = gzhAccountList.stream()
+                .collect(Collectors.groupingBy(ContentPlatformGzhAccount::getCreateAccountId));
+        List<String> accountExternalIds = gzhAccountList.stream().map(ContentPlatformGzhAccount::getExternalId)
+                .collect(Collectors.toList());
+        String dateStr = dt.substring(0, 4) + "-" + dt.substring(4, 6) + "-" + dt.substring(6, 8);
+        List<WxAccountDatastatVO> wxAccountDatastatVOList = aigcApiService.getWxAccountDatastat(dateStr, accountExternalIds);
+        Map<String, WxAccountDatastatVO> wxAccountDatastatMap = wxAccountDatastatVOList.stream()
+                .collect(Collectors.toMap(WxAccountDatastatVO::getAccountId, wxAccountDatastatVO -> wxAccountDatastatVO));
+        if (CollectionUtils.isNotEmpty(dataList)) {
+            List<ContentPlatformGzhPushDataStatTotal> saveList = new ArrayList<>();
+            for (Record record : dataList) {
+                ContentPlatformGzhPushDataStatTotal item = new ContentPlatformGzhPushDataStatTotal();
+                String channel = record.getString(0);
+                int firstLevelCount = Integer.parseInt((String) record.get(1));
+                Integer fissionCount = parseInteger(record.get(2));
+                Double arpu = parseDouble(record.get(3));
+                item.setDateStr(dt);
+                item.setChannel(channel);
+                item.setFirstLevelCount(firstLevelCount);
+                ContentPlatformAccount account = accountMap.get(channel);
+                if (Objects.isNull(account)) {
+                    continue;
+                }
+                List<ContentPlatformGzhAccount> gzhAccounts = gzhAccountMap.get(account.getId());
+                int fansIncreaseCount = 0;
+                if (CollectionUtils.isNotEmpty(gzhAccounts)) {
+                    for (ContentPlatformGzhAccount gzhAccount : gzhAccounts) {
+                        WxAccountDatastatVO wxAccountDatastatVO = wxAccountDatastatMap.get(gzhAccount.getExternalId());
+                        if (Objects.nonNull(wxAccountDatastatVO)) {
+                            fansIncreaseCount += wxAccountDatastatVO.getFansIncreaseCount();
+                        }
+                    }
+                }
+                item.setFansIncreaseCount(fansIncreaseCount);
+
+                if (fissionCount > 0 && firstLevelCount > 0) {
+                    BigDecimal fissionRate = BigDecimal.valueOf(fissionCount.doubleValue() / firstLevelCount);
+                    BigDecimal rounded = fissionRate.multiply(new BigDecimal(10)).setScale(2, RoundingMode.HALF_UP);
+                    item.setScore(rounded.doubleValue());
+                    BigDecimal unitPrice = getUnitPrice(account.getPrice(), fissionRate, arpu, BussinessTypeEnum.GZH_PUSH);
+                    if (Objects.nonNull(unitPrice)) {
+                        item.setUnitPrice(unitPrice.doubleValue());
+                        BigDecimal settlementAmount = unitPrice.multiply(new BigDecimal(firstLevelCount)).setScale(2, RoundingMode.HALF_UP);
+                        item.setSettlementAmount(settlementAmount.doubleValue());
+                    }
+                } else {
+                    item.setScore(0.0);
+                    item.setUnitPrice(0.1);
+                    item.setSettlementAmount(0.0);
+                }
+                item.setCreateTimestamp(now);
+                saveList.add(item);
+            }
+            if (CollectionUtils.isNotEmpty(saveList)) {
+                dataStatMapperExt.deleteGzhPushDatastatTotal(dt);
+                dataStatMapperExt.batchInsertGzhPushDatastatTotal(saveList);
+            }
+        }
+        return ReturnT.SUCCESS;
+    }
+
     private List<ContentPlatformAccount> getAllAccount() {
         ContentPlatformAccountExample example = new ContentPlatformAccountExample();
         example.createCriteria().andStatusEqualTo(1);

+ 233 - 0
api-module/src/main/java/com/tzld/piaoquan/api/job/wecom/thirdpart/WeComCreateRoomJob.java

@@ -0,0 +1,233 @@
+package com.tzld.piaoquan.api.job.wecom.thirdpart;
+
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
+import com.tzld.piaoquan.api.component.WeComThirdPartyApiClient;
+import com.tzld.piaoquan.api.controller.GetRoomUserListResponse;
+import com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ThirdPartWeComRoomMapper;
+import com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ext.ThirdPartWeComMapperExt;
+import com.tzld.piaoquan.api.model.param.wecom.thirdpart.*;
+import com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoom;
+import com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomUser;
+import com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaff;
+import com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffUser;
+import com.tzld.piaoquan.api.service.WeComThirdPartyService;
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.annotation.XxlJob;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+import java.util.*;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+
+@Slf4j
+@Component
+public class WeComCreateRoomJob {
+
+    @Autowired
+    WeComThirdPartyService weComThirdPartyService;
+    @Autowired
+    WeComThirdPartyApiClient apiClient;
+    @Autowired
+    WeComUserDetailJob userDetailJob;
+    @Autowired
+    ThirdPartWeComRoomMapper roomMapper;
+    @Autowired
+    ThirdPartWeComMapperExt thirdPartWeComMapperExt;
+
+    @Value("${create.room.send.msg.status.nums:20}")
+    private Integer sendMsgStatusNums;
+
+    @Value("${create.room.member.max.nums:40}")
+    private Integer memberMaxNums;
+
+    private final static ExecutorService pool = new ThreadPoolExecutor(5, 5, 0L, TimeUnit.SECONDS,
+            new LinkedBlockingQueue<>(1000),
+            new ThreadFactoryBuilder().setNameFormat("AutoCreateRoomJob-%d").build(),
+            new ThreadPoolExecutor.AbortPolicy());
+
+    @XxlJob("autoCreateRoom")
+    public ReturnT<String> autoCreateRoomJob(String param) {
+        List<ThirdPartWeComStaff> activeStaffList = weComThirdPartyService.getActiveStaffList();
+        for (ThirdPartWeComStaff staff : activeStaffList) {
+            if (staff.getAutoCreateRoom() != 1) {
+                continue;
+            }
+            pool.execute(() -> createStaffRoom(staff));
+        }
+        return ReturnT.SUCCESS;
+    }
+
+    private void createStaffRoom(ThirdPartWeComStaff staff) {
+        // 获取所有未加群客户
+        List<ThirdPartWeComStaffUser> staffUserList = thirdPartWeComMapperExt.getNoGroupStaffUserList(staff.getThirdStaffId());
+        if (CollectionUtils.isEmpty(staffUserList)) {
+            return;
+        }
+        // 已创建群添加群成员
+        List<ThirdPartWeComRoom> roomList = weComThirdPartyService.getStaffRoomList(staff.getId());
+        List<Integer> roomNums = roomList.stream()
+                .map(o -> {
+                    try {
+                        String roomName = o.getName();
+                        if (!roomName.contains("票圈快讯")) {
+                            return null;
+                        }
+                        return Integer.parseInt(roomName.replace("票圈快讯", ""));
+                    } catch (Exception e) {
+                        return null;
+                    }
+                })
+                .filter(Objects::nonNull)
+                .sorted(Comparator.comparing(Integer::intValue).reversed())
+                .collect(Collectors.toList());
+        Integer maxRoomNum = CollectionUtils.isNotEmpty(roomNums) ? roomNums.get(0) : 0;
+        for (ThirdPartWeComRoom room : roomList) {
+            if (room.getAddUserStatus() != 1) {
+                continue;
+            }
+            List<Long> vids = new ArrayList<>();
+            List<ThirdPartWeComStaffUser> addUserList = new ArrayList<>();
+            Iterator<ThirdPartWeComStaffUser> iterator = staffUserList.iterator();
+            int size = memberMaxNums - room.getMemberCount();
+            while (iterator.hasNext() && size > 0) {
+                ThirdPartWeComStaffUser item = iterator.next();
+                vids.add(item.getUserId());
+                size--;
+                iterator.remove();
+                addUserList.add(item);
+            }
+            addRoomUser(staff, room, vids);
+            // 群成员添加存储
+            saveRoomUser(room, addUserList);
+        }
+        // 未加群客户创建新群
+        if (CollectionUtils.isNotEmpty(staffUserList)) {
+            createNewRoom(staff, staffUserList, maxRoomNum);
+        }
+        userDetailJob.syncRoomList(staff.getThirdUuid(), staff);
+    }
+
+    private void addRoomUser(ThirdPartWeComStaff staff,
+                             ThirdPartWeComRoom room,
+                             List<Long> vids) {
+        if (room.getAddUserStatus() != 1 || room.getMemberCount() >= memberMaxNums) {
+            return;
+        }
+        InvitationToRoomRequest request = new InvitationToRoomRequest();
+        request.setUuid(staff.getThirdUuid());
+        request.setRoomid(Long.parseLong(room.getThirdRoomId()));
+        request.setVids(vids);
+        apiClient.invitationToRoom(request);
+    }
+
+    private void createNewRoom(ThirdPartWeComStaff staff,
+                               List<ThirdPartWeComStaffUser> staffUserList,
+                               Integer roomNum) {
+        Iterator<ThirdPartWeComStaffUser> iterator = staffUserList.iterator();
+        while (iterator.hasNext()) {
+            List<Long> vids = new ArrayList<>();
+            List<ThirdPartWeComStaffUser> addUserList = new ArrayList<>();
+            int size = staffUserList.size() > memberMaxNums ? memberMaxNums : staffUserList.size();
+            while (iterator.hasNext() && size > 0) {
+                ThirdPartWeComStaffUser item = iterator.next();
+                vids.add(item.getUserId());
+                size--;
+                iterator.remove();
+                addUserList.add(item);
+            }
+            // 群创建
+            CreateRoomWxRequest request = new CreateRoomWxRequest();
+            request.setUuid(staff.getThirdUuid());
+            request.setRoomName("票圈快讯" + (++roomNum));
+            request.setVids(vids);
+            CreateRoomWxResponse createRoomWxResponse = weComThirdPartyService.createRoom(request);
+            // 群管理设置 防骚扰
+            updateRoomManagement(staff, createRoomWxResponse);
+            // add room save
+            ThirdPartWeComRoom roomDetail = new ThirdPartWeComRoom();
+            roomDetail.setCorpId(staff.getCorpId());
+            roomDetail.setStaffId(staff.getId());
+            roomDetail.setThirdRoomId(createRoomWxResponse.getRoomid());
+            roomDetail.setThirdCreateUserId(createRoomWxResponse.getCreateid());
+            roomDetail.setName(createRoomWxResponse.getRoomname());
+            roomDetail.setCreateTime(new Date());
+            roomDetail.setUpdateTime(new Date());
+            roomMapper.insertSelective(roomDetail);
+            // 群成员添加存储
+            saveRoomUser(roomDetail, addUserList);
+            // 循环添加群成员
+            while (true) {
+                GetRoomUserListRequest roomUserListRequest = new GetRoomUserListRequest(staff.getThirdUuid(),
+                        Long.valueOf(createRoomWxResponse.getRoomid()));
+                List<GetRoomUserListResponse.Member> userList = weComThirdPartyService.getRoomUserList(roomUserListRequest);
+                roomDetail.setMemberCount(userList.size());
+                roomDetail.setAddUserStatus(userList.size() == memberMaxNums ? 0 : 1);
+                roomDetail.setSendStatus(userList.size() > sendMsgStatusNums ? 1 : 0);
+                roomMapper.updateByPrimaryKeySelective(roomDetail);
+                if (!iterator.hasNext() || userList.size() == memberMaxNums) {
+                    break;
+                }
+                vids = new ArrayList<>();
+                size = Math.min(staffUserList.size(), memberMaxNums - userList.size());
+                while (iterator.hasNext() && size > 0) {
+                    ThirdPartWeComStaffUser item = iterator.next();
+                    vids.add(item.getUserId());
+                    size--;
+                    iterator.remove();
+                }
+                addRoomUser(staff, roomDetail, vids);
+                // 群成员添加存储
+                saveRoomUser(roomDetail, addUserList);
+            }
+        }
+    }
+
+    private void updateRoomManagement(ThirdPartWeComStaff staff, CreateRoomWxResponse createRoomWxResponse) {
+        SetRoomManagementRequest setRoomManagementRequest = new SetRoomManagementRequest();
+        setRoomManagementRequest.setUuid(staff.getThirdUuid());
+        setRoomManagementRequest.setRoomid(Long.parseLong(createRoomWxResponse.getRoomid()));
+        setRoomManagementRequest.setNewFlag(69206023);
+        apiClient.setRoomManagement(setRoomManagementRequest);
+        // 查询防骚扰规则 并配置所有规则
+        QueryCRMAntiSpamRuleRequest antiSpamRuleRequest = new QueryCRMAntiSpamRuleRequest();
+        antiSpamRuleRequest.setUuid(staff.getThirdUuid());
+        List<AntiSpamRuleResponse.AntiSpamRule> antiSpamRuleList = weComThirdPartyService.queryCRMAntiSpamRule(antiSpamRuleRequest);
+        if (CollectionUtils.isNotEmpty(antiSpamRuleList)) {
+            // 设置防骚扰规则
+            SetRoomAntiRequest setRoomAntiRequest = new SetRoomAntiRequest();
+            setRoomAntiRequest.setUuid(staff.getThirdUuid());
+            setRoomAntiRequest.setRoomid(Long.parseLong(createRoomWxResponse.getRoomid()));
+            setRoomAntiRequest.setAntiIds(antiSpamRuleList.stream().map(AntiSpamRuleResponse.AntiSpamRule::getId).collect(Collectors.toList()));
+            apiClient.setRoomAnti(setRoomAntiRequest);
+        }
+        // todo 设置管理员
+        //apiClient.addRoomAdmins();
+    }
+
+    private void saveRoomUser(ThirdPartWeComRoom roomDetail,
+                              List<ThirdPartWeComStaffUser> addUserList) {
+        if (CollectionUtils.isEmpty(addUserList)) {
+            return;
+        }
+        List<ThirdPartWeComRoomUser> saveList = new ArrayList<>();
+        for (ThirdPartWeComStaffUser staffUser : addUserList) {
+            ThirdPartWeComRoomUser roomUser = new ThirdPartWeComRoomUser();
+            roomUser.setThirdRoomId(roomDetail.getThirdRoomId());
+            roomUser.setCreateTime(new Date());
+            roomUser.setUpdateTime(new Date());
+            roomUser.setUin(staffUser.getUserId());
+            saveList.add(roomUser);
+        }
+        if (CollectionUtils.isNotEmpty(saveList)) {
+            thirdPartWeComMapperExt.batchInsertThirdPartWeComRoomUser(saveList);
+        }
+    }
+
+}

+ 2 - 10
api-module/src/main/java/com/tzld/piaoquan/api/job/wecom/thirdpart/WeComSendMsgJob.java

@@ -1,7 +1,6 @@
 package com.tzld.piaoquan.api.job.wecom.thirdpart;
 
 import com.alibaba.fastjson.JSONObject;
-import com.ctrip.framework.apollo.spring.annotation.ApolloJsonValue;
 import com.google.common.util.concurrent.ThreadFactoryBuilder;
 import com.tzld.piaoquan.api.dao.mapper.contentplatform.ext.ContentPlatformPlanMapperExt;
 import com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ThirdPartWeComMsgMapper;
@@ -47,9 +46,6 @@ public class WeComSendMsgJob {
     @Autowired
     ThirdPartWeComMsgMapper thirdPartWeComMsgMapper;
 
-    @ApolloJsonValue("${wecom.thirdpart.send.msg.config:{}}")
-    private JSONObject sendMsgConfig;
-
     @Value("${send.room.msg.video.min.score:3}")
     private Double videoMinScore;
     @Value("${send.room.msg.duplicate.days:7}")
@@ -67,17 +63,13 @@ public class WeComSendMsgJob {
         List<ThirdPartWeComStaff> activeStaffList = weComThirdPartyService.getActiveStaffList();
         String time = DateUtil.getCurrentDateStr("HH:mm");
         for (ThirdPartWeComStaff staff : activeStaffList) {
-            if (!sendMsgConfig.containsKey(staff.getName())) {
-                continue;
-            }
             List<ThirdPartWeComRoom> roomList = weComThirdPartyService.getStaffRoomList(staff.getId());
-            JSONObject roomConfig = sendMsgConfig.getJSONObject(staff.getName());
             for (ThirdPartWeComRoom room : roomList) {
-                if (!roomConfig.containsKey(room.getName())) {
+                if (room.getSendStatus() != 1) {
                     continue;
                 }
                 pool.execute(() -> {
-                    List<String> timeList = roomConfig.getJSONArray(room.getName()).toJavaList(String.class);
+                    List<String> timeList = JSONObject.parseArray(room.getSendTime()).toJavaList(String.class);
                     if (timeList.contains(time)) {
                         // 选取视频
                         List<CgiReplyBucketData> cgiReplyBucketDataList = getCgiReplyBucketData(room.getThirdRoomId(), staff);

+ 238 - 33
api-module/src/main/java/com/tzld/piaoquan/api/job/wecom/thirdpart/WeComUserDetailJob.java

@@ -2,24 +2,31 @@ package com.tzld.piaoquan.api.job.wecom.thirdpart;
 
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.TypeReference;
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
 import com.tzld.piaoquan.api.component.WeComThirdPartyApiClient;
+import com.tzld.piaoquan.api.controller.GetRoomUserListResponse;
 import com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ThirdPartWeComRoomMapper;
+import com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ThirdPartWeComRoomUserMapper;
 import com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ThirdPartWeComStaffMapper;
+import com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ThirdPartWeComStaffUserMapper;
+import com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ext.ThirdPartWeComMapperExt;
 import com.tzld.piaoquan.api.model.param.wecom.thirdpart.*;
-import com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoom;
-import com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaff;
+import com.tzld.piaoquan.api.model.po.wecom.thirdpart.*;
 import com.tzld.piaoquan.api.service.WeComThirdPartyService;
 import com.tzld.piaoquan.growth.common.utils.RedisUtils;
 import com.xxl.job.core.biz.model.ReturnT;
 import com.xxl.job.core.handler.annotation.XxlJob;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Component;
 
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
+import java.util.*;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
 import java.util.stream.Collectors;
 
 @Slf4j
@@ -27,48 +34,156 @@ import java.util.stream.Collectors;
 public class WeComUserDetailJob {
 
     @Autowired
-    WeComThirdPartyService weComThirdPartyService;
+    WeComThirdPartyService thirdPartyService;
     @Autowired
-    ThirdPartWeComStaffMapper weComStaffMapper;
+    WeComThirdPartyApiClient apiClient;
     @Autowired
-    ThirdPartWeComRoomMapper weComRoomMapper;
+    ThirdPartWeComStaffMapper staffMapper;
     @Autowired
-    WeComThirdPartyApiClient apiClient;
+    ThirdPartWeComRoomMapper roomMapper;
+    @Autowired
+    ThirdPartWeComStaffUserMapper staffUserMapper;
+    @Autowired
+    ThirdPartWeComRoomUserMapper roomUserMapper;
+    @Autowired
+    ThirdPartWeComMapperExt thirdPartWeComMapperExt;
 
     @Autowired
     private RedisUtils redisUtils;
 
+    @Value("${create.room.send.msg.status.nums:20}")
+    private Integer sendMsgStatusNums;
+
+    @Value("${create.room.member.max.nums:40}")
+    private Integer memberMaxNums;
+
+    private final static ExecutorService pool = new ThreadPoolExecutor(5, 5, 0L, TimeUnit.SECONDS,
+            new LinkedBlockingQueue<>(1000),
+            new ThreadFactoryBuilder().setNameFormat("SyncUserDetailJob-%d").build(),
+            new ThreadPoolExecutor.AbortPolicy());
+
     @XxlJob("syncUserDetail")
     public ReturnT<String> syncUserDetail(String param) {
-        List<ThirdPartWeComStaff> activeStaffList = weComThirdPartyService.getActiveStaffList();
+        List<ThirdPartWeComStaff> activeStaffList = thirdPartyService.getActiveStaffList();
         for (ThirdPartWeComStaff staff : activeStaffList) {
-            String uuid = staff.getThirdUuid();
-            String offLineKey = "wecom:thirdpart:offline:" + uuid;
-            if (redisUtils.containsKey(offLineKey)) {
-                continue;
-            }
-            String response = apiClient.getRunClientByUuid(new UuidRequest(uuid));
-            CommonResponse<LoginInfo> commonResponse =
-                    JSONObject.parseObject(response, new TypeReference<CommonResponse<LoginInfo>>() {});
-            if (commonResponse.getErrcode() != 0) {
-                continue;
+            pool.execute(() -> {
+                String uuid = staff.getThirdUuid();
+                String offLineKey = "wecom:thirdpart:offline:" + uuid;
+                if (redisUtils.containsKey(offLineKey)) {
+                    return;
+                }
+                String response = apiClient.getRunClientByUuid(new UuidRequest(uuid));
+                CommonResponse<LoginInfo> commonResponse =
+                        JSONObject.parseObject(response, new TypeReference<CommonResponse<LoginInfo>>() {});
+                if (commonResponse.getErrcode() != 0) {
+                    return;
+                } else {
+                    LoginInfo loginInfo = commonResponse.getData();
+                    staff.setAvatar(loginInfo.getUser_info().getObject().getAvatar());
+                    staff.setName(loginInfo.getUser_info().getObject().getNickname());
+                    staff.setUpdateTime(new Date());
+                    staffMapper.updateByPrimaryKeySelective(staff);
+                }
+                syncRoomList(uuid, staff);
+                syncStaffUserList(uuid, staff);
+            });
+        }
+        return ReturnT.SUCCESS;
+    }
+
+    private void syncStaffUserList(String uuid, ThirdPartWeComStaff staff) {
+        List<ExternalContactsResponse.ContactItem> contactItemList = thirdPartyService.getExternalContacts(
+                new GetExternalContactsRequest(uuid, 100, 0));
+        if (CollectionUtils.isEmpty(contactItemList)) {
+            return;
+        }
+        Long thirdStaffId = staff.getThirdStaffId();
+        List<ThirdPartWeComStaffUser> existUserList = getThirdPartWeComStaffUserListByStaffId(thirdStaffId);
+        List<Long> existUserIdList = existUserList.stream().map(ThirdPartWeComStaffUser::getUserId).collect(Collectors.toList());
+        Map<Long, ThirdPartWeComStaffUser> existUserMap = existUserList.stream()
+                .collect(Collectors.toMap(ThirdPartWeComStaffUser::getUserId, user -> user));
+        List<ThirdPartWeComStaffUser> saveList = new ArrayList<>();
+        for (ExternalContactsResponse.ContactItem contactItem : contactItemList) {
+            if (existUserIdList.contains(contactItem.getUser_id())) {
+                ThirdPartWeComStaffUser existUser = existUserMap.get(contactItem.getUser_id());
+                existUser.setUpdateTime(new Date());
+
+                existUser.setUnionid(contactItem.getUnionid());
+                existUser.setSex(contactItem.getSex());
+                existUser.setMobile(contactItem.getMobile());
+                existUser.setCompanyRemark(contactItem.getCompany_remark());
+                existUser.setAcctid(contactItem.getAcctid());
+                existUser.setAvatar(contactItem.getAvatar());
+                existUser.setSource(contactItem.getSource());
+                existUser.setEnglishName(contactItem.getEnglish_name());
+                //existUser.setRemarkPhone(contactItem.getRemark_phone());
+                existUser.setRealname(contactItem.getRealname());
+                existUser.setRealRemarks(contactItem.getReal_remarks());
+                //existUser.setLabelid(contactItem.getLabelid());
+                existUser.setUserId(contactItem.getUser_id());
+                existUser.setNickname(contactItem.getNickname());
+                existUser.setPosition(contactItem.getPosition());
+                existUser.setCorpId(contactItem.getCorp_id());
+                existUser.setSeq(contactItem.getSeq());
+                existUser.setStatus(contactItem.getStatus());
+
+                staffUserMapper.updateByPrimaryKeySelective(existUser);
             } else {
-                LoginInfo loginInfo = commonResponse.getData();
-                staff.setAvatar(loginInfo.getUser_info().getObject().getAvatar());
-                staff.setName(loginInfo.getUser_info().getObject().getNickname());
-                staff.setUpdateTime(new Date());
-                weComStaffMapper.updateByPrimaryKeySelective(staff);
+                ThirdPartWeComStaffUser staffUser = new ThirdPartWeComStaffUser();
+                staffUser.setThirdStaffId(thirdStaffId);
+                staffUser.setCreateTime(new Date());
+                staffUser.setUpdateTime(new Date());
+
+                // 从ContactItem对象复制所有字段值
+                staffUser.setUnionid(contactItem.getUnionid());
+                staffUser.setSex(contactItem.getSex());
+                staffUser.setMobile(contactItem.getMobile());
+                staffUser.setCompanyRemark(contactItem.getCompany_remark());
+                staffUser.setAcctid(contactItem.getAcctid());
+                staffUser.setAvatar(contactItem.getAvatar());
+                staffUser.setSource(contactItem.getSource());
+                staffUser.setEnglishName(contactItem.getEnglish_name());
+                //staffUser.setRemarkPhone(contactItem.getRemark_phone());
+                staffUser.setRealname(contactItem.getRealname());
+                staffUser.setRealRemarks(contactItem.getReal_remarks());
+                //staffUser.setLabelid(contactItem.getLabelid());
+                staffUser.setUserId(contactItem.getUser_id());
+                staffUser.setNickname(contactItem.getNickname());
+                staffUser.setPosition(contactItem.getPosition());
+                staffUser.setCorpId(contactItem.getCorp_id());
+                staffUser.setSeq(contactItem.getSeq());
+                staffUser.setStatus(contactItem.getStatus());
+
+                saveList.add(staffUser);
             }
-            syncRoomList(uuid, staff);
+        }
+        if (CollectionUtils.isNotEmpty(saveList)) {
+            thirdPartWeComMapperExt.batchInsertThirdPartWeComStaffUser(saveList);
+        }
+    }
+
+    private List<ThirdPartWeComStaffUser> getThirdPartWeComStaffUserListByStaffId(Long thirdStaffId) {
+        ThirdPartWeComStaffUserExample example = new ThirdPartWeComStaffUserExample();
+        example.createCriteria().andThirdStaffIdEqualTo(thirdStaffId);
+        return staffUserMapper.selectByExample(example);
+    }
+
+
+    @XxlJob("syncRoomDetail")
+    public ReturnT<String> syncRoomDetail(String param) {
+        List<ThirdPartWeComStaff> activeStaffList = thirdPartyService.getActiveStaffList();
+        for (ThirdPartWeComStaff staff : activeStaffList) {
+            pool.execute(() -> syncRoomList(staff.getThirdUuid(), staff));
         }
         return ReturnT.SUCCESS;
     }
 
-    private void syncRoomList(String uuid, ThirdPartWeComStaff staff) {
+    public void syncRoomList(String uuid, ThirdPartWeComStaff staff) {
         List<GetChatroomMembersResponse.RoomInfo> roomInfoList =
-                weComThirdPartyService.getChatroomMembers(new GetChatroomMembersRequest(uuid, 100, 0));
-        List<ThirdPartWeComRoom> roomList = weComThirdPartyService.getStaffRoomList(staff.getId());
-        Map<String, ThirdPartWeComRoom> roomMap = roomList.stream().collect(Collectors.toMap(ThirdPartWeComRoom::getThirdRoomId, room -> room));
+                thirdPartyService.getChatroomMembers(new GetChatroomMembersRequest(uuid, 100, 0));
+        List<ThirdPartWeComRoom> roomList = thirdPartyService.getStaffRoomList(staff.getId());
+        Map<String, ThirdPartWeComRoom> roomMap = roomList.stream()
+                .collect(Collectors.toMap(ThirdPartWeComRoom::getThirdRoomId, room -> room));
         for (GetChatroomMembersResponse.RoomInfo roomInfo : roomInfoList) {
             String roomId = roomInfo.getRoom_id();
             ThirdPartWeComRoom roomDetail = roomMap.get(roomId);
@@ -81,9 +196,11 @@ public class WeComUserDetailJob {
                 roomDetail.setThirdCreateUserId(roomInfo.getCreate_user_id());
                 roomDetail.setMemberCount(roomInfo.getTotal());
                 roomDetail.setName(roomInfo.getNickname());
+                roomDetail.setAddUserStatus(0);
+                roomDetail.setSendStatus(1);
                 roomDetail.setCreateTime(new Date());
                 roomDetail.setUpdateTime(new Date());
-                weComRoomMapper.insertSelective(roomDetail);
+                roomMapper.insertSelective(roomDetail);
             } else {
                 roomDetail.setRoomUrl(roomInfo.getRoomurl());
                 roomDetail.setThirdRoomId(roomInfo.getRoom_id());
@@ -91,8 +208,96 @@ public class WeComUserDetailJob {
                 roomDetail.setMemberCount(roomInfo.getTotal());
                 roomDetail.setName(roomInfo.getNickname());
                 roomDetail.setUpdateTime(new Date());
-                weComRoomMapper.updateByPrimaryKeySelective(roomDetail);
+                if (staff.getAutoCreateRoom() == 1) {
+                    if (roomDetail.getMemberCount() >= memberMaxNums){
+                        roomDetail.setAddUserStatus(0);
+                    }
+                    if (roomDetail.getMemberCount() >= sendMsgStatusNums) {
+                        roomDetail.setSendStatus(1);
+                    }
+                }
+                roomMapper.updateByPrimaryKeySelective(roomDetail);
+            }
+            syncRoomUserList(uuid, roomDetail.getThirdRoomId());
+        }
+        List<String> roomIds = roomInfoList.stream().map(GetChatroomMembersResponse.RoomInfo::getRoom_id).collect(Collectors.toList());
+        roomList.removeIf(room -> roomIds.contains(room.getThirdRoomId()));
+        if (CollectionUtils.isNotEmpty(roomList)) {
+            roomList.forEach(room -> {
+                room.setIsDelete(1);
+                room.setUpdateTime(new Date());
+                roomMapper.updateByPrimaryKeySelective(room);
+            });
+        }
+    }
+
+    public void syncRoomUserList(String uuid, String thirdRoomId) {
+        GetRoomUserListRequest request = new GetRoomUserListRequest(uuid, Long.valueOf(thirdRoomId));
+        List<GetRoomUserListResponse.Member> userList = thirdPartyService.getRoomUserList(request);
+        List<ThirdPartWeComRoomUser> existUserList = getThirdPartWeComRoomUserListByRoomId(thirdRoomId);
+        List<Long> existUserIdList = existUserList.stream().map(ThirdPartWeComRoomUser::getUin).collect(Collectors.toList());
+        Map<Long, ThirdPartWeComRoomUser> existUserMap = existUserList.stream()
+                .collect(Collectors.toMap(ThirdPartWeComRoomUser::getUin, roomUser -> roomUser));
+
+        List<ThirdPartWeComRoomUser> saveList = new ArrayList<>();
+        for (GetRoomUserListResponse.Member user : userList) {
+            if (existUserIdList.contains(user.getUin())) {
+                ThirdPartWeComRoomUser existUser = existUserMap.get(user.getUin());
+                existUser.setUpdateTime(new Date());
+
+                existUser.setUnionid(user.getUnionid());
+                existUser.setSex(user.getSex());
+                existUser.setMobile(user.getMobile());
+                existUser.setAcctid(user.getAcctid());
+                existUser.setJoinScene(user.getJoin_scene());
+                existUser.setAvatar(user.getAvatar());
+                existUser.setEnglishName(user.getEnglish_name());
+                existUser.setRealname(user.getRealname());
+                existUser.setRoomNotes(user.getRoom_notes());
+                existUser.setJoinTime(user.getJointime());
+                existUser.setNickname(user.getNickname());
+                existUser.setRoomNickname(user.getRoom_nickname());
+                existUser.setPosition(user.getPosition());
+                existUser.setUin(user.getUin());
+                existUser.setInviteUserId(user.getInvite_user_id());
+                existUser.setCorpId(user.getCorp_id());
+
+                roomUserMapper.updateByPrimaryKeySelective(existUser);
+            } else {
+                ThirdPartWeComRoomUser roomUser = new ThirdPartWeComRoomUser();
+                roomUser.setThirdRoomId(thirdRoomId);
+                roomUser.setCreateTime(new Date());
+                roomUser.setUpdateTime(new Date());
+
+                // 从Member对象复制所有字段值
+                roomUser.setUnionid(user.getUnionid());
+                roomUser.setSex(user.getSex());
+                roomUser.setMobile(user.getMobile());
+                roomUser.setAcctid(user.getAcctid());
+                roomUser.setJoinScene(user.getJoin_scene());
+                roomUser.setAvatar(user.getAvatar());
+                roomUser.setEnglishName(user.getEnglish_name());
+                roomUser.setRealname(user.getRealname());
+                roomUser.setRoomNotes(user.getRoom_notes());
+                roomUser.setJoinTime(user.getJointime());
+                roomUser.setNickname(user.getNickname());
+                roomUser.setRoomNickname(user.getRoom_nickname());
+                roomUser.setPosition(user.getPosition());
+                roomUser.setUin(user.getUin());
+                roomUser.setInviteUserId(user.getInvite_user_id());
+                roomUser.setCorpId(user.getCorp_id());
+
+                saveList.add(roomUser);
             }
         }
+        if (CollectionUtils.isNotEmpty(saveList)) {
+            thirdPartWeComMapperExt.batchInsertThirdPartWeComRoomUser(saveList);
+        }
+    }
+
+    private List<ThirdPartWeComRoomUser> getThirdPartWeComRoomUserListByRoomId(String thirdRoomId) {
+        ThirdPartWeComRoomUserExample example = new ThirdPartWeComRoomUserExample();
+        example.createCriteria().andThirdRoomIdEqualTo(thirdRoomId);
+        return roomUserMapper.selectByExample(example);
     }
 }

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

@@ -1,5 +1,6 @@
 package com.tzld.piaoquan.api.model.bo;
 
+import com.tzld.piaoquan.api.model.po.GhDetailExt;
 import lombok.Data;
 
 import java.util.List;
@@ -25,6 +26,8 @@ public class BucketDataParam {
 
     private List<Long> videos;
 
+    private List<MiniPageData> miniPageDatas;
+
     private String rate;
 
     private String contentDetail;

+ 15 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/bo/MiniPageData.java

@@ -0,0 +1,15 @@
+package com.tzld.piaoquan.api.model.bo;
+
+import lombok.Data;
+import lombok.ToString;
+
+@Data
+@ToString
+public class MiniPageData {
+
+    private String page;
+
+    private String title;
+
+    private String cover;
+}

+ 1 - 1
api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/GzhDatastatListParam.java

@@ -7,7 +7,7 @@ import lombok.Data;
 @Data
 public class GzhDatastatListParam extends PageParam {
 
-    @ApiModelProperty(value = "0-自动回复总计 1-自动回复分账号 2-服务号总计 3-服务号分账号 4-自动回复分账号分视频")
+    @ApiModelProperty(value = "0-自动回复总计 1-自动回复分账号 2-服务号总计 3-服务号分账号 4-自动回复分账号分视频 5-公众号推送总计 6-公众号推送分账号")
     private Integer type;
 
     @ApiModelProperty(value = "公众号id")

+ 1 - 1
api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/GzhPlanListParam.java

@@ -13,7 +13,7 @@ public class GzhPlanListParam extends PageParam {
     @ApiModelProperty(value = "标题")
     private String title;
 
-    @ApiModelProperty(value = "发布计划类型 0-自动回复、1-服务号推送")
+    @ApiModelProperty(value = "发布计划类型 0-自动回复、1-服务号推送、2-公众号推送")
     private Integer type;
 
     @ApiModelProperty(value = "发布方:0-平台发布 1-用户发布")

+ 1 - 1
api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/GzhPlanSaveParam.java

@@ -14,7 +14,7 @@ public class GzhPlanSaveParam {
     @ApiModelProperty(value = "公众号id")
     private Long accountId;
 
-    @ApiModelProperty(value = "发布计划类型 0-自动回复、1-服务号推送")
+    @ApiModelProperty(value = "发布计划类型 0-自动回复、1-服务号推送、2-公众号推送")
     private Integer type;
 
     @ApiModelProperty(value = "发布场景 0-关注回复")

+ 1 - 1
api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/VideoContentListParam.java

@@ -13,7 +13,7 @@ public class VideoContentListParam extends PageParam {
     @ApiModelProperty(value = "品类")
     private String category;
 
-    @ApiModelProperty(value = "排序 0-自动回复、1-服务号推送、2-企微-社群、3-企微-自动回复")
+    @ApiModelProperty(value = "排序 0-自动回复、1-服务号推送、2-企微-社群、3-企微-自动回复、4-公众号推送")
     private Integer type = 999;
 
     @ApiModelProperty(value = "排序 0-平台推荐 1-行业裂变率 2-本渠道裂变率")

+ 23 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/param/wecom/thirdpart/AntiSpamRuleResponse.java

@@ -0,0 +1,23 @@
+package com.tzld.piaoquan.api.model.param.wecom.thirdpart;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class AntiSpamRuleResponse {
+    private String last_index_infoo;
+    private Long last_time;
+    private Boolean is_end;
+    private List<AntiSpamRule> list;
+
+    @Data
+    public static class AntiSpamRule {
+        private Long creator;
+        private Long update_ts;
+        private Long create_ts;
+        private String name;
+        private Long id;
+        private Integer type;
+    }
+}

+ 11 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/param/wecom/thirdpart/CreateRoomWxResponse.java

@@ -0,0 +1,11 @@
+package com.tzld.piaoquan.api.model.param.wecom.thirdpart;
+
+import lombok.Data;
+
+@Data
+public class CreateRoomWxResponse {
+    private String roomname;
+    private Long createTime;
+    private Long createid;
+    private String roomid;
+}

+ 10 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/param/wecom/thirdpart/DisableRenameChatroomRequest.java

@@ -0,0 +1,10 @@
+package com.tzld.piaoquan.api.model.param.wecom.thirdpart;
+
+import lombok.Data;
+
+@Data
+public class DisableRenameChatroomRequest {
+    private String uuid;
+    private Long roomid;
+    private boolean status;
+}

+ 4 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/param/wecom/thirdpart/GetExternalContactsRequest.java

@@ -1,8 +1,12 @@
 package com.tzld.piaoquan.api.model.param.wecom.thirdpart;
 
+import lombok.AllArgsConstructor;
 import lombok.Data;
+import lombok.NoArgsConstructor;
 
 @Data
+@AllArgsConstructor
+@NoArgsConstructor
 public class GetExternalContactsRequest {
     private String uuid;
     private Integer limit;

+ 5 - 1
api-module/src/main/java/com/tzld/piaoquan/api/model/param/wecom/thirdpart/GetRoomUserListRequest.java

@@ -1,11 +1,15 @@
 package com.tzld.piaoquan.api.model.param.wecom.thirdpart;
 
+import lombok.AllArgsConstructor;
 import lombok.Data;
+import lombok.NoArgsConstructor;
 
 @Data
+@AllArgsConstructor
+@NoArgsConstructor
 public class GetRoomUserListRequest {
 
     private String uuid;
-    private long roomid;
+    private Long roomid;
 
 }

+ 9 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/param/wecom/thirdpart/QueryCRMAntiSpamRuleRequest.java

@@ -0,0 +1,9 @@
+package com.tzld.piaoquan.api.model.param.wecom.thirdpart;
+
+import lombok.Data;
+
+@Data
+public class QueryCRMAntiSpamRuleRequest {
+    private String uuid;
+    private String lastIndexInfo;
+}

+ 11 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/param/wecom/thirdpart/SetRoomAntiRequest.java

@@ -0,0 +1,11 @@
+package com.tzld.piaoquan.api.model.param.wecom.thirdpart;
+
+import lombok.Data;
+import java.util.List;
+
+@Data
+public class SetRoomAntiRequest {
+    private String uuid;
+    private Long roomid;
+    private List<Long> antiIds;
+}

+ 14 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/param/wecom/thirdpart/UpdateRoomSendStatusRequest.java

@@ -0,0 +1,14 @@
+package com.tzld.piaoquan.api.model.param.wecom.thirdpart;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class UpdateRoomSendStatusRequest {
+    private String staffName;
+    private String roomName;
+    // 发送状态 0-关闭 1-开启
+    private Integer sendStatus;
+    private List<String> sendTimeList;
+}

+ 114 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/GhDetailExt.java

@@ -0,0 +1,114 @@
+package com.tzld.piaoquan.api.model.po;
+
+import java.util.Date;
+
+public class GhDetailExt {
+    private Long id;
+
+    private Long ghDetailId;
+
+    private String page;
+
+    private String title;
+
+    private String cover;
+
+    private Integer sort;
+
+    private Integer isDelete;
+
+    private Date createTime;
+
+    private Date updateTime;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getGhDetailId() {
+        return ghDetailId;
+    }
+
+    public void setGhDetailId(Long ghDetailId) {
+        this.ghDetailId = ghDetailId;
+    }
+
+    public String getPage() {
+        return page;
+    }
+
+    public void setPage(String page) {
+        this.page = page;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getCover() {
+        return cover;
+    }
+
+    public void setCover(String cover) {
+        this.cover = cover;
+    }
+
+    public Integer getSort() {
+        return sort;
+    }
+
+    public void setSort(Integer sort) {
+        this.sort = sort;
+    }
+
+    public Integer getIsDelete() {
+        return isDelete;
+    }
+
+    public void setIsDelete(Integer isDelete) {
+        this.isDelete = isDelete;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", ghDetailId=").append(ghDetailId);
+        sb.append(", page=").append(page);
+        sb.append(", title=").append(title);
+        sb.append(", cover=").append(cover);
+        sb.append(", sort=").append(sort);
+        sb.append(", isDelete=").append(isDelete);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 782 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/GhDetailExtExample.java

@@ -0,0 +1,782 @@
+package com.tzld.piaoquan.api.model.po;
+
+import com.tzld.piaoquan.growth.common.utils.page.Page;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class GhDetailExtExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    protected Page page;
+
+    public GhDetailExtExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    public void setPage(Page page) {
+        this.page=page;
+    }
+
+    public Page getPage() {
+        return page;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhDetailIdIsNull() {
+            addCriterion("gh_detail_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhDetailIdIsNotNull() {
+            addCriterion("gh_detail_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhDetailIdEqualTo(Long value) {
+            addCriterion("gh_detail_id =", value, "ghDetailId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhDetailIdNotEqualTo(Long value) {
+            addCriterion("gh_detail_id <>", value, "ghDetailId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhDetailIdGreaterThan(Long value) {
+            addCriterion("gh_detail_id >", value, "ghDetailId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhDetailIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("gh_detail_id >=", value, "ghDetailId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhDetailIdLessThan(Long value) {
+            addCriterion("gh_detail_id <", value, "ghDetailId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhDetailIdLessThanOrEqualTo(Long value) {
+            addCriterion("gh_detail_id <=", value, "ghDetailId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhDetailIdIn(List<Long> values) {
+            addCriterion("gh_detail_id in", values, "ghDetailId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhDetailIdNotIn(List<Long> values) {
+            addCriterion("gh_detail_id not in", values, "ghDetailId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhDetailIdBetween(Long value1, Long value2) {
+            addCriterion("gh_detail_id between", value1, value2, "ghDetailId");
+            return (Criteria) this;
+        }
+
+        public Criteria andGhDetailIdNotBetween(Long value1, Long value2) {
+            addCriterion("gh_detail_id not between", value1, value2, "ghDetailId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPageIsNull() {
+            addCriterion("page is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPageIsNotNull() {
+            addCriterion("page is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPageEqualTo(String value) {
+            addCriterion("page =", value, "page");
+            return (Criteria) this;
+        }
+
+        public Criteria andPageNotEqualTo(String value) {
+            addCriterion("page <>", value, "page");
+            return (Criteria) this;
+        }
+
+        public Criteria andPageGreaterThan(String value) {
+            addCriterion("page >", value, "page");
+            return (Criteria) this;
+        }
+
+        public Criteria andPageGreaterThanOrEqualTo(String value) {
+            addCriterion("page >=", value, "page");
+            return (Criteria) this;
+        }
+
+        public Criteria andPageLessThan(String value) {
+            addCriterion("page <", value, "page");
+            return (Criteria) this;
+        }
+
+        public Criteria andPageLessThanOrEqualTo(String value) {
+            addCriterion("page <=", value, "page");
+            return (Criteria) this;
+        }
+
+        public Criteria andPageLike(String value) {
+            addCriterion("page like", value, "page");
+            return (Criteria) this;
+        }
+
+        public Criteria andPageNotLike(String value) {
+            addCriterion("page not like", value, "page");
+            return (Criteria) this;
+        }
+
+        public Criteria andPageIn(List<String> values) {
+            addCriterion("page in", values, "page");
+            return (Criteria) this;
+        }
+
+        public Criteria andPageNotIn(List<String> values) {
+            addCriterion("page not in", values, "page");
+            return (Criteria) this;
+        }
+
+        public Criteria andPageBetween(String value1, String value2) {
+            addCriterion("page between", value1, value2, "page");
+            return (Criteria) this;
+        }
+
+        public Criteria andPageNotBetween(String value1, String value2) {
+            addCriterion("page not between", value1, value2, "page");
+            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 andCoverIsNull() {
+            addCriterion("cover is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverIsNotNull() {
+            addCriterion("cover is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverEqualTo(String value) {
+            addCriterion("cover =", value, "cover");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverNotEqualTo(String value) {
+            addCriterion("cover <>", value, "cover");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverGreaterThan(String value) {
+            addCriterion("cover >", value, "cover");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverGreaterThanOrEqualTo(String value) {
+            addCriterion("cover >=", value, "cover");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverLessThan(String value) {
+            addCriterion("cover <", value, "cover");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverLessThanOrEqualTo(String value) {
+            addCriterion("cover <=", value, "cover");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverLike(String value) {
+            addCriterion("cover like", value, "cover");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverNotLike(String value) {
+            addCriterion("cover not like", value, "cover");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverIn(List<String> values) {
+            addCriterion("cover in", values, "cover");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverNotIn(List<String> values) {
+            addCriterion("cover not in", values, "cover");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverBetween(String value1, String value2) {
+            addCriterion("cover between", value1, value2, "cover");
+            return (Criteria) this;
+        }
+
+        public Criteria andCoverNotBetween(String value1, String value2) {
+            addCriterion("cover not between", value1, value2, "cover");
+            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 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);
+        }
+    }
+}

+ 90 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformGzhPushDataStat.java

@@ -0,0 +1,90 @@
+package com.tzld.piaoquan.api.model.po.contentplatform;
+
+public class ContentPlatformGzhPushDataStat {
+    private Long id;
+
+    private String dateStr;
+
+    private Long accountId;
+
+    private Integer fansIncreaseCount;
+
+    private Integer firstLevelCount;
+
+    private Double score;
+
+    private Long createTimestamp;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getDateStr() {
+        return dateStr;
+    }
+
+    public void setDateStr(String dateStr) {
+        this.dateStr = dateStr;
+    }
+
+    public Long getAccountId() {
+        return accountId;
+    }
+
+    public void setAccountId(Long accountId) {
+        this.accountId = accountId;
+    }
+
+    public Integer getFansIncreaseCount() {
+        return fansIncreaseCount;
+    }
+
+    public void setFansIncreaseCount(Integer fansIncreaseCount) {
+        this.fansIncreaseCount = fansIncreaseCount;
+    }
+
+    public Integer getFirstLevelCount() {
+        return firstLevelCount;
+    }
+
+    public void setFirstLevelCount(Integer firstLevelCount) {
+        this.firstLevelCount = firstLevelCount;
+    }
+
+    public Double getScore() {
+        return score;
+    }
+
+    public void setScore(Double score) {
+        this.score = score;
+    }
+
+    public Long getCreateTimestamp() {
+        return createTimestamp;
+    }
+
+    public void setCreateTimestamp(Long createTimestamp) {
+        this.createTimestamp = createTimestamp;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", dateStr=").append(dateStr);
+        sb.append(", accountId=").append(accountId);
+        sb.append(", fansIncreaseCount=").append(fansIncreaseCount);
+        sb.append(", firstLevelCount=").append(firstLevelCount);
+        sb.append(", score=").append(score);
+        sb.append(", createTimestamp=").append(createTimestamp);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 641 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformGzhPushDataStatExample.java

@@ -0,0 +1,641 @@
+package com.tzld.piaoquan.api.model.po.contentplatform;
+
+import com.tzld.piaoquan.growth.common.utils.page.Page;
+import java.util.ArrayList;
+import java.util.List;
+
+public class ContentPlatformGzhPushDataStatExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    protected Page page;
+
+    public ContentPlatformGzhPushDataStatExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    public void setPage(Page page) {
+        this.page=page;
+    }
+
+    public Page getPage() {
+        return page;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrIsNull() {
+            addCriterion("date_str is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrIsNotNull() {
+            addCriterion("date_str is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrEqualTo(String value) {
+            addCriterion("date_str =", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrNotEqualTo(String value) {
+            addCriterion("date_str <>", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrGreaterThan(String value) {
+            addCriterion("date_str >", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrGreaterThanOrEqualTo(String value) {
+            addCriterion("date_str >=", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrLessThan(String value) {
+            addCriterion("date_str <", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrLessThanOrEqualTo(String value) {
+            addCriterion("date_str <=", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrLike(String value) {
+            addCriterion("date_str like", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrNotLike(String value) {
+            addCriterion("date_str not like", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrIn(List<String> values) {
+            addCriterion("date_str in", values, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrNotIn(List<String> values) {
+            addCriterion("date_str not in", values, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrBetween(String value1, String value2) {
+            addCriterion("date_str between", value1, value2, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrNotBetween(String value1, String value2) {
+            addCriterion("date_str not between", value1, value2, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdIsNull() {
+            addCriterion("account_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdIsNotNull() {
+            addCriterion("account_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdEqualTo(Long value) {
+            addCriterion("account_id =", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdNotEqualTo(Long value) {
+            addCriterion("account_id <>", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdGreaterThan(Long value) {
+            addCriterion("account_id >", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("account_id >=", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdLessThan(Long value) {
+            addCriterion("account_id <", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdLessThanOrEqualTo(Long value) {
+            addCriterion("account_id <=", value, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdIn(List<Long> values) {
+            addCriterion("account_id in", values, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdNotIn(List<Long> values) {
+            addCriterion("account_id not in", values, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdBetween(Long value1, Long value2) {
+            addCriterion("account_id between", value1, value2, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountIdNotBetween(Long value1, Long value2) {
+            addCriterion("account_id not between", value1, value2, "accountId");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountIsNull() {
+            addCriterion("fans_increase_count is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountIsNotNull() {
+            addCriterion("fans_increase_count is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountEqualTo(Integer value) {
+            addCriterion("fans_increase_count =", value, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountNotEqualTo(Integer value) {
+            addCriterion("fans_increase_count <>", value, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountGreaterThan(Integer value) {
+            addCriterion("fans_increase_count >", value, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountGreaterThanOrEqualTo(Integer value) {
+            addCriterion("fans_increase_count >=", value, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountLessThan(Integer value) {
+            addCriterion("fans_increase_count <", value, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountLessThanOrEqualTo(Integer value) {
+            addCriterion("fans_increase_count <=", value, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountIn(List<Integer> values) {
+            addCriterion("fans_increase_count in", values, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountNotIn(List<Integer> values) {
+            addCriterion("fans_increase_count not in", values, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountBetween(Integer value1, Integer value2) {
+            addCriterion("fans_increase_count between", value1, value2, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountNotBetween(Integer value1, Integer value2) {
+            addCriterion("fans_increase_count not between", value1, value2, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountIsNull() {
+            addCriterion("first_level_count is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountIsNotNull() {
+            addCriterion("first_level_count is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountEqualTo(Integer value) {
+            addCriterion("first_level_count =", value, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountNotEqualTo(Integer value) {
+            addCriterion("first_level_count <>", value, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountGreaterThan(Integer value) {
+            addCriterion("first_level_count >", value, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountGreaterThanOrEqualTo(Integer value) {
+            addCriterion("first_level_count >=", value, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountLessThan(Integer value) {
+            addCriterion("first_level_count <", value, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountLessThanOrEqualTo(Integer value) {
+            addCriterion("first_level_count <=", value, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountIn(List<Integer> values) {
+            addCriterion("first_level_count in", values, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountNotIn(List<Integer> values) {
+            addCriterion("first_level_count not in", values, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountBetween(Integer value1, Integer value2) {
+            addCriterion("first_level_count between", value1, value2, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountNotBetween(Integer value1, Integer value2) {
+            addCriterion("first_level_count not between", value1, value2, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreIsNull() {
+            addCriterion("score is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreIsNotNull() {
+            addCriterion("score is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreEqualTo(Double value) {
+            addCriterion("score =", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreNotEqualTo(Double value) {
+            addCriterion("score <>", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreGreaterThan(Double value) {
+            addCriterion("score >", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreGreaterThanOrEqualTo(Double value) {
+            addCriterion("score >=", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreLessThan(Double value) {
+            addCriterion("score <", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreLessThanOrEqualTo(Double value) {
+            addCriterion("score <=", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreIn(List<Double> values) {
+            addCriterion("score in", values, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreNotIn(List<Double> values) {
+            addCriterion("score not in", values, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreBetween(Double value1, Double value2) {
+            addCriterion("score between", value1, value2, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreNotBetween(Double value1, Double value2) {
+            addCriterion("score not between", value1, value2, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampIsNull() {
+            addCriterion("create_timestamp is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampIsNotNull() {
+            addCriterion("create_timestamp is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampEqualTo(Long value) {
+            addCriterion("create_timestamp =", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampNotEqualTo(Long value) {
+            addCriterion("create_timestamp <>", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampGreaterThan(Long value) {
+            addCriterion("create_timestamp >", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampGreaterThanOrEqualTo(Long value) {
+            addCriterion("create_timestamp >=", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampLessThan(Long value) {
+            addCriterion("create_timestamp <", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampLessThanOrEqualTo(Long value) {
+            addCriterion("create_timestamp <=", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampIn(List<Long> values) {
+            addCriterion("create_timestamp in", values, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampNotIn(List<Long> values) {
+            addCriterion("create_timestamp not in", values, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampBetween(Long value1, Long value2) {
+            addCriterion("create_timestamp between", value1, value2, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampNotBetween(Long value1, Long value2) {
+            addCriterion("create_timestamp not between", value1, value2, "createTimestamp");
+            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);
+        }
+    }
+}

+ 112 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformGzhPushDataStatTotal.java

@@ -0,0 +1,112 @@
+package com.tzld.piaoquan.api.model.po.contentplatform;
+
+public class ContentPlatformGzhPushDataStatTotal {
+    private Long id;
+
+    private String dateStr;
+
+    private String channel;
+
+    private Integer fansIncreaseCount;
+
+    private Integer firstLevelCount;
+
+    private Double score;
+
+    private Double unitPrice;
+
+    private Double settlementAmount;
+
+    private Long createTimestamp;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getDateStr() {
+        return dateStr;
+    }
+
+    public void setDateStr(String dateStr) {
+        this.dateStr = dateStr;
+    }
+
+    public String getChannel() {
+        return channel;
+    }
+
+    public void setChannel(String channel) {
+        this.channel = channel;
+    }
+
+    public Integer getFansIncreaseCount() {
+        return fansIncreaseCount;
+    }
+
+    public void setFansIncreaseCount(Integer fansIncreaseCount) {
+        this.fansIncreaseCount = fansIncreaseCount;
+    }
+
+    public Integer getFirstLevelCount() {
+        return firstLevelCount;
+    }
+
+    public void setFirstLevelCount(Integer firstLevelCount) {
+        this.firstLevelCount = firstLevelCount;
+    }
+
+    public Double getScore() {
+        return score;
+    }
+
+    public void setScore(Double score) {
+        this.score = score;
+    }
+
+    public Double getUnitPrice() {
+        return unitPrice;
+    }
+
+    public void setUnitPrice(Double unitPrice) {
+        this.unitPrice = unitPrice;
+    }
+
+    public Double getSettlementAmount() {
+        return settlementAmount;
+    }
+
+    public void setSettlementAmount(Double settlementAmount) {
+        this.settlementAmount = settlementAmount;
+    }
+
+    public Long getCreateTimestamp() {
+        return createTimestamp;
+    }
+
+    public void setCreateTimestamp(Long createTimestamp) {
+        this.createTimestamp = createTimestamp;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", dateStr=").append(dateStr);
+        sb.append(", channel=").append(channel);
+        sb.append(", fansIncreaseCount=").append(fansIncreaseCount);
+        sb.append(", firstLevelCount=").append(firstLevelCount);
+        sb.append(", score=").append(score);
+        sb.append(", unitPrice=").append(unitPrice);
+        sb.append(", settlementAmount=").append(settlementAmount);
+        sb.append(", createTimestamp=").append(createTimestamp);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 771 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformGzhPushDataStatTotalExample.java

@@ -0,0 +1,771 @@
+package com.tzld.piaoquan.api.model.po.contentplatform;
+
+import com.tzld.piaoquan.growth.common.utils.page.Page;
+import java.util.ArrayList;
+import java.util.List;
+
+public class ContentPlatformGzhPushDataStatTotalExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    protected Page page;
+
+    public ContentPlatformGzhPushDataStatTotalExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    public void setPage(Page page) {
+        this.page=page;
+    }
+
+    public Page getPage() {
+        return page;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrIsNull() {
+            addCriterion("date_str is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrIsNotNull() {
+            addCriterion("date_str is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrEqualTo(String value) {
+            addCriterion("date_str =", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrNotEqualTo(String value) {
+            addCriterion("date_str <>", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrGreaterThan(String value) {
+            addCriterion("date_str >", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrGreaterThanOrEqualTo(String value) {
+            addCriterion("date_str >=", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrLessThan(String value) {
+            addCriterion("date_str <", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrLessThanOrEqualTo(String value) {
+            addCriterion("date_str <=", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrLike(String value) {
+            addCriterion("date_str like", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrNotLike(String value) {
+            addCriterion("date_str not like", value, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrIn(List<String> values) {
+            addCriterion("date_str in", values, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrNotIn(List<String> values) {
+            addCriterion("date_str not in", values, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrBetween(String value1, String value2) {
+            addCriterion("date_str between", value1, value2, "dateStr");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateStrNotBetween(String value1, String value2) {
+            addCriterion("date_str not between", value1, value2, "dateStr");
+            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 andFansIncreaseCountIsNull() {
+            addCriterion("fans_increase_count is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountIsNotNull() {
+            addCriterion("fans_increase_count is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountEqualTo(Integer value) {
+            addCriterion("fans_increase_count =", value, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountNotEqualTo(Integer value) {
+            addCriterion("fans_increase_count <>", value, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountGreaterThan(Integer value) {
+            addCriterion("fans_increase_count >", value, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountGreaterThanOrEqualTo(Integer value) {
+            addCriterion("fans_increase_count >=", value, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountLessThan(Integer value) {
+            addCriterion("fans_increase_count <", value, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountLessThanOrEqualTo(Integer value) {
+            addCriterion("fans_increase_count <=", value, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountIn(List<Integer> values) {
+            addCriterion("fans_increase_count in", values, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountNotIn(List<Integer> values) {
+            addCriterion("fans_increase_count not in", values, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountBetween(Integer value1, Integer value2) {
+            addCriterion("fans_increase_count between", value1, value2, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFansIncreaseCountNotBetween(Integer value1, Integer value2) {
+            addCriterion("fans_increase_count not between", value1, value2, "fansIncreaseCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountIsNull() {
+            addCriterion("first_level_count is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountIsNotNull() {
+            addCriterion("first_level_count is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountEqualTo(Integer value) {
+            addCriterion("first_level_count =", value, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountNotEqualTo(Integer value) {
+            addCriterion("first_level_count <>", value, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountGreaterThan(Integer value) {
+            addCriterion("first_level_count >", value, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountGreaterThanOrEqualTo(Integer value) {
+            addCriterion("first_level_count >=", value, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountLessThan(Integer value) {
+            addCriterion("first_level_count <", value, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountLessThanOrEqualTo(Integer value) {
+            addCriterion("first_level_count <=", value, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountIn(List<Integer> values) {
+            addCriterion("first_level_count in", values, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountNotIn(List<Integer> values) {
+            addCriterion("first_level_count not in", values, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountBetween(Integer value1, Integer value2) {
+            addCriterion("first_level_count between", value1, value2, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andFirstLevelCountNotBetween(Integer value1, Integer value2) {
+            addCriterion("first_level_count not between", value1, value2, "firstLevelCount");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreIsNull() {
+            addCriterion("score is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreIsNotNull() {
+            addCriterion("score is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreEqualTo(Double value) {
+            addCriterion("score =", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreNotEqualTo(Double value) {
+            addCriterion("score <>", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreGreaterThan(Double value) {
+            addCriterion("score >", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreGreaterThanOrEqualTo(Double value) {
+            addCriterion("score >=", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreLessThan(Double value) {
+            addCriterion("score <", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreLessThanOrEqualTo(Double value) {
+            addCriterion("score <=", value, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreIn(List<Double> values) {
+            addCriterion("score in", values, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreNotIn(List<Double> values) {
+            addCriterion("score not in", values, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreBetween(Double value1, Double value2) {
+            addCriterion("score between", value1, value2, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andScoreNotBetween(Double value1, Double value2) {
+            addCriterion("score not between", value1, value2, "score");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnitPriceIsNull() {
+            addCriterion("unit_price is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnitPriceIsNotNull() {
+            addCriterion("unit_price is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnitPriceEqualTo(Double value) {
+            addCriterion("unit_price =", value, "unitPrice");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnitPriceNotEqualTo(Double value) {
+            addCriterion("unit_price <>", value, "unitPrice");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnitPriceGreaterThan(Double value) {
+            addCriterion("unit_price >", value, "unitPrice");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnitPriceGreaterThanOrEqualTo(Double value) {
+            addCriterion("unit_price >=", value, "unitPrice");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnitPriceLessThan(Double value) {
+            addCriterion("unit_price <", value, "unitPrice");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnitPriceLessThanOrEqualTo(Double value) {
+            addCriterion("unit_price <=", value, "unitPrice");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnitPriceIn(List<Double> values) {
+            addCriterion("unit_price in", values, "unitPrice");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnitPriceNotIn(List<Double> values) {
+            addCriterion("unit_price not in", values, "unitPrice");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnitPriceBetween(Double value1, Double value2) {
+            addCriterion("unit_price between", value1, value2, "unitPrice");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnitPriceNotBetween(Double value1, Double value2) {
+            addCriterion("unit_price not between", value1, value2, "unitPrice");
+            return (Criteria) this;
+        }
+
+        public Criteria andSettlementAmountIsNull() {
+            addCriterion("settlement_amount is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSettlementAmountIsNotNull() {
+            addCriterion("settlement_amount is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSettlementAmountEqualTo(Double value) {
+            addCriterion("settlement_amount =", value, "settlementAmount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSettlementAmountNotEqualTo(Double value) {
+            addCriterion("settlement_amount <>", value, "settlementAmount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSettlementAmountGreaterThan(Double value) {
+            addCriterion("settlement_amount >", value, "settlementAmount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSettlementAmountGreaterThanOrEqualTo(Double value) {
+            addCriterion("settlement_amount >=", value, "settlementAmount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSettlementAmountLessThan(Double value) {
+            addCriterion("settlement_amount <", value, "settlementAmount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSettlementAmountLessThanOrEqualTo(Double value) {
+            addCriterion("settlement_amount <=", value, "settlementAmount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSettlementAmountIn(List<Double> values) {
+            addCriterion("settlement_amount in", values, "settlementAmount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSettlementAmountNotIn(List<Double> values) {
+            addCriterion("settlement_amount not in", values, "settlementAmount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSettlementAmountBetween(Double value1, Double value2) {
+            addCriterion("settlement_amount between", value1, value2, "settlementAmount");
+            return (Criteria) this;
+        }
+
+        public Criteria andSettlementAmountNotBetween(Double value1, Double value2) {
+            addCriterion("settlement_amount not between", value1, value2, "settlementAmount");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampIsNull() {
+            addCriterion("create_timestamp is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampIsNotNull() {
+            addCriterion("create_timestamp is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampEqualTo(Long value) {
+            addCriterion("create_timestamp =", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampNotEqualTo(Long value) {
+            addCriterion("create_timestamp <>", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampGreaterThan(Long value) {
+            addCriterion("create_timestamp >", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampGreaterThanOrEqualTo(Long value) {
+            addCriterion("create_timestamp >=", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampLessThan(Long value) {
+            addCriterion("create_timestamp <", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampLessThanOrEqualTo(Long value) {
+            addCriterion("create_timestamp <=", value, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampIn(List<Long> values) {
+            addCriterion("create_timestamp in", values, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampNotIn(List<Long> values) {
+            addCriterion("create_timestamp not in", values, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampBetween(Long value1, Long value2) {
+            addCriterion("create_timestamp between", value1, value2, "createTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimestampNotBetween(Long value1, Long value2) {
+            addCriterion("create_timestamp not between", value1, value2, "createTimestamp");
+            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);
+        }
+    }
+}

+ 44 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComRoom.java

@@ -19,6 +19,14 @@ public class ThirdPartWeComRoom {
 
     private String roomUrl;
 
+    private Integer addUserStatus;
+
+    private Integer sendStatus;
+
+    private String sendTime;
+
+    private Integer isDelete;
+
     private Date createTime;
 
     private Date updateTime;
@@ -87,6 +95,38 @@ public class ThirdPartWeComRoom {
         this.roomUrl = roomUrl;
     }
 
+    public Integer getAddUserStatus() {
+        return addUserStatus;
+    }
+
+    public void setAddUserStatus(Integer addUserStatus) {
+        this.addUserStatus = addUserStatus;
+    }
+
+    public Integer getSendStatus() {
+        return sendStatus;
+    }
+
+    public void setSendStatus(Integer sendStatus) {
+        this.sendStatus = sendStatus;
+    }
+
+    public String getSendTime() {
+        return sendTime;
+    }
+
+    public void setSendTime(String sendTime) {
+        this.sendTime = sendTime;
+    }
+
+    public Integer getIsDelete() {
+        return isDelete;
+    }
+
+    public void setIsDelete(Integer isDelete) {
+        this.isDelete = isDelete;
+    }
+
     public Date getCreateTime() {
         return createTime;
     }
@@ -117,6 +157,10 @@ public class ThirdPartWeComRoom {
         sb.append(", memberCount=").append(memberCount);
         sb.append(", name=").append(name);
         sb.append(", roomUrl=").append(roomUrl);
+        sb.append(", addUserStatus=").append(addUserStatus);
+        sb.append(", sendStatus=").append(sendStatus);
+        sb.append(", sendTime=").append(sendTime);
+        sb.append(", isDelete=").append(isDelete);
         sb.append(", createTime=").append(createTime);
         sb.append(", updateTime=").append(updateTime);
         sb.append("]");

+ 250 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComRoomExample.java

@@ -626,6 +626,256 @@ public class ThirdPartWeComRoomExample {
             return (Criteria) this;
         }
 
+        public Criteria andAddUserStatusIsNull() {
+            addCriterion("add_user_status is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAddUserStatusIsNotNull() {
+            addCriterion("add_user_status is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAddUserStatusEqualTo(Integer value) {
+            addCriterion("add_user_status =", value, "addUserStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andAddUserStatusNotEqualTo(Integer value) {
+            addCriterion("add_user_status <>", value, "addUserStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andAddUserStatusGreaterThan(Integer value) {
+            addCriterion("add_user_status >", value, "addUserStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andAddUserStatusGreaterThanOrEqualTo(Integer value) {
+            addCriterion("add_user_status >=", value, "addUserStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andAddUserStatusLessThan(Integer value) {
+            addCriterion("add_user_status <", value, "addUserStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andAddUserStatusLessThanOrEqualTo(Integer value) {
+            addCriterion("add_user_status <=", value, "addUserStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andAddUserStatusIn(List<Integer> values) {
+            addCriterion("add_user_status in", values, "addUserStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andAddUserStatusNotIn(List<Integer> values) {
+            addCriterion("add_user_status not in", values, "addUserStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andAddUserStatusBetween(Integer value1, Integer value2) {
+            addCriterion("add_user_status between", value1, value2, "addUserStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andAddUserStatusNotBetween(Integer value1, Integer value2) {
+            addCriterion("add_user_status not between", value1, value2, "addUserStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendStatusIsNull() {
+            addCriterion("send_status is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendStatusIsNotNull() {
+            addCriterion("send_status is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendStatusEqualTo(Integer value) {
+            addCriterion("send_status =", value, "sendStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendStatusNotEqualTo(Integer value) {
+            addCriterion("send_status <>", value, "sendStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendStatusGreaterThan(Integer value) {
+            addCriterion("send_status >", value, "sendStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendStatusGreaterThanOrEqualTo(Integer value) {
+            addCriterion("send_status >=", value, "sendStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendStatusLessThan(Integer value) {
+            addCriterion("send_status <", value, "sendStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendStatusLessThanOrEqualTo(Integer value) {
+            addCriterion("send_status <=", value, "sendStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendStatusIn(List<Integer> values) {
+            addCriterion("send_status in", values, "sendStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendStatusNotIn(List<Integer> values) {
+            addCriterion("send_status not in", values, "sendStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendStatusBetween(Integer value1, Integer value2) {
+            addCriterion("send_status between", value1, value2, "sendStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendStatusNotBetween(Integer value1, Integer value2) {
+            addCriterion("send_status not between", value1, value2, "sendStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTimeIsNull() {
+            addCriterion("send_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTimeIsNotNull() {
+            addCriterion("send_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTimeEqualTo(String value) {
+            addCriterion("send_time =", value, "sendTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTimeNotEqualTo(String value) {
+            addCriterion("send_time <>", value, "sendTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTimeGreaterThan(String value) {
+            addCriterion("send_time >", value, "sendTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTimeGreaterThanOrEqualTo(String value) {
+            addCriterion("send_time >=", value, "sendTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTimeLessThan(String value) {
+            addCriterion("send_time <", value, "sendTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTimeLessThanOrEqualTo(String value) {
+            addCriterion("send_time <=", value, "sendTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTimeLike(String value) {
+            addCriterion("send_time like", value, "sendTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTimeNotLike(String value) {
+            addCriterion("send_time not like", value, "sendTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTimeIn(List<String> values) {
+            addCriterion("send_time in", values, "sendTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTimeNotIn(List<String> values) {
+            addCriterion("send_time not in", values, "sendTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTimeBetween(String value1, String value2) {
+            addCriterion("send_time between", value1, value2, "sendTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTimeNotBetween(String value1, String value2) {
+            addCriterion("send_time not between", value1, value2, "sendTime");
+            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;

+ 235 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComRoomUser.java

@@ -0,0 +1,235 @@
+package com.tzld.piaoquan.api.model.po.wecom.thirdpart;
+
+import java.util.Date;
+
+public class ThirdPartWeComRoomUser {
+    private Long id;
+
+    private String thirdRoomId;
+
+    private String unionid;
+
+    private Integer sex;
+
+    private String mobile;
+
+    private String acctid;
+
+    private Integer joinScene;
+
+    private String avatar;
+
+    private String englishName;
+
+    private String realname;
+
+    private String roomNotes;
+
+    private Long joinTime;
+
+    private String nickname;
+
+    private String roomNickname;
+
+    private String position;
+
+    private Long uin;
+
+    private Long inviteUserId;
+
+    private Long corpId;
+
+    private Date createTime;
+
+    private Date updateTime;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getThirdRoomId() {
+        return thirdRoomId;
+    }
+
+    public void setThirdRoomId(String thirdRoomId) {
+        this.thirdRoomId = thirdRoomId;
+    }
+
+    public String getUnionid() {
+        return unionid;
+    }
+
+    public void setUnionid(String unionid) {
+        this.unionid = unionid;
+    }
+
+    public Integer getSex() {
+        return sex;
+    }
+
+    public void setSex(Integer sex) {
+        this.sex = sex;
+    }
+
+    public String getMobile() {
+        return mobile;
+    }
+
+    public void setMobile(String mobile) {
+        this.mobile = mobile;
+    }
+
+    public String getAcctid() {
+        return acctid;
+    }
+
+    public void setAcctid(String acctid) {
+        this.acctid = acctid;
+    }
+
+    public Integer getJoinScene() {
+        return joinScene;
+    }
+
+    public void setJoinScene(Integer joinScene) {
+        this.joinScene = joinScene;
+    }
+
+    public String getAvatar() {
+        return avatar;
+    }
+
+    public void setAvatar(String avatar) {
+        this.avatar = avatar;
+    }
+
+    public String getEnglishName() {
+        return englishName;
+    }
+
+    public void setEnglishName(String englishName) {
+        this.englishName = englishName;
+    }
+
+    public String getRealname() {
+        return realname;
+    }
+
+    public void setRealname(String realname) {
+        this.realname = realname;
+    }
+
+    public String getRoomNotes() {
+        return roomNotes;
+    }
+
+    public void setRoomNotes(String roomNotes) {
+        this.roomNotes = roomNotes;
+    }
+
+    public Long getJoinTime() {
+        return joinTime;
+    }
+
+    public void setJoinTime(Long joinTime) {
+        this.joinTime = joinTime;
+    }
+
+    public String getNickname() {
+        return nickname;
+    }
+
+    public void setNickname(String nickname) {
+        this.nickname = nickname;
+    }
+
+    public String getRoomNickname() {
+        return roomNickname;
+    }
+
+    public void setRoomNickname(String roomNickname) {
+        this.roomNickname = roomNickname;
+    }
+
+    public String getPosition() {
+        return position;
+    }
+
+    public void setPosition(String position) {
+        this.position = position;
+    }
+
+    public Long getUin() {
+        return uin;
+    }
+
+    public void setUin(Long uin) {
+        this.uin = uin;
+    }
+
+    public Long getInviteUserId() {
+        return inviteUserId;
+    }
+
+    public void setInviteUserId(Long inviteUserId) {
+        this.inviteUserId = inviteUserId;
+    }
+
+    public Long getCorpId() {
+        return corpId;
+    }
+
+    public void setCorpId(Long corpId) {
+        this.corpId = corpId;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", thirdRoomId=").append(thirdRoomId);
+        sb.append(", unionid=").append(unionid);
+        sb.append(", sex=").append(sex);
+        sb.append(", mobile=").append(mobile);
+        sb.append(", acctid=").append(acctid);
+        sb.append(", joinScene=").append(joinScene);
+        sb.append(", avatar=").append(avatar);
+        sb.append(", englishName=").append(englishName);
+        sb.append(", realname=").append(realname);
+        sb.append(", roomNotes=").append(roomNotes);
+        sb.append(", joinTime=").append(joinTime);
+        sb.append(", nickname=").append(nickname);
+        sb.append(", roomNickname=").append(roomNickname);
+        sb.append(", position=").append(position);
+        sb.append(", uin=").append(uin);
+        sb.append(", inviteUserId=").append(inviteUserId);
+        sb.append(", corpId=").append(corpId);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 1522 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComRoomUserExample.java

@@ -0,0 +1,1522 @@
+package com.tzld.piaoquan.api.model.po.wecom.thirdpart;
+
+import com.tzld.piaoquan.growth.common.utils.page.Page;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class ThirdPartWeComRoomUserExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    protected Page page;
+
+    public ThirdPartWeComRoomUserExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    public void setPage(Page page) {
+        this.page=page;
+    }
+
+    public Page getPage() {
+        return page;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andThirdRoomIdIsNull() {
+            addCriterion("third_room_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andThirdRoomIdIsNotNull() {
+            addCriterion("third_room_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andThirdRoomIdEqualTo(String value) {
+            addCriterion("third_room_id =", value, "thirdRoomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andThirdRoomIdNotEqualTo(String value) {
+            addCriterion("third_room_id <>", value, "thirdRoomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andThirdRoomIdGreaterThan(String value) {
+            addCriterion("third_room_id >", value, "thirdRoomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andThirdRoomIdGreaterThanOrEqualTo(String value) {
+            addCriterion("third_room_id >=", value, "thirdRoomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andThirdRoomIdLessThan(String value) {
+            addCriterion("third_room_id <", value, "thirdRoomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andThirdRoomIdLessThanOrEqualTo(String value) {
+            addCriterion("third_room_id <=", value, "thirdRoomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andThirdRoomIdLike(String value) {
+            addCriterion("third_room_id like", value, "thirdRoomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andThirdRoomIdNotLike(String value) {
+            addCriterion("third_room_id not like", value, "thirdRoomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andThirdRoomIdIn(List<String> values) {
+            addCriterion("third_room_id in", values, "thirdRoomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andThirdRoomIdNotIn(List<String> values) {
+            addCriterion("third_room_id not in", values, "thirdRoomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andThirdRoomIdBetween(String value1, String value2) {
+            addCriterion("third_room_id between", value1, value2, "thirdRoomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andThirdRoomIdNotBetween(String value1, String value2) {
+            addCriterion("third_room_id not between", value1, value2, "thirdRoomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnionidIsNull() {
+            addCriterion("unionid is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnionidIsNotNull() {
+            addCriterion("unionid is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnionidEqualTo(String value) {
+            addCriterion("unionid =", value, "unionid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnionidNotEqualTo(String value) {
+            addCriterion("unionid <>", value, "unionid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnionidGreaterThan(String value) {
+            addCriterion("unionid >", value, "unionid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnionidGreaterThanOrEqualTo(String value) {
+            addCriterion("unionid >=", value, "unionid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnionidLessThan(String value) {
+            addCriterion("unionid <", value, "unionid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnionidLessThanOrEqualTo(String value) {
+            addCriterion("unionid <=", value, "unionid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnionidLike(String value) {
+            addCriterion("unionid like", value, "unionid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnionidNotLike(String value) {
+            addCriterion("unionid not like", value, "unionid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnionidIn(List<String> values) {
+            addCriterion("unionid in", values, "unionid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnionidNotIn(List<String> values) {
+            addCriterion("unionid not in", values, "unionid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnionidBetween(String value1, String value2) {
+            addCriterion("unionid between", value1, value2, "unionid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnionidNotBetween(String value1, String value2) {
+            addCriterion("unionid not between", value1, value2, "unionid");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexIsNull() {
+            addCriterion("sex is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexIsNotNull() {
+            addCriterion("sex is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexEqualTo(Integer value) {
+            addCriterion("sex =", value, "sex");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexNotEqualTo(Integer value) {
+            addCriterion("sex <>", value, "sex");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexGreaterThan(Integer value) {
+            addCriterion("sex >", value, "sex");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexGreaterThanOrEqualTo(Integer value) {
+            addCriterion("sex >=", value, "sex");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexLessThan(Integer value) {
+            addCriterion("sex <", value, "sex");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexLessThanOrEqualTo(Integer value) {
+            addCriterion("sex <=", value, "sex");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexIn(List<Integer> values) {
+            addCriterion("sex in", values, "sex");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexNotIn(List<Integer> values) {
+            addCriterion("sex not in", values, "sex");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexBetween(Integer value1, Integer value2) {
+            addCriterion("sex between", value1, value2, "sex");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexNotBetween(Integer value1, Integer value2) {
+            addCriterion("sex not between", value1, value2, "sex");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileIsNull() {
+            addCriterion("mobile is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileIsNotNull() {
+            addCriterion("mobile is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileEqualTo(String value) {
+            addCriterion("mobile =", value, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileNotEqualTo(String value) {
+            addCriterion("mobile <>", value, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileGreaterThan(String value) {
+            addCriterion("mobile >", value, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileGreaterThanOrEqualTo(String value) {
+            addCriterion("mobile >=", value, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileLessThan(String value) {
+            addCriterion("mobile <", value, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileLessThanOrEqualTo(String value) {
+            addCriterion("mobile <=", value, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileLike(String value) {
+            addCriterion("mobile like", value, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileNotLike(String value) {
+            addCriterion("mobile not like", value, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileIn(List<String> values) {
+            addCriterion("mobile in", values, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileNotIn(List<String> values) {
+            addCriterion("mobile not in", values, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileBetween(String value1, String value2) {
+            addCriterion("mobile between", value1, value2, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileNotBetween(String value1, String value2) {
+            addCriterion("mobile not between", value1, value2, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andAcctidIsNull() {
+            addCriterion("acctid is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAcctidIsNotNull() {
+            addCriterion("acctid is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAcctidEqualTo(String value) {
+            addCriterion("acctid =", value, "acctid");
+            return (Criteria) this;
+        }
+
+        public Criteria andAcctidNotEqualTo(String value) {
+            addCriterion("acctid <>", value, "acctid");
+            return (Criteria) this;
+        }
+
+        public Criteria andAcctidGreaterThan(String value) {
+            addCriterion("acctid >", value, "acctid");
+            return (Criteria) this;
+        }
+
+        public Criteria andAcctidGreaterThanOrEqualTo(String value) {
+            addCriterion("acctid >=", value, "acctid");
+            return (Criteria) this;
+        }
+
+        public Criteria andAcctidLessThan(String value) {
+            addCriterion("acctid <", value, "acctid");
+            return (Criteria) this;
+        }
+
+        public Criteria andAcctidLessThanOrEqualTo(String value) {
+            addCriterion("acctid <=", value, "acctid");
+            return (Criteria) this;
+        }
+
+        public Criteria andAcctidLike(String value) {
+            addCriterion("acctid like", value, "acctid");
+            return (Criteria) this;
+        }
+
+        public Criteria andAcctidNotLike(String value) {
+            addCriterion("acctid not like", value, "acctid");
+            return (Criteria) this;
+        }
+
+        public Criteria andAcctidIn(List<String> values) {
+            addCriterion("acctid in", values, "acctid");
+            return (Criteria) this;
+        }
+
+        public Criteria andAcctidNotIn(List<String> values) {
+            addCriterion("acctid not in", values, "acctid");
+            return (Criteria) this;
+        }
+
+        public Criteria andAcctidBetween(String value1, String value2) {
+            addCriterion("acctid between", value1, value2, "acctid");
+            return (Criteria) this;
+        }
+
+        public Criteria andAcctidNotBetween(String value1, String value2) {
+            addCriterion("acctid not between", value1, value2, "acctid");
+            return (Criteria) this;
+        }
+
+        public Criteria andJoinSceneIsNull() {
+            addCriterion("join_scene is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andJoinSceneIsNotNull() {
+            addCriterion("join_scene is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andJoinSceneEqualTo(Integer value) {
+            addCriterion("join_scene =", value, "joinScene");
+            return (Criteria) this;
+        }
+
+        public Criteria andJoinSceneNotEqualTo(Integer value) {
+            addCriterion("join_scene <>", value, "joinScene");
+            return (Criteria) this;
+        }
+
+        public Criteria andJoinSceneGreaterThan(Integer value) {
+            addCriterion("join_scene >", value, "joinScene");
+            return (Criteria) this;
+        }
+
+        public Criteria andJoinSceneGreaterThanOrEqualTo(Integer value) {
+            addCriterion("join_scene >=", value, "joinScene");
+            return (Criteria) this;
+        }
+
+        public Criteria andJoinSceneLessThan(Integer value) {
+            addCriterion("join_scene <", value, "joinScene");
+            return (Criteria) this;
+        }
+
+        public Criteria andJoinSceneLessThanOrEqualTo(Integer value) {
+            addCriterion("join_scene <=", value, "joinScene");
+            return (Criteria) this;
+        }
+
+        public Criteria andJoinSceneIn(List<Integer> values) {
+            addCriterion("join_scene in", values, "joinScene");
+            return (Criteria) this;
+        }
+
+        public Criteria andJoinSceneNotIn(List<Integer> values) {
+            addCriterion("join_scene not in", values, "joinScene");
+            return (Criteria) this;
+        }
+
+        public Criteria andJoinSceneBetween(Integer value1, Integer value2) {
+            addCriterion("join_scene between", value1, value2, "joinScene");
+            return (Criteria) this;
+        }
+
+        public Criteria andJoinSceneNotBetween(Integer value1, Integer value2) {
+            addCriterion("join_scene not between", value1, value2, "joinScene");
+            return (Criteria) this;
+        }
+
+        public Criteria andAvatarIsNull() {
+            addCriterion("avatar is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAvatarIsNotNull() {
+            addCriterion("avatar is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAvatarEqualTo(String value) {
+            addCriterion("avatar =", value, "avatar");
+            return (Criteria) this;
+        }
+
+        public Criteria andAvatarNotEqualTo(String value) {
+            addCriterion("avatar <>", value, "avatar");
+            return (Criteria) this;
+        }
+
+        public Criteria andAvatarGreaterThan(String value) {
+            addCriterion("avatar >", value, "avatar");
+            return (Criteria) this;
+        }
+
+        public Criteria andAvatarGreaterThanOrEqualTo(String value) {
+            addCriterion("avatar >=", value, "avatar");
+            return (Criteria) this;
+        }
+
+        public Criteria andAvatarLessThan(String value) {
+            addCriterion("avatar <", value, "avatar");
+            return (Criteria) this;
+        }
+
+        public Criteria andAvatarLessThanOrEqualTo(String value) {
+            addCriterion("avatar <=", value, "avatar");
+            return (Criteria) this;
+        }
+
+        public Criteria andAvatarLike(String value) {
+            addCriterion("avatar like", value, "avatar");
+            return (Criteria) this;
+        }
+
+        public Criteria andAvatarNotLike(String value) {
+            addCriterion("avatar not like", value, "avatar");
+            return (Criteria) this;
+        }
+
+        public Criteria andAvatarIn(List<String> values) {
+            addCriterion("avatar in", values, "avatar");
+            return (Criteria) this;
+        }
+
+        public Criteria andAvatarNotIn(List<String> values) {
+            addCriterion("avatar not in", values, "avatar");
+            return (Criteria) this;
+        }
+
+        public Criteria andAvatarBetween(String value1, String value2) {
+            addCriterion("avatar between", value1, value2, "avatar");
+            return (Criteria) this;
+        }
+
+        public Criteria andAvatarNotBetween(String value1, String value2) {
+            addCriterion("avatar not between", value1, value2, "avatar");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnglishNameIsNull() {
+            addCriterion("english_name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnglishNameIsNotNull() {
+            addCriterion("english_name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnglishNameEqualTo(String value) {
+            addCriterion("english_name =", value, "englishName");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnglishNameNotEqualTo(String value) {
+            addCriterion("english_name <>", value, "englishName");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnglishNameGreaterThan(String value) {
+            addCriterion("english_name >", value, "englishName");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnglishNameGreaterThanOrEqualTo(String value) {
+            addCriterion("english_name >=", value, "englishName");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnglishNameLessThan(String value) {
+            addCriterion("english_name <", value, "englishName");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnglishNameLessThanOrEqualTo(String value) {
+            addCriterion("english_name <=", value, "englishName");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnglishNameLike(String value) {
+            addCriterion("english_name like", value, "englishName");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnglishNameNotLike(String value) {
+            addCriterion("english_name not like", value, "englishName");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnglishNameIn(List<String> values) {
+            addCriterion("english_name in", values, "englishName");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnglishNameNotIn(List<String> values) {
+            addCriterion("english_name not in", values, "englishName");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnglishNameBetween(String value1, String value2) {
+            addCriterion("english_name between", value1, value2, "englishName");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnglishNameNotBetween(String value1, String value2) {
+            addCriterion("english_name not between", value1, value2, "englishName");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealnameIsNull() {
+            addCriterion("realname is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealnameIsNotNull() {
+            addCriterion("realname is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealnameEqualTo(String value) {
+            addCriterion("realname =", value, "realname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealnameNotEqualTo(String value) {
+            addCriterion("realname <>", value, "realname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealnameGreaterThan(String value) {
+            addCriterion("realname >", value, "realname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealnameGreaterThanOrEqualTo(String value) {
+            addCriterion("realname >=", value, "realname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealnameLessThan(String value) {
+            addCriterion("realname <", value, "realname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealnameLessThanOrEqualTo(String value) {
+            addCriterion("realname <=", value, "realname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealnameLike(String value) {
+            addCriterion("realname like", value, "realname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealnameNotLike(String value) {
+            addCriterion("realname not like", value, "realname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealnameIn(List<String> values) {
+            addCriterion("realname in", values, "realname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealnameNotIn(List<String> values) {
+            addCriterion("realname not in", values, "realname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealnameBetween(String value1, String value2) {
+            addCriterion("realname between", value1, value2, "realname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealnameNotBetween(String value1, String value2) {
+            addCriterion("realname not between", value1, value2, "realname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomNotesIsNull() {
+            addCriterion("room_notes is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomNotesIsNotNull() {
+            addCriterion("room_notes is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomNotesEqualTo(String value) {
+            addCriterion("room_notes =", value, "roomNotes");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomNotesNotEqualTo(String value) {
+            addCriterion("room_notes <>", value, "roomNotes");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomNotesGreaterThan(String value) {
+            addCriterion("room_notes >", value, "roomNotes");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomNotesGreaterThanOrEqualTo(String value) {
+            addCriterion("room_notes >=", value, "roomNotes");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomNotesLessThan(String value) {
+            addCriterion("room_notes <", value, "roomNotes");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomNotesLessThanOrEqualTo(String value) {
+            addCriterion("room_notes <=", value, "roomNotes");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomNotesLike(String value) {
+            addCriterion("room_notes like", value, "roomNotes");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomNotesNotLike(String value) {
+            addCriterion("room_notes not like", value, "roomNotes");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomNotesIn(List<String> values) {
+            addCriterion("room_notes in", values, "roomNotes");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomNotesNotIn(List<String> values) {
+            addCriterion("room_notes not in", values, "roomNotes");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomNotesBetween(String value1, String value2) {
+            addCriterion("room_notes between", value1, value2, "roomNotes");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomNotesNotBetween(String value1, String value2) {
+            addCriterion("room_notes not between", value1, value2, "roomNotes");
+            return (Criteria) this;
+        }
+
+        public Criteria andJoinTimeIsNull() {
+            addCriterion("join_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andJoinTimeIsNotNull() {
+            addCriterion("join_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andJoinTimeEqualTo(Long value) {
+            addCriterion("join_time =", value, "joinTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andJoinTimeNotEqualTo(Long value) {
+            addCriterion("join_time <>", value, "joinTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andJoinTimeGreaterThan(Long value) {
+            addCriterion("join_time >", value, "joinTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andJoinTimeGreaterThanOrEqualTo(Long value) {
+            addCriterion("join_time >=", value, "joinTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andJoinTimeLessThan(Long value) {
+            addCriterion("join_time <", value, "joinTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andJoinTimeLessThanOrEqualTo(Long value) {
+            addCriterion("join_time <=", value, "joinTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andJoinTimeIn(List<Long> values) {
+            addCriterion("join_time in", values, "joinTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andJoinTimeNotIn(List<Long> values) {
+            addCriterion("join_time not in", values, "joinTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andJoinTimeBetween(Long value1, Long value2) {
+            addCriterion("join_time between", value1, value2, "joinTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andJoinTimeNotBetween(Long value1, Long value2) {
+            addCriterion("join_time not between", value1, value2, "joinTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andNicknameIsNull() {
+            addCriterion("nickname is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNicknameIsNotNull() {
+            addCriterion("nickname is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNicknameEqualTo(String value) {
+            addCriterion("nickname =", value, "nickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andNicknameNotEqualTo(String value) {
+            addCriterion("nickname <>", value, "nickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andNicknameGreaterThan(String value) {
+            addCriterion("nickname >", value, "nickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andNicknameGreaterThanOrEqualTo(String value) {
+            addCriterion("nickname >=", value, "nickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andNicknameLessThan(String value) {
+            addCriterion("nickname <", value, "nickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andNicknameLessThanOrEqualTo(String value) {
+            addCriterion("nickname <=", value, "nickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andNicknameLike(String value) {
+            addCriterion("nickname like", value, "nickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andNicknameNotLike(String value) {
+            addCriterion("nickname not like", value, "nickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andNicknameIn(List<String> values) {
+            addCriterion("nickname in", values, "nickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andNicknameNotIn(List<String> values) {
+            addCriterion("nickname not in", values, "nickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andNicknameBetween(String value1, String value2) {
+            addCriterion("nickname between", value1, value2, "nickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andNicknameNotBetween(String value1, String value2) {
+            addCriterion("nickname not between", value1, value2, "nickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomNicknameIsNull() {
+            addCriterion("room_nickname is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomNicknameIsNotNull() {
+            addCriterion("room_nickname is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomNicknameEqualTo(String value) {
+            addCriterion("room_nickname =", value, "roomNickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomNicknameNotEqualTo(String value) {
+            addCriterion("room_nickname <>", value, "roomNickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomNicknameGreaterThan(String value) {
+            addCriterion("room_nickname >", value, "roomNickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomNicknameGreaterThanOrEqualTo(String value) {
+            addCriterion("room_nickname >=", value, "roomNickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomNicknameLessThan(String value) {
+            addCriterion("room_nickname <", value, "roomNickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomNicknameLessThanOrEqualTo(String value) {
+            addCriterion("room_nickname <=", value, "roomNickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomNicknameLike(String value) {
+            addCriterion("room_nickname like", value, "roomNickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomNicknameNotLike(String value) {
+            addCriterion("room_nickname not like", value, "roomNickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomNicknameIn(List<String> values) {
+            addCriterion("room_nickname in", values, "roomNickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomNicknameNotIn(List<String> values) {
+            addCriterion("room_nickname not in", values, "roomNickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomNicknameBetween(String value1, String value2) {
+            addCriterion("room_nickname between", value1, value2, "roomNickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomNicknameNotBetween(String value1, String value2) {
+            addCriterion("room_nickname not between", value1, value2, "roomNickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andPositionIsNull() {
+            addCriterion("`position` is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPositionIsNotNull() {
+            addCriterion("`position` is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPositionEqualTo(String value) {
+            addCriterion("`position` =", value, "position");
+            return (Criteria) this;
+        }
+
+        public Criteria andPositionNotEqualTo(String value) {
+            addCriterion("`position` <>", value, "position");
+            return (Criteria) this;
+        }
+
+        public Criteria andPositionGreaterThan(String value) {
+            addCriterion("`position` >", value, "position");
+            return (Criteria) this;
+        }
+
+        public Criteria andPositionGreaterThanOrEqualTo(String value) {
+            addCriterion("`position` >=", value, "position");
+            return (Criteria) this;
+        }
+
+        public Criteria andPositionLessThan(String value) {
+            addCriterion("`position` <", value, "position");
+            return (Criteria) this;
+        }
+
+        public Criteria andPositionLessThanOrEqualTo(String value) {
+            addCriterion("`position` <=", value, "position");
+            return (Criteria) this;
+        }
+
+        public Criteria andPositionLike(String value) {
+            addCriterion("`position` like", value, "position");
+            return (Criteria) this;
+        }
+
+        public Criteria andPositionNotLike(String value) {
+            addCriterion("`position` not like", value, "position");
+            return (Criteria) this;
+        }
+
+        public Criteria andPositionIn(List<String> values) {
+            addCriterion("`position` in", values, "position");
+            return (Criteria) this;
+        }
+
+        public Criteria andPositionNotIn(List<String> values) {
+            addCriterion("`position` not in", values, "position");
+            return (Criteria) this;
+        }
+
+        public Criteria andPositionBetween(String value1, String value2) {
+            addCriterion("`position` between", value1, value2, "position");
+            return (Criteria) this;
+        }
+
+        public Criteria andPositionNotBetween(String value1, String value2) {
+            addCriterion("`position` not between", value1, value2, "position");
+            return (Criteria) this;
+        }
+
+        public Criteria andUinIsNull() {
+            addCriterion("uin is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUinIsNotNull() {
+            addCriterion("uin is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUinEqualTo(Long value) {
+            addCriterion("uin =", value, "uin");
+            return (Criteria) this;
+        }
+
+        public Criteria andUinNotEqualTo(Long value) {
+            addCriterion("uin <>", value, "uin");
+            return (Criteria) this;
+        }
+
+        public Criteria andUinGreaterThan(Long value) {
+            addCriterion("uin >", value, "uin");
+            return (Criteria) this;
+        }
+
+        public Criteria andUinGreaterThanOrEqualTo(Long value) {
+            addCriterion("uin >=", value, "uin");
+            return (Criteria) this;
+        }
+
+        public Criteria andUinLessThan(Long value) {
+            addCriterion("uin <", value, "uin");
+            return (Criteria) this;
+        }
+
+        public Criteria andUinLessThanOrEqualTo(Long value) {
+            addCriterion("uin <=", value, "uin");
+            return (Criteria) this;
+        }
+
+        public Criteria andUinIn(List<Long> values) {
+            addCriterion("uin in", values, "uin");
+            return (Criteria) this;
+        }
+
+        public Criteria andUinNotIn(List<Long> values) {
+            addCriterion("uin not in", values, "uin");
+            return (Criteria) this;
+        }
+
+        public Criteria andUinBetween(Long value1, Long value2) {
+            addCriterion("uin between", value1, value2, "uin");
+            return (Criteria) this;
+        }
+
+        public Criteria andUinNotBetween(Long value1, Long value2) {
+            addCriterion("uin not between", value1, value2, "uin");
+            return (Criteria) this;
+        }
+
+        public Criteria andInviteUserIdIsNull() {
+            addCriterion("invite_user_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andInviteUserIdIsNotNull() {
+            addCriterion("invite_user_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andInviteUserIdEqualTo(Long value) {
+            addCriterion("invite_user_id =", value, "inviteUserId");
+            return (Criteria) this;
+        }
+
+        public Criteria andInviteUserIdNotEqualTo(Long value) {
+            addCriterion("invite_user_id <>", value, "inviteUserId");
+            return (Criteria) this;
+        }
+
+        public Criteria andInviteUserIdGreaterThan(Long value) {
+            addCriterion("invite_user_id >", value, "inviteUserId");
+            return (Criteria) this;
+        }
+
+        public Criteria andInviteUserIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("invite_user_id >=", value, "inviteUserId");
+            return (Criteria) this;
+        }
+
+        public Criteria andInviteUserIdLessThan(Long value) {
+            addCriterion("invite_user_id <", value, "inviteUserId");
+            return (Criteria) this;
+        }
+
+        public Criteria andInviteUserIdLessThanOrEqualTo(Long value) {
+            addCriterion("invite_user_id <=", value, "inviteUserId");
+            return (Criteria) this;
+        }
+
+        public Criteria andInviteUserIdIn(List<Long> values) {
+            addCriterion("invite_user_id in", values, "inviteUserId");
+            return (Criteria) this;
+        }
+
+        public Criteria andInviteUserIdNotIn(List<Long> values) {
+            addCriterion("invite_user_id not in", values, "inviteUserId");
+            return (Criteria) this;
+        }
+
+        public Criteria andInviteUserIdBetween(Long value1, Long value2) {
+            addCriterion("invite_user_id between", value1, value2, "inviteUserId");
+            return (Criteria) this;
+        }
+
+        public Criteria andInviteUserIdNotBetween(Long value1, Long value2) {
+            addCriterion("invite_user_id not between", value1, value2, "inviteUserId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdIsNull() {
+            addCriterion("corp_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdIsNotNull() {
+            addCriterion("corp_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdEqualTo(Long value) {
+            addCriterion("corp_id =", value, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdNotEqualTo(Long value) {
+            addCriterion("corp_id <>", value, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdGreaterThan(Long value) {
+            addCriterion("corp_id >", value, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("corp_id >=", value, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdLessThan(Long value) {
+            addCriterion("corp_id <", value, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdLessThanOrEqualTo(Long value) {
+            addCriterion("corp_id <=", value, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdIn(List<Long> values) {
+            addCriterion("corp_id in", values, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdNotIn(List<Long> values) {
+            addCriterion("corp_id not in", values, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdBetween(Long value1, Long value2) {
+            addCriterion("corp_id between", value1, value2, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdNotBetween(Long value1, Long value2) {
+            addCriterion("corp_id not between", value1, value2, "corpId");
+            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);
+        }
+    }
+}

+ 11 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComStaff.java

@@ -19,6 +19,8 @@ public class ThirdPartWeComStaff {
 
     private Integer status;
 
+    private Integer autoCreateRoom;
+
     private Date createTime;
 
     private Date updateTime;
@@ -87,6 +89,14 @@ public class ThirdPartWeComStaff {
         this.status = status;
     }
 
+    public Integer getAutoCreateRoom() {
+        return autoCreateRoom;
+    }
+
+    public void setAutoCreateRoom(Integer autoCreateRoom) {
+        this.autoCreateRoom = autoCreateRoom;
+    }
+
     public Date getCreateTime() {
         return createTime;
     }
@@ -117,6 +127,7 @@ public class ThirdPartWeComStaff {
         sb.append(", thirdStaffId=").append(thirdStaffId);
         sb.append(", thirdUuid=").append(thirdUuid);
         sb.append(", status=").append(status);
+        sb.append(", autoCreateRoom=").append(autoCreateRoom);
         sb.append(", createTime=").append(createTime);
         sb.append(", updateTime=").append(updateTime);
         sb.append("]");

+ 60 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComStaffExample.java

@@ -636,6 +636,66 @@ public class ThirdPartWeComStaffExample {
             return (Criteria) this;
         }
 
+        public Criteria andAutoCreateRoomIsNull() {
+            addCriterion("auto_create_room is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAutoCreateRoomIsNotNull() {
+            addCriterion("auto_create_room is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAutoCreateRoomEqualTo(Integer value) {
+            addCriterion("auto_create_room =", value, "autoCreateRoom");
+            return (Criteria) this;
+        }
+
+        public Criteria andAutoCreateRoomNotEqualTo(Integer value) {
+            addCriterion("auto_create_room <>", value, "autoCreateRoom");
+            return (Criteria) this;
+        }
+
+        public Criteria andAutoCreateRoomGreaterThan(Integer value) {
+            addCriterion("auto_create_room >", value, "autoCreateRoom");
+            return (Criteria) this;
+        }
+
+        public Criteria andAutoCreateRoomGreaterThanOrEqualTo(Integer value) {
+            addCriterion("auto_create_room >=", value, "autoCreateRoom");
+            return (Criteria) this;
+        }
+
+        public Criteria andAutoCreateRoomLessThan(Integer value) {
+            addCriterion("auto_create_room <", value, "autoCreateRoom");
+            return (Criteria) this;
+        }
+
+        public Criteria andAutoCreateRoomLessThanOrEqualTo(Integer value) {
+            addCriterion("auto_create_room <=", value, "autoCreateRoom");
+            return (Criteria) this;
+        }
+
+        public Criteria andAutoCreateRoomIn(List<Integer> values) {
+            addCriterion("auto_create_room in", values, "autoCreateRoom");
+            return (Criteria) this;
+        }
+
+        public Criteria andAutoCreateRoomNotIn(List<Integer> values) {
+            addCriterion("auto_create_room not in", values, "autoCreateRoom");
+            return (Criteria) this;
+        }
+
+        public Criteria andAutoCreateRoomBetween(Integer value1, Integer value2) {
+            addCriterion("auto_create_room between", value1, value2, "autoCreateRoom");
+            return (Criteria) this;
+        }
+
+        public Criteria andAutoCreateRoomNotBetween(Integer value1, Integer value2) {
+            addCriterion("auto_create_room not between", value1, value2, "autoCreateRoom");
+            return (Criteria) this;
+        }
+
         public Criteria andCreateTimeIsNull() {
             addCriterion("create_time is null");
             return (Criteria) this;

+ 268 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComStaffUser.java

@@ -0,0 +1,268 @@
+package com.tzld.piaoquan.api.model.po.wecom.thirdpart;
+
+import java.util.Date;
+
+public class ThirdPartWeComStaffUser {
+    private Long id;
+
+    private Long thirdStaffId;
+
+    private String unionid;
+
+    private Integer sex;
+
+    private String mobile;
+
+    private String companyRemark;
+
+    private String acctid;
+
+    private String avatar;
+
+    private Integer source;
+
+    private String englishName;
+
+    private String remarkPhone;
+
+    private String realname;
+
+    private String realRemarks;
+
+    private String labelid;
+
+    private Long userId;
+
+    private String nickname;
+
+    private String position;
+
+    private Long corpId;
+
+    private String remarks;
+
+    private Integer seq;
+
+    private Integer status;
+
+    private Date createTime;
+
+    private Date updateTime;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getThirdStaffId() {
+        return thirdStaffId;
+    }
+
+    public void setThirdStaffId(Long thirdStaffId) {
+        this.thirdStaffId = thirdStaffId;
+    }
+
+    public String getUnionid() {
+        return unionid;
+    }
+
+    public void setUnionid(String unionid) {
+        this.unionid = unionid;
+    }
+
+    public Integer getSex() {
+        return sex;
+    }
+
+    public void setSex(Integer sex) {
+        this.sex = sex;
+    }
+
+    public String getMobile() {
+        return mobile;
+    }
+
+    public void setMobile(String mobile) {
+        this.mobile = mobile;
+    }
+
+    public String getCompanyRemark() {
+        return companyRemark;
+    }
+
+    public void setCompanyRemark(String companyRemark) {
+        this.companyRemark = companyRemark;
+    }
+
+    public String getAcctid() {
+        return acctid;
+    }
+
+    public void setAcctid(String acctid) {
+        this.acctid = acctid;
+    }
+
+    public String getAvatar() {
+        return avatar;
+    }
+
+    public void setAvatar(String avatar) {
+        this.avatar = avatar;
+    }
+
+    public Integer getSource() {
+        return source;
+    }
+
+    public void setSource(Integer source) {
+        this.source = source;
+    }
+
+    public String getEnglishName() {
+        return englishName;
+    }
+
+    public void setEnglishName(String englishName) {
+        this.englishName = englishName;
+    }
+
+    public String getRemarkPhone() {
+        return remarkPhone;
+    }
+
+    public void setRemarkPhone(String remarkPhone) {
+        this.remarkPhone = remarkPhone;
+    }
+
+    public String getRealname() {
+        return realname;
+    }
+
+    public void setRealname(String realname) {
+        this.realname = realname;
+    }
+
+    public String getRealRemarks() {
+        return realRemarks;
+    }
+
+    public void setRealRemarks(String realRemarks) {
+        this.realRemarks = realRemarks;
+    }
+
+    public String getLabelid() {
+        return labelid;
+    }
+
+    public void setLabelid(String labelid) {
+        this.labelid = labelid;
+    }
+
+    public Long getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+
+    public String getNickname() {
+        return nickname;
+    }
+
+    public void setNickname(String nickname) {
+        this.nickname = nickname;
+    }
+
+    public String getPosition() {
+        return position;
+    }
+
+    public void setPosition(String position) {
+        this.position = position;
+    }
+
+    public Long getCorpId() {
+        return corpId;
+    }
+
+    public void setCorpId(Long corpId) {
+        this.corpId = corpId;
+    }
+
+    public String getRemarks() {
+        return remarks;
+    }
+
+    public void setRemarks(String remarks) {
+        this.remarks = remarks;
+    }
+
+    public Integer getSeq() {
+        return seq;
+    }
+
+    public void setSeq(Integer seq) {
+        this.seq = seq;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", thirdStaffId=").append(thirdStaffId);
+        sb.append(", unionid=").append(unionid);
+        sb.append(", sex=").append(sex);
+        sb.append(", mobile=").append(mobile);
+        sb.append(", companyRemark=").append(companyRemark);
+        sb.append(", acctid=").append(acctid);
+        sb.append(", avatar=").append(avatar);
+        sb.append(", source=").append(source);
+        sb.append(", englishName=").append(englishName);
+        sb.append(", remarkPhone=").append(remarkPhone);
+        sb.append(", realname=").append(realname);
+        sb.append(", realRemarks=").append(realRemarks);
+        sb.append(", labelid=").append(labelid);
+        sb.append(", userId=").append(userId);
+        sb.append(", nickname=").append(nickname);
+        sb.append(", position=").append(position);
+        sb.append(", corpId=").append(corpId);
+        sb.append(", remarks=").append(remarks);
+        sb.append(", seq=").append(seq);
+        sb.append(", status=").append(status);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 1722 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComStaffUserExample.java

@@ -0,0 +1,1722 @@
+package com.tzld.piaoquan.api.model.po.wecom.thirdpart;
+
+import com.tzld.piaoquan.growth.common.utils.page.Page;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class ThirdPartWeComStaffUserExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    protected Page page;
+
+    public ThirdPartWeComStaffUserExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    public void setPage(Page page) {
+        this.page=page;
+    }
+
+    public Page getPage() {
+        return page;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andThirdStaffIdIsNull() {
+            addCriterion("third_staff_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andThirdStaffIdIsNotNull() {
+            addCriterion("third_staff_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andThirdStaffIdEqualTo(Long value) {
+            addCriterion("third_staff_id =", value, "thirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andThirdStaffIdNotEqualTo(Long value) {
+            addCriterion("third_staff_id <>", value, "thirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andThirdStaffIdGreaterThan(Long value) {
+            addCriterion("third_staff_id >", value, "thirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andThirdStaffIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("third_staff_id >=", value, "thirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andThirdStaffIdLessThan(Long value) {
+            addCriterion("third_staff_id <", value, "thirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andThirdStaffIdLessThanOrEqualTo(Long value) {
+            addCriterion("third_staff_id <=", value, "thirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andThirdStaffIdIn(List<Long> values) {
+            addCriterion("third_staff_id in", values, "thirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andThirdStaffIdNotIn(List<Long> values) {
+            addCriterion("third_staff_id not in", values, "thirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andThirdStaffIdBetween(Long value1, Long value2) {
+            addCriterion("third_staff_id between", value1, value2, "thirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andThirdStaffIdNotBetween(Long value1, Long value2) {
+            addCriterion("third_staff_id not between", value1, value2, "thirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnionidIsNull() {
+            addCriterion("unionid is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnionidIsNotNull() {
+            addCriterion("unionid is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnionidEqualTo(String value) {
+            addCriterion("unionid =", value, "unionid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnionidNotEqualTo(String value) {
+            addCriterion("unionid <>", value, "unionid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnionidGreaterThan(String value) {
+            addCriterion("unionid >", value, "unionid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnionidGreaterThanOrEqualTo(String value) {
+            addCriterion("unionid >=", value, "unionid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnionidLessThan(String value) {
+            addCriterion("unionid <", value, "unionid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnionidLessThanOrEqualTo(String value) {
+            addCriterion("unionid <=", value, "unionid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnionidLike(String value) {
+            addCriterion("unionid like", value, "unionid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnionidNotLike(String value) {
+            addCriterion("unionid not like", value, "unionid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnionidIn(List<String> values) {
+            addCriterion("unionid in", values, "unionid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnionidNotIn(List<String> values) {
+            addCriterion("unionid not in", values, "unionid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnionidBetween(String value1, String value2) {
+            addCriterion("unionid between", value1, value2, "unionid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUnionidNotBetween(String value1, String value2) {
+            addCriterion("unionid not between", value1, value2, "unionid");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexIsNull() {
+            addCriterion("sex is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexIsNotNull() {
+            addCriterion("sex is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexEqualTo(Integer value) {
+            addCriterion("sex =", value, "sex");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexNotEqualTo(Integer value) {
+            addCriterion("sex <>", value, "sex");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexGreaterThan(Integer value) {
+            addCriterion("sex >", value, "sex");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexGreaterThanOrEqualTo(Integer value) {
+            addCriterion("sex >=", value, "sex");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexLessThan(Integer value) {
+            addCriterion("sex <", value, "sex");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexLessThanOrEqualTo(Integer value) {
+            addCriterion("sex <=", value, "sex");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexIn(List<Integer> values) {
+            addCriterion("sex in", values, "sex");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexNotIn(List<Integer> values) {
+            addCriterion("sex not in", values, "sex");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexBetween(Integer value1, Integer value2) {
+            addCriterion("sex between", value1, value2, "sex");
+            return (Criteria) this;
+        }
+
+        public Criteria andSexNotBetween(Integer value1, Integer value2) {
+            addCriterion("sex not between", value1, value2, "sex");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileIsNull() {
+            addCriterion("mobile is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileIsNotNull() {
+            addCriterion("mobile is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileEqualTo(String value) {
+            addCriterion("mobile =", value, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileNotEqualTo(String value) {
+            addCriterion("mobile <>", value, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileGreaterThan(String value) {
+            addCriterion("mobile >", value, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileGreaterThanOrEqualTo(String value) {
+            addCriterion("mobile >=", value, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileLessThan(String value) {
+            addCriterion("mobile <", value, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileLessThanOrEqualTo(String value) {
+            addCriterion("mobile <=", value, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileLike(String value) {
+            addCriterion("mobile like", value, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileNotLike(String value) {
+            addCriterion("mobile not like", value, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileIn(List<String> values) {
+            addCriterion("mobile in", values, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileNotIn(List<String> values) {
+            addCriterion("mobile not in", values, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileBetween(String value1, String value2) {
+            addCriterion("mobile between", value1, value2, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andMobileNotBetween(String value1, String value2) {
+            addCriterion("mobile not between", value1, value2, "mobile");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompanyRemarkIsNull() {
+            addCriterion("company_remark is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompanyRemarkIsNotNull() {
+            addCriterion("company_remark is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompanyRemarkEqualTo(String value) {
+            addCriterion("company_remark =", value, "companyRemark");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompanyRemarkNotEqualTo(String value) {
+            addCriterion("company_remark <>", value, "companyRemark");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompanyRemarkGreaterThan(String value) {
+            addCriterion("company_remark >", value, "companyRemark");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompanyRemarkGreaterThanOrEqualTo(String value) {
+            addCriterion("company_remark >=", value, "companyRemark");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompanyRemarkLessThan(String value) {
+            addCriterion("company_remark <", value, "companyRemark");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompanyRemarkLessThanOrEqualTo(String value) {
+            addCriterion("company_remark <=", value, "companyRemark");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompanyRemarkLike(String value) {
+            addCriterion("company_remark like", value, "companyRemark");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompanyRemarkNotLike(String value) {
+            addCriterion("company_remark not like", value, "companyRemark");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompanyRemarkIn(List<String> values) {
+            addCriterion("company_remark in", values, "companyRemark");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompanyRemarkNotIn(List<String> values) {
+            addCriterion("company_remark not in", values, "companyRemark");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompanyRemarkBetween(String value1, String value2) {
+            addCriterion("company_remark between", value1, value2, "companyRemark");
+            return (Criteria) this;
+        }
+
+        public Criteria andCompanyRemarkNotBetween(String value1, String value2) {
+            addCriterion("company_remark not between", value1, value2, "companyRemark");
+            return (Criteria) this;
+        }
+
+        public Criteria andAcctidIsNull() {
+            addCriterion("acctid is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAcctidIsNotNull() {
+            addCriterion("acctid is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAcctidEqualTo(String value) {
+            addCriterion("acctid =", value, "acctid");
+            return (Criteria) this;
+        }
+
+        public Criteria andAcctidNotEqualTo(String value) {
+            addCriterion("acctid <>", value, "acctid");
+            return (Criteria) this;
+        }
+
+        public Criteria andAcctidGreaterThan(String value) {
+            addCriterion("acctid >", value, "acctid");
+            return (Criteria) this;
+        }
+
+        public Criteria andAcctidGreaterThanOrEqualTo(String value) {
+            addCriterion("acctid >=", value, "acctid");
+            return (Criteria) this;
+        }
+
+        public Criteria andAcctidLessThan(String value) {
+            addCriterion("acctid <", value, "acctid");
+            return (Criteria) this;
+        }
+
+        public Criteria andAcctidLessThanOrEqualTo(String value) {
+            addCriterion("acctid <=", value, "acctid");
+            return (Criteria) this;
+        }
+
+        public Criteria andAcctidLike(String value) {
+            addCriterion("acctid like", value, "acctid");
+            return (Criteria) this;
+        }
+
+        public Criteria andAcctidNotLike(String value) {
+            addCriterion("acctid not like", value, "acctid");
+            return (Criteria) this;
+        }
+
+        public Criteria andAcctidIn(List<String> values) {
+            addCriterion("acctid in", values, "acctid");
+            return (Criteria) this;
+        }
+
+        public Criteria andAcctidNotIn(List<String> values) {
+            addCriterion("acctid not in", values, "acctid");
+            return (Criteria) this;
+        }
+
+        public Criteria andAcctidBetween(String value1, String value2) {
+            addCriterion("acctid between", value1, value2, "acctid");
+            return (Criteria) this;
+        }
+
+        public Criteria andAcctidNotBetween(String value1, String value2) {
+            addCriterion("acctid not between", value1, value2, "acctid");
+            return (Criteria) this;
+        }
+
+        public Criteria andAvatarIsNull() {
+            addCriterion("avatar is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAvatarIsNotNull() {
+            addCriterion("avatar is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAvatarEqualTo(String value) {
+            addCriterion("avatar =", value, "avatar");
+            return (Criteria) this;
+        }
+
+        public Criteria andAvatarNotEqualTo(String value) {
+            addCriterion("avatar <>", value, "avatar");
+            return (Criteria) this;
+        }
+
+        public Criteria andAvatarGreaterThan(String value) {
+            addCriterion("avatar >", value, "avatar");
+            return (Criteria) this;
+        }
+
+        public Criteria andAvatarGreaterThanOrEqualTo(String value) {
+            addCriterion("avatar >=", value, "avatar");
+            return (Criteria) this;
+        }
+
+        public Criteria andAvatarLessThan(String value) {
+            addCriterion("avatar <", value, "avatar");
+            return (Criteria) this;
+        }
+
+        public Criteria andAvatarLessThanOrEqualTo(String value) {
+            addCriterion("avatar <=", value, "avatar");
+            return (Criteria) this;
+        }
+
+        public Criteria andAvatarLike(String value) {
+            addCriterion("avatar like", value, "avatar");
+            return (Criteria) this;
+        }
+
+        public Criteria andAvatarNotLike(String value) {
+            addCriterion("avatar not like", value, "avatar");
+            return (Criteria) this;
+        }
+
+        public Criteria andAvatarIn(List<String> values) {
+            addCriterion("avatar in", values, "avatar");
+            return (Criteria) this;
+        }
+
+        public Criteria andAvatarNotIn(List<String> values) {
+            addCriterion("avatar not in", values, "avatar");
+            return (Criteria) this;
+        }
+
+        public Criteria andAvatarBetween(String value1, String value2) {
+            addCriterion("avatar between", value1, value2, "avatar");
+            return (Criteria) this;
+        }
+
+        public Criteria andAvatarNotBetween(String value1, String value2) {
+            addCriterion("avatar not between", value1, value2, "avatar");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceIsNull() {
+            addCriterion("`source` is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceIsNotNull() {
+            addCriterion("`source` is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceEqualTo(Integer value) {
+            addCriterion("`source` =", value, "source");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceNotEqualTo(Integer value) {
+            addCriterion("`source` <>", value, "source");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceGreaterThan(Integer value) {
+            addCriterion("`source` >", value, "source");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceGreaterThanOrEqualTo(Integer value) {
+            addCriterion("`source` >=", value, "source");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceLessThan(Integer value) {
+            addCriterion("`source` <", value, "source");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceLessThanOrEqualTo(Integer value) {
+            addCriterion("`source` <=", value, "source");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceIn(List<Integer> values) {
+            addCriterion("`source` in", values, "source");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceNotIn(List<Integer> values) {
+            addCriterion("`source` not in", values, "source");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceBetween(Integer value1, Integer value2) {
+            addCriterion("`source` between", value1, value2, "source");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceNotBetween(Integer value1, Integer value2) {
+            addCriterion("`source` not between", value1, value2, "source");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnglishNameIsNull() {
+            addCriterion("english_name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnglishNameIsNotNull() {
+            addCriterion("english_name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnglishNameEqualTo(String value) {
+            addCriterion("english_name =", value, "englishName");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnglishNameNotEqualTo(String value) {
+            addCriterion("english_name <>", value, "englishName");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnglishNameGreaterThan(String value) {
+            addCriterion("english_name >", value, "englishName");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnglishNameGreaterThanOrEqualTo(String value) {
+            addCriterion("english_name >=", value, "englishName");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnglishNameLessThan(String value) {
+            addCriterion("english_name <", value, "englishName");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnglishNameLessThanOrEqualTo(String value) {
+            addCriterion("english_name <=", value, "englishName");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnglishNameLike(String value) {
+            addCriterion("english_name like", value, "englishName");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnglishNameNotLike(String value) {
+            addCriterion("english_name not like", value, "englishName");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnglishNameIn(List<String> values) {
+            addCriterion("english_name in", values, "englishName");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnglishNameNotIn(List<String> values) {
+            addCriterion("english_name not in", values, "englishName");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnglishNameBetween(String value1, String value2) {
+            addCriterion("english_name between", value1, value2, "englishName");
+            return (Criteria) this;
+        }
+
+        public Criteria andEnglishNameNotBetween(String value1, String value2) {
+            addCriterion("english_name not between", value1, value2, "englishName");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarkPhoneIsNull() {
+            addCriterion("remark_phone is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarkPhoneIsNotNull() {
+            addCriterion("remark_phone is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarkPhoneEqualTo(String value) {
+            addCriterion("remark_phone =", value, "remarkPhone");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarkPhoneNotEqualTo(String value) {
+            addCriterion("remark_phone <>", value, "remarkPhone");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarkPhoneGreaterThan(String value) {
+            addCriterion("remark_phone >", value, "remarkPhone");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarkPhoneGreaterThanOrEqualTo(String value) {
+            addCriterion("remark_phone >=", value, "remarkPhone");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarkPhoneLessThan(String value) {
+            addCriterion("remark_phone <", value, "remarkPhone");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarkPhoneLessThanOrEqualTo(String value) {
+            addCriterion("remark_phone <=", value, "remarkPhone");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarkPhoneLike(String value) {
+            addCriterion("remark_phone like", value, "remarkPhone");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarkPhoneNotLike(String value) {
+            addCriterion("remark_phone not like", value, "remarkPhone");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarkPhoneIn(List<String> values) {
+            addCriterion("remark_phone in", values, "remarkPhone");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarkPhoneNotIn(List<String> values) {
+            addCriterion("remark_phone not in", values, "remarkPhone");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarkPhoneBetween(String value1, String value2) {
+            addCriterion("remark_phone between", value1, value2, "remarkPhone");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarkPhoneNotBetween(String value1, String value2) {
+            addCriterion("remark_phone not between", value1, value2, "remarkPhone");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealnameIsNull() {
+            addCriterion("realname is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealnameIsNotNull() {
+            addCriterion("realname is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealnameEqualTo(String value) {
+            addCriterion("realname =", value, "realname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealnameNotEqualTo(String value) {
+            addCriterion("realname <>", value, "realname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealnameGreaterThan(String value) {
+            addCriterion("realname >", value, "realname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealnameGreaterThanOrEqualTo(String value) {
+            addCriterion("realname >=", value, "realname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealnameLessThan(String value) {
+            addCriterion("realname <", value, "realname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealnameLessThanOrEqualTo(String value) {
+            addCriterion("realname <=", value, "realname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealnameLike(String value) {
+            addCriterion("realname like", value, "realname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealnameNotLike(String value) {
+            addCriterion("realname not like", value, "realname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealnameIn(List<String> values) {
+            addCriterion("realname in", values, "realname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealnameNotIn(List<String> values) {
+            addCriterion("realname not in", values, "realname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealnameBetween(String value1, String value2) {
+            addCriterion("realname between", value1, value2, "realname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealnameNotBetween(String value1, String value2) {
+            addCriterion("realname not between", value1, value2, "realname");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealRemarksIsNull() {
+            addCriterion("real_remarks is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealRemarksIsNotNull() {
+            addCriterion("real_remarks is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealRemarksEqualTo(String value) {
+            addCriterion("real_remarks =", value, "realRemarks");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealRemarksNotEqualTo(String value) {
+            addCriterion("real_remarks <>", value, "realRemarks");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealRemarksGreaterThan(String value) {
+            addCriterion("real_remarks >", value, "realRemarks");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealRemarksGreaterThanOrEqualTo(String value) {
+            addCriterion("real_remarks >=", value, "realRemarks");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealRemarksLessThan(String value) {
+            addCriterion("real_remarks <", value, "realRemarks");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealRemarksLessThanOrEqualTo(String value) {
+            addCriterion("real_remarks <=", value, "realRemarks");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealRemarksLike(String value) {
+            addCriterion("real_remarks like", value, "realRemarks");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealRemarksNotLike(String value) {
+            addCriterion("real_remarks not like", value, "realRemarks");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealRemarksIn(List<String> values) {
+            addCriterion("real_remarks in", values, "realRemarks");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealRemarksNotIn(List<String> values) {
+            addCriterion("real_remarks not in", values, "realRemarks");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealRemarksBetween(String value1, String value2) {
+            addCriterion("real_remarks between", value1, value2, "realRemarks");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealRemarksNotBetween(String value1, String value2) {
+            addCriterion("real_remarks not between", value1, value2, "realRemarks");
+            return (Criteria) this;
+        }
+
+        public Criteria andLabelidIsNull() {
+            addCriterion("labelid is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andLabelidIsNotNull() {
+            addCriterion("labelid is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andLabelidEqualTo(String value) {
+            addCriterion("labelid =", value, "labelid");
+            return (Criteria) this;
+        }
+
+        public Criteria andLabelidNotEqualTo(String value) {
+            addCriterion("labelid <>", value, "labelid");
+            return (Criteria) this;
+        }
+
+        public Criteria andLabelidGreaterThan(String value) {
+            addCriterion("labelid >", value, "labelid");
+            return (Criteria) this;
+        }
+
+        public Criteria andLabelidGreaterThanOrEqualTo(String value) {
+            addCriterion("labelid >=", value, "labelid");
+            return (Criteria) this;
+        }
+
+        public Criteria andLabelidLessThan(String value) {
+            addCriterion("labelid <", value, "labelid");
+            return (Criteria) this;
+        }
+
+        public Criteria andLabelidLessThanOrEqualTo(String value) {
+            addCriterion("labelid <=", value, "labelid");
+            return (Criteria) this;
+        }
+
+        public Criteria andLabelidLike(String value) {
+            addCriterion("labelid like", value, "labelid");
+            return (Criteria) this;
+        }
+
+        public Criteria andLabelidNotLike(String value) {
+            addCriterion("labelid not like", value, "labelid");
+            return (Criteria) this;
+        }
+
+        public Criteria andLabelidIn(List<String> values) {
+            addCriterion("labelid in", values, "labelid");
+            return (Criteria) this;
+        }
+
+        public Criteria andLabelidNotIn(List<String> values) {
+            addCriterion("labelid not in", values, "labelid");
+            return (Criteria) this;
+        }
+
+        public Criteria andLabelidBetween(String value1, String value2) {
+            addCriterion("labelid between", value1, value2, "labelid");
+            return (Criteria) this;
+        }
+
+        public Criteria andLabelidNotBetween(String value1, String value2) {
+            addCriterion("labelid not between", value1, value2, "labelid");
+            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(Long value) {
+            addCriterion("user_id =", value, "userId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUserIdNotEqualTo(Long value) {
+            addCriterion("user_id <>", value, "userId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUserIdGreaterThan(Long value) {
+            addCriterion("user_id >", value, "userId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUserIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("user_id >=", value, "userId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUserIdLessThan(Long value) {
+            addCriterion("user_id <", value, "userId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUserIdLessThanOrEqualTo(Long value) {
+            addCriterion("user_id <=", value, "userId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUserIdIn(List<Long> values) {
+            addCriterion("user_id in", values, "userId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUserIdNotIn(List<Long> values) {
+            addCriterion("user_id not in", values, "userId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUserIdBetween(Long value1, Long value2) {
+            addCriterion("user_id between", value1, value2, "userId");
+            return (Criteria) this;
+        }
+
+        public Criteria andUserIdNotBetween(Long value1, Long value2) {
+            addCriterion("user_id not between", value1, value2, "userId");
+            return (Criteria) this;
+        }
+
+        public Criteria andNicknameIsNull() {
+            addCriterion("nickname is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNicknameIsNotNull() {
+            addCriterion("nickname is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNicknameEqualTo(String value) {
+            addCriterion("nickname =", value, "nickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andNicknameNotEqualTo(String value) {
+            addCriterion("nickname <>", value, "nickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andNicknameGreaterThan(String value) {
+            addCriterion("nickname >", value, "nickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andNicknameGreaterThanOrEqualTo(String value) {
+            addCriterion("nickname >=", value, "nickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andNicknameLessThan(String value) {
+            addCriterion("nickname <", value, "nickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andNicknameLessThanOrEqualTo(String value) {
+            addCriterion("nickname <=", value, "nickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andNicknameLike(String value) {
+            addCriterion("nickname like", value, "nickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andNicknameNotLike(String value) {
+            addCriterion("nickname not like", value, "nickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andNicknameIn(List<String> values) {
+            addCriterion("nickname in", values, "nickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andNicknameNotIn(List<String> values) {
+            addCriterion("nickname not in", values, "nickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andNicknameBetween(String value1, String value2) {
+            addCriterion("nickname between", value1, value2, "nickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andNicknameNotBetween(String value1, String value2) {
+            addCriterion("nickname not between", value1, value2, "nickname");
+            return (Criteria) this;
+        }
+
+        public Criteria andPositionIsNull() {
+            addCriterion("`position` is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPositionIsNotNull() {
+            addCriterion("`position` is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPositionEqualTo(String value) {
+            addCriterion("`position` =", value, "position");
+            return (Criteria) this;
+        }
+
+        public Criteria andPositionNotEqualTo(String value) {
+            addCriterion("`position` <>", value, "position");
+            return (Criteria) this;
+        }
+
+        public Criteria andPositionGreaterThan(String value) {
+            addCriterion("`position` >", value, "position");
+            return (Criteria) this;
+        }
+
+        public Criteria andPositionGreaterThanOrEqualTo(String value) {
+            addCriterion("`position` >=", value, "position");
+            return (Criteria) this;
+        }
+
+        public Criteria andPositionLessThan(String value) {
+            addCriterion("`position` <", value, "position");
+            return (Criteria) this;
+        }
+
+        public Criteria andPositionLessThanOrEqualTo(String value) {
+            addCriterion("`position` <=", value, "position");
+            return (Criteria) this;
+        }
+
+        public Criteria andPositionLike(String value) {
+            addCriterion("`position` like", value, "position");
+            return (Criteria) this;
+        }
+
+        public Criteria andPositionNotLike(String value) {
+            addCriterion("`position` not like", value, "position");
+            return (Criteria) this;
+        }
+
+        public Criteria andPositionIn(List<String> values) {
+            addCriterion("`position` in", values, "position");
+            return (Criteria) this;
+        }
+
+        public Criteria andPositionNotIn(List<String> values) {
+            addCriterion("`position` not in", values, "position");
+            return (Criteria) this;
+        }
+
+        public Criteria andPositionBetween(String value1, String value2) {
+            addCriterion("`position` between", value1, value2, "position");
+            return (Criteria) this;
+        }
+
+        public Criteria andPositionNotBetween(String value1, String value2) {
+            addCriterion("`position` not between", value1, value2, "position");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdIsNull() {
+            addCriterion("corp_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdIsNotNull() {
+            addCriterion("corp_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdEqualTo(Long value) {
+            addCriterion("corp_id =", value, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdNotEqualTo(Long value) {
+            addCriterion("corp_id <>", value, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdGreaterThan(Long value) {
+            addCriterion("corp_id >", value, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("corp_id >=", value, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdLessThan(Long value) {
+            addCriterion("corp_id <", value, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdLessThanOrEqualTo(Long value) {
+            addCriterion("corp_id <=", value, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdIn(List<Long> values) {
+            addCriterion("corp_id in", values, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdNotIn(List<Long> values) {
+            addCriterion("corp_id not in", values, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdBetween(Long value1, Long value2) {
+            addCriterion("corp_id between", value1, value2, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdNotBetween(Long value1, Long value2) {
+            addCriterion("corp_id not between", value1, value2, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarksIsNull() {
+            addCriterion("remarks is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarksIsNotNull() {
+            addCriterion("remarks is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarksEqualTo(String value) {
+            addCriterion("remarks =", value, "remarks");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarksNotEqualTo(String value) {
+            addCriterion("remarks <>", value, "remarks");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarksGreaterThan(String value) {
+            addCriterion("remarks >", value, "remarks");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarksGreaterThanOrEqualTo(String value) {
+            addCriterion("remarks >=", value, "remarks");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarksLessThan(String value) {
+            addCriterion("remarks <", value, "remarks");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarksLessThanOrEqualTo(String value) {
+            addCriterion("remarks <=", value, "remarks");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarksLike(String value) {
+            addCriterion("remarks like", value, "remarks");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarksNotLike(String value) {
+            addCriterion("remarks not like", value, "remarks");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarksIn(List<String> values) {
+            addCriterion("remarks in", values, "remarks");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarksNotIn(List<String> values) {
+            addCriterion("remarks not in", values, "remarks");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarksBetween(String value1, String value2) {
+            addCriterion("remarks between", value1, value2, "remarks");
+            return (Criteria) this;
+        }
+
+        public Criteria andRemarksNotBetween(String value1, String value2) {
+            addCriterion("remarks not between", value1, value2, "remarks");
+            return (Criteria) this;
+        }
+
+        public Criteria andSeqIsNull() {
+            addCriterion("seq is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSeqIsNotNull() {
+            addCriterion("seq is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSeqEqualTo(Integer value) {
+            addCriterion("seq =", value, "seq");
+            return (Criteria) this;
+        }
+
+        public Criteria andSeqNotEqualTo(Integer value) {
+            addCriterion("seq <>", value, "seq");
+            return (Criteria) this;
+        }
+
+        public Criteria andSeqGreaterThan(Integer value) {
+            addCriterion("seq >", value, "seq");
+            return (Criteria) this;
+        }
+
+        public Criteria andSeqGreaterThanOrEqualTo(Integer value) {
+            addCriterion("seq >=", value, "seq");
+            return (Criteria) this;
+        }
+
+        public Criteria andSeqLessThan(Integer value) {
+            addCriterion("seq <", value, "seq");
+            return (Criteria) this;
+        }
+
+        public Criteria andSeqLessThanOrEqualTo(Integer value) {
+            addCriterion("seq <=", value, "seq");
+            return (Criteria) this;
+        }
+
+        public Criteria andSeqIn(List<Integer> values) {
+            addCriterion("seq in", values, "seq");
+            return (Criteria) this;
+        }
+
+        public Criteria andSeqNotIn(List<Integer> values) {
+            addCriterion("seq not in", values, "seq");
+            return (Criteria) this;
+        }
+
+        public Criteria andSeqBetween(Integer value1, Integer value2) {
+            addCriterion("seq between", value1, value2, "seq");
+            return (Criteria) this;
+        }
+
+        public Criteria andSeqNotBetween(Integer value1, Integer value2) {
+            addCriterion("seq not between", value1, value2, "seq");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNull() {
+            addCriterion("`status` is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNotNull() {
+            addCriterion("`status` is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusEqualTo(Integer value) {
+            addCriterion("`status` =", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotEqualTo(Integer value) {
+            addCriterion("`status` <>", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThan(Integer value) {
+            addCriterion("`status` >", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
+            addCriterion("`status` >=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThan(Integer value) {
+            addCriterion("`status` <", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThanOrEqualTo(Integer value) {
+            addCriterion("`status` <=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIn(List<Integer> values) {
+            addCriterion("`status` in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotIn(List<Integer> values) {
+            addCriterion("`status` not in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusBetween(Integer value1, Integer value2) {
+            addCriterion("`status` between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
+            addCriterion("`status` not between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria 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);
+        }
+    }
+}

+ 6 - 0
api-module/src/main/java/com/tzld/piaoquan/api/service/WeComThirdPartyService.java

@@ -36,4 +36,10 @@ public interface WeComThirdPartyService {
     List<ThirdPartWeComStaff> getActiveStaffList();
 
     List<ThirdPartWeComRoom> getStaffRoomList(Long staffId);
+
+    CreateRoomWxResponse createRoom(CreateRoomWxRequest request);
+
+    List<AntiSpamRuleResponse.AntiSpamRule> queryCRMAntiSpamRule(QueryCRMAntiSpamRuleRequest request);
+
+    void updateRoomSendStatus(UpdateRoomSendStatusRequest request);
 }

+ 61 - 2
api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/impl/ContentPlatformDatastatServiceImpl.java

@@ -49,6 +49,10 @@ public class ContentPlatformDatastatServiceImpl implements ContentPlatformDatast
                 return fwhTotalDatastatList(param);
             case 3:
                 return fwhAccountDatastatList(param);
+            case 5:
+                return gzhPushTotalDatastatList(param);
+            case 6:
+                return gzhPushAccountDatastatList(param);
             default:
                 return gzhAccountDatastatList(param);
         }
@@ -210,7 +214,7 @@ public class ContentPlatformDatastatServiceImpl implements ContentPlatformDatast
             return null;
         }
         Map<Long, ContentPlatformGzhAccount> accountMap = new HashMap<>();
-        if (Arrays.asList(1, 3).contains(type)) {
+        if (Arrays.asList(1, 3, 6).contains(type)) {
             List<Long> accountIds = datastatList.stream().map(ContentPlatformGzhDataStat::getAccountId).distinct().collect(Collectors.toList());
             List<ContentPlatformGzhAccount> accountList = cooperateAccountService.getAccountListByIds(accountIds);
             accountMap = accountList.stream().collect(Collectors.toMap(ContentPlatformGzhAccount::getId, a -> a));
@@ -237,6 +241,61 @@ public class ContentPlatformDatastatServiceImpl implements ContentPlatformDatast
         return result;
     }
 
+    private Page<GzhDatastatItemVO> gzhPushAccountDatastatList(GzhDatastatListParam param) {
+        ContentPlatformAccount user = LoginUserContext.getUser();
+        Page<GzhDatastatItemVO> result = new Page<>(param.getPageNum(), param.getPageSize());
+        int offset = (param.getPageNum() - 1) * param.getPageSize();
+        int count = dataStatMapperExt.getGzhPushTotalDatastatCount(param, user.getId());
+        result.setTotalSize(count);
+        if (count == 0) {
+            return result;
+        }
+        List<ContentPlatformGzhPushDataStatTotal> datastatList = dataStatMapperExt.getGzhPushTotalDatastatList(param,
+                user.getId(), offset, param.getPageSize());
+        List<GzhDatastatItemVO> list = buildGzhPushDatastatTotalItemVOList(datastatList);
+        result.setObjs(list);
+        return result;
+    }
+
+    private List<GzhDatastatItemVO> buildGzhPushDatastatTotalItemVOList(List<ContentPlatformGzhPushDataStatTotal> datastatList) {
+        if (CollectionUtils.isEmpty(datastatList)) {
+            return null;
+        }
+        List<GzhDatastatItemVO> result = new ArrayList<>();
+        for (ContentPlatformGzhPushDataStatTotal datastat : datastatList) {
+            GzhDatastatItemVO vo = new GzhDatastatItemVO();
+            vo.setDateStr(datastat.getDateStr());
+            vo.setFansIncreaseCount(datastat.getFansIncreaseCount());
+            vo.setFirstLevel(datastat.getFirstLevelCount());
+            vo.setScore(datastat.getScore());
+            vo.setUnitPrice(datastat.getUnitPrice());
+            vo.setSettlementAmount(datastat.getSettlementAmount());
+            if (Objects.nonNull(vo.getFansIncreaseCount()) && vo.getFansIncreaseCount() > 0) {
+                BigDecimal num = BigDecimal.valueOf(vo.getFirstLevel() / (double) vo.getFansIncreaseCount());
+                BigDecimal rounded = num.setScale(3, RoundingMode.HALF_UP);
+                vo.setOpenRate(rounded.doubleValue());
+            }
+            result.add(vo);
+        }
+        return result;
+    }
+
+    private Page<GzhDatastatItemVO> gzhPushTotalDatastatList(GzhDatastatListParam param) {
+        ContentPlatformAccount user = LoginUserContext.getUser();
+        Page<GzhDatastatItemVO> result = new Page<>(param.getPageNum(), param.getPageSize());
+        int offset = (param.getPageNum() - 1) * param.getPageSize();
+        int count = dataStatMapperExt.getGzhPushAccountDatastatCount(param, user.getId());
+        result.setTotalSize(count);
+        if (count == 0) {
+            return result;
+        }
+        List<ContentPlatformGzhDataStat> datastatList = dataStatMapperExt.getGzhPushAccountDatastatList(param,
+                user.getId(), offset, param.getPageSize());
+        List<GzhDatastatItemVO> list = buildGzhDatastatItemVOList(param.getType(), datastatList);
+        result.setObjs(list);
+        return result;
+    }
+
     @Override
     public Page<QwDatastatItemVO> qwDatastatList(QwDatastatListParam param) {
         switch (param.getType()) {
@@ -406,7 +465,7 @@ public class ContentPlatformDatastatServiceImpl implements ContentPlatformDatast
         param.setPageSize(10000);
         Page<GzhDatastatItemVO> pageResult = gzhDatastatList(param);
         List<GzhDatastatItemVO> dataList = pageResult.getObjs();
-        if (param.getType() == 1 || param.getType() == 3) {
+        if (param.getType() == 1 || param.getType() == 3 || param.getType() == 6) {
             return generateGzhDatastatExcelFile(dataList);
         } else if (param.getType() == 4) {
             return generateGzhAccountVideoDatastatExcelFile(dataList);

+ 10 - 1
api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/impl/ContentPlatformPlanServiceImpl.java

@@ -242,7 +242,8 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
         ContentPlatformAccount loginAccount = LoginUserContext.getUser();
         List<ContentPlatformGzhPlan> planExistList = planMapperExt.getGzhPlanExists(param.getAccountId(),
                 param.getType(), param.getScene(), param.getId());
-        if (CollectionUtils.isNotEmpty(planExistList) && param.getType() != ContentPlatformGzhPlanTypeEnum.FWH_PUSH.getVal()) {
+        if (CollectionUtils.isNotEmpty(planExistList)
+                && param.getType() == ContentPlatformGzhPlanTypeEnum.AUTO_REPLY.getVal()) {
             throw new CommonException(ExceptionEnum.GZH_SCENE_PLAN_EXISTS);
         }
         if (param.getVideoList().size() > 3) {
@@ -379,6 +380,12 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
                     JSONObject json = JSONObject.parseObject(response);
                     SmallPageUrlDetail smallPageUrlDetail = json.getJSONObject("data").toJavaObject(SmallPageUrlDetail.class);
                     item.setPageUrl(smallPageUrlDetail.getUrl());
+                } else if (param.getType() == ContentPlatformGzhPlanTypeEnum.GZH_PUSH.getVal()) {
+                    String response = touLiuHttpClient.sendAdFlowAddRequest(GET_SMALL_PAGE_URL, String.valueOf(vo.getVideoId()), "longArticles",
+                            loginAccount.getChannel(), "自动", "公众号", "文章插小程序", "小程序", account.getGhId());
+                    JSONObject json = JSONObject.parseObject(response);
+                    SmallPageUrlDetail smallPageUrlDetail = json.getJSONObject("data").toJavaObject(SmallPageUrlDetail.class);
+                    item.setPageUrl(smallPageUrlDetail.getUrl());
                 }
                 item.setCreateAccountId(loginAccount.getId());
                 item.setCreateTimestamp(System.currentTimeMillis());
@@ -494,6 +501,8 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
                 return "企微-社群";
             case 3:
                 return "企微-自动回复";
+            case 4:
+                return "公众号推送";
             default:
                 return "";
         }

+ 23 - 4
api-module/src/main/java/com/tzld/piaoquan/api/service/impl/CgiReplyServiceImpl.java

@@ -5,8 +5,12 @@ import com.alibaba.fastjson.JSONObject;
 import com.tzld.piaoquan.api.common.enums.ExceptionEnum;
 import com.tzld.piaoquan.api.common.enums.ReplyStrategyServiceEnum;
 import com.tzld.piaoquan.api.common.exception.CommonException;
+import com.tzld.piaoquan.api.dao.mapper.GhDetailExtMapper;
 import com.tzld.piaoquan.api.model.bo.BucketDataParam;
+import com.tzld.piaoquan.api.model.bo.MiniPageData;
 import com.tzld.piaoquan.api.model.bo.ReplyBucketData;
+import com.tzld.piaoquan.api.model.po.GhDetailExt;
+import com.tzld.piaoquan.api.model.po.GhDetailExtExample;
 import com.tzld.piaoquan.api.model.vo.VideoCharacteristicVO;
 import com.tzld.piaoquan.api.service.CgiReplyService;
 import com.tzld.piaoquan.api.service.GhDetailService;
@@ -27,10 +31,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
 
 import javax.annotation.PostConstruct;
-import java.util.Comparator;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
+import java.util.*;
 
 @Service
 public class CgiReplyServiceImpl implements CgiReplyService {
@@ -43,6 +44,9 @@ public class CgiReplyServiceImpl implements CgiReplyService {
     @Autowired
     private GhDetailMapper ghDetailMapper;
 
+    @Autowired
+    private GhDetailExtMapper ghDetailExtMapper;
+
     @Autowired
     private CgiReplyBucketDataMapper cgiReplyBucketDataMapper;
 
@@ -75,6 +79,21 @@ public class CgiReplyServiceImpl implements CgiReplyService {
         if (StringUtils.isNotEmpty(ghDetail.getVideoIds())) {
             bucketDataParam.setVideos(JSONArray.parseArray(ghDetail.getVideoIds(), Long.class));
         }
+        GhDetailExtExample ghDetailExtExample = new GhDetailExtExample();
+        ghDetailExtExample.createCriteria().andGhDetailIdEqualTo(ghDetail.getId()).andIsDeleteEqualTo(0);
+        ghDetailExtExample.setOrderByClause("sort desc, id asc");
+        List<GhDetailExt> ghDetailExts = ghDetailExtMapper.selectByExample(ghDetailExtExample);
+        if (!CollectionUtils.isEmpty(ghDetailExts)) {
+            List<MiniPageData> miniPageDatas = new ArrayList<>();
+            for (GhDetailExt ghDetailExt : ghDetailExts) {
+                MiniPageData miniPageData = new MiniPageData();
+                miniPageData.setCover(ghDetailExt.getCover());
+                miniPageData.setPage(ghDetailExt.getPage());
+                miniPageData.setTitle(ghDetailExt.getTitle());
+                miniPageDatas.add(miniPageData);
+            }
+            bucketDataParam.setMiniPageDatas(miniPageDatas);
+        }
         if (Objects.equals(ghDetail.getType(), GhTypeEnum.THIRD_PARTY_GH.type)) {
             bucketDataParam.setChannel(ghDetail.getChannel());
             return getPushMessageData(bucketDataParam);

+ 28 - 4
api-module/src/main/java/com/tzld/piaoquan/api/service/impl/ThirdPartyServiceImpl.java

@@ -3,13 +3,12 @@ package com.tzld.piaoquan.api.service.impl;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.aliyun.odps.data.Record;
-import com.tzld.piaoquan.growth.common.common.enums.GhTypeEnum;
 import com.tzld.piaoquan.api.common.enums.ReplyStrategyServiceEnum;
 import com.tzld.piaoquan.api.common.enums.SecretEnum;
-import com.tzld.piaoquan.growth.common.dao.mapper.GhDetailMapper;
+import com.tzld.piaoquan.api.dao.mapper.GhDetailExtMapper;
 import com.tzld.piaoquan.api.model.bo.*;
-import com.tzld.piaoquan.growth.common.model.po.GhDetail;
-import com.tzld.piaoquan.growth.common.model.po.GhDetailExample;
+import com.tzld.piaoquan.api.model.po.GhDetailExt;
+import com.tzld.piaoquan.api.model.po.GhDetailExtExample;
 import com.tzld.piaoquan.api.model.vo.PushMessageParam;
 import com.tzld.piaoquan.api.model.vo.PushMessageVo;
 import com.tzld.piaoquan.api.model.vo.ReportUvVo;
@@ -19,7 +18,11 @@ import com.tzld.piaoquan.api.service.strategy.ReplyStrategyService;
 import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
 import com.tzld.piaoquan.growth.common.common.constant.TimeConstant;
 import com.tzld.piaoquan.growth.common.common.enums.ExceptionCodeEnum;
+import com.tzld.piaoquan.growth.common.common.enums.GhTypeEnum;
 import com.tzld.piaoquan.growth.common.component.ODPSManager;
+import com.tzld.piaoquan.growth.common.dao.mapper.GhDetailMapper;
+import com.tzld.piaoquan.growth.common.model.po.GhDetail;
+import com.tzld.piaoquan.growth.common.model.po.GhDetailExample;
 import com.tzld.piaoquan.growth.common.utils.DateUtil;
 import com.tzld.piaoquan.growth.common.utils.LarkRobotUtil;
 import lombok.extern.slf4j.Slf4j;
@@ -56,6 +59,9 @@ public class ThirdPartyServiceImpl implements ThirdPartyService {
     @Autowired
     private GhDetailMapper ghDetailMapper;
 
+    @Autowired
+    private GhDetailExtMapper ghDetailExtMapper;
+
     private static final String canViewReportDate = "2024-10-31";
 
     private Map<String, ReplyStrategyService> strategyServiceMap;
@@ -115,6 +121,9 @@ public class ThirdPartyServiceImpl implements ThirdPartyService {
                 MiniData miniData = new MiniData();
                 BeanUtils.copyProperties(msgData, miniData);
                 components.add(miniData);
+                if (StringUtils.isBlank(miniData.getTitle())) {
+                    return CommonResponse.create(ExceptionCodeEnum.PARAMS_ERROR, "视频不可用,请更换视频后重试");
+                }
             }
             pushMessageVo.setGroupIdx(groupData.getGroupIndex());
             pushMessageVo.setComponents(components);
@@ -177,6 +186,21 @@ public class ThirdPartyServiceImpl implements ThirdPartyService {
                 if (StringUtils.isNotEmpty(ghDetail.getVideoIds())) {
                     bucketDataParam.setVideos(JSONArray.parseArray(ghDetail.getVideoIds(), Long.class));
                 }
+                GhDetailExtExample ghDetailExtExample = new GhDetailExtExample();
+                ghDetailExtExample.createCriteria().andGhDetailIdEqualTo(ghDetail.getId()).andIsDeleteEqualTo(0);
+                ghDetailExtExample.setOrderByClause("sort desc, id asc");
+                List<GhDetailExt> ghDetailExts = ghDetailExtMapper.selectByExample(ghDetailExtExample);
+                if (!CollectionUtils.isEmpty(ghDetailExts)) {
+                    List<MiniPageData> miniPageDatas = new ArrayList<>();
+                    for (GhDetailExt ghDetailExt : ghDetailExts) {
+                        MiniPageData miniPageData = new MiniPageData();
+                        miniPageData.setCover(ghDetailExt.getCover());
+                        miniPageData.setPage(ghDetailExt.getPage());
+                        miniPageData.setTitle(ghDetailExt.getTitle());
+                        miniPageDatas.add(miniPageData);
+                    }
+                    bucketDataParam.setMiniPageDatas(miniPageDatas);
+                }
                 return replyStrategyService.getResult(bucketDataParam);
             }
         }

+ 0 - 6
api-module/src/main/java/com/tzld/piaoquan/api/service/impl/WeComAutoReplyImpl.java

@@ -101,12 +101,6 @@ public class WeComAutoReplyImpl implements WeComAutoReply {
             }
             if (msgData.getMsgType() == 3) {
                 JSONObject text = new JSONObject();
-//                String name = getName(externalUserId, corpId);
-//                if (StringUtils.hasText(name)) {
-//                    text.put("content", name + "," + msgData.getTitle());
-//                } else {
-//                    text.put("content", msgData.getTitle());
-//                }
                 text.put("content", msgData.getTitle());
                 param.put("text", text);
             }

+ 32 - 18
api-module/src/main/java/com/tzld/piaoquan/api/service/impl/WeComServiceImpl.java

@@ -3,6 +3,8 @@ package com.tzld.piaoquan.api.service.impl;
 import com.alibaba.fastjson.JSON;
 
 import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.ctrip.framework.apollo.spring.annotation.ApolloJsonValue;
 import com.tzld.piaoquan.api.common.enums.ReplyStrategyServiceEnum;
 import com.tzld.piaoquan.api.dao.mapper.ReplyStaffMapper;
 import com.tzld.piaoquan.api.model.bo.BucketDataParam;
@@ -46,6 +48,9 @@ public class WeComServiceImpl implements WeComService {
     @Autowired
     private ReplyStaffMapper replyStaffMapper;
 
+    @ApolloJsonValue("${special.reply.staff.id:}")
+    private List<Long> specialReplyStaffId;
+
     private Map<String, ReplyStrategyService> strategyServiceMap;
 
     @PostConstruct
@@ -122,15 +127,18 @@ public class WeComServiceImpl implements WeComService {
         ReplyStaff replyStaff = replyStaffs.get(0);
         List<WeComPushMessageVo> res = new ArrayList<>();
         ReplyBucketData replyBucketData = getPushMessageData(replyStaff.getUserId(), replyStaff.getVideoIds());
-        if (replyBucketData == null) {
-            return null;
+        if (replyBucketData == null || CollectionUtils.isEmpty(replyBucketData.getGroupList())) {
+            WeComPushMessageVo weComPushMessageVo = new WeComPushMessageVo();
+            weComPushMessageVo.setGroupIndex(0);
+            List<MsgData> msgDataList = new ArrayList<>();
+            MsgData msgData = getTextMsgData(replyStaff.getId(), replyStaff.getName());
+            msgDataList.add(msgData);
+            weComPushMessageVo.setMsgDataList(msgDataList);
+            res.add(weComPushMessageVo);
+            return res;
         }
         List<GroupData> groupList = replyBucketData.getGroupList();
         log.info("getPushMessageByUserId groupList={}", groupList);
-        if (CollectionUtils.isEmpty(groupList)) {
-            return null;
-        }
-        String name = replyStaff.getName();
         for (GroupData groupData : groupList) {
             if (CollectionUtils.isEmpty(groupData.getMsgDataList())) {
                 continue;
@@ -144,18 +152,7 @@ public class WeComServiceImpl implements WeComService {
                     msgData.setTitle(s);
                 }
             }
-            MsgData msgData = new MsgData();
-            msgData.setMsgType(3);
-            if (replyStaff.getId() == 1) {
-                msgData.setTitle("你好呀~我是智能助手芳华,专门陪您唠唠嗑、解解闷的!\uD83C\uDF39\n" +
-                        "刚发现好多有趣视频想分享给您!偷偷告诉我——您平时最爱看【健康养生】、【历史故事】这类知识干货,还是【人生智慧】【怀旧经典】这些暖心内容呀?\n" +
-                        "(悄悄加个选项\uD83D\uDC49【祝福音乐】\uD83C\uDFB5,马上帮您找!)");
-            } else if (replyStaff.getId() == 3) {
-                msgData.setTitle(String.format("很高兴认识您!我是%s,每天给您推荐精彩视频~", name));
-            } else {
-                msgData.setTitle("叔叔阿姨好,我是好看内容推荐官,每天会为您定制全网热点视频,感谢您的关注,手动转发支持哦~");
-            }
-
+            MsgData msgData = getTextMsgData(replyStaff.getId(), replyStaff.getName());
             msgDataList.add(0, msgData);
             weComPushMessageVo.setMsgDataList(msgDataList);
             res.add(weComPushMessageVo);
@@ -164,6 +161,23 @@ public class WeComServiceImpl implements WeComService {
         return res;
     }
 
+    private MsgData getTextMsgData(Long replyStaffId, String name) {
+        MsgData msgData = new MsgData();
+        msgData.setMsgType(3);
+        if (specialReplyStaffId.contains(replyStaffId)) {
+            msgData.setTitle("欢迎加入票圈老年社区, 每天社群内为您推荐更多精彩视频内容,感谢您的关注!");
+        } else if (replyStaffId == 1) {
+            msgData.setTitle("你好呀~我是智能助手芳华,专门陪您唠唠嗑、解解闷的!\uD83C\uDF39\n" +
+                    "刚发现好多有趣视频想分享给您!偷偷告诉我——您平时最爱看【健康养生】、【历史故事】这类知识干货,还是【人生智慧】【怀旧经典】这些暖心内容呀?\n" +
+                    "(悄悄加个选项\uD83D\uDC49【祝福音乐】\uD83C\uDFB5,马上帮您找!)");
+        } else if (replyStaffId == 3) {
+            msgData.setTitle(String.format("很高兴认识您!我是%s,每天给您推荐精彩视频~", name));
+        } else {
+            msgData.setTitle("叔叔阿姨好,我是好看内容推荐官,每天会为您定制全网热点视频,感谢您的关注,手动转发支持哦~");
+        }
+        return msgData;
+    }
+
     private ReplyBucketData getPushMessageData(String userId, String videoIds) {
         log.info("strategyServiceMap={}", JSON.toJSONString(strategyServiceMap));
         for (Map.Entry<String, ReplyStrategyService> stringReplyStrategyServiceEntry : strategyServiceMap.entrySet()) {

+ 70 - 1
api-module/src/main/java/com/tzld/piaoquan/api/service/impl/WeComThirdPartyServiceImpl.java

@@ -2,6 +2,8 @@ package com.tzld.piaoquan.api.service.impl;
 
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.TypeReference;
+import com.tzld.piaoquan.api.common.enums.ExceptionEnum;
+import com.tzld.piaoquan.api.common.exception.CommonException;
 import com.tzld.piaoquan.api.component.WeComThirdPartyApiClient;
 import com.tzld.piaoquan.api.controller.GetRoomUserListResponse;
 import com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ThirdPartWeComCorpMapper;
@@ -14,6 +16,7 @@ import com.tzld.piaoquan.growth.common.dao.mapper.CorpMapper;
 import com.tzld.piaoquan.growth.common.model.po.Corp;
 import com.tzld.piaoquan.growth.common.model.po.CorpExample;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -296,8 +299,74 @@ public class WeComThirdPartyServiceImpl implements WeComThirdPartyService {
     @Override
     public List<ThirdPartWeComRoom> getStaffRoomList(Long staffId) {
         ThirdPartWeComRoomExample example = new ThirdPartWeComRoomExample();
-        example.createCriteria().andStaffIdEqualTo(staffId);
+        example.createCriteria().andStaffIdEqualTo(staffId).andIsDeleteEqualTo(0);
         return thirdPartWeComRoomMapper.selectByExample(example);
     }
 
+    @Override
+    public CreateRoomWxResponse createRoom(CreateRoomWxRequest request) {
+        String response = apiClient.createRoomWx(request);
+        CommonResponse<CreateRoomWxResponse> commonResponse =
+                JSONObject.parseObject(response, new TypeReference<CommonResponse<CreateRoomWxResponse>>() {});
+        if (commonResponse.getErrcode() != 0) {
+            log.error("create room failed, response: {}", response);
+            return null;
+        }
+        return commonResponse.getData();
+    }
+
+    @Override
+    public List<AntiSpamRuleResponse.AntiSpamRule> queryCRMAntiSpamRule(QueryCRMAntiSpamRuleRequest request) {
+        List<AntiSpamRuleResponse.AntiSpamRule> result = new ArrayList<>();
+        String lastIndexInfo = "";
+        do {
+            request.setLastIndexInfo(lastIndexInfo);
+            String response = apiClient.queryCRMAntiSpamRule(request);
+            CommonResponse<AntiSpamRuleResponse> commonResponse =
+                    JSONObject.parseObject(response, new TypeReference<CommonResponse<AntiSpamRuleResponse>>() {
+                    });
+            if (commonResponse.getErrcode() != 0) {
+                log.error("query crm AntiSpamRule failed, response: {}", response);
+                return result;
+            }
+            result.addAll(commonResponse.getData().getList());
+            if (commonResponse.getData().getIs_end()) {
+                break;
+            }
+            lastIndexInfo = commonResponse.getData().getLast_index_infoo();
+        } while (true);
+        return result;
+    }
+
+    @Override
+    public void updateRoomSendStatus(UpdateRoomSendStatusRequest request) {
+        ThirdPartWeComStaff staff = getStaffByName(request.getStaffName());
+        if (Objects.isNull(staff)) {
+            throw new CommonException(ExceptionEnum.THIRD_PART_STAFF_NOT_FOUND);
+        }
+        ThirdPartWeComRoomExample example = new ThirdPartWeComRoomExample();
+        example.createCriteria().andStaffIdEqualTo(staff.getId()).andNameEqualTo(request.getRoomName());
+        List<ThirdPartWeComRoom> roomList = thirdPartWeComRoomMapper.selectByExample(example);
+        if (CollectionUtils.isEmpty(roomList)) {
+            throw new CommonException(ExceptionEnum.THIRD_PART_ROOM_NOT_FOUND);
+        }
+        for (ThirdPartWeComRoom room : roomList) {
+            room.setSendStatus(request.getSendStatus());
+            if (CollectionUtils.isNotEmpty(request.getSendTimeList())) {
+                room.setSendTime(JSONObject.toJSONString(request.getSendTimeList()));
+            }
+            thirdPartWeComRoomMapper.updateByPrimaryKeySelective(room);
+        }
+    }
+
+    private ThirdPartWeComStaff getStaffByName(String staffName) {
+        ThirdPartWeComStaffExample example = new ThirdPartWeComStaffExample();
+        example.createCriteria().andNameEqualTo(staffName);
+        List<ThirdPartWeComStaff> staffList = thirdPartWeComStaffMapper.selectByExample(example);
+        if (CollectionUtils.isEmpty(staffList)) {
+            return null;
+        }
+        return staffList.get(0);
+    }
+
 }

+ 94 - 48
api-module/src/main/java/com/tzld/piaoquan/api/service/strategy/impl/BuckStrategyV1.java

@@ -277,16 +277,25 @@ public class BuckStrategyV1 implements ReplyStrategyService {
         if (CollectionUtils.isEmpty(smallDataCgiReplyList)) {
             return smallDataCgiReplyList;
         }
+        boolean hasPage = true;
+        for (CgiReplyBucketData cgiReplyBucketData : smallDataCgiReplyList) {
+            if (StringUtils.isEmpty(cgiReplyBucketData.getMiniPagePath())) {
+                hasPage = false;
+            }
+        }
+        if (hasPage) {
+            return smallDataCgiReplyList;
+        }
         String putScene = "touliu";
         String channel = "tencentgzh";
         String ghId1 = smallDataCgiReplyList.get(0).getGhId();
         JSONObject rootSourceConfigs = JSON.parseObject(rootSourceConfig);
         JSONObject jsonObject1 = rootSourceConfigs.getJSONObject(ghId1);
-        if(jsonObject1 != null){
-            if(StringUtils.isNotEmpty(jsonObject1.getString("putScene"))){
+        if (jsonObject1 != null) {
+            if (StringUtils.isNotEmpty(jsonObject1.getString("putScene"))) {
                 putScene = jsonObject1.getString("putScene");
             }
-            if(StringUtils.isNotEmpty(jsonObject1.getString("channel"))){
+            if (StringUtils.isNotEmpty(jsonObject1.getString("channel"))) {
                 channel = jsonObject1.getString("channel");
             }
         }
@@ -381,7 +390,7 @@ public class BuckStrategyV1 implements ReplyStrategyService {
 
     private List<CgiReplyBucketData> getDefaultData(BucketDataParam bucketDataParam, String key) {
         List<CgiReplyBucketData> result = new ArrayList<>();
-        if (CollectionUtils.isEmpty(bucketDataParam.getVideos())) {
+        if (CollectionUtils.isEmpty(bucketDataParam.getVideos()) && CollectionUtils.isEmpty(bucketDataParam.getMiniPageDatas())) {
             return result;
         }
 
@@ -389,58 +398,95 @@ public class BuckStrategyV1 implements ReplyStrategyService {
         countExample.createCriteria().andIsDeleteEqualTo(0).andStrategyEqualTo(key)
                 .andGhIdEqualTo(bucketDataParam.getGhId());
         long allCount = cgiReplyBucketDataMapper.countByExample(countExample);
-        if (allCount == bucketDataParam.getVideos().size()) {
-            int existNum = 0;
-            for (int i = 0; i < bucketDataParam.getVideos().size(); i++) {
-                int sort = i + 1;
-                Long videoId = bucketDataParam.getVideos().get(i);
-                CgiReplyBucketDataExample cgiReplyBucketDataExample = new CgiReplyBucketDataExample();
-                cgiReplyBucketDataExample.createCriteria().andIsDeleteEqualTo(0).andStrategyEqualTo(key)
-                        .andGhIdEqualTo(bucketDataParam.getGhId()).andMiniVideoIdEqualTo(videoId).andSortEqualTo(sort);
-                long count = cgiReplyBucketDataMapper.countByExample(cgiReplyBucketDataExample);
-                if (count > 0) {
-                    existNum++;
+        if (!CollectionUtils.isEmpty(bucketDataParam.getMiniPageDatas())) {
+            if (allCount == bucketDataParam.getMiniPageDatas().size()) {
+                int existNum = 0;
+                for (int i = 0; i < bucketDataParam.getMiniPageDatas().size(); i++) {
+                    int sort = i + 1;
+                    MiniPageData miniPageData = bucketDataParam.getMiniPageDatas().get(i);
+                    CgiReplyBucketDataExample cgiReplyBucketDataExample = new CgiReplyBucketDataExample();
+                    cgiReplyBucketDataExample.createCriteria().andIsDeleteEqualTo(0).andStrategyEqualTo(key)
+                            .andGhIdEqualTo(bucketDataParam.getGhId()).andMiniPagePathEqualTo(miniPageData.getPage()).andSortEqualTo(sort);
+                    long count = cgiReplyBucketDataMapper.countByExample(cgiReplyBucketDataExample);
+                    if (count > 0) {
+                        existNum++;
+                    }
+                }
+                if (existNum == bucketDataParam.getMiniPageDatas().size()) {
+                    return null;
                 }
             }
-            if (existNum == bucketDataParam.getVideos().size()) {
-                return null;
+
+            for (int i = 0; i < bucketDataParam.getMiniPageDatas().size(); i++) {
+                int sort = i + 1;
+                MiniPageData miniPageData = bucketDataParam.getMiniPageDatas().get(i);
+                CgiReplyBucketData cgiReplyBucketData = new CgiReplyBucketData();
+                cgiReplyBucketData.setStrategy(key);
+                cgiReplyBucketData.setSort(sort);
+                cgiReplyBucketData.setGhId(bucketDataParam.getGhId());
+                cgiReplyBucketData.setMsgType(1);
+                cgiReplyBucketData.setCoverUrl(miniPageData.getCover());
+                cgiReplyBucketData.setTitle(miniPageData.getTitle());
+                cgiReplyBucketData.setMiniPagePath(miniPageData.getPage());
+                cgiReplyBucketData.setMiniAppId(SMALL_APP_Id);
+                result.add(cgiReplyBucketData);
             }
-        }
-        for (int i = 0; i < bucketDataParam.getVideos().size(); i++) {
-            int sort = i + 1;
-            Long videoId = bucketDataParam.getVideos().get(i);
-            Map<Long, VideoDetail> videoDetailMap = touLiuHttpClient.getVideoDetailRequest(bucketDataParam.getVideos());
-            List<ContentPlatformGzhPlanVideo> gzhPlanVideoList = contentPlatformPlanService.getGzhPlanVideoListByCooperateAccountId(bucketDataParam.getGhId());
-            Map<Long, ContentPlatformGzhPlanVideo> gzhPlanVideoMap = gzhPlanVideoList.stream().collect(Collectors.toMap(ContentPlatformGzhPlanVideo::getVideoId, x -> x));
-            CgiReplyBucketData cgiReplyBucketData = new CgiReplyBucketData();
-            cgiReplyBucketData.setStrategy(key);
-            cgiReplyBucketData.setSort(sort);
-            cgiReplyBucketData.setGhId(bucketDataParam.getGhId());
-            cgiReplyBucketData.setMsgType(1);
-            VideoDetail videoDetail = videoDetailMap.get(videoId);
-            ContentPlatformGzhPlanVideo gzhPlanVideo = gzhPlanVideoMap.get(videoId);
-            // 内容合作平台视频标题和封面
-            if (Objects.nonNull(gzhPlanVideo)) {
-                cgiReplyBucketData.setTitle(ContentPlatformPlanService.getVideoTitle(gzhPlanVideo));
-                String cover = ContentPlatformPlanService.getVideoCover(gzhPlanVideo);
-                if (StringUtils.isNotEmpty(cover)) {
-                    String coverSuffix = videoDetail.getCover().substring(videoDetail.getCover().indexOf("?"));
-                    if (cover.contains("?") && cover.contains("image/resize")) {
-                        coverSuffix = videoDetail.getCover().substring(videoDetail.getCover().indexOf("/watermark"));
+        } else if (!CollectionUtils.isEmpty(bucketDataParam.getVideos())) {
+            if (allCount == bucketDataParam.getVideos().size()) {
+                int existNum = 0;
+                for (int i = 0; i < bucketDataParam.getVideos().size(); i++) {
+                    int sort = i + 1;
+                    Long videoId = bucketDataParam.getVideos().get(i);
+                    CgiReplyBucketDataExample cgiReplyBucketDataExample = new CgiReplyBucketDataExample();
+                    cgiReplyBucketDataExample.createCriteria().andIsDeleteEqualTo(0).andStrategyEqualTo(key)
+                            .andGhIdEqualTo(bucketDataParam.getGhId()).andMiniVideoIdEqualTo(videoId).andSortEqualTo(sort);
+                    long count = cgiReplyBucketDataMapper.countByExample(cgiReplyBucketDataExample);
+                    if (count > 0) {
+                        existNum++;
                     }
-                    cgiReplyBucketData.setCoverUrl(cover + coverSuffix);
                 }
-            } else {
-                if (videoDetail != null && StringUtils.isNotEmpty(videoDetail.getCover())) {
-                    cgiReplyBucketData.setCoverUrl(videoDetail.getCover());
+                if (existNum == bucketDataParam.getVideos().size()) {
+                    return null;
                 }
-                if (videoDetail != null && StringUtils.isNotEmpty(videoDetail.getTitle())) {
-                    cgiReplyBucketData.setTitle(videoDetail.getTitle());
+            }
+            for (int i = 0; i < bucketDataParam.getVideos().size(); i++) {
+                int sort = i + 1;
+                Long videoId = bucketDataParam.getVideos().get(i);
+                Map<Long, VideoDetail> videoDetailMap = touLiuHttpClient.getVideoDetailRequest(bucketDataParam.getVideos());
+                List<ContentPlatformGzhPlanVideo> gzhPlanVideoList = contentPlatformPlanService.getGzhPlanVideoListByCooperateAccountId(bucketDataParam.getGhId());
+                Map<Long, ContentPlatformGzhPlanVideo> gzhPlanVideoMap = gzhPlanVideoList.stream().collect(Collectors.toMap(ContentPlatformGzhPlanVideo::getVideoId, x -> x));
+                CgiReplyBucketData cgiReplyBucketData = new CgiReplyBucketData();
+                cgiReplyBucketData.setStrategy(key);
+                cgiReplyBucketData.setSort(sort);
+                cgiReplyBucketData.setGhId(bucketDataParam.getGhId());
+                cgiReplyBucketData.setMsgType(1);
+                VideoDetail videoDetail = videoDetailMap.get(videoId);
+                ContentPlatformGzhPlanVideo gzhPlanVideo = gzhPlanVideoMap.get(videoId);
+                // 内容合作平台视频标题和封面
+                if (Objects.nonNull(gzhPlanVideo) && Objects.nonNull(videoDetail)) {
+                    cgiReplyBucketData.setTitle(ContentPlatformPlanService.getVideoTitle(gzhPlanVideo));
+                    String cover = ContentPlatformPlanService.getVideoCover(gzhPlanVideo);
+                    if (StringUtils.isNotEmpty(cover)) {
+                        String coverSuffix = videoDetail.getCover().substring(videoDetail.getCover().indexOf("?"));
+                        if (cover.contains("?") && cover.contains("image/resize")) {
+                            coverSuffix = videoDetail.getCover().substring(videoDetail.getCover().indexOf("/watermark"));
+                        }
+                        cgiReplyBucketData.setCoverUrl(cover + coverSuffix);
+                    }
+                } else {
+                    if (videoDetail != null && StringUtils.isNotEmpty(videoDetail.getCover())) {
+                        cgiReplyBucketData.setCoverUrl(videoDetail.getCover());
+                    }
+                    if (videoDetail != null && StringUtils.isNotEmpty(videoDetail.getTitle())) {
+                        cgiReplyBucketData.setTitle(videoDetail.getTitle());
+                    }
                 }
+                cgiReplyBucketData.setMiniAppId(SMALL_APP_Id);
+                cgiReplyBucketData.setMiniVideoId(videoId);
+                result.add(cgiReplyBucketData);
             }
-            cgiReplyBucketData.setMiniAppId(SMALL_APP_Id);
-            cgiReplyBucketData.setMiniVideoId(videoId);
-            result.add(cgiReplyBucketData);
+        } else {
+            return null;
         }
         return result;
     }

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

@@ -182,6 +182,15 @@ public class ThirdPartyPushMessageStrategyV1 implements ReplyStrategyService {
         if (CollectionUtils.isEmpty(smallDataCgiReplyList)) {
             return smallDataCgiReplyList;
         }
+        boolean hasPage = true;
+        for (CgiReplyBucketData cgiReplyBucketData : smallDataCgiReplyList) {
+            if (StringUtils.isEmpty(cgiReplyBucketData.getMiniPagePath())) {
+                hasPage = false;
+            }
+        }
+        if (hasPage) {
+            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
@@ -237,69 +246,106 @@ public class ThirdPartyPushMessageStrategyV1 implements ReplyStrategyService {
                 continue;
             }
             if (Objects.equals(StrategyStatusEnum.DEFAULT.status, bucketDataParam.getStrategyStatus())) {
-                if (CollectionUtils.isEmpty(bucketDataParam.getVideos())) {
+                if (CollectionUtils.isEmpty(bucketDataParam.getVideos()) && CollectionUtils.isEmpty(bucketDataParam.getMiniPageDatas())) {
                     return null;
                 }
                 CgiReplyBucketDataExample countExample = new CgiReplyBucketDataExample();
                 countExample.createCriteria().andIsDeleteEqualTo(0).andStrategyEqualTo(key)
                         .andGhIdEqualTo(bucketDataParam.getGhId());
                 long allCount = cgiReplyBucketDataMapper.countByExample(countExample);
-                if (allCount == bucketDataParam.getVideos().size()) {
-                    int existNum = 0;
-                    for (int i = 0; i < bucketDataParam.getVideos().size(); i++) {
-                        int sort = i + 1;
-                        Long videoId = bucketDataParam.getVideos().get(i);
-                        CgiReplyBucketDataExample cgiReplyBucketDataExample = new CgiReplyBucketDataExample();
-                        cgiReplyBucketDataExample.createCriteria().andIsDeleteEqualTo(0).andStrategyEqualTo(key)
-                                .andGhIdEqualTo(bucketDataParam.getGhId()).andMiniVideoIdEqualTo(videoId).andSortEqualTo(sort);
-                        long count = cgiReplyBucketDataMapper.countByExample(cgiReplyBucketDataExample);
-                        if (count > 0) {
-                            existNum++;
+                if (!CollectionUtils.isEmpty(bucketDataParam.getMiniPageDatas())) {
+                    if (allCount == bucketDataParam.getMiniPageDatas().size()) {
+                        int existNum = 0;
+                        for (int i = 0; i < bucketDataParam.getMiniPageDatas().size(); i++) {
+                            int sort = i + 1;
+                            MiniPageData miniPageData = bucketDataParam.getMiniPageDatas().get(i);
+                            CgiReplyBucketDataExample cgiReplyBucketDataExample = new CgiReplyBucketDataExample();
+                            cgiReplyBucketDataExample.createCriteria().andIsDeleteEqualTo(0).andStrategyEqualTo(key)
+                                    .andGhIdEqualTo(bucketDataParam.getGhId()).andMiniPagePathEqualTo(miniPageData.getPage()).andSortEqualTo(sort);
+                            long count = cgiReplyBucketDataMapper.countByExample(cgiReplyBucketDataExample);
+                            if (count > 0) {
+                                existNum++;
+                            }
+                        }
+                        if (existNum == bucketDataParam.getMiniPageDatas().size()) {
+                            return null;
                         }
                     }
-                    if (existNum == bucketDataParam.getVideos().size()) {
-                        continue;
+                    for (int i = 0; i < bucketDataParam.getMiniPageDatas().size(); i++) {
+                        int sort = i + 1;
+                        MiniPageData miniPageData = bucketDataParam.getMiniPageDatas().get(i);
+                        CgiReplyBucketData cgiReplyBucketData = new CgiReplyBucketData();
+                        cgiReplyBucketData.setStrategy(key);
+                        cgiReplyBucketData.setSort(sort);
+                        cgiReplyBucketData.setGhId(bucketDataParam.getGhId());
+                        cgiReplyBucketData.setMsgType(1);
+                        cgiReplyBucketData.setCoverUrl(miniPageData.getCover());
+                        cgiReplyBucketData.setTitle(miniPageData.getTitle());
+                        cgiReplyBucketData.setMiniPagePath(miniPageData.getPage());
+                        cgiReplyBucketData.setMiniAppId(SMALL_APP_Id);
+                        result.add(cgiReplyBucketData);
                     }
-                }
-                Map<Long, VideoDetail> videoDetailMap = touLiuHttpClient.getVideoDetailRequest(bucketDataParam.getVideos());
-                List<ContentPlatformGzhPlanVideo> gzhPlanVideoList = contentPlatformPlanService.getGzhPlanVideoListByCooperateAccountId(bucketDataParam.getGhId());
-                Map<Long, ContentPlatformGzhPlanVideo> gzhPlanVideoMap = gzhPlanVideoList.stream()
-                        .collect(Collectors.toMap(ContentPlatformGzhPlanVideo::getVideoId, x -> x, (a, b) -> b));
-                for (int i = 0; i < bucketDataParam.getVideos().size(); i++) {
-                    int sort = i + 1;
-                    Long videoId = bucketDataParam.getVideos().get(i);
-                    CgiReplyBucketData cgiReplyBucketData = new CgiReplyBucketData();
-                    cgiReplyBucketData.setStrategy(key);
-                    cgiReplyBucketData.setSort(sort);
-                    cgiReplyBucketData.setGhId(bucketDataParam.getGhId());
-                    cgiReplyBucketData.setMsgType(1);
-                    VideoDetail videoDetail = videoDetailMap.get(videoId);
-                    ContentPlatformGzhPlanVideo gzhPlanVideo = gzhPlanVideoMap.get(videoId);
-                    // 内容合作平台视频标题和封面
-                    if (Objects.nonNull(gzhPlanVideo)) {
-                        cgiReplyBucketData.setTitle(ContentPlatformPlanService.getVideoTitle(gzhPlanVideo));
-                        String cover = ContentPlatformPlanService.getVideoCover(gzhPlanVideo);
-                        if (StringUtils.isNotEmpty(cover)) {
-                            String coverSuffix = videoDetail.getCover().substring(videoDetail.getCover().indexOf("?"));
-                            if (cover.contains("?") && cover.contains("image/resize")) {
-                                coverSuffix = videoDetail.getCover().substring(videoDetail.getCover().indexOf("/watermark"));
-                            }
-                            if (!cover.contains("yishihui")) {
-                                coverSuffix = "?x-oss-process=image/resize,m_fill,w_600,h_480,limit_0/format,jpg";
+                } else if (!CollectionUtils.isEmpty(bucketDataParam.getVideos())) {
+                    if (allCount == bucketDataParam.getVideos().size()) {
+                        int existNum = 0;
+                        for (int i = 0; i < bucketDataParam.getVideos().size(); i++) {
+                            int sort = i + 1;
+                            Long videoId = bucketDataParam.getVideos().get(i);
+                            CgiReplyBucketDataExample cgiReplyBucketDataExample = new CgiReplyBucketDataExample();
+                            cgiReplyBucketDataExample.createCriteria().andIsDeleteEqualTo(0).andStrategyEqualTo(key)
+                                    .andGhIdEqualTo(bucketDataParam.getGhId()).andMiniVideoIdEqualTo(videoId).andSortEqualTo(sort);
+                            long count = cgiReplyBucketDataMapper.countByExample(cgiReplyBucketDataExample);
+                            if (count > 0) {
+                                existNum++;
                             }
-                            cgiReplyBucketData.setCoverUrl(cover + coverSuffix);
                         }
-                    } else {
-                        if (videoDetail != null && StringUtils.isNotEmpty(videoDetail.getCover())) {
-                            cgiReplyBucketData.setCoverUrl(videoDetail.getCover());
+                        if (existNum == bucketDataParam.getVideos().size()) {
+                            continue;
                         }
-                        if (videoDetail != null && StringUtils.isNotEmpty(videoDetail.getTitle())) {
-                            cgiReplyBucketData.setTitle(videoDetail.getTitle());
+                    }
+                    Map<Long, VideoDetail> videoDetailMap = touLiuHttpClient.getVideoDetailRequest(bucketDataParam.getVideos());
+                    List<ContentPlatformGzhPlanVideo> gzhPlanVideoList = contentPlatformPlanService.getGzhPlanVideoListByCooperateAccountId(bucketDataParam.getGhId());
+                    Map<Long, ContentPlatformGzhPlanVideo> gzhPlanVideoMap = gzhPlanVideoList.stream()
+                            .collect(Collectors.toMap(ContentPlatformGzhPlanVideo::getVideoId, x -> x, (a, b) -> b));
+                    for (int i = 0; i < bucketDataParam.getVideos().size(); i++) {
+                        int sort = i + 1;
+                        Long videoId = bucketDataParam.getVideos().get(i);
+                        CgiReplyBucketData cgiReplyBucketData = new CgiReplyBucketData();
+                        cgiReplyBucketData.setStrategy(key);
+                        cgiReplyBucketData.setSort(sort);
+                        cgiReplyBucketData.setGhId(bucketDataParam.getGhId());
+                        cgiReplyBucketData.setMsgType(1);
+                        VideoDetail videoDetail = videoDetailMap.get(videoId);
+                        ContentPlatformGzhPlanVideo gzhPlanVideo = gzhPlanVideoMap.get(videoId);
+                        // 内容合作平台视频标题和封面
+                        if (Objects.nonNull(gzhPlanVideo) && Objects.nonNull(videoDetail)) {
+                            cgiReplyBucketData.setTitle(ContentPlatformPlanService.getVideoTitle(gzhPlanVideo));
+                            String cover = ContentPlatformPlanService.getVideoCover(gzhPlanVideo);
+                            if (StringUtils.isNotEmpty(cover)) {
+                                String coverSuffix = videoDetail.getCover().substring(videoDetail.getCover().indexOf("?"));
+                                if (cover.contains("?") && cover.contains("image/resize")) {
+                                    coverSuffix = videoDetail.getCover().substring(videoDetail.getCover().indexOf("/watermark"));
+                                }
+                                if (!cover.contains("yishihui")) {
+                                    coverSuffix = "?x-oss-process=image/resize,m_fill,w_600,h_480,limit_0/format,jpg";
+                                }
+                                cgiReplyBucketData.setCoverUrl(cover + coverSuffix);
+                            }
+                        } else {
+                            if (videoDetail != null && StringUtils.isNotEmpty(videoDetail.getCover())) {
+                                cgiReplyBucketData.setCoverUrl(videoDetail.getCover());
+                            }
+                            if (videoDetail != null && StringUtils.isNotEmpty(videoDetail.getTitle())) {
+                                cgiReplyBucketData.setTitle(videoDetail.getTitle());
+                            }
                         }
+                        cgiReplyBucketData.setMiniAppId(SMALL_APP_Id);
+                        cgiReplyBucketData.setMiniVideoId(videoId);
+                        result.add(cgiReplyBucketData);
                     }
-                    cgiReplyBucketData.setMiniAppId(SMALL_APP_Id);
-                    cgiReplyBucketData.setMiniVideoId(videoId);
-                    result.add(cgiReplyBucketData);
+
+                } else {
+                    return null;
                 }
             } else {
                 // 获取最新dt的策略

+ 278 - 0
api-module/src/main/resources/mapper/GhDetailExtMapper.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.GhDetailExtMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.api.model.po.GhDetailExt">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="gh_detail_id" jdbcType="BIGINT" property="ghDetailId" />
+    <result column="page" jdbcType="VARCHAR" property="page" />
+    <result column="title" jdbcType="VARCHAR" property="title" />
+    <result column="cover" jdbcType="VARCHAR" property="cover" />
+    <result column="sort" jdbcType="INTEGER" property="sort" />
+    <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, gh_detail_id, page, title, cover, sort, is_delete, create_time, update_time
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.GhDetailExtExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from gh_detail_ext
+    <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_ext
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from gh_detail_ext
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.api.model.po.GhDetailExtExample">
+    delete from gh_detail_ext
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.GhDetailExt">
+    insert into gh_detail_ext (id, gh_detail_id, page, 
+      title, cover, sort, 
+      is_delete, create_time, update_time
+      )
+    values (#{id,jdbcType=BIGINT}, #{ghDetailId,jdbcType=BIGINT}, #{page,jdbcType=VARCHAR}, 
+      #{title,jdbcType=VARCHAR}, #{cover,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, 
+      #{isDelete,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.GhDetailExt">
+    insert into gh_detail_ext
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="ghDetailId != null">
+        gh_detail_id,
+      </if>
+      <if test="page != null">
+        page,
+      </if>
+      <if test="title != null">
+        title,
+      </if>
+      <if test="cover != null">
+        cover,
+      </if>
+      <if test="sort != null">
+        sort,
+      </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="ghDetailId != null">
+        #{ghDetailId,jdbcType=BIGINT},
+      </if>
+      <if test="page != null">
+        #{page,jdbcType=VARCHAR},
+      </if>
+      <if test="title != null">
+        #{title,jdbcType=VARCHAR},
+      </if>
+      <if test="cover != null">
+        #{cover,jdbcType=VARCHAR},
+      </if>
+      <if test="sort != null">
+        #{sort,jdbcType=INTEGER},
+      </if>
+      <if test="isDelete != null">
+        #{isDelete,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.tzld.piaoquan.api.model.po.GhDetailExtExample" resultType="java.lang.Long">
+    select count(*) from gh_detail_ext
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update gh_detail_ext
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.ghDetailId != null">
+        gh_detail_id = #{record.ghDetailId,jdbcType=BIGINT},
+      </if>
+      <if test="record.page != null">
+        page = #{record.page,jdbcType=VARCHAR},
+      </if>
+      <if test="record.title != null">
+        title = #{record.title,jdbcType=VARCHAR},
+      </if>
+      <if test="record.cover != null">
+        cover = #{record.cover,jdbcType=VARCHAR},
+      </if>
+      <if test="record.sort != null">
+        sort = #{record.sort,jdbcType=INTEGER},
+      </if>
+      <if test="record.isDelete != null">
+        is_delete = #{record.isDelete,jdbcType=INTEGER},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.updateTime != null">
+        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update gh_detail_ext
+    set id = #{record.id,jdbcType=BIGINT},
+      gh_detail_id = #{record.ghDetailId,jdbcType=BIGINT},
+      page = #{record.page,jdbcType=VARCHAR},
+      title = #{record.title,jdbcType=VARCHAR},
+      cover = #{record.cover,jdbcType=VARCHAR},
+      sort = #{record.sort,jdbcType=INTEGER},
+      is_delete = #{record.isDelete,jdbcType=INTEGER},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      update_time = #{record.updateTime,jdbcType=TIMESTAMP}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.api.model.po.GhDetailExt">
+    update gh_detail_ext
+    <set>
+      <if test="ghDetailId != null">
+        gh_detail_id = #{ghDetailId,jdbcType=BIGINT},
+      </if>
+      <if test="page != null">
+        page = #{page,jdbcType=VARCHAR},
+      </if>
+      <if test="title != null">
+        title = #{title,jdbcType=VARCHAR},
+      </if>
+      <if test="cover != null">
+        cover = #{cover,jdbcType=VARCHAR},
+      </if>
+      <if test="sort != null">
+        sort = #{sort,jdbcType=INTEGER},
+      </if>
+      <if test="isDelete != null">
+        is_delete = #{isDelete,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.api.model.po.GhDetailExt">
+    update gh_detail_ext
+    set gh_detail_id = #{ghDetailId,jdbcType=BIGINT},
+      page = #{page,jdbcType=VARCHAR},
+      title = #{title,jdbcType=VARCHAR},
+      cover = #{cover,jdbcType=VARCHAR},
+      sort = #{sort,jdbcType=INTEGER},
+      is_delete = #{isDelete,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_time = #{updateTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 246 - 0
api-module/src/main/resources/mapper/contentplatform/ContentPlatformGzhPushDataStatMapper.xml

@@ -0,0 +1,246 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.tzld.piaoquan.api.dao.mapper.contentplatform.ContentPlatformGzhPushDataStatMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhPushDataStat">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="date_str" jdbcType="VARCHAR" property="dateStr" />
+    <result column="account_id" jdbcType="BIGINT" property="accountId" />
+    <result column="fans_increase_count" jdbcType="INTEGER" property="fansIncreaseCount" />
+    <result column="first_level_count" jdbcType="INTEGER" property="firstLevelCount" />
+    <result column="score" jdbcType="DOUBLE" property="score" />
+    <result column="create_timestamp" jdbcType="BIGINT" property="createTimestamp" />
+  </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, date_str, account_id, fans_increase_count, first_level_count, score, create_timestamp
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhPushDataStatExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from content_platform_gzh_push_datastat
+    <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 content_platform_gzh_push_datastat
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from content_platform_gzh_push_datastat
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhPushDataStatExample">
+    delete from content_platform_gzh_push_datastat
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhPushDataStat">
+    insert into content_platform_gzh_push_datastat (id, date_str, account_id, 
+      fans_increase_count, first_level_count, score, 
+      create_timestamp)
+    values (#{id,jdbcType=BIGINT}, #{dateStr,jdbcType=VARCHAR}, #{accountId,jdbcType=BIGINT}, 
+      #{fansIncreaseCount,jdbcType=INTEGER}, #{firstLevelCount,jdbcType=INTEGER}, #{score,jdbcType=DOUBLE}, 
+      #{createTimestamp,jdbcType=BIGINT})
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhPushDataStat">
+    insert into content_platform_gzh_push_datastat
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="dateStr != null">
+        date_str,
+      </if>
+      <if test="accountId != null">
+        account_id,
+      </if>
+      <if test="fansIncreaseCount != null">
+        fans_increase_count,
+      </if>
+      <if test="firstLevelCount != null">
+        first_level_count,
+      </if>
+      <if test="score != null">
+        score,
+      </if>
+      <if test="createTimestamp != null">
+        create_timestamp,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=BIGINT},
+      </if>
+      <if test="dateStr != null">
+        #{dateStr,jdbcType=VARCHAR},
+      </if>
+      <if test="accountId != null">
+        #{accountId,jdbcType=BIGINT},
+      </if>
+      <if test="fansIncreaseCount != null">
+        #{fansIncreaseCount,jdbcType=INTEGER},
+      </if>
+      <if test="firstLevelCount != null">
+        #{firstLevelCount,jdbcType=INTEGER},
+      </if>
+      <if test="score != null">
+        #{score,jdbcType=DOUBLE},
+      </if>
+      <if test="createTimestamp != null">
+        #{createTimestamp,jdbcType=BIGINT},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhPushDataStatExample" resultType="java.lang.Long">
+    select count(*) from content_platform_gzh_push_datastat
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update content_platform_gzh_push_datastat
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.dateStr != null">
+        date_str = #{record.dateStr,jdbcType=VARCHAR},
+      </if>
+      <if test="record.accountId != null">
+        account_id = #{record.accountId,jdbcType=BIGINT},
+      </if>
+      <if test="record.fansIncreaseCount != null">
+        fans_increase_count = #{record.fansIncreaseCount,jdbcType=INTEGER},
+      </if>
+      <if test="record.firstLevelCount != null">
+        first_level_count = #{record.firstLevelCount,jdbcType=INTEGER},
+      </if>
+      <if test="record.score != null">
+        score = #{record.score,jdbcType=DOUBLE},
+      </if>
+      <if test="record.createTimestamp != null">
+        create_timestamp = #{record.createTimestamp,jdbcType=BIGINT},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update content_platform_gzh_push_datastat
+    set id = #{record.id,jdbcType=BIGINT},
+      date_str = #{record.dateStr,jdbcType=VARCHAR},
+      account_id = #{record.accountId,jdbcType=BIGINT},
+      fans_increase_count = #{record.fansIncreaseCount,jdbcType=INTEGER},
+      first_level_count = #{record.firstLevelCount,jdbcType=INTEGER},
+      score = #{record.score,jdbcType=DOUBLE},
+      create_timestamp = #{record.createTimestamp,jdbcType=BIGINT}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhPushDataStat">
+    update content_platform_gzh_push_datastat
+    <set>
+      <if test="dateStr != null">
+        date_str = #{dateStr,jdbcType=VARCHAR},
+      </if>
+      <if test="accountId != null">
+        account_id = #{accountId,jdbcType=BIGINT},
+      </if>
+      <if test="fansIncreaseCount != null">
+        fans_increase_count = #{fansIncreaseCount,jdbcType=INTEGER},
+      </if>
+      <if test="firstLevelCount != null">
+        first_level_count = #{firstLevelCount,jdbcType=INTEGER},
+      </if>
+      <if test="score != null">
+        score = #{score,jdbcType=DOUBLE},
+      </if>
+      <if test="createTimestamp != null">
+        create_timestamp = #{createTimestamp,jdbcType=BIGINT},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhPushDataStat">
+    update content_platform_gzh_push_datastat
+    set date_str = #{dateStr,jdbcType=VARCHAR},
+      account_id = #{accountId,jdbcType=BIGINT},
+      fans_increase_count = #{fansIncreaseCount,jdbcType=INTEGER},
+      first_level_count = #{firstLevelCount,jdbcType=INTEGER},
+      score = #{score,jdbcType=DOUBLE},
+      create_timestamp = #{createTimestamp,jdbcType=BIGINT}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 279 - 0
api-module/src/main/resources/mapper/contentplatform/ContentPlatformGzhPushDataStatTotalMapper.xml

@@ -0,0 +1,279 @@
+<?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.contentplatform.ContentPlatformGzhPushDataStatTotalMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhPushDataStatTotal">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="date_str" jdbcType="VARCHAR" property="dateStr" />
+    <result column="channel" jdbcType="VARCHAR" property="channel" />
+    <result column="fans_increase_count" jdbcType="INTEGER" property="fansIncreaseCount" />
+    <result column="first_level_count" jdbcType="INTEGER" property="firstLevelCount" />
+    <result column="score" jdbcType="DOUBLE" property="score" />
+    <result column="unit_price" jdbcType="DOUBLE" property="unitPrice" />
+    <result column="settlement_amount" jdbcType="DOUBLE" property="settlementAmount" />
+    <result column="create_timestamp" jdbcType="BIGINT" property="createTimestamp" />
+  </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, date_str, channel, fans_increase_count, first_level_count, score, unit_price, 
+    settlement_amount, create_timestamp
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhPushDataStatTotalExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from content_platform_gzh_push_datastat_total
+    <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 content_platform_gzh_push_datastat_total
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from content_platform_gzh_push_datastat_total
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhPushDataStatTotalExample">
+    delete from content_platform_gzh_push_datastat_total
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhPushDataStatTotal">
+    insert into content_platform_gzh_push_datastat_total (id, date_str, channel, 
+      fans_increase_count, first_level_count, score, 
+      unit_price, settlement_amount, create_timestamp
+      )
+    values (#{id,jdbcType=BIGINT}, #{dateStr,jdbcType=VARCHAR}, #{channel,jdbcType=VARCHAR}, 
+      #{fansIncreaseCount,jdbcType=INTEGER}, #{firstLevelCount,jdbcType=INTEGER}, #{score,jdbcType=DOUBLE}, 
+      #{unitPrice,jdbcType=DOUBLE}, #{settlementAmount,jdbcType=DOUBLE}, #{createTimestamp,jdbcType=BIGINT}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhPushDataStatTotal">
+    insert into content_platform_gzh_push_datastat_total
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="dateStr != null">
+        date_str,
+      </if>
+      <if test="channel != null">
+        channel,
+      </if>
+      <if test="fansIncreaseCount != null">
+        fans_increase_count,
+      </if>
+      <if test="firstLevelCount != null">
+        first_level_count,
+      </if>
+      <if test="score != null">
+        score,
+      </if>
+      <if test="unitPrice != null">
+        unit_price,
+      </if>
+      <if test="settlementAmount != null">
+        settlement_amount,
+      </if>
+      <if test="createTimestamp != null">
+        create_timestamp,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=BIGINT},
+      </if>
+      <if test="dateStr != null">
+        #{dateStr,jdbcType=VARCHAR},
+      </if>
+      <if test="channel != null">
+        #{channel,jdbcType=VARCHAR},
+      </if>
+      <if test="fansIncreaseCount != null">
+        #{fansIncreaseCount,jdbcType=INTEGER},
+      </if>
+      <if test="firstLevelCount != null">
+        #{firstLevelCount,jdbcType=INTEGER},
+      </if>
+      <if test="score != null">
+        #{score,jdbcType=DOUBLE},
+      </if>
+      <if test="unitPrice != null">
+        #{unitPrice,jdbcType=DOUBLE},
+      </if>
+      <if test="settlementAmount != null">
+        #{settlementAmount,jdbcType=DOUBLE},
+      </if>
+      <if test="createTimestamp != null">
+        #{createTimestamp,jdbcType=BIGINT},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhPushDataStatTotalExample" resultType="java.lang.Long">
+    select count(*) from content_platform_gzh_push_datastat_total
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update content_platform_gzh_push_datastat_total
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.dateStr != null">
+        date_str = #{record.dateStr,jdbcType=VARCHAR},
+      </if>
+      <if test="record.channel != null">
+        channel = #{record.channel,jdbcType=VARCHAR},
+      </if>
+      <if test="record.fansIncreaseCount != null">
+        fans_increase_count = #{record.fansIncreaseCount,jdbcType=INTEGER},
+      </if>
+      <if test="record.firstLevelCount != null">
+        first_level_count = #{record.firstLevelCount,jdbcType=INTEGER},
+      </if>
+      <if test="record.score != null">
+        score = #{record.score,jdbcType=DOUBLE},
+      </if>
+      <if test="record.unitPrice != null">
+        unit_price = #{record.unitPrice,jdbcType=DOUBLE},
+      </if>
+      <if test="record.settlementAmount != null">
+        settlement_amount = #{record.settlementAmount,jdbcType=DOUBLE},
+      </if>
+      <if test="record.createTimestamp != null">
+        create_timestamp = #{record.createTimestamp,jdbcType=BIGINT},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update content_platform_gzh_push_datastat_total
+    set id = #{record.id,jdbcType=BIGINT},
+      date_str = #{record.dateStr,jdbcType=VARCHAR},
+      channel = #{record.channel,jdbcType=VARCHAR},
+      fans_increase_count = #{record.fansIncreaseCount,jdbcType=INTEGER},
+      first_level_count = #{record.firstLevelCount,jdbcType=INTEGER},
+      score = #{record.score,jdbcType=DOUBLE},
+      unit_price = #{record.unitPrice,jdbcType=DOUBLE},
+      settlement_amount = #{record.settlementAmount,jdbcType=DOUBLE},
+      create_timestamp = #{record.createTimestamp,jdbcType=BIGINT}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhPushDataStatTotal">
+    update content_platform_gzh_push_datastat_total
+    <set>
+      <if test="dateStr != null">
+        date_str = #{dateStr,jdbcType=VARCHAR},
+      </if>
+      <if test="channel != null">
+        channel = #{channel,jdbcType=VARCHAR},
+      </if>
+      <if test="fansIncreaseCount != null">
+        fans_increase_count = #{fansIncreaseCount,jdbcType=INTEGER},
+      </if>
+      <if test="firstLevelCount != null">
+        first_level_count = #{firstLevelCount,jdbcType=INTEGER},
+      </if>
+      <if test="score != null">
+        score = #{score,jdbcType=DOUBLE},
+      </if>
+      <if test="unitPrice != null">
+        unit_price = #{unitPrice,jdbcType=DOUBLE},
+      </if>
+      <if test="settlementAmount != null">
+        settlement_amount = #{settlementAmount,jdbcType=DOUBLE},
+      </if>
+      <if test="createTimestamp != null">
+        create_timestamp = #{createTimestamp,jdbcType=BIGINT},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhPushDataStatTotal">
+    update content_platform_gzh_push_datastat_total
+    set date_str = #{dateStr,jdbcType=VARCHAR},
+      channel = #{channel,jdbcType=VARCHAR},
+      fans_increase_count = #{fansIncreaseCount,jdbcType=INTEGER},
+      first_level_count = #{firstLevelCount,jdbcType=INTEGER},
+      score = #{score,jdbcType=DOUBLE},
+      unit_price = #{unitPrice,jdbcType=DOUBLE},
+      settlement_amount = #{settlementAmount,jdbcType=DOUBLE},
+      create_timestamp = #{createTimestamp,jdbcType=BIGINT}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 69 - 1
api-module/src/main/resources/mapper/contentplatform/ext/ContentPlatformDataStatMapperExt.xml

@@ -65,7 +65,7 @@
         limit #{offset}, #{pageSize}
     </select>
 
-<select id="getFwhAccountDatastatCount" resultType="java.lang.Integer">
+    <select id="getFwhAccountDatastatCount" resultType="java.lang.Integer">
         select count(1)
         from content_platform_fwh_datastat cpgd
         join content_platform_gzh_account cpgza on cpgd.account_id = cpgza.id
@@ -105,6 +105,46 @@
         limit #{offset}, #{pageSize}
     </select>
 
+    <select id="getGzhPushTotalDatastatCount" resultType="java.lang.Integer">
+        select count(1)
+        from content_platform_gzh_push_datastat_total cpfdt
+         join content_platform_account cpa on cpfdt.channel = cpa.channel
+        where cpa.id = #{createAccountId}
+    </select>
+
+    <select id="getGzhPushTotalDatastatList"
+            resultType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhPushDataStatTotal">
+        select date_str, fans_increase_count, first_level_count, score, unit_price, settlement_amount
+        from content_platform_gzh_push_datastat_total cpfdt
+         join content_platform_account cpa on cpfdt.channel = cpa.channel
+        where cpa.id = #{createAccountId}
+        order by cpfdt.date_str desc
+        limit #{offset}, #{pageSize}
+    </select>
+
+    <select id="getGzhPushAccountDatastatCount" resultType="java.lang.Integer">
+        select count(1)
+        from content_platform_gzh_push_datastat cpgd
+        join content_platform_gzh_account cpgza on cpgd.account_id = cpgza.id
+        where cpgza.create_account_id = #{createAccountId}
+        <if test="param.accountId!= null and param.accountId!= ''">
+            and cpgza.account_id = #{param.accountId}
+        </if>
+    </select>
+
+    <select id="getGzhPushAccountDatastatList"
+            resultType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhDataStat">
+        select cpfd.*
+        from content_platform_gzh_push_datastat cpfd
+        join content_platform_gzh_account cpgza on cpfd.account_id = cpgza.id
+        where cpgza.create_account_id = #{createAccountId}
+        <if test="param.accountId!= null and param.accountId!= ''">
+            and cpgza.account_id = #{param.accountId}
+        </if>
+        order by cpfd.date_str desc
+        limit #{offset}, #{pageSize}
+    </select>
+
     <select id="getQwRootSourceIdDatastatCount" resultType="java.lang.Integer">
         select count(1)
         from content_platform_qw_datastat cpqd
@@ -297,6 +337,26 @@
         </foreach>
     </insert>
 
+    <insert id="batchInsertGzhPushDatastat">
+        insert into content_platform_gzh_push_datastat (date_str, account_id, fans_increase_count, first_level_count, score,
+        create_timestamp)
+        values
+        <foreach collection="records" item="item" separator=",">
+            (#{item.dateStr}, #{item.accountId}, #{item.fansIncreaseCount}, #{item.firstLevelCount}, #{item.score},
+            #{item.createTimestamp})
+        </foreach>
+    </insert>
+
+    <insert id="batchInsertGzhPushDatastatTotal">
+        insert into content_platform_gzh_push_datastat_total (date_str, channel, fans_increase_count, first_level_count, score,
+        unit_price, settlement_amount, create_timestamp)
+        values
+        <foreach collection="records" item="item" separator=",">
+            (#{item.dateStr}, #{item.channel}, #{item.fansIncreaseCount}, #{item.firstLevelCount}, #{item.score},
+            #{item.unitPrice}, #{item.settlementAmount}, #{item.createTimestamp})
+        </foreach>
+    </insert>
+
     <select id="getQwTotalDatastatScoreList"
             resultType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformQwDataStatTotal">
         select cpa.channel, round(avg(cpqd.score), 2) as score
@@ -353,4 +413,12 @@
         delete from content_platform_gzh_video_datastat where date_str = #{dt}
     </delete>
 
+    <delete id="deleteGzhPushDatastat">
+        delete from content_platform_gzh_push_datastat where date_str = #{dt}
+    </delete>
+
+    <delete id="deleteGzhPushDatastatTotal">
+        delete from content_platform_gzh_push_datastat_total where date_str = #{dt}
+    </delete>
+
 </mapper>

+ 67 - 5
api-module/src/main/resources/mapper/wecom/thirdpart/ThirdPartWeComRoomMapper.xml

@@ -10,6 +10,10 @@
     <result column="member_count" jdbcType="INTEGER" property="memberCount" />
     <result column="name" jdbcType="VARCHAR" property="name" />
     <result column="room_url" jdbcType="VARCHAR" property="roomUrl" />
+    <result column="add_user_status" jdbcType="INTEGER" property="addUserStatus" />
+    <result column="send_status" jdbcType="INTEGER" property="sendStatus" />
+    <result column="send_time" jdbcType="VARCHAR" property="sendTime" />
+    <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>
@@ -73,7 +77,7 @@
   </sql>
   <sql id="Base_Column_List">
     id, corp_id, staff_id, third_room_id, third_create_user_id, member_count, `name`, 
-    room_url, create_time, update_time
+    room_url, add_user_status, send_status, send_time, is_delete, create_time, update_time
   </sql>
   <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomExample" resultMap="BaseResultMap">
     select
@@ -111,12 +115,14 @@
   <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoom">
     insert into third_part_we_com_room (id, corp_id, staff_id, 
       third_room_id, third_create_user_id, member_count, 
-      `name`, room_url, create_time, 
-      update_time)
+      `name`, room_url, add_user_status, 
+      send_status, send_time, is_delete, 
+      create_time, update_time)
     values (#{id,jdbcType=BIGINT}, #{corpId,jdbcType=BIGINT}, #{staffId,jdbcType=BIGINT}, 
       #{thirdRoomId,jdbcType=VARCHAR}, #{thirdCreateUserId,jdbcType=BIGINT}, #{memberCount,jdbcType=INTEGER}, 
-      #{name,jdbcType=VARCHAR}, #{roomUrl,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
-      #{updateTime,jdbcType=TIMESTAMP})
+      #{name,jdbcType=VARCHAR}, #{roomUrl,jdbcType=VARCHAR}, #{addUserStatus,jdbcType=INTEGER}, 
+      #{sendStatus,jdbcType=INTEGER}, #{sendTime,jdbcType=VARCHAR}, #{isDelete,jdbcType=INTEGER}, 
+      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
   </insert>
   <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoom">
     insert into third_part_we_com_room
@@ -145,6 +151,18 @@
       <if test="roomUrl != null">
         room_url,
       </if>
+      <if test="addUserStatus != null">
+        add_user_status,
+      </if>
+      <if test="sendStatus != null">
+        send_status,
+      </if>
+      <if test="sendTime != null">
+        send_time,
+      </if>
+      <if test="isDelete != null">
+        is_delete,
+      </if>
       <if test="createTime != null">
         create_time,
       </if>
@@ -177,6 +195,18 @@
       <if test="roomUrl != null">
         #{roomUrl,jdbcType=VARCHAR},
       </if>
+      <if test="addUserStatus != null">
+        #{addUserStatus,jdbcType=INTEGER},
+      </if>
+      <if test="sendStatus != null">
+        #{sendStatus,jdbcType=INTEGER},
+      </if>
+      <if test="sendTime != null">
+        #{sendTime,jdbcType=VARCHAR},
+      </if>
+      <if test="isDelete != null">
+        #{isDelete,jdbcType=INTEGER},
+      </if>
       <if test="createTime != null">
         #{createTime,jdbcType=TIMESTAMP},
       </if>
@@ -218,6 +248,18 @@
       <if test="record.roomUrl != null">
         room_url = #{record.roomUrl,jdbcType=VARCHAR},
       </if>
+      <if test="record.addUserStatus != null">
+        add_user_status = #{record.addUserStatus,jdbcType=INTEGER},
+      </if>
+      <if test="record.sendStatus != null">
+        send_status = #{record.sendStatus,jdbcType=INTEGER},
+      </if>
+      <if test="record.sendTime != null">
+        send_time = #{record.sendTime,jdbcType=VARCHAR},
+      </if>
+      <if test="record.isDelete != null">
+        is_delete = #{record.isDelete,jdbcType=INTEGER},
+      </if>
       <if test="record.createTime != null">
         create_time = #{record.createTime,jdbcType=TIMESTAMP},
       </if>
@@ -239,6 +281,10 @@
       member_count = #{record.memberCount,jdbcType=INTEGER},
       `name` = #{record.name,jdbcType=VARCHAR},
       room_url = #{record.roomUrl,jdbcType=VARCHAR},
+      add_user_status = #{record.addUserStatus,jdbcType=INTEGER},
+      send_status = #{record.sendStatus,jdbcType=INTEGER},
+      send_time = #{record.sendTime,jdbcType=VARCHAR},
+      is_delete = #{record.isDelete,jdbcType=INTEGER},
       create_time = #{record.createTime,jdbcType=TIMESTAMP},
       update_time = #{record.updateTime,jdbcType=TIMESTAMP}
     <if test="_parameter != null">
@@ -269,6 +315,18 @@
       <if test="roomUrl != null">
         room_url = #{roomUrl,jdbcType=VARCHAR},
       </if>
+      <if test="addUserStatus != null">
+        add_user_status = #{addUserStatus,jdbcType=INTEGER},
+      </if>
+      <if test="sendStatus != null">
+        send_status = #{sendStatus,jdbcType=INTEGER},
+      </if>
+      <if test="sendTime != null">
+        send_time = #{sendTime,jdbcType=VARCHAR},
+      </if>
+      <if test="isDelete != null">
+        is_delete = #{isDelete,jdbcType=INTEGER},
+      </if>
       <if test="createTime != null">
         create_time = #{createTime,jdbcType=TIMESTAMP},
       </if>
@@ -287,6 +345,10 @@
       member_count = #{memberCount,jdbcType=INTEGER},
       `name` = #{name,jdbcType=VARCHAR},
       room_url = #{roomUrl,jdbcType=VARCHAR},
+      add_user_status = #{addUserStatus,jdbcType=INTEGER},
+      send_status = #{sendStatus,jdbcType=INTEGER},
+      send_time = #{sendTime,jdbcType=VARCHAR},
+      is_delete = #{isDelete,jdbcType=INTEGER},
       create_time = #{createTime,jdbcType=TIMESTAMP},
       update_time = #{updateTime,jdbcType=TIMESTAMP}
     where id = #{id,jdbcType=BIGINT}

+ 451 - 0
api-module/src/main/resources/mapper/wecom/thirdpart/ThirdPartWeComRoomUserMapper.xml

@@ -0,0 +1,451 @@
+<?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.wecom.thirdpart.ThirdPartWeComRoomUserMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomUser">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="third_room_id" jdbcType="VARCHAR" property="thirdRoomId" />
+    <result column="unionid" jdbcType="VARCHAR" property="unionid" />
+    <result column="sex" jdbcType="INTEGER" property="sex" />
+    <result column="mobile" jdbcType="VARCHAR" property="mobile" />
+    <result column="acctid" jdbcType="VARCHAR" property="acctid" />
+    <result column="join_scene" jdbcType="INTEGER" property="joinScene" />
+    <result column="avatar" jdbcType="VARCHAR" property="avatar" />
+    <result column="english_name" jdbcType="VARCHAR" property="englishName" />
+    <result column="realname" jdbcType="VARCHAR" property="realname" />
+    <result column="room_notes" jdbcType="VARCHAR" property="roomNotes" />
+    <result column="join_time" jdbcType="BIGINT" property="joinTime" />
+    <result column="nickname" jdbcType="VARCHAR" property="nickname" />
+    <result column="room_nickname" jdbcType="VARCHAR" property="roomNickname" />
+    <result column="position" jdbcType="VARCHAR" property="position" />
+    <result column="uin" jdbcType="BIGINT" property="uin" />
+    <result column="invite_user_id" jdbcType="BIGINT" property="inviteUserId" />
+    <result column="corp_id" jdbcType="BIGINT" property="corpId" />
+    <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, third_room_id, unionid, sex, mobile, acctid, join_scene, avatar, english_name, 
+    realname, room_notes, join_time, nickname, room_nickname, `position`, uin, invite_user_id, 
+    corp_id, create_time, update_time
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomUserExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from third_part_we_com_room_user
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    <if test="page != null">
+      limit #{page.offset} , #{page.pageSize}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from third_part_we_com_room_user
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from third_part_we_com_room_user
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomUserExample">
+    delete from third_part_we_com_room_user
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomUser">
+    insert into third_part_we_com_room_user (id, third_room_id, unionid, 
+      sex, mobile, acctid, 
+      join_scene, avatar, english_name, 
+      realname, room_notes, join_time, 
+      nickname, room_nickname, `position`, 
+      uin, invite_user_id, corp_id, 
+      create_time, update_time)
+    values (#{id,jdbcType=BIGINT}, #{thirdRoomId,jdbcType=VARCHAR}, #{unionid,jdbcType=VARCHAR}, 
+      #{sex,jdbcType=INTEGER}, #{mobile,jdbcType=VARCHAR}, #{acctid,jdbcType=VARCHAR}, 
+      #{joinScene,jdbcType=INTEGER}, #{avatar,jdbcType=VARCHAR}, #{englishName,jdbcType=VARCHAR}, 
+      #{realname,jdbcType=VARCHAR}, #{roomNotes,jdbcType=VARCHAR}, #{joinTime,jdbcType=BIGINT}, 
+      #{nickname,jdbcType=VARCHAR}, #{roomNickname,jdbcType=VARCHAR}, #{position,jdbcType=VARCHAR}, 
+      #{uin,jdbcType=BIGINT}, #{inviteUserId,jdbcType=BIGINT}, #{corpId,jdbcType=BIGINT}, 
+      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomUser">
+    insert into third_part_we_com_room_user
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="thirdRoomId != null">
+        third_room_id,
+      </if>
+      <if test="unionid != null">
+        unionid,
+      </if>
+      <if test="sex != null">
+        sex,
+      </if>
+      <if test="mobile != null">
+        mobile,
+      </if>
+      <if test="acctid != null">
+        acctid,
+      </if>
+      <if test="joinScene != null">
+        join_scene,
+      </if>
+      <if test="avatar != null">
+        avatar,
+      </if>
+      <if test="englishName != null">
+        english_name,
+      </if>
+      <if test="realname != null">
+        realname,
+      </if>
+      <if test="roomNotes != null">
+        room_notes,
+      </if>
+      <if test="joinTime != null">
+        join_time,
+      </if>
+      <if test="nickname != null">
+        nickname,
+      </if>
+      <if test="roomNickname != null">
+        room_nickname,
+      </if>
+      <if test="position != null">
+        `position`,
+      </if>
+      <if test="uin != null">
+        uin,
+      </if>
+      <if test="inviteUserId != null">
+        invite_user_id,
+      </if>
+      <if test="corpId != null">
+        corp_id,
+      </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="thirdRoomId != null">
+        #{thirdRoomId,jdbcType=VARCHAR},
+      </if>
+      <if test="unionid != null">
+        #{unionid,jdbcType=VARCHAR},
+      </if>
+      <if test="sex != null">
+        #{sex,jdbcType=INTEGER},
+      </if>
+      <if test="mobile != null">
+        #{mobile,jdbcType=VARCHAR},
+      </if>
+      <if test="acctid != null">
+        #{acctid,jdbcType=VARCHAR},
+      </if>
+      <if test="joinScene != null">
+        #{joinScene,jdbcType=INTEGER},
+      </if>
+      <if test="avatar != null">
+        #{avatar,jdbcType=VARCHAR},
+      </if>
+      <if test="englishName != null">
+        #{englishName,jdbcType=VARCHAR},
+      </if>
+      <if test="realname != null">
+        #{realname,jdbcType=VARCHAR},
+      </if>
+      <if test="roomNotes != null">
+        #{roomNotes,jdbcType=VARCHAR},
+      </if>
+      <if test="joinTime != null">
+        #{joinTime,jdbcType=BIGINT},
+      </if>
+      <if test="nickname != null">
+        #{nickname,jdbcType=VARCHAR},
+      </if>
+      <if test="roomNickname != null">
+        #{roomNickname,jdbcType=VARCHAR},
+      </if>
+      <if test="position != null">
+        #{position,jdbcType=VARCHAR},
+      </if>
+      <if test="uin != null">
+        #{uin,jdbcType=BIGINT},
+      </if>
+      <if test="inviteUserId != null">
+        #{inviteUserId,jdbcType=BIGINT},
+      </if>
+      <if test="corpId != null">
+        #{corpId,jdbcType=BIGINT},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomUserExample" resultType="java.lang.Long">
+    select count(*) from third_part_we_com_room_user
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update third_part_we_com_room_user
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.thirdRoomId != null">
+        third_room_id = #{record.thirdRoomId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.unionid != null">
+        unionid = #{record.unionid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.sex != null">
+        sex = #{record.sex,jdbcType=INTEGER},
+      </if>
+      <if test="record.mobile != null">
+        mobile = #{record.mobile,jdbcType=VARCHAR},
+      </if>
+      <if test="record.acctid != null">
+        acctid = #{record.acctid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.joinScene != null">
+        join_scene = #{record.joinScene,jdbcType=INTEGER},
+      </if>
+      <if test="record.avatar != null">
+        avatar = #{record.avatar,jdbcType=VARCHAR},
+      </if>
+      <if test="record.englishName != null">
+        english_name = #{record.englishName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.realname != null">
+        realname = #{record.realname,jdbcType=VARCHAR},
+      </if>
+      <if test="record.roomNotes != null">
+        room_notes = #{record.roomNotes,jdbcType=VARCHAR},
+      </if>
+      <if test="record.joinTime != null">
+        join_time = #{record.joinTime,jdbcType=BIGINT},
+      </if>
+      <if test="record.nickname != null">
+        nickname = #{record.nickname,jdbcType=VARCHAR},
+      </if>
+      <if test="record.roomNickname != null">
+        room_nickname = #{record.roomNickname,jdbcType=VARCHAR},
+      </if>
+      <if test="record.position != null">
+        `position` = #{record.position,jdbcType=VARCHAR},
+      </if>
+      <if test="record.uin != null">
+        uin = #{record.uin,jdbcType=BIGINT},
+      </if>
+      <if test="record.inviteUserId != null">
+        invite_user_id = #{record.inviteUserId,jdbcType=BIGINT},
+      </if>
+      <if test="record.corpId != null">
+        corp_id = #{record.corpId,jdbcType=BIGINT},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.updateTime != null">
+        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update third_part_we_com_room_user
+    set id = #{record.id,jdbcType=BIGINT},
+      third_room_id = #{record.thirdRoomId,jdbcType=VARCHAR},
+      unionid = #{record.unionid,jdbcType=VARCHAR},
+      sex = #{record.sex,jdbcType=INTEGER},
+      mobile = #{record.mobile,jdbcType=VARCHAR},
+      acctid = #{record.acctid,jdbcType=VARCHAR},
+      join_scene = #{record.joinScene,jdbcType=INTEGER},
+      avatar = #{record.avatar,jdbcType=VARCHAR},
+      english_name = #{record.englishName,jdbcType=VARCHAR},
+      realname = #{record.realname,jdbcType=VARCHAR},
+      room_notes = #{record.roomNotes,jdbcType=VARCHAR},
+      join_time = #{record.joinTime,jdbcType=BIGINT},
+      nickname = #{record.nickname,jdbcType=VARCHAR},
+      room_nickname = #{record.roomNickname,jdbcType=VARCHAR},
+      `position` = #{record.position,jdbcType=VARCHAR},
+      uin = #{record.uin,jdbcType=BIGINT},
+      invite_user_id = #{record.inviteUserId,jdbcType=BIGINT},
+      corp_id = #{record.corpId,jdbcType=BIGINT},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      update_time = #{record.updateTime,jdbcType=TIMESTAMP}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomUser">
+    update third_part_we_com_room_user
+    <set>
+      <if test="thirdRoomId != null">
+        third_room_id = #{thirdRoomId,jdbcType=VARCHAR},
+      </if>
+      <if test="unionid != null">
+        unionid = #{unionid,jdbcType=VARCHAR},
+      </if>
+      <if test="sex != null">
+        sex = #{sex,jdbcType=INTEGER},
+      </if>
+      <if test="mobile != null">
+        mobile = #{mobile,jdbcType=VARCHAR},
+      </if>
+      <if test="acctid != null">
+        acctid = #{acctid,jdbcType=VARCHAR},
+      </if>
+      <if test="joinScene != null">
+        join_scene = #{joinScene,jdbcType=INTEGER},
+      </if>
+      <if test="avatar != null">
+        avatar = #{avatar,jdbcType=VARCHAR},
+      </if>
+      <if test="englishName != null">
+        english_name = #{englishName,jdbcType=VARCHAR},
+      </if>
+      <if test="realname != null">
+        realname = #{realname,jdbcType=VARCHAR},
+      </if>
+      <if test="roomNotes != null">
+        room_notes = #{roomNotes,jdbcType=VARCHAR},
+      </if>
+      <if test="joinTime != null">
+        join_time = #{joinTime,jdbcType=BIGINT},
+      </if>
+      <if test="nickname != null">
+        nickname = #{nickname,jdbcType=VARCHAR},
+      </if>
+      <if test="roomNickname != null">
+        room_nickname = #{roomNickname,jdbcType=VARCHAR},
+      </if>
+      <if test="position != null">
+        `position` = #{position,jdbcType=VARCHAR},
+      </if>
+      <if test="uin != null">
+        uin = #{uin,jdbcType=BIGINT},
+      </if>
+      <if test="inviteUserId != null">
+        invite_user_id = #{inviteUserId,jdbcType=BIGINT},
+      </if>
+      <if test="corpId != null">
+        corp_id = #{corpId,jdbcType=BIGINT},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomUser">
+    update third_part_we_com_room_user
+    set third_room_id = #{thirdRoomId,jdbcType=VARCHAR},
+      unionid = #{unionid,jdbcType=VARCHAR},
+      sex = #{sex,jdbcType=INTEGER},
+      mobile = #{mobile,jdbcType=VARCHAR},
+      acctid = #{acctid,jdbcType=VARCHAR},
+      join_scene = #{joinScene,jdbcType=INTEGER},
+      avatar = #{avatar,jdbcType=VARCHAR},
+      english_name = #{englishName,jdbcType=VARCHAR},
+      realname = #{realname,jdbcType=VARCHAR},
+      room_notes = #{roomNotes,jdbcType=VARCHAR},
+      join_time = #{joinTime,jdbcType=BIGINT},
+      nickname = #{nickname,jdbcType=VARCHAR},
+      room_nickname = #{roomNickname,jdbcType=VARCHAR},
+      `position` = #{position,jdbcType=VARCHAR},
+      uin = #{uin,jdbcType=BIGINT},
+      invite_user_id = #{inviteUserId,jdbcType=BIGINT},
+      corp_id = #{corpId,jdbcType=BIGINT},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_time = #{updateTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 21 - 6
api-module/src/main/resources/mapper/wecom/thirdpart/ThirdPartWeComStaffMapper.xml

@@ -10,6 +10,7 @@
     <result column="third_staff_id" jdbcType="BIGINT" property="thirdStaffId" />
     <result column="third_uuid" jdbcType="VARCHAR" property="thirdUuid" />
     <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="auto_create_room" jdbcType="INTEGER" property="autoCreateRoom" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
   </resultMap>
@@ -72,8 +73,8 @@
     </where>
   </sql>
   <sql id="Base_Column_List">
-    id, corp_id, mobile, `name`, avatar, third_staff_id, third_uuid, `status`, create_time, 
-    update_time
+    id, corp_id, mobile, `name`, avatar, third_staff_id, third_uuid, `status`, auto_create_room, 
+    create_time, update_time
   </sql>
   <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffExample" resultMap="BaseResultMap">
     select
@@ -111,12 +112,12 @@
   <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaff">
     insert into third_part_we_com_staff (id, corp_id, mobile, 
       `name`, avatar, third_staff_id, 
-      third_uuid, `status`, create_time, 
-      update_time)
+      third_uuid, `status`, auto_create_room, 
+      create_time, update_time)
     values (#{id,jdbcType=BIGINT}, #{corpId,jdbcType=BIGINT}, #{mobile,jdbcType=VARCHAR}, 
       #{name,jdbcType=VARCHAR}, #{avatar,jdbcType=VARCHAR}, #{thirdStaffId,jdbcType=BIGINT}, 
-      #{thirdUuid,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
-      #{updateTime,jdbcType=TIMESTAMP})
+      #{thirdUuid,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{autoCreateRoom,jdbcType=INTEGER}, 
+      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
   </insert>
   <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaff">
     insert into third_part_we_com_staff
@@ -145,6 +146,9 @@
       <if test="status != null">
         `status`,
       </if>
+      <if test="autoCreateRoom != null">
+        auto_create_room,
+      </if>
       <if test="createTime != null">
         create_time,
       </if>
@@ -177,6 +181,9 @@
       <if test="status != null">
         #{status,jdbcType=INTEGER},
       </if>
+      <if test="autoCreateRoom != null">
+        #{autoCreateRoom,jdbcType=INTEGER},
+      </if>
       <if test="createTime != null">
         #{createTime,jdbcType=TIMESTAMP},
       </if>
@@ -218,6 +225,9 @@
       <if test="record.status != null">
         `status` = #{record.status,jdbcType=INTEGER},
       </if>
+      <if test="record.autoCreateRoom != null">
+        auto_create_room = #{record.autoCreateRoom,jdbcType=INTEGER},
+      </if>
       <if test="record.createTime != null">
         create_time = #{record.createTime,jdbcType=TIMESTAMP},
       </if>
@@ -239,6 +249,7 @@
       third_staff_id = #{record.thirdStaffId,jdbcType=BIGINT},
       third_uuid = #{record.thirdUuid,jdbcType=VARCHAR},
       `status` = #{record.status,jdbcType=INTEGER},
+      auto_create_room = #{record.autoCreateRoom,jdbcType=INTEGER},
       create_time = #{record.createTime,jdbcType=TIMESTAMP},
       update_time = #{record.updateTime,jdbcType=TIMESTAMP}
     <if test="_parameter != null">
@@ -269,6 +280,9 @@
       <if test="status != null">
         `status` = #{status,jdbcType=INTEGER},
       </if>
+      <if test="autoCreateRoom != null">
+        auto_create_room = #{autoCreateRoom,jdbcType=INTEGER},
+      </if>
       <if test="createTime != null">
         create_time = #{createTime,jdbcType=TIMESTAMP},
       </if>
@@ -287,6 +301,7 @@
       third_staff_id = #{thirdStaffId,jdbcType=BIGINT},
       third_uuid = #{thirdUuid,jdbcType=VARCHAR},
       `status` = #{status,jdbcType=INTEGER},
+      auto_create_room = #{autoCreateRoom,jdbcType=INTEGER},
       create_time = #{createTime,jdbcType=TIMESTAMP},
       update_time = #{updateTime,jdbcType=TIMESTAMP}
     where id = #{id,jdbcType=BIGINT}

+ 498 - 0
api-module/src/main/resources/mapper/wecom/thirdpart/ThirdPartWeComStaffUserMapper.xml

@@ -0,0 +1,498 @@
+<?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.wecom.thirdpart.ThirdPartWeComStaffUserMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffUser">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="third_staff_id" jdbcType="BIGINT" property="thirdStaffId" />
+    <result column="unionid" jdbcType="VARCHAR" property="unionid" />
+    <result column="sex" jdbcType="INTEGER" property="sex" />
+    <result column="mobile" jdbcType="VARCHAR" property="mobile" />
+    <result column="company_remark" jdbcType="VARCHAR" property="companyRemark" />
+    <result column="acctid" jdbcType="VARCHAR" property="acctid" />
+    <result column="avatar" jdbcType="VARCHAR" property="avatar" />
+    <result column="source" jdbcType="INTEGER" property="source" />
+    <result column="english_name" jdbcType="VARCHAR" property="englishName" />
+    <result column="remark_phone" jdbcType="CHAR" property="remarkPhone" />
+    <result column="realname" jdbcType="VARCHAR" property="realname" />
+    <result column="real_remarks" jdbcType="VARCHAR" property="realRemarks" />
+    <result column="labelid" jdbcType="CHAR" property="labelid" />
+    <result column="user_id" jdbcType="BIGINT" property="userId" />
+    <result column="nickname" jdbcType="VARCHAR" property="nickname" />
+    <result column="position" jdbcType="VARCHAR" property="position" />
+    <result column="corp_id" jdbcType="BIGINT" property="corpId" />
+    <result column="remarks" jdbcType="VARCHAR" property="remarks" />
+    <result column="seq" jdbcType="INTEGER" property="seq" />
+    <result column="status" jdbcType="INTEGER" property="status" />
+    <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, third_staff_id, unionid, sex, mobile, company_remark, acctid, avatar, `source`, 
+    english_name, remark_phone, realname, real_remarks, labelid, user_id, nickname, `position`, 
+    corp_id, remarks, seq, `status`, create_time, update_time
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffUserExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from third_part_we_com_staff_user
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    <if test="page != null">
+      limit #{page.offset} , #{page.pageSize}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from third_part_we_com_staff_user
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from third_part_we_com_staff_user
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffUserExample">
+    delete from third_part_we_com_staff_user
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffUser">
+    insert into third_part_we_com_staff_user (id, third_staff_id, unionid, 
+      sex, mobile, company_remark, 
+      acctid, avatar, `source`, 
+      english_name, remark_phone, realname, 
+      real_remarks, labelid, user_id, 
+      nickname, `position`, corp_id, 
+      remarks, seq, `status`, 
+      create_time, update_time)
+    values (#{id,jdbcType=BIGINT}, #{thirdStaffId,jdbcType=BIGINT}, #{unionid,jdbcType=VARCHAR}, 
+      #{sex,jdbcType=INTEGER}, #{mobile,jdbcType=VARCHAR}, #{companyRemark,jdbcType=VARCHAR}, 
+      #{acctid,jdbcType=VARCHAR}, #{avatar,jdbcType=VARCHAR}, #{source,jdbcType=INTEGER}, 
+      #{englishName,jdbcType=VARCHAR}, #{remarkPhone,jdbcType=CHAR}, #{realname,jdbcType=VARCHAR}, 
+      #{realRemarks,jdbcType=VARCHAR}, #{labelid,jdbcType=CHAR}, #{userId,jdbcType=BIGINT}, 
+      #{nickname,jdbcType=VARCHAR}, #{position,jdbcType=VARCHAR}, #{corpId,jdbcType=BIGINT}, 
+      #{remarks,jdbcType=VARCHAR}, #{seq,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, 
+      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffUser">
+    insert into third_part_we_com_staff_user
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="thirdStaffId != null">
+        third_staff_id,
+      </if>
+      <if test="unionid != null">
+        unionid,
+      </if>
+      <if test="sex != null">
+        sex,
+      </if>
+      <if test="mobile != null">
+        mobile,
+      </if>
+      <if test="companyRemark != null">
+        company_remark,
+      </if>
+      <if test="acctid != null">
+        acctid,
+      </if>
+      <if test="avatar != null">
+        avatar,
+      </if>
+      <if test="source != null">
+        `source`,
+      </if>
+      <if test="englishName != null">
+        english_name,
+      </if>
+      <if test="remarkPhone != null">
+        remark_phone,
+      </if>
+      <if test="realname != null">
+        realname,
+      </if>
+      <if test="realRemarks != null">
+        real_remarks,
+      </if>
+      <if test="labelid != null">
+        labelid,
+      </if>
+      <if test="userId != null">
+        user_id,
+      </if>
+      <if test="nickname != null">
+        nickname,
+      </if>
+      <if test="position != null">
+        `position`,
+      </if>
+      <if test="corpId != null">
+        corp_id,
+      </if>
+      <if test="remarks != null">
+        remarks,
+      </if>
+      <if test="seq != null">
+        seq,
+      </if>
+      <if test="status != null">
+        `status`,
+      </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="thirdStaffId != null">
+        #{thirdStaffId,jdbcType=BIGINT},
+      </if>
+      <if test="unionid != null">
+        #{unionid,jdbcType=VARCHAR},
+      </if>
+      <if test="sex != null">
+        #{sex,jdbcType=INTEGER},
+      </if>
+      <if test="mobile != null">
+        #{mobile,jdbcType=VARCHAR},
+      </if>
+      <if test="companyRemark != null">
+        #{companyRemark,jdbcType=VARCHAR},
+      </if>
+      <if test="acctid != null">
+        #{acctid,jdbcType=VARCHAR},
+      </if>
+      <if test="avatar != null">
+        #{avatar,jdbcType=VARCHAR},
+      </if>
+      <if test="source != null">
+        #{source,jdbcType=INTEGER},
+      </if>
+      <if test="englishName != null">
+        #{englishName,jdbcType=VARCHAR},
+      </if>
+      <if test="remarkPhone != null">
+        #{remarkPhone,jdbcType=CHAR},
+      </if>
+      <if test="realname != null">
+        #{realname,jdbcType=VARCHAR},
+      </if>
+      <if test="realRemarks != null">
+        #{realRemarks,jdbcType=VARCHAR},
+      </if>
+      <if test="labelid != null">
+        #{labelid,jdbcType=CHAR},
+      </if>
+      <if test="userId != null">
+        #{userId,jdbcType=BIGINT},
+      </if>
+      <if test="nickname != null">
+        #{nickname,jdbcType=VARCHAR},
+      </if>
+      <if test="position != null">
+        #{position,jdbcType=VARCHAR},
+      </if>
+      <if test="corpId != null">
+        #{corpId,jdbcType=BIGINT},
+      </if>
+      <if test="remarks != null">
+        #{remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="seq != null">
+        #{seq,jdbcType=INTEGER},
+      </if>
+      <if test="status != null">
+        #{status,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.wecom.thirdpart.ThirdPartWeComStaffUserExample" resultType="java.lang.Long">
+    select count(*) from third_part_we_com_staff_user
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update third_part_we_com_staff_user
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.thirdStaffId != null">
+        third_staff_id = #{record.thirdStaffId,jdbcType=BIGINT},
+      </if>
+      <if test="record.unionid != null">
+        unionid = #{record.unionid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.sex != null">
+        sex = #{record.sex,jdbcType=INTEGER},
+      </if>
+      <if test="record.mobile != null">
+        mobile = #{record.mobile,jdbcType=VARCHAR},
+      </if>
+      <if test="record.companyRemark != null">
+        company_remark = #{record.companyRemark,jdbcType=VARCHAR},
+      </if>
+      <if test="record.acctid != null">
+        acctid = #{record.acctid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.avatar != null">
+        avatar = #{record.avatar,jdbcType=VARCHAR},
+      </if>
+      <if test="record.source != null">
+        `source` = #{record.source,jdbcType=INTEGER},
+      </if>
+      <if test="record.englishName != null">
+        english_name = #{record.englishName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.remarkPhone != null">
+        remark_phone = #{record.remarkPhone,jdbcType=CHAR},
+      </if>
+      <if test="record.realname != null">
+        realname = #{record.realname,jdbcType=VARCHAR},
+      </if>
+      <if test="record.realRemarks != null">
+        real_remarks = #{record.realRemarks,jdbcType=VARCHAR},
+      </if>
+      <if test="record.labelid != null">
+        labelid = #{record.labelid,jdbcType=CHAR},
+      </if>
+      <if test="record.userId != null">
+        user_id = #{record.userId,jdbcType=BIGINT},
+      </if>
+      <if test="record.nickname != null">
+        nickname = #{record.nickname,jdbcType=VARCHAR},
+      </if>
+      <if test="record.position != null">
+        `position` = #{record.position,jdbcType=VARCHAR},
+      </if>
+      <if test="record.corpId != null">
+        corp_id = #{record.corpId,jdbcType=BIGINT},
+      </if>
+      <if test="record.remarks != null">
+        remarks = #{record.remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="record.seq != null">
+        seq = #{record.seq,jdbcType=INTEGER},
+      </if>
+      <if test="record.status != null">
+        `status` = #{record.status,jdbcType=INTEGER},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.updateTime != null">
+        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update third_part_we_com_staff_user
+    set id = #{record.id,jdbcType=BIGINT},
+      third_staff_id = #{record.thirdStaffId,jdbcType=BIGINT},
+      unionid = #{record.unionid,jdbcType=VARCHAR},
+      sex = #{record.sex,jdbcType=INTEGER},
+      mobile = #{record.mobile,jdbcType=VARCHAR},
+      company_remark = #{record.companyRemark,jdbcType=VARCHAR},
+      acctid = #{record.acctid,jdbcType=VARCHAR},
+      avatar = #{record.avatar,jdbcType=VARCHAR},
+      `source` = #{record.source,jdbcType=INTEGER},
+      english_name = #{record.englishName,jdbcType=VARCHAR},
+      remark_phone = #{record.remarkPhone,jdbcType=CHAR},
+      realname = #{record.realname,jdbcType=VARCHAR},
+      real_remarks = #{record.realRemarks,jdbcType=VARCHAR},
+      labelid = #{record.labelid,jdbcType=CHAR},
+      user_id = #{record.userId,jdbcType=BIGINT},
+      nickname = #{record.nickname,jdbcType=VARCHAR},
+      `position` = #{record.position,jdbcType=VARCHAR},
+      corp_id = #{record.corpId,jdbcType=BIGINT},
+      remarks = #{record.remarks,jdbcType=VARCHAR},
+      seq = #{record.seq,jdbcType=INTEGER},
+      `status` = #{record.status,jdbcType=INTEGER},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      update_time = #{record.updateTime,jdbcType=TIMESTAMP}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffUser">
+    update third_part_we_com_staff_user
+    <set>
+      <if test="thirdStaffId != null">
+        third_staff_id = #{thirdStaffId,jdbcType=BIGINT},
+      </if>
+      <if test="unionid != null">
+        unionid = #{unionid,jdbcType=VARCHAR},
+      </if>
+      <if test="sex != null">
+        sex = #{sex,jdbcType=INTEGER},
+      </if>
+      <if test="mobile != null">
+        mobile = #{mobile,jdbcType=VARCHAR},
+      </if>
+      <if test="companyRemark != null">
+        company_remark = #{companyRemark,jdbcType=VARCHAR},
+      </if>
+      <if test="acctid != null">
+        acctid = #{acctid,jdbcType=VARCHAR},
+      </if>
+      <if test="avatar != null">
+        avatar = #{avatar,jdbcType=VARCHAR},
+      </if>
+      <if test="source != null">
+        `source` = #{source,jdbcType=INTEGER},
+      </if>
+      <if test="englishName != null">
+        english_name = #{englishName,jdbcType=VARCHAR},
+      </if>
+      <if test="remarkPhone != null">
+        remark_phone = #{remarkPhone,jdbcType=CHAR},
+      </if>
+      <if test="realname != null">
+        realname = #{realname,jdbcType=VARCHAR},
+      </if>
+      <if test="realRemarks != null">
+        real_remarks = #{realRemarks,jdbcType=VARCHAR},
+      </if>
+      <if test="labelid != null">
+        labelid = #{labelid,jdbcType=CHAR},
+      </if>
+      <if test="userId != null">
+        user_id = #{userId,jdbcType=BIGINT},
+      </if>
+      <if test="nickname != null">
+        nickname = #{nickname,jdbcType=VARCHAR},
+      </if>
+      <if test="position != null">
+        `position` = #{position,jdbcType=VARCHAR},
+      </if>
+      <if test="corpId != null">
+        corp_id = #{corpId,jdbcType=BIGINT},
+      </if>
+      <if test="remarks != null">
+        remarks = #{remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="seq != null">
+        seq = #{seq,jdbcType=INTEGER},
+      </if>
+      <if test="status != null">
+        `status` = #{status,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.wecom.thirdpart.ThirdPartWeComStaffUser">
+    update third_part_we_com_staff_user
+    set third_staff_id = #{thirdStaffId,jdbcType=BIGINT},
+      unionid = #{unionid,jdbcType=VARCHAR},
+      sex = #{sex,jdbcType=INTEGER},
+      mobile = #{mobile,jdbcType=VARCHAR},
+      company_remark = #{companyRemark,jdbcType=VARCHAR},
+      acctid = #{acctid,jdbcType=VARCHAR},
+      avatar = #{avatar,jdbcType=VARCHAR},
+      `source` = #{source,jdbcType=INTEGER},
+      english_name = #{englishName,jdbcType=VARCHAR},
+      remark_phone = #{remarkPhone,jdbcType=CHAR},
+      realname = #{realname,jdbcType=VARCHAR},
+      real_remarks = #{realRemarks,jdbcType=VARCHAR},
+      labelid = #{labelid,jdbcType=CHAR},
+      user_id = #{userId,jdbcType=BIGINT},
+      nickname = #{nickname,jdbcType=VARCHAR},
+      `position` = #{position,jdbcType=VARCHAR},
+      corp_id = #{corpId,jdbcType=BIGINT},
+      remarks = #{remarks,jdbcType=VARCHAR},
+      seq = #{seq,jdbcType=INTEGER},
+      `status` = #{status,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_time = #{updateTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 46 - 0
api-module/src/main/resources/mapper/wecom/thirdpart/ext/ThirdPartWeComMapperExt.xml

@@ -0,0 +1,46 @@
+<?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.wecom.thirdpart.ext.ThirdPartWeComMapperExt">
+
+  <insert id="batchInsertThirdPartWeComRoomUser">
+    insert into third_part_we_com_room_user (id, third_room_id, unionid, sex, mobile, acctid, join_scene, avatar, 
+       english_name, realname, room_notes, join_time, nickname, room_nickname, `position`, uin, invite_user_id, corp_id,
+       create_time, update_time)
+    values
+    <foreach collection="records" item="item" separator=",">
+      (#{item.id}, #{item.thirdRoomId}, #{item.unionid}, #{item.sex}, #{item.mobile}, #{item.acctid}, #{item.joinScene},
+       #{item.avatar}, #{item.englishName}, #{item.realname}, #{item.roomNotes}, #{item.joinTime}, #{item.nickname},
+       #{item.roomNickname}, #{item.position}, #{item.uin}, #{item.inviteUserId}, #{item.corpId}, #{item.createTime},
+       #{item.updateTime})
+    </foreach>
+  </insert>
+
+  <insert id="batchInsertThirdPartWeComStaffUser">
+    insert into third_part_we_com_staff_user (id, third_staff_id, unionid, sex, mobile, company_remark,
+      acctid, avatar, `source`, english_name, remark_phone, realname, real_remarks, labelid, user_id,
+      nickname, `position`, corp_id, remarks, seq, `status`, create_time, update_time)
+    values
+    <foreach collection="records" item="item" separator=",">
+        (#{item.id}, #{item.thirdStaffId}, #{item.unionid}, #{item.sex}, #{item.mobile}, #{item.companyRemark},
+        #{item.acctid}, #{item.avatar}, #{item.source}, #{item.englishName}, #{item.remarkPhone}, #{item.realname},
+        #{item.realRemarks}, #{item.labelid}, #{item.userId}, #{item.nickname}, #{item.position}, #{item.corpId},
+        #{item.remarks}, #{item.seq}, #{item.status}, #{item.createTime}, #{item.updateTime})
+    </foreach>
+  </insert>
+
+    <select id="getNoGroupStaffUserList"
+            resultType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffUser">
+        select staff_user.*
+        from third_part_we_com_staff staff
+         join third_part_we_com_staff_user staff_user on staff.third_staff_id = staff_user.third_staff_id
+        left join (select distinct room_user.uin
+                   from third_part_we_com_staff staff
+                    join third_part_we_com_room room on staff.id = room.staff_id
+                    join third_part_we_com_room_user room_user
+                         on room.third_room_id = room_user.third_room_id
+                   where staff.third_staff_id = #{thirdStaffId}) room_user on staff_user.user_id = room_user.uin
+        where staff.third_staff_id = #{thirdStaffId}
+          and room_user.uin is null
+    </select>
+
+</mapper>

+ 2 - 0
api-module/src/main/resources/mybatis-api-contentPlatform-generator-config.xml

@@ -57,6 +57,8 @@
         <table tableName="content_platform_gzh_datastat_total" domainObjectName="ContentPlatformGzhDataStatTotal" alias=""/>
         <table tableName="content_platform_fwh_datastat" domainObjectName="ContentPlatformFwhDataStat" alias=""/>
         <table tableName="content_platform_fwh_datastat_total" domainObjectName="ContentPlatformFwhDataStatTotal" alias=""/>
+        <table tableName="content_platform_gzh_push_datastat" domainObjectName="ContentPlatformGzhPushDataStat" alias=""/>
+        <table tableName="content_platform_gzh_push_datastat_total" domainObjectName="ContentPlatformGzhPushDataStatTotal" alias=""/>
         <table tableName="content_platform_gzh_plan" domainObjectName="ContentPlatformGzhPlan" alias=""/>
         <table tableName="content_platform_gzh_plan_video" domainObjectName="ContentPlatformGzhPlanVideo" alias=""/>
         <table tableName="content_platform_gzh_plan_change_log" domainObjectName="ContentPlatformGzhPlanChangeLog" alias=""/>

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

@@ -58,7 +58,8 @@
 <!--        <table tableName="reply_staff" domainObjectName="ReplyStaff" alias=""/>-->
 <!--        <table tableName="we_com_send_msg_result" domainObjectName="SendMsgResult" alias=""/>-->
 <!--        <table tableName="we_com_corp" domainObjectName="Corp" alias=""/>-->
-        <table tableName="workwx_auto_reply_msg_send_record" domainObjectName="AutoReplyMsgSendRecord" alias=""/>
+<!--        <table tableName="workwx_auto_reply_msg_send_record" domainObjectName="AutoReplyMsgSendRecord" alias=""/>-->
+        <table tableName="gh_detail_ext" domainObjectName="GhDetailExt" alias=""/>
 
 
     </context>

+ 2 - 0
api-module/src/main/resources/mybatis-api-wecomThirdpart-generator-config.xml

@@ -52,7 +52,9 @@
 
         <table tableName="third_part_we_com_corp" domainObjectName="ThirdPartWeComCorp" alias=""/>
         <table tableName="third_part_we_com_room" domainObjectName="ThirdPartWeComRoom" alias=""/>
+        <table tableName="third_part_we_com_room_user" domainObjectName="ThirdPartWeComRoomUser" alias=""/>
         <table tableName="third_part_we_com_staff" domainObjectName="ThirdPartWeComStaff" alias=""/>
+        <table tableName="third_part_we_com_staff_user" domainObjectName="ThirdPartWeComStaffUser" alias=""/>
         <table tableName="third_part_we_com_msg" domainObjectName="ThirdPartWeComMsg" alias=""/>
     </context>
 

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

@@ -50,7 +50,7 @@
             <property name="enableSubPackages" value="true"/>
         </javaClientGenerator>
 
-        <table tableName="cgi_reply_bucket_data" domainObjectName="CgiReplyBucketData" alias=""/>
+<!--        <table tableName="cgi_reply_bucket_data" domainObjectName="CgiReplyBucketData" alias=""/>-->
 <!--        <table tableName="we_com_user" domainObjectName="WeComUser" alias=""/>-->
 <!--        <table tableName="we_com_alert_message" domainObjectName="AlertMessage" alias=""/>-->
 <!--        <table tableName="gh_detail" domainObjectName="GhDetail" alias=""/>-->
@@ -64,8 +64,7 @@
 <!--        <table tableName="we_com_staff_with_user" domainObjectName="StaffWithUser" alias=""/>-->
 <!--        <table tableName="we_com_corp_statistics_total" domainObjectName="CorpStatisticsTotal" alias=""/>-->
 <!--        <table tableName="we_com_staff_statistics_total" domainObjectName="StaffStatisticsTotal" alias=""/>-->
-
-
+        <table tableName="we_com_staff_group_statistics_total" domainObjectName="StaffGroupStatisticsTotal" alias=""/>
 
 
     </context>

+ 2 - 0
api-module/src/test/java/com/tzld/piaoquan/api/ContentPlatformTest.java

@@ -32,6 +32,8 @@ public class ContentPlatformTest {
             datastatJob.syncContentPlatformGzhDatastatTotalJob(dt);
             datastatJob.syncContentPlatformFwhDatastatJob(dt);
             datastatJob.syncContentPlatformFwhDatastatTotalJob(dt);
+            datastatJob.syncContentPlatformGzhPushDatastatJob(dt);
+            datastatJob.syncContentPlatformGzhPushDatastatTotalJob(dt);
             datastatJob.syncContentPlatformQwDatastatJob(dt);
             datastatJob.syncContentPlatformQwDatastatTotalJob(dt);
             datastatJob.syncContentPlatformQwDatastatReplyTotalJob(dt);

+ 13 - 1
api-module/src/test/java/com/tzld/piaoquan/api/WeComThirdPartTest.java

@@ -1,6 +1,7 @@
 package com.tzld.piaoquan.api;
 
 import com.tzld.piaoquan.api.job.wecom.thirdpart.WeComAccountJob;
+import com.tzld.piaoquan.api.job.wecom.thirdpart.WeComCreateRoomJob;
 import com.tzld.piaoquan.api.job.wecom.thirdpart.WeComSendMsgJob;
 import com.tzld.piaoquan.api.job.wecom.thirdpart.WeComUserDetailJob;
 import lombok.extern.slf4j.Slf4j;
@@ -18,7 +19,8 @@ public class WeComThirdPartTest {
     WeComAccountJob weComAccountJob;
     @Autowired
     WeComUserDetailJob weComUserDetailJob;
-
+    @Autowired
+    WeComCreateRoomJob weComCreateRoomJob;
 
     @Test
     public void checkAccountOnline() {
@@ -30,9 +32,19 @@ public class WeComThirdPartTest {
         weComUserDetailJob.syncUserDetail("");
     }
 
+    @Test
+    public void syncRoomDetail() {
+        weComUserDetailJob.syncRoomDetail("");
+    }
+
     @Test
     public void autoSendAppMsg() {
         weComSendMsgJob.autoSendAppMsg("");
     }
 
+    @Test
+    public void autoCreateRoomJob() {
+        weComCreateRoomJob.autoCreateRoomJob("");
+    }
+
 }

+ 3 - 0
common-module/src/main/java/com/tzld/piaoquan/growth/common/common/constant/WeComConstant.java

@@ -48,4 +48,7 @@ public interface WeComConstant {
     String POST_WE_COM_ADD_MOMENT_TASK = "https://qyapi.weixin.qq.com/cgi-bin/externalcontact/add_moment_task";
 
     String POST_WE_COM_USER_BEHAVIOR_DATA = "https://qyapi.weixin.qq.com/cgi-bin/externalcontact/get_user_behavior_data";
+
+    String POST_WE_COM_USER_GROUP_CHAT_STATISTIC = "https://qyapi.weixin.qq.com/cgi-bin/externalcontact/groupchat/statistic_group_by_day";
+
 }

+ 6 - 0
common-module/src/main/java/com/tzld/piaoquan/growth/common/common/constant/WeComServerConstant.java

@@ -13,4 +13,10 @@ public interface WeComServerConstant {
     String YLQ_ENCODING_AES_KEY = "UMw7T7TBHKnyXapbY1VdYdBYKzqrdZPs0tIHnquf1ey";
 
     String YLQ_CORP_ID = "ww541056f62f568c58";
+
+    String SBCX_TOKEN = "ph6qaPfH93FQqr3MqtcHCpki4z6yAbH9";
+
+    String SBCX_ENCODING_AES_KEY = "eUYquezZizbjyjT7tub4uTqFTaO73SPAstjLvUeKVp6";
+
+    String SBCX_CORP_ID = "wwb10600a153d6f60d";
 }

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

@@ -6,7 +6,8 @@ import lombok.Getter;
 public enum CorpEnum {
 
     HNWQ(1L, "湖南为趣时代"),
-    YLQ(2L, "优量圈");
+    YLQ(2L, "优量圈"),
+    SBCX(3L, "赛博成行");
 
     final Long id;
     final String desc;

+ 35 - 0
common-module/src/main/java/com/tzld/piaoquan/growth/common/dao/mapper/StaffGroupStatisticsTotalMapper.java

@@ -0,0 +1,35 @@
+package com.tzld.piaoquan.growth.common.dao.mapper;
+
+import com.tzld.piaoquan.growth.common.model.po.StaffGroupStatisticsTotal;
+import com.tzld.piaoquan.growth.common.model.po.StaffGroupStatisticsTotalExample;
+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 StaffGroupStatisticsTotalMapper {
+    long countByExample(StaffGroupStatisticsTotalExample example);
+
+    int deleteByExample(StaffGroupStatisticsTotalExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(StaffGroupStatisticsTotal record);
+
+    int insertSelective(StaffGroupStatisticsTotal record);
+
+    List<StaffGroupStatisticsTotal> selectByExample(StaffGroupStatisticsTotalExample example);
+
+    StaffGroupStatisticsTotal selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") StaffGroupStatisticsTotal record, @Param("example") StaffGroupStatisticsTotalExample example);
+
+    int updateByExample(@Param("record") StaffGroupStatisticsTotal record, @Param("example") StaffGroupStatisticsTotalExample example);
+
+    int updateByPrimaryKeySelective(StaffGroupStatisticsTotal record);
+
+    int updateByPrimaryKey(StaffGroupStatisticsTotal record);
+}

+ 180 - 0
common-module/src/main/java/com/tzld/piaoquan/growth/common/model/po/StaffGroupStatisticsTotal.java

@@ -0,0 +1,180 @@
+package com.tzld.piaoquan.growth.common.model.po;
+
+import java.util.Date;
+
+public class StaffGroupStatisticsTotal {
+    private Long id;
+
+    private String date;
+
+    private Long corpId;
+
+    private Long staffId;
+
+    private Long statTime;
+
+    private Integer newChatCnt;
+
+    private Integer chatTotal;
+
+    private Integer chatHasMsg;
+
+    private Integer newMemberCnt;
+
+    private Integer memberTotal;
+
+    private Integer memberHasMsg;
+
+    private Integer msgTotal;
+
+    private Integer migrateTraineeChatCnt;
+
+    private Date createTime;
+
+    private Date updateTime;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getDate() {
+        return date;
+    }
+
+    public void setDate(String date) {
+        this.date = date;
+    }
+
+    public Long getCorpId() {
+        return corpId;
+    }
+
+    public void setCorpId(Long corpId) {
+        this.corpId = corpId;
+    }
+
+    public Long getStaffId() {
+        return staffId;
+    }
+
+    public void setStaffId(Long staffId) {
+        this.staffId = staffId;
+    }
+
+    public Long getStatTime() {
+        return statTime;
+    }
+
+    public void setStatTime(Long statTime) {
+        this.statTime = statTime;
+    }
+
+    public Integer getNewChatCnt() {
+        return newChatCnt;
+    }
+
+    public void setNewChatCnt(Integer newChatCnt) {
+        this.newChatCnt = newChatCnt;
+    }
+
+    public Integer getChatTotal() {
+        return chatTotal;
+    }
+
+    public void setChatTotal(Integer chatTotal) {
+        this.chatTotal = chatTotal;
+    }
+
+    public Integer getChatHasMsg() {
+        return chatHasMsg;
+    }
+
+    public void setChatHasMsg(Integer chatHasMsg) {
+        this.chatHasMsg = chatHasMsg;
+    }
+
+    public Integer getNewMemberCnt() {
+        return newMemberCnt;
+    }
+
+    public void setNewMemberCnt(Integer newMemberCnt) {
+        this.newMemberCnt = newMemberCnt;
+    }
+
+    public Integer getMemberTotal() {
+        return memberTotal;
+    }
+
+    public void setMemberTotal(Integer memberTotal) {
+        this.memberTotal = memberTotal;
+    }
+
+    public Integer getMemberHasMsg() {
+        return memberHasMsg;
+    }
+
+    public void setMemberHasMsg(Integer memberHasMsg) {
+        this.memberHasMsg = memberHasMsg;
+    }
+
+    public Integer getMsgTotal() {
+        return msgTotal;
+    }
+
+    public void setMsgTotal(Integer msgTotal) {
+        this.msgTotal = msgTotal;
+    }
+
+    public Integer getMigrateTraineeChatCnt() {
+        return migrateTraineeChatCnt;
+    }
+
+    public void setMigrateTraineeChatCnt(Integer migrateTraineeChatCnt) {
+        this.migrateTraineeChatCnt = migrateTraineeChatCnt;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", date=").append(date);
+        sb.append(", corpId=").append(corpId);
+        sb.append(", staffId=").append(staffId);
+        sb.append(", statTime=").append(statTime);
+        sb.append(", newChatCnt=").append(newChatCnt);
+        sb.append(", chatTotal=").append(chatTotal);
+        sb.append(", chatHasMsg=").append(chatHasMsg);
+        sb.append(", newMemberCnt=").append(newMemberCnt);
+        sb.append(", memberTotal=").append(memberTotal);
+        sb.append(", memberHasMsg=").append(memberHasMsg);
+        sb.append(", msgTotal=").append(msgTotal);
+        sb.append(", migrateTraineeChatCnt=").append(migrateTraineeChatCnt);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 1122 - 0
common-module/src/main/java/com/tzld/piaoquan/growth/common/model/po/StaffGroupStatisticsTotalExample.java

@@ -0,0 +1,1122 @@
+package com.tzld.piaoquan.growth.common.model.po;
+
+import com.tzld.piaoquan.growth.common.utils.page.Page;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class StaffGroupStatisticsTotalExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    protected Page page;
+
+    public StaffGroupStatisticsTotalExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    public void setPage(Page page) {
+        this.page=page;
+    }
+
+    public Page getPage() {
+        return page;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateIsNull() {
+            addCriterion("`date` is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateIsNotNull() {
+            addCriterion("`date` is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateEqualTo(String value) {
+            addCriterion("`date` =", value, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateNotEqualTo(String value) {
+            addCriterion("`date` <>", value, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateGreaterThan(String value) {
+            addCriterion("`date` >", value, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateGreaterThanOrEqualTo(String value) {
+            addCriterion("`date` >=", value, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateLessThan(String value) {
+            addCriterion("`date` <", value, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateLessThanOrEqualTo(String value) {
+            addCriterion("`date` <=", value, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateLike(String value) {
+            addCriterion("`date` like", value, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateNotLike(String value) {
+            addCriterion("`date` not like", value, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateIn(List<String> values) {
+            addCriterion("`date` in", values, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateNotIn(List<String> values) {
+            addCriterion("`date` not in", values, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateBetween(String value1, String value2) {
+            addCriterion("`date` between", value1, value2, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateNotBetween(String value1, String value2) {
+            addCriterion("`date` not between", value1, value2, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdIsNull() {
+            addCriterion("corp_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdIsNotNull() {
+            addCriterion("corp_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdEqualTo(Long value) {
+            addCriterion("corp_id =", value, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdNotEqualTo(Long value) {
+            addCriterion("corp_id <>", value, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdGreaterThan(Long value) {
+            addCriterion("corp_id >", value, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("corp_id >=", value, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdLessThan(Long value) {
+            addCriterion("corp_id <", value, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdLessThanOrEqualTo(Long value) {
+            addCriterion("corp_id <=", value, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdIn(List<Long> values) {
+            addCriterion("corp_id in", values, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdNotIn(List<Long> values) {
+            addCriterion("corp_id not in", values, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdBetween(Long value1, Long value2) {
+            addCriterion("corp_id between", value1, value2, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdNotBetween(Long value1, Long value2) {
+            addCriterion("corp_id not between", value1, value2, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andStaffIdIsNull() {
+            addCriterion("staff_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStaffIdIsNotNull() {
+            addCriterion("staff_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStaffIdEqualTo(Long value) {
+            addCriterion("staff_id =", value, "staffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andStaffIdNotEqualTo(Long value) {
+            addCriterion("staff_id <>", value, "staffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andStaffIdGreaterThan(Long value) {
+            addCriterion("staff_id >", value, "staffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andStaffIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("staff_id >=", value, "staffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andStaffIdLessThan(Long value) {
+            addCriterion("staff_id <", value, "staffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andStaffIdLessThanOrEqualTo(Long value) {
+            addCriterion("staff_id <=", value, "staffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andStaffIdIn(List<Long> values) {
+            addCriterion("staff_id in", values, "staffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andStaffIdNotIn(List<Long> values) {
+            addCriterion("staff_id not in", values, "staffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andStaffIdBetween(Long value1, Long value2) {
+            addCriterion("staff_id between", value1, value2, "staffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andStaffIdNotBetween(Long value1, Long value2) {
+            addCriterion("staff_id not between", value1, value2, "staffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatTimeIsNull() {
+            addCriterion("stat_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatTimeIsNotNull() {
+            addCriterion("stat_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatTimeEqualTo(Long value) {
+            addCriterion("stat_time =", value, "statTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatTimeNotEqualTo(Long value) {
+            addCriterion("stat_time <>", value, "statTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatTimeGreaterThan(Long value) {
+            addCriterion("stat_time >", value, "statTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatTimeGreaterThanOrEqualTo(Long value) {
+            addCriterion("stat_time >=", value, "statTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatTimeLessThan(Long value) {
+            addCriterion("stat_time <", value, "statTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatTimeLessThanOrEqualTo(Long value) {
+            addCriterion("stat_time <=", value, "statTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatTimeIn(List<Long> values) {
+            addCriterion("stat_time in", values, "statTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatTimeNotIn(List<Long> values) {
+            addCriterion("stat_time not in", values, "statTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatTimeBetween(Long value1, Long value2) {
+            addCriterion("stat_time between", value1, value2, "statTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatTimeNotBetween(Long value1, Long value2) {
+            addCriterion("stat_time not between", value1, value2, "statTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewChatCntIsNull() {
+            addCriterion("new_chat_cnt is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewChatCntIsNotNull() {
+            addCriterion("new_chat_cnt is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewChatCntEqualTo(Integer value) {
+            addCriterion("new_chat_cnt =", value, "newChatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewChatCntNotEqualTo(Integer value) {
+            addCriterion("new_chat_cnt <>", value, "newChatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewChatCntGreaterThan(Integer value) {
+            addCriterion("new_chat_cnt >", value, "newChatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewChatCntGreaterThanOrEqualTo(Integer value) {
+            addCriterion("new_chat_cnt >=", value, "newChatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewChatCntLessThan(Integer value) {
+            addCriterion("new_chat_cnt <", value, "newChatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewChatCntLessThanOrEqualTo(Integer value) {
+            addCriterion("new_chat_cnt <=", value, "newChatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewChatCntIn(List<Integer> values) {
+            addCriterion("new_chat_cnt in", values, "newChatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewChatCntNotIn(List<Integer> values) {
+            addCriterion("new_chat_cnt not in", values, "newChatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewChatCntBetween(Integer value1, Integer value2) {
+            addCriterion("new_chat_cnt between", value1, value2, "newChatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewChatCntNotBetween(Integer value1, Integer value2) {
+            addCriterion("new_chat_cnt not between", value1, value2, "newChatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatTotalIsNull() {
+            addCriterion("chat_total is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatTotalIsNotNull() {
+            addCriterion("chat_total is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatTotalEqualTo(Integer value) {
+            addCriterion("chat_total =", value, "chatTotal");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatTotalNotEqualTo(Integer value) {
+            addCriterion("chat_total <>", value, "chatTotal");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatTotalGreaterThan(Integer value) {
+            addCriterion("chat_total >", value, "chatTotal");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatTotalGreaterThanOrEqualTo(Integer value) {
+            addCriterion("chat_total >=", value, "chatTotal");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatTotalLessThan(Integer value) {
+            addCriterion("chat_total <", value, "chatTotal");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatTotalLessThanOrEqualTo(Integer value) {
+            addCriterion("chat_total <=", value, "chatTotal");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatTotalIn(List<Integer> values) {
+            addCriterion("chat_total in", values, "chatTotal");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatTotalNotIn(List<Integer> values) {
+            addCriterion("chat_total not in", values, "chatTotal");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatTotalBetween(Integer value1, Integer value2) {
+            addCriterion("chat_total between", value1, value2, "chatTotal");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatTotalNotBetween(Integer value1, Integer value2) {
+            addCriterion("chat_total not between", value1, value2, "chatTotal");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatHasMsgIsNull() {
+            addCriterion("chat_has_msg is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatHasMsgIsNotNull() {
+            addCriterion("chat_has_msg is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatHasMsgEqualTo(Integer value) {
+            addCriterion("chat_has_msg =", value, "chatHasMsg");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatHasMsgNotEqualTo(Integer value) {
+            addCriterion("chat_has_msg <>", value, "chatHasMsg");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatHasMsgGreaterThan(Integer value) {
+            addCriterion("chat_has_msg >", value, "chatHasMsg");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatHasMsgGreaterThanOrEqualTo(Integer value) {
+            addCriterion("chat_has_msg >=", value, "chatHasMsg");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatHasMsgLessThan(Integer value) {
+            addCriterion("chat_has_msg <", value, "chatHasMsg");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatHasMsgLessThanOrEqualTo(Integer value) {
+            addCriterion("chat_has_msg <=", value, "chatHasMsg");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatHasMsgIn(List<Integer> values) {
+            addCriterion("chat_has_msg in", values, "chatHasMsg");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatHasMsgNotIn(List<Integer> values) {
+            addCriterion("chat_has_msg not in", values, "chatHasMsg");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatHasMsgBetween(Integer value1, Integer value2) {
+            addCriterion("chat_has_msg between", value1, value2, "chatHasMsg");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatHasMsgNotBetween(Integer value1, Integer value2) {
+            addCriterion("chat_has_msg not between", value1, value2, "chatHasMsg");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewMemberCntIsNull() {
+            addCriterion("new_member_cnt is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewMemberCntIsNotNull() {
+            addCriterion("new_member_cnt is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewMemberCntEqualTo(Integer value) {
+            addCriterion("new_member_cnt =", value, "newMemberCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewMemberCntNotEqualTo(Integer value) {
+            addCriterion("new_member_cnt <>", value, "newMemberCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewMemberCntGreaterThan(Integer value) {
+            addCriterion("new_member_cnt >", value, "newMemberCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewMemberCntGreaterThanOrEqualTo(Integer value) {
+            addCriterion("new_member_cnt >=", value, "newMemberCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewMemberCntLessThan(Integer value) {
+            addCriterion("new_member_cnt <", value, "newMemberCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewMemberCntLessThanOrEqualTo(Integer value) {
+            addCriterion("new_member_cnt <=", value, "newMemberCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewMemberCntIn(List<Integer> values) {
+            addCriterion("new_member_cnt in", values, "newMemberCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewMemberCntNotIn(List<Integer> values) {
+            addCriterion("new_member_cnt not in", values, "newMemberCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewMemberCntBetween(Integer value1, Integer value2) {
+            addCriterion("new_member_cnt between", value1, value2, "newMemberCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewMemberCntNotBetween(Integer value1, Integer value2) {
+            addCriterion("new_member_cnt not between", value1, value2, "newMemberCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberTotalIsNull() {
+            addCriterion("member_total is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberTotalIsNotNull() {
+            addCriterion("member_total is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberTotalEqualTo(Integer value) {
+            addCriterion("member_total =", value, "memberTotal");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberTotalNotEqualTo(Integer value) {
+            addCriterion("member_total <>", value, "memberTotal");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberTotalGreaterThan(Integer value) {
+            addCriterion("member_total >", value, "memberTotal");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberTotalGreaterThanOrEqualTo(Integer value) {
+            addCriterion("member_total >=", value, "memberTotal");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberTotalLessThan(Integer value) {
+            addCriterion("member_total <", value, "memberTotal");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberTotalLessThanOrEqualTo(Integer value) {
+            addCriterion("member_total <=", value, "memberTotal");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberTotalIn(List<Integer> values) {
+            addCriterion("member_total in", values, "memberTotal");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberTotalNotIn(List<Integer> values) {
+            addCriterion("member_total not in", values, "memberTotal");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberTotalBetween(Integer value1, Integer value2) {
+            addCriterion("member_total between", value1, value2, "memberTotal");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberTotalNotBetween(Integer value1, Integer value2) {
+            addCriterion("member_total not between", value1, value2, "memberTotal");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberHasMsgIsNull() {
+            addCriterion("member_has_msg is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberHasMsgIsNotNull() {
+            addCriterion("member_has_msg is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberHasMsgEqualTo(Integer value) {
+            addCriterion("member_has_msg =", value, "memberHasMsg");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberHasMsgNotEqualTo(Integer value) {
+            addCriterion("member_has_msg <>", value, "memberHasMsg");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberHasMsgGreaterThan(Integer value) {
+            addCriterion("member_has_msg >", value, "memberHasMsg");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberHasMsgGreaterThanOrEqualTo(Integer value) {
+            addCriterion("member_has_msg >=", value, "memberHasMsg");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberHasMsgLessThan(Integer value) {
+            addCriterion("member_has_msg <", value, "memberHasMsg");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberHasMsgLessThanOrEqualTo(Integer value) {
+            addCriterion("member_has_msg <=", value, "memberHasMsg");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberHasMsgIn(List<Integer> values) {
+            addCriterion("member_has_msg in", values, "memberHasMsg");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberHasMsgNotIn(List<Integer> values) {
+            addCriterion("member_has_msg not in", values, "memberHasMsg");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberHasMsgBetween(Integer value1, Integer value2) {
+            addCriterion("member_has_msg between", value1, value2, "memberHasMsg");
+            return (Criteria) this;
+        }
+
+        public Criteria andMemberHasMsgNotBetween(Integer value1, Integer value2) {
+            addCriterion("member_has_msg not between", value1, value2, "memberHasMsg");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTotalIsNull() {
+            addCriterion("msg_total is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTotalIsNotNull() {
+            addCriterion("msg_total is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTotalEqualTo(Integer value) {
+            addCriterion("msg_total =", value, "msgTotal");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTotalNotEqualTo(Integer value) {
+            addCriterion("msg_total <>", value, "msgTotal");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTotalGreaterThan(Integer value) {
+            addCriterion("msg_total >", value, "msgTotal");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTotalGreaterThanOrEqualTo(Integer value) {
+            addCriterion("msg_total >=", value, "msgTotal");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTotalLessThan(Integer value) {
+            addCriterion("msg_total <", value, "msgTotal");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTotalLessThanOrEqualTo(Integer value) {
+            addCriterion("msg_total <=", value, "msgTotal");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTotalIn(List<Integer> values) {
+            addCriterion("msg_total in", values, "msgTotal");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTotalNotIn(List<Integer> values) {
+            addCriterion("msg_total not in", values, "msgTotal");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTotalBetween(Integer value1, Integer value2) {
+            addCriterion("msg_total between", value1, value2, "msgTotal");
+            return (Criteria) this;
+        }
+
+        public Criteria andMsgTotalNotBetween(Integer value1, Integer value2) {
+            addCriterion("msg_total not between", value1, value2, "msgTotal");
+            return (Criteria) this;
+        }
+
+        public Criteria andMigrateTraineeChatCntIsNull() {
+            addCriterion("migrate_trainee_chat_cnt is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMigrateTraineeChatCntIsNotNull() {
+            addCriterion("migrate_trainee_chat_cnt is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMigrateTraineeChatCntEqualTo(Integer value) {
+            addCriterion("migrate_trainee_chat_cnt =", value, "migrateTraineeChatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andMigrateTraineeChatCntNotEqualTo(Integer value) {
+            addCriterion("migrate_trainee_chat_cnt <>", value, "migrateTraineeChatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andMigrateTraineeChatCntGreaterThan(Integer value) {
+            addCriterion("migrate_trainee_chat_cnt >", value, "migrateTraineeChatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andMigrateTraineeChatCntGreaterThanOrEqualTo(Integer value) {
+            addCriterion("migrate_trainee_chat_cnt >=", value, "migrateTraineeChatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andMigrateTraineeChatCntLessThan(Integer value) {
+            addCriterion("migrate_trainee_chat_cnt <", value, "migrateTraineeChatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andMigrateTraineeChatCntLessThanOrEqualTo(Integer value) {
+            addCriterion("migrate_trainee_chat_cnt <=", value, "migrateTraineeChatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andMigrateTraineeChatCntIn(List<Integer> values) {
+            addCriterion("migrate_trainee_chat_cnt in", values, "migrateTraineeChatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andMigrateTraineeChatCntNotIn(List<Integer> values) {
+            addCriterion("migrate_trainee_chat_cnt not in", values, "migrateTraineeChatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andMigrateTraineeChatCntBetween(Integer value1, Integer value2) {
+            addCriterion("migrate_trainee_chat_cnt between", value1, value2, "migrateTraineeChatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andMigrateTraineeChatCntNotBetween(Integer value1, Integer value2) {
+            addCriterion("migrate_trainee_chat_cnt not between", value1, value2, "migrateTraineeChatCnt");
+            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);
+        }
+    }
+}

+ 374 - 0
common-module/src/main/resources/mapper/StaffGroupStatisticsTotalMapper.xml

@@ -0,0 +1,374 @@
+<?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.growth.common.dao.mapper.StaffGroupStatisticsTotalMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.growth.common.model.po.StaffGroupStatisticsTotal">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="date" jdbcType="VARCHAR" property="date" />
+    <result column="corp_id" jdbcType="BIGINT" property="corpId" />
+    <result column="staff_id" jdbcType="BIGINT" property="staffId" />
+    <result column="stat_time" jdbcType="BIGINT" property="statTime" />
+    <result column="new_chat_cnt" jdbcType="INTEGER" property="newChatCnt" />
+    <result column="chat_total" jdbcType="INTEGER" property="chatTotal" />
+    <result column="chat_has_msg" jdbcType="INTEGER" property="chatHasMsg" />
+    <result column="new_member_cnt" jdbcType="INTEGER" property="newMemberCnt" />
+    <result column="member_total" jdbcType="INTEGER" property="memberTotal" />
+    <result column="member_has_msg" jdbcType="INTEGER" property="memberHasMsg" />
+    <result column="msg_total" jdbcType="INTEGER" property="msgTotal" />
+    <result column="migrate_trainee_chat_cnt" jdbcType="INTEGER" property="migrateTraineeChatCnt" />
+    <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, `date`, corp_id, staff_id, stat_time, new_chat_cnt, chat_total, chat_has_msg, 
+    new_member_cnt, member_total, member_has_msg, msg_total, migrate_trainee_chat_cnt, 
+    create_time, update_time
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.growth.common.model.po.StaffGroupStatisticsTotalExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from we_com_staff_group_statistics_total
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    <if test="page != null">
+      limit #{page.offset} , #{page.pageSize}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from we_com_staff_group_statistics_total
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from we_com_staff_group_statistics_total
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.growth.common.model.po.StaffGroupStatisticsTotalExample">
+    delete from we_com_staff_group_statistics_total
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.growth.common.model.po.StaffGroupStatisticsTotal">
+    insert into we_com_staff_group_statistics_total (id, `date`, corp_id, 
+      staff_id, stat_time, new_chat_cnt, 
+      chat_total, chat_has_msg, new_member_cnt, 
+      member_total, member_has_msg, msg_total, 
+      migrate_trainee_chat_cnt, create_time, update_time
+      )
+    values (#{id,jdbcType=BIGINT}, #{date,jdbcType=VARCHAR}, #{corpId,jdbcType=BIGINT}, 
+      #{staffId,jdbcType=BIGINT}, #{statTime,jdbcType=BIGINT}, #{newChatCnt,jdbcType=INTEGER}, 
+      #{chatTotal,jdbcType=INTEGER}, #{chatHasMsg,jdbcType=INTEGER}, #{newMemberCnt,jdbcType=INTEGER}, 
+      #{memberTotal,jdbcType=INTEGER}, #{memberHasMsg,jdbcType=INTEGER}, #{msgTotal,jdbcType=INTEGER}, 
+      #{migrateTraineeChatCnt,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.growth.common.model.po.StaffGroupStatisticsTotal">
+    insert into we_com_staff_group_statistics_total
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="date != null">
+        `date`,
+      </if>
+      <if test="corpId != null">
+        corp_id,
+      </if>
+      <if test="staffId != null">
+        staff_id,
+      </if>
+      <if test="statTime != null">
+        stat_time,
+      </if>
+      <if test="newChatCnt != null">
+        new_chat_cnt,
+      </if>
+      <if test="chatTotal != null">
+        chat_total,
+      </if>
+      <if test="chatHasMsg != null">
+        chat_has_msg,
+      </if>
+      <if test="newMemberCnt != null">
+        new_member_cnt,
+      </if>
+      <if test="memberTotal != null">
+        member_total,
+      </if>
+      <if test="memberHasMsg != null">
+        member_has_msg,
+      </if>
+      <if test="msgTotal != null">
+        msg_total,
+      </if>
+      <if test="migrateTraineeChatCnt != null">
+        migrate_trainee_chat_cnt,
+      </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="date != null">
+        #{date,jdbcType=VARCHAR},
+      </if>
+      <if test="corpId != null">
+        #{corpId,jdbcType=BIGINT},
+      </if>
+      <if test="staffId != null">
+        #{staffId,jdbcType=BIGINT},
+      </if>
+      <if test="statTime != null">
+        #{statTime,jdbcType=BIGINT},
+      </if>
+      <if test="newChatCnt != null">
+        #{newChatCnt,jdbcType=INTEGER},
+      </if>
+      <if test="chatTotal != null">
+        #{chatTotal,jdbcType=INTEGER},
+      </if>
+      <if test="chatHasMsg != null">
+        #{chatHasMsg,jdbcType=INTEGER},
+      </if>
+      <if test="newMemberCnt != null">
+        #{newMemberCnt,jdbcType=INTEGER},
+      </if>
+      <if test="memberTotal != null">
+        #{memberTotal,jdbcType=INTEGER},
+      </if>
+      <if test="memberHasMsg != null">
+        #{memberHasMsg,jdbcType=INTEGER},
+      </if>
+      <if test="msgTotal != null">
+        #{msgTotal,jdbcType=INTEGER},
+      </if>
+      <if test="migrateTraineeChatCnt != null">
+        #{migrateTraineeChatCnt,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.growth.common.model.po.StaffGroupStatisticsTotalExample" resultType="java.lang.Long">
+    select count(*) from we_com_staff_group_statistics_total
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update we_com_staff_group_statistics_total
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.date != null">
+        `date` = #{record.date,jdbcType=VARCHAR},
+      </if>
+      <if test="record.corpId != null">
+        corp_id = #{record.corpId,jdbcType=BIGINT},
+      </if>
+      <if test="record.staffId != null">
+        staff_id = #{record.staffId,jdbcType=BIGINT},
+      </if>
+      <if test="record.statTime != null">
+        stat_time = #{record.statTime,jdbcType=BIGINT},
+      </if>
+      <if test="record.newChatCnt != null">
+        new_chat_cnt = #{record.newChatCnt,jdbcType=INTEGER},
+      </if>
+      <if test="record.chatTotal != null">
+        chat_total = #{record.chatTotal,jdbcType=INTEGER},
+      </if>
+      <if test="record.chatHasMsg != null">
+        chat_has_msg = #{record.chatHasMsg,jdbcType=INTEGER},
+      </if>
+      <if test="record.newMemberCnt != null">
+        new_member_cnt = #{record.newMemberCnt,jdbcType=INTEGER},
+      </if>
+      <if test="record.memberTotal != null">
+        member_total = #{record.memberTotal,jdbcType=INTEGER},
+      </if>
+      <if test="record.memberHasMsg != null">
+        member_has_msg = #{record.memberHasMsg,jdbcType=INTEGER},
+      </if>
+      <if test="record.msgTotal != null">
+        msg_total = #{record.msgTotal,jdbcType=INTEGER},
+      </if>
+      <if test="record.migrateTraineeChatCnt != null">
+        migrate_trainee_chat_cnt = #{record.migrateTraineeChatCnt,jdbcType=INTEGER},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.updateTime != null">
+        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update we_com_staff_group_statistics_total
+    set id = #{record.id,jdbcType=BIGINT},
+      `date` = #{record.date,jdbcType=VARCHAR},
+      corp_id = #{record.corpId,jdbcType=BIGINT},
+      staff_id = #{record.staffId,jdbcType=BIGINT},
+      stat_time = #{record.statTime,jdbcType=BIGINT},
+      new_chat_cnt = #{record.newChatCnt,jdbcType=INTEGER},
+      chat_total = #{record.chatTotal,jdbcType=INTEGER},
+      chat_has_msg = #{record.chatHasMsg,jdbcType=INTEGER},
+      new_member_cnt = #{record.newMemberCnt,jdbcType=INTEGER},
+      member_total = #{record.memberTotal,jdbcType=INTEGER},
+      member_has_msg = #{record.memberHasMsg,jdbcType=INTEGER},
+      msg_total = #{record.msgTotal,jdbcType=INTEGER},
+      migrate_trainee_chat_cnt = #{record.migrateTraineeChatCnt,jdbcType=INTEGER},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      update_time = #{record.updateTime,jdbcType=TIMESTAMP}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.growth.common.model.po.StaffGroupStatisticsTotal">
+    update we_com_staff_group_statistics_total
+    <set>
+      <if test="date != null">
+        `date` = #{date,jdbcType=VARCHAR},
+      </if>
+      <if test="corpId != null">
+        corp_id = #{corpId,jdbcType=BIGINT},
+      </if>
+      <if test="staffId != null">
+        staff_id = #{staffId,jdbcType=BIGINT},
+      </if>
+      <if test="statTime != null">
+        stat_time = #{statTime,jdbcType=BIGINT},
+      </if>
+      <if test="newChatCnt != null">
+        new_chat_cnt = #{newChatCnt,jdbcType=INTEGER},
+      </if>
+      <if test="chatTotal != null">
+        chat_total = #{chatTotal,jdbcType=INTEGER},
+      </if>
+      <if test="chatHasMsg != null">
+        chat_has_msg = #{chatHasMsg,jdbcType=INTEGER},
+      </if>
+      <if test="newMemberCnt != null">
+        new_member_cnt = #{newMemberCnt,jdbcType=INTEGER},
+      </if>
+      <if test="memberTotal != null">
+        member_total = #{memberTotal,jdbcType=INTEGER},
+      </if>
+      <if test="memberHasMsg != null">
+        member_has_msg = #{memberHasMsg,jdbcType=INTEGER},
+      </if>
+      <if test="msgTotal != null">
+        msg_total = #{msgTotal,jdbcType=INTEGER},
+      </if>
+      <if test="migrateTraineeChatCnt != null">
+        migrate_trainee_chat_cnt = #{migrateTraineeChatCnt,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.growth.common.model.po.StaffGroupStatisticsTotal">
+    update we_com_staff_group_statistics_total
+    set `date` = #{date,jdbcType=VARCHAR},
+      corp_id = #{corpId,jdbcType=BIGINT},
+      staff_id = #{staffId,jdbcType=BIGINT},
+      stat_time = #{statTime,jdbcType=BIGINT},
+      new_chat_cnt = #{newChatCnt,jdbcType=INTEGER},
+      chat_total = #{chatTotal,jdbcType=INTEGER},
+      chat_has_msg = #{chatHasMsg,jdbcType=INTEGER},
+      new_member_cnt = #{newMemberCnt,jdbcType=INTEGER},
+      member_total = #{memberTotal,jdbcType=INTEGER},
+      member_has_msg = #{memberHasMsg,jdbcType=INTEGER},
+      msg_total = #{msgTotal,jdbcType=INTEGER},
+      migrate_trainee_chat_cnt = #{migrateTraineeChatCnt,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_time = #{updateTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 1 - 1
offline-module/src/main/java/com/tzld/piaoquan/offline/job/WeComHistoryDataJob.java

@@ -178,7 +178,7 @@ public class WeComHistoryDataJob {
                 LarkRobotUtil.sendMessage(sendDetail.getRemark() + "存在未发送记录,请检查");
                 LarkRobotUtil.sendTipMessage(sendDetail.getRemark() + "存在未发送记录,请检查");
                 //8点前报警
-                if (DateUtil.getHourOfDay() < 8 && corpId == 1) {
+                if (DateUtil.getHourOfDay() < 8 && (corpId == 1 || corpId == 3)) {
                     LarkRobotUtil.sendNotPushMessage("<at user_id=\"all\">所有人</at> " + sendDetail.getRemark() + " 存在未发送记录,请检查");
                 }
             }

+ 57 - 4
offline-module/src/main/java/com/tzld/piaoquan/offline/job/WeComStaffDataJob.java

@@ -5,10 +5,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.tzld.piaoquan.growth.common.common.enums.TimeEnum;
 import com.tzld.piaoquan.growth.common.component.HttpPoolClient;
 import com.tzld.piaoquan.growth.common.component.ProxyHttpPoolClient;
-import com.tzld.piaoquan.growth.common.dao.mapper.CorpMapper;
-import com.tzld.piaoquan.growth.common.dao.mapper.CorpStatisticsTotalMapper;
-import com.tzld.piaoquan.growth.common.dao.mapper.StaffMapper;
-import com.tzld.piaoquan.growth.common.dao.mapper.StaffStatisticsTotalMapper;
+import com.tzld.piaoquan.growth.common.dao.mapper.*;
 import com.tzld.piaoquan.growth.common.model.bo.XxlJobParam;
 import com.tzld.piaoquan.growth.common.model.po.*;
 import com.tzld.piaoquan.growth.common.service.WeComAccessTokenService;
@@ -54,6 +51,9 @@ public class WeComStaffDataJob {
     @Autowired
     private StaffStatisticsTotalMapper staffStatisticsTotalMapper;
 
+    @Autowired
+    private StaffGroupStatisticsTotalMapper staffGroupStatisticsTotalMapper;
+
     @Autowired
     private CorpStatisticsTotalMapper corpStatisticsTotalMapper;
 
@@ -130,6 +130,7 @@ public class WeComStaffDataJob {
         List<Staff> staffs = staffMapper.selectByExample(staffExample);
         for (Staff staff : staffs) {
             statisticsStaffTotal(staff, startTime, endTime, date);
+            statisticsStaffGroupTotal(staff, startTime, date);
         }
         StaffStatisticsTotalExample staffStatisticsTotalExample = new StaffStatisticsTotalExample();
         staffStatisticsTotalExample.createCriteria().andDateEqualTo(date);
@@ -230,4 +231,56 @@ public class WeComStaffDataJob {
         }
     }
 
+
+    private void statisticsStaffGroupTotal(Staff staff, long startTime, String date) throws IOException {
+        Long corpId = staff.getCorpId();
+        StaffGroupStatisticsTotalExample example = new StaffGroupStatisticsTotalExample();
+        example.createCriteria().andCorpIdEqualTo(corpId).andStaffIdEqualTo(staff.getId()).andDateEqualTo(date);
+        long l = staffGroupStatisticsTotalMapper.countByExample(example);
+        if (l > 0) {
+            return;
+        }
+        String accessToken = weComAccessTokenService.getWeComAccessToken(corpId);
+        String url = POST_WE_COM_USER_GROUP_CHAT_STATISTIC
+                + "?access_token=" + accessToken;
+        JSONObject params = new JSONObject();
+        params.put("day_begin_time", startTime);
+        JSONObject ownerFilter = new JSONObject();
+        JSONArray userIds = new JSONArray();
+        userIds.add(staff.getCarrierId());
+        ownerFilter.put("userid_list", userIds);
+        params.put("owner_filter", ownerFilter);
+        System.out.println(JSONObject.toJSONString(params));
+        String res;
+        if (staff.getCorpId() == 1L) {
+            res = httpPoolClient.post(url, params.toJSONString());
+        } else {
+            res = proxyHttpPoolClient.post(url, params.toJSONString());
+        }
+        if (StringUtils.isNotEmpty(res)) {
+            JSONObject jsonObject = JSONObject.parseObject(res);
+            Integer errcode = jsonObject.getInteger("errcode");
+            if (errcode == 0) {
+                JSONArray jsonArray = jsonObject.getJSONArray("items");
+                if (!jsonArray.isEmpty()) {
+                    StaffGroupStatisticsTotal statisticsTotal = new StaffGroupStatisticsTotal();
+                    JSONObject data = jsonArray.getJSONObject(0).getJSONObject("data");
+                    statisticsTotal.setStatTime(jsonArray.getJSONObject(0).getLong("stat_time"));
+                    statisticsTotal.setNewChatCnt(data.getInteger("new_chat_cnt"));
+                    statisticsTotal.setChatTotal(data.getInteger("chat_total"));
+                    statisticsTotal.setChatHasMsg(data.getInteger("chat_has_msg"));
+                    statisticsTotal.setNewMemberCnt(data.getInteger("new_member_cnt"));
+                    statisticsTotal.setMemberTotal(data.getInteger("member_total"));
+                    statisticsTotal.setMemberHasMsg(data.getInteger("member_has_msg"));
+                    statisticsTotal.setMsgTotal(data.getInteger("msg_total"));
+                    statisticsTotal.setMigrateTraineeChatCnt(data.getInteger("migrate_trainee_chat_cnt"));
+                    statisticsTotal.setDate(date);
+                    statisticsTotal.setCorpId(corpId);
+                    statisticsTotal.setStaffId(staff.getId());
+                    staffGroupStatisticsTotalMapper.insertSelective(statisticsTotal);
+                }
+            }
+        }
+    }
+
 }