Просмотр исходного кода

Merge branch '20251119-wyp-weCom' of Server/growth-manager into master

wangyunpeng 3 недель назад
Родитель
Сommit
89b24b49ad
100 измененных файлов с 10502 добавлено и 197 удалено
  1. 7 0
      api-module/src/main/java/com/tzld/piaoquan/api/common/Constant.java
  2. 1 0
      api-module/src/main/java/com/tzld/piaoquan/api/common/enums/ExceptionEnum.java
  3. 33 0
      api-module/src/main/java/com/tzld/piaoquan/api/common/enums/wecom/ConfigSyncEnum.java
  4. 32 0
      api-module/src/main/java/com/tzld/piaoquan/api/common/enums/wecom/ConfigTaskContentTypeEnum.java
  5. 31 0
      api-module/src/main/java/com/tzld/piaoquan/api/common/enums/wecom/MsgSendStatusEnum.java
  6. 34 0
      api-module/src/main/java/com/tzld/piaoquan/api/common/enums/wecom/ThirdPartWeComStaffStatusEnum.java
  7. 43 0
      api-module/src/main/java/com/tzld/piaoquan/api/common/enums/wecom/WeComThirdPartyCallBackTypeEnum.java
  8. 10 0
      api-module/src/main/java/com/tzld/piaoquan/api/component/WeComThirdPartyApiClient.java
  9. 5 5
      api-module/src/main/java/com/tzld/piaoquan/api/config/CrossOriginConfig.java
  10. 11 4
      api-module/src/main/java/com/tzld/piaoquan/api/config/JwtInterceptor.java
  11. 1 1
      api-module/src/main/java/com/tzld/piaoquan/api/controller/wecom/MessageController.java
  12. 3 6
      api-module/src/main/java/com/tzld/piaoquan/api/controller/wecom/TencentWeComController.java
  13. 2 2
      api-module/src/main/java/com/tzld/piaoquan/api/controller/wecom/ThirdPartyController.java
  14. 2 2
      api-module/src/main/java/com/tzld/piaoquan/api/controller/wecom/WeComController.java
  15. 1 1
      api-module/src/main/java/com/tzld/piaoquan/api/controller/wecom/WeComUserController.java
  16. 92 0
      api-module/src/main/java/com/tzld/piaoquan/api/controller/wecom/thirdpart/WeComThirdPartyAccountController.java
  17. 26 0
      api-module/src/main/java/com/tzld/piaoquan/api/controller/wecom/thirdpart/WeComThirdPartyCallBackController.java
  18. 2 2
      api-module/src/main/java/com/tzld/piaoquan/api/controller/wecom/thirdpart/WeComThirdPartyController.java
  19. 52 0
      api-module/src/main/java/com/tzld/piaoquan/api/controller/wecom/thirdpart/WeComThirdPartyRoomController.java
  20. 2 2
      api-module/src/main/java/com/tzld/piaoquan/api/dao/generator/MybatisGeneratorMain.java
  21. 1 1
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/contentplatform/ext/ContentPlatformPlanMapperExt.java
  22. 30 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/wecom/thirdpart/ThirdPartWeComRoomConfigMapper.java
  23. 30 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/wecom/thirdpart/ThirdPartWeComRoomConfigTaskContentMapper.java
  24. 30 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/wecom/thirdpart/ThirdPartWeComRoomConfigTaskMapper.java
  25. 30 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/wecom/thirdpart/ThirdPartWeComStaffConfigMapper.java
  26. 30 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/wecom/thirdpart/ThirdPartWeComStaffConfigTaskContentMapper.java
  27. 30 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/wecom/thirdpart/ThirdPartWeComStaffConfigTaskMapper.java
  28. 2 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/wecom/thirdpart/ext/ThirdPartWeComMapperExt.java
  29. 20 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/wecom/thirdpart/ext/ThirdPartWeComRoomMapperExt.java
  30. 21 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/wecom/thirdpart/ext/ThirdPartWeComStaffMapperExt.java
  31. 18 3
      api-module/src/main/java/com/tzld/piaoquan/api/job/wecom/thirdpart/WeComAccountJob.java
  32. 1 1
      api-module/src/main/java/com/tzld/piaoquan/api/job/wecom/thirdpart/WeComCreateRoomJob.java
  33. 229 112
      api-module/src/main/java/com/tzld/piaoquan/api/job/wecom/thirdpart/WeComSendMsgJob.java
  34. 28 1
      api-module/src/main/java/com/tzld/piaoquan/api/job/wecom/thirdpart/WeComUserDetailJob.java
  35. 8 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/wecom/thirdpart/ExternalBusinessCardResponse.java
  36. 10 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/wecom/thirdpart/LoginOutResponse.java
  37. 21 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/wecom/thirdpart/SendTextMsgResponse.java
  38. 4 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/wecom/thirdpart/SetCallbackUrlRequest.java
  39. 37 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/wecom/thirdpart/ThirdPartyAccountConfigParam.java
  40. 19 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/wecom/thirdpart/ThirdPartyAccountConfigTaskContentParam.java
  41. 21 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/wecom/thirdpart/ThirdPartyAccountConfigTaskParam.java
  42. 16 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/wecom/thirdpart/ThirdPartyAccountListParam.java
  43. 10 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/wecom/thirdpart/ThirdPartyAccountLogOutParam.java
  44. 14 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/wecom/thirdpart/ThirdPartyConfigGetParam.java
  45. 31 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/wecom/thirdpart/ThirdPartyRoomConfigParam.java
  46. 19 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/wecom/thirdpart/ThirdPartyRoomConfigTaskContentParam.java
  47. 21 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/wecom/thirdpart/ThirdPartyRoomConfigTaskParam.java
  48. 18 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/wecom/thirdpart/ThirdPartyRoomListParam.java
  49. 10 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/wecom/thirdpart/WeComThirdPartyCallBackParam.java
  50. 33 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComMsg.java
  51. 190 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComMsgExample.java
  52. 125 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComRoomConfig.java
  53. 852 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComRoomConfigExample.java
  54. 103 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComRoomConfigTask.java
  55. 114 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComRoomConfigTaskContent.java
  56. 792 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComRoomConfigTaskContentExample.java
  57. 722 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComRoomConfigTaskExample.java
  58. 22 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComStaff.java
  59. 147 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComStaffConfig.java
  60. 962 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComStaffConfigExample.java
  61. 103 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComStaffConfigTask.java
  62. 114 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComStaffConfigTaskContent.java
  63. 792 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComStaffConfigTaskContentExample.java
  64. 722 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComStaffConfigTaskExample.java
  65. 140 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComStaffExample.java
  66. 23 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/IdNameVO.java
  67. 18 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/contentplatform/AccountQrCodeVO.java
  68. 25 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/wecom/thirdpart/CheckPushAccountExistVO.java
  69. 21 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/wecom/thirdpart/ThirdPartyAccountConfigTaskContentVO.java
  70. 23 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/wecom/thirdpart/ThirdPartyAccountConfigTaskVO.java
  71. 37 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/wecom/thirdpart/ThirdPartyAccountConfigVO.java
  72. 31 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/wecom/thirdpart/ThirdPartyAccountVO.java
  73. 19 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/wecom/thirdpart/ThirdPartyRoomConfigTaskContentVO.java
  74. 21 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/wecom/thirdpart/ThirdPartyRoomConfigTaskVO.java
  75. 30 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/wecom/thirdpart/ThirdPartyRoomConfigVO.java
  76. 25 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/wecom/thirdpart/ThirdPartyRoomVO.java
  77. 1 2
      api-module/src/main/java/com/tzld/piaoquan/api/service/impl/CgiReplyServiceImpl.java
  78. 1 1
      api-module/src/main/java/com/tzld/piaoquan/api/service/wecom/ThirdPartyService.java
  79. 1 1
      api-module/src/main/java/com/tzld/piaoquan/api/service/wecom/WeComAutoReply.java
  80. 1 1
      api-module/src/main/java/com/tzld/piaoquan/api/service/wecom/WeComService.java
  81. 2 2
      api-module/src/main/java/com/tzld/piaoquan/api/service/wecom/impl/ThirdPartyServiceImpl.java
  82. 3 5
      api-module/src/main/java/com/tzld/piaoquan/api/service/wecom/impl/WeComAutoReplyImpl.java
  83. 2 3
      api-module/src/main/java/com/tzld/piaoquan/api/service/wecom/impl/WeComServiceImpl.java
  84. 37 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/wecom/thirdparty/WeComThirdPartyAccountService.java
  85. 13 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/wecom/thirdparty/WeComThirdPartyCallBackService.java
  86. 45 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/wecom/thirdparty/WeComThirdPartyRoomService.java
  87. 20 3
      api-module/src/main/java/com/tzld/piaoquan/api/service/wecom/thirdparty/WeComThirdPartyService.java
  88. 538 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/wecom/thirdparty/impl/WeComThirdPartyAccountServiceImpl.java
  89. 84 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/wecom/thirdparty/impl/WeComThirdPartyCallBackServiceImpl.java
  90. 467 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/wecom/thirdparty/impl/WeComThirdPartyRoomServiceImpl.java
  91. 129 12
      api-module/src/main/java/com/tzld/piaoquan/api/service/wecom/thirdparty/impl/WeComThirdPartyServiceImpl.java
  92. 1 6
      api-module/src/main/resources/mapper/contentplatform/ext/ContentPlatformPlanMapperExt.xml
  93. 66 12
      api-module/src/main/resources/mapper/wecom/thirdpart/ThirdPartWeComMsgMapper.xml
  94. 294 0
      api-module/src/main/resources/mapper/wecom/thirdpart/ThirdPartWeComRoomConfigMapper.xml
  95. 278 0
      api-module/src/main/resources/mapper/wecom/thirdpart/ThirdPartWeComRoomConfigTaskContentMapper.xml
  96. 261 0
      api-module/src/main/resources/mapper/wecom/thirdpart/ThirdPartWeComRoomConfigTaskMapper.xml
  97. 326 0
      api-module/src/main/resources/mapper/wecom/thirdpart/ThirdPartWeComStaffConfigMapper.xml
  98. 278 0
      api-module/src/main/resources/mapper/wecom/thirdpart/ThirdPartWeComStaffConfigTaskContentMapper.xml
  99. 261 0
      api-module/src/main/resources/mapper/wecom/thirdpart/ThirdPartWeComStaffConfigTaskMapper.xml
  100. 38 6
      api-module/src/main/resources/mapper/wecom/thirdpart/ThirdPartWeComStaffMapper.xml

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

@@ -0,0 +1,7 @@
+package com.tzld.piaoquan.api.common;
+
+public class Constant {
+
+    public static String loginStatusKey = "login:status:uuid:{uuid}";
+
+}

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

@@ -51,6 +51,7 @@ public enum ExceptionEnum {
     // 三方平台 自动拉群群发
     THIRD_PART_STAFF_NOT_FOUND(5001, "账号不存在"),
     THIRD_PART_ROOM_NOT_FOUND(5002, "群不存在"),
+    THIRD_PART_LOGOUT_FAILED(5003, "企微账号退出失败"),
 
     // 用户上传内容管理
     PQ_LOGIN_FAIL(6001, "票圈登录失败"),

+ 33 - 0
api-module/src/main/java/com/tzld/piaoquan/api/common/enums/wecom/ConfigSyncEnum.java

@@ -0,0 +1,33 @@
+package com.tzld.piaoquan.api.common.enums.wecom;
+
+import lombok.Getter;
+
+@Getter
+public enum ConfigSyncEnum {
+    NEW(0, "仅对新建群生效"),
+    ALL(1, "所有群"),
+    SPECIFY(2, "指定群生效"),
+
+    other(999, "其他");
+
+    // 0-仅对新建群生效 1-所有群 2-指定群生效
+    private final int val;
+    private final String description;
+
+    ConfigSyncEnum(int val, String description) {
+        this.val = val;
+        this.description = description;
+    }
+
+    public static ConfigSyncEnum from(int val) {
+        for (ConfigSyncEnum statusEnum : ConfigSyncEnum.values()) {
+            if (statusEnum.getVal() == val) {
+                return statusEnum;
+            }
+        }
+
+        return other;
+    }
+
+
+}

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

@@ -0,0 +1,32 @@
+package com.tzld.piaoquan.api.common.enums.wecom;
+
+import lombok.Getter;
+
+@Getter
+public enum ConfigTaskContentTypeEnum {
+    TEXT(0, "文案"),
+    MINI_PROGRAM(1, "小程序"),
+
+    other(999, "其他");
+
+    // 0-文案 1-小程序
+    private final int val;
+    private final String description;
+
+    ConfigTaskContentTypeEnum(int val, String description) {
+        this.val = val;
+        this.description = description;
+    }
+
+    public static ConfigTaskContentTypeEnum from(int val) {
+        for (ConfigTaskContentTypeEnum typeEnum : ConfigTaskContentTypeEnum.values()) {
+            if (typeEnum.getVal() == val) {
+                return typeEnum;
+            }
+        }
+
+        return other;
+    }
+
+
+}

+ 31 - 0
api-module/src/main/java/com/tzld/piaoquan/api/common/enums/wecom/MsgSendStatusEnum.java

@@ -0,0 +1,31 @@
+package com.tzld.piaoquan.api.common.enums.wecom;
+
+import lombok.Getter;
+
+@Getter
+public enum MsgSendStatusEnum {
+    FAIL(0, "失败"),
+    NORMAL(1, "正常"),
+
+    other(999, "其他");
+
+    private final int val;
+    private final String description;
+
+    MsgSendStatusEnum(int val, String description) {
+        this.val = val;
+        this.description = description;
+    }
+
+    public static MsgSendStatusEnum from(int val) {
+        for (MsgSendStatusEnum statusEnum : MsgSendStatusEnum.values()) {
+            if (statusEnum.getVal() == val) {
+                return statusEnum;
+            }
+        }
+
+        return other;
+    }
+
+
+}

+ 34 - 0
api-module/src/main/java/com/tzld/piaoquan/api/common/enums/wecom/ThirdPartWeComStaffStatusEnum.java

@@ -0,0 +1,34 @@
+package com.tzld.piaoquan.api.common.enums.wecom;
+
+import lombok.Getter;
+
+@Getter
+public enum ThirdPartWeComStaffStatusEnum {
+    
+    NORMAL(0, "正常"),
+    OFFLINE(1, "掉线"),
+    QUIT(2, "离线"),
+
+    other(999, "其他");
+
+    // 0正常,1掉线,2离线
+    private final int val;
+    private final String description;
+
+    ThirdPartWeComStaffStatusEnum(int val, String description) {
+        this.val = val;
+        this.description = description;
+    }
+
+    public static ThirdPartWeComStaffStatusEnum from(int val) {
+        for (ThirdPartWeComStaffStatusEnum statusEnum : ThirdPartWeComStaffStatusEnum.values()) {
+            if (statusEnum.getVal() == val) {
+                return statusEnum;
+            }
+        }
+
+        return other;
+    }
+
+
+}

+ 43 - 0
api-module/src/main/java/com/tzld/piaoquan/api/common/enums/wecom/WeComThirdPartyCallBackTypeEnum.java

@@ -0,0 +1,43 @@
+package com.tzld.piaoquan.api.common.enums.wecom;
+
+import lombok.Getter;
+
+import java.util.Objects;
+
+@Getter
+public enum WeComThirdPartyCallBackTypeEnum {
+
+    // 登录回调
+    SCAN_CODE(100001, "扫码返回数据"),
+    CONFIRM_SCAN_CODE(100002, "确认扫码返回数据"),
+    CANCEL_SCAN_CODE(100003, "取消扫码返回"),
+    NEED_VERIFY_CODE(100004, "需要输入验证码消息回调"),
+    LOGIN_SUCCESS(104001, "登录成功返回数据"),
+
+    // 断开回调
+    SECOND_VERIFY_NOTIFY(100012, "二次验证消息通知"),
+    LOGIN_END(100005, "手机端结束登录"),
+    OTHER_DEVICE_LOGIN(100008, "当前账号在其他设备登录"),
+    QR_CODE_SCAN_TIMEOUT(100009, "初始化接口二维码扫码超时断开"),
+    EXCEPTION_DISCONNECT(100007, "异常断开"),
+
+    other(999, "其他");
+
+    private final Integer val;
+    private final String description;
+
+    WeComThirdPartyCallBackTypeEnum(Integer val, String description) {
+        this.val = val;
+        this.description = description;
+    }
+
+    public static WeComThirdPartyCallBackTypeEnum from(Integer val) {
+        for (WeComThirdPartyCallBackTypeEnum typeEnum : WeComThirdPartyCallBackTypeEnum.values()) {
+            if (Objects.equals(typeEnum.getVal(), val)) {
+                return typeEnum;
+            }
+        }
+
+        return other;
+    }
+}

+ 10 - 0
api-module/src/main/java/com/tzld/piaoquan/api/component/WeComThirdPartyApiClient.java

@@ -79,6 +79,16 @@ public class WeComThirdPartyApiClient {
         return postRequest("/wxwork/GetRunClientByUuid", request);
     }
 
+    /**
+     * 获取当前账号对外名片二维码
+     *
+     * @param request 请求体
+     * @return 响应结果
+     */
+    public String getExternalBusinessCard(UuidRequest request) {
+        return postRequest("/wxwork/ExternalBusinessCard", request);
+    }
+
     /**
      * 获取内部联系人列表
      *

+ 5 - 5
api-module/src/main/java/com/tzld/piaoquan/api/config/CrossOriginConfig.java

@@ -23,11 +23,11 @@ public class CrossOriginConfig implements WebMvcConfigurer {
 
     @Override
     public void addCorsMappings(CorsRegistry registry) {
-//        registry.addMapping("/**")
-//                .allowedOrigins("*")
-//                .allowedMethods("POST", "GET", "PUT", "OPTIONS", "DELETE")
-//                .maxAge(3600)
-//                .allowCredentials(false);
+        registry.addMapping("/**")
+                .allowedOrigins("*")
+                .allowedMethods("POST", "GET", "PUT", "OPTIONS", "DELETE")
+                .maxAge(3600)
+                .allowCredentials(false);
     }
 
 }

+ 11 - 4
api-module/src/main/java/com/tzld/piaoquan/api/config/JwtInterceptor.java

@@ -42,6 +42,17 @@ public class JwtInterceptor implements HandlerInterceptor {
 
     @Override
     public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
+
+        if (HttpMethod.OPTIONS.name().equals(request.getMethod())) {
+            response.setStatus(HttpServletResponse.SC_OK);
+            response.setHeader("Access-Control-Allow-Origin", request.getHeader("Origin"));
+            response.setHeader("Access-Control-Allow-Credentials", "true");
+            response.setHeader("Access-Control-Allow-Methods", "GET,POST,PUT,DELETE,OPTIONS");
+            response.setHeader("Access-Control-Allow-Headers", "Content-Type,token,Authorization");
+            response.setHeader("Access-Control-Max-Age", "3600");
+            return true;
+        }
+
         if ((StringUtils.isNotBlank(request.getRequestURI()) && request.getRequestURI().contains("auth")) ||
                 (Objects.nonNull(request.getRequestURL()) && request.getRequestURL().toString().contains("auth"))
         ) {
@@ -55,10 +66,6 @@ public class JwtInterceptor implements HandlerInterceptor {
                 return Boolean.TRUE;
             }
         }
-        if (HttpMethod.OPTIONS.name().equals(request.getMethod())) {
-            response.setStatus(HttpServletResponse.SC_OK);
-            return true;
-        }
         String uri = request.getServletPath();
         if (this.exclude(uri)) {
             //放行excludePaths包含的目录路径和excludeUris包含的URI

+ 1 - 1
api-module/src/main/java/com/tzld/piaoquan/api/controller/MessageController.java → api-module/src/main/java/com/tzld/piaoquan/api/controller/wecom/MessageController.java

@@ -1,4 +1,4 @@
-package com.tzld.piaoquan.api.controller;
+package com.tzld.piaoquan.api.controller.wecom;
 
 
 import com.tzld.piaoquan.growth.common.common.base.CommonResponse;

+ 3 - 6
api-module/src/main/java/com/tzld/piaoquan/api/controller/TencentWeComController.java → api-module/src/main/java/com/tzld/piaoquan/api/controller/wecom/TencentWeComController.java

@@ -1,20 +1,17 @@
-package com.tzld.piaoquan.api.controller;
+package com.tzld.piaoquan.api.controller.wecom;
 
 import com.alibaba.fastjson.JSONObject;
-import com.tzld.piaoquan.growth.common.model.vo.SendRequestParam;
-import com.tzld.piaoquan.api.service.WeComAutoReply;
+import com.tzld.piaoquan.api.service.wecom.WeComAutoReply;
 import com.tzld.piaoquan.growth.common.common.constant.WeComServerConstant;
 import com.tzld.piaoquan.growth.common.component.HttpPoolClient;
+import com.tzld.piaoquan.growth.common.model.vo.SendRequestParam;
 import com.tzld.piaoquan.growth.common.service.WeComUserService;
 import com.tzld.piaoquan.growth.common.utils.wecom.WXBizMsgCrypt;
 import com.tzld.piaoquan.growth.common.utils.wecom.WxUtil;
 import lombok.extern.slf4j.Slf4j;
-import lombok.val;
 import org.apache.commons.lang3.StringUtils;
-import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.ServletInputStream;
 import javax.servlet.http.HttpServletRequest;

+ 2 - 2
api-module/src/main/java/com/tzld/piaoquan/api/controller/ThirdPartyController.java → api-module/src/main/java/com/tzld/piaoquan/api/controller/wecom/ThirdPartyController.java

@@ -1,10 +1,10 @@
-package com.tzld.piaoquan.api.controller;
+package com.tzld.piaoquan.api.controller.wecom;
 
 
 import com.tzld.piaoquan.api.model.vo.*;
 import com.tzld.piaoquan.api.mq.MessageCallbackProducer;
 import com.tzld.piaoquan.api.service.GhAccessTokenService;
-import com.tzld.piaoquan.api.service.ThirdPartyService;
+import com.tzld.piaoquan.api.service.wecom.ThirdPartyService;
 import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;

+ 2 - 2
api-module/src/main/java/com/tzld/piaoquan/api/controller/WeComController.java → api-module/src/main/java/com/tzld/piaoquan/api/controller/wecom/WeComController.java

@@ -1,8 +1,8 @@
-package com.tzld.piaoquan.api.controller;
+package com.tzld.piaoquan.api.controller.wecom;
 
 import com.tzld.piaoquan.api.model.vo.WeComPushMessageParam;
 import com.tzld.piaoquan.api.model.vo.WeComPushMessageVo;
-import com.tzld.piaoquan.api.service.WeComService;
+import com.tzld.piaoquan.api.service.wecom.WeComService;
 import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;

+ 1 - 1
api-module/src/main/java/com/tzld/piaoquan/api/controller/WeComUserController.java → api-module/src/main/java/com/tzld/piaoquan/api/controller/wecom/WeComUserController.java

@@ -1,4 +1,4 @@
-package com.tzld.piaoquan.api.controller;
+package com.tzld.piaoquan.api.controller.wecom;
 
 import com.tzld.piaoquan.api.model.vo.WeComUserNameAvatarParam;
 import com.tzld.piaoquan.growth.common.common.base.CommonResponse;

+ 92 - 0
api-module/src/main/java/com/tzld/piaoquan/api/controller/wecom/thirdpart/WeComThirdPartyAccountController.java

@@ -0,0 +1,92 @@
+package com.tzld.piaoquan.api.controller.wecom.thirdpart;
+
+import com.tzld.piaoquan.api.model.param.wecom.thirdpart.*;
+import com.tzld.piaoquan.api.model.vo.IdNameVO;
+import com.tzld.piaoquan.api.model.vo.contentplatform.AccountQrCodeVO;
+import com.tzld.piaoquan.api.model.vo.wecom.thirdpart.CheckPushAccountExistVO;
+import com.tzld.piaoquan.api.model.vo.wecom.thirdpart.ThirdPartyAccountConfigVO;
+import com.tzld.piaoquan.api.model.vo.wecom.thirdpart.ThirdPartyAccountVO;
+import com.tzld.piaoquan.api.service.wecom.thirdparty.WeComThirdPartyAccountService;
+import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
+import com.tzld.piaoquan.growth.common.utils.page.Page;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@Slf4j
+@RestController
+@RequestMapping("/wecom/thirdparty/account")
+@CrossOrigin(origins = "*")
+public class WeComThirdPartyAccountController {
+
+    @Autowired
+    private WeComThirdPartyAccountService service;
+
+    @ApiOperation(value = "获取登录二维码")
+    @GetMapping("/getQrCode")
+    public CommonResponse<AccountQrCodeVO> getQrCode(@RequestParam(required = false) Long id) {
+        return CommonResponse.success(service.getQrCode(id));
+    }
+
+    @ApiOperation(value = "检查登录状态")
+    @GetMapping("/checkLogin")
+    public CommonResponse<Integer> checkLogin(@RequestParam String uuid) {
+        return CommonResponse.success(service.checkLogin(uuid));
+    }
+
+    @ApiOperation(value = "设置验证码")
+    @PostMapping("/setCheckCode")
+    public CommonResponse<Void> setCheckCode(@RequestBody CheckCodeRequest param) {
+        service.setCheckCode(param);
+        return CommonResponse.success();
+    }
+
+    @ApiOperation(value = "账号列表")
+    @PostMapping("/list")
+    public CommonResponse<Page<ThirdPartyAccountVO>> list(@RequestBody ThirdPartyAccountListParam param) {
+        return CommonResponse.success(service.list(param));
+    }
+
+    @ApiOperation(value = "获取推送人员列表")
+    @GetMapping("/getPushAccountList")
+    public CommonResponse<List<IdNameVO<Long>>> getPushAccountList(@RequestParam Long accountId, @RequestParam(required = false) String name) {
+        return CommonResponse.success(service.getPushAccountList(accountId, name));
+    }
+
+    @ApiOperation(value = "获取账号配置")
+    @PostMapping("/getAccountConfig")
+    public CommonResponse<ThirdPartyAccountConfigVO> getAccountConfig(@RequestBody ThirdPartyConfigGetParam param) {
+        return CommonResponse.success(service.getAccountConfig(param));
+    }
+
+    @ApiOperation(value = "检查推送人员是否在所有群内")
+    @PostMapping("/checkPushAccountExist")
+    public CommonResponse<CheckPushAccountExistVO> checkPushAccountExist(@RequestBody ThirdPartyAccountConfigParam param) {
+        return CommonResponse.success(service.checkPushAccountExist(param));
+    }
+
+    @ApiOperation(value = "账号配置保存")
+    @PostMapping("/saveAccountConfig")
+    public CommonResponse<Void> saveAccountConfig(@RequestBody ThirdPartyAccountConfigParam param) {
+        service.saveAccountConfig(param);
+        return CommonResponse.success();
+    }
+
+    @ApiOperation(value = "登出")
+    @PostMapping("/logout")
+    public CommonResponse<Void> logout(@RequestBody ThirdPartyAccountLogOutParam param) {
+        service.logout(param);
+        return CommonResponse.success();
+    }
+
+    @ApiOperation(value = "初始化账号配置")
+    @PostMapping("/initAccountConfig")
+    public CommonResponse<Void> initAccountConfig() {
+        service.initAccountConfig();
+        return CommonResponse.success();
+    }
+
+}

+ 26 - 0
api-module/src/main/java/com/tzld/piaoquan/api/controller/wecom/thirdpart/WeComThirdPartyCallBackController.java

@@ -0,0 +1,26 @@
+package com.tzld.piaoquan.api.controller.wecom.thirdpart;
+
+import com.tzld.piaoquan.api.model.param.wecom.thirdpart.WeComThirdPartyCallBackParam;
+import com.tzld.piaoquan.api.service.wecom.thirdparty.WeComThirdPartyCallBackService;
+import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@Slf4j
+@RestController
+@RequestMapping("/wecom/thirdparty")
+public class WeComThirdPartyCallBackController {
+
+    @Autowired
+    private WeComThirdPartyCallBackService service;
+
+    @PostMapping("/callback")
+    public CommonResponse<String> callback(@RequestBody WeComThirdPartyCallBackParam param) {
+        service.handleCallback(param);
+        return CommonResponse.success();
+    }
+}

+ 2 - 2
api-module/src/main/java/com/tzld/piaoquan/api/controller/WeComThirdPartyController.java → api-module/src/main/java/com/tzld/piaoquan/api/controller/wecom/thirdpart/WeComThirdPartyController.java

@@ -1,7 +1,7 @@
-package com.tzld.piaoquan.api.controller;
+package com.tzld.piaoquan.api.controller.wecom.thirdpart;
 
 import com.tzld.piaoquan.api.model.param.wecom.thirdpart.*;
-import com.tzld.piaoquan.api.service.WeComThirdPartyService;
+import com.tzld.piaoquan.api.service.wecom.thirdparty.WeComThirdPartyService;
 import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;

+ 52 - 0
api-module/src/main/java/com/tzld/piaoquan/api/controller/wecom/thirdpart/WeComThirdPartyRoomController.java

@@ -0,0 +1,52 @@
+package com.tzld.piaoquan.api.controller.wecom.thirdpart;
+
+import com.tzld.piaoquan.api.model.param.wecom.thirdpart.ThirdPartyRoomConfigParam;
+import com.tzld.piaoquan.api.model.param.wecom.thirdpart.ThirdPartyConfigGetParam;
+import com.tzld.piaoquan.api.model.param.wecom.thirdpart.ThirdPartyRoomListParam;
+import com.tzld.piaoquan.api.model.vo.IdNameVO;
+import com.tzld.piaoquan.api.model.vo.wecom.thirdpart.ThirdPartyRoomConfigVO;
+import com.tzld.piaoquan.api.model.vo.wecom.thirdpart.ThirdPartyRoomVO;
+import com.tzld.piaoquan.api.service.wecom.thirdparty.WeComThirdPartyRoomService;
+import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
+import com.tzld.piaoquan.growth.common.utils.page.Page;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+@Slf4j
+@RestController
+@RequestMapping("/wecom/thirdparty/room")
+@CrossOrigin(origins = "*")
+public class WeComThirdPartyRoomController {
+
+    @Autowired
+    private WeComThirdPartyRoomService service;
+
+    @ApiOperation(value = "群列表")
+    @PostMapping("/list")
+    public CommonResponse<Page<ThirdPartyRoomVO>> list(@RequestBody ThirdPartyRoomListParam param) {
+        return CommonResponse.success(service.list(param));
+    }
+
+    @ApiOperation(value = "获取推送人员列表")
+    @GetMapping("/getPushAccountList")
+    public CommonResponse<List<IdNameVO<Long>>> getPushAccountList(@RequestParam Long roomId, @RequestParam(required = false) String name) {
+        return CommonResponse.success(service.getPushAccountList(roomId, name));
+    }
+
+    @ApiOperation(value = "获取群配置")
+    @PostMapping("/getRoomConfig")
+    public CommonResponse<ThirdPartyRoomConfigVO> getRoomConfig(@RequestBody ThirdPartyConfigGetParam param) {
+        return CommonResponse.success(service.getRoomConfig(param));
+    }
+
+    @ApiOperation(value = "保存群配置")
+    @PostMapping("/saveRoomConfig")
+    public CommonResponse<Void> saveRoomConfig(@RequestBody ThirdPartyRoomConfigParam param) {
+        service.saveRoomConfig(param, null);
+        return CommonResponse.success();
+    }
+}

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

@@ -22,8 +22,8 @@ public class MybatisGeneratorMain {
 
         //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);

+ 1 - 1
api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/contentplatform/ext/ContentPlatformPlanMapperExt.java

@@ -48,7 +48,7 @@ public interface ContentPlatformPlanMapperExt {
 
     List<ContentPlatformVideo> getVideoMinScoreList(@Param("dt") String dt,
                                                     @Param("minScore") Double minScore,
-                                                    @Param("excludeVideoIds") List<Long> excludeVideoIds,
+                                                    @Param("roomId") String roomId,
                                                     @Param("offset") int offset,
                                                     @Param("pageSize") Integer pageSize,
                                                     @Param("sort") String sort);

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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -24,4 +24,6 @@ public interface ThirdPartWeComMapperExt {
     void batchInsertThirdPartWeComRoom(@Param("records") List<ThirdPartWeComRoom> partition);
 
     void batchUpdateThirdPartWeComRoom(@Param("records") List<ThirdPartWeComRoom> partition);
+
+    void updateStaffQrImageByUuid(@Param("uuid") String uuid, @Param("qrImage") String qrImage);
 }

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

@@ -0,0 +1,20 @@
+package com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ext;
+
+import com.tzld.piaoquan.api.model.param.wecom.thirdpart.ThirdPartyRoomListParam;
+import com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoom;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface ThirdPartWeComRoomMapperExt {
+
+    int getRoomCount(@Param("param") ThirdPartyRoomListParam param,
+                     @Param("pushAccountIds") List<Long> pushAccountIds);
+
+    List<ThirdPartWeComRoom> getRoomList(@Param("param") ThirdPartyRoomListParam param,
+                                         @Param("pushAccountIds") List<Long> pushAccountIds,
+                                         @Param("offset") int offset, @Param("pageSize") Integer pageSize);
+
+    List<ThirdPartWeComRoom> getNoConfigRoomList(@Param("staffId") Long id);
+
+}

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

@@ -0,0 +1,21 @@
+package com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ext;
+
+import com.tzld.piaoquan.api.model.param.wecom.thirdpart.ThirdPartyAccountListParam;
+import com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaff;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface ThirdPartWeComStaffMapperExt {
+
+    int getAccountCount(@Param("param") ThirdPartyAccountListParam param);
+
+    List<ThirdPartWeComStaff> getAccountList(@Param("param") ThirdPartyAccountListParam param,
+                                             @Param("offset") int offset, @Param("pageSize") Integer pageSize);
+
+    List<ThirdPartWeComStaff> getPushStaffList(@Param("accountId") Long accountId,
+                                               @Param("roomId") Long roomId,
+                                               @Param("name") String name);
+
+    List<Long> getStaffIdByName(@Param("name") String name);
+}

+ 18 - 3
api-module/src/main/java/com/tzld/piaoquan/api/job/wecom/thirdpart/WeComAccountJob.java

@@ -2,12 +2,14 @@ package com.tzld.piaoquan.api.job.wecom.thirdpart;
 
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.TypeReference;
+import com.tzld.piaoquan.api.common.enums.wecom.ThirdPartWeComStaffStatusEnum;
 import com.tzld.piaoquan.api.component.WeComThirdPartyApiClient;
+import com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ThirdPartWeComStaffMapper;
 import com.tzld.piaoquan.api.model.param.wecom.thirdpart.CommonResponse;
 import com.tzld.piaoquan.api.model.param.wecom.thirdpart.LoginInfo;
 import com.tzld.piaoquan.api.model.param.wecom.thirdpart.UuidRequest;
 import com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaff;
-import com.tzld.piaoquan.api.service.WeComThirdPartyService;
+import com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffExample;
 import com.tzld.piaoquan.growth.common.utils.LarkRobotUtil;
 import com.tzld.piaoquan.growth.common.utils.RedisUtils;
 import com.xxl.job.core.biz.model.ReturnT;
@@ -16,6 +18,7 @@ import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
+import java.util.Arrays;
 import java.util.List;
 import java.util.Objects;
 
@@ -24,7 +27,7 @@ import java.util.Objects;
 public class WeComAccountJob {
 
     @Autowired
-    WeComThirdPartyService weComThirdPartyService;
+    ThirdPartWeComStaffMapper thirdPartWeComStaffMapper;
     @Autowired
     WeComThirdPartyApiClient apiClient;
 
@@ -33,7 +36,7 @@ public class WeComAccountJob {
 
     @XxlJob("checkAccountOnline")
     public ReturnT<String> checkAccountOnline(String param) {
-        List<ThirdPartWeComStaff> activeStaffList = weComThirdPartyService.getActiveStaffList();
+        List<ThirdPartWeComStaff> activeStaffList = getCheckOnlineStaffList();
         for (ThirdPartWeComStaff staff : activeStaffList) {
             String uuid = staff.getThirdUuid();
             String offLineKey = "wecom:thirdpart:offline:" + uuid;
@@ -53,8 +56,20 @@ public class WeComAccountJob {
                                 "账号VID:" + staff.getThirdStaffId() + "\n" +
                                 "账号UUID:" + uuid + "\n" +
                                 "账号状态:已下线");
+                if (staff.getStatus() == ThirdPartWeComStaffStatusEnum.NORMAL.getVal()) {
+                    staff.setStatus(ThirdPartWeComStaffStatusEnum.OFFLINE.getVal());
+                    thirdPartWeComStaffMapper.updateByPrimaryKeySelective(staff);
+                }
             }
         }
         return ReturnT.SUCCESS;
     }
+
+    private List<ThirdPartWeComStaff> getCheckOnlineStaffList() {
+        List<Integer> statusList = Arrays.asList(ThirdPartWeComStaffStatusEnum.NORMAL.getVal(),
+                ThirdPartWeComStaffStatusEnum.OFFLINE.getVal());
+        ThirdPartWeComStaffExample example = new ThirdPartWeComStaffExample();
+        example.createCriteria().andStatusIn(statusList);
+        return thirdPartWeComStaffMapper.selectByExample(example);
+    }
 }

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

@@ -9,7 +9,7 @@ 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.tzld.piaoquan.api.service.wecom.thirdparty.WeComThirdPartyService;
 import com.tzld.piaoquan.growth.common.utils.DateUtil;
 import com.tzld.piaoquan.growth.common.utils.RedisUtils;
 import com.xxl.job.core.biz.model.ReturnT;

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

@@ -1,23 +1,22 @@
 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.common.enums.wecom.ConfigTaskContentTypeEnum;
+import com.tzld.piaoquan.api.common.enums.wecom.MsgSendStatusEnum;
+import com.tzld.piaoquan.api.common.enums.wecom.ThirdPartWeComStaffStatusEnum;
 import com.tzld.piaoquan.api.component.VideoApiService;
 import com.tzld.piaoquan.api.dao.mapper.contentplatform.ext.ContentPlatformPlanMapperExt;
 import com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ThirdPartWeComMsgMapper;
 import com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ThirdPartWeComRoomMapper;
 import com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ext.ThirdPartWeComVideoMapperExt;
-import com.tzld.piaoquan.api.model.param.wecom.thirdpart.CdnUploadImgLinkRequest;
-import com.tzld.piaoquan.api.model.param.wecom.thirdpart.CdnUploadImgLinkResponse;
-import com.tzld.piaoquan.api.model.param.wecom.thirdpart.SendAppMsgRequest;
+import com.tzld.piaoquan.api.model.param.wecom.thirdpart.*;
 import com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformVideo;
-import com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComMsg;
-import com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComMsgExample;
-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.model.vo.contentplatform.WxVideoV2VO;
-import com.tzld.piaoquan.api.service.WeComThirdPartyService;
+import com.tzld.piaoquan.api.service.wecom.thirdparty.WeComThirdPartyAccountService;
+import com.tzld.piaoquan.api.service.wecom.thirdparty.WeComThirdPartyRoomService;
+import com.tzld.piaoquan.api.service.wecom.thirdparty.WeComThirdPartyService;
 import com.tzld.piaoquan.api.util.CdnUtil;
 import com.tzld.piaoquan.growth.common.model.po.CgiReplyBucketData;
 import com.tzld.piaoquan.growth.common.model.po.Staff;
@@ -40,6 +39,7 @@ import java.util.concurrent.ExecutorService;
 import java.util.concurrent.LinkedBlockingQueue;
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
+import java.util.function.Function;
 import java.util.stream.Collectors;
 
 @Slf4j
@@ -49,6 +49,10 @@ public class WeComSendMsgJob {
     @Autowired
     WeComThirdPartyService weComThirdPartyService;
     @Autowired
+    WeComThirdPartyAccountService weComThirdPartyAccountService;
+    @Autowired
+    WeComThirdPartyRoomService weComThirdPartyRoomService;
+    @Autowired
     MessageAttachmentService messageAttachmentService;
     @Autowired
     VideoApiService videoApiService;
@@ -64,24 +68,10 @@ public class WeComSendMsgJob {
     @Autowired
     RedisUtils redisUtils;
 
-    @Value("${send.room.msg.video.min.score:3}")
+    @Value("${send.room.msg.video.min.score:1}")
     private Double videoMinScore;
-    @Value("${send.room.msg.duplicate.days:7}")
+    @Value("${send.room.msg.duplicate.days:30}")
     private Integer duplicateDays;
-    @Value("${send.room.msg.video.num:2}")
-    private Integer videoNum;
-    @ApolloJsonValue("${send.room.msg.test.roomList:[]}")
-    private List<String> testRoomList;
-    @ApolloJsonValue("${send.room.msg.video.source.staff.config:{}}")
-    private Map<Long, JSONObject> videoSourceStaffConfig;
-    @ApolloJsonValue("${send.room.msg.staff.put.scene.config:{}}")
-    private Map<Long, String> staffPutSceneConfig;
-    @ApolloJsonValue("${send.room.msg.staff.channel.config:{}}")
-    private Map<Long, String> staffChannelConfig;
-    @ApolloJsonValue("${send.room.msg.auto.open.staff:[]}")
-    private List<Long> autoOpenStaffList;
-    @Value("${send.room.msg.random.time:20}")
-    private Integer randomTimeRange;
 
     private final static ExecutorService pool = new ThreadPoolExecutor(5, 5, 0L, TimeUnit.SECONDS,
             new LinkedBlockingQueue<>(),
@@ -92,24 +82,77 @@ public class WeComSendMsgJob {
     public ReturnT<String> autoSendAppMsg(String param) {
         List<ThirdPartWeComStaff> activeStaffList = weComThirdPartyService.getActiveStaffList();
         String time = DateUtil.getCurrentDateStr("HH:mm");
+        List<Long> staffIdList = activeStaffList.stream().map(ThirdPartWeComStaff::getId).collect(Collectors.toList());
+        List<ThirdPartWeComStaffConfig> staffConfigList = weComThirdPartyAccountService.getStaffConfigListByStaffIds(staffIdList);
+        Map<Long, ThirdPartWeComStaffConfig> staffConfigMap = staffConfigList.stream().collect(Collectors.toMap(ThirdPartWeComStaffConfig::getStaffId, a -> a));
         for (ThirdPartWeComStaff staff : activeStaffList) {
+            ThirdPartWeComStaffConfig staffConfig = staffConfigMap.get(staff.getId());
+            if (Objects.isNull(staffConfig) || staffConfig.getSwitchFlag() != 1) {
+                continue;
+            }
             List<ThirdPartWeComRoom> roomList = weComThirdPartyService.getStaffRoomList(staff.getId());
+            List<Long> roomIds = roomList.stream().map(ThirdPartWeComRoom::getId).collect(Collectors.toList());
+            List<ThirdPartWeComRoomConfig> roomConfigList = weComThirdPartyRoomService.getRoomConfigListByRoomIds(roomIds);
+            Map<Long, ThirdPartWeComRoomConfig> roomConfigMap = roomConfigList.stream().collect(Collectors.toMap(ThirdPartWeComRoomConfig::getRoomId, a -> a));
+            List<String> configIds = roomConfigList.stream().map(ThirdPartWeComRoomConfig::getId).map(String::valueOf).collect(Collectors.toList());
+            List<ThirdPartWeComRoomConfigTask> roomConfigTaskList = weComThirdPartyRoomService.getRoomConfigTasks(configIds);
+            Map<String, List<ThirdPartWeComRoomConfigTask>> roomConfigTaskMap = roomConfigTaskList.stream()
+                    .filter(o -> o.getSwitchFlag() == 1).collect(Collectors.groupingBy(ThirdPartWeComRoomConfigTask::getConfigId));
             for (ThirdPartWeComRoom room : roomList) {
                 if (room.getSendStatus() != 1) {
                     continue;
                 }
                 pool.execute(() -> {
-                    List<String> timeList = getRoomSendTime(room);
-                    if (timeList.contains(time)) {
-                        // 选取视频
-                        List<CgiReplyBucketData> cgiReplyBucketDataList = getCgiReplyBucketData(room.getThirdRoomId(), staff);
-                        for (CgiReplyBucketData cgiReplyBucketData : cgiReplyBucketDataList) {
-                            // build发送体
-                            SendAppMsgRequest request = buildSendAppMsgRequest(cgiReplyBucketData, staff, room);
-                            // 发送消息
-                            weComThirdPartyService.sendAppMsg(request);
-                            // 存储消息
-                            saveWeComMsg(staff.getId(), cgiReplyBucketData.getMiniVideoId(), request);
+                    ThirdPartWeComRoomConfig roomConfig = roomConfigMap.get(room.getId());
+                    if (roomConfig == null) {
+                        return;
+                    }
+                    List<ThirdPartWeComRoomConfigTask> taskList = roomConfigTaskMap.getOrDefault(roomConfig.getId(), new ArrayList<>());
+                    if (taskList.isEmpty()) {
+                        return;
+                    }
+                    List<String> configTaskIds = taskList.stream().map(ThirdPartWeComRoomConfigTask::getId).collect(Collectors.toList());
+                    List<ThirdPartWeComRoomConfigTaskContent> taskContentList = weComThirdPartyRoomService.getRoomConfigTaskContents(configTaskIds);
+                    Map<String, List<ThirdPartWeComRoomConfigTaskContent>> taskContentMap = taskContentList.stream()
+                            .collect(Collectors.groupingBy(ThirdPartWeComRoomConfigTaskContent::getTaskId));
+                    ThirdPartWeComStaff pushStaff = getSendStaff(roomConfig);
+                    if (Objects.isNull(pushStaff)) {
+                        LarkRobotUtil.sendWeComThirdPartMessage(
+                                "【账号发送群消息,推送账号获取失败通知】\n" +
+                                        "账号名称:" + staff.getName() + "\n" +
+                                        "账号VID:" + staff.getThirdStaffId() + "\n" +
+                                        "群名称:" + room.getName());
+                        return;
+                    }
+                    for (ThirdPartWeComRoomConfigTask configTask : taskList) {
+                        List<String> timeList = getRoomSendTime(room, roomConfig, configTask);
+                        if (timeList.contains(time)) {
+                            // 选取视频
+                            List<ThirdPartWeComRoomConfigTaskContent> contentList = taskContentMap.get(configTask.getId());
+                            if (Objects.isNull(contentList) || contentList.isEmpty()) {
+                                continue;
+                            }
+                            contentList = contentList.stream().sorted(Comparator.comparing(ThirdPartWeComRoomConfigTaskContent::getSeq)).collect(Collectors.toList());
+                            for (ThirdPartWeComRoomConfigTaskContent configTaskContent : contentList) {
+                                if (ConfigTaskContentTypeEnum.TEXT.getVal() == configTaskContent.getType()) {
+                                    // build发送体
+                                    SendTextMsgRequest request = buildSendTextMsgRequest(configTaskContent.getContent(), pushStaff, room);
+                                    // 发送消息
+                                    CommonResponse<SendTextMsgResponse> response = weComThirdPartyService.sendTextMsg(pushStaff, room, request);
+                                    // 存储消息
+                                    saveTextWeComMsg(pushStaff.getId(), configTaskContent.getContent(), request, response);
+                                } else if (ConfigTaskContentTypeEnum.MINI_PROGRAM.getVal() == configTaskContent.getType()) {
+                                    List<CgiReplyBucketData> cgiReplyBucketDataList = getCgiReplyBucketData(room.getThirdRoomId(), staff, roomConfig, configTaskContent);
+                                    for (CgiReplyBucketData cgiReplyBucketData : cgiReplyBucketDataList) {
+                                        // build发送体
+                                        SendAppMsgRequest request = buildSendAppMsgRequest(cgiReplyBucketData, pushStaff, room);
+                                        // 发送消息
+                                        CommonResponse<SendAppMsgResponse> response = weComThirdPartyService.sendAppMsg(pushStaff, room, request);
+                                        // 存储消息
+                                        saveAppWeComMsg(pushStaff.getId(), cgiReplyBucketData.getMiniVideoId(), request, response);
+                                    }
+                                }
+                            }
                         }
                     }
                 });
@@ -118,14 +161,47 @@ public class WeComSendMsgJob {
         return ReturnT.SUCCESS;
     }
 
-    private List<String> getRoomSendTime(ThirdPartWeComRoom room) {
-        String timeStr = redisUtils.get("wecom:room:send:time:" + room.getThirdRoomId());
+    private ThirdPartWeComStaff getSendStaff(ThirdPartWeComRoomConfig roomConfig) {
+        List<ThirdPartWeComStaff> pushStaffList = weComThirdPartyRoomService.getRoomConfigPushList(Collections.singletonList(roomConfig));
+        Map<Long, ThirdPartWeComStaff> pushStaffMap = pushStaffList.stream()
+                .collect(Collectors.toMap(ThirdPartWeComStaff::getThirdStaffId, Function.identity()));
+        ThirdPartWeComStaff pushStaff = pushStaffMap.get(roomConfig.getPrimaryThirdStaffId());
+        if (Objects.isNull(pushStaff) || pushStaff.getStatus() != ThirdPartWeComStaffStatusEnum.NORMAL.getVal()) {
+            if (Objects.nonNull(roomConfig.getSecondThirdStaffId())) {
+                pushStaff = pushStaffMap.get(roomConfig.getSecondThirdStaffId());
+                if (Objects.isNull(pushStaff) || pushStaff.getStatus() != ThirdPartWeComStaffStatusEnum.NORMAL.getVal()) {
+                    pushStaff = null;
+                }
+            } else {
+                pushStaff = null;
+            }
+        }
+        return pushStaff;
+    }
+
+    private List<String> getRoomSendTime(ThirdPartWeComRoom room,
+                                         ThirdPartWeComRoomConfig roomConfig,
+                                         ThirdPartWeComRoomConfigTask configTask) {
+        String key = "wecom:room:send:time:" + room.getThirdRoomId() + ":" + roomConfig.getId() + ":" + configTask.getId();
+        String timeStr = redisUtils.get(key);
         if (StringUtils.isBlank(timeStr)) {
             return JSONObject.parseArray(room.getSendTime()).toJavaList(String.class);
         }
         return JSONObject.parseArray(timeStr).toJavaList(String.class);
     }
 
+    private SendTextMsgRequest buildSendTextMsgRequest(String content,
+                                                       ThirdPartWeComStaff staff,
+                                                       ThirdPartWeComRoom room) {
+        String thirdRoomId = room.getThirdRoomId();
+        SendTextMsgRequest request = new SendTextMsgRequest();
+        request.setUuid(staff.getThirdUuid());
+        request.setSend_userid(Long.valueOf(thirdRoomId));
+        request.setIsRoom(true);
+        request.setContent(content);
+        return request;
+    }
+
     private SendAppMsgRequest buildSendAppMsgRequest(CgiReplyBucketData cgiReplyBucketData,
                                                      ThirdPartWeComStaff staff,
                                                      ThirdPartWeComRoom room) {
@@ -140,11 +216,8 @@ public class WeComSendMsgJob {
         request.setTitle(cgiReplyBucketData.getTitle());
         request.setWeappIconUrl("http://rescdn.yishihui.com/temp/1755515422185_%E7%A5%A8%E5%9C%88Vlog_logo.jpg");
         // 填充视频信息
-        String coverUrl = cgiReplyBucketData.getCoverUrl();
-        // 实验 封面添加播放按钮水印
-        if (!testRoomList.contains(thirdRoomId)) {
-            coverUrl = addPlayWatermark(cgiReplyBucketData.getCoverUrl());
-        }
+        // 封面添加播放按钮水印
+        String coverUrl = addPlayWatermark(cgiReplyBucketData.getCoverUrl());
         request.setDesc(cgiReplyBucketData.getTitle());
         request.setPagepath(cgiReplyBucketData.getMiniPagePath());
         CdnUploadImgLinkRequest cdnUploadImgLinkRequest = new CdnUploadImgLinkRequest();
@@ -169,56 +242,53 @@ public class WeComSendMsgJob {
         return coverUrl + waterMark;
     }
 
-    private List<CgiReplyBucketData> getCgiReplyBucketData(String roomId, ThirdPartWeComStaff thirdPartWeComStaff) {
+    private List<CgiReplyBucketData> getCgiReplyBucketData(String roomId,
+                                                           ThirdPartWeComStaff thirdPartWeComStaff,
+                                                           ThirdPartWeComRoomConfig roomConfig,
+                                                           ThirdPartWeComRoomConfigTaskContent configTaskContent) {
         // 排除最近发送过的视频
         List<Long> sentVideoIds = getSentVideoIds(Long.valueOf(roomId));
-        List<ContentPlatformVideo> videoList = getVideoByStrategy(thirdPartWeComStaff.getThirdStaffId(), roomId, videoMinScore,
-                sentVideoIds, 1, 100);
+        List<ContentPlatformVideo> videoList = getVideoByStrategy(roomId, videoMinScore, sentVideoIds,
+                configTaskContent, 1, 100);
         if (CollectionUtils.isEmpty(videoList)) {
             LarkRobotUtil.sendWeComThirdPartMessage(
                     "【账号发送群消息,视频数量不足通知】\n" +
                             "账号名称:" + thirdPartWeComStaff.getName() + "\n" +
                             "账号VID:" + thirdPartWeComStaff.getThirdStaffId() + "\n" +
                             "群ID:" + roomId + "\n" +
-                            "账号配置:" + videoSourceStaffConfig.get(thirdPartWeComStaff.getId()));
+                            "账号配置:" + JSONObject.toJSONString(configTaskContent));
             return Collections.emptyList();
         }
         List<CgiReplyBucketData> result = new ArrayList<>();
-        for (int i = 0; i < videoNum; i++) {
-            ContentPlatformVideo video = videoList.get(i);
-            Staff staff = new Staff();
-            staff.setCarrierId(String.valueOf(thirdPartWeComStaff.getThirdStaffId()));
-            staff.setRemark(thirdPartWeComStaff.getName());
-            String putScene = staffPutSceneConfig.getOrDefault(thirdPartWeComStaff.getThirdStaffId(), "touliu");
-            String pageChannel = staffChannelConfig.getOrDefault(thirdPartWeComStaff.getThirdStaffId(), "tencentqw");
-            String page = messageAttachmentService.getPageNoCache(putScene, pageChannel, staff, video.getVideoId(), "企微", "社群");
+        ContentPlatformVideo video = videoList.get(0);
+        Staff staff = new Staff();
+        staff.setCarrierId(String.valueOf(thirdPartWeComStaff.getThirdStaffId()));
+        staff.setRemark(thirdPartWeComStaff.getName());
+        String putScene = StringUtils.isNotBlank(roomConfig.getPutScene()) ? roomConfig.getPutScene() : "touliu";
+        String pageChannel = StringUtils.isNotBlank(roomConfig.getChannel()) ? roomConfig.getChannel() : "tencentqw";
+        String page = messageAttachmentService.getPageNoCache(putScene, pageChannel, staff, video.getVideoId(), "企微", "社群");
 
-            CgiReplyBucketData cgiReplyBucketData = new CgiReplyBucketData();
-            cgiReplyBucketData.setMiniVideoId(video.getVideoId());
-            cgiReplyBucketData.setTitle(video.getTitle());
-            cgiReplyBucketData.setCoverUrl(video.getCover());
-            cgiReplyBucketData.setMiniPagePath(page);
-            result.add(cgiReplyBucketData);
-        }
+        CgiReplyBucketData cgiReplyBucketData = new CgiReplyBucketData();
+        cgiReplyBucketData.setMiniVideoId(video.getVideoId());
+        cgiReplyBucketData.setTitle(video.getTitle());
+        cgiReplyBucketData.setCoverUrl(video.getCover());
+        cgiReplyBucketData.setMiniPagePath(page);
+        result.add(cgiReplyBucketData);
         return result;
     }
 
-    private List<ContentPlatformVideo> getVideoByStrategy(Long staffId,
-                                                          String roomId,
+    private List<ContentPlatformVideo> getVideoByStrategy(String roomId,
                                                           Double videoMinScore,
                                                           List<Long> sentVideoIds,
+                                                          ThirdPartWeComRoomConfigTaskContent configTaskContent,
                                                           int pageNum,
                                                           int pageSize) {
         List<ContentPlatformVideo> result = new ArrayList<>();
-        JSONObject staffConfig = videoSourceStaffConfig.get(staffId);
-        if (staffConfig == null) {
-            staffConfig = new JSONObject();
-        }
         List<ContentPlatformVideo> videoList;
-        String source = (String) staffConfig.getOrDefault("source", "");
-        switch (source) {
-            case "user":
-                Long uid = staffConfig.getLong("uid");
+        // 0-热榜 1-标签 2-账号
+        switch (configTaskContent.getSource()) {
+            case 2:
+                Long uid = Long.valueOf(configTaskContent.getSourceContent());
                 List<WxVideoV2VO> list = videoApiService.getUserVideoList(uid, sentVideoIds, pageNum, pageSize);
                 if (CollectionUtils.isEmpty(list)) {
                     break;
@@ -226,8 +296,8 @@ public class WeComSendMsgJob {
                 videoList = convertWxVideoV2VOToVideo(list);
                 result.addAll(videoList);
                 break;
-            case "tag":
-                String tagName = staffConfig.getString("tagName");
+            case 1:
+                String tagName = configTaskContent.getSourceContent();
                 list = videoApiService.getTagVideoList(tagName, roomId, sentVideoIds, pageNum, pageSize);
                 if (CollectionUtils.isEmpty(list)) {
                     break;
@@ -258,17 +328,19 @@ public class WeComSendMsgJob {
     private List<Long> getSentVideoIds(Long roomId) {
         ThirdPartWeComMsgExample msgExample = new ThirdPartWeComMsgExample();
         msgExample.createCriteria().andSendUseridEqualTo(roomId)
-                .andCreateTimeGreaterThan(DateUtil.getDaysAgoDate(duplicateDays));
+                .andCreateTimeGreaterThan(DateUtil.getDaysAgoDate(duplicateDays))
+                .andVideoIdIsNotNull();
         List<ThirdPartWeComMsg> msgList = msgMapper.selectByExample(msgExample);
         return msgList.stream().map(ThirdPartWeComMsg::getVideoId).collect(Collectors.toList());
     }
 
-    private void saveWeComMsg(Long staffId, Long videoId, SendAppMsgRequest request) {
+    private void saveAppWeComMsg(Long staffId, Long videoId, SendAppMsgRequest request, CommonResponse<SendAppMsgResponse> response) {
         ThirdPartWeComMsg msg = new ThirdPartWeComMsg();
         msg.setStaffId(staffId);
         msg.setVideoId(videoId);
         msg.setUuid(request.getUuid());
         msg.setSendUserid(request.getSend_userid());
+        msg.setSendType(ConfigTaskContentTypeEnum.MINI_PROGRAM.getVal());
         msg.setIsroom(request.getIsRoom());
         msg.setAppid(request.getAppid());
         msg.setUsername(request.getUsername());
@@ -282,14 +354,39 @@ public class WeComSendMsgJob {
         msg.setMd5(request.getMd5());
         msg.setAeskey(request.getAeskey());
         msg.setFilesize(request.getFileSize());
+        if (response.getErrcode() == 0) {
+            msg.setStatus(MsgSendStatusEnum.NORMAL.getVal());
+        } else {
+            msg.setStatus(MsgSendStatusEnum.FAIL.getVal());
+        }
+        msgMapper.insertSelective(msg);
+    }
+
+    private void saveTextWeComMsg(Long staffId, String content, SendTextMsgRequest request, CommonResponse<SendTextMsgResponse> response) {
+        ThirdPartWeComMsg msg = new ThirdPartWeComMsg();
+        msg.setStaffId(staffId);
+        msg.setUuid(request.getUuid());
+        msg.setSendUserid(request.getSend_userid());
+        msg.setSendType(ConfigTaskContentTypeEnum.TEXT.getVal());
+        msg.setContent(content);
+        msg.setIsroom(request.getIsRoom());
+        if (response.getErrcode() == 0) {
+            msg.setStatus(MsgSendStatusEnum.NORMAL.getVal());
+        } else {
+            msg.setStatus(MsgSendStatusEnum.FAIL.getVal());
+        }
         msgMapper.insertSelective(msg);
     }
 
     @XxlJob("autoOpenSendStatusJob")
     public ReturnT<String> autoOpenSendStatusJob(String param) {
         List<ThirdPartWeComStaff> activeStaffList = weComThirdPartyService.getActiveStaffList();
+        List<Long> staffIdList = activeStaffList.stream().map(ThirdPartWeComStaff::getId).collect(Collectors.toList());
+        List<ThirdPartWeComStaffConfig> staffConfigList = weComThirdPartyAccountService.getStaffConfigListByStaffIds(staffIdList);
+        Map<Long, ThirdPartWeComStaffConfig> staffConfigMap = staffConfigList.stream().collect(Collectors.toMap(ThirdPartWeComStaffConfig::getStaffId, a -> a));
         for (ThirdPartWeComStaff staff : activeStaffList) {
-            if (!autoOpenStaffList.contains(staff.getThirdStaffId())) {
+            ThirdPartWeComStaffConfig staffConfig = staffConfigMap.get(staff.getId());
+            if (Objects.isNull(staffConfig) || staffConfig.getSwitchFlag() != 1 || Objects.isNull(staffConfig.getOpenRoomSendSwitchNum())) {
                 continue;
             }
             List<ThirdPartWeComRoom> roomList = weComThirdPartyService.getStaffRoomList(staff.getId());
@@ -297,7 +394,7 @@ public class WeComSendMsgJob {
                 if (room.getSendStatus() == 1) {
                     continue;
                 }
-                if (room.getMemberCount() > 20) {
+                if (room.getMemberCount() > staffConfig.getOpenRoomSendSwitchNum()) {
                     room.setSendStatus(1);
                     roomMapper.updateByPrimaryKeySelective(room);
                 }
@@ -312,47 +409,67 @@ public class WeComSendMsgJob {
         String now = DateUtil.getCurrentDateStr("HH:mm");
         for (ThirdPartWeComStaff staff : activeStaffList) {
             List<ThirdPartWeComRoom> roomList = weComThirdPartyService.getStaffRoomList(staff.getId());
+            List<ThirdPartWeComRoomConfig> roomConfigList = weComThirdPartyRoomService.getRoomConfigListByRoomIds(roomList.stream().map(ThirdPartWeComRoom::getId).collect(Collectors.toList()));
+            Map<Long, ThirdPartWeComRoomConfig> roomConfigMap = roomConfigList.stream().collect(Collectors.toMap(ThirdPartWeComRoomConfig::getRoomId, Function.identity()));
+            List<String> configIds = roomConfigList.stream().map(ThirdPartWeComRoomConfig::getId).map(String::valueOf).collect(Collectors.toList());
+            List<ThirdPartWeComRoomConfigTask> roomConfigTaskList = weComThirdPartyRoomService.getRoomConfigTasks(configIds);
+            Map<String, List<ThirdPartWeComRoomConfigTask>> roomConfigTaskMap = roomConfigTaskList.stream().collect(Collectors.groupingBy(ThirdPartWeComRoomConfigTask::getConfigId));
             for (ThirdPartWeComRoom room : roomList) {
-                if (room.getSendStatus() != 1) {
+                ThirdPartWeComRoomConfig roomConfig = roomConfigMap.get(room.getId());
+                if (roomConfig == null) {
                     continue;
                 }
-                String key = "wecom:room:send:time:" + room.getThirdRoomId();
-                if (redisUtils.containsKey(key)) {
+                List<ThirdPartWeComRoomConfigTask> taskList = roomConfigTaskMap.getOrDefault(roomConfig.getId(), new ArrayList<>());
+                if (taskList.isEmpty()) {
                     continue;
                 }
-                List<String> timeList = JSONObject.parseArray(room.getSendTime()).toJavaList(String.class);
-                // 判断timeList中在now之后的时间,随机增加或减少20以内的分钟数
-                List<String> newTimeList = new ArrayList<>();
-                for (String time : timeList) {
-                    // time与now比较,判断是否在now之后
-                    int hour = Integer.parseInt(time.substring(0, 2));
-                    int minute = Integer.parseInt(time.substring(3, 5));
-                    int nowHour = Integer.parseInt(now.substring(0, 2));
-                    int nowMinute = Integer.parseInt(now.substring(3, 5));
-                    if (hour < nowHour || (hour == nowHour && minute <= nowMinute)) {
-                        newTimeList.add(time);
-                        continue;
-                    }
-                    // 增加或减少20以内的分钟数 -20~20
-                    int randomMinute = new Random().nextInt(randomTimeRange * 2) - randomTimeRange;
-                    minute += randomMinute;
-                    if (minute < 0) {
-                        hour--;
-                        minute += 60;
-                    } else if (minute >= 60) {
-                        hour++;
-                        minute -= 60;
-                    }
-                    // 确保时间在now之后
-                    if (hour < nowHour || (hour == nowHour && minute <= nowMinute)) {
-                        newTimeList.add(time);
-                        continue;
-                    }
-                    newTimeList.add(String.format("%02d:%02d", hour, minute));
-                }
-                redisUtils.set(key, JSONObject.toJSONString(newTimeList), 18 * 60 * 60);
+                randomRoomSendTime(room, roomConfig, taskList, now);
             }
         }
         return ReturnT.SUCCESS;
     }
+
+    public void randomRoomSendTime(ThirdPartWeComRoom room,
+                                   ThirdPartWeComRoomConfig roomConfig,
+                                   List<ThirdPartWeComRoomConfigTask> taskList,
+                                   String now) {
+        for (ThirdPartWeComRoomConfigTask configTask : taskList) {
+            String key = "wecom:room:send:time:" + room.getThirdRoomId() + ":" + roomConfig.getId() + ":" + configTask.getId();
+            if (redisUtils.containsKey(key)) {
+                continue;
+            }
+            List<String> timeList = JSONObject.parseArray(room.getSendTime()).toJavaList(String.class);
+            // 判断timeList中在now之后的时间,随机增加或减少20以内的分钟数
+            List<String> newTimeList = new ArrayList<>();
+            for (String time : timeList) {
+                // time与now比较,判断是否在now之后
+                int hour = Integer.parseInt(time.substring(0, 2));
+                int minute = Integer.parseInt(time.substring(3, 5));
+                int nowHour = Integer.parseInt(now.substring(0, 2));
+                int nowMinute = Integer.parseInt(now.substring(3, 5));
+                if (hour < nowHour || (hour == nowHour && minute <= nowMinute)) {
+                    newTimeList.add(time);
+                    continue;
+                }
+                // 增加或减少20以内的分钟数 -20~20
+                int randomTimeRange = Objects.isNull(configTask.getRandomMin()) ? 0 : configTask.getRandomMin();
+                int randomMinute = randomTimeRange == 0 ? 0 : new Random().nextInt(randomTimeRange * 2) - randomTimeRange;
+                minute += randomMinute;
+                if (minute < 0) {
+                    hour--;
+                    minute += 60;
+                } else if (minute >= 60) {
+                    hour++;
+                    minute -= 60;
+                }
+                // 确保时间在now之后
+                if (hour < nowHour || (hour == nowHour && minute <= nowMinute)) {
+                    newTimeList.add(time);
+                    continue;
+                }
+                newTimeList.add(String.format("%02d:%02d", hour, minute));
+            }
+            redisUtils.set(key, JSONObject.toJSONString(newTimeList), 18 * 60 * 60);
+        }
+    }
 }

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

@@ -10,9 +10,13 @@ import com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ThirdPartWeComRoomUserMa
 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.dao.mapper.wecom.thirdpart.ext.ThirdPartWeComRoomMapperExt;
 import com.tzld.piaoquan.api.model.param.wecom.thirdpart.*;
 import com.tzld.piaoquan.api.model.po.wecom.thirdpart.*;
-import com.tzld.piaoquan.api.service.WeComThirdPartyService;
+import com.tzld.piaoquan.api.model.vo.wecom.thirdpart.ThirdPartyAccountConfigVO;
+import com.tzld.piaoquan.api.service.wecom.thirdparty.WeComThirdPartyAccountService;
+import com.tzld.piaoquan.api.service.wecom.thirdparty.WeComThirdPartyRoomService;
+import com.tzld.piaoquan.api.service.wecom.thirdparty.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;
@@ -33,6 +37,10 @@ public class WeComUserDetailJob {
     @Autowired
     WeComThirdPartyService thirdPartyService;
     @Autowired
+    WeComThirdPartyAccountService thirdPartyAccountService;
+    @Autowired
+    WeComThirdPartyRoomService thirdPartyRoomService;
+    @Autowired
     WeComThirdPartyApiClient apiClient;
     @Autowired
     ThirdPartWeComStaffMapper staffMapper;
@@ -44,6 +52,8 @@ public class WeComUserDetailJob {
     ThirdPartWeComRoomUserMapper roomUserMapper;
     @Autowired
     ThirdPartWeComMapperExt thirdPartWeComMapperExt;
+    @Autowired
+    ThirdPartWeComRoomMapperExt thirdPartWeComRoomMapperExt;
 
     @Autowired
     private RedisUtils redisUtils;
@@ -80,6 +90,9 @@ public class WeComUserDetailJob {
                             });
                     if (commonResponse.getErrcode() == 0) {
                         LoginInfo loginInfo = commonResponse.getData();
+                        staff.setName(loginInfo.getUser_info().getObject().getNickname());
+                        staff.setRealName(loginInfo.getUser_info().getObject().getRealname());
+                        staff.setMobile(loginInfo.getUser_info().getObject().getMobile());
                         staff.setAvatar(loginInfo.getUser_info().getObject().getAvatar());
                         staff.setName(loginInfo.getUser_info().getObject().getNickname());
                         staff.setUpdateTime(new Date());
@@ -275,6 +288,7 @@ public class WeComUserDetailJob {
             for (List<ThirdPartWeComRoom> partition : partitionList) {
                 thirdPartWeComMapperExt.batchInsertThirdPartWeComRoom(partition);
             }
+            new Thread(() -> batchSaveRoomConfig(staff)).start();
         }
         if (CollectionUtils.isNotEmpty(updateList)) {
             List<List<ThirdPartWeComRoom>> partitionList = Lists.partition(updateList, 200);
@@ -296,6 +310,19 @@ public class WeComUserDetailJob {
         }
     }
 
+    private void batchSaveRoomConfig(ThirdPartWeComStaff staff) {
+        ThirdPartyAccountConfigVO accountConfig = thirdPartyAccountService.getAccountConfig(new ThirdPartyConfigGetParam(staff.getId()));
+        if (Objects.isNull(accountConfig)) {
+            return;
+        }
+        List<ThirdPartWeComRoom> noConfigRoomList = thirdPartWeComRoomMapperExt.getNoConfigRoomList(staff.getId());
+        if (CollectionUtils.isNotEmpty(noConfigRoomList)) {
+            for (ThirdPartWeComRoom room : noConfigRoomList) {
+                thirdPartyRoomService.saveRoomConfig(room, accountConfig.getId(), accountConfig);
+            }
+        }
+    }
+
     public void syncRoomUserList(String uuid, String thirdRoomId) {
         GetRoomUserListRequest request = new GetRoomUserListRequest(uuid, Long.valueOf(thirdRoomId));
         List<GetRoomUserListResponse.Member> userList = thirdPartyService.getRoomUserList(request);

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

@@ -0,0 +1,8 @@
+package com.tzld.piaoquan.api.model.param.wecom.thirdpart;
+
+import lombok.Data;
+
+@Data
+public class ExternalBusinessCardResponse {
+    private String qr_image;
+}

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

@@ -0,0 +1,10 @@
+package com.tzld.piaoquan.api.model.param.wecom.thirdpart;
+
+import lombok.Data;
+
+@Data
+public class LoginOutResponse {
+    private Integer errcode;
+    private String errmsg;
+    private Object data;
+}

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

@@ -0,0 +1,21 @@
+package com.tzld.piaoquan.api.model.param.wecom.thirdpart;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class SendTextMsgResponse {
+    private Long receiver;
+    private Long sender;
+    private List<Long> atList;
+    private String senderName;
+    private String app_info;
+    private Integer isRoom;
+    private Long sendtime;
+    private Long msgId;
+    private Long serverId;
+    private Integer msgtype;
+    private String content;
+
+}

+ 4 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/param/wecom/thirdpart/SetCallbackUrlRequest.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 SetCallbackUrlRequest {
     private String uuid;
     private String url;

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

@@ -0,0 +1,37 @@
+package com.tzld.piaoquan.api.model.param.wecom.thirdpart;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class ThirdPartyAccountConfigParam {
+
+    @ApiModelProperty(value = "账号id")
+    private Long accountId;
+
+    @ApiModelProperty(value = "投放场景")
+    private String putScene;
+    @ApiModelProperty(value = "渠道")
+    private String channel;
+    @ApiModelProperty(value = "是否开启(0否,1是)")
+    private Integer switchFlag;
+    @ApiModelProperty(value = "推送触发人数")
+    private Integer openRoomSendSwitchNum;
+    @ApiModelProperty(value = "主推送人员")
+    private Long primaryThirdStaffId;
+    @ApiModelProperty(value = "主推送人员名称")
+    private String primaryThirdStaffName;
+    @ApiModelProperty(value = "次推送人员")
+    private Long secondThirdStaffId;
+    @ApiModelProperty(value = "次推送人员名称")
+    private String secondThirdStaffName;
+    @ApiModelProperty(value = "任务列表")
+    private List<ThirdPartyAccountConfigTaskParam> taskList;
+    @ApiModelProperty(value = "配置同步 0-仅对新建群生效 1-所有群 2-指定群生效")
+    private Integer configSync;
+    @ApiModelProperty(value = "指定群生效列表")
+    private List<Long> configSyncRoomIdList;
+
+}

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

@@ -0,0 +1,19 @@
+package com.tzld.piaoquan.api.model.param.wecom.thirdpart;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class ThirdPartyAccountConfigTaskContentParam {
+
+    @ApiModelProperty(value = "类型 0-文案 1-小程序")
+    private Integer type;
+    @ApiModelProperty(value = "文案内容")
+    private String content;
+    @ApiModelProperty(value = "小程序来源 0-热榜 1-标签 2-账号")
+    private Integer source;
+    @ApiModelProperty(value = "小程序来源内容 (标签/账号id)")
+    private String sourceContent;
+    @ApiModelProperty(value = "顺序")
+    private Integer seq;
+}

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

@@ -0,0 +1,21 @@
+package com.tzld.piaoquan.api.model.param.wecom.thirdpart;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class ThirdPartyAccountConfigTaskParam {
+
+    @ApiModelProperty(value = "是否开启(0否,1是)")
+    private Integer switchFlag;
+    @ApiModelProperty(value = "发送时间")
+    private List<String> sendTime;
+    @ApiModelProperty(value = "随机浮动分钟")
+    private Integer randomMin;
+    @ApiModelProperty(value = "顺序")
+    private Integer seq;
+    @ApiModelProperty(value = "发送内容列表")
+    private List<ThirdPartyAccountConfigTaskContentParam> contentList;
+}

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

@@ -0,0 +1,16 @@
+package com.tzld.piaoquan.api.model.param.wecom.thirdpart;
+
+import com.tzld.piaoquan.api.model.param.PageParam;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class ThirdPartyAccountListParam extends PageParam {
+
+    @ApiModelProperty(value = "企微主体名称")
+    private String corpName;
+    @ApiModelProperty(value = "账号名称")
+    private String accountName;
+    @ApiModelProperty(value = "手机号")
+    private String mobile;
+}

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

@@ -0,0 +1,10 @@
+package com.tzld.piaoquan.api.model.param.wecom.thirdpart;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class ThirdPartyAccountLogOutParam {
+    @ApiModelProperty(value = "账号id")
+    private Long id;
+}

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

@@ -0,0 +1,14 @@
+package com.tzld.piaoquan.api.model.param.wecom.thirdpart;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class ThirdPartyConfigGetParam {
+    @ApiModelProperty(value = "id")
+    private Long id;
+}

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

@@ -0,0 +1,31 @@
+package com.tzld.piaoquan.api.model.param.wecom.thirdpart;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class ThirdPartyRoomConfigParam {
+
+    @ApiModelProperty(value = "群id")
+    private Long roomId;
+
+    @ApiModelProperty(value = "投放场景")
+    private String putScene;
+    @ApiModelProperty(value = "渠道")
+    private String channel;
+    @ApiModelProperty(value = "推送触发人数")
+    private Integer openRoomSendSwitchNum;
+    @ApiModelProperty(value = "主推送人员")
+    private Long primaryThirdStaffId;
+    @ApiModelProperty(value = "主推送人员名称")
+    private String primaryThirdStaffName;
+    @ApiModelProperty(value = "次推送人员")
+    private Long secondThirdStaffId;
+    @ApiModelProperty(value = "次推送人员名称")
+    private String secondThirdStaffName;
+    @ApiModelProperty(value = "任务列表")
+    private List<ThirdPartyRoomConfigTaskParam> taskList;
+
+}

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

@@ -0,0 +1,19 @@
+package com.tzld.piaoquan.api.model.param.wecom.thirdpart;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class ThirdPartyRoomConfigTaskContentParam {
+
+    @ApiModelProperty(value = "类型 0-文案 1-小程序")
+    private Integer type;
+    @ApiModelProperty(value = "文案内容")
+    private String content;
+    @ApiModelProperty(value = "小程序来源 0-热榜 1-标签 2-账号")
+    private Integer source;
+    @ApiModelProperty(value = "小程序来源内容 (标签/账号id)")
+    private String sourceContent;
+    @ApiModelProperty(value = "顺序")
+    private Integer seq;
+}

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

@@ -0,0 +1,21 @@
+package com.tzld.piaoquan.api.model.param.wecom.thirdpart;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class ThirdPartyRoomConfigTaskParam {
+
+    @ApiModelProperty(value = "是否开启(0否,1是)")
+    private Integer switchFlag;
+    @ApiModelProperty(value = "发送时间")
+    private List<String> sendTime;
+    @ApiModelProperty(value = "随机浮动分钟")
+    private Integer randomMin;
+    @ApiModelProperty(value = "顺序")
+    private Integer seq;
+    @ApiModelProperty(value = "发送内容列表")
+    private List<ThirdPartyRoomConfigTaskContentParam> contentList;
+}

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

@@ -0,0 +1,18 @@
+package com.tzld.piaoquan.api.model.param.wecom.thirdpart;
+
+import com.tzld.piaoquan.api.model.param.PageParam;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class ThirdPartyRoomListParam extends PageParam {
+
+    @ApiModelProperty(value = "企微主体名称")
+    private String corpName;
+    @ApiModelProperty(value = "群主")
+    private String groupLeaderName;
+    @ApiModelProperty(value = "群名称")
+    private String roomName;
+    @ApiModelProperty(value = "推送人员")
+    private String pushAccountName;
+}

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

@@ -0,0 +1,10 @@
+package com.tzld.piaoquan.api.model.param.wecom.thirdpart;
+
+import lombok.Data;
+
+@Data
+public class WeComThirdPartyCallBackParam {
+    private String uuid;
+    private Integer type;
+    private String json;
+}

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

@@ -9,6 +9,10 @@ public class ThirdPartWeComMsg {
 
     private Long sendUserid;
 
+    private Integer sendType;
+
+    private String content;
+
     private Long staffId;
 
     private Long videoId;
@@ -37,6 +41,8 @@ public class ThirdPartWeComMsg {
 
     private Boolean isroom;
 
+    private Integer status;
+
     private Date createTime;
 
     private String desc;
@@ -65,6 +71,22 @@ public class ThirdPartWeComMsg {
         this.sendUserid = sendUserid;
     }
 
+    public Integer getSendType() {
+        return sendType;
+    }
+
+    public void setSendType(Integer sendType) {
+        this.sendType = sendType;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
     public Long getStaffId() {
         return staffId;
     }
@@ -177,6 +199,14 @@ public class ThirdPartWeComMsg {
         this.isroom = isroom;
     }
 
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
     public Date getCreateTime() {
         return createTime;
     }
@@ -202,6 +232,8 @@ public class ThirdPartWeComMsg {
         sb.append(", id=").append(id);
         sb.append(", uuid=").append(uuid);
         sb.append(", sendUserid=").append(sendUserid);
+        sb.append(", sendType=").append(sendType);
+        sb.append(", content=").append(content);
         sb.append(", staffId=").append(staffId);
         sb.append(", videoId=").append(videoId);
         sb.append(", appname=").append(appname);
@@ -216,6 +248,7 @@ public class ThirdPartWeComMsg {
         sb.append(", aeskey=").append(aeskey);
         sb.append(", filesize=").append(filesize);
         sb.append(", isroom=").append(isroom);
+        sb.append(", status=").append(status);
         sb.append(", createTime=").append(createTime);
         sb.append(", desc=").append(desc);
         sb.append("]");

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

@@ -306,6 +306,136 @@ public class ThirdPartWeComMsgExample {
             return (Criteria) this;
         }
 
+        public Criteria andSendTypeIsNull() {
+            addCriterion("send_type is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTypeIsNotNull() {
+            addCriterion("send_type is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTypeEqualTo(Integer value) {
+            addCriterion("send_type =", value, "sendType");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTypeNotEqualTo(Integer value) {
+            addCriterion("send_type <>", value, "sendType");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTypeGreaterThan(Integer value) {
+            addCriterion("send_type >", value, "sendType");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTypeGreaterThanOrEqualTo(Integer value) {
+            addCriterion("send_type >=", value, "sendType");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTypeLessThan(Integer value) {
+            addCriterion("send_type <", value, "sendType");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTypeLessThanOrEqualTo(Integer value) {
+            addCriterion("send_type <=", value, "sendType");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTypeIn(List<Integer> values) {
+            addCriterion("send_type in", values, "sendType");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTypeNotIn(List<Integer> values) {
+            addCriterion("send_type not in", values, "sendType");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTypeBetween(Integer value1, Integer value2) {
+            addCriterion("send_type between", value1, value2, "sendType");
+            return (Criteria) this;
+        }
+
+        public Criteria andSendTypeNotBetween(Integer value1, Integer value2) {
+            addCriterion("send_type not between", value1, value2, "sendType");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentIsNull() {
+            addCriterion("content is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentIsNotNull() {
+            addCriterion("content is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentEqualTo(String value) {
+            addCriterion("content =", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentNotEqualTo(String value) {
+            addCriterion("content <>", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentGreaterThan(String value) {
+            addCriterion("content >", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentGreaterThanOrEqualTo(String value) {
+            addCriterion("content >=", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentLessThan(String value) {
+            addCriterion("content <", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentLessThanOrEqualTo(String value) {
+            addCriterion("content <=", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentLike(String value) {
+            addCriterion("content like", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentNotLike(String value) {
+            addCriterion("content not like", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentIn(List<String> values) {
+            addCriterion("content in", values, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentNotIn(List<String> values) {
+            addCriterion("content not in", values, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentBetween(String value1, String value2) {
+            addCriterion("content between", value1, value2, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentNotBetween(String value1, String value2) {
+            addCriterion("content not between", value1, value2, "content");
+            return (Criteria) this;
+        }
+
         public Criteria andStaffIdIsNull() {
             addCriterion("staff_id is null");
             return (Criteria) this;
@@ -1246,6 +1376,66 @@ public class ThirdPartWeComMsgExample {
             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;

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

@@ -0,0 +1,125 @@
+package com.tzld.piaoquan.api.model.po.wecom.thirdpart;
+
+import java.util.Date;
+
+public class ThirdPartWeComRoomConfig {
+    private String id;
+
+    private Long roomId;
+
+    private String accountConfigId;
+
+    private String putScene;
+
+    private String channel;
+
+    private Long primaryThirdStaffId;
+
+    private Long secondThirdStaffId;
+
+    private Integer status;
+
+    private Date createTime;
+
+    private Date updateTime;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public Long getRoomId() {
+        return roomId;
+    }
+
+    public void setRoomId(Long roomId) {
+        this.roomId = roomId;
+    }
+
+    public String getAccountConfigId() {
+        return accountConfigId;
+    }
+
+    public void setAccountConfigId(String accountConfigId) {
+        this.accountConfigId = accountConfigId;
+    }
+
+    public String getPutScene() {
+        return putScene;
+    }
+
+    public void setPutScene(String putScene) {
+        this.putScene = putScene;
+    }
+
+    public String getChannel() {
+        return channel;
+    }
+
+    public void setChannel(String channel) {
+        this.channel = channel;
+    }
+
+    public Long getPrimaryThirdStaffId() {
+        return primaryThirdStaffId;
+    }
+
+    public void setPrimaryThirdStaffId(Long primaryThirdStaffId) {
+        this.primaryThirdStaffId = primaryThirdStaffId;
+    }
+
+    public Long getSecondThirdStaffId() {
+        return secondThirdStaffId;
+    }
+
+    public void setSecondThirdStaffId(Long secondThirdStaffId) {
+        this.secondThirdStaffId = secondThirdStaffId;
+    }
+
+    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(", roomId=").append(roomId);
+        sb.append(", accountConfigId=").append(accountConfigId);
+        sb.append(", putScene=").append(putScene);
+        sb.append(", channel=").append(channel);
+        sb.append(", primaryThirdStaffId=").append(primaryThirdStaffId);
+        sb.append(", secondThirdStaffId=").append(secondThirdStaffId);
+        sb.append(", status=").append(status);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append("]");
+        return sb.toString();
+    }
+}

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

@@ -0,0 +1,852 @@
+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 ThirdPartWeComRoomConfigExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    protected Page page;
+
+    public ThirdPartWeComRoomConfigExample() {
+        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(String value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(String value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(String value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(String value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(String value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(String value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLike(String value) {
+            addCriterion("id like", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotLike(String value) {
+            addCriterion("id not like", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<String> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<String> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(String value1, String value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(String value1, String value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdIsNull() {
+            addCriterion("room_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdIsNotNull() {
+            addCriterion("room_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdEqualTo(Long value) {
+            addCriterion("room_id =", value, "roomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdNotEqualTo(Long value) {
+            addCriterion("room_id <>", value, "roomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdGreaterThan(Long value) {
+            addCriterion("room_id >", value, "roomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("room_id >=", value, "roomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdLessThan(Long value) {
+            addCriterion("room_id <", value, "roomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdLessThanOrEqualTo(Long value) {
+            addCriterion("room_id <=", value, "roomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdIn(List<Long> values) {
+            addCriterion("room_id in", values, "roomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdNotIn(List<Long> values) {
+            addCriterion("room_id not in", values, "roomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdBetween(Long value1, Long value2) {
+            addCriterion("room_id between", value1, value2, "roomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdNotBetween(Long value1, Long value2) {
+            addCriterion("room_id not between", value1, value2, "roomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountConfigIdIsNull() {
+            addCriterion("account_config_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountConfigIdIsNotNull() {
+            addCriterion("account_config_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountConfigIdEqualTo(String value) {
+            addCriterion("account_config_id =", value, "accountConfigId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountConfigIdNotEqualTo(String value) {
+            addCriterion("account_config_id <>", value, "accountConfigId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountConfigIdGreaterThan(String value) {
+            addCriterion("account_config_id >", value, "accountConfigId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountConfigIdGreaterThanOrEqualTo(String value) {
+            addCriterion("account_config_id >=", value, "accountConfigId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountConfigIdLessThan(String value) {
+            addCriterion("account_config_id <", value, "accountConfigId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountConfigIdLessThanOrEqualTo(String value) {
+            addCriterion("account_config_id <=", value, "accountConfigId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountConfigIdLike(String value) {
+            addCriterion("account_config_id like", value, "accountConfigId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountConfigIdNotLike(String value) {
+            addCriterion("account_config_id not like", value, "accountConfigId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountConfigIdIn(List<String> values) {
+            addCriterion("account_config_id in", values, "accountConfigId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountConfigIdNotIn(List<String> values) {
+            addCriterion("account_config_id not in", values, "accountConfigId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountConfigIdBetween(String value1, String value2) {
+            addCriterion("account_config_id between", value1, value2, "accountConfigId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAccountConfigIdNotBetween(String value1, String value2) {
+            addCriterion("account_config_id not between", value1, value2, "accountConfigId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPutSceneIsNull() {
+            addCriterion("put_scene is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPutSceneIsNotNull() {
+            addCriterion("put_scene is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPutSceneEqualTo(String value) {
+            addCriterion("put_scene =", value, "putScene");
+            return (Criteria) this;
+        }
+
+        public Criteria andPutSceneNotEqualTo(String value) {
+            addCriterion("put_scene <>", value, "putScene");
+            return (Criteria) this;
+        }
+
+        public Criteria andPutSceneGreaterThan(String value) {
+            addCriterion("put_scene >", value, "putScene");
+            return (Criteria) this;
+        }
+
+        public Criteria andPutSceneGreaterThanOrEqualTo(String value) {
+            addCriterion("put_scene >=", value, "putScene");
+            return (Criteria) this;
+        }
+
+        public Criteria andPutSceneLessThan(String value) {
+            addCriterion("put_scene <", value, "putScene");
+            return (Criteria) this;
+        }
+
+        public Criteria andPutSceneLessThanOrEqualTo(String value) {
+            addCriterion("put_scene <=", value, "putScene");
+            return (Criteria) this;
+        }
+
+        public Criteria andPutSceneLike(String value) {
+            addCriterion("put_scene like", value, "putScene");
+            return (Criteria) this;
+        }
+
+        public Criteria andPutSceneNotLike(String value) {
+            addCriterion("put_scene not like", value, "putScene");
+            return (Criteria) this;
+        }
+
+        public Criteria andPutSceneIn(List<String> values) {
+            addCriterion("put_scene in", values, "putScene");
+            return (Criteria) this;
+        }
+
+        public Criteria andPutSceneNotIn(List<String> values) {
+            addCriterion("put_scene not in", values, "putScene");
+            return (Criteria) this;
+        }
+
+        public Criteria andPutSceneBetween(String value1, String value2) {
+            addCriterion("put_scene between", value1, value2, "putScene");
+            return (Criteria) this;
+        }
+
+        public Criteria andPutSceneNotBetween(String value1, String value2) {
+            addCriterion("put_scene not between", value1, value2, "putScene");
+            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 andPrimaryThirdStaffIdIsNull() {
+            addCriterion("primary_third_staff_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPrimaryThirdStaffIdIsNotNull() {
+            addCriterion("primary_third_staff_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPrimaryThirdStaffIdEqualTo(Long value) {
+            addCriterion("primary_third_staff_id =", value, "primaryThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPrimaryThirdStaffIdNotEqualTo(Long value) {
+            addCriterion("primary_third_staff_id <>", value, "primaryThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPrimaryThirdStaffIdGreaterThan(Long value) {
+            addCriterion("primary_third_staff_id >", value, "primaryThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPrimaryThirdStaffIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("primary_third_staff_id >=", value, "primaryThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPrimaryThirdStaffIdLessThan(Long value) {
+            addCriterion("primary_third_staff_id <", value, "primaryThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPrimaryThirdStaffIdLessThanOrEqualTo(Long value) {
+            addCriterion("primary_third_staff_id <=", value, "primaryThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPrimaryThirdStaffIdIn(List<Long> values) {
+            addCriterion("primary_third_staff_id in", values, "primaryThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPrimaryThirdStaffIdNotIn(List<Long> values) {
+            addCriterion("primary_third_staff_id not in", values, "primaryThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPrimaryThirdStaffIdBetween(Long value1, Long value2) {
+            addCriterion("primary_third_staff_id between", value1, value2, "primaryThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPrimaryThirdStaffIdNotBetween(Long value1, Long value2) {
+            addCriterion("primary_third_staff_id not between", value1, value2, "primaryThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSecondThirdStaffIdIsNull() {
+            addCriterion("second_third_staff_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSecondThirdStaffIdIsNotNull() {
+            addCriterion("second_third_staff_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSecondThirdStaffIdEqualTo(Long value) {
+            addCriterion("second_third_staff_id =", value, "secondThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSecondThirdStaffIdNotEqualTo(Long value) {
+            addCriterion("second_third_staff_id <>", value, "secondThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSecondThirdStaffIdGreaterThan(Long value) {
+            addCriterion("second_third_staff_id >", value, "secondThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSecondThirdStaffIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("second_third_staff_id >=", value, "secondThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSecondThirdStaffIdLessThan(Long value) {
+            addCriterion("second_third_staff_id <", value, "secondThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSecondThirdStaffIdLessThanOrEqualTo(Long value) {
+            addCriterion("second_third_staff_id <=", value, "secondThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSecondThirdStaffIdIn(List<Long> values) {
+            addCriterion("second_third_staff_id in", values, "secondThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSecondThirdStaffIdNotIn(List<Long> values) {
+            addCriterion("second_third_staff_id not in", values, "secondThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSecondThirdStaffIdBetween(Long value1, Long value2) {
+            addCriterion("second_third_staff_id between", value1, value2, "secondThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSecondThirdStaffIdNotBetween(Long value1, Long value2) {
+            addCriterion("second_third_staff_id not between", value1, value2, "secondThirdStaffId");
+            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);
+        }
+    }
+}

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

@@ -0,0 +1,103 @@
+package com.tzld.piaoquan.api.model.po.wecom.thirdpart;
+
+import java.util.Date;
+
+public class ThirdPartWeComRoomConfigTask {
+    private String id;
+
+    private String configId;
+
+    private Integer switchFlag;
+
+    private String sendTime;
+
+    private Integer randomMin;
+
+    private Integer seq;
+
+    private Date createTime;
+
+    private Date updateTime;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getConfigId() {
+        return configId;
+    }
+
+    public void setConfigId(String configId) {
+        this.configId = configId;
+    }
+
+    public Integer getSwitchFlag() {
+        return switchFlag;
+    }
+
+    public void setSwitchFlag(Integer switchFlag) {
+        this.switchFlag = switchFlag;
+    }
+
+    public String getSendTime() {
+        return sendTime;
+    }
+
+    public void setSendTime(String sendTime) {
+        this.sendTime = sendTime;
+    }
+
+    public Integer getRandomMin() {
+        return randomMin;
+    }
+
+    public void setRandomMin(Integer randomMin) {
+        this.randomMin = randomMin;
+    }
+
+    public Integer getSeq() {
+        return seq;
+    }
+
+    public void setSeq(Integer seq) {
+        this.seq = seq;
+    }
+
+    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(", configId=").append(configId);
+        sb.append(", switchFlag=").append(switchFlag);
+        sb.append(", sendTime=").append(sendTime);
+        sb.append(", randomMin=").append(randomMin);
+        sb.append(", seq=").append(seq);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append("]");
+        return sb.toString();
+    }
+}

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

@@ -0,0 +1,114 @@
+package com.tzld.piaoquan.api.model.po.wecom.thirdpart;
+
+import java.util.Date;
+
+public class ThirdPartWeComRoomConfigTaskContent {
+    private String id;
+
+    private String taskId;
+
+    private Integer type;
+
+    private String content;
+
+    private Integer source;
+
+    private String sourceContent;
+
+    private Integer seq;
+
+    private Date createTime;
+
+    private Date updateTime;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(String taskId) {
+        this.taskId = taskId;
+    }
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    public Integer getSource() {
+        return source;
+    }
+
+    public void setSource(Integer source) {
+        this.source = source;
+    }
+
+    public String getSourceContent() {
+        return sourceContent;
+    }
+
+    public void setSourceContent(String sourceContent) {
+        this.sourceContent = sourceContent;
+    }
+
+    public Integer getSeq() {
+        return seq;
+    }
+
+    public void setSeq(Integer seq) {
+        this.seq = seq;
+    }
+
+    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(", taskId=").append(taskId);
+        sb.append(", type=").append(type);
+        sb.append(", content=").append(content);
+        sb.append(", source=").append(source);
+        sb.append(", sourceContent=").append(sourceContent);
+        sb.append(", seq=").append(seq);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append("]");
+        return sb.toString();
+    }
+}

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

@@ -0,0 +1,792 @@
+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 ThirdPartWeComRoomConfigTaskContentExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    protected Page page;
+
+    public ThirdPartWeComRoomConfigTaskContentExample() {
+        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(String value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(String value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(String value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(String value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(String value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(String value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLike(String value) {
+            addCriterion("id like", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotLike(String value) {
+            addCriterion("id not like", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<String> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<String> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(String value1, String value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(String value1, String value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdIsNull() {
+            addCriterion("task_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdIsNotNull() {
+            addCriterion("task_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdEqualTo(String value) {
+            addCriterion("task_id =", value, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdNotEqualTo(String value) {
+            addCriterion("task_id <>", value, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdGreaterThan(String value) {
+            addCriterion("task_id >", value, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdGreaterThanOrEqualTo(String value) {
+            addCriterion("task_id >=", value, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdLessThan(String value) {
+            addCriterion("task_id <", value, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdLessThanOrEqualTo(String value) {
+            addCriterion("task_id <=", value, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdLike(String value) {
+            addCriterion("task_id like", value, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdNotLike(String value) {
+            addCriterion("task_id not like", value, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdIn(List<String> values) {
+            addCriterion("task_id in", values, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdNotIn(List<String> values) {
+            addCriterion("task_id not in", values, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdBetween(String value1, String value2) {
+            addCriterion("task_id between", value1, value2, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdNotBetween(String value1, String value2) {
+            addCriterion("task_id not between", value1, value2, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeIsNull() {
+            addCriterion("`type` is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeIsNotNull() {
+            addCriterion("`type` is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeEqualTo(Integer value) {
+            addCriterion("`type` =", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotEqualTo(Integer value) {
+            addCriterion("`type` <>", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeGreaterThan(Integer value) {
+            addCriterion("`type` >", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeGreaterThanOrEqualTo(Integer value) {
+            addCriterion("`type` >=", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeLessThan(Integer value) {
+            addCriterion("`type` <", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeLessThanOrEqualTo(Integer value) {
+            addCriterion("`type` <=", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeIn(List<Integer> values) {
+            addCriterion("`type` in", values, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotIn(List<Integer> values) {
+            addCriterion("`type` not in", values, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeBetween(Integer value1, Integer value2) {
+            addCriterion("`type` between", value1, value2, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotBetween(Integer value1, Integer value2) {
+            addCriterion("`type` not between", value1, value2, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentIsNull() {
+            addCriterion("content is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentIsNotNull() {
+            addCriterion("content is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentEqualTo(String value) {
+            addCriterion("content =", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentNotEqualTo(String value) {
+            addCriterion("content <>", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentGreaterThan(String value) {
+            addCriterion("content >", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentGreaterThanOrEqualTo(String value) {
+            addCriterion("content >=", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentLessThan(String value) {
+            addCriterion("content <", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentLessThanOrEqualTo(String value) {
+            addCriterion("content <=", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentLike(String value) {
+            addCriterion("content like", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentNotLike(String value) {
+            addCriterion("content not like", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentIn(List<String> values) {
+            addCriterion("content in", values, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentNotIn(List<String> values) {
+            addCriterion("content not in", values, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentBetween(String value1, String value2) {
+            addCriterion("content between", value1, value2, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentNotBetween(String value1, String value2) {
+            addCriterion("content not between", value1, value2, "content");
+            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 andSourceContentIsNull() {
+            addCriterion("source_content is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceContentIsNotNull() {
+            addCriterion("source_content is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceContentEqualTo(String value) {
+            addCriterion("source_content =", value, "sourceContent");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceContentNotEqualTo(String value) {
+            addCriterion("source_content <>", value, "sourceContent");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceContentGreaterThan(String value) {
+            addCriterion("source_content >", value, "sourceContent");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceContentGreaterThanOrEqualTo(String value) {
+            addCriterion("source_content >=", value, "sourceContent");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceContentLessThan(String value) {
+            addCriterion("source_content <", value, "sourceContent");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceContentLessThanOrEqualTo(String value) {
+            addCriterion("source_content <=", value, "sourceContent");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceContentLike(String value) {
+            addCriterion("source_content like", value, "sourceContent");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceContentNotLike(String value) {
+            addCriterion("source_content not like", value, "sourceContent");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceContentIn(List<String> values) {
+            addCriterion("source_content in", values, "sourceContent");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceContentNotIn(List<String> values) {
+            addCriterion("source_content not in", values, "sourceContent");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceContentBetween(String value1, String value2) {
+            addCriterion("source_content between", value1, value2, "sourceContent");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceContentNotBetween(String value1, String value2) {
+            addCriterion("source_content not between", value1, value2, "sourceContent");
+            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 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);
+        }
+    }
+}

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

@@ -0,0 +1,722 @@
+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 ThirdPartWeComRoomConfigTaskExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    protected Page page;
+
+    public ThirdPartWeComRoomConfigTaskExample() {
+        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(String value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(String value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(String value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(String value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(String value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(String value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLike(String value) {
+            addCriterion("id like", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotLike(String value) {
+            addCriterion("id not like", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<String> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<String> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(String value1, String value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(String value1, String value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigIdIsNull() {
+            addCriterion("config_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigIdIsNotNull() {
+            addCriterion("config_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigIdEqualTo(String value) {
+            addCriterion("config_id =", value, "configId");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigIdNotEqualTo(String value) {
+            addCriterion("config_id <>", value, "configId");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigIdGreaterThan(String value) {
+            addCriterion("config_id >", value, "configId");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigIdGreaterThanOrEqualTo(String value) {
+            addCriterion("config_id >=", value, "configId");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigIdLessThan(String value) {
+            addCriterion("config_id <", value, "configId");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigIdLessThanOrEqualTo(String value) {
+            addCriterion("config_id <=", value, "configId");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigIdLike(String value) {
+            addCriterion("config_id like", value, "configId");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigIdNotLike(String value) {
+            addCriterion("config_id not like", value, "configId");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigIdIn(List<String> values) {
+            addCriterion("config_id in", values, "configId");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigIdNotIn(List<String> values) {
+            addCriterion("config_id not in", values, "configId");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigIdBetween(String value1, String value2) {
+            addCriterion("config_id between", value1, value2, "configId");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigIdNotBetween(String value1, String value2) {
+            addCriterion("config_id not between", value1, value2, "configId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSwitchFlagIsNull() {
+            addCriterion("switch_flag is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSwitchFlagIsNotNull() {
+            addCriterion("switch_flag is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSwitchFlagEqualTo(Integer value) {
+            addCriterion("switch_flag =", value, "switchFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andSwitchFlagNotEqualTo(Integer value) {
+            addCriterion("switch_flag <>", value, "switchFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andSwitchFlagGreaterThan(Integer value) {
+            addCriterion("switch_flag >", value, "switchFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andSwitchFlagGreaterThanOrEqualTo(Integer value) {
+            addCriterion("switch_flag >=", value, "switchFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andSwitchFlagLessThan(Integer value) {
+            addCriterion("switch_flag <", value, "switchFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andSwitchFlagLessThanOrEqualTo(Integer value) {
+            addCriterion("switch_flag <=", value, "switchFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andSwitchFlagIn(List<Integer> values) {
+            addCriterion("switch_flag in", values, "switchFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andSwitchFlagNotIn(List<Integer> values) {
+            addCriterion("switch_flag not in", values, "switchFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andSwitchFlagBetween(Integer value1, Integer value2) {
+            addCriterion("switch_flag between", value1, value2, "switchFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andSwitchFlagNotBetween(Integer value1, Integer value2) {
+            addCriterion("switch_flag not between", value1, value2, "switchFlag");
+            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 andRandomMinIsNull() {
+            addCriterion("random_min is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRandomMinIsNotNull() {
+            addCriterion("random_min is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRandomMinEqualTo(Integer value) {
+            addCriterion("random_min =", value, "randomMin");
+            return (Criteria) this;
+        }
+
+        public Criteria andRandomMinNotEqualTo(Integer value) {
+            addCriterion("random_min <>", value, "randomMin");
+            return (Criteria) this;
+        }
+
+        public Criteria andRandomMinGreaterThan(Integer value) {
+            addCriterion("random_min >", value, "randomMin");
+            return (Criteria) this;
+        }
+
+        public Criteria andRandomMinGreaterThanOrEqualTo(Integer value) {
+            addCriterion("random_min >=", value, "randomMin");
+            return (Criteria) this;
+        }
+
+        public Criteria andRandomMinLessThan(Integer value) {
+            addCriterion("random_min <", value, "randomMin");
+            return (Criteria) this;
+        }
+
+        public Criteria andRandomMinLessThanOrEqualTo(Integer value) {
+            addCriterion("random_min <=", value, "randomMin");
+            return (Criteria) this;
+        }
+
+        public Criteria andRandomMinIn(List<Integer> values) {
+            addCriterion("random_min in", values, "randomMin");
+            return (Criteria) this;
+        }
+
+        public Criteria andRandomMinNotIn(List<Integer> values) {
+            addCriterion("random_min not in", values, "randomMin");
+            return (Criteria) this;
+        }
+
+        public Criteria andRandomMinBetween(Integer value1, Integer value2) {
+            addCriterion("random_min between", value1, value2, "randomMin");
+            return (Criteria) this;
+        }
+
+        public Criteria andRandomMinNotBetween(Integer value1, Integer value2) {
+            addCriterion("random_min not between", value1, value2, "randomMin");
+            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 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);
+        }
+    }
+}

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

@@ -17,6 +17,10 @@ public class ThirdPartWeComStaff {
 
     private String avatar;
 
+    private String qrImage;
+
+    private String realName;
+
     private Integer status;
 
     private Integer autoCreateRoom;
@@ -81,6 +85,22 @@ public class ThirdPartWeComStaff {
         this.avatar = avatar;
     }
 
+    public String getQrImage() {
+        return qrImage;
+    }
+
+    public void setQrImage(String qrImage) {
+        this.qrImage = qrImage;
+    }
+
+    public String getRealName() {
+        return realName;
+    }
+
+    public void setRealName(String realName) {
+        this.realName = realName;
+    }
+
     public Integer getStatus() {
         return status;
     }
@@ -126,6 +146,8 @@ public class ThirdPartWeComStaff {
         sb.append(", thirdStaffId=").append(thirdStaffId);
         sb.append(", thirdUuid=").append(thirdUuid);
         sb.append(", avatar=").append(avatar);
+        sb.append(", qrImage=").append(qrImage);
+        sb.append(", realName=").append(realName);
         sb.append(", status=").append(status);
         sb.append(", autoCreateRoom=").append(autoCreateRoom);
         sb.append(", createTime=").append(createTime);

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

@@ -0,0 +1,147 @@
+package com.tzld.piaoquan.api.model.po.wecom.thirdpart;
+
+import java.util.Date;
+
+public class ThirdPartWeComStaffConfig {
+    private String id;
+
+    private Long staffId;
+
+    private String putScene;
+
+    private String channel;
+
+    private Integer switchFlag;
+
+    private Integer openRoomSendSwitchNum;
+
+    private Long primaryThirdStaffId;
+
+    private Long secondThirdStaffId;
+
+    private Integer configSync;
+
+    private Integer status;
+
+    private Date createTime;
+
+    private Date updateTime;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public Long getStaffId() {
+        return staffId;
+    }
+
+    public void setStaffId(Long staffId) {
+        this.staffId = staffId;
+    }
+
+    public String getPutScene() {
+        return putScene;
+    }
+
+    public void setPutScene(String putScene) {
+        this.putScene = putScene;
+    }
+
+    public String getChannel() {
+        return channel;
+    }
+
+    public void setChannel(String channel) {
+        this.channel = channel;
+    }
+
+    public Integer getSwitchFlag() {
+        return switchFlag;
+    }
+
+    public void setSwitchFlag(Integer switchFlag) {
+        this.switchFlag = switchFlag;
+    }
+
+    public Integer getOpenRoomSendSwitchNum() {
+        return openRoomSendSwitchNum;
+    }
+
+    public void setOpenRoomSendSwitchNum(Integer openRoomSendSwitchNum) {
+        this.openRoomSendSwitchNum = openRoomSendSwitchNum;
+    }
+
+    public Long getPrimaryThirdStaffId() {
+        return primaryThirdStaffId;
+    }
+
+    public void setPrimaryThirdStaffId(Long primaryThirdStaffId) {
+        this.primaryThirdStaffId = primaryThirdStaffId;
+    }
+
+    public Long getSecondThirdStaffId() {
+        return secondThirdStaffId;
+    }
+
+    public void setSecondThirdStaffId(Long secondThirdStaffId) {
+        this.secondThirdStaffId = secondThirdStaffId;
+    }
+
+    public Integer getConfigSync() {
+        return configSync;
+    }
+
+    public void setConfigSync(Integer configSync) {
+        this.configSync = configSync;
+    }
+
+    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(", staffId=").append(staffId);
+        sb.append(", putScene=").append(putScene);
+        sb.append(", channel=").append(channel);
+        sb.append(", switchFlag=").append(switchFlag);
+        sb.append(", openRoomSendSwitchNum=").append(openRoomSendSwitchNum);
+        sb.append(", primaryThirdStaffId=").append(primaryThirdStaffId);
+        sb.append(", secondThirdStaffId=").append(secondThirdStaffId);
+        sb.append(", configSync=").append(configSync);
+        sb.append(", status=").append(status);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append("]");
+        return sb.toString();
+    }
+}

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

@@ -0,0 +1,962 @@
+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 ThirdPartWeComStaffConfigExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    protected Page page;
+
+    public ThirdPartWeComStaffConfigExample() {
+        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(String value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(String value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(String value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(String value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(String value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(String value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLike(String value) {
+            addCriterion("id like", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotLike(String value) {
+            addCriterion("id not like", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<String> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<String> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(String value1, String value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(String value1, String value2) {
+            addCriterion("id not between", value1, value2, "id");
+            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 andPutSceneIsNull() {
+            addCriterion("put_scene is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPutSceneIsNotNull() {
+            addCriterion("put_scene is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPutSceneEqualTo(String value) {
+            addCriterion("put_scene =", value, "putScene");
+            return (Criteria) this;
+        }
+
+        public Criteria andPutSceneNotEqualTo(String value) {
+            addCriterion("put_scene <>", value, "putScene");
+            return (Criteria) this;
+        }
+
+        public Criteria andPutSceneGreaterThan(String value) {
+            addCriterion("put_scene >", value, "putScene");
+            return (Criteria) this;
+        }
+
+        public Criteria andPutSceneGreaterThanOrEqualTo(String value) {
+            addCriterion("put_scene >=", value, "putScene");
+            return (Criteria) this;
+        }
+
+        public Criteria andPutSceneLessThan(String value) {
+            addCriterion("put_scene <", value, "putScene");
+            return (Criteria) this;
+        }
+
+        public Criteria andPutSceneLessThanOrEqualTo(String value) {
+            addCriterion("put_scene <=", value, "putScene");
+            return (Criteria) this;
+        }
+
+        public Criteria andPutSceneLike(String value) {
+            addCriterion("put_scene like", value, "putScene");
+            return (Criteria) this;
+        }
+
+        public Criteria andPutSceneNotLike(String value) {
+            addCriterion("put_scene not like", value, "putScene");
+            return (Criteria) this;
+        }
+
+        public Criteria andPutSceneIn(List<String> values) {
+            addCriterion("put_scene in", values, "putScene");
+            return (Criteria) this;
+        }
+
+        public Criteria andPutSceneNotIn(List<String> values) {
+            addCriterion("put_scene not in", values, "putScene");
+            return (Criteria) this;
+        }
+
+        public Criteria andPutSceneBetween(String value1, String value2) {
+            addCriterion("put_scene between", value1, value2, "putScene");
+            return (Criteria) this;
+        }
+
+        public Criteria andPutSceneNotBetween(String value1, String value2) {
+            addCriterion("put_scene not between", value1, value2, "putScene");
+            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 andSwitchFlagIsNull() {
+            addCriterion("switch_flag is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSwitchFlagIsNotNull() {
+            addCriterion("switch_flag is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSwitchFlagEqualTo(Integer value) {
+            addCriterion("switch_flag =", value, "switchFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andSwitchFlagNotEqualTo(Integer value) {
+            addCriterion("switch_flag <>", value, "switchFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andSwitchFlagGreaterThan(Integer value) {
+            addCriterion("switch_flag >", value, "switchFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andSwitchFlagGreaterThanOrEqualTo(Integer value) {
+            addCriterion("switch_flag >=", value, "switchFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andSwitchFlagLessThan(Integer value) {
+            addCriterion("switch_flag <", value, "switchFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andSwitchFlagLessThanOrEqualTo(Integer value) {
+            addCriterion("switch_flag <=", value, "switchFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andSwitchFlagIn(List<Integer> values) {
+            addCriterion("switch_flag in", values, "switchFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andSwitchFlagNotIn(List<Integer> values) {
+            addCriterion("switch_flag not in", values, "switchFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andSwitchFlagBetween(Integer value1, Integer value2) {
+            addCriterion("switch_flag between", value1, value2, "switchFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andSwitchFlagNotBetween(Integer value1, Integer value2) {
+            addCriterion("switch_flag not between", value1, value2, "switchFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenRoomSendSwitchNumIsNull() {
+            addCriterion("open_room_send_switch_num is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenRoomSendSwitchNumIsNotNull() {
+            addCriterion("open_room_send_switch_num is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenRoomSendSwitchNumEqualTo(Integer value) {
+            addCriterion("open_room_send_switch_num =", value, "openRoomSendSwitchNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenRoomSendSwitchNumNotEqualTo(Integer value) {
+            addCriterion("open_room_send_switch_num <>", value, "openRoomSendSwitchNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenRoomSendSwitchNumGreaterThan(Integer value) {
+            addCriterion("open_room_send_switch_num >", value, "openRoomSendSwitchNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenRoomSendSwitchNumGreaterThanOrEqualTo(Integer value) {
+            addCriterion("open_room_send_switch_num >=", value, "openRoomSendSwitchNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenRoomSendSwitchNumLessThan(Integer value) {
+            addCriterion("open_room_send_switch_num <", value, "openRoomSendSwitchNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenRoomSendSwitchNumLessThanOrEqualTo(Integer value) {
+            addCriterion("open_room_send_switch_num <=", value, "openRoomSendSwitchNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenRoomSendSwitchNumIn(List<Integer> values) {
+            addCriterion("open_room_send_switch_num in", values, "openRoomSendSwitchNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenRoomSendSwitchNumNotIn(List<Integer> values) {
+            addCriterion("open_room_send_switch_num not in", values, "openRoomSendSwitchNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenRoomSendSwitchNumBetween(Integer value1, Integer value2) {
+            addCriterion("open_room_send_switch_num between", value1, value2, "openRoomSendSwitchNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andOpenRoomSendSwitchNumNotBetween(Integer value1, Integer value2) {
+            addCriterion("open_room_send_switch_num not between", value1, value2, "openRoomSendSwitchNum");
+            return (Criteria) this;
+        }
+
+        public Criteria andPrimaryThirdStaffIdIsNull() {
+            addCriterion("primary_third_staff_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPrimaryThirdStaffIdIsNotNull() {
+            addCriterion("primary_third_staff_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPrimaryThirdStaffIdEqualTo(Long value) {
+            addCriterion("primary_third_staff_id =", value, "primaryThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPrimaryThirdStaffIdNotEqualTo(Long value) {
+            addCriterion("primary_third_staff_id <>", value, "primaryThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPrimaryThirdStaffIdGreaterThan(Long value) {
+            addCriterion("primary_third_staff_id >", value, "primaryThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPrimaryThirdStaffIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("primary_third_staff_id >=", value, "primaryThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPrimaryThirdStaffIdLessThan(Long value) {
+            addCriterion("primary_third_staff_id <", value, "primaryThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPrimaryThirdStaffIdLessThanOrEqualTo(Long value) {
+            addCriterion("primary_third_staff_id <=", value, "primaryThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPrimaryThirdStaffIdIn(List<Long> values) {
+            addCriterion("primary_third_staff_id in", values, "primaryThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPrimaryThirdStaffIdNotIn(List<Long> values) {
+            addCriterion("primary_third_staff_id not in", values, "primaryThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPrimaryThirdStaffIdBetween(Long value1, Long value2) {
+            addCriterion("primary_third_staff_id between", value1, value2, "primaryThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPrimaryThirdStaffIdNotBetween(Long value1, Long value2) {
+            addCriterion("primary_third_staff_id not between", value1, value2, "primaryThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSecondThirdStaffIdIsNull() {
+            addCriterion("second_third_staff_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSecondThirdStaffIdIsNotNull() {
+            addCriterion("second_third_staff_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSecondThirdStaffIdEqualTo(Long value) {
+            addCriterion("second_third_staff_id =", value, "secondThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSecondThirdStaffIdNotEqualTo(Long value) {
+            addCriterion("second_third_staff_id <>", value, "secondThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSecondThirdStaffIdGreaterThan(Long value) {
+            addCriterion("second_third_staff_id >", value, "secondThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSecondThirdStaffIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("second_third_staff_id >=", value, "secondThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSecondThirdStaffIdLessThan(Long value) {
+            addCriterion("second_third_staff_id <", value, "secondThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSecondThirdStaffIdLessThanOrEqualTo(Long value) {
+            addCriterion("second_third_staff_id <=", value, "secondThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSecondThirdStaffIdIn(List<Long> values) {
+            addCriterion("second_third_staff_id in", values, "secondThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSecondThirdStaffIdNotIn(List<Long> values) {
+            addCriterion("second_third_staff_id not in", values, "secondThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSecondThirdStaffIdBetween(Long value1, Long value2) {
+            addCriterion("second_third_staff_id between", value1, value2, "secondThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSecondThirdStaffIdNotBetween(Long value1, Long value2) {
+            addCriterion("second_third_staff_id not between", value1, value2, "secondThirdStaffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigSyncIsNull() {
+            addCriterion("config_sync is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigSyncIsNotNull() {
+            addCriterion("config_sync is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigSyncEqualTo(Integer value) {
+            addCriterion("config_sync =", value, "configSync");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigSyncNotEqualTo(Integer value) {
+            addCriterion("config_sync <>", value, "configSync");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigSyncGreaterThan(Integer value) {
+            addCriterion("config_sync >", value, "configSync");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigSyncGreaterThanOrEqualTo(Integer value) {
+            addCriterion("config_sync >=", value, "configSync");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigSyncLessThan(Integer value) {
+            addCriterion("config_sync <", value, "configSync");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigSyncLessThanOrEqualTo(Integer value) {
+            addCriterion("config_sync <=", value, "configSync");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigSyncIn(List<Integer> values) {
+            addCriterion("config_sync in", values, "configSync");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigSyncNotIn(List<Integer> values) {
+            addCriterion("config_sync not in", values, "configSync");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigSyncBetween(Integer value1, Integer value2) {
+            addCriterion("config_sync between", value1, value2, "configSync");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigSyncNotBetween(Integer value1, Integer value2) {
+            addCriterion("config_sync not between", value1, value2, "configSync");
+            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);
+        }
+    }
+}

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

@@ -0,0 +1,103 @@
+package com.tzld.piaoquan.api.model.po.wecom.thirdpart;
+
+import java.util.Date;
+
+public class ThirdPartWeComStaffConfigTask {
+    private String id;
+
+    private String configId;
+
+    private Integer switchFlag;
+
+    private String sendTime;
+
+    private Integer randomMin;
+
+    private Integer seq;
+
+    private Date createTime;
+
+    private Date updateTime;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getConfigId() {
+        return configId;
+    }
+
+    public void setConfigId(String configId) {
+        this.configId = configId;
+    }
+
+    public Integer getSwitchFlag() {
+        return switchFlag;
+    }
+
+    public void setSwitchFlag(Integer switchFlag) {
+        this.switchFlag = switchFlag;
+    }
+
+    public String getSendTime() {
+        return sendTime;
+    }
+
+    public void setSendTime(String sendTime) {
+        this.sendTime = sendTime;
+    }
+
+    public Integer getRandomMin() {
+        return randomMin;
+    }
+
+    public void setRandomMin(Integer randomMin) {
+        this.randomMin = randomMin;
+    }
+
+    public Integer getSeq() {
+        return seq;
+    }
+
+    public void setSeq(Integer seq) {
+        this.seq = seq;
+    }
+
+    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(", configId=").append(configId);
+        sb.append(", switchFlag=").append(switchFlag);
+        sb.append(", sendTime=").append(sendTime);
+        sb.append(", randomMin=").append(randomMin);
+        sb.append(", seq=").append(seq);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append("]");
+        return sb.toString();
+    }
+}

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

@@ -0,0 +1,114 @@
+package com.tzld.piaoquan.api.model.po.wecom.thirdpart;
+
+import java.util.Date;
+
+public class ThirdPartWeComStaffConfigTaskContent {
+    private String id;
+
+    private String taskId;
+
+    private Integer type;
+
+    private String content;
+
+    private Integer source;
+
+    private String sourceContent;
+
+    private Integer seq;
+
+    private Date createTime;
+
+    private Date updateTime;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getTaskId() {
+        return taskId;
+    }
+
+    public void setTaskId(String taskId) {
+        this.taskId = taskId;
+    }
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    public Integer getSource() {
+        return source;
+    }
+
+    public void setSource(Integer source) {
+        this.source = source;
+    }
+
+    public String getSourceContent() {
+        return sourceContent;
+    }
+
+    public void setSourceContent(String sourceContent) {
+        this.sourceContent = sourceContent;
+    }
+
+    public Integer getSeq() {
+        return seq;
+    }
+
+    public void setSeq(Integer seq) {
+        this.seq = seq;
+    }
+
+    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(", taskId=").append(taskId);
+        sb.append(", type=").append(type);
+        sb.append(", content=").append(content);
+        sb.append(", source=").append(source);
+        sb.append(", sourceContent=").append(sourceContent);
+        sb.append(", seq=").append(seq);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append("]");
+        return sb.toString();
+    }
+}

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

@@ -0,0 +1,792 @@
+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 ThirdPartWeComStaffConfigTaskContentExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    protected Page page;
+
+    public ThirdPartWeComStaffConfigTaskContentExample() {
+        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(String value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(String value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(String value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(String value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(String value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(String value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLike(String value) {
+            addCriterion("id like", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotLike(String value) {
+            addCriterion("id not like", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<String> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<String> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(String value1, String value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(String value1, String value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdIsNull() {
+            addCriterion("task_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdIsNotNull() {
+            addCriterion("task_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdEqualTo(String value) {
+            addCriterion("task_id =", value, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdNotEqualTo(String value) {
+            addCriterion("task_id <>", value, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdGreaterThan(String value) {
+            addCriterion("task_id >", value, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdGreaterThanOrEqualTo(String value) {
+            addCriterion("task_id >=", value, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdLessThan(String value) {
+            addCriterion("task_id <", value, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdLessThanOrEqualTo(String value) {
+            addCriterion("task_id <=", value, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdLike(String value) {
+            addCriterion("task_id like", value, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdNotLike(String value) {
+            addCriterion("task_id not like", value, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdIn(List<String> values) {
+            addCriterion("task_id in", values, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdNotIn(List<String> values) {
+            addCriterion("task_id not in", values, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdBetween(String value1, String value2) {
+            addCriterion("task_id between", value1, value2, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTaskIdNotBetween(String value1, String value2) {
+            addCriterion("task_id not between", value1, value2, "taskId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeIsNull() {
+            addCriterion("`type` is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeIsNotNull() {
+            addCriterion("`type` is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeEqualTo(Integer value) {
+            addCriterion("`type` =", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotEqualTo(Integer value) {
+            addCriterion("`type` <>", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeGreaterThan(Integer value) {
+            addCriterion("`type` >", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeGreaterThanOrEqualTo(Integer value) {
+            addCriterion("`type` >=", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeLessThan(Integer value) {
+            addCriterion("`type` <", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeLessThanOrEqualTo(Integer value) {
+            addCriterion("`type` <=", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeIn(List<Integer> values) {
+            addCriterion("`type` in", values, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotIn(List<Integer> values) {
+            addCriterion("`type` not in", values, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeBetween(Integer value1, Integer value2) {
+            addCriterion("`type` between", value1, value2, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotBetween(Integer value1, Integer value2) {
+            addCriterion("`type` not between", value1, value2, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentIsNull() {
+            addCriterion("content is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentIsNotNull() {
+            addCriterion("content is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentEqualTo(String value) {
+            addCriterion("content =", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentNotEqualTo(String value) {
+            addCriterion("content <>", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentGreaterThan(String value) {
+            addCriterion("content >", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentGreaterThanOrEqualTo(String value) {
+            addCriterion("content >=", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentLessThan(String value) {
+            addCriterion("content <", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentLessThanOrEqualTo(String value) {
+            addCriterion("content <=", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentLike(String value) {
+            addCriterion("content like", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentNotLike(String value) {
+            addCriterion("content not like", value, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentIn(List<String> values) {
+            addCriterion("content in", values, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentNotIn(List<String> values) {
+            addCriterion("content not in", values, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentBetween(String value1, String value2) {
+            addCriterion("content between", value1, value2, "content");
+            return (Criteria) this;
+        }
+
+        public Criteria andContentNotBetween(String value1, String value2) {
+            addCriterion("content not between", value1, value2, "content");
+            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 andSourceContentIsNull() {
+            addCriterion("source_content is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceContentIsNotNull() {
+            addCriterion("source_content is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceContentEqualTo(String value) {
+            addCriterion("source_content =", value, "sourceContent");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceContentNotEqualTo(String value) {
+            addCriterion("source_content <>", value, "sourceContent");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceContentGreaterThan(String value) {
+            addCriterion("source_content >", value, "sourceContent");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceContentGreaterThanOrEqualTo(String value) {
+            addCriterion("source_content >=", value, "sourceContent");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceContentLessThan(String value) {
+            addCriterion("source_content <", value, "sourceContent");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceContentLessThanOrEqualTo(String value) {
+            addCriterion("source_content <=", value, "sourceContent");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceContentLike(String value) {
+            addCriterion("source_content like", value, "sourceContent");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceContentNotLike(String value) {
+            addCriterion("source_content not like", value, "sourceContent");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceContentIn(List<String> values) {
+            addCriterion("source_content in", values, "sourceContent");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceContentNotIn(List<String> values) {
+            addCriterion("source_content not in", values, "sourceContent");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceContentBetween(String value1, String value2) {
+            addCriterion("source_content between", value1, value2, "sourceContent");
+            return (Criteria) this;
+        }
+
+        public Criteria andSourceContentNotBetween(String value1, String value2) {
+            addCriterion("source_content not between", value1, value2, "sourceContent");
+            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 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);
+        }
+    }
+}

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

@@ -0,0 +1,722 @@
+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 ThirdPartWeComStaffConfigTaskExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    protected Page page;
+
+    public ThirdPartWeComStaffConfigTaskExample() {
+        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(String value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(String value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(String value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(String value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(String value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(String value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLike(String value) {
+            addCriterion("id like", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotLike(String value) {
+            addCriterion("id not like", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<String> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<String> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(String value1, String value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(String value1, String value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigIdIsNull() {
+            addCriterion("config_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigIdIsNotNull() {
+            addCriterion("config_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigIdEqualTo(String value) {
+            addCriterion("config_id =", value, "configId");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigIdNotEqualTo(String value) {
+            addCriterion("config_id <>", value, "configId");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigIdGreaterThan(String value) {
+            addCriterion("config_id >", value, "configId");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigIdGreaterThanOrEqualTo(String value) {
+            addCriterion("config_id >=", value, "configId");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigIdLessThan(String value) {
+            addCriterion("config_id <", value, "configId");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigIdLessThanOrEqualTo(String value) {
+            addCriterion("config_id <=", value, "configId");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigIdLike(String value) {
+            addCriterion("config_id like", value, "configId");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigIdNotLike(String value) {
+            addCriterion("config_id not like", value, "configId");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigIdIn(List<String> values) {
+            addCriterion("config_id in", values, "configId");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigIdNotIn(List<String> values) {
+            addCriterion("config_id not in", values, "configId");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigIdBetween(String value1, String value2) {
+            addCriterion("config_id between", value1, value2, "configId");
+            return (Criteria) this;
+        }
+
+        public Criteria andConfigIdNotBetween(String value1, String value2) {
+            addCriterion("config_id not between", value1, value2, "configId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSwitchFlagIsNull() {
+            addCriterion("switch_flag is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSwitchFlagIsNotNull() {
+            addCriterion("switch_flag is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSwitchFlagEqualTo(Integer value) {
+            addCriterion("switch_flag =", value, "switchFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andSwitchFlagNotEqualTo(Integer value) {
+            addCriterion("switch_flag <>", value, "switchFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andSwitchFlagGreaterThan(Integer value) {
+            addCriterion("switch_flag >", value, "switchFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andSwitchFlagGreaterThanOrEqualTo(Integer value) {
+            addCriterion("switch_flag >=", value, "switchFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andSwitchFlagLessThan(Integer value) {
+            addCriterion("switch_flag <", value, "switchFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andSwitchFlagLessThanOrEqualTo(Integer value) {
+            addCriterion("switch_flag <=", value, "switchFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andSwitchFlagIn(List<Integer> values) {
+            addCriterion("switch_flag in", values, "switchFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andSwitchFlagNotIn(List<Integer> values) {
+            addCriterion("switch_flag not in", values, "switchFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andSwitchFlagBetween(Integer value1, Integer value2) {
+            addCriterion("switch_flag between", value1, value2, "switchFlag");
+            return (Criteria) this;
+        }
+
+        public Criteria andSwitchFlagNotBetween(Integer value1, Integer value2) {
+            addCriterion("switch_flag not between", value1, value2, "switchFlag");
+            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 andRandomMinIsNull() {
+            addCriterion("random_min is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRandomMinIsNotNull() {
+            addCriterion("random_min is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRandomMinEqualTo(Integer value) {
+            addCriterion("random_min =", value, "randomMin");
+            return (Criteria) this;
+        }
+
+        public Criteria andRandomMinNotEqualTo(Integer value) {
+            addCriterion("random_min <>", value, "randomMin");
+            return (Criteria) this;
+        }
+
+        public Criteria andRandomMinGreaterThan(Integer value) {
+            addCriterion("random_min >", value, "randomMin");
+            return (Criteria) this;
+        }
+
+        public Criteria andRandomMinGreaterThanOrEqualTo(Integer value) {
+            addCriterion("random_min >=", value, "randomMin");
+            return (Criteria) this;
+        }
+
+        public Criteria andRandomMinLessThan(Integer value) {
+            addCriterion("random_min <", value, "randomMin");
+            return (Criteria) this;
+        }
+
+        public Criteria andRandomMinLessThanOrEqualTo(Integer value) {
+            addCriterion("random_min <=", value, "randomMin");
+            return (Criteria) this;
+        }
+
+        public Criteria andRandomMinIn(List<Integer> values) {
+            addCriterion("random_min in", values, "randomMin");
+            return (Criteria) this;
+        }
+
+        public Criteria andRandomMinNotIn(List<Integer> values) {
+            addCriterion("random_min not in", values, "randomMin");
+            return (Criteria) this;
+        }
+
+        public Criteria andRandomMinBetween(Integer value1, Integer value2) {
+            addCriterion("random_min between", value1, value2, "randomMin");
+            return (Criteria) this;
+        }
+
+        public Criteria andRandomMinNotBetween(Integer value1, Integer value2) {
+            addCriterion("random_min not between", value1, value2, "randomMin");
+            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 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);
+        }
+    }
+}

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

@@ -576,6 +576,146 @@ public class ThirdPartWeComStaffExample {
             return (Criteria) this;
         }
 
+        public Criteria andQrImageIsNull() {
+            addCriterion("qr_image is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andQrImageIsNotNull() {
+            addCriterion("qr_image is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andQrImageEqualTo(String value) {
+            addCriterion("qr_image =", value, "qrImage");
+            return (Criteria) this;
+        }
+
+        public Criteria andQrImageNotEqualTo(String value) {
+            addCriterion("qr_image <>", value, "qrImage");
+            return (Criteria) this;
+        }
+
+        public Criteria andQrImageGreaterThan(String value) {
+            addCriterion("qr_image >", value, "qrImage");
+            return (Criteria) this;
+        }
+
+        public Criteria andQrImageGreaterThanOrEqualTo(String value) {
+            addCriterion("qr_image >=", value, "qrImage");
+            return (Criteria) this;
+        }
+
+        public Criteria andQrImageLessThan(String value) {
+            addCriterion("qr_image <", value, "qrImage");
+            return (Criteria) this;
+        }
+
+        public Criteria andQrImageLessThanOrEqualTo(String value) {
+            addCriterion("qr_image <=", value, "qrImage");
+            return (Criteria) this;
+        }
+
+        public Criteria andQrImageLike(String value) {
+            addCriterion("qr_image like", value, "qrImage");
+            return (Criteria) this;
+        }
+
+        public Criteria andQrImageNotLike(String value) {
+            addCriterion("qr_image not like", value, "qrImage");
+            return (Criteria) this;
+        }
+
+        public Criteria andQrImageIn(List<String> values) {
+            addCriterion("qr_image in", values, "qrImage");
+            return (Criteria) this;
+        }
+
+        public Criteria andQrImageNotIn(List<String> values) {
+            addCriterion("qr_image not in", values, "qrImage");
+            return (Criteria) this;
+        }
+
+        public Criteria andQrImageBetween(String value1, String value2) {
+            addCriterion("qr_image between", value1, value2, "qrImage");
+            return (Criteria) this;
+        }
+
+        public Criteria andQrImageNotBetween(String value1, String value2) {
+            addCriterion("qr_image not between", value1, value2, "qrImage");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealNameIsNull() {
+            addCriterion("real_name is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealNameIsNotNull() {
+            addCriterion("real_name is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealNameEqualTo(String value) {
+            addCriterion("real_name =", value, "realName");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealNameNotEqualTo(String value) {
+            addCriterion("real_name <>", value, "realName");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealNameGreaterThan(String value) {
+            addCriterion("real_name >", value, "realName");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealNameGreaterThanOrEqualTo(String value) {
+            addCriterion("real_name >=", value, "realName");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealNameLessThan(String value) {
+            addCriterion("real_name <", value, "realName");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealNameLessThanOrEqualTo(String value) {
+            addCriterion("real_name <=", value, "realName");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealNameLike(String value) {
+            addCriterion("real_name like", value, "realName");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealNameNotLike(String value) {
+            addCriterion("real_name not like", value, "realName");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealNameIn(List<String> values) {
+            addCriterion("real_name in", values, "realName");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealNameNotIn(List<String> values) {
+            addCriterion("real_name not in", values, "realName");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealNameBetween(String value1, String value2) {
+            addCriterion("real_name between", value1, value2, "realName");
+            return (Criteria) this;
+        }
+
+        public Criteria andRealNameNotBetween(String value1, String value2) {
+            addCriterion("real_name not between", value1, value2, "realName");
+            return (Criteria) this;
+        }
+
         public Criteria andStatusIsNull() {
             addCriterion("`status` is null");
             return (Criteria) this;

+ 23 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/vo/IdNameVO.java

@@ -0,0 +1,23 @@
+package com.tzld.piaoquan.api.model.vo;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.Objects;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class IdNameVO<T> {
+    private T id;
+    private String name;
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        IdNameVO<?> idNameVO = (IdNameVO<?>) o;
+        return Objects.equals(id, idNameVO.id);
+    }
+}

+ 18 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/vo/contentplatform/AccountQrCodeVO.java

@@ -0,0 +1,18 @@
+package com.tzld.piaoquan.api.model.vo.contentplatform;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class AccountQrCodeVO {
+    @ApiModelProperty(value = "uuid")
+    private String uuid;
+    @ApiModelProperty(value = "登录二维码")
+    private String qrcode;
+    @ApiModelProperty(value = "登录二维码Base64编码")
+    private String qrcodeBase64;
+    @ApiModelProperty(value = "登录二维码key")
+    private String Key;
+    @ApiModelProperty(value = "过期时间")
+    private Long ttl;
+}

+ 25 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/vo/wecom/thirdpart/CheckPushAccountExistVO.java

@@ -0,0 +1,25 @@
+package com.tzld.piaoquan.api.model.vo.wecom.thirdpart;
+
+import com.tzld.piaoquan.api.model.vo.IdNameVO;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class CheckPushAccountExistVO {
+    @ApiModelProperty(value = "校验是否通过 ,true 校验通过,false 校验不通过")
+    private Boolean pass = true;
+    @ApiModelProperty(value = "校验不通过的群列表")
+    private List<Room> notExistRooms;
+
+    @Data
+    public static class Room {
+        @ApiModelProperty(value = "群ID")
+        private Long roomId;
+        @ApiModelProperty(value = "群名称")
+        private String name;
+        @ApiModelProperty(value = "校验不通过的推送人员列表")
+        private List<IdNameVO<Long>> notExistPushAccounts;
+    }
+}

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

@@ -0,0 +1,21 @@
+package com.tzld.piaoquan.api.model.vo.wecom.thirdpart;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class ThirdPartyAccountConfigTaskContentVO {
+
+    @ApiModelProperty(value = "id")
+    private String id;
+    @ApiModelProperty(value = "类型 0-文案 1-小程序")
+    private Integer type;
+    @ApiModelProperty(value = "文案内容")
+    private String content;
+    @ApiModelProperty(value = "小程序来源 0-热榜 1-标签 2-账号")
+    private Integer source;
+    @ApiModelProperty(value = "小程序来源内容 (标签/账号id)")
+    private String sourceContent;
+    @ApiModelProperty(value = "顺序")
+    private Integer seq;
+}

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

@@ -0,0 +1,23 @@
+package com.tzld.piaoquan.api.model.vo.wecom.thirdpart;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class ThirdPartyAccountConfigTaskVO {
+
+    @ApiModelProperty(value = "id")
+    private String id;
+    @ApiModelProperty(value = "是否开启(0否,1是)")
+    private Integer switchFlag;
+    @ApiModelProperty(value = "发送时间")
+    private List<String> sendTime;
+    @ApiModelProperty(value = "随机浮动分钟")
+    private Integer randomMin;
+    @ApiModelProperty(value = "顺序")
+    private Integer seq;
+    @ApiModelProperty(value = "发送内容列表")
+    private List<ThirdPartyAccountConfigTaskContentVO> contentList;
+}

+ 37 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/vo/wecom/thirdpart/ThirdPartyAccountConfigVO.java

@@ -0,0 +1,37 @@
+package com.tzld.piaoquan.api.model.vo.wecom.thirdpart;
+
+import com.tzld.piaoquan.api.model.vo.IdNameVO;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class ThirdPartyAccountConfigVO {
+
+    @ApiModelProperty(value = "id")
+    private String id;
+    @ApiModelProperty(value = "投放场景")
+    private String putScene;
+    @ApiModelProperty(value = "渠道")
+    private String channel;
+    @ApiModelProperty(value = "是否开启(0否,1是)")
+    private Integer switchFlag;
+    @ApiModelProperty(value = "推送触发人数")
+    private Integer openRoomSendSwitchNum;
+    @ApiModelProperty(value = "主推送人员")
+    private Long primaryThirdStaffId;
+    @ApiModelProperty(value = "主推送人员名称")
+    private String primaryThirdStaffName;
+    @ApiModelProperty(value = "次推送人员")
+    private Long secondThirdStaffId;
+    @ApiModelProperty(value = "次推送人员名称")
+    private String secondThirdStaffName;
+    @ApiModelProperty(value = "任务列表")
+    private List<ThirdPartyAccountConfigTaskVO> taskList;
+    @ApiModelProperty(value = "配置同步 0-仅对新建群生效 1-所有群 2-指定群生效")
+    private Integer configSync;
+    @ApiModelProperty(value = "指定群生效列表")
+    private List<IdNameVO<Long>> configSyncRoomIdList;
+
+}

+ 31 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/vo/wecom/thirdpart/ThirdPartyAccountVO.java

@@ -0,0 +1,31 @@
+package com.tzld.piaoquan.api.model.vo.wecom.thirdpart;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class ThirdPartyAccountVO {
+
+    @ApiModelProperty(value = "ID")
+    private Long id;
+    @ApiModelProperty(value = "企业名称")
+    private String corpName;
+    @ApiModelProperty(value = "账号名称")
+    private String accountName;
+    @ApiModelProperty(value = "账号实名人")
+    private String realName;
+    @ApiModelProperty(value = "手机号")
+    private String mobile;
+    @ApiModelProperty(value = "账号状态(0正常,1掉线,2离线)")
+    private Integer status;
+    @ApiModelProperty(value = "名片")
+    private String qrImage;
+
+    @ApiModelProperty(value = "三方用户id")
+    private Long thirdStaffId;
+    @ApiModelProperty(value = "三方uuid")
+    private String thirdUuid;
+    @ApiModelProperty(value = "头像")
+    private String avatar;
+
+}

+ 19 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/vo/wecom/thirdpart/ThirdPartyRoomConfigTaskContentVO.java

@@ -0,0 +1,19 @@
+package com.tzld.piaoquan.api.model.vo.wecom.thirdpart;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class ThirdPartyRoomConfigTaskContentVO {
+
+    @ApiModelProperty(value = "类型 0-文案 1-小程序")
+    private Integer type;
+    @ApiModelProperty(value = "文案内容")
+    private String content;
+    @ApiModelProperty(value = "小程序来源 0-热榜 1-标签 2-账号")
+    private Integer source;
+    @ApiModelProperty(value = "小程序来源内容 (标签/账号id)")
+    private String sourceContent;
+    @ApiModelProperty(value = "顺序")
+    private Integer seq;
+}

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

@@ -0,0 +1,21 @@
+package com.tzld.piaoquan.api.model.vo.wecom.thirdpart;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class ThirdPartyRoomConfigTaskVO {
+
+    @ApiModelProperty(value = "是否开启(0否,1是)")
+    private Integer switchFlag;
+    @ApiModelProperty(value = "发送时间")
+    private List<String> sendTime;
+    @ApiModelProperty(value = "随机浮动分钟")
+    private Integer randomMin;
+    @ApiModelProperty(value = "顺序")
+    private Integer seq;
+    @ApiModelProperty(value = "发送内容列表")
+    private List<ThirdPartyRoomConfigTaskContentVO> contentList;
+}

+ 30 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/vo/wecom/thirdpart/ThirdPartyRoomConfigVO.java

@@ -0,0 +1,30 @@
+package com.tzld.piaoquan.api.model.vo.wecom.thirdpart;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class ThirdPartyRoomConfigVO {
+
+    @ApiModelProperty(value = "投放场景")
+    private String putScene;
+    @ApiModelProperty(value = "渠道")
+    private String channel;
+    @ApiModelProperty(value = "是否开启(0否,1是)")
+    private Integer switchFlag;
+    @ApiModelProperty(value = "推送触发人数")
+    private Integer openRoomSendSwitchNum;
+    @ApiModelProperty(value = "主推送人员")
+    private Long primaryThirdStaffId;
+    @ApiModelProperty(value = "主推送人员名称")
+    private String primaryThirdStaffName;
+    @ApiModelProperty(value = "次推送人员")
+    private Long secondThirdStaffId;
+    @ApiModelProperty(value = "次推送人员名称")
+    private String secondThirdStaffName;
+    @ApiModelProperty(value = "任务列表")
+    private List<ThirdPartyRoomConfigTaskVO> taskList;
+
+}

+ 25 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/vo/wecom/thirdpart/ThirdPartyRoomVO.java

@@ -0,0 +1,25 @@
+package com.tzld.piaoquan.api.model.vo.wecom.thirdpart;
+
+import com.tzld.piaoquan.api.model.vo.IdNameVO;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class ThirdPartyRoomVO {
+
+    @ApiModelProperty(value = "ID")
+    private Long id;
+    @ApiModelProperty(value = "企业名称")
+    private String corpName;
+    @ApiModelProperty(value = "群名称")
+    private String roomName;
+    @ApiModelProperty(value = "群主")
+    private String groupLeaderName;
+    @ApiModelProperty(value = "推送人员")
+    private List<IdNameVO<Long>> pushAccountNameList;
+    @ApiModelProperty(value = "群人数")
+    private Integer memberCount;
+
+}

+ 1 - 2
api-module/src/main/java/com/tzld/piaoquan/api/service/impl/CgiReplyServiceImpl.java

@@ -22,7 +22,6 @@ import com.tzld.piaoquan.growth.common.model.po.CgiReplyBucketData;
 import com.tzld.piaoquan.growth.common.model.po.CgiReplyBucketDataExample;
 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.LarkRobotUtil;
 import com.tzld.piaoquan.growth.common.utils.RedisUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -69,7 +68,7 @@ public class CgiReplyServiceImpl implements CgiReplyService {
         example.createCriteria().andGhIdEqualTo(ghId).andIsDeleteEqualTo(0);
         List<GhDetail> ghDetails = ghDetailMapper.selectByExample(example);
         if (CollectionUtils.isEmpty(ghDetails)) {
-            LarkRobotUtil.sendMessage("公众号信息查询失败 ghId=" + ghId);
+            //LarkRobotUtil.sendMessage("公众号信息查询失败 ghId=" + ghId);
             return null;
         }
         GhDetail ghDetail = ghDetails.get(0);

+ 1 - 1
api-module/src/main/java/com/tzld/piaoquan/api/service/ThirdPartyService.java → api-module/src/main/java/com/tzld/piaoquan/api/service/wecom/ThirdPartyService.java

@@ -1,4 +1,4 @@
-package com.tzld.piaoquan.api.service;
+package com.tzld.piaoquan.api.service.wecom;
 
 
 import com.tzld.piaoquan.api.model.vo.PushMessageParam;

+ 1 - 1
api-module/src/main/java/com/tzld/piaoquan/api/service/WeComAutoReply.java → api-module/src/main/java/com/tzld/piaoquan/api/service/wecom/WeComAutoReply.java

@@ -1,4 +1,4 @@
-package com.tzld.piaoquan.api.service;
+package com.tzld.piaoquan.api.service.wecom;
 
 public interface WeComAutoReply {
 

+ 1 - 1
api-module/src/main/java/com/tzld/piaoquan/api/service/WeComService.java → api-module/src/main/java/com/tzld/piaoquan/api/service/wecom/WeComService.java

@@ -1,4 +1,4 @@
-package com.tzld.piaoquan.api.service;
+package com.tzld.piaoquan.api.service.wecom;
 
 
 

+ 2 - 2
api-module/src/main/java/com/tzld/piaoquan/api/service/impl/ThirdPartyServiceImpl.java → api-module/src/main/java/com/tzld/piaoquan/api/service/wecom/impl/ThirdPartyServiceImpl.java

@@ -1,4 +1,4 @@
-package com.tzld.piaoquan.api.service.impl;
+package com.tzld.piaoquan.api.service.wecom.impl;
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
@@ -13,7 +13,7 @@ import com.tzld.piaoquan.api.model.vo.PushMessageParam;
 import com.tzld.piaoquan.api.model.vo.PushMessageVo;
 import com.tzld.piaoquan.api.model.vo.ReportUvVo;
 import com.tzld.piaoquan.api.service.GhAccessTokenService;
-import com.tzld.piaoquan.api.service.ThirdPartyService;
+import com.tzld.piaoquan.api.service.wecom.ThirdPartyService;
 import com.tzld.piaoquan.api.service.strategy.ReplyStrategyService;
 import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
 import com.tzld.piaoquan.growth.common.common.constant.TimeConstant;

+ 3 - 5
api-module/src/main/java/com/tzld/piaoquan/api/service/impl/WeComAutoReplyImpl.java → api-module/src/main/java/com/tzld/piaoquan/api/service/wecom/impl/WeComAutoReplyImpl.java

@@ -1,4 +1,4 @@
-package com.tzld.piaoquan.api.service.impl;
+package com.tzld.piaoquan.api.service.wecom.impl;
 
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
@@ -6,8 +6,8 @@ import com.tzld.piaoquan.api.dao.mapper.AutoReplyMsgSendRecordMapper;
 import com.tzld.piaoquan.api.model.bo.MsgData;
 import com.tzld.piaoquan.api.model.po.AutoReplyMsgSendRecord;
 import com.tzld.piaoquan.api.model.vo.WeComPushMessageVo;
-import com.tzld.piaoquan.api.service.WeComAutoReply;
-import com.tzld.piaoquan.api.service.WeComService;
+import com.tzld.piaoquan.api.service.wecom.WeComAutoReply;
+import com.tzld.piaoquan.api.service.wecom.WeComService;
 import com.tzld.piaoquan.growth.common.component.HttpPoolClient;
 import com.tzld.piaoquan.growth.common.dao.mapper.CorpMapper;
 import com.tzld.piaoquan.growth.common.model.bo.MsgResult;
@@ -20,11 +20,9 @@ import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
-import org.springframework.util.StringUtils;
 
 import java.util.ArrayList;
 import java.util.List;
-import java.util.Objects;
 import java.util.Random;
 
 @Slf4j

+ 2 - 3
api-module/src/main/java/com/tzld/piaoquan/api/service/impl/WeComServiceImpl.java → api-module/src/main/java/com/tzld/piaoquan/api/service/wecom/impl/WeComServiceImpl.java

@@ -1,9 +1,8 @@
-package com.tzld.piaoquan.api.service.impl;
+package com.tzld.piaoquan.api.service.wecom.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;
@@ -15,7 +14,7 @@ import com.tzld.piaoquan.api.model.po.ReplyStaff;
 import com.tzld.piaoquan.api.model.po.ReplyStaffExample;
 import com.tzld.piaoquan.api.model.vo.WeComPushMessageParam;
 import com.tzld.piaoquan.api.model.vo.WeComPushMessageVo;
-import com.tzld.piaoquan.api.service.WeComService;
+import com.tzld.piaoquan.api.service.wecom.WeComService;
 import com.tzld.piaoquan.api.service.strategy.ReplyStrategyService;
 import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
 import com.tzld.piaoquan.growth.common.common.enums.ExceptionCodeEnum;

+ 37 - 0
api-module/src/main/java/com/tzld/piaoquan/api/service/wecom/thirdparty/WeComThirdPartyAccountService.java

@@ -0,0 +1,37 @@
+package com.tzld.piaoquan.api.service.wecom.thirdparty;
+
+import com.tzld.piaoquan.api.model.param.wecom.thirdpart.*;
+import com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffConfig;
+import com.tzld.piaoquan.api.model.vo.IdNameVO;
+import com.tzld.piaoquan.api.model.vo.contentplatform.AccountQrCodeVO;
+import com.tzld.piaoquan.api.model.vo.wecom.thirdpart.CheckPushAccountExistVO;
+import com.tzld.piaoquan.api.model.vo.wecom.thirdpart.ThirdPartyAccountConfigVO;
+import com.tzld.piaoquan.api.model.vo.wecom.thirdpart.ThirdPartyAccountVO;
+import com.tzld.piaoquan.growth.common.utils.page.Page;
+
+import java.util.List;
+
+public interface WeComThirdPartyAccountService {
+
+    AccountQrCodeVO getQrCode(Long id);
+
+    Integer checkLogin(String uuid);
+
+    void setCheckCode(CheckCodeRequest param);
+
+    Page<ThirdPartyAccountVO> list(ThirdPartyAccountListParam param);
+
+    List<IdNameVO<Long>> getPushAccountList(Long accountId, String name);
+
+    ThirdPartyAccountConfigVO getAccountConfig(ThirdPartyConfigGetParam param);
+
+    CheckPushAccountExistVO checkPushAccountExist(ThirdPartyAccountConfigParam param);
+
+    void saveAccountConfig(ThirdPartyAccountConfigParam param);
+
+    void logout(ThirdPartyAccountLogOutParam param);
+
+    List<ThirdPartWeComStaffConfig> getStaffConfigListByStaffIds(List<Long> staffIdList);
+
+    void initAccountConfig();
+}

+ 13 - 0
api-module/src/main/java/com/tzld/piaoquan/api/service/wecom/thirdparty/WeComThirdPartyCallBackService.java

@@ -0,0 +1,13 @@
+package com.tzld.piaoquan.api.service.wecom.thirdparty;
+
+import com.tzld.piaoquan.api.model.param.wecom.thirdpart.WeComThirdPartyCallBackParam;
+
+public interface WeComThirdPartyCallBackService {
+
+    /**
+     * 处理回调
+     *
+     * @param param
+     */
+    void handleCallback(WeComThirdPartyCallBackParam param);
+}

+ 45 - 0
api-module/src/main/java/com/tzld/piaoquan/api/service/wecom/thirdparty/WeComThirdPartyRoomService.java

@@ -0,0 +1,45 @@
+package com.tzld.piaoquan.api.service.wecom.thirdparty;
+
+import com.tzld.piaoquan.api.model.param.wecom.thirdpart.ThirdPartyAccountConfigParam;
+import com.tzld.piaoquan.api.model.param.wecom.thirdpart.ThirdPartyConfigGetParam;
+import com.tzld.piaoquan.api.model.param.wecom.thirdpart.ThirdPartyRoomConfigParam;
+import com.tzld.piaoquan.api.model.param.wecom.thirdpart.ThirdPartyRoomListParam;
+import com.tzld.piaoquan.api.model.po.wecom.thirdpart.*;
+import com.tzld.piaoquan.api.model.vo.IdNameVO;
+import com.tzld.piaoquan.api.model.vo.wecom.thirdpart.ThirdPartyAccountConfigVO;
+import com.tzld.piaoquan.api.model.vo.wecom.thirdpart.ThirdPartyRoomConfigVO;
+import com.tzld.piaoquan.api.model.vo.wecom.thirdpart.ThirdPartyRoomVO;
+import com.tzld.piaoquan.growth.common.utils.page.Page;
+
+import java.util.List;
+
+public interface WeComThirdPartyRoomService {
+
+    Page<ThirdPartyRoomVO> list(ThirdPartyRoomListParam param);
+
+    List<IdNameVO<Long>> getPushAccountList(Long roomId, String name);
+
+    ThirdPartyRoomConfigVO getRoomConfig(ThirdPartyConfigGetParam param);
+
+    List<ThirdPartWeComStaff> getRoomConfigPushList(List<ThirdPartWeComRoomConfig> configList);
+
+    List<ThirdPartWeComRoomConfigTask> getRoomConfigTasks(List<String> configIds);
+
+    List<ThirdPartWeComRoomConfigTaskContent> getRoomConfigTaskContents(List<String> taskIds);
+
+    void saveRoomConfig(ThirdPartyRoomConfigParam param, String accountConfigId);
+
+    List<ThirdPartWeComRoomUser> getRoomUserListByRoomId(String thirdRoomId);
+
+    List<ThirdPartWeComRoomUser> getRoomUserListByRoomIds(List<String> thirdRoomIds);
+
+    void saveRoomConfig(ThirdPartWeComRoom room, String accountConfigId, ThirdPartyAccountConfigParam param);
+
+    void saveRoomConfig(ThirdPartWeComRoom room, String accountConfigId, ThirdPartyAccountConfigVO configVO);
+
+    List<ThirdPartWeComRoomConfig> getRoomConfigListByRoomIds(List<Long> roomIds);
+
+    List<ThirdPartWeComRoom> getRoomListByRoomIds(List<Long> roomIds);
+
+    List<ThirdPartWeComRoomConfig> getAccountConfigRoomConfigList(String accountConfigId);
+}

+ 20 - 3
api-module/src/main/java/com/tzld/piaoquan/api/service/WeComThirdPartyService.java → api-module/src/main/java/com/tzld/piaoquan/api/service/wecom/thirdparty/WeComThirdPartyService.java

@@ -1,6 +1,7 @@
-package com.tzld.piaoquan.api.service;
+package com.tzld.piaoquan.api.service.wecom.thirdparty;
 
 import com.tzld.piaoquan.api.model.param.wecom.thirdpart.*;
+import com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComCorp;
 import com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoom;
 import com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaff;
 
@@ -20,6 +21,10 @@ public interface WeComThirdPartyService {
 
     LoginInfo getRunClientByUuid(UuidRequest request);
 
+    void saveStaffQrCode(String uuid);
+
+    List<ThirdPartWeComCorp> getCorpListByIds(List<Long> ids);
+
     List<GetInnerContactsResponse.ContactItem> getInnerContacts(GetInnerContactsRequest request);
 
     List<ExternalContactsResponse.ContactItem> getExternalContacts(GetExternalContactsRequest request);
@@ -30,7 +35,9 @@ public interface WeComThirdPartyService {
 
     CdnUploadImgLinkResponse cdnUploadImgLink(CdnUploadImgLinkRequest request);
 
-    void sendAppMsg(SendAppMsgRequest request);
+    CommonResponse<SendAppMsgResponse> sendAppMsg(ThirdPartWeComStaff staff, ThirdPartWeComRoom room, SendAppMsgRequest request);
+
+    CommonResponse<SendTextMsgResponse> sendTextMsg(ThirdPartWeComStaff staff, ThirdPartWeComRoom room, SendTextMsgRequest request);
 
     List<ThirdPartWeComStaff> getActiveStaffList();
 
@@ -50,11 +57,21 @@ public interface WeComThirdPartyService {
 
     CommonResponse<String> invitationToRoom(InvitationToRoomRequest request);
 
-    ThirdPartWeComRoom getRoomByRoomId(Long roomid);
+    ThirdPartWeComRoom getRoomByThirdRoomId(Long roomId);
+
+    List<ThirdPartWeComRoom> getRoomByRoomIds(List<Long> roomIds);
+
+    ThirdPartWeComStaff getStaffById(Long id);
+
+    List<ThirdPartWeComStaff> getStaffByIds(List<Long> ids);
 
     ThirdPartWeComStaff getStaffByUuid(String uuid);
 
+    List<ThirdPartWeComStaff> getStaffListByThirdStaffIds(List<Long> thirdStaffIds);
+
     void updateStaffStatus(UpdateStaffStatusRequest request);
 
     void updateAutoCreateRoomStatus(UpdateAutoCreateRoomStatusRequest request);
+
+    ThirdPartWeComRoom getRoomById(Long roomId);
 }

+ 538 - 0
api-module/src/main/java/com/tzld/piaoquan/api/service/wecom/thirdparty/impl/WeComThirdPartyAccountServiceImpl.java

@@ -0,0 +1,538 @@
+package com.tzld.piaoquan.api.service.wecom.thirdparty.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.alibaba.fastjson.TypeReference;
+import com.ctrip.framework.apollo.spring.annotation.ApolloJsonValue;
+import com.tzld.piaoquan.api.common.Constant;
+import com.tzld.piaoquan.api.common.enums.ExceptionEnum;
+import com.tzld.piaoquan.api.common.enums.wecom.ConfigSyncEnum;
+import com.tzld.piaoquan.api.common.enums.wecom.ConfigTaskContentTypeEnum;
+import com.tzld.piaoquan.api.common.enums.wecom.ThirdPartWeComStaffStatusEnum;
+import com.tzld.piaoquan.api.common.enums.wecom.WeComThirdPartyCallBackTypeEnum;
+import com.tzld.piaoquan.api.common.exception.CommonException;
+import com.tzld.piaoquan.api.component.WeComThirdPartyApiClient;
+import com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ThirdPartWeComStaffConfigMapper;
+import com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ThirdPartWeComStaffConfigTaskContentMapper;
+import com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ThirdPartWeComStaffConfigTaskMapper;
+import com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ThirdPartWeComStaffMapper;
+import com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ext.ThirdPartWeComRoomMapperExt;
+import com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ext.ThirdPartWeComStaffMapperExt;
+import com.tzld.piaoquan.api.model.param.wecom.thirdpart.*;
+import com.tzld.piaoquan.api.model.po.wecom.thirdpart.*;
+import com.tzld.piaoquan.api.model.vo.IdNameVO;
+import com.tzld.piaoquan.api.model.vo.contentplatform.AccountQrCodeVO;
+import com.tzld.piaoquan.api.model.vo.wecom.thirdpart.*;
+import com.tzld.piaoquan.api.service.wecom.thirdparty.WeComThirdPartyAccountService;
+import com.tzld.piaoquan.api.service.wecom.thirdparty.WeComThirdPartyRoomService;
+import com.tzld.piaoquan.api.service.wecom.thirdparty.WeComThirdPartyService;
+import com.tzld.piaoquan.growth.common.utils.DistributedIdGenerator;
+import com.tzld.piaoquan.growth.common.utils.RedisUtils;
+import com.tzld.piaoquan.growth.common.utils.page.Page;
+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.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+
+import java.util.*;
+import java.util.stream.Collectors;
+
+@Slf4j
+@Service
+public class WeComThirdPartyAccountServiceImpl implements WeComThirdPartyAccountService {
+
+    @Autowired
+    private WeComThirdPartyApiClient apiClient;
+    @Autowired
+    private WeComThirdPartyService weComThirdPartyService;
+    @Autowired
+    private WeComThirdPartyRoomService roomService;
+    @Autowired
+    private ThirdPartWeComStaffMapper staffMapper;
+    @Autowired
+    private ThirdPartWeComStaffConfigMapper staffConfigMapper;
+    @Autowired
+    private ThirdPartWeComStaffConfigTaskMapper staffConfigTaskMapper;
+    @Autowired
+    private ThirdPartWeComStaffConfigTaskContentMapper staffConfigTaskContentMapper;
+    @Autowired
+    private ThirdPartWeComStaffMapperExt staffMapperExt;
+    @Autowired
+    private ThirdPartWeComRoomMapperExt roomMapperExt;
+
+    @Autowired
+    private RedisUtils redisUtils;
+
+    @Value("${wecom.thirdpart.callback.url:https://test-tp-open.piaoquantv.com/wecom/thirdparty/callback}")
+    private String callbackUrl;
+    @ApolloJsonValue("${send.room.msg.staff.put.scene.config:{}}")
+    private Map<Long, String> staffPutSceneConfig;
+    @ApolloJsonValue("${send.room.msg.staff.channel.config:{}}")
+    private Map<Long, String> staffChannelConfig;
+    @ApolloJsonValue("${send.room.msg.auto.open.staff:[]}")
+    private List<Long> autoOpenStaffList;
+
+    @Override
+    public AccountQrCodeVO getQrCode(Long id) {
+        InitRequest initRequest = new InitRequest();
+        if (Objects.nonNull(id)) {
+            ThirdPartWeComStaff staff = weComThirdPartyService.getStaffById(id);
+            if (Objects.isNull(staff)) {
+                throw new CommonException(ExceptionEnum.PARAM_ERROR.getCode(), "企微账号不存在");
+            }
+            initRequest.setVid(String.valueOf(staff.getThirdStaffId()));
+        }
+        initRequest.setProxySituation(0);
+        initRequest.setDeverType("ipad");
+        String initResponseStr = apiClient.init(initRequest);
+        CommonResponse<InitResponse> initResponse =
+                JSONObject.parseObject(initResponseStr, new TypeReference<CommonResponse<InitResponse>>() {});
+        String uuid = initResponse.getData().getUuid();
+        apiClient.setCallbackUrl(new SetCallbackUrlRequest(uuid, callbackUrl));
+        String qrCodeResponseStr = apiClient.getQrCode(new UuidRequest(uuid));
+        CommonResponse<QrCodeResponse> qrCodeResponse =
+                JSONObject.parseObject(qrCodeResponseStr, new TypeReference<CommonResponse<QrCodeResponse>>() {});
+        if (qrCodeResponse.getErrcode() != 0) {
+            log.error("WeComThirdPartyService get qr code failed, request: {}, response: {}", initRequest, qrCodeResponse);
+            return null;
+        }
+        // 置为待扫码状态
+        String loginStatusKey = Constant.loginStatusKey.replace("{uuid}", uuid);
+        redisUtils.set(loginStatusKey, String.valueOf(1), qrCodeResponse.getData().getTtl());
+
+        AccountQrCodeVO result = new AccountQrCodeVO();
+        result.setUuid(uuid);
+        result.setQrcode(qrCodeResponse.getData().getQrcode());
+        result.setQrcodeBase64(qrCodeResponse.getData().getQrcode_data());
+        result.setKey(qrCodeResponse.getData().getKey());
+        result.setTtl(qrCodeResponse.getData().getTtl());
+        return result;
+    }
+
+    @Override
+    public Integer checkLogin(String uuid) {
+        String loginStatusKey = Constant.loginStatusKey.replace("{uuid}", uuid);
+        Integer result = redisUtils.getInteger(loginStatusKey);
+        if (result == 0) {
+            ThirdPartWeComStaff staff = weComThirdPartyService.getStaffByUuid(uuid);
+            if (Objects.isNull(staff)) {
+                throw new CommonException(ExceptionEnum.PARAM_ERROR.getCode(), "企微账号不存在");
+            }
+            if (staff.getStatus() == ThirdPartWeComStaffStatusEnum.NORMAL.getVal()) {
+                return WeComThirdPartyCallBackTypeEnum.LOGIN_SUCCESS.getVal();
+            }
+        }
+        return result;
+    }
+
+    @Override
+    public void setCheckCode(CheckCodeRequest param) {
+        apiClient.checkCode(param);
+    }
+
+    @Override
+    public Page<ThirdPartyAccountVO> list(ThirdPartyAccountListParam param) {
+        Page<ThirdPartyAccountVO> result = new Page<>(param.getPageNum(), param.getPageSize());
+        int offset = (param.getPageNum() - 1) * param.getPageSize();
+        int count = staffMapperExt.getAccountCount(param);
+        result.setTotalSize(count);
+        if (count == 0) {
+            return result;
+        }
+        List<ThirdPartWeComStaff> staffList = staffMapperExt.getAccountList(param, offset, param.getPageSize());
+        List<ThirdPartyAccountVO> list = buildThirdPartyAccountVOList(staffList);
+        result.setObjs(list);
+        return result;
+    }
+
+    private List<ThirdPartyAccountVO> buildThirdPartyAccountVOList(List<ThirdPartWeComStaff> staffList) {
+        List<Long> corpIds = staffList.stream().map(ThirdPartWeComStaff::getCorpId).collect(Collectors.toList());
+        List<ThirdPartWeComCorp> corpList = weComThirdPartyService.getCorpListByIds(corpIds);
+        Map<Long, ThirdPartWeComCorp> corpMap = corpList.stream()
+                .collect(Collectors.toMap(ThirdPartWeComCorp::getId, corp -> corp));
+
+        List<ThirdPartyAccountVO> result = new ArrayList<>();
+        for (ThirdPartWeComStaff staff : staffList) {
+            ThirdPartyAccountVO vo = new ThirdPartyAccountVO();
+            vo.setId(staff.getId());
+            vo.setCorpName(corpMap.get(staff.getCorpId()).getName());
+            vo.setAccountName(staff.getName());
+            vo.setRealName(staff.getRealName());
+            vo.setMobile(staff.getMobile());
+            vo.setStatus(staff.getStatus());
+            vo.setQrImage(staff.getQrImage());
+            vo.setAvatar(staff.getAvatar());
+            vo.setThirdStaffId(staff.getThirdStaffId());
+            vo.setThirdUuid(staff.getThirdUuid());
+            result.add(vo);
+        }
+        return result;
+    }
+
+    @Override
+    public List<IdNameVO<Long>> getPushAccountList(Long accountId, String name) {
+        List<ThirdPartWeComStaff> pushStaffList = staffMapperExt.getPushStaffList(accountId, null, name);
+        List<Long> staffIds = new ArrayList<>();
+        return pushStaffList.stream().map(staff -> new IdNameVO<>(staff.getThirdStaffId(), staff.getName()))
+                .filter(staff -> {
+                    boolean res = !staffIds.contains(staff.getId());
+                    staffIds.add(staff.getId());
+                    return res;
+                })
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public ThirdPartyAccountConfigVO getAccountConfig(ThirdPartyConfigGetParam param) {
+        ThirdPartWeComStaffConfig config = getStaffConfig(param.getId());
+        if (Objects.isNull(config)) {
+            return null;
+        }
+        List<ThirdPartWeComStaff> pushStaffList = getStaffConfigPushList(config);
+        Map<Long, String> pushStaffMap = pushStaffList.stream()
+                .collect(Collectors.toMap(ThirdPartWeComStaff::getThirdStaffId, ThirdPartWeComStaff::getName));
+        List<ThirdPartWeComStaffConfigTask> taskList = getStaffConfigTasks(config.getId());
+        List<String> taskIds = taskList.stream().map(ThirdPartWeComStaffConfigTask::getId).collect(Collectors.toList());
+        List<ThirdPartWeComStaffConfigTaskContent> contentList = getStaffConfigTaskContents(taskIds);
+        Map<String, List<ThirdPartWeComStaffConfigTaskContent>> taskContentMap = contentList.stream()
+                .collect(Collectors.groupingBy(ThirdPartWeComStaffConfigTaskContent::getTaskId));
+        List<ThirdPartWeComRoomConfig> roomConfigList = roomService.getAccountConfigRoomConfigList(config.getId());
+        List<Long> roomIds = roomConfigList.stream().map(ThirdPartWeComRoomConfig::getRoomId).collect(Collectors.toList());
+        List<ThirdPartWeComRoom> roomList = roomService.getRoomListByRoomIds(roomIds);
+        List<IdNameVO<Long>> roomIdNameList = roomList.stream().map(room -> new IdNameVO<>(room.getId(), room.getName()))
+                .collect(Collectors.toList());
+        ThirdPartyAccountConfigVO result = new ThirdPartyAccountConfigVO();
+        result.setId(config.getId());
+        result.setPutScene(config.getPutScene());
+        result.setChannel(config.getChannel());
+        result.setSwitchFlag(config.getSwitchFlag());
+        result.setOpenRoomSendSwitchNum(config.getOpenRoomSendSwitchNum());
+        result.setConfigSync(config.getConfigSync());
+        result.setConfigSyncRoomIdList(roomIdNameList);
+        if (Objects.nonNull(config.getPrimaryThirdStaffId())) {
+            result.setPrimaryThirdStaffId(config.getPrimaryThirdStaffId());
+            result.setPrimaryThirdStaffName(pushStaffMap.get(config.getPrimaryThirdStaffId()));
+        }
+        if (Objects.nonNull(config.getSecondThirdStaffId())) {
+            result.setSecondThirdStaffId(config.getSecondThirdStaffId());
+            result.setSecondThirdStaffName(pushStaffMap.get(config.getSecondThirdStaffId()));
+        }
+        result.setTaskList(taskList.stream().map(task -> {
+            ThirdPartyAccountConfigTaskVO vo = new ThirdPartyAccountConfigTaskVO();
+            vo.setId(task.getId());
+            vo.setSwitchFlag(task.getSwitchFlag());
+            vo.setSendTime(JSONObject.parseArray(task.getSendTime(), String.class));
+            vo.setRandomMin(task.getRandomMin());
+            vo.setSeq(task.getSeq());
+            List<ThirdPartWeComStaffConfigTaskContent> contents = taskContentMap.get(task.getId());
+            vo.setContentList(contents.stream().map(content -> {
+                ThirdPartyAccountConfigTaskContentVO contentVO = new ThirdPartyAccountConfigTaskContentVO();
+                contentVO.setId(content.getId());
+                contentVO.setType(content.getType());
+                contentVO.setContent(content.getContent());
+                contentVO.setSource(content.getSource());
+                contentVO.setSourceContent(content.getSourceContent());
+                contentVO.setSeq(content.getSeq());
+                return contentVO;
+            }).collect(Collectors.toList()));
+            return vo;
+        }).collect(Collectors.toList()));
+        return result;
+    }
+
+    private List<ThirdPartWeComStaff> getStaffConfigPushList(ThirdPartWeComStaffConfig config) {
+        List<Long> thirdStaffIds = new ArrayList<>();
+        if (Objects.nonNull(config.getPrimaryThirdStaffId())) {
+            thirdStaffIds.add(config.getPrimaryThirdStaffId());
+        }
+        if (Objects.nonNull(config.getSecondThirdStaffId())) {
+            thirdStaffIds.add(config.getSecondThirdStaffId());
+        }
+        return weComThirdPartyService.getStaffListByThirdStaffIds(thirdStaffIds);
+    }
+
+    private ThirdPartWeComStaffConfig getStaffConfig(Long accountId) {
+        ThirdPartWeComStaffConfigExample example = new ThirdPartWeComStaffConfigExample();
+        example.createCriteria().andStaffIdEqualTo(accountId).andStatusEqualTo(1);
+        List<ThirdPartWeComStaffConfig> configs = staffConfigMapper.selectByExample(example);
+        if (configs.isEmpty()) {
+            return null;
+        }
+        return configs.get(0);
+    }
+
+    private List<ThirdPartWeComStaffConfigTask> getStaffConfigTasks(String configId) {
+        ThirdPartWeComStaffConfigTaskExample example = new ThirdPartWeComStaffConfigTaskExample();
+        example.createCriteria().andConfigIdEqualTo(configId);
+        return staffConfigTaskMapper.selectByExample(example);
+    }
+
+    private List<ThirdPartWeComStaffConfigTaskContent> getStaffConfigTaskContents(List<String> taskIds) {
+        ThirdPartWeComStaffConfigTaskContentExample example = new ThirdPartWeComStaffConfigTaskContentExample();
+        example.createCriteria().andTaskIdIn(taskIds);
+        return staffConfigTaskContentMapper.selectByExample(example);
+    }
+
+    @Override
+    public CheckPushAccountExistVO checkPushAccountExist(ThirdPartyAccountConfigParam param) {
+        List<ThirdPartWeComRoom> roomList = getNeedSyncRoomList(param);
+        if (CollectionUtils.isEmpty(roomList)) {
+            return new CheckPushAccountExistVO();
+        }
+        List<String> thirdRoomIds = roomList.stream().map(ThirdPartWeComRoom::getThirdRoomId).collect(Collectors.toList());
+        List<ThirdPartWeComRoomUser> roomUserList = roomService.getRoomUserListByRoomIds(thirdRoomIds);
+        Map<String, List<ThirdPartWeComRoomUser>> roomUserMap = roomUserList.stream().collect(Collectors.groupingBy(ThirdPartWeComRoomUser::getThirdRoomId));
+
+        CheckPushAccountExistVO result = new CheckPushAccountExistVO();
+        result.setNotExistRooms(new ArrayList<>());
+        for (ThirdPartWeComRoom room : roomList) {
+            List<IdNameVO<Long>> notExistPushAccounts = new ArrayList<>();
+            List<ThirdPartWeComRoomUser> roomUsers = roomUserMap.get(room.getThirdRoomId());
+            if (CollectionUtils.isNotEmpty(roomUsers)) {
+                List<Long> thirdStaffIds = roomUsers.stream().map(ThirdPartWeComRoomUser::getUin).collect(Collectors.toList());
+                if (!thirdStaffIds.contains(param.getPrimaryThirdStaffId())) {
+                    notExistPushAccounts.add(new IdNameVO<>(param.getPrimaryThirdStaffId(), param.getPrimaryThirdStaffName()));
+                }
+                if (Objects.nonNull(param.getSecondThirdStaffId()) && !thirdStaffIds.contains(param.getSecondThirdStaffId())) {
+                    notExistPushAccounts.add(new IdNameVO<>(param.getSecondThirdStaffId(), param.getSecondThirdStaffName()));
+                }
+            }
+            if (CollectionUtils.isNotEmpty(notExistPushAccounts)) {
+                CheckPushAccountExistVO.Room roomVO = new CheckPushAccountExistVO.Room();
+                roomVO.setRoomId(room.getId());
+                roomVO.setName(room.getName());
+                roomVO.setNotExistPushAccounts(notExistPushAccounts);
+                result.getNotExistRooms().add(roomVO);
+            }
+        }
+        if (CollectionUtils.isNotEmpty(result.getNotExistRooms())) {
+            result.setPass(false);
+        }
+        return result;
+    }
+
+    @Override
+    public void saveAccountConfig(ThirdPartyAccountConfigParam param) {
+        // check param
+        checkAccountConfigParam(param);
+        ThirdPartWeComStaffConfig config = getStaffConfig(param.getAccountId());
+        if (Objects.nonNull(config)) {
+            config.setStatus(0);
+            config.setUpdateTime(new Date());
+            staffConfigMapper.updateByPrimaryKey(config);
+        }
+        ThirdPartWeComStaffConfig newConfig = new ThirdPartWeComStaffConfig();
+        newConfig.setId(DistributedIdGenerator.generate());
+        newConfig.setStaffId(param.getAccountId());
+        newConfig.setPutScene(param.getPutScene());
+        newConfig.setChannel(param.getChannel());
+        newConfig.setSwitchFlag(param.getSwitchFlag());
+        newConfig.setOpenRoomSendSwitchNum(param.getOpenRoomSendSwitchNum());
+        newConfig.setPrimaryThirdStaffId(param.getPrimaryThirdStaffId());
+        newConfig.setSecondThirdStaffId(param.getSecondThirdStaffId());
+        newConfig.setStatus(1);
+        newConfig.setConfigSync(param.getConfigSync());
+        newConfig.setCreateTime(new Date());
+        newConfig.setUpdateTime(new Date());
+        staffConfigMapper.insert(newConfig);
+        for (ThirdPartyAccountConfigTaskParam taskParam : param.getTaskList()) {
+            ThirdPartWeComStaffConfigTask newTask = new ThirdPartWeComStaffConfigTask();
+            newTask.setId(DistributedIdGenerator.generate());
+            newTask.setConfigId(newConfig.getId());
+            newTask.setSwitchFlag(taskParam.getSwitchFlag());
+            newTask.setSendTime(JSONObject.toJSONString(taskParam.getSendTime()));
+            newTask.setRandomMin(taskParam.getRandomMin());
+            newTask.setSeq(taskParam.getSeq());
+            newTask.setCreateTime(new Date());
+            newTask.setUpdateTime(new Date());
+            staffConfigTaskMapper.insert(newTask);
+            for (ThirdPartyAccountConfigTaskContentParam taskContentParam : taskParam.getContentList()) {
+                ThirdPartWeComStaffConfigTaskContent newContent = new ThirdPartWeComStaffConfigTaskContent();
+                newContent.setId(DistributedIdGenerator.generate());
+                newContent.setTaskId(newTask.getId());
+                newContent.setType(taskContentParam.getType());
+                newContent.setContent(taskContentParam.getContent());
+                newContent.setSource(taskContentParam.getSource());
+                newContent.setSourceContent(taskContentParam.getSourceContent());
+                newContent.setSeq(taskContentParam.getSeq());
+                newContent.setCreateTime(new Date());
+                newContent.setUpdateTime(new Date());
+                staffConfigTaskContentMapper.insert(newContent);
+            }
+            // 任务开关关闭,账号下的群,任务同步关闭
+
+        }
+        // 配置同步
+        new Thread(() -> syncStaffConfigToRoom(param, newConfig.getId())).start();
+    }
+
+    private void syncStaffConfigToRoom(ThirdPartyAccountConfigParam param, String accountConfigId) {
+        List<ThirdPartWeComRoom> roomList = getNeedSyncRoomList(param);
+        syncConfig(param, accountConfigId, roomList);
+    }
+
+    private List<ThirdPartWeComRoom> getNeedSyncRoomList(ThirdPartyAccountConfigParam param) {
+        List<ThirdPartWeComRoom> roomList;
+        if (param.getConfigSync() == ConfigSyncEnum.ALL.getVal()) {
+            // 所有群
+            roomList = weComThirdPartyService.getStaffRoomList(param.getAccountId());
+        } else if (param.getConfigSync() == ConfigSyncEnum.SPECIFY.getVal()) {
+            // 指定群生效
+            roomList = weComThirdPartyService.getRoomByRoomIds(param.getConfigSyncRoomIdList());
+        } else {
+            roomList = new ArrayList<>();
+        }
+        List<Long> roomIds = roomList.stream().map(ThirdPartWeComRoom::getId).collect(Collectors.toList());
+        // 未配置群生效
+        List<ThirdPartWeComRoom> noConfigRoomList = roomMapperExt.getNoConfigRoomList(param.getAccountId());
+        noConfigRoomList.removeIf(room -> roomIds.contains(room.getId()));
+        roomList.addAll(noConfigRoomList);
+        return roomList;
+    }
+
+    private void syncConfig(ThirdPartyAccountConfigParam param, String accountConfigId, List<ThirdPartWeComRoom> roomList) {
+        if (CollectionUtils.isEmpty(roomList)) {
+            return;
+        }
+        for (ThirdPartWeComRoom room : roomList) {
+            try {
+                roomService.saveRoomConfig(room, accountConfigId, param);
+            } catch (Exception e) {
+                log.error("同步群配置失败, roomId: {}, accountConfigId: {}, errorMsg: {}", room.getId(), accountConfigId, e.getMessage());
+            }
+        }
+    }
+
+    private void checkAccountConfigParam(ThirdPartyAccountConfigParam param) {
+        if (Objects.isNull(param.getAccountId())) {
+            throw new CommonException(ExceptionEnum.PARAM_ERROR.getCode(), "账号id不能为空");
+        }
+        if (StringUtils.isBlank(param.getPutScene())) {
+            throw new CommonException(ExceptionEnum.PARAM_ERROR.getCode(), "推送场景不能为空");
+        }
+        if (Objects.isNull(param.getPrimaryThirdStaffId())) {
+            throw new CommonException(ExceptionEnum.PARAM_ERROR.getCode(), "主推送人员不能为空");
+        }
+        if (CollectionUtils.isEmpty(param.getTaskList())) {
+            throw new CommonException(ExceptionEnum.PARAM_ERROR.getCode(), "任务列表不能为空");
+        }
+        if (param.getConfigSync() == ConfigSyncEnum.SPECIFY.getVal() && CollectionUtils.isEmpty(param.getConfigSyncRoomIdList())) {
+            throw new CommonException(ExceptionEnum.PARAM_ERROR.getCode(), "指定群生效时,选定群列表不能为空");
+        }
+        List<String> timeList = new ArrayList<>();
+        for (ThirdPartyAccountConfigTaskParam task : param.getTaskList()) {
+            if (CollectionUtils.isEmpty(task.getSendTime())) {
+                throw new CommonException(ExceptionEnum.PARAM_ERROR.getCode(), "推送时间不能为空");
+            }
+            for (String sendTime : task.getSendTime()) {
+                if (timeList.contains(sendTime)) {
+                    throw new CommonException(ExceptionEnum.PARAM_ERROR.getCode(), "推送时间不能重复: " + sendTime);
+                } else {
+                    timeList.add(sendTime);
+                }
+            }
+            if (Objects.nonNull(task.getRandomMin())) {
+                if (task.getRandomMin() < 0) {
+                    throw new CommonException(ExceptionEnum.PARAM_ERROR.getCode(), "随机浮动分钟不能小于0");
+                } else if (task.getRandomMin() > 30) {
+                    throw new CommonException(ExceptionEnum.PARAM_ERROR.getCode(), "随机浮动分钟不能大于30");
+                }
+            }
+            if (CollectionUtils.isEmpty(task.getContentList()) || task.getContentList().size() > 3) {
+                throw new CommonException(ExceptionEnum.PARAM_ERROR.getCode(), "任务内容不能为空,最多3条");
+            }
+            for (ThirdPartyAccountConfigTaskContentParam content : task.getContentList()) {
+                if (Objects.isNull(content.getType())) {
+                    throw new CommonException(ExceptionEnum.PARAM_ERROR.getCode(), "任务内容类型不能为空");
+                }
+                if (content.getType() == ConfigTaskContentTypeEnum.TEXT.getVal()
+                        && StringUtils.isBlank(content.getContent())) {
+                    throw new CommonException(ExceptionEnum.PARAM_ERROR.getCode(), "文案不能为空");
+                } else if (content.getType() == ConfigTaskContentTypeEnum.MINI_PROGRAM.getVal()
+                        && Objects.isNull(content.getSource())) {
+                    throw new CommonException(ExceptionEnum.PARAM_ERROR.getCode(), "小程序来源不能为空");
+                }
+            }
+        }
+
+    }
+
+    @Override
+    public void logout(ThirdPartyAccountLogOutParam param) {
+        ThirdPartWeComStaff staff = weComThirdPartyService.getStaffById(param.getId());
+        if (Objects.isNull(staff)) {
+            throw new CommonException(ExceptionEnum.PARAM_ERROR.getCode(), "企微账号不存在");
+        }
+        String logoutResponseStr = apiClient.loginOut(new UuidRequest(staff.getThirdUuid()));
+        CommonResponse<LoginOutResponse> logoutResponse =
+                JSONObject.parseObject(logoutResponseStr, new TypeReference<CommonResponse<LoginOutResponse>>() {});
+        if (logoutResponse.getErrcode() != 0) {
+            log.error("WeComThirdPartyService logout failed, request: {}, response: {}", staff.getThirdUuid(), logoutResponse);
+            throw new CommonException(ExceptionEnum.THIRD_PART_LOGOUT_FAILED.getCode(), "企微账号退出失败");
+        }
+        staff.setStatus(ThirdPartWeComStaffStatusEnum.QUIT.getVal());
+        staff.setUpdateTime(new Date());
+        staffMapper.updateByPrimaryKey(staff);
+    }
+
+    @Override
+    public List<ThirdPartWeComStaffConfig> getStaffConfigListByStaffIds(List<Long> staffIdList) {
+        if (CollectionUtils.isEmpty(staffIdList)) {
+            return Collections.emptyList();
+        }
+        ThirdPartWeComStaffConfigExample example = new ThirdPartWeComStaffConfigExample();
+        example.createCriteria().andStaffIdIn(staffIdList).andStatusEqualTo(1);
+        return staffConfigMapper.selectByExample(example);
+    }
+
+    @Override
+    public void initAccountConfig() {
+        List<ThirdPartWeComStaff> staffList = staffMapper.selectByExample(new ThirdPartWeComStaffExample());
+        if (CollectionUtils.isEmpty(staffList)) {
+            return;
+        }
+        for (ThirdPartWeComStaff staff : staffList) {
+            ThirdPartyAccountConfigParam configParam = buildThirdPartyAccountConfigParam(staff);
+            saveAccountConfig(configParam);
+            if (staff.getStatus() == 0) {
+                apiClient.setCallbackUrl(new SetCallbackUrlRequest(staff.getThirdUuid(), callbackUrl));
+                weComThirdPartyService.saveStaffQrCode(staff.getThirdUuid());
+            }
+        }
+    }
+
+    private ThirdPartyAccountConfigParam buildThirdPartyAccountConfigParam(ThirdPartWeComStaff staff) {
+        ThirdPartyAccountConfigParam newConfig = new ThirdPartyAccountConfigParam();
+        newConfig.setAccountId(staff.getId());
+        newConfig.setPutScene(staffPutSceneConfig.getOrDefault(staff.getThirdStaffId(), "touliu"));
+        newConfig.setChannel(staffChannelConfig.getOrDefault(staff.getThirdStaffId(), "tencentqw"));
+        newConfig.setSwitchFlag(1);
+        if (autoOpenStaffList.contains(staff.getThirdStaffId())) {
+            newConfig.setOpenRoomSendSwitchNum(20);
+        }
+        newConfig.setPrimaryThirdStaffId(staff.getThirdStaffId());
+        newConfig.setConfigSync(1);
+
+        ThirdPartyAccountConfigTaskParam newTask = new ThirdPartyAccountConfigTaskParam();
+        newTask.setSwitchFlag(1);
+        List<String> sendTime = JSONObject.parseArray("[\"08:00\",\"11:00\",\"16:00\",\"21:00\"]", String.class);
+        newTask.setSendTime(sendTime);
+        newTask.setRandomMin(20);
+        newTask.setSeq(0);
+        newConfig.setTaskList(Collections.singletonList(newTask));
+
+        List<ThirdPartyAccountConfigTaskContentParam> contentList = new ArrayList<>();
+        for (int i = 0; i < 2; i++) {
+            ThirdPartyAccountConfigTaskContentParam newContent = new ThirdPartyAccountConfigTaskContentParam();
+            newContent.setType(1);
+            newContent.setSource(0);
+            newContent.setSeq(i);
+            contentList.add(newContent);
+        }
+        newTask.setContentList(contentList);
+
+        return newConfig;
+    }
+
+}

+ 84 - 0
api-module/src/main/java/com/tzld/piaoquan/api/service/wecom/thirdparty/impl/WeComThirdPartyCallBackServiceImpl.java

@@ -0,0 +1,84 @@
+package com.tzld.piaoquan.api.service.wecom.thirdparty.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.tzld.piaoquan.api.common.Constant;
+import com.tzld.piaoquan.api.common.enums.wecom.WeComThirdPartyCallBackTypeEnum;
+import com.tzld.piaoquan.api.component.WeComThirdPartyApiClient;
+import com.tzld.piaoquan.api.model.param.wecom.thirdpart.UuidRequest;
+import com.tzld.piaoquan.api.model.param.wecom.thirdpart.WeComThirdPartyCallBackParam;
+import com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaff;
+import com.tzld.piaoquan.api.service.wecom.thirdparty.WeComThirdPartyCallBackService;
+import com.tzld.piaoquan.api.service.wecom.thirdparty.WeComThirdPartyService;
+import com.tzld.piaoquan.growth.common.utils.LarkRobotUtil;
+import com.tzld.piaoquan.growth.common.utils.RedisUtils;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Slf4j
+@Service
+public class WeComThirdPartyCallBackServiceImpl implements WeComThirdPartyCallBackService {
+
+    @Autowired
+    private WeComThirdPartyApiClient apiClient;
+    @Autowired
+    private WeComThirdPartyService weComThirdPartyService;
+
+    @Autowired
+    private RedisUtils redisUtils;
+
+    @Override
+    public void handleCallback(WeComThirdPartyCallBackParam param) {
+        log.info("handleCallback param: {}", JSONObject.toJSONString(param));
+        WeComThirdPartyCallBackTypeEnum typeEnum = WeComThirdPartyCallBackTypeEnum.from(param.getType());
+        if (typeEnum == WeComThirdPartyCallBackTypeEnum.other) {
+            log.info("三方平台企微回调类型未处理:type={}, json={}", param.getType(), param.getJson());
+            return;
+        }
+        handle(param, typeEnum);
+    }
+
+    private void handle(WeComThirdPartyCallBackParam param, WeComThirdPartyCallBackTypeEnum typeEnum) {
+        if (typeEnum == WeComThirdPartyCallBackTypeEnum.LOGIN_SUCCESS) {
+            weComThirdPartyService.getRunClientByUuid(new UuidRequest(param.getUuid()));
+            String loginStatusKey = Constant.loginStatusKey.replace("{uuid}", param.getUuid());
+            redisUtils.set(loginStatusKey, String.valueOf(typeEnum.getVal()), 3600);
+            return;
+        } else if (typeEnum == WeComThirdPartyCallBackTypeEnum.SCAN_CODE
+                || typeEnum == WeComThirdPartyCallBackTypeEnum.CONFIRM_SCAN_CODE
+                || typeEnum == WeComThirdPartyCallBackTypeEnum.CANCEL_SCAN_CODE
+                || typeEnum == WeComThirdPartyCallBackTypeEnum.NEED_VERIFY_CODE) {
+            String loginStatusKey = Constant.loginStatusKey.replace("{uuid}", param.getUuid());
+            redisUtils.set(loginStatusKey, String.valueOf(typeEnum.getVal()), 300);
+            return;
+        }
+        JSONObject json = JSONObject.parseObject(param.getJson());
+        List<Integer> disconnectCallBackTypes = getDisconnectCallBackTypes();
+        if (disconnectCallBackTypes.contains(typeEnum.getVal())) {
+            ThirdPartWeComStaff staff = weComThirdPartyService.getStaffByUuid(param.getUuid());
+            if (staff == null) {
+                return;
+            }
+            LarkRobotUtil.sendWeComThirdPartMessage(
+                    "【账号掉线回调通知】\n" +
+                            "账号名称:" + staff.getName() + "\n" +
+                            "账号VID:" + staff.getThirdStaffId() + "\n" +
+                            "账号UUID:" + staff.getThirdUuid() + "\n" +
+                            "回调信息:" + json.toJSONString());
+            return;
+        }
+    }
+
+    private List<Integer> getDisconnectCallBackTypes() {
+        List<Integer> result = new ArrayList<>();
+        result.add(WeComThirdPartyCallBackTypeEnum.SECOND_VERIFY_NOTIFY.getVal());
+        result.add(WeComThirdPartyCallBackTypeEnum.LOGIN_END.getVal());
+        result.add(WeComThirdPartyCallBackTypeEnum.OTHER_DEVICE_LOGIN.getVal());
+        result.add(WeComThirdPartyCallBackTypeEnum.QR_CODE_SCAN_TIMEOUT.getVal());
+        result.add(WeComThirdPartyCallBackTypeEnum.EXCEPTION_DISCONNECT.getVal());
+        return result;
+    }
+}

+ 467 - 0
api-module/src/main/java/com/tzld/piaoquan/api/service/wecom/thirdparty/impl/WeComThirdPartyRoomServiceImpl.java

@@ -0,0 +1,467 @@
+package com.tzld.piaoquan.api.service.wecom.thirdparty.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.tzld.piaoquan.api.common.enums.ExceptionEnum;
+import com.tzld.piaoquan.api.common.enums.wecom.ConfigTaskContentTypeEnum;
+import com.tzld.piaoquan.api.common.exception.CommonException;
+import com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.*;
+import com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ext.ThirdPartWeComRoomMapperExt;
+import com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ext.ThirdPartWeComStaffMapperExt;
+import com.tzld.piaoquan.api.job.wecom.thirdpart.WeComSendMsgJob;
+import com.tzld.piaoquan.api.model.param.wecom.thirdpart.*;
+import com.tzld.piaoquan.api.model.po.wecom.thirdpart.*;
+import com.tzld.piaoquan.api.model.vo.IdNameVO;
+import com.tzld.piaoquan.api.model.vo.wecom.thirdpart.*;
+import com.tzld.piaoquan.api.service.wecom.thirdparty.WeComThirdPartyRoomService;
+import com.tzld.piaoquan.api.service.wecom.thirdparty.WeComThirdPartyService;
+import com.tzld.piaoquan.growth.common.utils.DateUtil;
+import com.tzld.piaoquan.growth.common.utils.DistributedIdGenerator;
+import com.tzld.piaoquan.growth.common.utils.page.Page;
+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;
+
+import java.util.*;
+import java.util.stream.Collectors;
+
+@Slf4j
+@Service
+public class WeComThirdPartyRoomServiceImpl implements WeComThirdPartyRoomService {
+
+    @Autowired
+    private WeComThirdPartyService weComThirdPartyService;
+    @Autowired
+    private WeComSendMsgJob weComSendMsgJob;
+    @Autowired
+    private ThirdPartWeComRoomMapper roomMapper;
+    @Autowired
+    private ThirdPartWeComRoomUserMapper roomUserMapper;
+    @Autowired
+    private ThirdPartWeComRoomConfigMapper roomConfigMapper;
+    @Autowired
+    private ThirdPartWeComRoomConfigTaskMapper roomConfigTaskMapper;
+    @Autowired
+    private ThirdPartWeComRoomConfigTaskContentMapper roomConfigTaskContentMapper;
+    @Autowired
+    private ThirdPartWeComStaffMapperExt staffMapperExt;
+    @Autowired
+    private ThirdPartWeComRoomMapperExt roomMapperExt;
+
+    @Override
+    public Page<ThirdPartyRoomVO> list(ThirdPartyRoomListParam param) {
+        Page<ThirdPartyRoomVO> result = new Page<>(param.getPageNum(), param.getPageSize());
+        int offset = (param.getPageNum() - 1) * param.getPageSize();
+        List<Long> pushAccountIds = null;
+        if (StringUtils.isNotBlank(param.getPushAccountName())) {
+            pushAccountIds = staffMapperExt.getStaffIdByName(param.getPushAccountName());
+            if (CollectionUtils.isEmpty(pushAccountIds)) {
+                result.setTotalSize(0);
+                return result;
+            }
+        }
+        int count = roomMapperExt.getRoomCount(param, pushAccountIds);
+        result.setTotalSize(count);
+        if (count == 0) {
+            return result;
+        }
+        List<ThirdPartWeComRoom> roomList = roomMapperExt.getRoomList(param, pushAccountIds, offset, param.getPageSize());
+        List<ThirdPartyRoomVO> list = buildThirdPartyRoomVOList(roomList);
+        result.setObjs(list);
+        return result;
+    }
+
+    private List<ThirdPartyRoomVO> buildThirdPartyRoomVOList(List<ThirdPartWeComRoom> roomList) {
+        List<Long> roomIds = roomList.stream().map(ThirdPartWeComRoom::getId).collect(Collectors.toList());
+        List<Long> corpIds = roomList.stream().map(ThirdPartWeComRoom::getCorpId).collect(Collectors.toList());
+        List<ThirdPartWeComCorp> corpList = weComThirdPartyService.getCorpListByIds(corpIds);
+        Map<Long, ThirdPartWeComCorp> corpMap = corpList.stream()
+                .collect(Collectors.toMap(ThirdPartWeComCorp::getId, corp -> corp));
+        List<Long> staffIds = roomList.stream().map(ThirdPartWeComRoom::getStaffId).collect(Collectors.toList());
+        List<ThirdPartWeComStaff> staffList = weComThirdPartyService.getStaffByIds(staffIds);
+        Map<Long, ThirdPartWeComStaff> staffMap = staffList.stream()
+                .collect(Collectors.toMap(ThirdPartWeComStaff::getId, staff -> staff));
+        List<ThirdPartWeComRoomConfig> roomConfigList = getRoomConfigList(roomIds);
+        Map<Long, ThirdPartWeComRoomConfig> roomConfigMap = roomConfigList.stream()
+                .collect(Collectors.toMap(ThirdPartWeComRoomConfig::getRoomId, config -> config));
+        List<ThirdPartWeComStaff> pushStaffList = getRoomConfigPushList(roomConfigList);
+        Map<Long, ThirdPartWeComStaff> pushStaffMap = pushStaffList.stream()
+                .collect(Collectors.toMap(ThirdPartWeComStaff::getThirdStaffId, staff -> staff));
+
+        List<ThirdPartyRoomVO> result = new ArrayList<>();
+        for (ThirdPartWeComRoom room : roomList) {
+            ThirdPartyRoomVO vo = new ThirdPartyRoomVO();
+            vo.setId(room.getId());
+            vo.setCorpName(corpMap.get(room.getCorpId()).getName());
+            vo.setRoomName(room.getName());
+            vo.setGroupLeaderName(staffMap.get(room.getStaffId()).getName());
+            ThirdPartWeComRoomConfig roomConfig = roomConfigMap.get(room.getId());
+            if (Objects.nonNull(roomConfig)) {
+                List<IdNameVO<Long>> pushAccountNameList = new ArrayList<>();
+                ThirdPartWeComStaff primaryStaff = pushStaffMap.get(roomConfig.getPrimaryThirdStaffId());
+                if (Objects.nonNull(primaryStaff)) {
+                    pushAccountNameList.add(new IdNameVO<>(primaryStaff.getThirdStaffId(), primaryStaff.getName()));
+                }
+                ThirdPartWeComStaff secondaryStaff = pushStaffMap.get(roomConfig.getSecondThirdStaffId());
+                if (Objects.nonNull(secondaryStaff)) {
+                    pushAccountNameList.add(new IdNameVO<>(secondaryStaff.getThirdStaffId(), secondaryStaff.getName()));
+                }
+                vo.setPushAccountNameList(pushAccountNameList);
+            }
+            vo.setMemberCount(room.getMemberCount());
+            result.add(vo);
+        }
+        return result;
+    }
+
+    private List<ThirdPartWeComRoomConfig> getRoomConfigList(List<Long> roomIds) {
+        ThirdPartWeComRoomConfigExample example = new ThirdPartWeComRoomConfigExample();
+        example.createCriteria().andRoomIdIn(roomIds).andStatusEqualTo(1);
+        return roomConfigMapper.selectByExample(example);
+    }
+
+    @Override
+    public List<IdNameVO<Long>> getPushAccountList(Long roomId, String name) {
+        ThirdPartWeComRoom room = weComThirdPartyService.getRoomById(roomId);
+        Long accountId = room.getStaffId();
+        List<ThirdPartWeComStaff> pushStaffList = staffMapperExt.getPushStaffList(accountId, roomId, name);
+        return pushStaffList.stream().map(staff -> new IdNameVO<>(staff.getThirdStaffId(), staff.getName())).collect(Collectors.toList());
+    }
+
+    @Override
+    public ThirdPartyRoomConfigVO getRoomConfig(ThirdPartyConfigGetParam param) {
+        ThirdPartWeComRoomConfig config = getRoomConfig(param.getId());
+        if (Objects.isNull(config)) {
+            return null;
+        }
+        List<ThirdPartWeComStaff> pushStaffList = getRoomConfigPushList(Collections.singletonList(config));
+        Map<Long, String> pushStaffMap = pushStaffList.stream()
+                .collect(Collectors.toMap(ThirdPartWeComStaff::getThirdStaffId, ThirdPartWeComStaff::getName));
+        List<ThirdPartWeComRoomConfigTask> taskList = getRoomConfigTasks(config.getId());
+        List<String> taskIds = taskList.stream().map(ThirdPartWeComRoomConfigTask::getId).collect(Collectors.toList());
+        List<ThirdPartWeComRoomConfigTaskContent> contentList = getRoomConfigTaskContents(taskIds);
+        Map<String, List<ThirdPartWeComRoomConfigTaskContent>> taskContentMap = contentList.stream()
+                .collect(Collectors.groupingBy(ThirdPartWeComRoomConfigTaskContent::getTaskId));
+        ThirdPartyRoomConfigVO result = new ThirdPartyRoomConfigVO();
+        result.setPutScene(config.getPutScene());
+        result.setChannel(config.getChannel());
+        if (Objects.nonNull(config.getPrimaryThirdStaffId())) {
+            result.setPrimaryThirdStaffId(config.getPrimaryThirdStaffId());
+            result.setPrimaryThirdStaffName(pushStaffMap.get(config.getPrimaryThirdStaffId()));
+        }
+        if (Objects.nonNull(config.getSecondThirdStaffId())) {
+            result.setSecondThirdStaffId(config.getSecondThirdStaffId());
+            result.setSecondThirdStaffName(pushStaffMap.get(config.getSecondThirdStaffId()));
+        }
+        result.setTaskList(taskList.stream().map(task -> {
+            ThirdPartyRoomConfigTaskVO vo = new ThirdPartyRoomConfigTaskVO();
+            vo.setSwitchFlag(task.getSwitchFlag());
+            vo.setSendTime(JSONObject.parseArray(task.getSendTime(), String.class));
+            vo.setRandomMin(task.getRandomMin());
+            vo.setSeq(task.getSeq());
+            List<ThirdPartWeComRoomConfigTaskContent> contents = taskContentMap.get(task.getId());
+            vo.setContentList(contents.stream().map(content -> {
+                ThirdPartyRoomConfigTaskContentVO contentVO = new ThirdPartyRoomConfigTaskContentVO();
+                contentVO.setType(content.getType());
+                contentVO.setContent(content.getContent());
+                contentVO.setSource(content.getSource());
+                contentVO.setSourceContent(content.getSourceContent());
+                contentVO.setSeq(content.getSeq());
+                return contentVO;
+            }).collect(Collectors.toList()));
+            return vo;
+        }).collect(Collectors.toList()));
+        return result;
+    }
+
+    @Override
+    public List<ThirdPartWeComStaff> getRoomConfigPushList(List<ThirdPartWeComRoomConfig> configList) {
+        if (CollectionUtils.isEmpty(configList)) {
+            return Collections.emptyList();
+        }
+        List<Long> thirdStaffIds = new ArrayList<>();
+        for (ThirdPartWeComRoomConfig config : configList) {
+            if (Objects.nonNull(config.getPrimaryThirdStaffId())) {
+                thirdStaffIds.add(config.getPrimaryThirdStaffId());
+            }
+            if (Objects.nonNull(config.getSecondThirdStaffId())) {
+                thirdStaffIds.add(config.getSecondThirdStaffId());
+            }
+        }
+        return weComThirdPartyService.getStaffListByThirdStaffIds(thirdStaffIds);
+    }
+
+    private ThirdPartWeComRoomConfig getRoomConfig(Long roomId) {
+        ThirdPartWeComRoomConfigExample example = new ThirdPartWeComRoomConfigExample();
+        example.createCriteria().andRoomIdEqualTo(roomId).andStatusEqualTo(1);
+        List<ThirdPartWeComRoomConfig> configs = roomConfigMapper.selectByExample(example);
+        if (configs.isEmpty()) {
+            return null;
+        }
+        return configs.get(0);
+    }
+
+    private List<ThirdPartWeComRoomConfigTask> getRoomConfigTasks(String configId) {
+        ThirdPartWeComRoomConfigTaskExample example = new ThirdPartWeComRoomConfigTaskExample();
+        example.createCriteria().andConfigIdEqualTo(configId);
+        return roomConfigTaskMapper.selectByExample(example);
+    }
+
+    @Override
+    public List<ThirdPartWeComRoomConfigTask> getRoomConfigTasks(List<String> configIds) {
+        ThirdPartWeComRoomConfigTaskExample example = new ThirdPartWeComRoomConfigTaskExample();
+        example.createCriteria().andConfigIdIn(configIds);
+        return roomConfigTaskMapper.selectByExample(example);
+    }
+
+    @Override
+    public List<ThirdPartWeComRoomConfigTaskContent> getRoomConfigTaskContents(List<String> taskIds) {
+        if (CollectionUtils.isEmpty(taskIds)) {
+            return Collections.emptyList();
+        }
+        ThirdPartWeComRoomConfigTaskContentExample example = new ThirdPartWeComRoomConfigTaskContentExample();
+        example.createCriteria().andTaskIdIn(taskIds);
+        return roomConfigTaskContentMapper.selectByExample(example);
+    }
+
+    @Override
+    public void saveRoomConfig(ThirdPartyRoomConfigParam param, String accountConfigId) {
+        // check param
+        ThirdPartWeComRoom room = weComThirdPartyService.getRoomById(param.getRoomId());
+        if (Objects.isNull(room)) {
+            throw new CommonException(ExceptionEnum.PARAM_ERROR.getCode(), "群不存在");
+        }
+        checkRoomConfigParam(param, room);
+        ThirdPartWeComRoomConfig config = getRoomConfig(param.getRoomId());
+        if (Objects.nonNull(config)) {
+            config.setStatus(0);
+            config.setUpdateTime(new Date());
+            roomConfigMapper.updateByPrimaryKey(config);
+        }
+        ThirdPartWeComRoomConfig newConfig = new ThirdPartWeComRoomConfig();
+        newConfig.setId(DistributedIdGenerator.generate());
+        newConfig.setAccountConfigId(accountConfigId);
+        newConfig.setRoomId(param.getRoomId());
+        newConfig.setPutScene(param.getPutScene());
+        newConfig.setChannel(param.getChannel());
+        newConfig.setPrimaryThirdStaffId(param.getPrimaryThirdStaffId());
+        newConfig.setSecondThirdStaffId(param.getSecondThirdStaffId());
+        newConfig.setStatus(1);
+        newConfig.setCreateTime(new Date());
+        newConfig.setUpdateTime(new Date());
+        roomConfigMapper.insert(newConfig);
+        List<ThirdPartWeComRoomConfigTask> taskList = new ArrayList<>();
+        for (ThirdPartyRoomConfigTaskParam taskParam : param.getTaskList()) {
+            ThirdPartWeComRoomConfigTask newTask = new ThirdPartWeComRoomConfigTask();
+            newTask.setId(DistributedIdGenerator.generate());
+            newTask.setConfigId(newConfig.getId());
+            newTask.setSwitchFlag(taskParam.getSwitchFlag());
+            newTask.setSendTime(JSONObject.toJSONString(taskParam.getSendTime()));
+            newTask.setRandomMin(taskParam.getRandomMin());
+            newTask.setSeq(taskParam.getSeq());
+            newTask.setCreateTime(new Date());
+            newTask.setUpdateTime(new Date());
+            roomConfigTaskMapper.insert(newTask);
+            taskList.add(newTask);
+            for (ThirdPartyRoomConfigTaskContentParam taskContentParam : taskParam.getContentList()) {
+                ThirdPartWeComRoomConfigTaskContent newContent = new ThirdPartWeComRoomConfigTaskContent();
+                newContent.setId(DistributedIdGenerator.generate());
+                newContent.setTaskId(newTask.getId());
+                newContent.setType(taskContentParam.getType());
+                newContent.setContent(taskContentParam.getContent());
+                newContent.setSource(taskContentParam.getSource());
+                newContent.setSourceContent(taskContentParam.getSourceContent());
+                newContent.setSeq(taskContentParam.getSeq());
+                newContent.setCreateTime(new Date());
+                newContent.setUpdateTime(new Date());
+                roomConfigTaskContentMapper.insert(newContent);
+            }
+        }
+        String now = DateUtil.getCurrentDateStr("HH:mm");
+        weComSendMsgJob.randomRoomSendTime(room, newConfig, taskList, now);
+    }
+
+    private void checkRoomConfigParam(ThirdPartyRoomConfigParam param, ThirdPartWeComRoom room) {
+        if (Objects.isNull(param.getRoomId())) {
+            throw new CommonException(ExceptionEnum.PARAM_ERROR.getCode(), "群id不能为空");
+        }
+        if (StringUtils.isBlank(param.getPutScene())) {
+            throw new CommonException(ExceptionEnum.PARAM_ERROR.getCode(), "推送场景不能为空");
+        }
+        if (Objects.isNull(param.getPrimaryThirdStaffId())) {
+            throw new CommonException(ExceptionEnum.PARAM_ERROR.getCode(), "主推送人员不能为空");
+        }
+        if (CollectionUtils.isEmpty(param.getTaskList())) {
+            throw new CommonException(ExceptionEnum.PARAM_ERROR.getCode(), "任务列表不能为空");
+        }
+        List<ThirdPartWeComRoomUser> roomUserList = getRoomUserListByRoomId(room.getThirdRoomId());
+        List<Long> roomUserIdList = roomUserList.stream().map(ThirdPartWeComRoomUser::getUin).collect(Collectors.toList());
+        if (!roomUserIdList.contains(param.getPrimaryThirdStaffId())) {
+            param.setPrimaryThirdStaffId(room.getThirdCreateUserId());
+        }
+        if (Objects.nonNull(param.getSecondThirdStaffId()) && !roomUserIdList.contains(param.getSecondThirdStaffId())) {
+            param.setSecondThirdStaffId(room.getThirdCreateUserId());
+        }
+        List<String> timeList = new ArrayList<>();
+        for (ThirdPartyRoomConfigTaskParam task : param.getTaskList()) {
+            if (CollectionUtils.isEmpty(task.getSendTime())) {
+                throw new CommonException(ExceptionEnum.PARAM_ERROR.getCode(), "推送时间不能为空");
+            }
+            for (String sendTime : task.getSendTime()) {
+                if (timeList.contains(sendTime)) {
+                    throw new CommonException(ExceptionEnum.PARAM_ERROR.getCode(), "推送时间不能重复: " + sendTime);
+                } else {
+                    timeList.add(sendTime);
+                }
+            }
+            if (Objects.nonNull(task.getRandomMin())) {
+                if (task.getRandomMin() < 0) {
+                    throw new CommonException(ExceptionEnum.PARAM_ERROR.getCode(), "随机浮动分钟不能小于0");
+                } else if (task.getRandomMin() > 30) {
+                    throw new CommonException(ExceptionEnum.PARAM_ERROR.getCode(), "随机浮动分钟不能大于30");
+                }
+            }
+            if (CollectionUtils.isEmpty(task.getContentList()) || task.getContentList().size() > 3) {
+                throw new CommonException(ExceptionEnum.PARAM_ERROR.getCode(), "任务内容不能为空,最多3条");
+            }
+            for (ThirdPartyRoomConfigTaskContentParam content : task.getContentList()) {
+                if (Objects.isNull(content.getType())) {
+                    throw new CommonException(ExceptionEnum.PARAM_ERROR.getCode(), "任务内容类型不能为空");
+                }
+                if (content.getType() == ConfigTaskContentTypeEnum.TEXT.getVal()
+                        && StringUtils.isBlank(content.getContent())) {
+                    throw new CommonException(ExceptionEnum.PARAM_ERROR.getCode(), "文案不能为空");
+                } else if (content.getType() == ConfigTaskContentTypeEnum.MINI_PROGRAM.getVal()
+                        && Objects.isNull(content.getSource())) {
+                    throw new CommonException(ExceptionEnum.PARAM_ERROR.getCode(), "小程序来源不能为空");
+                }
+            }
+        }
+
+    }
+
+    @Override
+    public List<ThirdPartWeComRoomUser> getRoomUserListByRoomId(String thirdRoomId) {
+        ThirdPartWeComRoomUserExample example = new ThirdPartWeComRoomUserExample();
+        example.createCriteria().andThirdRoomIdEqualTo(thirdRoomId);
+        return roomUserMapper.selectByExample(example);
+    }
+
+    @Override
+    public List<ThirdPartWeComRoomUser> getRoomUserListByRoomIds(List<String> thirdRoomIds) {
+        if (CollectionUtils.isEmpty(thirdRoomIds)) {
+            return new ArrayList<>();
+        }
+        ThirdPartWeComRoomUserExample example = new ThirdPartWeComRoomUserExample();
+        example.createCriteria().andThirdRoomIdIn(thirdRoomIds);
+        return roomUserMapper.selectByExample(example);
+    }
+
+    @Override
+    public void saveRoomConfig(ThirdPartWeComRoom room, String accountConfigId, ThirdPartyAccountConfigParam param) {
+        ThirdPartyRoomConfigParam roomConfigParam = buildRoomConfigParam(room, param);
+        saveRoomConfig(roomConfigParam, accountConfigId);
+    }
+
+    private ThirdPartyRoomConfigParam buildRoomConfigParam(ThirdPartWeComRoom room, ThirdPartyAccountConfigParam param) {
+        ThirdPartyRoomConfigParam roomConfigParam = new ThirdPartyRoomConfigParam();
+        roomConfigParam.setRoomId(room.getId());
+        roomConfigParam.setPutScene(param.getPutScene());
+        roomConfigParam.setChannel(param.getChannel());
+        roomConfigParam.setOpenRoomSendSwitchNum(param.getOpenRoomSendSwitchNum());
+        roomConfigParam.setPrimaryThirdStaffId(param.getPrimaryThirdStaffId());
+        roomConfigParam.setPrimaryThirdStaffName(param.getPrimaryThirdStaffName());
+        roomConfigParam.setSecondThirdStaffId(param.getSecondThirdStaffId());
+        roomConfigParam.setSecondThirdStaffName(param.getSecondThirdStaffName());
+        List<ThirdPartyRoomConfigTaskParam> taskList = new ArrayList<>();
+        for (ThirdPartyAccountConfigTaskParam taskParam : param.getTaskList()) {
+            ThirdPartyRoomConfigTaskParam task = new ThirdPartyRoomConfigTaskParam();
+            task.setSwitchFlag(taskParam.getSwitchFlag());
+            task.setSendTime(taskParam.getSendTime());
+            task.setRandomMin(taskParam.getRandomMin());
+            task.setSeq(taskParam.getSeq());
+            List<ThirdPartyRoomConfigTaskContentParam> contentList = new ArrayList<>();
+            for (ThirdPartyAccountConfigTaskContentParam taskContentParam : taskParam.getContentList()) {
+                ThirdPartyRoomConfigTaskContentParam content = new ThirdPartyRoomConfigTaskContentParam();
+                content.setType(taskContentParam.getType());
+                content.setContent(taskContentParam.getContent());
+                content.setSource(taskContentParam.getSource());
+                content.setSourceContent(taskContentParam.getSourceContent());
+                content.setSeq(taskContentParam.getSeq());
+                contentList.add(content);
+            }
+            task.setContentList(contentList);
+            taskList.add(task);
+        }
+        roomConfigParam.setTaskList(taskList);
+        return roomConfigParam;
+    }
+
+    @Override
+    public void saveRoomConfig(ThirdPartWeComRoom room, String accountConfigId, ThirdPartyAccountConfigVO configVO) {
+        ThirdPartyRoomConfigParam roomConfigParam = buildRoomConfigParam(room, configVO);
+        saveRoomConfig(roomConfigParam, accountConfigId);
+    }
+
+    private ThirdPartyRoomConfigParam buildRoomConfigParam(ThirdPartWeComRoom room, ThirdPartyAccountConfigVO configVO) {
+        ThirdPartyRoomConfigParam roomConfigParam = new ThirdPartyRoomConfigParam();
+        roomConfigParam.setRoomId(room.getId());
+        roomConfigParam.setPutScene(configVO.getPutScene());
+        roomConfigParam.setChannel(configVO.getChannel());
+        roomConfigParam.setOpenRoomSendSwitchNum(configVO.getOpenRoomSendSwitchNum());
+        roomConfigParam.setPrimaryThirdStaffId(configVO.getPrimaryThirdStaffId());
+        roomConfigParam.setPrimaryThirdStaffName(configVO.getPrimaryThirdStaffName());
+        roomConfigParam.setSecondThirdStaffId(configVO.getSecondThirdStaffId());
+        roomConfigParam.setSecondThirdStaffName(configVO.getSecondThirdStaffName());
+        List<ThirdPartyRoomConfigTaskParam> taskList = new ArrayList<>();
+        for (ThirdPartyAccountConfigTaskVO taskVO : configVO.getTaskList()) {
+            ThirdPartyRoomConfigTaskParam task = new ThirdPartyRoomConfigTaskParam();
+            task.setSwitchFlag(taskVO.getSwitchFlag());
+            task.setSendTime(taskVO.getSendTime());
+            task.setRandomMin(taskVO.getRandomMin());
+            task.setSeq(taskVO.getSeq());
+            List<ThirdPartyRoomConfigTaskContentParam> contentList = new ArrayList<>();
+            for (ThirdPartyAccountConfigTaskContentVO taskContentVO : taskVO.getContentList()) {
+                ThirdPartyRoomConfigTaskContentParam content = new ThirdPartyRoomConfigTaskContentParam();
+                content.setType(taskContentVO.getType());
+                content.setContent(taskContentVO.getContent());
+                content.setSource(taskContentVO.getSource());
+                content.setSourceContent(taskContentVO.getSourceContent());
+                content.setSeq(taskContentVO.getSeq());
+                contentList.add(content);
+            }
+            task.setContentList(contentList);
+            taskList.add(task);
+        }
+        roomConfigParam.setTaskList(taskList);
+        return roomConfigParam;
+    }
+
+    @Override
+    public List<ThirdPartWeComRoomConfig> getRoomConfigListByRoomIds(List<Long> roomIds) {
+        if (CollectionUtils.isEmpty(roomIds)) {
+            return Collections.emptyList();
+        }
+        ThirdPartWeComRoomConfigExample example = new ThirdPartWeComRoomConfigExample();
+        example.createCriteria().andRoomIdIn(roomIds).andStatusEqualTo(1);
+        return roomConfigMapper.selectByExample(example);
+    }
+
+    @Override
+    public List<ThirdPartWeComRoom> getRoomListByRoomIds(List<Long> roomIds) {
+        if (CollectionUtils.isEmpty(roomIds)) {
+            return Collections.emptyList();
+        }
+        ThirdPartWeComRoomExample example = new ThirdPartWeComRoomExample();
+        example.createCriteria().andIdIn(roomIds).andIsDeleteEqualTo(0);
+        return roomMapper.selectByExample(example);
+    }
+
+    @Override
+    public List<ThirdPartWeComRoomConfig> getAccountConfigRoomConfigList(String accountConfigId) {
+        ThirdPartWeComRoomConfigExample example = new ThirdPartWeComRoomConfigExample();
+        example.createCriteria().andAccountConfigIdEqualTo(accountConfigId).andStatusEqualTo(1);
+        return roomConfigMapper.selectByExample(example);
+    }
+}

+ 129 - 12
api-module/src/main/java/com/tzld/piaoquan/api/service/impl/WeComThirdPartyServiceImpl.java → api-module/src/main/java/com/tzld/piaoquan/api/service/wecom/thirdparty/impl/WeComThirdPartyServiceImpl.java

@@ -1,32 +1,38 @@
-package com.tzld.piaoquan.api.service.impl;
+package com.tzld.piaoquan.api.service.wecom.thirdparty.impl;
 
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.TypeReference;
+import com.stuuudy.commons.external.filestorage.enums.EnumFileType;
+import com.stuuudy.commons.external.filestorage.enums.EnumPublicBuckets;
 import com.tzld.piaoquan.api.common.enums.ExceptionEnum;
+import com.tzld.piaoquan.api.common.enums.wecom.ThirdPartWeComStaffStatusEnum;
 import com.tzld.piaoquan.api.common.exception.CommonException;
 import com.tzld.piaoquan.api.component.WeComThirdPartyApiClient;
 import com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ThirdPartWeComCorpMapper;
 import com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ThirdPartWeComRoomMapper;
 import com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ThirdPartWeComStaffMapper;
+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.*;
-import com.tzld.piaoquan.api.service.WeComThirdPartyService;
+import com.tzld.piaoquan.api.service.wecom.thirdparty.WeComThirdPartyService;
+import com.tzld.piaoquan.api.util.AliOssFileTool;
 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 com.tzld.piaoquan.growth.common.utils.DateUtil;
 import com.tzld.piaoquan.growth.common.utils.LarkRobotUtil;
+import com.tzld.piaoquan.growth.common.utils.RandomUtil;
 import com.tzld.piaoquan.growth.common.utils.RedisUtils;
 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.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Objects;
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.util.*;
 
 @Slf4j
 @Service
@@ -41,11 +47,16 @@ public class WeComThirdPartyServiceImpl implements WeComThirdPartyService {
     @Autowired
     private ThirdPartWeComCorpMapper thirdPartWeComCorpMapper;
     @Autowired
+    private ThirdPartWeComMapperExt weComMapperExt;
+    @Autowired
     private CorpMapper corpMapper;
 
     @Autowired
     private RedisUtils redisUtils;
 
+    @Value("${wecom.thirdpart.callback.url:https://test-tp-open.piaoquantv.com/wecom/thirdparty/callback}")
+    private String callbackUrl;
+
     @Override
     public InitResponse init(InitRequest request) {
         if (Objects.isNull(request)) {
@@ -77,6 +88,7 @@ public class WeComThirdPartyServiceImpl implements WeComThirdPartyService {
             log.error("WeComThirdPartyService get qr code failed, request: {}, response: {}", request, response);
             return null;
         }
+        apiClient.setCallbackUrl(new SetCallbackUrlRequest(request.getUuid(), callbackUrl));
         return commonResponse.getData();
     }
 
@@ -146,6 +158,7 @@ public class WeComThirdPartyServiceImpl implements WeComThirdPartyService {
             existStaff.setThirdStaffId(userObject.getUser_id());
             existStaff.setCorpId(existCorp.getId());
             existStaff.setName(userObject.getNickname());
+            existStaff.setRealName(userObject.getRealname());
             existStaff.setMobile(userObject.getMobile());
             existStaff.setAvatar(userObject.getAvatar());
             existStaff.setThirdStaffId(userObject.getUser_id());
@@ -154,17 +167,43 @@ public class WeComThirdPartyServiceImpl implements WeComThirdPartyService {
         } else {
             existStaff.setCorpId(existCorp.getId());
             existStaff.setName(userObject.getNickname());
+            existStaff.setRealName(userObject.getRealname());
             existStaff.setMobile(userObject.getMobile());
             existStaff.setAvatar(userObject.getAvatar());
             existStaff.setThirdUuid(uuid);
-            existStaff.setStatus(0);
+            existStaff.setStatus(ThirdPartWeComStaffStatusEnum.NORMAL.getVal());
+            existStaff.setUpdateTime(new Date());
             thirdPartWeComStaffMapper.updateByPrimaryKeySelective(existStaff);
         }
+        saveStaffQrCode(uuid);
 
+        // 清除掉线检测
         String offLineKey = "wecom:thirdpart:offline:" + uuid;
         redisUtils.del(offLineKey);
     }
 
+    @Override
+    public void saveStaffQrCode(String uuid) {
+        // 获取名片二维码
+        String response = apiClient.getExternalBusinessCard(new UuidRequest(uuid));
+        CommonResponse<ExternalBusinessCardResponse> cardCommonResponse =
+                JSONObject.parseObject(response, new TypeReference<CommonResponse<ExternalBusinessCardResponse>>() {});
+        // base64 to inputStream
+        ExternalBusinessCardResponse cardResponse = cardCommonResponse.getData();
+        if (Objects.isNull(cardResponse)) {
+            return;
+        }
+        String qrImageBase64 = cardResponse.getQr_image();
+        if (StringUtils.isBlank(qrImageBase64)) {
+            return;
+        }
+        byte[] bytes = Base64.getDecoder().decode(qrImageBase64);
+        InputStream inputStream = new ByteArrayInputStream(bytes);
+        String fileUri = "temp/" + System.currentTimeMillis() + "_" + RandomUtil.generate18String() + ".png";
+        String qrImage = AliOssFileTool.saveInPublicReturnHost(inputStream, EnumPublicBuckets.PUBBUCKET, fileUri, EnumFileType.PICTURE);
+        weComMapperExt.updateStaffQrImageByUuid(uuid, qrImage);
+    }
+
     private Corp getCorpByName(String corpName) {
         CorpExample example = new CorpExample();
         example.createCriteria().andNameEqualTo(corpName);
@@ -195,6 +234,20 @@ public class WeComThirdPartyServiceImpl implements WeComThirdPartyService {
         return list.get(0);
     }
 
+    @Override
+    public List<ThirdPartWeComCorp> getCorpListByIds(List<Long> ids) {
+        if (CollectionUtils.isEmpty(ids)) {
+            return Collections.emptyList();
+        }
+        ThirdPartWeComCorpExample example = new ThirdPartWeComCorpExample();
+        example.createCriteria().andIdIn(ids);
+        List<ThirdPartWeComCorp> list = thirdPartWeComCorpMapper.selectByExample(example);
+        if (list.isEmpty()) {
+            return null;
+        }
+        return list;
+    }
+
     @Override
     public List<GetInnerContactsResponse.ContactItem> getInnerContacts(GetInnerContactsRequest request) {
         List<GetInnerContactsResponse.ContactItem> result = new ArrayList<>();
@@ -291,19 +344,43 @@ public class WeComThirdPartyServiceImpl implements WeComThirdPartyService {
     }
 
     @Override
-    public void sendAppMsg(SendAppMsgRequest request) {
+    public CommonResponse<SendAppMsgResponse> sendAppMsg(ThirdPartWeComStaff staff, ThirdPartWeComRoom room, SendAppMsgRequest request) {
         String response = apiClient.sendAppMsg(request);
         CommonResponse<SendAppMsgResponse> commonResponse =
                 JSONObject.parseObject(response, new TypeReference<CommonResponse<SendAppMsgResponse>>() {});
         if (commonResponse.getErrcode() != 0) {
+            LarkRobotUtil.sendWeComThirdPartMessage(
+                    "【发送应用消息失败通知】\n" +
+                            "账号名称:" + staff.getName() + "\n" +
+                            "群名:" + room.getName() + "\n" +
+                            "错误码:" + commonResponse.getErrcode() + "\n" +
+                            "错误信息:" + commonResponse.getErrmsg());
             log.error("WeComThirdPartyService send app msg failed, request: {}, response: {}", request, response);
         }
+        return commonResponse;
+    }
+
+    @Override
+    public CommonResponse<SendTextMsgResponse> sendTextMsg(ThirdPartWeComStaff staff, ThirdPartWeComRoom room, SendTextMsgRequest request) {
+        String response = apiClient.sendTextMsg(request);
+        CommonResponse<SendTextMsgResponse> commonResponse =
+                JSONObject.parseObject(response, new TypeReference<CommonResponse<SendTextMsgResponse>>() {});
+        if (commonResponse.getErrcode() != 0) {
+            LarkRobotUtil.sendWeComThirdPartMessage(
+                    "【发送应用消息失败通知】\n" +
+                            "账号名称:" + staff.getName() + "\n" +
+                            "群名:" + room.getName() + "\n" +
+                            "错误码:" + commonResponse.getErrcode() + "\n" +
+                            "错误信息:" + commonResponse.getErrmsg());
+            log.error("WeComThirdPartyService send text msg failed, request: {}, response: {}", request, response);
+        }
+        return commonResponse;
     }
 
     @Override
     public List<ThirdPartWeComStaff> getActiveStaffList() {
         ThirdPartWeComStaffExample example = new ThirdPartWeComStaffExample();
-        example.createCriteria().andStatusEqualTo(0);
+        example.createCriteria().andStatusEqualTo(ThirdPartWeComStaffStatusEnum.NORMAL.getVal());
         return thirdPartWeComStaffMapper.selectByExample(example);
     }
 
@@ -420,7 +497,7 @@ public class WeComThirdPartyServiceImpl implements WeComThirdPartyService {
             log.error("WeComThirdPartyService invitationToRoom error, roomId: {}, vids: {}, errMsg: {}",
                     request.getRoomid(), request.getVids(), commonResponse.getErrmsg());
             ThirdPartWeComStaff staff = getStaffByUuid(request.getUuid());
-            ThirdPartWeComRoom room = getRoomByRoomId(request.getRoomid());
+            ThirdPartWeComRoom room = getRoomByThirdRoomId(request.getRoomid());
             LarkRobotUtil.sendWeComThirdPartMessage(
                     "【邀请群成员失败通知】\n" +
                             "账号UUID:" + request.getUuid() + "\n" +
@@ -435,9 +512,9 @@ public class WeComThirdPartyServiceImpl implements WeComThirdPartyService {
     }
 
     @Override
-    public ThirdPartWeComRoom getRoomByRoomId(Long roomid) {
+    public ThirdPartWeComRoom getRoomByThirdRoomId(Long roomId) {
         ThirdPartWeComRoomExample example = new ThirdPartWeComRoomExample();
-        example.createCriteria().andThirdRoomIdEqualTo(String.valueOf(roomid));
+        example.createCriteria().andThirdRoomIdEqualTo(String.valueOf(roomId));
         List<ThirdPartWeComRoom> roomList = thirdPartWeComRoomMapper.selectByExample(example);
         if (CollectionUtils.isEmpty(roomList)) {
             return null;
@@ -445,6 +522,31 @@ public class WeComThirdPartyServiceImpl implements WeComThirdPartyService {
         return roomList.get(0);
     }
 
+    @Override
+    public List<ThirdPartWeComRoom> getRoomByRoomIds(List<Long> roomIds) {
+        if (CollectionUtils.isEmpty(roomIds)) {
+            return Collections.emptyList();
+        }
+        ThirdPartWeComRoomExample example = new ThirdPartWeComRoomExample();
+        example.createCriteria().andIdIn(roomIds);
+        return thirdPartWeComRoomMapper.selectByExample(example);
+    }
+
+    @Override
+    public ThirdPartWeComStaff getStaffById(Long id) {
+        return thirdPartWeComStaffMapper.selectByPrimaryKey(id);
+    }
+
+    @Override
+    public List<ThirdPartWeComStaff> getStaffByIds(List<Long> ids) {
+        if (CollectionUtils.isEmpty(ids)) {
+            return Collections.emptyList();
+        }
+        ThirdPartWeComStaffExample example = new ThirdPartWeComStaffExample();
+        example.createCriteria().andIdIn(ids);
+        return thirdPartWeComStaffMapper.selectByExample(example);
+    }
+
     @Override
     public ThirdPartWeComStaff getStaffByUuid(String uuid) {
         ThirdPartWeComStaffExample example = new ThirdPartWeComStaffExample();
@@ -456,6 +558,16 @@ public class WeComThirdPartyServiceImpl implements WeComThirdPartyService {
         return staffList.get(0);
     }
 
+    @Override
+    public List<ThirdPartWeComStaff> getStaffListByThirdStaffIds(List<Long> thirdStaffIds) {
+        if (CollectionUtils.isEmpty(thirdStaffIds)) {
+            return Collections.emptyList();
+        }
+        ThirdPartWeComStaffExample example = new ThirdPartWeComStaffExample();
+        example.createCriteria().andThirdStaffIdIn(thirdStaffIds);
+        return thirdPartWeComStaffMapper.selectByExample(example);
+    }
+
     @Override
     public void updateStaffStatus(UpdateStaffStatusRequest request) {
         ThirdPartWeComStaff staff = getStaffByName(request.getStaffName());
@@ -476,4 +588,9 @@ public class WeComThirdPartyServiceImpl implements WeComThirdPartyService {
         thirdPartWeComStaffMapper.updateByPrimaryKeySelective(staff);
     }
 
+    @Override
+    public ThirdPartWeComRoom getRoomById(Long roomId) {
+        return thirdPartWeComRoomMapper.selectByPrimaryKey(roomId);
+    }
+
 }

+ 1 - 6
api-module/src/main/resources/mapper/contentplatform/ext/ContentPlatformPlanMapperExt.xml

@@ -131,12 +131,7 @@
         select *
         from content_platform_video_agg video
         where video.dt = #{dt} and video.status = 1 and video.score > #{minScore}
-        <if test="excludeVideoIds != null and excludeVideoIds.size() > 0">
-            and video.video_id not in
-            <foreach collection="excludeVideoIds" item="item" open="(" close=")" separator=",">
-                #{item}
-            </foreach>
-        </if>
+        and video.video_id not in (select video_id from third_part_we_com_msg where send_userid = #{roomId} and video_id is not null)
         order by ${sort}
         limit #{offset}, #{pageSize}
     </select>

+ 66 - 12
api-module/src/main/resources/mapper/wecom/thirdpart/ThirdPartWeComMsgMapper.xml

@@ -5,6 +5,8 @@
     <id column="id" jdbcType="BIGINT" property="id" />
     <result column="uuid" jdbcType="VARCHAR" property="uuid" />
     <result column="send_userid" jdbcType="BIGINT" property="sendUserid" />
+    <result column="send_type" jdbcType="INTEGER" property="sendType" />
+    <result column="content" jdbcType="VARCHAR" property="content" />
     <result column="staff_id" jdbcType="BIGINT" property="staffId" />
     <result column="video_id" jdbcType="BIGINT" property="videoId" />
     <result column="appName" jdbcType="VARCHAR" property="appname" />
@@ -19,6 +21,7 @@
     <result column="aeskey" jdbcType="VARCHAR" property="aeskey" />
     <result column="fileSize" jdbcType="INTEGER" property="filesize" />
     <result column="isRoom" jdbcType="BIT" property="isroom" />
+    <result column="status" jdbcType="INTEGER" property="status" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
   </resultMap>
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComMsg">
@@ -83,8 +86,9 @@
     </where>
   </sql>
   <sql id="Base_Column_List">
-    id, uuid, send_userid, staff_id, video_id, appName, title, weappIconUrl, pagepath, 
-    root_source_id, username, appid, cdnkey, md5, aeskey, fileSize, isRoom, create_time
+    id, uuid, send_userid, send_type, content, staff_id, video_id, appName, title, weappIconUrl, 
+    pagepath, root_source_id, username, appid, cdnkey, md5, aeskey, fileSize, isRoom, 
+    `status`, create_time
   </sql>
   <sql id="Blob_Column_List">
     `desc`
@@ -145,18 +149,20 @@
   </delete>
   <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComMsg">
     insert into third_part_we_com_msg (id, uuid, send_userid, 
-      staff_id, video_id, appName, 
-      title, weappIconUrl, pagepath, 
-      root_source_id, username, appid, 
-      cdnkey, md5, aeskey, 
-      fileSize, isRoom, create_time, 
+      send_type, content, staff_id, 
+      video_id, appName, title, 
+      weappIconUrl, pagepath, root_source_id, 
+      username, appid, cdnkey, 
+      md5, aeskey, fileSize, 
+      isRoom, `status`, create_time, 
       `desc`)
     values (#{id,jdbcType=BIGINT}, #{uuid,jdbcType=VARCHAR}, #{sendUserid,jdbcType=BIGINT}, 
-      #{staffId,jdbcType=BIGINT}, #{videoId,jdbcType=BIGINT}, #{appname,jdbcType=VARCHAR}, 
-      #{title,jdbcType=VARCHAR}, #{weappiconurl,jdbcType=VARCHAR}, #{pagepath,jdbcType=VARCHAR}, 
-      #{rootSourceId,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, #{appid,jdbcType=VARCHAR}, 
-      #{cdnkey,jdbcType=VARCHAR}, #{md5,jdbcType=VARCHAR}, #{aeskey,jdbcType=VARCHAR}, 
-      #{filesize,jdbcType=INTEGER}, #{isroom,jdbcType=BIT}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{sendType,jdbcType=INTEGER}, #{content,jdbcType=VARCHAR}, #{staffId,jdbcType=BIGINT}, 
+      #{videoId,jdbcType=BIGINT}, #{appname,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, 
+      #{weappiconurl,jdbcType=VARCHAR}, #{pagepath,jdbcType=VARCHAR}, #{rootSourceId,jdbcType=VARCHAR}, 
+      #{username,jdbcType=VARCHAR}, #{appid,jdbcType=VARCHAR}, #{cdnkey,jdbcType=VARCHAR}, 
+      #{md5,jdbcType=VARCHAR}, #{aeskey,jdbcType=VARCHAR}, #{filesize,jdbcType=INTEGER}, 
+      #{isroom,jdbcType=BIT}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
       #{desc,jdbcType=LONGVARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComMsg">
@@ -171,6 +177,12 @@
       <if test="sendUserid != null">
         send_userid,
       </if>
+      <if test="sendType != null">
+        send_type,
+      </if>
+      <if test="content != null">
+        content,
+      </if>
       <if test="staffId != null">
         staff_id,
       </if>
@@ -213,6 +225,9 @@
       <if test="isroom != null">
         isRoom,
       </if>
+      <if test="status != null">
+        `status`,
+      </if>
       <if test="createTime != null">
         create_time,
       </if>
@@ -230,6 +245,12 @@
       <if test="sendUserid != null">
         #{sendUserid,jdbcType=BIGINT},
       </if>
+      <if test="sendType != null">
+        #{sendType,jdbcType=INTEGER},
+      </if>
+      <if test="content != null">
+        #{content,jdbcType=VARCHAR},
+      </if>
       <if test="staffId != null">
         #{staffId,jdbcType=BIGINT},
       </if>
@@ -272,6 +293,9 @@
       <if test="isroom != null">
         #{isroom,jdbcType=BIT},
       </if>
+      <if test="status != null">
+        #{status,jdbcType=INTEGER},
+      </if>
       <if test="createTime != null">
         #{createTime,jdbcType=TIMESTAMP},
       </if>
@@ -298,6 +322,12 @@
       <if test="record.sendUserid != null">
         send_userid = #{record.sendUserid,jdbcType=BIGINT},
       </if>
+      <if test="record.sendType != null">
+        send_type = #{record.sendType,jdbcType=INTEGER},
+      </if>
+      <if test="record.content != null">
+        content = #{record.content,jdbcType=VARCHAR},
+      </if>
       <if test="record.staffId != null">
         staff_id = #{record.staffId,jdbcType=BIGINT},
       </if>
@@ -340,6 +370,9 @@
       <if test="record.isroom != null">
         isRoom = #{record.isroom,jdbcType=BIT},
       </if>
+      <if test="record.status != null">
+        `status` = #{record.status,jdbcType=INTEGER},
+      </if>
       <if test="record.createTime != null">
         create_time = #{record.createTime,jdbcType=TIMESTAMP},
       </if>
@@ -356,6 +389,8 @@
     set id = #{record.id,jdbcType=BIGINT},
       uuid = #{record.uuid,jdbcType=VARCHAR},
       send_userid = #{record.sendUserid,jdbcType=BIGINT},
+      send_type = #{record.sendType,jdbcType=INTEGER},
+      content = #{record.content,jdbcType=VARCHAR},
       staff_id = #{record.staffId,jdbcType=BIGINT},
       video_id = #{record.videoId,jdbcType=BIGINT},
       appName = #{record.appname,jdbcType=VARCHAR},
@@ -370,6 +405,7 @@
       aeskey = #{record.aeskey,jdbcType=VARCHAR},
       fileSize = #{record.filesize,jdbcType=INTEGER},
       isRoom = #{record.isroom,jdbcType=BIT},
+      `status` = #{record.status,jdbcType=INTEGER},
       create_time = #{record.createTime,jdbcType=TIMESTAMP},
       `desc` = #{record.desc,jdbcType=LONGVARCHAR}
     <if test="_parameter != null">
@@ -381,6 +417,8 @@
     set id = #{record.id,jdbcType=BIGINT},
       uuid = #{record.uuid,jdbcType=VARCHAR},
       send_userid = #{record.sendUserid,jdbcType=BIGINT},
+      send_type = #{record.sendType,jdbcType=INTEGER},
+      content = #{record.content,jdbcType=VARCHAR},
       staff_id = #{record.staffId,jdbcType=BIGINT},
       video_id = #{record.videoId,jdbcType=BIGINT},
       appName = #{record.appname,jdbcType=VARCHAR},
@@ -395,6 +433,7 @@
       aeskey = #{record.aeskey,jdbcType=VARCHAR},
       fileSize = #{record.filesize,jdbcType=INTEGER},
       isRoom = #{record.isroom,jdbcType=BIT},
+      `status` = #{record.status,jdbcType=INTEGER},
       create_time = #{record.createTime,jdbcType=TIMESTAMP}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -409,6 +448,12 @@
       <if test="sendUserid != null">
         send_userid = #{sendUserid,jdbcType=BIGINT},
       </if>
+      <if test="sendType != null">
+        send_type = #{sendType,jdbcType=INTEGER},
+      </if>
+      <if test="content != null">
+        content = #{content,jdbcType=VARCHAR},
+      </if>
       <if test="staffId != null">
         staff_id = #{staffId,jdbcType=BIGINT},
       </if>
@@ -451,6 +496,9 @@
       <if test="isroom != null">
         isRoom = #{isroom,jdbcType=BIT},
       </if>
+      <if test="status != null">
+        `status` = #{status,jdbcType=INTEGER},
+      </if>
       <if test="createTime != null">
         create_time = #{createTime,jdbcType=TIMESTAMP},
       </if>
@@ -464,6 +512,8 @@
     update third_part_we_com_msg
     set uuid = #{uuid,jdbcType=VARCHAR},
       send_userid = #{sendUserid,jdbcType=BIGINT},
+      send_type = #{sendType,jdbcType=INTEGER},
+      content = #{content,jdbcType=VARCHAR},
       staff_id = #{staffId,jdbcType=BIGINT},
       video_id = #{videoId,jdbcType=BIGINT},
       appName = #{appname,jdbcType=VARCHAR},
@@ -478,6 +528,7 @@
       aeskey = #{aeskey,jdbcType=VARCHAR},
       fileSize = #{filesize,jdbcType=INTEGER},
       isRoom = #{isroom,jdbcType=BIT},
+      `status` = #{status,jdbcType=INTEGER},
       create_time = #{createTime,jdbcType=TIMESTAMP},
       `desc` = #{desc,jdbcType=LONGVARCHAR}
     where id = #{id,jdbcType=BIGINT}
@@ -486,6 +537,8 @@
     update third_part_we_com_msg
     set uuid = #{uuid,jdbcType=VARCHAR},
       send_userid = #{sendUserid,jdbcType=BIGINT},
+      send_type = #{sendType,jdbcType=INTEGER},
+      content = #{content,jdbcType=VARCHAR},
       staff_id = #{staffId,jdbcType=BIGINT},
       video_id = #{videoId,jdbcType=BIGINT},
       appName = #{appname,jdbcType=VARCHAR},
@@ -500,6 +553,7 @@
       aeskey = #{aeskey,jdbcType=VARCHAR},
       fileSize = #{filesize,jdbcType=INTEGER},
       isRoom = #{isroom,jdbcType=BIT},
+      `status` = #{status,jdbcType=INTEGER},
       create_time = #{createTime,jdbcType=TIMESTAMP}
     where id = #{id,jdbcType=BIGINT}
   </update>

+ 294 - 0
api-module/src/main/resources/mapper/wecom/thirdpart/ThirdPartWeComRoomConfigMapper.xml

@@ -0,0 +1,294 @@
+<?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.ThirdPartWeComRoomConfigMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomConfig">
+    <id column="id" jdbcType="VARCHAR" property="id" />
+    <result column="room_id" jdbcType="BIGINT" property="roomId" />
+    <result column="account_config_id" jdbcType="VARCHAR" property="accountConfigId" />
+    <result column="put_scene" jdbcType="VARCHAR" property="putScene" />
+    <result column="channel" jdbcType="VARCHAR" property="channel" />
+    <result column="primary_third_staff_id" jdbcType="BIGINT" property="primaryThirdStaffId" />
+    <result column="second_third_staff_id" jdbcType="BIGINT" property="secondThirdStaffId" />
+    <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, room_id, account_config_id, put_scene, channel, primary_third_staff_id, second_third_staff_id, 
+    `status`, create_time, update_time
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomConfigExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from third_part_we_com_room_config
+    <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.String" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from third_part_we_com_room_config
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from third_part_we_com_room_config
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomConfigExample">
+    delete from third_part_we_com_room_config
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomConfig">
+    insert into third_part_we_com_room_config (id, room_id, account_config_id, 
+      put_scene, channel, primary_third_staff_id, 
+      second_third_staff_id, `status`, create_time, 
+      update_time)
+    values (#{id,jdbcType=VARCHAR}, #{roomId,jdbcType=BIGINT}, #{accountConfigId,jdbcType=VARCHAR}, 
+      #{putScene,jdbcType=VARCHAR}, #{channel,jdbcType=VARCHAR}, #{primaryThirdStaffId,jdbcType=BIGINT}, 
+      #{secondThirdStaffId,jdbcType=BIGINT}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{updateTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomConfig">
+    insert into third_part_we_com_room_config
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="roomId != null">
+        room_id,
+      </if>
+      <if test="accountConfigId != null">
+        account_config_id,
+      </if>
+      <if test="putScene != null">
+        put_scene,
+      </if>
+      <if test="channel != null">
+        channel,
+      </if>
+      <if test="primaryThirdStaffId != null">
+        primary_third_staff_id,
+      </if>
+      <if test="secondThirdStaffId != null">
+        second_third_staff_id,
+      </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=VARCHAR},
+      </if>
+      <if test="roomId != null">
+        #{roomId,jdbcType=BIGINT},
+      </if>
+      <if test="accountConfigId != null">
+        #{accountConfigId,jdbcType=VARCHAR},
+      </if>
+      <if test="putScene != null">
+        #{putScene,jdbcType=VARCHAR},
+      </if>
+      <if test="channel != null">
+        #{channel,jdbcType=VARCHAR},
+      </if>
+      <if test="primaryThirdStaffId != null">
+        #{primaryThirdStaffId,jdbcType=BIGINT},
+      </if>
+      <if test="secondThirdStaffId != null">
+        #{secondThirdStaffId,jdbcType=BIGINT},
+      </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.ThirdPartWeComRoomConfigExample" resultType="java.lang.Long">
+    select count(*) from third_part_we_com_room_config
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update third_part_we_com_room_config
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=VARCHAR},
+      </if>
+      <if test="record.roomId != null">
+        room_id = #{record.roomId,jdbcType=BIGINT},
+      </if>
+      <if test="record.accountConfigId != null">
+        account_config_id = #{record.accountConfigId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.putScene != null">
+        put_scene = #{record.putScene,jdbcType=VARCHAR},
+      </if>
+      <if test="record.channel != null">
+        channel = #{record.channel,jdbcType=VARCHAR},
+      </if>
+      <if test="record.primaryThirdStaffId != null">
+        primary_third_staff_id = #{record.primaryThirdStaffId,jdbcType=BIGINT},
+      </if>
+      <if test="record.secondThirdStaffId != null">
+        second_third_staff_id = #{record.secondThirdStaffId,jdbcType=BIGINT},
+      </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_room_config
+    set id = #{record.id,jdbcType=VARCHAR},
+      room_id = #{record.roomId,jdbcType=BIGINT},
+      account_config_id = #{record.accountConfigId,jdbcType=VARCHAR},
+      put_scene = #{record.putScene,jdbcType=VARCHAR},
+      channel = #{record.channel,jdbcType=VARCHAR},
+      primary_third_staff_id = #{record.primaryThirdStaffId,jdbcType=BIGINT},
+      second_third_staff_id = #{record.secondThirdStaffId,jdbcType=BIGINT},
+      `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.ThirdPartWeComRoomConfig">
+    update third_part_we_com_room_config
+    <set>
+      <if test="roomId != null">
+        room_id = #{roomId,jdbcType=BIGINT},
+      </if>
+      <if test="accountConfigId != null">
+        account_config_id = #{accountConfigId,jdbcType=VARCHAR},
+      </if>
+      <if test="putScene != null">
+        put_scene = #{putScene,jdbcType=VARCHAR},
+      </if>
+      <if test="channel != null">
+        channel = #{channel,jdbcType=VARCHAR},
+      </if>
+      <if test="primaryThirdStaffId != null">
+        primary_third_staff_id = #{primaryThirdStaffId,jdbcType=BIGINT},
+      </if>
+      <if test="secondThirdStaffId != null">
+        second_third_staff_id = #{secondThirdStaffId,jdbcType=BIGINT},
+      </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=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomConfig">
+    update third_part_we_com_room_config
+    set room_id = #{roomId,jdbcType=BIGINT},
+      account_config_id = #{accountConfigId,jdbcType=VARCHAR},
+      put_scene = #{putScene,jdbcType=VARCHAR},
+      channel = #{channel,jdbcType=VARCHAR},
+      primary_third_staff_id = #{primaryThirdStaffId,jdbcType=BIGINT},
+      second_third_staff_id = #{secondThirdStaffId,jdbcType=BIGINT},
+      `status` = #{status,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_time = #{updateTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+</mapper>

+ 278 - 0
api-module/src/main/resources/mapper/wecom/thirdpart/ThirdPartWeComRoomConfigTaskContentMapper.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.wecom.thirdpart.ThirdPartWeComRoomConfigTaskContentMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomConfigTaskContent">
+    <id column="id" jdbcType="VARCHAR" property="id" />
+    <result column="task_id" jdbcType="VARCHAR" property="taskId" />
+    <result column="type" jdbcType="INTEGER" property="type" />
+    <result column="content" jdbcType="VARCHAR" property="content" />
+    <result column="source" jdbcType="INTEGER" property="source" />
+    <result column="source_content" jdbcType="VARCHAR" property="sourceContent" />
+    <result column="seq" jdbcType="INTEGER" property="seq" />
+    <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, task_id, `type`, content, `source`, source_content, seq, create_time, update_time
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomConfigTaskContentExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from third_part_we_com_room_config_task_content
+    <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.String" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from third_part_we_com_room_config_task_content
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from third_part_we_com_room_config_task_content
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomConfigTaskContentExample">
+    delete from third_part_we_com_room_config_task_content
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomConfigTaskContent">
+    insert into third_part_we_com_room_config_task_content (id, task_id, `type`, 
+      content, `source`, source_content, 
+      seq, create_time, update_time
+      )
+    values (#{id,jdbcType=VARCHAR}, #{taskId,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, 
+      #{content,jdbcType=VARCHAR}, #{source,jdbcType=INTEGER}, #{sourceContent,jdbcType=VARCHAR}, 
+      #{seq,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomConfigTaskContent">
+    insert into third_part_we_com_room_config_task_content
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="taskId != null">
+        task_id,
+      </if>
+      <if test="type != null">
+        `type`,
+      </if>
+      <if test="content != null">
+        content,
+      </if>
+      <if test="source != null">
+        `source`,
+      </if>
+      <if test="sourceContent != null">
+        source_content,
+      </if>
+      <if test="seq != null">
+        seq,
+      </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=VARCHAR},
+      </if>
+      <if test="taskId != null">
+        #{taskId,jdbcType=VARCHAR},
+      </if>
+      <if test="type != null">
+        #{type,jdbcType=INTEGER},
+      </if>
+      <if test="content != null">
+        #{content,jdbcType=VARCHAR},
+      </if>
+      <if test="source != null">
+        #{source,jdbcType=INTEGER},
+      </if>
+      <if test="sourceContent != null">
+        #{sourceContent,jdbcType=VARCHAR},
+      </if>
+      <if test="seq != null">
+        #{seq,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.ThirdPartWeComRoomConfigTaskContentExample" resultType="java.lang.Long">
+    select count(*) from third_part_we_com_room_config_task_content
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update third_part_we_com_room_config_task_content
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=VARCHAR},
+      </if>
+      <if test="record.taskId != null">
+        task_id = #{record.taskId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.type != null">
+        `type` = #{record.type,jdbcType=INTEGER},
+      </if>
+      <if test="record.content != null">
+        content = #{record.content,jdbcType=VARCHAR},
+      </if>
+      <if test="record.source != null">
+        `source` = #{record.source,jdbcType=INTEGER},
+      </if>
+      <if test="record.sourceContent != null">
+        source_content = #{record.sourceContent,jdbcType=VARCHAR},
+      </if>
+      <if test="record.seq != null">
+        seq = #{record.seq,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_room_config_task_content
+    set id = #{record.id,jdbcType=VARCHAR},
+      task_id = #{record.taskId,jdbcType=VARCHAR},
+      `type` = #{record.type,jdbcType=INTEGER},
+      content = #{record.content,jdbcType=VARCHAR},
+      `source` = #{record.source,jdbcType=INTEGER},
+      source_content = #{record.sourceContent,jdbcType=VARCHAR},
+      seq = #{record.seq,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.ThirdPartWeComRoomConfigTaskContent">
+    update third_part_we_com_room_config_task_content
+    <set>
+      <if test="taskId != null">
+        task_id = #{taskId,jdbcType=VARCHAR},
+      </if>
+      <if test="type != null">
+        `type` = #{type,jdbcType=INTEGER},
+      </if>
+      <if test="content != null">
+        content = #{content,jdbcType=VARCHAR},
+      </if>
+      <if test="source != null">
+        `source` = #{source,jdbcType=INTEGER},
+      </if>
+      <if test="sourceContent != null">
+        source_content = #{sourceContent,jdbcType=VARCHAR},
+      </if>
+      <if test="seq != null">
+        seq = #{seq,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=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomConfigTaskContent">
+    update third_part_we_com_room_config_task_content
+    set task_id = #{taskId,jdbcType=VARCHAR},
+      `type` = #{type,jdbcType=INTEGER},
+      content = #{content,jdbcType=VARCHAR},
+      `source` = #{source,jdbcType=INTEGER},
+      source_content = #{sourceContent,jdbcType=VARCHAR},
+      seq = #{seq,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_time = #{updateTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+</mapper>

+ 261 - 0
api-module/src/main/resources/mapper/wecom/thirdpart/ThirdPartWeComRoomConfigTaskMapper.xml

@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ThirdPartWeComRoomConfigTaskMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomConfigTask">
+    <id column="id" jdbcType="VARCHAR" property="id" />
+    <result column="config_id" jdbcType="VARCHAR" property="configId" />
+    <result column="switch_flag" jdbcType="INTEGER" property="switchFlag" />
+    <result column="send_time" jdbcType="VARCHAR" property="sendTime" />
+    <result column="random_min" jdbcType="INTEGER" property="randomMin" />
+    <result column="seq" jdbcType="INTEGER" property="seq" />
+    <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, config_id, switch_flag, send_time, random_min, seq, create_time, update_time
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomConfigTaskExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from third_part_we_com_room_config_task
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    <if test="page != null">
+      limit #{page.offset} , #{page.pageSize}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from third_part_we_com_room_config_task
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from third_part_we_com_room_config_task
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomConfigTaskExample">
+    delete from third_part_we_com_room_config_task
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomConfigTask">
+    insert into third_part_we_com_room_config_task (id, config_id, switch_flag, 
+      send_time, random_min, seq, 
+      create_time, update_time)
+    values (#{id,jdbcType=VARCHAR}, #{configId,jdbcType=VARCHAR}, #{switchFlag,jdbcType=INTEGER}, 
+      #{sendTime,jdbcType=VARCHAR}, #{randomMin,jdbcType=INTEGER}, #{seq,jdbcType=INTEGER}, 
+      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomConfigTask">
+    insert into third_part_we_com_room_config_task
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="configId != null">
+        config_id,
+      </if>
+      <if test="switchFlag != null">
+        switch_flag,
+      </if>
+      <if test="sendTime != null">
+        send_time,
+      </if>
+      <if test="randomMin != null">
+        random_min,
+      </if>
+      <if test="seq != null">
+        seq,
+      </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=VARCHAR},
+      </if>
+      <if test="configId != null">
+        #{configId,jdbcType=VARCHAR},
+      </if>
+      <if test="switchFlag != null">
+        #{switchFlag,jdbcType=INTEGER},
+      </if>
+      <if test="sendTime != null">
+        #{sendTime,jdbcType=VARCHAR},
+      </if>
+      <if test="randomMin != null">
+        #{randomMin,jdbcType=INTEGER},
+      </if>
+      <if test="seq != null">
+        #{seq,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.ThirdPartWeComRoomConfigTaskExample" resultType="java.lang.Long">
+    select count(*) from third_part_we_com_room_config_task
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update third_part_we_com_room_config_task
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=VARCHAR},
+      </if>
+      <if test="record.configId != null">
+        config_id = #{record.configId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.switchFlag != null">
+        switch_flag = #{record.switchFlag,jdbcType=INTEGER},
+      </if>
+      <if test="record.sendTime != null">
+        send_time = #{record.sendTime,jdbcType=VARCHAR},
+      </if>
+      <if test="record.randomMin != null">
+        random_min = #{record.randomMin,jdbcType=INTEGER},
+      </if>
+      <if test="record.seq != null">
+        seq = #{record.seq,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_room_config_task
+    set id = #{record.id,jdbcType=VARCHAR},
+      config_id = #{record.configId,jdbcType=VARCHAR},
+      switch_flag = #{record.switchFlag,jdbcType=INTEGER},
+      send_time = #{record.sendTime,jdbcType=VARCHAR},
+      random_min = #{record.randomMin,jdbcType=INTEGER},
+      seq = #{record.seq,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.ThirdPartWeComRoomConfigTask">
+    update third_part_we_com_room_config_task
+    <set>
+      <if test="configId != null">
+        config_id = #{configId,jdbcType=VARCHAR},
+      </if>
+      <if test="switchFlag != null">
+        switch_flag = #{switchFlag,jdbcType=INTEGER},
+      </if>
+      <if test="sendTime != null">
+        send_time = #{sendTime,jdbcType=VARCHAR},
+      </if>
+      <if test="randomMin != null">
+        random_min = #{randomMin,jdbcType=INTEGER},
+      </if>
+      <if test="seq != null">
+        seq = #{seq,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=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomConfigTask">
+    update third_part_we_com_room_config_task
+    set config_id = #{configId,jdbcType=VARCHAR},
+      switch_flag = #{switchFlag,jdbcType=INTEGER},
+      send_time = #{sendTime,jdbcType=VARCHAR},
+      random_min = #{randomMin,jdbcType=INTEGER},
+      seq = #{seq,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_time = #{updateTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+</mapper>

+ 326 - 0
api-module/src/main/resources/mapper/wecom/thirdpart/ThirdPartWeComStaffConfigMapper.xml

@@ -0,0 +1,326 @@
+<?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.ThirdPartWeComStaffConfigMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffConfig">
+    <id column="id" jdbcType="VARCHAR" property="id" />
+    <result column="staff_id" jdbcType="BIGINT" property="staffId" />
+    <result column="put_scene" jdbcType="VARCHAR" property="putScene" />
+    <result column="channel" jdbcType="VARCHAR" property="channel" />
+    <result column="switch_flag" jdbcType="INTEGER" property="switchFlag" />
+    <result column="open_room_send_switch_num" jdbcType="INTEGER" property="openRoomSendSwitchNum" />
+    <result column="primary_third_staff_id" jdbcType="BIGINT" property="primaryThirdStaffId" />
+    <result column="second_third_staff_id" jdbcType="BIGINT" property="secondThirdStaffId" />
+    <result column="config_sync" jdbcType="INTEGER" property="configSync" />
+    <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, staff_id, put_scene, channel, switch_flag, open_room_send_switch_num, primary_third_staff_id, 
+    second_third_staff_id, config_sync, `status`, create_time, update_time
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffConfigExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from third_part_we_com_staff_config
+    <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.String" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from third_part_we_com_staff_config
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from third_part_we_com_staff_config
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffConfigExample">
+    delete from third_part_we_com_staff_config
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffConfig">
+    insert into third_part_we_com_staff_config (id, staff_id, put_scene, 
+      channel, switch_flag, open_room_send_switch_num, 
+      primary_third_staff_id, second_third_staff_id, 
+      config_sync, `status`, create_time, 
+      update_time)
+    values (#{id,jdbcType=VARCHAR}, #{staffId,jdbcType=BIGINT}, #{putScene,jdbcType=VARCHAR}, 
+      #{channel,jdbcType=VARCHAR}, #{switchFlag,jdbcType=INTEGER}, #{openRoomSendSwitchNum,jdbcType=INTEGER}, 
+      #{primaryThirdStaffId,jdbcType=BIGINT}, #{secondThirdStaffId,jdbcType=BIGINT}, 
+      #{configSync,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{updateTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffConfig">
+    insert into third_part_we_com_staff_config
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="staffId != null">
+        staff_id,
+      </if>
+      <if test="putScene != null">
+        put_scene,
+      </if>
+      <if test="channel != null">
+        channel,
+      </if>
+      <if test="switchFlag != null">
+        switch_flag,
+      </if>
+      <if test="openRoomSendSwitchNum != null">
+        open_room_send_switch_num,
+      </if>
+      <if test="primaryThirdStaffId != null">
+        primary_third_staff_id,
+      </if>
+      <if test="secondThirdStaffId != null">
+        second_third_staff_id,
+      </if>
+      <if test="configSync != null">
+        config_sync,
+      </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=VARCHAR},
+      </if>
+      <if test="staffId != null">
+        #{staffId,jdbcType=BIGINT},
+      </if>
+      <if test="putScene != null">
+        #{putScene,jdbcType=VARCHAR},
+      </if>
+      <if test="channel != null">
+        #{channel,jdbcType=VARCHAR},
+      </if>
+      <if test="switchFlag != null">
+        #{switchFlag,jdbcType=INTEGER},
+      </if>
+      <if test="openRoomSendSwitchNum != null">
+        #{openRoomSendSwitchNum,jdbcType=INTEGER},
+      </if>
+      <if test="primaryThirdStaffId != null">
+        #{primaryThirdStaffId,jdbcType=BIGINT},
+      </if>
+      <if test="secondThirdStaffId != null">
+        #{secondThirdStaffId,jdbcType=BIGINT},
+      </if>
+      <if test="configSync != null">
+        #{configSync,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.ThirdPartWeComStaffConfigExample" resultType="java.lang.Long">
+    select count(*) from third_part_we_com_staff_config
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update third_part_we_com_staff_config
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=VARCHAR},
+      </if>
+      <if test="record.staffId != null">
+        staff_id = #{record.staffId,jdbcType=BIGINT},
+      </if>
+      <if test="record.putScene != null">
+        put_scene = #{record.putScene,jdbcType=VARCHAR},
+      </if>
+      <if test="record.channel != null">
+        channel = #{record.channel,jdbcType=VARCHAR},
+      </if>
+      <if test="record.switchFlag != null">
+        switch_flag = #{record.switchFlag,jdbcType=INTEGER},
+      </if>
+      <if test="record.openRoomSendSwitchNum != null">
+        open_room_send_switch_num = #{record.openRoomSendSwitchNum,jdbcType=INTEGER},
+      </if>
+      <if test="record.primaryThirdStaffId != null">
+        primary_third_staff_id = #{record.primaryThirdStaffId,jdbcType=BIGINT},
+      </if>
+      <if test="record.secondThirdStaffId != null">
+        second_third_staff_id = #{record.secondThirdStaffId,jdbcType=BIGINT},
+      </if>
+      <if test="record.configSync != null">
+        config_sync = #{record.configSync,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_config
+    set id = #{record.id,jdbcType=VARCHAR},
+      staff_id = #{record.staffId,jdbcType=BIGINT},
+      put_scene = #{record.putScene,jdbcType=VARCHAR},
+      channel = #{record.channel,jdbcType=VARCHAR},
+      switch_flag = #{record.switchFlag,jdbcType=INTEGER},
+      open_room_send_switch_num = #{record.openRoomSendSwitchNum,jdbcType=INTEGER},
+      primary_third_staff_id = #{record.primaryThirdStaffId,jdbcType=BIGINT},
+      second_third_staff_id = #{record.secondThirdStaffId,jdbcType=BIGINT},
+      config_sync = #{record.configSync,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.ThirdPartWeComStaffConfig">
+    update third_part_we_com_staff_config
+    <set>
+      <if test="staffId != null">
+        staff_id = #{staffId,jdbcType=BIGINT},
+      </if>
+      <if test="putScene != null">
+        put_scene = #{putScene,jdbcType=VARCHAR},
+      </if>
+      <if test="channel != null">
+        channel = #{channel,jdbcType=VARCHAR},
+      </if>
+      <if test="switchFlag != null">
+        switch_flag = #{switchFlag,jdbcType=INTEGER},
+      </if>
+      <if test="openRoomSendSwitchNum != null">
+        open_room_send_switch_num = #{openRoomSendSwitchNum,jdbcType=INTEGER},
+      </if>
+      <if test="primaryThirdStaffId != null">
+        primary_third_staff_id = #{primaryThirdStaffId,jdbcType=BIGINT},
+      </if>
+      <if test="secondThirdStaffId != null">
+        second_third_staff_id = #{secondThirdStaffId,jdbcType=BIGINT},
+      </if>
+      <if test="configSync != null">
+        config_sync = #{configSync,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=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffConfig">
+    update third_part_we_com_staff_config
+    set staff_id = #{staffId,jdbcType=BIGINT},
+      put_scene = #{putScene,jdbcType=VARCHAR},
+      channel = #{channel,jdbcType=VARCHAR},
+      switch_flag = #{switchFlag,jdbcType=INTEGER},
+      open_room_send_switch_num = #{openRoomSendSwitchNum,jdbcType=INTEGER},
+      primary_third_staff_id = #{primaryThirdStaffId,jdbcType=BIGINT},
+      second_third_staff_id = #{secondThirdStaffId,jdbcType=BIGINT},
+      config_sync = #{configSync,jdbcType=INTEGER},
+      `status` = #{status,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_time = #{updateTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+</mapper>

+ 278 - 0
api-module/src/main/resources/mapper/wecom/thirdpart/ThirdPartWeComStaffConfigTaskContentMapper.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.wecom.thirdpart.ThirdPartWeComStaffConfigTaskContentMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffConfigTaskContent">
+    <id column="id" jdbcType="VARCHAR" property="id" />
+    <result column="task_id" jdbcType="VARCHAR" property="taskId" />
+    <result column="type" jdbcType="INTEGER" property="type" />
+    <result column="content" jdbcType="VARCHAR" property="content" />
+    <result column="source" jdbcType="INTEGER" property="source" />
+    <result column="source_content" jdbcType="VARCHAR" property="sourceContent" />
+    <result column="seq" jdbcType="INTEGER" property="seq" />
+    <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, task_id, `type`, content, `source`, source_content, seq, create_time, update_time
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffConfigTaskContentExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from third_part_we_com_staff_config_task_content
+    <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.String" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from third_part_we_com_staff_config_task_content
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from third_part_we_com_staff_config_task_content
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffConfigTaskContentExample">
+    delete from third_part_we_com_staff_config_task_content
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffConfigTaskContent">
+    insert into third_part_we_com_staff_config_task_content (id, task_id, `type`, 
+      content, `source`, source_content, 
+      seq, create_time, update_time
+      )
+    values (#{id,jdbcType=VARCHAR}, #{taskId,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, 
+      #{content,jdbcType=VARCHAR}, #{source,jdbcType=INTEGER}, #{sourceContent,jdbcType=VARCHAR}, 
+      #{seq,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffConfigTaskContent">
+    insert into third_part_we_com_staff_config_task_content
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="taskId != null">
+        task_id,
+      </if>
+      <if test="type != null">
+        `type`,
+      </if>
+      <if test="content != null">
+        content,
+      </if>
+      <if test="source != null">
+        `source`,
+      </if>
+      <if test="sourceContent != null">
+        source_content,
+      </if>
+      <if test="seq != null">
+        seq,
+      </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=VARCHAR},
+      </if>
+      <if test="taskId != null">
+        #{taskId,jdbcType=VARCHAR},
+      </if>
+      <if test="type != null">
+        #{type,jdbcType=INTEGER},
+      </if>
+      <if test="content != null">
+        #{content,jdbcType=VARCHAR},
+      </if>
+      <if test="source != null">
+        #{source,jdbcType=INTEGER},
+      </if>
+      <if test="sourceContent != null">
+        #{sourceContent,jdbcType=VARCHAR},
+      </if>
+      <if test="seq != null">
+        #{seq,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.ThirdPartWeComStaffConfigTaskContentExample" resultType="java.lang.Long">
+    select count(*) from third_part_we_com_staff_config_task_content
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update third_part_we_com_staff_config_task_content
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=VARCHAR},
+      </if>
+      <if test="record.taskId != null">
+        task_id = #{record.taskId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.type != null">
+        `type` = #{record.type,jdbcType=INTEGER},
+      </if>
+      <if test="record.content != null">
+        content = #{record.content,jdbcType=VARCHAR},
+      </if>
+      <if test="record.source != null">
+        `source` = #{record.source,jdbcType=INTEGER},
+      </if>
+      <if test="record.sourceContent != null">
+        source_content = #{record.sourceContent,jdbcType=VARCHAR},
+      </if>
+      <if test="record.seq != null">
+        seq = #{record.seq,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_config_task_content
+    set id = #{record.id,jdbcType=VARCHAR},
+      task_id = #{record.taskId,jdbcType=VARCHAR},
+      `type` = #{record.type,jdbcType=INTEGER},
+      content = #{record.content,jdbcType=VARCHAR},
+      `source` = #{record.source,jdbcType=INTEGER},
+      source_content = #{record.sourceContent,jdbcType=VARCHAR},
+      seq = #{record.seq,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.ThirdPartWeComStaffConfigTaskContent">
+    update third_part_we_com_staff_config_task_content
+    <set>
+      <if test="taskId != null">
+        task_id = #{taskId,jdbcType=VARCHAR},
+      </if>
+      <if test="type != null">
+        `type` = #{type,jdbcType=INTEGER},
+      </if>
+      <if test="content != null">
+        content = #{content,jdbcType=VARCHAR},
+      </if>
+      <if test="source != null">
+        `source` = #{source,jdbcType=INTEGER},
+      </if>
+      <if test="sourceContent != null">
+        source_content = #{sourceContent,jdbcType=VARCHAR},
+      </if>
+      <if test="seq != null">
+        seq = #{seq,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=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffConfigTaskContent">
+    update third_part_we_com_staff_config_task_content
+    set task_id = #{taskId,jdbcType=VARCHAR},
+      `type` = #{type,jdbcType=INTEGER},
+      content = #{content,jdbcType=VARCHAR},
+      `source` = #{source,jdbcType=INTEGER},
+      source_content = #{sourceContent,jdbcType=VARCHAR},
+      seq = #{seq,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_time = #{updateTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+</mapper>

+ 261 - 0
api-module/src/main/resources/mapper/wecom/thirdpart/ThirdPartWeComStaffConfigTaskMapper.xml

@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ThirdPartWeComStaffConfigTaskMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffConfigTask">
+    <id column="id" jdbcType="VARCHAR" property="id" />
+    <result column="config_id" jdbcType="VARCHAR" property="configId" />
+    <result column="switch_flag" jdbcType="INTEGER" property="switchFlag" />
+    <result column="send_time" jdbcType="VARCHAR" property="sendTime" />
+    <result column="random_min" jdbcType="INTEGER" property="randomMin" />
+    <result column="seq" jdbcType="INTEGER" property="seq" />
+    <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, config_id, switch_flag, send_time, random_min, seq, create_time, update_time
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffConfigTaskExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from third_part_we_com_staff_config_task
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    <if test="page != null">
+      limit #{page.offset} , #{page.pageSize}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from third_part_we_com_staff_config_task
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from third_part_we_com_staff_config_task
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffConfigTaskExample">
+    delete from third_part_we_com_staff_config_task
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffConfigTask">
+    insert into third_part_we_com_staff_config_task (id, config_id, switch_flag, 
+      send_time, random_min, seq, 
+      create_time, update_time)
+    values (#{id,jdbcType=VARCHAR}, #{configId,jdbcType=VARCHAR}, #{switchFlag,jdbcType=INTEGER}, 
+      #{sendTime,jdbcType=VARCHAR}, #{randomMin,jdbcType=INTEGER}, #{seq,jdbcType=INTEGER}, 
+      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffConfigTask">
+    insert into third_part_we_com_staff_config_task
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="configId != null">
+        config_id,
+      </if>
+      <if test="switchFlag != null">
+        switch_flag,
+      </if>
+      <if test="sendTime != null">
+        send_time,
+      </if>
+      <if test="randomMin != null">
+        random_min,
+      </if>
+      <if test="seq != null">
+        seq,
+      </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=VARCHAR},
+      </if>
+      <if test="configId != null">
+        #{configId,jdbcType=VARCHAR},
+      </if>
+      <if test="switchFlag != null">
+        #{switchFlag,jdbcType=INTEGER},
+      </if>
+      <if test="sendTime != null">
+        #{sendTime,jdbcType=VARCHAR},
+      </if>
+      <if test="randomMin != null">
+        #{randomMin,jdbcType=INTEGER},
+      </if>
+      <if test="seq != null">
+        #{seq,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.ThirdPartWeComStaffConfigTaskExample" resultType="java.lang.Long">
+    select count(*) from third_part_we_com_staff_config_task
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update third_part_we_com_staff_config_task
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=VARCHAR},
+      </if>
+      <if test="record.configId != null">
+        config_id = #{record.configId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.switchFlag != null">
+        switch_flag = #{record.switchFlag,jdbcType=INTEGER},
+      </if>
+      <if test="record.sendTime != null">
+        send_time = #{record.sendTime,jdbcType=VARCHAR},
+      </if>
+      <if test="record.randomMin != null">
+        random_min = #{record.randomMin,jdbcType=INTEGER},
+      </if>
+      <if test="record.seq != null">
+        seq = #{record.seq,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_config_task
+    set id = #{record.id,jdbcType=VARCHAR},
+      config_id = #{record.configId,jdbcType=VARCHAR},
+      switch_flag = #{record.switchFlag,jdbcType=INTEGER},
+      send_time = #{record.sendTime,jdbcType=VARCHAR},
+      random_min = #{record.randomMin,jdbcType=INTEGER},
+      seq = #{record.seq,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.ThirdPartWeComStaffConfigTask">
+    update third_part_we_com_staff_config_task
+    <set>
+      <if test="configId != null">
+        config_id = #{configId,jdbcType=VARCHAR},
+      </if>
+      <if test="switchFlag != null">
+        switch_flag = #{switchFlag,jdbcType=INTEGER},
+      </if>
+      <if test="sendTime != null">
+        send_time = #{sendTime,jdbcType=VARCHAR},
+      </if>
+      <if test="randomMin != null">
+        random_min = #{randomMin,jdbcType=INTEGER},
+      </if>
+      <if test="seq != null">
+        seq = #{seq,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=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffConfigTask">
+    update third_part_we_com_staff_config_task
+    set config_id = #{configId,jdbcType=VARCHAR},
+      switch_flag = #{switchFlag,jdbcType=INTEGER},
+      send_time = #{sendTime,jdbcType=VARCHAR},
+      random_min = #{randomMin,jdbcType=INTEGER},
+      seq = #{seq,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_time = #{updateTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+</mapper>

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

@@ -9,6 +9,8 @@
     <result column="third_staff_id" jdbcType="BIGINT" property="thirdStaffId" />
     <result column="third_uuid" jdbcType="VARCHAR" property="thirdUuid" />
     <result column="avatar" jdbcType="VARCHAR" property="avatar" />
+    <result column="qr_image" jdbcType="VARCHAR" property="qrImage" />
+    <result column="real_name" jdbcType="VARCHAR" property="realName" />
     <result column="status" jdbcType="INTEGER" property="status" />
     <result column="auto_create_room" jdbcType="INTEGER" property="autoCreateRoom" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
@@ -73,8 +75,8 @@
     </where>
   </sql>
   <sql id="Base_Column_List">
-    id, corp_id, mobile, `name`, third_staff_id, third_uuid, avatar, `status`, auto_create_room, 
-    create_time, update_time
+    id, corp_id, mobile, `name`, third_staff_id, third_uuid, avatar, qr_image, real_name, 
+    `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
@@ -112,12 +114,14 @@
   <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`, third_staff_id, third_uuid, 
-      avatar, `status`, auto_create_room, 
-      create_time, update_time)
+      avatar, qr_image, real_name, 
+      `status`, auto_create_room, create_time, 
+      update_time)
     values (#{id,jdbcType=BIGINT}, #{corpId,jdbcType=BIGINT}, #{mobile,jdbcType=VARCHAR}, 
       #{name,jdbcType=VARCHAR}, #{thirdStaffId,jdbcType=BIGINT}, #{thirdUuid,jdbcType=VARCHAR}, 
-      #{avatar,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{autoCreateRoom,jdbcType=INTEGER}, 
-      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
+      #{avatar,jdbcType=VARCHAR}, #{qrImage,jdbcType=VARCHAR}, #{realName,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
@@ -143,6 +147,12 @@
       <if test="avatar != null">
         avatar,
       </if>
+      <if test="qrImage != null">
+        qr_image,
+      </if>
+      <if test="realName != null">
+        real_name,
+      </if>
       <if test="status != null">
         `status`,
       </if>
@@ -178,6 +188,12 @@
       <if test="avatar != null">
         #{avatar,jdbcType=VARCHAR},
       </if>
+      <if test="qrImage != null">
+        #{qrImage,jdbcType=VARCHAR},
+      </if>
+      <if test="realName != null">
+        #{realName,jdbcType=VARCHAR},
+      </if>
       <if test="status != null">
         #{status,jdbcType=INTEGER},
       </if>
@@ -222,6 +238,12 @@
       <if test="record.avatar != null">
         avatar = #{record.avatar,jdbcType=VARCHAR},
       </if>
+      <if test="record.qrImage != null">
+        qr_image = #{record.qrImage,jdbcType=VARCHAR},
+      </if>
+      <if test="record.realName != null">
+        real_name = #{record.realName,jdbcType=VARCHAR},
+      </if>
       <if test="record.status != null">
         `status` = #{record.status,jdbcType=INTEGER},
       </if>
@@ -248,6 +270,8 @@
       third_staff_id = #{record.thirdStaffId,jdbcType=BIGINT},
       third_uuid = #{record.thirdUuid,jdbcType=VARCHAR},
       avatar = #{record.avatar,jdbcType=VARCHAR},
+      qr_image = #{record.qrImage,jdbcType=VARCHAR},
+      real_name = #{record.realName,jdbcType=VARCHAR},
       `status` = #{record.status,jdbcType=INTEGER},
       auto_create_room = #{record.autoCreateRoom,jdbcType=INTEGER},
       create_time = #{record.createTime,jdbcType=TIMESTAMP},
@@ -277,6 +301,12 @@
       <if test="avatar != null">
         avatar = #{avatar,jdbcType=VARCHAR},
       </if>
+      <if test="qrImage != null">
+        qr_image = #{qrImage,jdbcType=VARCHAR},
+      </if>
+      <if test="realName != null">
+        real_name = #{realName,jdbcType=VARCHAR},
+      </if>
       <if test="status != null">
         `status` = #{status,jdbcType=INTEGER},
       </if>
@@ -300,6 +330,8 @@
       third_staff_id = #{thirdStaffId,jdbcType=BIGINT},
       third_uuid = #{thirdUuid,jdbcType=VARCHAR},
       avatar = #{avatar,jdbcType=VARCHAR},
+      qr_image = #{qrImage,jdbcType=VARCHAR},
+      real_name = #{realName,jdbcType=VARCHAR},
       `status` = #{status,jdbcType=INTEGER},
       auto_create_room = #{autoCreateRoom,jdbcType=INTEGER},
       create_time = #{createTime,jdbcType=TIMESTAMP},

Некоторые файлы не были показаны из-за большого количества измененных файлов