Browse Source

Merge branch 'dev-xym-user-delete' of Server/we-com-manage into master

xueyiming 6 months ago
parent
commit
1492afd765

+ 1 - 6
we-com-server/src/main/java/com/tzld/piaoquan/wecom/common/constant/MessageConstant.java

@@ -11,12 +11,7 @@ public interface MessageConstant {
     //小程序id
     //小程序id
     String appid = "wx7187c217efef24a7";
     String appid = "wx7187c217efef24a7";
 
 
-    String defaultName = "日常push-%s-推荐官";
-
-    Map<String, String> carrierIdMap = new HashMap<String, String>(){{
-        put("wogizUDQAAzM5HbqIyA4k3KR6D8vKp3w", "songyi");
-        put("wogizUDQAAk5Z_5nLRD-XTAPU9poaRCw", "XinYi");
-    }};
+    String defaultName = "日常push-%s-%s";
 
 
 
 
 }
 }

+ 6 - 0
we-com-server/src/main/java/com/tzld/piaoquan/wecom/common/constant/WeComConstant.java

@@ -4,8 +4,14 @@ public interface WeComConstant {
     String CROP_ID = "1804267877438678017";
     String CROP_ID = "1804267877438678017";
     String SECRET = "9fe05442559750d0cc3e71c5f81217a4";
     String SECRET = "9fe05442559750d0cc3e71c5f81217a4";
     String POST_ACCESS_TOKEN_URL = "https://open.weibanzhushou.com/open-api/access_token/get";
     String POST_ACCESS_TOKEN_URL = "https://open.weibanzhushou.com/open-api/access_token/get";
+    //获取用户接口
     String GET_USER_URL = "https://open.weibanzhushou.com/open-api/external_user/list";
     String GET_USER_URL = "https://open.weibanzhushou.com/open-api/external_user/list";
+    //更新用户接口
     String UPDATE_USER_URL = "https://open.weibanzhushou.com/open-api/external_user/update/list";
     String UPDATE_USER_URL = "https://open.weibanzhushou.com/open-api/external_user/update/list";
+    //获取历史推送接口
     String GET_HISTORY_DATA_URL = "https://open.weibanzhushou.com/open-api/group_msg/result";
     String GET_HISTORY_DATA_URL = "https://open.weibanzhushou.com/open-api/group_msg/result";
+    //推送消息接口
     String POST_MESSAGE_PUSH_URL = "https://open.weibanzhushou.com/open-api/group_msg/add";
     String POST_MESSAGE_PUSH_URL = "https://open.weibanzhushou.com/open-api/group_msg/add";
+    //获取删除用户接口
+    String GET_DELETE_USER_URL = "https://open.weibanzhushou.com/open-api/external_user/list/outflow";
 }
 }

+ 1 - 4
we-com-server/src/main/java/com/tzld/piaoquan/wecom/dao/generator/MybatisGeneratorMain.java

@@ -13,10 +13,7 @@ import java.sql.SQLException;
 import java.util.ArrayList;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.List;
 
 
-/**
- * @author ehlxr
- * @since 2021-12-14 14:03.
- */
+
 public class MybatisGeneratorMain {
 public class MybatisGeneratorMain {
 
 
     public static void main(String[] args)
     public static void main(String[] args)

+ 1 - 0
we-com-server/src/main/java/com/tzld/piaoquan/wecom/dao/mapper/UserMapper.java

@@ -2,6 +2,7 @@ package com.tzld.piaoquan.wecom.dao.mapper;
 
 
 import com.tzld.piaoquan.wecom.model.po.User;
 import com.tzld.piaoquan.wecom.model.po.User;
 import com.tzld.piaoquan.wecom.model.po.UserExample;
 import com.tzld.piaoquan.wecom.model.po.UserExample;
+import java.util.List;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 import org.springframework.stereotype.Repository;
 
 

+ 30 - 10
we-com-server/src/main/java/com/tzld/piaoquan/wecom/job/WeComHistoryDataJob.java

@@ -8,7 +8,7 @@ import com.tzld.piaoquan.wecom.dao.mapper.HistoryMessageMapper;
 import com.tzld.piaoquan.wecom.dao.mapper.StaffWithUserMapper;
 import com.tzld.piaoquan.wecom.dao.mapper.StaffWithUserMapper;
 import com.tzld.piaoquan.wecom.dao.mapper.UserMapper;
 import com.tzld.piaoquan.wecom.dao.mapper.UserMapper;
 import com.tzld.piaoquan.wecom.model.bo.MiniprogramRecord;
 import com.tzld.piaoquan.wecom.model.bo.MiniprogramRecord;
-import com.tzld.piaoquan.wecom.model.bo.StaffWithUserParam;
+import com.tzld.piaoquan.wecom.model.bo.XxlJobParam;
 import com.tzld.piaoquan.wecom.model.po.*;
 import com.tzld.piaoquan.wecom.model.po.*;
 import com.tzld.piaoquan.wecom.service.AccessTokenService;
 import com.tzld.piaoquan.wecom.service.AccessTokenService;
 import com.tzld.piaoquan.wecom.service.HistoryMessageService;
 import com.tzld.piaoquan.wecom.service.HistoryMessageService;
@@ -22,7 +22,6 @@ import com.xxl.job.core.handler.annotation.XxlJob;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.StringUtils;
-import org.checkerframework.checker.units.qual.A;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 import org.springframework.stereotype.Component;
 import org.springframework.util.CollectionUtils;
 import org.springframework.util.CollectionUtils;
@@ -31,6 +30,8 @@ import java.io.IOException;
 import java.util.ArrayList;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.Date;
 import java.util.List;
 import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
 
 
 import static com.tzld.piaoquan.wecom.common.constant.WeComConstant.GET_HISTORY_DATA_URL;
 import static com.tzld.piaoquan.wecom.common.constant.WeComConstant.GET_HISTORY_DATA_URL;
 
 
@@ -62,22 +63,22 @@ public class WeComHistoryDataJob {
 
 
     @XxlJob("saveHistoryMessageJob")
     @XxlJob("saveHistoryMessageJob")
     public ReturnT<String> selectHistoryMessageByDay(String param) {
     public ReturnT<String> selectHistoryMessageByDay(String param) {
-        StaffWithUserParam staffWithUserParam = new StaffWithUserParam();
+        XxlJobParam xxlJobParam = new XxlJobParam();
         if (StringUtils.isNotEmpty(param)) {
         if (StringUtils.isNotEmpty(param)) {
-            staffWithUserParam = JSONObject.parseObject(param, StaffWithUserParam.class);
+            xxlJobParam = JSONObject.parseObject(param, XxlJobParam.class);
         }
         }
-        if (staffWithUserParam.getStartTime() == null) {
+        if (xxlJobParam.getStartTime() == null) {
             HistoryMessageExample example = new HistoryMessageExample();
             HistoryMessageExample example = new HistoryMessageExample();
             example.setOrderByClause("create_time desc");
             example.setOrderByClause("create_time desc");
             example.setPage(new Page<>(1, 1));
             example.setPage(new Page<>(1, 1));
             List<HistoryMessage> historyMessages = historyMessageMapper.selectByExample(example);
             List<HistoryMessage> historyMessages = historyMessageMapper.selectByExample(example);
-            staffWithUserParam.setStartTime(historyMessages.get(0).getCreateTime().getTime() / 1000);
+            xxlJobParam.setStartTime(historyMessages.get(0).getCreateTime().getTime() / 1000);
         }
         }
-        if (staffWithUserParam.getEndTime() == null) {
-            staffWithUserParam.setEndTime(System.currentTimeMillis() / 1000);
+        if (xxlJobParam.getEndTime() == null) {
+            xxlJobParam.setEndTime(System.currentTimeMillis() / 1000);
         }
         }
-        Long startTime = staffWithUserParam.getStartTime();
-        Long endTime = staffWithUserParam.getEndTime();
+        Long startTime = xxlJobParam.getStartTime();
+        Long endTime = xxlJobParam.getEndTime();
 
 
         for (; startTime < endTime; startTime += TimeConstant.DAY) {
         for (; startTime < endTime; startTime += TimeConstant.DAY) {
             selectHistoryMessage(startTime, Math.min(startTime + TimeConstant.DAY, endTime));
             selectHistoryMessage(startTime, Math.min(startTime + TimeConstant.DAY, endTime));
@@ -180,6 +181,25 @@ public class WeComHistoryDataJob {
                 + "&limit=" + limit + "&offset=" + offset + "&start_time=" + startTime + "&end_time=" + endTime;
                 + "&limit=" + limit + "&offset=" + offset + "&start_time=" + startTime + "&end_time=" + endTime;
         return httpPoolClientDefault.get(url);
         return httpPoolClientDefault.get(url);
     }
     }
+
+
+    @XxlJob("deleteHistoryMessageJob")
+    public ReturnT<String> deleteHistoryMessage(String param) {
+        UserExample userExample = new UserExample();
+        userExample.createCriteria().andIsDeleteEqualTo(1);
+        List<User> userList = userMapper.selectByExample(userExample);
+        for (User user : userList) {
+            HistoryMessageExample example = new HistoryMessageExample();
+            example.createCriteria().andUserIdEqualTo(user.getId());
+            List<HistoryMessage> historyMessages = historyMessageMapper.selectByExample(example);
+            for (HistoryMessage historyMessage : historyMessages) {
+                if (historyMessage.getSendTime().getTime() > user.getDeletedAt() * 1000) {
+                    historyMessageMapper.deleteByPrimaryKey(historyMessage.getId());
+                }
+            }
+        }
+        return ReturnT.SUCCESS;
+    }
 }
 }
 
 
 
 

+ 2 - 1
we-com-server/src/main/java/com/tzld/piaoquan/wecom/job/WeComMessageDataJob.java

@@ -131,6 +131,7 @@ public class WeComMessageDataJob {
             staffId = Long.parseLong(param);
             staffId = Long.parseLong(param);
         }
         }
         UserExample example = new UserExample();
         UserExample example = new UserExample();
+        example.createCriteria().andIsDeleteEqualTo(0);
         long count = userMapper.countByExample(example);
         long count = userMapper.countByExample(example);
         int page = 1;
         int page = 1;
         int pageSize = 1000;
         int pageSize = 1000;
@@ -277,7 +278,7 @@ public class WeComMessageDataJob {
         List<Staff> staffList = staffMapper.selectByExample(staffExample);
         List<Staff> staffList = staffMapper.selectByExample(staffExample);
         Staff staff = staffList.get(0);
         Staff staff = staffList.get(0);
         String text = messageService.getMessageText();
         String text = messageService.getMessageText();
-        String name = MessageUtil.getName();
+        String name = MessageUtil.getName(staff.getRemark());
 
 
         JSONObject jsonObject = new JSONObject();
         JSONObject jsonObject = new JSONObject();
         jsonObject.put("name", name);
         jsonObject.put("name", name);

+ 104 - 26
we-com-server/src/main/java/com/tzld/piaoquan/wecom/job/WeComUserDataJob.java

@@ -6,7 +6,7 @@ import com.tzld.piaoquan.wecom.common.constant.TimeConstant;
 import com.tzld.piaoquan.wecom.dao.mapper.StaffMapper;
 import com.tzld.piaoquan.wecom.dao.mapper.StaffMapper;
 import com.tzld.piaoquan.wecom.dao.mapper.StaffWithUserMapper;
 import com.tzld.piaoquan.wecom.dao.mapper.StaffWithUserMapper;
 import com.tzld.piaoquan.wecom.dao.mapper.UserMapper;
 import com.tzld.piaoquan.wecom.dao.mapper.UserMapper;
-import com.tzld.piaoquan.wecom.model.bo.StaffWithUserParam;
+import com.tzld.piaoquan.wecom.model.bo.XxlJobParam;
 import com.tzld.piaoquan.wecom.model.po.*;
 import com.tzld.piaoquan.wecom.model.po.*;
 import com.tzld.piaoquan.wecom.service.AccessTokenService;
 import com.tzld.piaoquan.wecom.service.AccessTokenService;
 import com.tzld.piaoquan.wecom.utils.HttpClientUtil;
 import com.tzld.piaoquan.wecom.utils.HttpClientUtil;
@@ -17,7 +17,6 @@ import com.xxl.job.core.handler.annotation.XxlJob;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.StringUtils;
-import org.checkerframework.checker.units.qual.A;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 import org.springframework.stereotype.Component;
 import org.springframework.util.CollectionUtils;
 import org.springframework.util.CollectionUtils;
@@ -50,24 +49,24 @@ public class WeComUserDataJob {
 
 
     @XxlJob("insertStaffWithUserJob")
     @XxlJob("insertStaffWithUserJob")
     public ReturnT<String> insertStaffWithUser(String param) {
     public ReturnT<String> insertStaffWithUser(String param) {
-        StaffWithUserParam staffWithUserParam = new StaffWithUserParam();
+        XxlJobParam xxlJobParam = new XxlJobParam();
         if (StringUtils.isNotEmpty(param)) {
         if (StringUtils.isNotEmpty(param)) {
-            staffWithUserParam = JSONObject.parseObject(param, StaffWithUserParam.class);
+            xxlJobParam = JSONObject.parseObject(param, XxlJobParam.class);
         }
         }
-        if (staffWithUserParam.getStartTime() == null) {
-            staffWithUserParam.setStartTime(1720540800L);
+        if (xxlJobParam.getStartTime() == null) {
+            xxlJobParam.setStartTime(1720540800L);
         }
         }
-        if (staffWithUserParam.getEndTime() == null) {
-            staffWithUserParam.setEndTime(System.currentTimeMillis() / 1000);
+        if (xxlJobParam.getEndTime() == null) {
+            xxlJobParam.setEndTime(System.currentTimeMillis() / 1000);
         }
         }
         StaffExample example = new StaffExample();
         StaffExample example = new StaffExample();
         StaffExample.Criteria criteria = example.createCriteria();
         StaffExample.Criteria criteria = example.createCriteria();
-        if (staffWithUserParam.getStaffId() != null) {
-            criteria.andIdEqualTo(staffWithUserParam.getStaffId());
+        if (xxlJobParam.getStaffId() != null) {
+            criteria.andIdEqualTo(xxlJobParam.getStaffId());
         }
         }
         List<Staff> staffList = staffMapper.selectByExample(example);
         List<Staff> staffList = staffMapper.selectByExample(example);
         for (Staff staff : staffList) {
         for (Staff staff : staffList) {
-            insertAllUser(staffWithUserParam.getStartTime(), staffWithUserParam.getEndTime(), staff);
+            insertAllUser(xxlJobParam.getStartTime(), xxlJobParam.getEndTime(), staff);
         }
         }
         return ReturnT.SUCCESS;
         return ReturnT.SUCCESS;
     }
     }
@@ -119,12 +118,12 @@ public class WeComUserDataJob {
                     staffWithUserMapper.insertList(insertStaffWithUserList);
                     staffWithUserMapper.insertList(insertStaffWithUserList);
                 }
                 }
                 if (jsonArray.size() < size) {
                 if (jsonArray.size() < size) {
-                    if (total > sum) {
-                        log.error("insertAllUser插入数量不足 total = {}, sum={}", total, sum);
-                    }
                     break;
                     break;
                 }
                 }
             }
             }
+            if (total > sum) {
+                log.error("insertAllUser插入数量不足 total = {}, sum={}", total, sum);
+            }
         } catch (Exception e) {
         } catch (Exception e) {
             log.error("insertAllUser error", e);
             log.error("insertAllUser error", e);
         }
         }
@@ -149,28 +148,28 @@ public class WeComUserDataJob {
 
 
     @XxlJob("updateStaffWithUserJob")
     @XxlJob("updateStaffWithUserJob")
     public ReturnT<String> updateStaffWithUser(String param) {
     public ReturnT<String> updateStaffWithUser(String param) {
-        StaffWithUserParam staffWithUserParam = new StaffWithUserParam();
+        XxlJobParam xxlJobParam = new XxlJobParam();
         if (StringUtils.isNotEmpty(param)) {
         if (StringUtils.isNotEmpty(param)) {
-            staffWithUserParam = JSONObject.parseObject(param, StaffWithUserParam.class);
+            xxlJobParam = JSONObject.parseObject(param, XxlJobParam.class);
         }
         }
-        if (staffWithUserParam.getStartTime() == null) {
+        if (xxlJobParam.getStartTime() == null) {
             UserExample userExample = new UserExample();
             UserExample userExample = new UserExample();
             userExample.setOrderByClause("create_time desc");
             userExample.setOrderByClause("create_time desc");
             userExample.setPage(new Page<>(1, 1));
             userExample.setPage(new Page<>(1, 1));
             List<User> userList = userMapper.selectByExample(userExample);
             List<User> userList = userMapper.selectByExample(userExample);
-            staffWithUserParam.setStartTime(userList.get(0).getCreateTime().getTime() / 1000 - 2L * TimeConstant.HOUR);
+            xxlJobParam.setStartTime(userList.get(0).getCreateTime().getTime() / 1000 - 2L * TimeConstant.HOUR);
         }
         }
-        if (staffWithUserParam.getEndTime() == null) {
-            staffWithUserParam.setEndTime(System.currentTimeMillis() / 1000);
+        if (xxlJobParam.getEndTime() == null) {
+            xxlJobParam.setEndTime(System.currentTimeMillis() / 1000);
         }
         }
         StaffExample example = new StaffExample();
         StaffExample example = new StaffExample();
         StaffExample.Criteria criteria = example.createCriteria();
         StaffExample.Criteria criteria = example.createCriteria();
-        if (staffWithUserParam.getStaffId() != null) {
-            criteria.andIdEqualTo(staffWithUserParam.getStaffId());
+        if (xxlJobParam.getStaffId() != null) {
+            criteria.andIdEqualTo(xxlJobParam.getStaffId());
         }
         }
         List<Staff> staffList = staffMapper.selectByExample(example);
         List<Staff> staffList = staffMapper.selectByExample(example);
         for (Staff staff : staffList) {
         for (Staff staff : staffList) {
-            updateUser(staffWithUserParam.getStartTime(), staffWithUserParam.getEndTime(), staff);
+            updateUser(xxlJobParam.getStartTime(), xxlJobParam.getEndTime(), staff);
         }
         }
         return ReturnT.SUCCESS;
         return ReturnT.SUCCESS;
     }
     }
@@ -226,12 +225,13 @@ public class WeComUserDataJob {
                     sum++;
                     sum++;
                 }
                 }
                 if (jsonArray.size() < size) {
                 if (jsonArray.size() < size) {
-                    if (total > sum) {
-                        log.error("updateUser插入数量不足 total = {}, sum={}", total, sum);
-                    }
                     break;
                     break;
                 }
                 }
             }
             }
+
+            if (total > sum) {
+                log.error("updateUser插入数量不足 total = {}, sum={}", total, sum);
+            }
         } catch (IOException e) {
         } catch (IOException e) {
             log.error("updateUser error", e);
             log.error("updateUser error", e);
         }
         }
@@ -255,4 +255,82 @@ public class WeComUserDataJob {
         return httpPoolClientDefault.get(url);
         return httpPoolClientDefault.get(url);
     }
     }
 
 
+
+    @XxlJob("deleteUserJob")
+    public ReturnT<String> deleteUserJob(String param) {
+        XxlJobParam xxlJobParam = new XxlJobParam();
+        if (StringUtils.isNotEmpty(param)) {
+            xxlJobParam = JSONObject.parseObject(param, XxlJobParam.class);
+        }
+        if (xxlJobParam.getStartTime() == null) {
+            UserExample userExample = new UserExample();
+            userExample.createCriteria().andIsDeleteEqualTo(1);
+            userExample.setOrderByClause("deleted_at desc");
+            userExample.setPage(new Page<>(1, 1));
+            List<User> userList = userMapper.selectByExample(userExample);
+            if (CollectionUtils.isEmpty(userList)) {
+                xxlJobParam.setStartTime(1720540800L);
+            } else {
+                xxlJobParam.setStartTime(userList.get(0).getDeletedAt());
+            }
+        }
+        if (xxlJobParam.getEndTime() == null) {
+            xxlJobParam.setEndTime(System.currentTimeMillis() / 1000);
+        }
+        deleteUser(xxlJobParam.getStartTime(), xxlJobParam.getEndTime());
+        return ReturnT.SUCCESS;
+    }
+
+    //查询删除用户并更新
+    private void deleteUser(long startTime, long endTime) {
+        try {
+            Integer total = getDeleteUserTotal(startTime, endTime);
+            if (total == null || total == 0) {
+                return;
+            }
+            int page = total / size + 1;
+            int sum = 0;
+            for (int i = 0; i < page; i++) {
+                String res = getDeleteUser(size, i * size, startTime, endTime);
+                log.info("deleteUser size={}, i={}, startTime={}, endTime={}, res={}", size, i, startTime, endTime, res);
+                if (ObjectUtils.isEmpty(res)) {
+                    continue;
+                }
+                JSONObject jsonObject = JSONObject.parseObject(res);
+                JSONArray jsonArray = jsonObject.getJSONArray("external_user_list");
+                for (int j = 0; j < jsonArray.size(); j++) {
+                    JSONObject staffRelation = jsonArray.getJSONObject(j).getJSONObject("staff_relation");
+                    Long deletedAt = staffRelation.getLong("deleted_at");
+                    String externalUserId3rdParty = staffRelation.getString("external_user_ext_id");
+                    Long userId = userMapper.selectIdByExternalUserId3rdParty(externalUserId3rdParty);
+                    User updateUser = new User();
+                    updateUser.setId(userId);
+                    updateUser.setIsDelete(1);
+                    updateUser.setDeletedAt(deletedAt);
+                    userMapper.updateByPrimaryKeySelective(updateUser);
+                    sum++;
+                }
+            }
+            if (total > sum) {
+                log.error("deleteUser数量不足 total = {}, sum={}", total, sum);
+            }
+        } catch (Exception e) {
+            log.error("deleteUser error", e);
+        }
+    }
+
+    private Integer getDeleteUserTotal(Long startTime, Long endTime) throws IOException {
+        String res = getDeleteUser(1, 0, startTime, endTime);
+        JSONObject jsonObject = JSONObject.parseObject(res);
+        return jsonObject.getInteger("total_count");
+    }
+
+    private String getDeleteUser(Integer limit, Integer offset, Long startTime, Long endTime) throws IOException {
+        String accessToken = accessTokenService.getAccessToken();
+        String url = GET_DELETE_USER_URL
+                + "?access_token=" + accessToken
+                + "&limit=" + limit + "&offset=" + offset + "&start_time=" + startTime + "&end_time=" + endTime;
+        return httpPoolClientDefault.get(url);
+    }
+
 }
 }

+ 1 - 1
we-com-server/src/main/java/com/tzld/piaoquan/wecom/model/bo/StaffWithUserParam.java → we-com-server/src/main/java/com/tzld/piaoquan/wecom/model/bo/XxlJobParam.java

@@ -3,7 +3,7 @@ package com.tzld.piaoquan.wecom.model.bo;
 import lombok.Data;
 import lombok.Data;
 
 
 @Data
 @Data
-public class StaffWithUserParam {
+public class XxlJobParam {
 
 
     private Long startTime;
     private Long startTime;
 
 

+ 11 - 0
we-com-server/src/main/java/com/tzld/piaoquan/wecom/model/po/User.java

@@ -25,6 +25,8 @@ public class User {
 
 
     private Long updatedAt;
     private Long updatedAt;
 
 
+    private Long deletedAt;
+
     private Date createTime;
     private Date createTime;
 
 
     private Date updateTime;
     private Date updateTime;
@@ -117,6 +119,14 @@ public class User {
         this.updatedAt = updatedAt;
         this.updatedAt = updatedAt;
     }
     }
 
 
+    public Long getDeletedAt() {
+        return deletedAt;
+    }
+
+    public void setDeletedAt(Long deletedAt) {
+        this.deletedAt = deletedAt;
+    }
+
     public Date getCreateTime() {
     public Date getCreateTime() {
         return createTime;
         return createTime;
     }
     }
@@ -150,6 +160,7 @@ public class User {
         sb.append(", isDelete=").append(isDelete);
         sb.append(", isDelete=").append(isDelete);
         sb.append(", createdAt=").append(createdAt);
         sb.append(", createdAt=").append(createdAt);
         sb.append(", updatedAt=").append(updatedAt);
         sb.append(", updatedAt=").append(updatedAt);
+        sb.append(", deletedAt=").append(deletedAt);
         sb.append(", createTime=").append(createTime);
         sb.append(", createTime=").append(createTime);
         sb.append(", updateTime=").append(updateTime);
         sb.append(", updateTime=").append(updateTime);
         sb.append("]");
         sb.append("]");

+ 60 - 0
we-com-server/src/main/java/com/tzld/piaoquan/wecom/model/po/UserExample.java

@@ -826,6 +826,66 @@ public class UserExample {
             return (Criteria) this;
             return (Criteria) this;
         }
         }
 
 
+        public Criteria andDeletedAtIsNull() {
+            addCriterion("deleted_at is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDeletedAtIsNotNull() {
+            addCriterion("deleted_at is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDeletedAtEqualTo(Long value) {
+            addCriterion("deleted_at =", value, "deletedAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andDeletedAtNotEqualTo(Long value) {
+            addCriterion("deleted_at <>", value, "deletedAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andDeletedAtGreaterThan(Long value) {
+            addCriterion("deleted_at >", value, "deletedAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andDeletedAtGreaterThanOrEqualTo(Long value) {
+            addCriterion("deleted_at >=", value, "deletedAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andDeletedAtLessThan(Long value) {
+            addCriterion("deleted_at <", value, "deletedAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andDeletedAtLessThanOrEqualTo(Long value) {
+            addCriterion("deleted_at <=", value, "deletedAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andDeletedAtIn(List<Long> values) {
+            addCriterion("deleted_at in", values, "deletedAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andDeletedAtNotIn(List<Long> values) {
+            addCriterion("deleted_at not in", values, "deletedAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andDeletedAtBetween(Long value1, Long value2) {
+            addCriterion("deleted_at between", value1, value2, "deletedAt");
+            return (Criteria) this;
+        }
+
+        public Criteria andDeletedAtNotBetween(Long value1, Long value2) {
+            addCriterion("deleted_at not between", value1, value2, "deletedAt");
+            return (Criteria) this;
+        }
+
         public Criteria andCreateTimeIsNull() {
         public Criteria andCreateTimeIsNull() {
             addCriterion("create_time is null");
             addCriterion("create_time is null");
             return (Criteria) this;
             return (Criteria) this;

+ 55 - 19
we-com-server/src/main/java/com/tzld/piaoquan/wecom/service/Impl/MessageAttachmentServiceImpl.java

@@ -14,6 +14,7 @@ import com.tzld.piaoquan.wecom.service.MessageAttachmentService;
 import com.tzld.piaoquan.wecom.utils.DateUtil;
 import com.tzld.piaoquan.wecom.utils.DateUtil;
 import com.tzld.piaoquan.wecom.utils.HttpClientUtil;
 import com.tzld.piaoquan.wecom.utils.HttpClientUtil;
 import com.tzld.piaoquan.wecom.utils.HttpPoolClient;
 import com.tzld.piaoquan.wecom.utils.HttpPoolClient;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -31,6 +32,7 @@ import static com.tzld.piaoquan.wecom.common.constant.RedisConstant.GUARANTEED_M
 import static com.tzld.piaoquan.wecom.common.enums.ExceptionCodeEnum.PARAMS_ERROR;
 import static com.tzld.piaoquan.wecom.common.enums.ExceptionCodeEnum.PARAMS_ERROR;
 
 
 
 
+@Slf4j
 @Service
 @Service
 public class MessageAttachmentServiceImpl implements MessageAttachmentService {
 public class MessageAttachmentServiceImpl implements MessageAttachmentService {
 
 
@@ -106,8 +108,9 @@ public class MessageAttachmentServiceImpl implements MessageAttachmentService {
             }
             }
             return map;
             return map;
         } catch (IOException e) {
         } catch (IOException e) {
-            throw new RuntimeException("获取详情异常");
+            log.error("MessageAttachmentServiceImpl getVideDetail error", e);
         }
         }
+        return new HashMap<>();
     }
     }
 
 
     @Override
     @Override
@@ -116,13 +119,13 @@ public class MessageAttachmentServiceImpl implements MessageAttachmentService {
             if (staff == null || staff.getCarrierId() == null) {
             if (staff == null || staff.getCarrierId() == null) {
                 return "";
                 return "";
             }
             }
-            String page = selectPage(staff.getCarrierId(), videoId);
+            String page = selectPage(videoId, staff.getCarrierId(), "企微", "日常推送");
             if (StringUtils.isNotEmpty(page)) {
             if (StringUtils.isNotEmpty(page)) {
                 return page;
                 return page;
             }
             }
             return insertPage(staff.getCarrierId(), videoId, staff.getRemark());
             return insertPage(staff.getCarrierId(), videoId, staff.getRemark());
         } catch (IOException e) {
         } catch (IOException e) {
-            e.printStackTrace();
+            log.error("MessageAttachmentService getPage error", e);
         }
         }
         return null;
         return null;
     }
     }
@@ -151,23 +154,56 @@ public class MessageAttachmentServiceImpl implements MessageAttachmentService {
         return data.getString("url");
         return data.getString("url");
     }
     }
 
 
-    public String selectPage(String carrierId, Long videoId) throws IOException {
-        Map<String, String> map = new HashMap<>();
-        String url = "https://api.piaoquantv.com/ad/put/flow/list/tencent?videoId=${videoId}&putScene=touliu&channel=tencentqw&currentPage=1&pageSize=20"
-                .replace("${videoId}", "" + videoId);
-        String res = httpPoolClientDefault.get(url);
-        JSONObject jsonObject = JSONObject.parseObject(res);
-        JSONObject data = jsonObject.getJSONObject("data");
-        JSONArray objs = data.getJSONArray("objs");
-        for (int i = 0; i < objs.size(); i++) {
-            JSONObject obj = objs.getJSONObject(i);
-            String putCarrierId = obj.getString("putCarrierId");
-            String page = obj.getString("url");
-            if (StringUtils.isEmpty(putCarrierId) || StringUtils.isEmpty(page)) {
-                continue;
+    public String selectPage(Long videoId, String carrierId, String typeOne, String typeTwo) {
+        int totalPage = 1;
+        for (int n = 1; n <= totalPage; n++) {
+            String url = getUrl(videoId, n);
+            try {
+                String res = httpPoolClientDefault.get(url);
+                JSONObject jsonObject = JSONObject.parseObject(res);
+                JSONObject data = jsonObject.getJSONObject("data");
+                if (data == null) {
+                    continue;
+                }
+                if (data.getInteger("totalPage") != null) {
+                    totalPage = data.getInteger("totalPage");
+                }
+                JSONArray objs = data.getJSONArray("objs");
+                for (int i = 0; i < objs.size(); i++) {
+                    JSONObject obj = objs.getJSONObject(i);
+                    String putCarrierId = obj.getString("putCarrierId");
+                    String page = obj.getString("url");
+                    String putTypeOne = obj.getString("putTypeOne");
+                    String putTypeTwo = obj.getString("putTypeTwo");
+
+                    if (StringUtils.isEmpty(putCarrierId) || StringUtils.isEmpty(page) || StringUtils.isEmpty(putTypeOne) || StringUtils.isEmpty(putTypeTwo)) {
+                        continue;
+                    }
+
+                    if (putCarrierId.equals(carrierId) && putTypeOne.equals(typeOne) && putTypeTwo.equals(typeTwo)) {
+                        return page;
+                    }
+                }
+            } catch (IOException e) {
+                log.error("Error fetching data from API for videoId: " + videoId + ", page: " + n, e);
             }
             }
-            map.put(putCarrierId, page);
         }
         }
-        return map.get(carrierId);
+        return null;
+    }
+
+    private static String getUrl(Long videoId, int n) {
+        String baseUrl = "https://api.piaoquantv.com/ad/put/flow/list/tencent";
+        String putScene = "touliu";
+        String channel = "tencentqw";
+        int pageSize = 20;
+        return String.format(
+                "%s?videoId=%d&putScene=%s&channel=%s&currentPage=%d&pageSize=%d",
+                baseUrl,
+                videoId,
+                putScene,
+                channel,
+                n,
+                pageSize
+        );
     }
     }
 }
 }

+ 3 - 3
we-com-server/src/main/java/com/tzld/piaoquan/wecom/utils/MessageUtil.java

@@ -6,7 +6,7 @@ import static com.tzld.piaoquan.wecom.common.constant.MessageConstant.defaultNam
 
 
 public class MessageUtil {
 public class MessageUtil {
 
 
-    public static Long getVideoId(String page){
+    public static Long getVideoId(String page) {
         String translate = URLUtil.translate(page);
         String translate = URLUtil.translate(page);
         String videoId = translate.split("id=")[1].split("&")[0];
         String videoId = translate.split("id=")[1].split("&")[0];
         if (StringUtils.isNotEmpty(videoId) && StringUtils.isNumeric(videoId)) {
         if (StringUtils.isNotEmpty(videoId) && StringUtils.isNumeric(videoId)) {
@@ -15,8 +15,8 @@ public class MessageUtil {
         return null;
         return null;
     }
     }
 
 
-    public static String getName(){
-        return String.format(defaultName, DateUtil.getDayDateString("MMdd"));
+    public static String getName(String remark) {
+        return String.format(defaultName, DateUtil.getDayDateString("MMdd"), remark);
     }
     }
 
 
 }
 }

+ 12 - 0
we-com-server/src/main/resources/application-dev.properties

@@ -0,0 +1,12 @@
+spring.datasource.username=crawler
+spring.datasource.password=crawler123456@
+spring.datasource.url=jdbc:mysql://rm-bp1k5853td1r25g3n690.mysql.rds.aliyuncs.com:3306/piaoquan-crawler?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true
+
+spring.redis.database=2
+spring.redis.host=r-bp154bpw97gptefiqkpd.redis.rds.aliyuncs.com
+spring.redis.port=6379
+spring.redis.password=Qingqu2019
+
+xxl.job.admin.addresses=http://xxl-job-test-internal.piaoquantv.com/xxl-job-admin
+
+

+ 12 - 0
we-com-server/src/main/resources/application-prod.properties

@@ -0,0 +1,12 @@
+spring.datasource.username=crawler
+spring.datasource.password=crawler123456@
+spring.datasource.url=jdbc:mysql://rm-bp1159bu17li9hi94.mysql.rds.aliyuncs.com:3306/piaoquan-crawler?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true
+
+spring.redis.database=2
+spring.redis.host=r-bp154bpw97gptefiqkpd.redis.rds.aliyuncs.com
+spring.redis.port=6379
+spring.redis.password=Qingqu2019
+
+xxl.job.admin.addresses=http://xxl-job-internal.piaoquantv.com/xxl-job-admin
+
+

+ 2 - 11
we-com-server/src/main/resources/application.properties

@@ -1,8 +1,7 @@
 logging.config=classpath:log4j2.xml
 logging.config=classpath:log4j2.xml
+spring.profiles.active=dev
+spring.application.name=we-com-server
 
 
-spring.datasource.username=crawler
-spring.datasource.password=crawler123456@
-spring.datasource.url=jdbc:mysql://rm-bp1159bu17li9hi94.mysql.rds.aliyuncs.com:3306/piaoquan-crawler?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true
 spring.datasource.driver-class-name=com.mysql.jdbc.Driver
 spring.datasource.driver-class-name=com.mysql.jdbc.Driver
 spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
 spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
 spring.datasource.initialSize=5
 spring.datasource.initialSize=5
@@ -16,12 +15,6 @@ spring.datasource.testOnBorrow=false
 spring.datasource.testOnReturn=false
 spring.datasource.testOnReturn=false
 spring.datasource.poolPreparedStatements=true
 spring.datasource.poolPreparedStatements=true
 
 
-
-
-spring.redis.database=2
-spring.redis.host=r-bp154bpw97gptefiqkpd.redis.rds.aliyuncs.com
-spring.redis.port=6379
-spring.redis.password=Qingqu2019
 spring.redis.lettuce.pool.max-active=8
 spring.redis.lettuce.pool.max-active=8
 spring.redis.lettuce.pool.max-wait=-1
 spring.redis.lettuce.pool.max-wait=-1
 spring.redis.lettuce.pool.max-idle=8
 spring.redis.lettuce.pool.max-idle=8
@@ -29,9 +22,7 @@ spring.redis.lettuce.pool.min-idle=0
 
 
 datalog=/datalog
 datalog=/datalog
 
 
-spring.application.name=we-com-server
 
 
-xxl.job.admin.addresses=http://xxl-job-internal.piaoquantv.com/xxl-job-admin
 xxl.job.accessToken=
 xxl.job.accessToken=
 xxl.job.executor.appname=${spring.application.name}
 xxl.job.executor.appname=${spring.application.name}
 xxl.job.executor.address=
 xxl.job.executor.address=

+ 27 - 13
we-com-server/src/main/resources/mapper/UserMapper.xml

@@ -13,6 +13,7 @@
     <result column="is_delete" jdbcType="INTEGER" property="isDelete" />
     <result column="is_delete" jdbcType="INTEGER" property="isDelete" />
     <result column="created_at" jdbcType="BIGINT" property="createdAt" />
     <result column="created_at" jdbcType="BIGINT" property="createdAt" />
     <result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
     <result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
+    <result column="deleted_at" jdbcType="BIGINT" property="deletedAt" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
     <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
   </resultMap>
   </resultMap>
@@ -76,7 +77,7 @@
   </sql>
   </sql>
   <sql id="Base_Column_List">
   <sql id="Base_Column_List">
     id, external_user_id, union_id, external_user_id_3rd_party, `type`, `name`, avatar, 
     id, external_user_id, union_id, external_user_id_3rd_party, `type`, `name`, avatar, 
-    gender, is_delete, created_at, updated_at, create_time, update_time
+    gender, is_delete, created_at, updated_at, deleted_at, create_time, update_time
   </sql>
   </sql>
   <select id="selectByExample" parameterType="com.tzld.piaoquan.wecom.model.po.UserExample" resultMap="BaseResultMap">
   <select id="selectByExample" parameterType="com.tzld.piaoquan.wecom.model.po.UserExample" resultMap="BaseResultMap">
     select
     select
@@ -111,20 +112,17 @@
       <include refid="Example_Where_Clause" />
       <include refid="Example_Where_Clause" />
     </if>
     </if>
   </delete>
   </delete>
-  <insert id="insert" parameterType="com.tzld.piaoquan.wecom.model.po.User" useGeneratedKeys="true" keyProperty="id">
-      insert into we_com_user (id, external_user_id, union_id,
-      external_user_id_3rd_party, `type`, `name`,
+  <insert id="insert" parameterType="com.tzld.piaoquan.wecom.model.po.User">
+    insert into we_com_user (id, external_user_id, union_id, 
+      external_user_id_3rd_party, `type`, `name`, 
       avatar, gender,
       avatar, gender,
-      created_at, updated_at, create_time,
-      update_time)
-      values (#{id,jdbcType=BIGINT}, #{externalUserId,jdbcType=VARCHAR}, #{unionId,jdbcType=VARCHAR},
-      #{externalUserId3rdParty,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR},
+      created_at, updated_at, deleted_at, 
+      create_time, update_time)
+    values (#{id,jdbcType=BIGINT}, #{externalUserId,jdbcType=VARCHAR}, #{unionId,jdbcType=VARCHAR}, 
+      #{externalUserId3rdParty,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, 
       #{avatar,jdbcType=VARCHAR}, #{gender,jdbcType=INTEGER},
       #{avatar,jdbcType=VARCHAR}, #{gender,jdbcType=INTEGER},
-      #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
-      #{updateTime,jdbcType=TIMESTAMP})
-      <selectKey resultType="java.lang.Long" order="AFTER" keyProperty="id">
-          select LAST_INSERT_ID()
-      </selectKey>
+      #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, #{deletedAt,jdbcType=BIGINT}, 
+      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
   </insert>
   </insert>
   <insert id="insertSelective" parameterType="com.tzld.piaoquan.wecom.model.po.User">
   <insert id="insertSelective" parameterType="com.tzld.piaoquan.wecom.model.po.User">
     insert into we_com_user
     insert into we_com_user
@@ -162,6 +160,9 @@
       <if test="updatedAt != null">
       <if test="updatedAt != null">
         updated_at,
         updated_at,
       </if>
       </if>
+      <if test="deletedAt != null">
+        deleted_at,
+      </if>
       <if test="createTime != null">
       <if test="createTime != null">
         create_time,
         create_time,
       </if>
       </if>
@@ -203,6 +204,9 @@
       <if test="updatedAt != null">
       <if test="updatedAt != null">
         #{updatedAt,jdbcType=BIGINT},
         #{updatedAt,jdbcType=BIGINT},
       </if>
       </if>
+      <if test="deletedAt != null">
+        #{deletedAt,jdbcType=BIGINT},
+      </if>
       <if test="createTime != null">
       <if test="createTime != null">
         #{createTime,jdbcType=TIMESTAMP},
         #{createTime,jdbcType=TIMESTAMP},
       </if>
       </if>
@@ -253,6 +257,9 @@
       <if test="record.updatedAt != null">
       <if test="record.updatedAt != null">
         updated_at = #{record.updatedAt,jdbcType=BIGINT},
         updated_at = #{record.updatedAt,jdbcType=BIGINT},
       </if>
       </if>
+      <if test="record.deletedAt != null">
+        deleted_at = #{record.deletedAt,jdbcType=BIGINT},
+      </if>
       <if test="record.createTime != null">
       <if test="record.createTime != null">
         create_time = #{record.createTime,jdbcType=TIMESTAMP},
         create_time = #{record.createTime,jdbcType=TIMESTAMP},
       </if>
       </if>
@@ -277,6 +284,7 @@
       is_delete = #{record.isDelete,jdbcType=INTEGER},
       is_delete = #{record.isDelete,jdbcType=INTEGER},
       created_at = #{record.createdAt,jdbcType=BIGINT},
       created_at = #{record.createdAt,jdbcType=BIGINT},
       updated_at = #{record.updatedAt,jdbcType=BIGINT},
       updated_at = #{record.updatedAt,jdbcType=BIGINT},
+      deleted_at = #{record.deletedAt,jdbcType=BIGINT},
       create_time = #{record.createTime,jdbcType=TIMESTAMP},
       create_time = #{record.createTime,jdbcType=TIMESTAMP},
       update_time = #{record.updateTime,jdbcType=TIMESTAMP}
       update_time = #{record.updateTime,jdbcType=TIMESTAMP}
     <if test="_parameter != null">
     <if test="_parameter != null">
@@ -316,6 +324,9 @@
       <if test="updatedAt != null">
       <if test="updatedAt != null">
         updated_at = #{updatedAt,jdbcType=BIGINT},
         updated_at = #{updatedAt,jdbcType=BIGINT},
       </if>
       </if>
+      <if test="deletedAt != null">
+        deleted_at = #{deletedAt,jdbcType=BIGINT},
+      </if>
       <if test="createTime != null">
       <if test="createTime != null">
         create_time = #{createTime,jdbcType=TIMESTAMP},
         create_time = #{createTime,jdbcType=TIMESTAMP},
       </if>
       </if>
@@ -337,6 +348,7 @@
       is_delete = #{isDelete,jdbcType=INTEGER},
       is_delete = #{isDelete,jdbcType=INTEGER},
       created_at = #{createdAt,jdbcType=BIGINT},
       created_at = #{createdAt,jdbcType=BIGINT},
       updated_at = #{updatedAt,jdbcType=BIGINT},
       updated_at = #{updatedAt,jdbcType=BIGINT},
+      deleted_at = #{deletedAt,jdbcType=BIGINT},
       create_time = #{createTime,jdbcType=TIMESTAMP},
       create_time = #{createTime,jdbcType=TIMESTAMP},
       update_time = #{updateTime,jdbcType=TIMESTAMP}
       update_time = #{updateTime,jdbcType=TIMESTAMP}
     where id = #{id,jdbcType=BIGINT}
     where id = #{id,jdbcType=BIGINT}
@@ -362,6 +374,7 @@
     gender,
     gender,
     created_at,
     created_at,
     updated_at,
     updated_at,
+    deleted_at,
     create_time,
     create_time,
     update_time
     update_time
     )
     )
@@ -377,6 +390,7 @@
       #{item.gender,jdbcType=INTEGER},
       #{item.gender,jdbcType=INTEGER},
       #{item.createdAt,jdbcType=BIGINT},
       #{item.createdAt,jdbcType=BIGINT},
       #{item.updatedAt,jdbcType=BIGINT},
       #{item.updatedAt,jdbcType=BIGINT},
+      #{item.deletedAt,jdbcType=BIGINT},
       #{item.createTime,jdbcType=TIMESTAMP},
       #{item.createTime,jdbcType=TIMESTAMP},
       #{item.updateTime,jdbcType=TIMESTAMP}
       #{item.updateTime,jdbcType=TIMESTAMP}
       )
       )

+ 3 - 3
we-com-server/src/main/resources/mybatis-generator-config.xml

@@ -27,7 +27,7 @@
         </commentGenerator>
         </commentGenerator>
 
 
         <jdbcConnection driverClass="com.mysql.jdbc.Driver"
         <jdbcConnection driverClass="com.mysql.jdbc.Driver"
-                        connectionURL="jdbc:mysql://rm-bp1k5853td1r25g3n690.mysql.rds.aliyuncs.com:3306/piaoquan-crawler?useUnicode=true&amp;characterEncoding=utf-8&amp;zeroDateTimeBehavior=convertToNull&amp;useSSL=false"
+                        connectionURL="jdbc:mysql://rm-bp1159bu17li9hi94.mysql.rds.aliyuncs.com:3306/piaoquan-crawler?useUnicode=true&amp;characterEncoding=utf-8&amp;zeroDateTimeBehavior=convertToNull&amp;useSSL=false"
                         userId="crawler" password="crawler123456@">
                         userId="crawler" password="crawler123456@">
         </jdbcConnection>
         </jdbcConnection>
 
 
@@ -50,12 +50,12 @@
             <property name="enableSubPackages" value="true"/>
             <property name="enableSubPackages" value="true"/>
         </javaClientGenerator>
         </javaClientGenerator>
 
 
-<!--        <table tableName="we_com_user" domainObjectName="User" alias=""/>-->
+        <table tableName="we_com_user" domainObjectName="User" alias=""/>
 <!--        <table tableName="we_com_history_message" domainObjectName="HistoryMessage" alias=""/>-->
 <!--        <table tableName="we_com_history_message" domainObjectName="HistoryMessage" alias=""/>-->
 <!--        <table tableName="we_com_message_attachment" domainObjectName="MessageAttachment" alias=""/>-->
 <!--        <table tableName="we_com_message_attachment" domainObjectName="MessageAttachment" alias=""/>-->
 <!--        <table tableName="we_com_staff" domainObjectName="Staff" alias=""/>-->
 <!--        <table tableName="we_com_staff" domainObjectName="Staff" alias=""/>-->
 <!--        <table tableName="we_com_staff_with_user" domainObjectName="StaffWithUser" alias=""/>-->
 <!--        <table tableName="we_com_staff_with_user" domainObjectName="StaffWithUser" alias=""/>-->
-        <table tableName="we_com_send_message" domainObjectName="SendMessage" alias=""/>
+<!--        <table tableName="we_com_send_message" domainObjectName="SendMessage" alias=""/>-->
 
 
 
 
     </context>
     </context>