瀏覽代碼

三方平台自动建群

wangyunpeng 3 天之前
父節點
當前提交
9720bab183
共有 24 個文件被更改,包括 5567 次插入44 次删除
  1. 30 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/wecom/thirdpart/ThirdPartWeComRoomUserMapper.java
  2. 30 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/wecom/thirdpart/ThirdPartWeComStaffUserMapper.java
  3. 16 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/wecom/thirdpart/ext/ThirdPartWeComMapperExt.java
  4. 147 0
      api-module/src/main/java/com/tzld/piaoquan/api/job/wecom/thirdpart/WeComCreateRoomJob.java
  5. 205 34
      api-module/src/main/java/com/tzld/piaoquan/api/job/wecom/thirdpart/WeComUserDetailJob.java
  6. 11 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/wecom/thirdpart/CreateRoomWxResponse.java
  7. 4 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/wecom/thirdpart/GetExternalContactsRequest.java
  8. 5 1
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/wecom/thirdpart/GetRoomUserListRequest.java
  9. 33 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComRoom.java
  10. 190 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComRoomExample.java
  11. 235 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComRoomUser.java
  12. 1522 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComRoomUserExample.java
  13. 11 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComStaff.java
  14. 60 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComStaffExample.java
  15. 268 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComStaffUser.java
  16. 1722 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/wecom/thirdpart/ThirdPartWeComStaffUserExample.java
  17. 2 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/WeComThirdPartyService.java
  18. 12 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/impl/WeComThirdPartyServiceImpl.java
  19. 50 3
      api-module/src/main/resources/mapper/wecom/thirdpart/ThirdPartWeComRoomMapper.xml
  20. 451 0
      api-module/src/main/resources/mapper/wecom/thirdpart/ThirdPartWeComRoomUserMapper.xml
  21. 21 6
      api-module/src/main/resources/mapper/wecom/thirdpart/ThirdPartWeComStaffMapper.xml
  22. 498 0
      api-module/src/main/resources/mapper/wecom/thirdpart/ThirdPartWeComStaffUserMapper.xml
  23. 42 0
      api-module/src/main/resources/mapper/wecom/thirdpart/ext/ThirdPartWeComMapperExt.xml
  24. 2 0
      api-module/src/main/resources/mybatis-api-wecomThirdpart-generator-config.xml

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

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

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

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

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

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

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

@@ -0,0 +1,147 @@
+package com.tzld.piaoquan.api.job.wecom.thirdpart;
+
+import com.google.common.collect.Lists;
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
+import com.tzld.piaoquan.api.component.WeComThirdPartyApiClient;
+import com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ThirdPartWeComRoomMapper;
+import com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ext.ThirdPartWeComMapperExt;
+import com.tzld.piaoquan.api.model.param.wecom.thirdpart.CreateRoomWxRequest;
+import com.tzld.piaoquan.api.model.param.wecom.thirdpart.CreateRoomWxResponse;
+import com.tzld.piaoquan.api.model.param.wecom.thirdpart.InvitationToRoomRequest;
+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.ThirdPartWeComStaffUser;
+import com.tzld.piaoquan.api.service.WeComThirdPartyService;
+import com.xxl.job.core.biz.model.ReturnT;
+import com.xxl.job.core.handler.annotation.XxlJob;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+
+@Slf4j
+@Component
+public class WeComCreateRoomJob {
+
+    @Autowired
+    WeComThirdPartyService weComThirdPartyService;
+    @Autowired
+    WeComThirdPartyApiClient apiClient;
+    @Autowired
+    WeComUserDetailJob userDetailJob;
+    @Autowired
+    ThirdPartWeComRoomMapper roomMapper;
+    @Autowired
+    ThirdPartWeComMapperExt thirdPartWeComMapperExt;
+
+    @Value("${create.room.send.msg.status.nums:20}")
+    private Integer sendMsgStatusNums;
+
+    @Value("${create.room.member.max.nums:40}")
+    private Integer memberMaxNums;
+
+    private final static ExecutorService pool = new ThreadPoolExecutor(5, 5, 0L, TimeUnit.SECONDS,
+            new LinkedBlockingQueue<>(1000),
+            new ThreadFactoryBuilder().setNameFormat("AutoCreateRoomJob-%d").build(),
+            new ThreadPoolExecutor.AbortPolicy());
+
+    @XxlJob("autoCreateRoom")
+    public ReturnT<String> autoCreateRoomJob(String param) {
+        List<ThirdPartWeComStaff> activeStaffList = weComThirdPartyService.getActiveStaffList();
+        for (ThirdPartWeComStaff staff : activeStaffList) {
+            if (staff.getAutoCreateRoom() != 1) {
+                continue;
+            }
+            pool.execute(() -> createStaffRoom(staff));
+        }
+        return ReturnT.SUCCESS;
+    }
+
+    private void createStaffRoom(ThirdPartWeComStaff staff) {
+        // 获取所有未加群客户
+        List<ThirdPartWeComStaffUser> staffUserList = thirdPartWeComMapperExt.getNoGroupStaffUserList(staff.getThirdStaffId());
+        if (CollectionUtils.isEmpty(staffUserList)) {
+            return;
+        }
+        // 已创建群添加群成员
+        List<ThirdPartWeComRoom> roomList = weComThirdPartyService.getStaffRoomList(staff.getThirdStaffId());
+        for (ThirdPartWeComRoom room : roomList) {
+            addRoomUser(staff, room, staffUserList);
+        }
+        // 未加群客户创建新群
+        if (CollectionUtils.isNotEmpty(staffUserList)) {
+            createNewRoom(staff, staffUserList, roomList.size());
+        }
+    }
+
+    private void addRoomUser(ThirdPartWeComStaff staff,
+                             ThirdPartWeComRoom room,
+                             List<ThirdPartWeComStaffUser> staffUserList) {
+        if (room.getAddUserStatus() != 1 || room.getMemberCount() >= memberMaxNums) {
+            return;
+        }
+        List<Long> vids = new ArrayList<>();
+        Iterator<ThirdPartWeComStaffUser> iterator = staffUserList.iterator();
+        int size = memberMaxNums - room.getMemberCount();
+        while (iterator.hasNext() && size > 0) {
+            vids.add(iterator.next().getUserId());
+            size--;
+            iterator.remove();
+        }
+        InvitationToRoomRequest request = new InvitationToRoomRequest();
+        request.setUuid(staff.getThirdUuid());
+        request.setRoomid(Long.parseLong(room.getThirdRoomId()));
+        request.setVids(vids);
+        apiClient.invitationToRoom(request);
+        // 达到最大成员数,关闭添加开关
+        if (size == 0) {
+            room.setAddUserStatus(0);
+            roomMapper.updateByPrimaryKeySelective(room);
+        }
+        // 达到发送消息最低成员数,开启发送消息开关
+        if (room.getMemberCount() + vids.size() >= sendMsgStatusNums) {
+            room.setSendStatus(1);
+            roomMapper.updateByPrimaryKeySelective(room);
+        }
+    }
+
+    private void createNewRoom(ThirdPartWeComStaff staff,
+                               List<ThirdPartWeComStaffUser> staffUserList,
+                               Integer roomNum) {
+        for (List<ThirdPartWeComStaffUser> partition : Lists.partition(staffUserList, memberMaxNums)) {
+            List<Long> vids = partition.stream().map(ThirdPartWeComStaffUser::getUserId).collect(Collectors.toList());
+            CreateRoomWxRequest request = new CreateRoomWxRequest();
+            request.setUuid(staff.getThirdUuid());
+            request.setRoomName("票圈快讯" + (++roomNum));
+            request.setVids(vids);
+            CreateRoomWxResponse createRoomWxResponse = weComThirdPartyService.createRoom(request);
+
+            ThirdPartWeComRoom roomDetail = new ThirdPartWeComRoom();
+            roomDetail.setCorpId(staff.getCorpId());
+            roomDetail.setStaffId(staff.getId());
+            roomDetail.setThirdRoomId(createRoomWxResponse.getRoomid());
+            roomDetail.setThirdCreateUserId(createRoomWxResponse.getCreateid());
+            roomDetail.setMemberCount(vids.size());
+            roomDetail.setName(createRoomWxResponse.getRoomname());
+            roomDetail.setAddUserStatus(vids.size() == memberMaxNums ? 0 : 1);
+            roomDetail.setSendStatus(vids.size() > sendMsgStatusNums ? 1 : 0);
+            roomDetail.setCreateTime(new Date());
+            roomDetail.setUpdateTime(new Date());
+            roomMapper.insertSelective(roomDetail);
+
+            userDetailJob.syncRoomUserList(staff.getThirdUuid(), createRoomWxResponse.getRoomid());
+        }
+    }
+
+}

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

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

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

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

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

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

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

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

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

@@ -19,6 +19,12 @@ public class ThirdPartWeComRoom {
 
     private String roomUrl;
 
+    private Integer addUserStatus;
+
+    private Integer sendStatus;
+
+    private String sendTime;
+
     private Date createTime;
 
     private Date updateTime;
@@ -87,6 +93,30 @@ public class ThirdPartWeComRoom {
         this.roomUrl = roomUrl;
     }
 
+    public Integer getAddUserStatus() {
+        return addUserStatus;
+    }
+
+    public void setAddUserStatus(Integer addUserStatus) {
+        this.addUserStatus = addUserStatus;
+    }
+
+    public Integer getSendStatus() {
+        return sendStatus;
+    }
+
+    public void setSendStatus(Integer sendStatus) {
+        this.sendStatus = sendStatus;
+    }
+
+    public String getSendTime() {
+        return sendTime;
+    }
+
+    public void setSendTime(String sendTime) {
+        this.sendTime = sendTime;
+    }
+
     public Date getCreateTime() {
         return createTime;
     }
@@ -117,6 +147,9 @@ public class ThirdPartWeComRoom {
         sb.append(", memberCount=").append(memberCount);
         sb.append(", name=").append(name);
         sb.append(", roomUrl=").append(roomUrl);
+        sb.append(", addUserStatus=").append(addUserStatus);
+        sb.append(", sendStatus=").append(sendStatus);
+        sb.append(", sendTime=").append(sendTime);
         sb.append(", createTime=").append(createTime);
         sb.append(", updateTime=").append(updateTime);
         sb.append("]");

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -36,4 +36,6 @@ public interface WeComThirdPartyService {
     List<ThirdPartWeComStaff> getActiveStaffList();
 
     List<ThirdPartWeComRoom> getStaffRoomList(Long staffId);
+
+    CreateRoomWxResponse createRoom(CreateRoomWxRequest request);
 }

+ 12 - 0
api-module/src/main/java/com/tzld/piaoquan/api/service/impl/WeComThirdPartyServiceImpl.java

@@ -300,4 +300,16 @@ public class WeComThirdPartyServiceImpl implements WeComThirdPartyService {
         return thirdPartWeComRoomMapper.selectByExample(example);
     }
 
+    @Override
+    public CreateRoomWxResponse createRoom(CreateRoomWxRequest request) {
+        String response = apiClient.createRoomWx(request);
+        CommonResponse<CreateRoomWxResponse> commonResponse =
+                JSONObject.parseObject(response, new TypeReference<CommonResponse<CreateRoomWxResponse>>() {});
+        if (commonResponse.getErrcode() != 0) {
+            log.error("create room failed, response: {}", response);
+            return null;
+        }
+        return commonResponse.getData();
+    }
+
 }

+ 50 - 3
api-module/src/main/resources/mapper/wecom/thirdpart/ThirdPartWeComRoomMapper.xml

@@ -10,6 +10,9 @@
     <result column="member_count" jdbcType="INTEGER" property="memberCount" />
     <result column="name" jdbcType="VARCHAR" property="name" />
     <result column="room_url" jdbcType="VARCHAR" property="roomUrl" />
+    <result column="add_user_status" jdbcType="INTEGER" property="addUserStatus" />
+    <result column="send_status" jdbcType="INTEGER" property="sendStatus" />
+    <result column="send_time" jdbcType="VARCHAR" property="sendTime" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
   </resultMap>
@@ -73,7 +76,7 @@
   </sql>
   <sql id="Base_Column_List">
     id, corp_id, staff_id, third_room_id, third_create_user_id, member_count, `name`, 
-    room_url, create_time, update_time
+    room_url, add_user_status, send_status, send_time, create_time, update_time
   </sql>
   <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomExample" resultMap="BaseResultMap">
     select
@@ -111,11 +114,13 @@
   <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoom">
     insert into third_part_we_com_room (id, corp_id, staff_id, 
       third_room_id, third_create_user_id, member_count, 
-      `name`, room_url, create_time, 
+      `name`, room_url, add_user_status, 
+      send_status, send_time, create_time, 
       update_time)
     values (#{id,jdbcType=BIGINT}, #{corpId,jdbcType=BIGINT}, #{staffId,jdbcType=BIGINT}, 
       #{thirdRoomId,jdbcType=VARCHAR}, #{thirdCreateUserId,jdbcType=BIGINT}, #{memberCount,jdbcType=INTEGER}, 
-      #{name,jdbcType=VARCHAR}, #{roomUrl,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{name,jdbcType=VARCHAR}, #{roomUrl,jdbcType=VARCHAR}, #{addUserStatus,jdbcType=INTEGER}, 
+      #{sendStatus,jdbcType=INTEGER}, #{sendTime,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
       #{updateTime,jdbcType=TIMESTAMP})
   </insert>
   <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoom">
@@ -145,6 +150,15 @@
       <if test="roomUrl != null">
         room_url,
       </if>
+      <if test="addUserStatus != null">
+        add_user_status,
+      </if>
+      <if test="sendStatus != null">
+        send_status,
+      </if>
+      <if test="sendTime != null">
+        send_time,
+      </if>
       <if test="createTime != null">
         create_time,
       </if>
@@ -177,6 +191,15 @@
       <if test="roomUrl != null">
         #{roomUrl,jdbcType=VARCHAR},
       </if>
+      <if test="addUserStatus != null">
+        #{addUserStatus,jdbcType=INTEGER},
+      </if>
+      <if test="sendStatus != null">
+        #{sendStatus,jdbcType=INTEGER},
+      </if>
+      <if test="sendTime != null">
+        #{sendTime,jdbcType=VARCHAR},
+      </if>
       <if test="createTime != null">
         #{createTime,jdbcType=TIMESTAMP},
       </if>
@@ -218,6 +241,15 @@
       <if test="record.roomUrl != null">
         room_url = #{record.roomUrl,jdbcType=VARCHAR},
       </if>
+      <if test="record.addUserStatus != null">
+        add_user_status = #{record.addUserStatus,jdbcType=INTEGER},
+      </if>
+      <if test="record.sendStatus != null">
+        send_status = #{record.sendStatus,jdbcType=INTEGER},
+      </if>
+      <if test="record.sendTime != null">
+        send_time = #{record.sendTime,jdbcType=VARCHAR},
+      </if>
       <if test="record.createTime != null">
         create_time = #{record.createTime,jdbcType=TIMESTAMP},
       </if>
@@ -239,6 +271,9 @@
       member_count = #{record.memberCount,jdbcType=INTEGER},
       `name` = #{record.name,jdbcType=VARCHAR},
       room_url = #{record.roomUrl,jdbcType=VARCHAR},
+      add_user_status = #{record.addUserStatus,jdbcType=INTEGER},
+      send_status = #{record.sendStatus,jdbcType=INTEGER},
+      send_time = #{record.sendTime,jdbcType=VARCHAR},
       create_time = #{record.createTime,jdbcType=TIMESTAMP},
       update_time = #{record.updateTime,jdbcType=TIMESTAMP}
     <if test="_parameter != null">
@@ -269,6 +304,15 @@
       <if test="roomUrl != null">
         room_url = #{roomUrl,jdbcType=VARCHAR},
       </if>
+      <if test="addUserStatus != null">
+        add_user_status = #{addUserStatus,jdbcType=INTEGER},
+      </if>
+      <if test="sendStatus != null">
+        send_status = #{sendStatus,jdbcType=INTEGER},
+      </if>
+      <if test="sendTime != null">
+        send_time = #{sendTime,jdbcType=VARCHAR},
+      </if>
       <if test="createTime != null">
         create_time = #{createTime,jdbcType=TIMESTAMP},
       </if>
@@ -287,6 +331,9 @@
       member_count = #{memberCount,jdbcType=INTEGER},
       `name` = #{name,jdbcType=VARCHAR},
       room_url = #{roomUrl,jdbcType=VARCHAR},
+      add_user_status = #{addUserStatus,jdbcType=INTEGER},
+      send_status = #{sendStatus,jdbcType=INTEGER},
+      send_time = #{sendTime,jdbcType=VARCHAR},
       create_time = #{createTime,jdbcType=TIMESTAMP},
       update_time = #{updateTime,jdbcType=TIMESTAMP}
     where id = #{id,jdbcType=BIGINT}

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

@@ -0,0 +1,451 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ThirdPartWeComRoomUserMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomUser">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="third_room_id" jdbcType="VARCHAR" property="thirdRoomId" />
+    <result column="unionid" jdbcType="VARCHAR" property="unionid" />
+    <result column="sex" jdbcType="INTEGER" property="sex" />
+    <result column="mobile" jdbcType="VARCHAR" property="mobile" />
+    <result column="acctid" jdbcType="VARCHAR" property="acctid" />
+    <result column="join_scene" jdbcType="INTEGER" property="joinScene" />
+    <result column="avatar" jdbcType="VARCHAR" property="avatar" />
+    <result column="english_name" jdbcType="VARCHAR" property="englishName" />
+    <result column="realname" jdbcType="VARCHAR" property="realname" />
+    <result column="room_notes" jdbcType="VARCHAR" property="roomNotes" />
+    <result column="join_time" jdbcType="BIGINT" property="joinTime" />
+    <result column="nickname" jdbcType="VARCHAR" property="nickname" />
+    <result column="room_nickname" jdbcType="VARCHAR" property="roomNickname" />
+    <result column="position" jdbcType="VARCHAR" property="position" />
+    <result column="uin" jdbcType="BIGINT" property="uin" />
+    <result column="invite_user_id" jdbcType="BIGINT" property="inviteUserId" />
+    <result column="corp_id" jdbcType="BIGINT" property="corpId" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, third_room_id, unionid, sex, mobile, acctid, join_scene, avatar, english_name, 
+    realname, room_notes, join_time, nickname, room_nickname, `position`, uin, invite_user_id, 
+    corp_id, create_time, update_time
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomUserExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from third_part_we_com_room_user
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    <if test="page != null">
+      limit #{page.offset} , #{page.pageSize}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from third_part_we_com_room_user
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from third_part_we_com_room_user
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomUserExample">
+    delete from third_part_we_com_room_user
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomUser">
+    insert into third_part_we_com_room_user (id, third_room_id, unionid, 
+      sex, mobile, acctid, 
+      join_scene, avatar, english_name, 
+      realname, room_notes, join_time, 
+      nickname, room_nickname, `position`, 
+      uin, invite_user_id, corp_id, 
+      create_time, update_time)
+    values (#{id,jdbcType=BIGINT}, #{thirdRoomId,jdbcType=VARCHAR}, #{unionid,jdbcType=VARCHAR}, 
+      #{sex,jdbcType=INTEGER}, #{mobile,jdbcType=VARCHAR}, #{acctid,jdbcType=VARCHAR}, 
+      #{joinScene,jdbcType=INTEGER}, #{avatar,jdbcType=VARCHAR}, #{englishName,jdbcType=VARCHAR}, 
+      #{realname,jdbcType=VARCHAR}, #{roomNotes,jdbcType=VARCHAR}, #{joinTime,jdbcType=BIGINT}, 
+      #{nickname,jdbcType=VARCHAR}, #{roomNickname,jdbcType=VARCHAR}, #{position,jdbcType=VARCHAR}, 
+      #{uin,jdbcType=BIGINT}, #{inviteUserId,jdbcType=BIGINT}, #{corpId,jdbcType=BIGINT}, 
+      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomUser">
+    insert into third_part_we_com_room_user
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="thirdRoomId != null">
+        third_room_id,
+      </if>
+      <if test="unionid != null">
+        unionid,
+      </if>
+      <if test="sex != null">
+        sex,
+      </if>
+      <if test="mobile != null">
+        mobile,
+      </if>
+      <if test="acctid != null">
+        acctid,
+      </if>
+      <if test="joinScene != null">
+        join_scene,
+      </if>
+      <if test="avatar != null">
+        avatar,
+      </if>
+      <if test="englishName != null">
+        english_name,
+      </if>
+      <if test="realname != null">
+        realname,
+      </if>
+      <if test="roomNotes != null">
+        room_notes,
+      </if>
+      <if test="joinTime != null">
+        join_time,
+      </if>
+      <if test="nickname != null">
+        nickname,
+      </if>
+      <if test="roomNickname != null">
+        room_nickname,
+      </if>
+      <if test="position != null">
+        `position`,
+      </if>
+      <if test="uin != null">
+        uin,
+      </if>
+      <if test="inviteUserId != null">
+        invite_user_id,
+      </if>
+      <if test="corpId != null">
+        corp_id,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="updateTime != null">
+        update_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=BIGINT},
+      </if>
+      <if test="thirdRoomId != null">
+        #{thirdRoomId,jdbcType=VARCHAR},
+      </if>
+      <if test="unionid != null">
+        #{unionid,jdbcType=VARCHAR},
+      </if>
+      <if test="sex != null">
+        #{sex,jdbcType=INTEGER},
+      </if>
+      <if test="mobile != null">
+        #{mobile,jdbcType=VARCHAR},
+      </if>
+      <if test="acctid != null">
+        #{acctid,jdbcType=VARCHAR},
+      </if>
+      <if test="joinScene != null">
+        #{joinScene,jdbcType=INTEGER},
+      </if>
+      <if test="avatar != null">
+        #{avatar,jdbcType=VARCHAR},
+      </if>
+      <if test="englishName != null">
+        #{englishName,jdbcType=VARCHAR},
+      </if>
+      <if test="realname != null">
+        #{realname,jdbcType=VARCHAR},
+      </if>
+      <if test="roomNotes != null">
+        #{roomNotes,jdbcType=VARCHAR},
+      </if>
+      <if test="joinTime != null">
+        #{joinTime,jdbcType=BIGINT},
+      </if>
+      <if test="nickname != null">
+        #{nickname,jdbcType=VARCHAR},
+      </if>
+      <if test="roomNickname != null">
+        #{roomNickname,jdbcType=VARCHAR},
+      </if>
+      <if test="position != null">
+        #{position,jdbcType=VARCHAR},
+      </if>
+      <if test="uin != null">
+        #{uin,jdbcType=BIGINT},
+      </if>
+      <if test="inviteUserId != null">
+        #{inviteUserId,jdbcType=BIGINT},
+      </if>
+      <if test="corpId != null">
+        #{corpId,jdbcType=BIGINT},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomUserExample" resultType="java.lang.Long">
+    select count(*) from third_part_we_com_room_user
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update third_part_we_com_room_user
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.thirdRoomId != null">
+        third_room_id = #{record.thirdRoomId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.unionid != null">
+        unionid = #{record.unionid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.sex != null">
+        sex = #{record.sex,jdbcType=INTEGER},
+      </if>
+      <if test="record.mobile != null">
+        mobile = #{record.mobile,jdbcType=VARCHAR},
+      </if>
+      <if test="record.acctid != null">
+        acctid = #{record.acctid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.joinScene != null">
+        join_scene = #{record.joinScene,jdbcType=INTEGER},
+      </if>
+      <if test="record.avatar != null">
+        avatar = #{record.avatar,jdbcType=VARCHAR},
+      </if>
+      <if test="record.englishName != null">
+        english_name = #{record.englishName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.realname != null">
+        realname = #{record.realname,jdbcType=VARCHAR},
+      </if>
+      <if test="record.roomNotes != null">
+        room_notes = #{record.roomNotes,jdbcType=VARCHAR},
+      </if>
+      <if test="record.joinTime != null">
+        join_time = #{record.joinTime,jdbcType=BIGINT},
+      </if>
+      <if test="record.nickname != null">
+        nickname = #{record.nickname,jdbcType=VARCHAR},
+      </if>
+      <if test="record.roomNickname != null">
+        room_nickname = #{record.roomNickname,jdbcType=VARCHAR},
+      </if>
+      <if test="record.position != null">
+        `position` = #{record.position,jdbcType=VARCHAR},
+      </if>
+      <if test="record.uin != null">
+        uin = #{record.uin,jdbcType=BIGINT},
+      </if>
+      <if test="record.inviteUserId != null">
+        invite_user_id = #{record.inviteUserId,jdbcType=BIGINT},
+      </if>
+      <if test="record.corpId != null">
+        corp_id = #{record.corpId,jdbcType=BIGINT},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.updateTime != null">
+        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update third_part_we_com_room_user
+    set id = #{record.id,jdbcType=BIGINT},
+      third_room_id = #{record.thirdRoomId,jdbcType=VARCHAR},
+      unionid = #{record.unionid,jdbcType=VARCHAR},
+      sex = #{record.sex,jdbcType=INTEGER},
+      mobile = #{record.mobile,jdbcType=VARCHAR},
+      acctid = #{record.acctid,jdbcType=VARCHAR},
+      join_scene = #{record.joinScene,jdbcType=INTEGER},
+      avatar = #{record.avatar,jdbcType=VARCHAR},
+      english_name = #{record.englishName,jdbcType=VARCHAR},
+      realname = #{record.realname,jdbcType=VARCHAR},
+      room_notes = #{record.roomNotes,jdbcType=VARCHAR},
+      join_time = #{record.joinTime,jdbcType=BIGINT},
+      nickname = #{record.nickname,jdbcType=VARCHAR},
+      room_nickname = #{record.roomNickname,jdbcType=VARCHAR},
+      `position` = #{record.position,jdbcType=VARCHAR},
+      uin = #{record.uin,jdbcType=BIGINT},
+      invite_user_id = #{record.inviteUserId,jdbcType=BIGINT},
+      corp_id = #{record.corpId,jdbcType=BIGINT},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      update_time = #{record.updateTime,jdbcType=TIMESTAMP}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomUser">
+    update third_part_we_com_room_user
+    <set>
+      <if test="thirdRoomId != null">
+        third_room_id = #{thirdRoomId,jdbcType=VARCHAR},
+      </if>
+      <if test="unionid != null">
+        unionid = #{unionid,jdbcType=VARCHAR},
+      </if>
+      <if test="sex != null">
+        sex = #{sex,jdbcType=INTEGER},
+      </if>
+      <if test="mobile != null">
+        mobile = #{mobile,jdbcType=VARCHAR},
+      </if>
+      <if test="acctid != null">
+        acctid = #{acctid,jdbcType=VARCHAR},
+      </if>
+      <if test="joinScene != null">
+        join_scene = #{joinScene,jdbcType=INTEGER},
+      </if>
+      <if test="avatar != null">
+        avatar = #{avatar,jdbcType=VARCHAR},
+      </if>
+      <if test="englishName != null">
+        english_name = #{englishName,jdbcType=VARCHAR},
+      </if>
+      <if test="realname != null">
+        realname = #{realname,jdbcType=VARCHAR},
+      </if>
+      <if test="roomNotes != null">
+        room_notes = #{roomNotes,jdbcType=VARCHAR},
+      </if>
+      <if test="joinTime != null">
+        join_time = #{joinTime,jdbcType=BIGINT},
+      </if>
+      <if test="nickname != null">
+        nickname = #{nickname,jdbcType=VARCHAR},
+      </if>
+      <if test="roomNickname != null">
+        room_nickname = #{roomNickname,jdbcType=VARCHAR},
+      </if>
+      <if test="position != null">
+        `position` = #{position,jdbcType=VARCHAR},
+      </if>
+      <if test="uin != null">
+        uin = #{uin,jdbcType=BIGINT},
+      </if>
+      <if test="inviteUserId != null">
+        invite_user_id = #{inviteUserId,jdbcType=BIGINT},
+      </if>
+      <if test="corpId != null">
+        corp_id = #{corpId,jdbcType=BIGINT},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComRoomUser">
+    update third_part_we_com_room_user
+    set third_room_id = #{thirdRoomId,jdbcType=VARCHAR},
+      unionid = #{unionid,jdbcType=VARCHAR},
+      sex = #{sex,jdbcType=INTEGER},
+      mobile = #{mobile,jdbcType=VARCHAR},
+      acctid = #{acctid,jdbcType=VARCHAR},
+      join_scene = #{joinScene,jdbcType=INTEGER},
+      avatar = #{avatar,jdbcType=VARCHAR},
+      english_name = #{englishName,jdbcType=VARCHAR},
+      realname = #{realname,jdbcType=VARCHAR},
+      room_notes = #{roomNotes,jdbcType=VARCHAR},
+      join_time = #{joinTime,jdbcType=BIGINT},
+      nickname = #{nickname,jdbcType=VARCHAR},
+      room_nickname = #{roomNickname,jdbcType=VARCHAR},
+      `position` = #{position,jdbcType=VARCHAR},
+      uin = #{uin,jdbcType=BIGINT},
+      invite_user_id = #{inviteUserId,jdbcType=BIGINT},
+      corp_id = #{corpId,jdbcType=BIGINT},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_time = #{updateTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

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

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

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

@@ -0,0 +1,498 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ThirdPartWeComStaffUserMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffUser">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="third_staff_id" jdbcType="BIGINT" property="thirdStaffId" />
+    <result column="unionid" jdbcType="VARCHAR" property="unionid" />
+    <result column="sex" jdbcType="INTEGER" property="sex" />
+    <result column="mobile" jdbcType="VARCHAR" property="mobile" />
+    <result column="company_remark" jdbcType="VARCHAR" property="companyRemark" />
+    <result column="acctid" jdbcType="VARCHAR" property="acctid" />
+    <result column="avatar" jdbcType="VARCHAR" property="avatar" />
+    <result column="source" jdbcType="INTEGER" property="source" />
+    <result column="english_name" jdbcType="VARCHAR" property="englishName" />
+    <result column="remark_phone" jdbcType="CHAR" property="remarkPhone" />
+    <result column="realname" jdbcType="VARCHAR" property="realname" />
+    <result column="real_remarks" jdbcType="VARCHAR" property="realRemarks" />
+    <result column="labelid" jdbcType="CHAR" property="labelid" />
+    <result column="user_id" jdbcType="BIGINT" property="userId" />
+    <result column="nickname" jdbcType="VARCHAR" property="nickname" />
+    <result column="position" jdbcType="VARCHAR" property="position" />
+    <result column="corp_id" jdbcType="BIGINT" property="corpId" />
+    <result column="remarks" jdbcType="VARCHAR" property="remarks" />
+    <result column="seq" jdbcType="INTEGER" property="seq" />
+    <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, third_staff_id, unionid, sex, mobile, company_remark, acctid, avatar, `source`, 
+    english_name, remark_phone, realname, real_remarks, labelid, user_id, nickname, `position`, 
+    corp_id, remarks, seq, `status`, create_time, update_time
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffUserExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from third_part_we_com_staff_user
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    <if test="page != null">
+      limit #{page.offset} , #{page.pageSize}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from third_part_we_com_staff_user
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from third_part_we_com_staff_user
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffUserExample">
+    delete from third_part_we_com_staff_user
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffUser">
+    insert into third_part_we_com_staff_user (id, third_staff_id, unionid, 
+      sex, mobile, company_remark, 
+      acctid, avatar, `source`, 
+      english_name, remark_phone, realname, 
+      real_remarks, labelid, user_id, 
+      nickname, `position`, corp_id, 
+      remarks, seq, `status`, 
+      create_time, update_time)
+    values (#{id,jdbcType=BIGINT}, #{thirdStaffId,jdbcType=BIGINT}, #{unionid,jdbcType=VARCHAR}, 
+      #{sex,jdbcType=INTEGER}, #{mobile,jdbcType=VARCHAR}, #{companyRemark,jdbcType=VARCHAR}, 
+      #{acctid,jdbcType=VARCHAR}, #{avatar,jdbcType=VARCHAR}, #{source,jdbcType=INTEGER}, 
+      #{englishName,jdbcType=VARCHAR}, #{remarkPhone,jdbcType=CHAR}, #{realname,jdbcType=VARCHAR}, 
+      #{realRemarks,jdbcType=VARCHAR}, #{labelid,jdbcType=CHAR}, #{userId,jdbcType=BIGINT}, 
+      #{nickname,jdbcType=VARCHAR}, #{position,jdbcType=VARCHAR}, #{corpId,jdbcType=BIGINT}, 
+      #{remarks,jdbcType=VARCHAR}, #{seq,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, 
+      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffUser">
+    insert into third_part_we_com_staff_user
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="thirdStaffId != null">
+        third_staff_id,
+      </if>
+      <if test="unionid != null">
+        unionid,
+      </if>
+      <if test="sex != null">
+        sex,
+      </if>
+      <if test="mobile != null">
+        mobile,
+      </if>
+      <if test="companyRemark != null">
+        company_remark,
+      </if>
+      <if test="acctid != null">
+        acctid,
+      </if>
+      <if test="avatar != null">
+        avatar,
+      </if>
+      <if test="source != null">
+        `source`,
+      </if>
+      <if test="englishName != null">
+        english_name,
+      </if>
+      <if test="remarkPhone != null">
+        remark_phone,
+      </if>
+      <if test="realname != null">
+        realname,
+      </if>
+      <if test="realRemarks != null">
+        real_remarks,
+      </if>
+      <if test="labelid != null">
+        labelid,
+      </if>
+      <if test="userId != null">
+        user_id,
+      </if>
+      <if test="nickname != null">
+        nickname,
+      </if>
+      <if test="position != null">
+        `position`,
+      </if>
+      <if test="corpId != null">
+        corp_id,
+      </if>
+      <if test="remarks != null">
+        remarks,
+      </if>
+      <if test="seq != null">
+        seq,
+      </if>
+      <if test="status != null">
+        `status`,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="updateTime != null">
+        update_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=BIGINT},
+      </if>
+      <if test="thirdStaffId != null">
+        #{thirdStaffId,jdbcType=BIGINT},
+      </if>
+      <if test="unionid != null">
+        #{unionid,jdbcType=VARCHAR},
+      </if>
+      <if test="sex != null">
+        #{sex,jdbcType=INTEGER},
+      </if>
+      <if test="mobile != null">
+        #{mobile,jdbcType=VARCHAR},
+      </if>
+      <if test="companyRemark != null">
+        #{companyRemark,jdbcType=VARCHAR},
+      </if>
+      <if test="acctid != null">
+        #{acctid,jdbcType=VARCHAR},
+      </if>
+      <if test="avatar != null">
+        #{avatar,jdbcType=VARCHAR},
+      </if>
+      <if test="source != null">
+        #{source,jdbcType=INTEGER},
+      </if>
+      <if test="englishName != null">
+        #{englishName,jdbcType=VARCHAR},
+      </if>
+      <if test="remarkPhone != null">
+        #{remarkPhone,jdbcType=CHAR},
+      </if>
+      <if test="realname != null">
+        #{realname,jdbcType=VARCHAR},
+      </if>
+      <if test="realRemarks != null">
+        #{realRemarks,jdbcType=VARCHAR},
+      </if>
+      <if test="labelid != null">
+        #{labelid,jdbcType=CHAR},
+      </if>
+      <if test="userId != null">
+        #{userId,jdbcType=BIGINT},
+      </if>
+      <if test="nickname != null">
+        #{nickname,jdbcType=VARCHAR},
+      </if>
+      <if test="position != null">
+        #{position,jdbcType=VARCHAR},
+      </if>
+      <if test="corpId != null">
+        #{corpId,jdbcType=BIGINT},
+      </if>
+      <if test="remarks != null">
+        #{remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="seq != null">
+        #{seq,jdbcType=INTEGER},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffUserExample" resultType="java.lang.Long">
+    select count(*) from third_part_we_com_staff_user
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update third_part_we_com_staff_user
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.thirdStaffId != null">
+        third_staff_id = #{record.thirdStaffId,jdbcType=BIGINT},
+      </if>
+      <if test="record.unionid != null">
+        unionid = #{record.unionid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.sex != null">
+        sex = #{record.sex,jdbcType=INTEGER},
+      </if>
+      <if test="record.mobile != null">
+        mobile = #{record.mobile,jdbcType=VARCHAR},
+      </if>
+      <if test="record.companyRemark != null">
+        company_remark = #{record.companyRemark,jdbcType=VARCHAR},
+      </if>
+      <if test="record.acctid != null">
+        acctid = #{record.acctid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.avatar != null">
+        avatar = #{record.avatar,jdbcType=VARCHAR},
+      </if>
+      <if test="record.source != null">
+        `source` = #{record.source,jdbcType=INTEGER},
+      </if>
+      <if test="record.englishName != null">
+        english_name = #{record.englishName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.remarkPhone != null">
+        remark_phone = #{record.remarkPhone,jdbcType=CHAR},
+      </if>
+      <if test="record.realname != null">
+        realname = #{record.realname,jdbcType=VARCHAR},
+      </if>
+      <if test="record.realRemarks != null">
+        real_remarks = #{record.realRemarks,jdbcType=VARCHAR},
+      </if>
+      <if test="record.labelid != null">
+        labelid = #{record.labelid,jdbcType=CHAR},
+      </if>
+      <if test="record.userId != null">
+        user_id = #{record.userId,jdbcType=BIGINT},
+      </if>
+      <if test="record.nickname != null">
+        nickname = #{record.nickname,jdbcType=VARCHAR},
+      </if>
+      <if test="record.position != null">
+        `position` = #{record.position,jdbcType=VARCHAR},
+      </if>
+      <if test="record.corpId != null">
+        corp_id = #{record.corpId,jdbcType=BIGINT},
+      </if>
+      <if test="record.remarks != null">
+        remarks = #{record.remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="record.seq != null">
+        seq = #{record.seq,jdbcType=INTEGER},
+      </if>
+      <if test="record.status != null">
+        `status` = #{record.status,jdbcType=INTEGER},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.updateTime != null">
+        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update third_part_we_com_staff_user
+    set id = #{record.id,jdbcType=BIGINT},
+      third_staff_id = #{record.thirdStaffId,jdbcType=BIGINT},
+      unionid = #{record.unionid,jdbcType=VARCHAR},
+      sex = #{record.sex,jdbcType=INTEGER},
+      mobile = #{record.mobile,jdbcType=VARCHAR},
+      company_remark = #{record.companyRemark,jdbcType=VARCHAR},
+      acctid = #{record.acctid,jdbcType=VARCHAR},
+      avatar = #{record.avatar,jdbcType=VARCHAR},
+      `source` = #{record.source,jdbcType=INTEGER},
+      english_name = #{record.englishName,jdbcType=VARCHAR},
+      remark_phone = #{record.remarkPhone,jdbcType=CHAR},
+      realname = #{record.realname,jdbcType=VARCHAR},
+      real_remarks = #{record.realRemarks,jdbcType=VARCHAR},
+      labelid = #{record.labelid,jdbcType=CHAR},
+      user_id = #{record.userId,jdbcType=BIGINT},
+      nickname = #{record.nickname,jdbcType=VARCHAR},
+      `position` = #{record.position,jdbcType=VARCHAR},
+      corp_id = #{record.corpId,jdbcType=BIGINT},
+      remarks = #{record.remarks,jdbcType=VARCHAR},
+      seq = #{record.seq,jdbcType=INTEGER},
+      `status` = #{record.status,jdbcType=INTEGER},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      update_time = #{record.updateTime,jdbcType=TIMESTAMP}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffUser">
+    update third_part_we_com_staff_user
+    <set>
+      <if test="thirdStaffId != null">
+        third_staff_id = #{thirdStaffId,jdbcType=BIGINT},
+      </if>
+      <if test="unionid != null">
+        unionid = #{unionid,jdbcType=VARCHAR},
+      </if>
+      <if test="sex != null">
+        sex = #{sex,jdbcType=INTEGER},
+      </if>
+      <if test="mobile != null">
+        mobile = #{mobile,jdbcType=VARCHAR},
+      </if>
+      <if test="companyRemark != null">
+        company_remark = #{companyRemark,jdbcType=VARCHAR},
+      </if>
+      <if test="acctid != null">
+        acctid = #{acctid,jdbcType=VARCHAR},
+      </if>
+      <if test="avatar != null">
+        avatar = #{avatar,jdbcType=VARCHAR},
+      </if>
+      <if test="source != null">
+        `source` = #{source,jdbcType=INTEGER},
+      </if>
+      <if test="englishName != null">
+        english_name = #{englishName,jdbcType=VARCHAR},
+      </if>
+      <if test="remarkPhone != null">
+        remark_phone = #{remarkPhone,jdbcType=CHAR},
+      </if>
+      <if test="realname != null">
+        realname = #{realname,jdbcType=VARCHAR},
+      </if>
+      <if test="realRemarks != null">
+        real_remarks = #{realRemarks,jdbcType=VARCHAR},
+      </if>
+      <if test="labelid != null">
+        labelid = #{labelid,jdbcType=CHAR},
+      </if>
+      <if test="userId != null">
+        user_id = #{userId,jdbcType=BIGINT},
+      </if>
+      <if test="nickname != null">
+        nickname = #{nickname,jdbcType=VARCHAR},
+      </if>
+      <if test="position != null">
+        `position` = #{position,jdbcType=VARCHAR},
+      </if>
+      <if test="corpId != null">
+        corp_id = #{corpId,jdbcType=BIGINT},
+      </if>
+      <if test="remarks != null">
+        remarks = #{remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="seq != null">
+        seq = #{seq,jdbcType=INTEGER},
+      </if>
+      <if test="status != null">
+        `status` = #{status,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffUser">
+    update third_part_we_com_staff_user
+    set third_staff_id = #{thirdStaffId,jdbcType=BIGINT},
+      unionid = #{unionid,jdbcType=VARCHAR},
+      sex = #{sex,jdbcType=INTEGER},
+      mobile = #{mobile,jdbcType=VARCHAR},
+      company_remark = #{companyRemark,jdbcType=VARCHAR},
+      acctid = #{acctid,jdbcType=VARCHAR},
+      avatar = #{avatar,jdbcType=VARCHAR},
+      `source` = #{source,jdbcType=INTEGER},
+      english_name = #{englishName,jdbcType=VARCHAR},
+      remark_phone = #{remarkPhone,jdbcType=CHAR},
+      realname = #{realname,jdbcType=VARCHAR},
+      real_remarks = #{realRemarks,jdbcType=VARCHAR},
+      labelid = #{labelid,jdbcType=CHAR},
+      user_id = #{userId,jdbcType=BIGINT},
+      nickname = #{nickname,jdbcType=VARCHAR},
+      `position` = #{position,jdbcType=VARCHAR},
+      corp_id = #{corpId,jdbcType=BIGINT},
+      remarks = #{remarks,jdbcType=VARCHAR},
+      seq = #{seq,jdbcType=INTEGER},
+      `status` = #{status,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_time = #{updateTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

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

@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.tzld.piaoquan.api.dao.mapper.wecom.thirdpart.ext.ThirdPartWeComMapperExt">
+
+  <insert id="batchInsertThirdPartWeComRoomUser">
+    insert into third_part_we_com_room_user (id, third_room_id, unionid, ex, mobile, acctid, join_scene, avatar, 
+       english_name, realname, room_notes, join_time, nickname, room_nickname, `position`, uin, invite_user_id, corp_id,
+       create_time, update_time)
+    values
+    <foreach collection="records" item="item" separator=",">
+      (#{item.id}, #{item.thirdRoomId}, #{item.unionid}, #{item.sex}, #{item.mobile}, #{item.acctid}, #{item.joinScene},
+       #{item.avatar}, #{item.englishName}, #{item.realname}, #{item.roomNotes}, #{item.joinTime}, #{item.nickname},
+       #{item.roomNickname}, #{item.position}, #{item.uin}, #{item.inviteUserId}, #{item.corpId}, #{item.createTime},
+       #{item.updateTime})
+    </foreach>
+  </insert>
+
+  <insert id="batchInsertThirdPartWeComStaffUser">
+    insert into third_part_we_com_staff_user (id, third_room_id, unionid, ex, mobile, acctid, join_scene, avatar,
+       english_name, realname, room_notes, join_time, nickname, room_nickname, `position`, uin, invite_user_id, corp_id,
+       create_time, update_time)
+    values
+    <foreach collection="records" item="item" separator=",">
+      (#{item.id}, #{item.thirdRoomId}, #{item.unionid}, #{item.sex}, #{item.mobile}, #{item.acctid}, #{item.joinScene},
+       #{item.avatar}, #{item.englishName}, #{item.realname}, #{item.roomNotes}, #{item.joinTime}, #{item.nickname},
+       #{item.roomNickname}, #{item.position}, #{item.uin}, #{item.inviteUserId}, #{item.corpId}, #{item.createTime},
+       #{item.updateTime})
+    </foreach>
+  </insert>
+
+  <select id="getNoGroupStaffUserList"
+          resultType="com.tzld.piaoquan.api.model.po.wecom.thirdpart.ThirdPartWeComStaffUser">
+      select staff_user.*
+      from third_part_we_com_staff staff
+       join third_part_we_com_staff_user staff_user on staff.third_staff_id = staff_user.third_staff_id
+       join third_part_we_com_room room on staff.id = room.staff_id
+       left join third_part_we_com_room_user room_user on room.third_room_id = room_user.third_room_id
+      where staff.third_staff_id = #{thirdStaffId}
+        and room_user.third_room_id is null
+  </select>
+
+</mapper>

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

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