فهرست منبع

feat:添加客户群自动踢人开关管理功能

zhaohaipeng 1 ماه پیش
والد
کامیت
5302eb9094

+ 96 - 0
risk-control-core/src/main/java/com/tzld/piaoquan/risk/control/dao/mapper/WorkWechatRoomInfoMapper.java

@@ -0,0 +1,96 @@
+package com.tzld.piaoquan.risk.control.dao.mapper;
+
+import com.tzld.piaoquan.risk.control.model.po.WorkWechatRoomInfo;
+import com.tzld.piaoquan.risk.control.model.po.WorkWechatRoomInfoExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface WorkWechatRoomInfoMapper {
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table work_wechat_room_info
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    long countByExample(WorkWechatRoomInfoExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table work_wechat_room_info
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    int deleteByExample(WorkWechatRoomInfoExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table work_wechat_room_info
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    int deleteByPrimaryKey(Long id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table work_wechat_room_info
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    int insert(WorkWechatRoomInfo record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table work_wechat_room_info
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    int insertSelective(WorkWechatRoomInfo record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table work_wechat_room_info
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    List<WorkWechatRoomInfo> selectByExample(WorkWechatRoomInfoExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table work_wechat_room_info
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    WorkWechatRoomInfo selectByPrimaryKey(Long id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table work_wechat_room_info
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    int updateByExampleSelective(@Param("record") WorkWechatRoomInfo record, @Param("example") WorkWechatRoomInfoExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table work_wechat_room_info
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    int updateByExample(@Param("record") WorkWechatRoomInfo record, @Param("example") WorkWechatRoomInfoExample example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table work_wechat_room_info
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    int updateByPrimaryKeySelective(WorkWechatRoomInfo record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table work_wechat_room_info
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    int updateByPrimaryKey(WorkWechatRoomInfo record);
+}

+ 4 - 2
risk-control-core/src/main/java/com/tzld/piaoquan/risk/control/model/dto/WorkWechatRoomInfo.java → risk-control-core/src/main/java/com/tzld/piaoquan/risk/control/model/dto/WorkWechatRoomDTO.java

@@ -3,10 +3,12 @@ package com.tzld.piaoquan.risk.control.model.dto;
 import lombok.Data;
 
 @Data
-public class WorkWechatRoomInfo {
+public class WorkWechatRoomDTO {
 
     private String roomId;
 
-    private String autoRemoveUserStatus;
+    private String roomName;
+
+    private Integer autoRemoveUserStatus;
 
 }

+ 314 - 0
risk-control-core/src/main/java/com/tzld/piaoquan/risk/control/model/po/WorkWechatRoomInfo.java

@@ -0,0 +1,314 @@
+package com.tzld.piaoquan.risk.control.model.po;
+
+import java.util.Date;
+
+/**
+ *
+ * This class was generated by MyBatis Generator.
+ * This class corresponds to the database table work_wechat_room_info
+ */
+public class WorkWechatRoomInfo {
+    /**
+     * Database Column Remarks:
+     *   主键
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column work_wechat_room_info.id
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    private Long id;
+
+    /**
+     * Database Column Remarks:
+     *   全局唯一标识
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column work_wechat_room_info.uuid
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    private String uuid;
+
+    /**
+     * Database Column Remarks:
+     *   群ID
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column work_wechat_room_info.room_id
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    private String roomId;
+
+    /**
+     * Database Column Remarks:
+     *   自动踢人开关
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column work_wechat_room_info.auto_remove_user_status
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    private Integer autoRemoveUserStatus;
+
+    /**
+     * Database Column Remarks:
+     *   创建人
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column work_wechat_room_info.create_user
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    private Long createUser;
+
+    /**
+     * Database Column Remarks:
+     *   更新人
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column work_wechat_room_info.update_user
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    private Long updateUser;
+
+    /**
+     * Database Column Remarks:
+     *   创建时间
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column work_wechat_room_info.create_time
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    private Date createTime;
+
+    /**
+     * Database Column Remarks:
+     *   更新时间
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column work_wechat_room_info.update_time
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    private Date updateTime;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column work_wechat_room_info.id
+     *
+     * @return the value of work_wechat_room_info.id
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column work_wechat_room_info.id
+     *
+     * @param id the value for work_wechat_room_info.id
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column work_wechat_room_info.uuid
+     *
+     * @return the value of work_wechat_room_info.uuid
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    public String getUuid() {
+        return uuid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column work_wechat_room_info.uuid
+     *
+     * @param uuid the value for work_wechat_room_info.uuid
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    public void setUuid(String uuid) {
+        this.uuid = uuid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column work_wechat_room_info.room_id
+     *
+     * @return the value of work_wechat_room_info.room_id
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    public String getRoomId() {
+        return roomId;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column work_wechat_room_info.room_id
+     *
+     * @param roomId the value for work_wechat_room_info.room_id
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    public void setRoomId(String roomId) {
+        this.roomId = roomId;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column work_wechat_room_info.auto_remove_user_status
+     *
+     * @return the value of work_wechat_room_info.auto_remove_user_status
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    public Integer getAutoRemoveUserStatus() {
+        return autoRemoveUserStatus;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column work_wechat_room_info.auto_remove_user_status
+     *
+     * @param autoRemoveUserStatus the value for work_wechat_room_info.auto_remove_user_status
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    public void setAutoRemoveUserStatus(Integer autoRemoveUserStatus) {
+        this.autoRemoveUserStatus = autoRemoveUserStatus;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column work_wechat_room_info.create_user
+     *
+     * @return the value of work_wechat_room_info.create_user
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    public Long getCreateUser() {
+        return createUser;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column work_wechat_room_info.create_user
+     *
+     * @param createUser the value for work_wechat_room_info.create_user
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    public void setCreateUser(Long createUser) {
+        this.createUser = createUser;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column work_wechat_room_info.update_user
+     *
+     * @return the value of work_wechat_room_info.update_user
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    public Long getUpdateUser() {
+        return updateUser;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column work_wechat_room_info.update_user
+     *
+     * @param updateUser the value for work_wechat_room_info.update_user
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    public void setUpdateUser(Long updateUser) {
+        this.updateUser = updateUser;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column work_wechat_room_info.create_time
+     *
+     * @return the value of work_wechat_room_info.create_time
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column work_wechat_room_info.create_time
+     *
+     * @param createTime the value for work_wechat_room_info.create_time
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column work_wechat_room_info.update_time
+     *
+     * @return the value of work_wechat_room_info.update_time
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column work_wechat_room_info.update_time
+     *
+     * @param updateTime the value for work_wechat_room_info.update_time
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table work_wechat_room_info
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    @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(", uuid=").append(uuid);
+        sb.append(", roomId=").append(roomId);
+        sb.append(", autoRemoveUserStatus=").append(autoRemoveUserStatus);
+        sb.append(", createUser=").append(createUser);
+        sb.append(", updateUser=").append(updateUser);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 832 - 0
risk-control-core/src/main/java/com/tzld/piaoquan/risk/control/model/po/WorkWechatRoomInfoExample.java

@@ -0,0 +1,832 @@
+package com.tzld.piaoquan.risk.control.model.po;
+
+import com.tzld.piaoquan.risk.control.model.dto.Page;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class WorkWechatRoomInfoExample {
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table work_wechat_room_info
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    protected String orderByClause;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table work_wechat_room_info
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    protected boolean distinct;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table work_wechat_room_info
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    protected List<Criteria> oredCriteria;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table work_wechat_room_info
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    protected Page page;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table work_wechat_room_info
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    public WorkWechatRoomInfoExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table work_wechat_room_info
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table work_wechat_room_info
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table work_wechat_room_info
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table work_wechat_room_info
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table work_wechat_room_info
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table work_wechat_room_info
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table work_wechat_room_info
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table work_wechat_room_info
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table work_wechat_room_info
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table work_wechat_room_info
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table work_wechat_room_info
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    public void setPage(Page page) {
+        this.page=page;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table work_wechat_room_info
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    public Page getPage() {
+        return page;
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table work_wechat_room_info
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    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 andUuidIsNull() {
+            addCriterion("uuid is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUuidIsNotNull() {
+            addCriterion("uuid is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUuidEqualTo(String value) {
+            addCriterion("uuid =", value, "uuid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUuidNotEqualTo(String value) {
+            addCriterion("uuid <>", value, "uuid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUuidGreaterThan(String value) {
+            addCriterion("uuid >", value, "uuid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUuidGreaterThanOrEqualTo(String value) {
+            addCriterion("uuid >=", value, "uuid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUuidLessThan(String value) {
+            addCriterion("uuid <", value, "uuid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUuidLessThanOrEqualTo(String value) {
+            addCriterion("uuid <=", value, "uuid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUuidLike(String value) {
+            addCriterion("uuid like", value, "uuid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUuidNotLike(String value) {
+            addCriterion("uuid not like", value, "uuid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUuidIn(List<String> values) {
+            addCriterion("uuid in", values, "uuid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUuidNotIn(List<String> values) {
+            addCriterion("uuid not in", values, "uuid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUuidBetween(String value1, String value2) {
+            addCriterion("uuid between", value1, value2, "uuid");
+            return (Criteria) this;
+        }
+
+        public Criteria andUuidNotBetween(String value1, String value2) {
+            addCriterion("uuid not between", value1, value2, "uuid");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdIsNull() {
+            addCriterion("room_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdIsNotNull() {
+            addCriterion("room_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdEqualTo(String value) {
+            addCriterion("room_id =", value, "roomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdNotEqualTo(String value) {
+            addCriterion("room_id <>", value, "roomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdGreaterThan(String value) {
+            addCriterion("room_id >", value, "roomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdGreaterThanOrEqualTo(String value) {
+            addCriterion("room_id >=", value, "roomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdLessThan(String value) {
+            addCriterion("room_id <", value, "roomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdLessThanOrEqualTo(String value) {
+            addCriterion("room_id <=", value, "roomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdLike(String value) {
+            addCriterion("room_id like", value, "roomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdNotLike(String value) {
+            addCriterion("room_id not like", value, "roomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdIn(List<String> values) {
+            addCriterion("room_id in", values, "roomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdNotIn(List<String> values) {
+            addCriterion("room_id not in", values, "roomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdBetween(String value1, String value2) {
+            addCriterion("room_id between", value1, value2, "roomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdNotBetween(String value1, String value2) {
+            addCriterion("room_id not between", value1, value2, "roomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andAutoRemoveUserStatusIsNull() {
+            addCriterion("auto_remove_user_status is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAutoRemoveUserStatusIsNotNull() {
+            addCriterion("auto_remove_user_status is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAutoRemoveUserStatusEqualTo(Integer value) {
+            addCriterion("auto_remove_user_status =", value, "autoRemoveUserStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andAutoRemoveUserStatusNotEqualTo(Integer value) {
+            addCriterion("auto_remove_user_status <>", value, "autoRemoveUserStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andAutoRemoveUserStatusGreaterThan(Integer value) {
+            addCriterion("auto_remove_user_status >", value, "autoRemoveUserStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andAutoRemoveUserStatusGreaterThanOrEqualTo(Integer value) {
+            addCriterion("auto_remove_user_status >=", value, "autoRemoveUserStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andAutoRemoveUserStatusLessThan(Integer value) {
+            addCriterion("auto_remove_user_status <", value, "autoRemoveUserStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andAutoRemoveUserStatusLessThanOrEqualTo(Integer value) {
+            addCriterion("auto_remove_user_status <=", value, "autoRemoveUserStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andAutoRemoveUserStatusIn(List<Integer> values) {
+            addCriterion("auto_remove_user_status in", values, "autoRemoveUserStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andAutoRemoveUserStatusNotIn(List<Integer> values) {
+            addCriterion("auto_remove_user_status not in", values, "autoRemoveUserStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andAutoRemoveUserStatusBetween(Integer value1, Integer value2) {
+            addCriterion("auto_remove_user_status between", value1, value2, "autoRemoveUserStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andAutoRemoveUserStatusNotBetween(Integer value1, Integer value2) {
+            addCriterion("auto_remove_user_status not between", value1, value2, "autoRemoveUserStatus");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserIsNull() {
+            addCriterion("create_user is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserIsNotNull() {
+            addCriterion("create_user is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserEqualTo(Long value) {
+            addCriterion("create_user =", value, "createUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserNotEqualTo(Long value) {
+            addCriterion("create_user <>", value, "createUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserGreaterThan(Long value) {
+            addCriterion("create_user >", value, "createUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserGreaterThanOrEqualTo(Long value) {
+            addCriterion("create_user >=", value, "createUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserLessThan(Long value) {
+            addCriterion("create_user <", value, "createUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserLessThanOrEqualTo(Long value) {
+            addCriterion("create_user <=", value, "createUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserIn(List<Long> values) {
+            addCriterion("create_user in", values, "createUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserNotIn(List<Long> values) {
+            addCriterion("create_user not in", values, "createUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserBetween(Long value1, Long value2) {
+            addCriterion("create_user between", value1, value2, "createUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateUserNotBetween(Long value1, Long value2) {
+            addCriterion("create_user not between", value1, value2, "createUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateUserIsNull() {
+            addCriterion("update_user is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateUserIsNotNull() {
+            addCriterion("update_user is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateUserEqualTo(Long value) {
+            addCriterion("update_user =", value, "updateUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateUserNotEqualTo(Long value) {
+            addCriterion("update_user <>", value, "updateUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateUserGreaterThan(Long value) {
+            addCriterion("update_user >", value, "updateUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateUserGreaterThanOrEqualTo(Long value) {
+            addCriterion("update_user >=", value, "updateUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateUserLessThan(Long value) {
+            addCriterion("update_user <", value, "updateUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateUserLessThanOrEqualTo(Long value) {
+            addCriterion("update_user <=", value, "updateUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateUserIn(List<Long> values) {
+            addCriterion("update_user in", values, "updateUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateUserNotIn(List<Long> values) {
+            addCriterion("update_user not in", values, "updateUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateUserBetween(Long value1, Long value2) {
+            addCriterion("update_user between", value1, value2, "updateUser");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateUserNotBetween(Long value1, Long value2) {
+            addCriterion("update_user not between", value1, value2, "updateUser");
+            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;
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table work_wechat_room_info
+     *
+     * @mbg.generated do_not_delete_during_merge Fri May 23 14:20:05 CST 2025
+     */
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    /**
+     * This class was generated by MyBatis Generator.
+     * This class corresponds to the database table work_wechat_room_info
+     *
+     * @mbg.generated Fri May 23 14:20:05 CST 2025
+     */
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 6 - 1
risk-control-core/src/main/java/com/tzld/piaoquan/risk/control/service/WorkWechatService.java

@@ -1,8 +1,13 @@
 package com.tzld.piaoquan.risk.control.service;
 
 import com.tzld.piaoquan.risk.control.model.dto.Page;
+import com.tzld.piaoquan.risk.control.model.dto.WorkWechatRoomDTO;
 import com.tzld.piaoquan.risk.control.model.dto.WorkWechatUserInfo;
 
 public interface WorkWechatService {
-    Page<WorkWechatUserInfo> findUserInfoList(int pageSize, int currentPage);
+    Page<WorkWechatUserInfo> findUserInfoList(int pageSize, int currentPage, String phone);
+
+    Page<WorkWechatRoomDTO> findChatRoomList(String uuid, int pageSize, int currentPage, String chatRoomName);
+
+    void updateAutoRemoveUserStatus(WorkWechatRoomDTO param);
 }

+ 128 - 6
risk-control-core/src/main/java/com/tzld/piaoquan/risk/control/service/impl/WorkWechatServiceImpl.java

@@ -1,18 +1,32 @@
 package com.tzld.piaoquan.risk.control.service.impl;
 
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.tzld.piaoquan.risk.control.common.enums.ExceptionEnum;
+import com.tzld.piaoquan.risk.control.common.exception.CommonException;
 import com.tzld.piaoquan.risk.control.config.LoginUserContext;
 import com.tzld.piaoquan.risk.control.dao.mapper.UserBaseMapper;
+import com.tzld.piaoquan.risk.control.dao.mapper.WorkWechatRoomInfoMapper;
 import com.tzld.piaoquan.risk.control.model.dto.Page;
+import com.tzld.piaoquan.risk.control.model.dto.WorkWechatRoomDTO;
 import com.tzld.piaoquan.risk.control.model.dto.WorkWechatUserInfo;
 import com.tzld.piaoquan.risk.control.model.po.UserBase;
 import com.tzld.piaoquan.risk.control.model.po.UserBaseExample;
+import com.tzld.piaoquan.risk.control.model.po.WorkWechatRoomInfo;
+import com.tzld.piaoquan.risk.control.model.po.WorkWechatRoomInfoExample;
 import com.tzld.piaoquan.risk.control.service.WorkWechatService;
+import com.tzld.piaoquan.risk.control.util.HttpClientUtil;
+import com.tzld.piaoquan.risk.control.util.HttpPoolClient;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
-import java.util.ArrayList;
-import java.util.List;
+import java.util.*;
+import java.util.stream.Collectors;
 
 @Slf4j
 @Service
@@ -20,21 +34,32 @@ public class WorkWechatServiceImpl implements WorkWechatService {
 
     @Autowired
     private UserBaseMapper userBaseMapper;
+    @Autowired
+    private WorkWechatRoomInfoMapper workWechatRoomInfoMapper;
+
+    private static final HttpPoolClient httpPoolClientDefault = HttpClientUtil.create(10000, 10000, 2000, 5000, 5, 10000);
+
+    @Value("${work.wechat.tool.base.url:http://47.110.132.222:8083}")
+    private String workWechatToolBaseUrl;
 
     @Override
-    public Page<WorkWechatUserInfo> findUserInfoList(int pageSize, int currentPage) {
+    public Page<WorkWechatUserInfo> findUserInfoList(int pageSize, int currentPage, String phone) {
 
         Page<WorkWechatUserInfo> page = new Page<>();
 
         UserBaseExample userBaseExample = new UserBaseExample();
-        userBaseExample.createCriteria().andCreateUserEqualTo(LoginUserContext.getUserId());
+        UserBaseExample.Criteria criteria = userBaseExample.createCriteria().andCreateUserEqualTo(LoginUserContext.getUserId());
+        if (StringUtils.isNotBlank(phone)) {
+            criteria.andMobileEqualTo(phone);
+        }
+
 
         long total = userBaseMapper.countByExample(userBaseExample);
 
         userBaseExample.setPage(new Page<UserBase>(currentPage, pageSize));
         List<UserBase> userBases = userBaseMapper.selectByExample(userBaseExample);
 
-        List<WorkWechatUserInfo> workWechatUserInfos = getWorkWechatUserInfos(userBases);
+        List<WorkWechatUserInfo> workWechatUserInfos = this.getWorkWechatUserInfos(userBases);
 
         page.setTotalSize((int) total);
         page.setObjs(workWechatUserInfos);
@@ -43,7 +68,78 @@ public class WorkWechatServiceImpl implements WorkWechatService {
         return page;
     }
 
-    private static List<WorkWechatUserInfo> getWorkWechatUserInfos(List<UserBase> userBases) {
+    @Override
+    public Page<WorkWechatRoomDTO> findChatRoomList(String uuid, int pageSize, int currentPage, String chatRoomName) {
+        Page<WorkWechatRoomDTO> page = new Page<>();
+
+        JSONObject chatRoomInfo = this.getChatRoomInfo(uuid, 0);
+        Map<String, Integer> roomAutoRemoveUserStatusMap = this.getRoomAutoRemoveUserStatusMap();
+
+        JSONArray roomList = chatRoomInfo.getJSONArray("roomList");
+
+        // 过滤聊天室名称(如果提供了chatRoomName参数)
+        List<WorkWechatRoomDTO> filteredRooms = new ArrayList<>();
+        for (int i = 0; i < roomList.size(); i++) {
+            JSONObject room = roomList.getJSONObject(i);
+            if (StringUtils.isNotEmpty(chatRoomName) && !StringUtils.contains(room.getString("nickname"), chatRoomName)) {
+                continue;
+            }
+
+            String roomId = room.getString("room_id");
+
+            WorkWechatRoomDTO workWechatRoomDTO = new WorkWechatRoomDTO();
+            workWechatRoomDTO.setRoomId(roomId);
+            workWechatRoomDTO.setRoomName(room.getString("nickname"));
+            workWechatRoomDTO.setAutoRemoveUserStatus(roomAutoRemoveUserStatusMap.getOrDefault(roomId, 0));
+            filteredRooms.add(workWechatRoomDTO);
+        }
+
+
+        // 重新计算分页位置(因为列表可能经过过滤)
+        int start = (currentPage - 1) * pageSize;
+        int end = Math.min(start + pageSize, filteredRooms.size());
+
+        // 确保start不越界
+        start = Math.min(start, filteredRooms.size());
+
+        // 获取当前页的数据
+        List<WorkWechatRoomDTO> pageData = new ArrayList<>();
+        if (start < filteredRooms.size()) {
+            pageData = filteredRooms.subList(start, end);
+        }
+
+        // 设置分页数据
+        page.setTotalSize(filteredRooms.size());
+        page.setCurrentPage(currentPage);
+        page.setPageSize(pageSize);
+        page.setObjs(pageData);
+
+        return page;
+    }
+
+    @Override
+    public void updateAutoRemoveUserStatus(WorkWechatRoomDTO param) {
+
+        if (StringUtils.isBlank(param.getRoomId()) || Objects.isNull(param.getAutoRemoveUserStatus())) {
+            throw new CommonException(ExceptionEnum.PARAMS_INVALID);
+        }
+
+        WorkWechatRoomInfoExample example = new WorkWechatRoomInfoExample();
+        example.createCriteria().andRoomIdEqualTo(param.getRoomId());
+        List<WorkWechatRoomInfo> workWechatRoomInfos = workWechatRoomInfoMapper.selectByExample(example);
+        if (CollectionUtils.isNotEmpty(workWechatRoomInfos)) {
+            WorkWechatRoomInfo workWechatRoomInfo = workWechatRoomInfos.get(0);
+            workWechatRoomInfo.setAutoRemoveUserStatus(param.getAutoRemoveUserStatus());
+            workWechatRoomInfoMapper.updateByPrimaryKeySelective(workWechatRoomInfo);
+        } else {
+            WorkWechatRoomInfo workWechatRoomInfo = new WorkWechatRoomInfo();
+            workWechatRoomInfo.setRoomId(param.getRoomId());
+            workWechatRoomInfo.setAutoRemoveUserStatus(param.getAutoRemoveUserStatus());
+            workWechatRoomInfoMapper.updateByPrimaryKeySelective(workWechatRoomInfo);
+        }
+    }
+
+    private List<WorkWechatUserInfo> getWorkWechatUserInfos(List<UserBase> userBases) {
         List<WorkWechatUserInfo> workWechatUserInfos = new ArrayList<>();
         for (UserBase userBase : userBases) {
             WorkWechatUserInfo workWechatUserInfo = new WorkWechatUserInfo();
@@ -61,4 +157,30 @@ public class WorkWechatServiceImpl implements WorkWechatService {
         }
         return workWechatUserInfos;
     }
+
+    private JSONObject getChatRoomInfo(String uuid, int starIndex) {
+        String url = workWechatToolBaseUrl + "/wxwork/GetChatroomMembers";
+        JSONObject paramJson = new JSONObject();
+        paramJson.put("uuid", uuid);
+        paramJson.put("limit", 500);
+        paramJson.put("star_index", starIndex);
+
+        Optional<String> responseOpt = httpPoolClientDefault.postJson(url, paramJson.toJSONString());
+
+        if (!responseOpt.isPresent()) {
+            throw new CommonException(ExceptionEnum.SYSTEM_ERROR, "获取企微客户群列表异常");
+        }
+        JSONObject responseJson = JSON.parseObject(responseOpt.get());
+        if (responseJson.getIntValue("errcode") != 0) {
+            log.error("获取企微客户群列表异常. uuid: {}, errmsg: {}", uuid, responseJson.getIntValue("errmsg"));
+            throw new CommonException(ExceptionEnum.SYSTEM_ERROR, "获取企微客户群列表异常");
+        }
+        return responseJson.getJSONObject("data");
+    }
+
+    private Map<String, Integer> getRoomAutoRemoveUserStatusMap() {
+        WorkWechatRoomInfoExample example = new WorkWechatRoomInfoExample();
+        List<WorkWechatRoomInfo> workWechatRoomInfos = workWechatRoomInfoMapper.selectByExample(example);
+        return workWechatRoomInfos.stream().collect(Collectors.toMap(WorkWechatRoomInfo::getRoomId, WorkWechatRoomInfo::getAutoRemoveUserStatus, (o1, o2) -> o2));
+    }
 }

+ 337 - 0
risk-control-core/src/main/resources/mapper/WorkWechatRoomInfoMapper.xml

@@ -0,0 +1,337 @@
+<?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.risk.control.dao.mapper.WorkWechatRoomInfoMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.risk.control.model.po.WorkWechatRoomInfo">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri May 23 14:20:05 CST 2025.
+    -->
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="uuid" jdbcType="VARCHAR" property="uuid" />
+    <result column="room_id" jdbcType="VARCHAR" property="roomId" />
+    <result column="auto_remove_user_status" jdbcType="INTEGER" property="autoRemoveUserStatus" />
+    <result column="create_user" jdbcType="BIGINT" property="createUser" />
+    <result column="update_user" jdbcType="BIGINT" property="updateUser" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri May 23 14:20:05 CST 2025.
+    -->
+    <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">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri May 23 14:20:05 CST 2025.
+    -->
+    <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">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri May 23 14:20:05 CST 2025.
+    -->
+    id, uuid, room_id, auto_remove_user_status, create_user, update_user, create_time, 
+    update_time
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.risk.control.model.po.WorkWechatRoomInfoExample" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri May 23 14:20:05 CST 2025.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from work_wechat_room_info
+    <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">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri May 23 14:20:05 CST 2025.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from work_wechat_room_info
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri May 23 14:20:05 CST 2025.
+    -->
+    delete from work_wechat_room_info
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.risk.control.model.po.WorkWechatRoomInfoExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri May 23 14:20:05 CST 2025.
+    -->
+    delete from work_wechat_room_info
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.risk.control.model.po.WorkWechatRoomInfo">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri May 23 14:20:05 CST 2025.
+    -->
+    insert into work_wechat_room_info (id, uuid, room_id, 
+      auto_remove_user_status, create_user, update_user, 
+      create_time, update_time)
+    values (#{id,jdbcType=BIGINT}, #{uuid,jdbcType=VARCHAR}, #{roomId,jdbcType=VARCHAR}, 
+      #{autoRemoveUserStatus,jdbcType=INTEGER}, #{createUser,jdbcType=BIGINT}, #{updateUser,jdbcType=BIGINT}, 
+      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.risk.control.model.po.WorkWechatRoomInfo">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri May 23 14:20:05 CST 2025.
+    -->
+    insert into work_wechat_room_info
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="uuid != null">
+        uuid,
+      </if>
+      <if test="roomId != null">
+        room_id,
+      </if>
+      <if test="autoRemoveUserStatus != null">
+        auto_remove_user_status,
+      </if>
+      <if test="createUser != null">
+        create_user,
+      </if>
+      <if test="updateUser != null">
+        update_user,
+      </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="uuid != null">
+        #{uuid,jdbcType=VARCHAR},
+      </if>
+      <if test="roomId != null">
+        #{roomId,jdbcType=VARCHAR},
+      </if>
+      <if test="autoRemoveUserStatus != null">
+        #{autoRemoveUserStatus,jdbcType=INTEGER},
+      </if>
+      <if test="createUser != null">
+        #{createUser,jdbcType=BIGINT},
+      </if>
+      <if test="updateUser != null">
+        #{updateUser,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.risk.control.model.po.WorkWechatRoomInfoExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri May 23 14:20:05 CST 2025.
+    -->
+    select count(*) from work_wechat_room_info
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri May 23 14:20:05 CST 2025.
+    -->
+    update work_wechat_room_info
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.uuid != null">
+        uuid = #{record.uuid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.roomId != null">
+        room_id = #{record.roomId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.autoRemoveUserStatus != null">
+        auto_remove_user_status = #{record.autoRemoveUserStatus,jdbcType=INTEGER},
+      </if>
+      <if test="record.createUser != null">
+        create_user = #{record.createUser,jdbcType=BIGINT},
+      </if>
+      <if test="record.updateUser != null">
+        update_user = #{record.updateUser,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">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri May 23 14:20:05 CST 2025.
+    -->
+    update work_wechat_room_info
+    set id = #{record.id,jdbcType=BIGINT},
+      uuid = #{record.uuid,jdbcType=VARCHAR},
+      room_id = #{record.roomId,jdbcType=VARCHAR},
+      auto_remove_user_status = #{record.autoRemoveUserStatus,jdbcType=INTEGER},
+      create_user = #{record.createUser,jdbcType=BIGINT},
+      update_user = #{record.updateUser,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.risk.control.model.po.WorkWechatRoomInfo">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri May 23 14:20:05 CST 2025.
+    -->
+    update work_wechat_room_info
+    <set>
+      <if test="uuid != null">
+        uuid = #{uuid,jdbcType=VARCHAR},
+      </if>
+      <if test="roomId != null">
+        room_id = #{roomId,jdbcType=VARCHAR},
+      </if>
+      <if test="autoRemoveUserStatus != null">
+        auto_remove_user_status = #{autoRemoveUserStatus,jdbcType=INTEGER},
+      </if>
+      <if test="createUser != null">
+        create_user = #{createUser,jdbcType=BIGINT},
+      </if>
+      <if test="updateUser != null">
+        update_user = #{updateUser,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.risk.control.model.po.WorkWechatRoomInfo">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+      This element was generated on Fri May 23 14:20:05 CST 2025.
+    -->
+    update work_wechat_room_info
+    set uuid = #{uuid,jdbcType=VARCHAR},
+      room_id = #{roomId,jdbcType=VARCHAR},
+      auto_remove_user_status = #{autoRemoveUserStatus,jdbcType=INTEGER},
+      create_user = #{createUser,jdbcType=BIGINT},
+      update_user = #{updateUser,jdbcType=BIGINT},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_time = #{updateTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 2 - 2
risk-control-core/src/main/resources/mybatis-generator-config.xml

@@ -57,7 +57,7 @@
 
         <!-- 表配置 -->
         <!-- <table tableName="user" domainObjectName="User"/> -->
-        <table tableName="qywx_user_base" domainObjectName="UserBase"/>
-        <!-- <table tableName="work_wechat_room_info" domainObjectName="WorkWechatRoomInfo"/> -->
+        <!-- <table tableName="qywx_user_base" domainObjectName="UserBase"/> -->
+        <table tableName="work_wechat_room_info" domainObjectName="WorkWechatRoomInfo"/>
     </context>
 </generatorConfiguration>

+ 19 - 7
risk-control-server/src/main/java/com/tzld/piaoquan/risk/control/controller/WorkWechatController.java

@@ -2,14 +2,12 @@ package com.tzld.piaoquan.risk.control.controller;
 
 import com.tzld.piaoquan.risk.control.common.base.CommonResponse;
 import com.tzld.piaoquan.risk.control.model.dto.Page;
+import com.tzld.piaoquan.risk.control.model.dto.WorkWechatRoomDTO;
 import com.tzld.piaoquan.risk.control.model.dto.WorkWechatUserInfo;
 import com.tzld.piaoquan.risk.control.service.WorkWechatService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 @Slf4j
 @RestController
@@ -20,9 +18,23 @@ public class WorkWechatController {
     private WorkWechatService workWechatService;
 
     @GetMapping("/user/info/page")
-    public CommonResponse<Page<WorkWechatUserInfo>> page(@RequestParam("pageSize") int pageSize, @RequestParam("currentPage") int currentPage) {
-        log.info("[work wechat findUserInfoList] pageSize:{}, currentPage:{}", pageSize, currentPage);
-        return CommonResponse.create(workWechatService.findUserInfoList(pageSize, currentPage));
+    public CommonResponse<Page<WorkWechatUserInfo>> page(@RequestParam("pageSize") int pageSize, @RequestParam("currentPage") int currentPage,
+                                                         @RequestParam(value = "phone", required = false) String phone) {
+        log.info("[work wechat findUserInfoList] pageSize:{}, currentPage:{}, phone:{}", pageSize, currentPage, phone);
+        return CommonResponse.create(workWechatService.findUserInfoList(pageSize, currentPage, phone));
     }
 
+    @GetMapping("/chat/room/page")
+    public CommonResponse<Page<WorkWechatRoomDTO>> page(@RequestParam("uuid") String uuid, @RequestParam("pageSize") int pageSize, @RequestParam("currentPage") int currentPage,
+                                                        @RequestParam(value = "chatRoomName", required = false) String chatRoomName) {
+        log.info("[work wechat findChatRoomList] uuid: {}, pageSize: {}, currentPage: {}, chatRoomName: {}", uuid, pageSize, currentPage, chatRoomName);
+        return CommonResponse.create(workWechatService.findChatRoomList(uuid, pageSize, currentPage, chatRoomName));
+    }
+
+    @PostMapping("/updateAutoRemoveUserStatus")
+    public CommonResponse<Void> updateAutoRemoveUserStatus(@RequestBody WorkWechatRoomDTO param) {
+        log.info("[work wechat updateAutoRemoveUserStatus] param: {}", param);
+        workWechatService.updateAutoRemoveUserStatus(param);
+        return CommonResponse.create();
+    }
 }