Browse Source

Merge branch 'master' into test

wangyunpeng 3 weeks ago
parent
commit
93e6de9095
51 changed files with 4178 additions and 625 deletions
  1. 3 0
      api-module/src/main/java/com/tzld/piaoquan/api/common/enums/ExceptionEnum.java
  2. 7 4
      api-module/src/main/java/com/tzld/piaoquan/api/controller/CgiReplyController.java
  3. 2 2
      api-module/src/main/java/com/tzld/piaoquan/api/dao/generator/MybatisGeneratorMain.java
  4. 6 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/contentplatform/ext/ContentPlatformDataStatMapperExt.java
  5. 6 0
      api-module/src/main/java/com/tzld/piaoquan/api/dao/mapper/contentplatform/ext/ContentPlatformPlanMapperExt.java
  6. 3 8
      api-module/src/main/java/com/tzld/piaoquan/api/job/ContentPlatformDatastatJob.java
  7. 23 15
      api-module/src/main/java/com/tzld/piaoquan/api/job/ContentPlatformVideoJob.java
  8. 17 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/VideoCharacteristicVO.java
  9. 36 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/vo/contentplatform/GzhAccountVideoDatastatItemExportVO.java
  10. 5 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/CgiReplyService.java
  11. 2 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/GhDetailService.java
  12. 20 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/impl/ContentPlatformDatastatServiceImpl.java
  13. 3 1
      api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/impl/ContentPlatformPlanServiceImpl.java
  14. 49 5
      api-module/src/main/java/com/tzld/piaoquan/api/service/impl/CgiReplyServiceImpl.java
  15. 12 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/impl/GhDetailServiceImpl.java
  16. 1 1
      api-module/src/main/java/com/tzld/piaoquan/api/service/impl/WeComAutoReplyImpl.java
  17. 2 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/strategy/impl/BuckStrategyV1.java
  18. 2 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/strategy/impl/ThirdPartyPushMessageStrategyV1.java
  19. 2 0
      api-module/src/main/java/com/tzld/piaoquan/api/service/strategy/impl/WeComPushMessageStrategyV1.java
  20. 12 0
      api-module/src/main/resources/mapper/contentplatform/ext/ContentPlatformDataStatMapperExt.xml
  21. 19 0
      api-module/src/main/resources/mapper/contentplatform/ext/ContentPlatformPlanMapperExt.xml
  22. 8 1
      api-module/src/main/resources/mybatis-generator-config.xml
  23. 7 1
      api-module/src/test/java/com/tzld/piaoquan/api/ContentPlatformTest.java
  24. 3 0
      common-module/src/main/java/com/tzld/piaoquan/growth/common/common/constant/RedisConstant.java
  25. 2 0
      common-module/src/main/java/com/tzld/piaoquan/growth/common/common/constant/WeComConstant.java
  26. 9 6
      common-module/src/main/java/com/tzld/piaoquan/growth/common/dao/mapper/CgiReplyBucketDataMapper.java
  27. 35 0
      common-module/src/main/java/com/tzld/piaoquan/growth/common/dao/mapper/CorpStatisticsTotalMapper.java
  28. 35 0
      common-module/src/main/java/com/tzld/piaoquan/growth/common/dao/mapper/StaffStatisticsTotalMapper.java
  29. 47 9
      common-module/src/main/java/com/tzld/piaoquan/growth/common/model/po/CgiReplyBucketData.java
  30. 84 2
      common-module/src/main/java/com/tzld/piaoquan/growth/common/model/po/CgiReplyBucketDataExample.java
  31. 125 0
      common-module/src/main/java/com/tzld/piaoquan/growth/common/model/po/CorpStatisticsTotal.java
  32. 822 0
      common-module/src/main/java/com/tzld/piaoquan/growth/common/model/po/CorpStatisticsTotalExample.java
  33. 147 0
      common-module/src/main/java/com/tzld/piaoquan/growth/common/model/po/StaffStatisticsTotal.java
  34. 942 0
      common-module/src/main/java/com/tzld/piaoquan/growth/common/model/po/StaffStatisticsTotalExample.java
  35. 22 0
      common-module/src/main/java/com/tzld/piaoquan/growth/common/model/po/StaffWithUser.java
  36. 120 0
      common-module/src/main/java/com/tzld/piaoquan/growth/common/model/po/StaffWithUserExample.java
  37. 11 0
      common-module/src/main/java/com/tzld/piaoquan/growth/common/model/po/WeComUser.java
  38. 70 1
      common-module/src/main/java/com/tzld/piaoquan/growth/common/model/po/WeComUserExample.java
  39. 5 1
      common-module/src/main/java/com/tzld/piaoquan/growth/common/service/Impl/MessageAttachmentServiceImpl.java
  40. 41 2
      common-module/src/main/java/com/tzld/piaoquan/growth/common/service/Impl/WeComUserServiceImpl.java
  41. 1 1
      common-module/src/main/java/com/tzld/piaoquan/growth/common/service/MessageAttachmentService.java
  42. 6 0
      common-module/src/main/java/com/tzld/piaoquan/growth/common/utils/MessageUtil.java
  43. 95 72
      common-module/src/main/resources/mapper/CgiReplyBucketDataMapper.xml
  44. 294 0
      common-module/src/main/resources/mapper/CorpStatisticsTotalMapper.xml
  45. 326 0
      common-module/src/main/resources/mapper/StaffStatisticsTotalMapper.xml
  46. 45 7
      common-module/src/main/resources/mapper/StaffWithUserMapper.xml
  47. 480 472
      common-module/src/main/resources/mapper/WeComUserMapper.xml
  48. 23 0
      offline-module/src/main/java/com/tzld/piaoquan/offline/job/AutoReplyVideoDataJob.java
  49. 1 1
      offline-module/src/main/java/com/tzld/piaoquan/offline/job/WeComMessageDataJob.java
  50. 129 6
      offline-module/src/main/java/com/tzld/piaoquan/offline/job/WeComStaffDataJob.java
  51. 11 7
      offline-module/src/main/java/com/tzld/piaoquan/offline/job/WeComUserDataJob.java

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

@@ -47,6 +47,9 @@ public enum ExceptionEnum {
     API_PAGE_PARAM_ERROR(4001, "请输入正确的分页参数"),
     API_PAGE_SIZE_TOO_LARGE(4002, "每页获取数量不能超过500条"),
     API_PAGE_URL_SIZE_TOO_LARGE(4002, "获取视频嵌入路径 每次最多3条"),
+
+    // 自动回复
+    CGI_REPLY_BUCKET_DATA_NOT_FOUND(10000, "自动回复数据不存在"),
     ;
     private int code;
     private String msg;

+ 7 - 4
api-module/src/main/java/com/tzld/piaoquan/api/controller/CgiReplyController.java

@@ -2,14 +2,12 @@ package com.tzld.piaoquan.api.controller;
 
 import com.tzld.piaoquan.api.model.bo.BucketDataParam;
 import com.tzld.piaoquan.api.model.bo.ReplyBucketData;
+import com.tzld.piaoquan.api.model.vo.VideoCharacteristicVO;
 import com.tzld.piaoquan.api.service.CgiReplyService;
 import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 @RestController
 @RequestMapping("/cgi/reply")
@@ -24,4 +22,9 @@ public class CgiReplyController {
         ReplyBucketData replyBucketData = cgiReplyService.getRgiReplyData(bucketDataParam);
         return CommonResponse.success(replyBucketData);
     }
+
+    @GetMapping("/getVideoCharacteristic")
+    public CommonResponse<VideoCharacteristicVO> getVideoCharacteristicByRootSourceId(@RequestParam String rootSourceId) {
+        return CommonResponse.success(cgiReplyService.getVideoCharacteristicByRootSourceId(rootSourceId));
+    }
 }

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

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

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

@@ -111,14 +111,20 @@ public interface ContentPlatformDataStatMapperExt {
 
     List<ContentPlatformQwDataStatReplyTotal> getQwTotalDatastatReplyScoreList(@Param("dt") String dt, @Param("channels") List<String> channels);
 
+    void deleteQwDatastat(@Param("dt") String dt);
+
     void deleteQwDatastatTotal(@Param("dt") String dt);
 
     void deleteQwDatastatReplyTotal(@Param("dt") String dt);
 
     void deleteQwDatastatSubChannel(@Param("dt") String dt);
 
+    void deleteGzhDatastat(@Param("dt") String dt);
+
     void deleteGzhDatastatTotal(@Param("dt") String dt);
 
+    void deleteFwhDatastat(@Param("dt") String dt);
+
     void deleteFwhDatastatTotal(@Param("dt") String dt);
 
     void deleteGzhVideoDatastat(@Param("dt") String dt);

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

@@ -71,11 +71,17 @@ public interface ContentPlatformPlanMapperExt {
 
     List<ContentPlatformVideo> getVideoListByIds(@Param("videoIds") List<Long> videoIds);
 
+    void deleteContentPlatformVideo(@Param("dt") String dt);
+
     void deleteContentPlatformVideoAgg(@Param("dt") String dt);
 
     void deleteContentPlatformVideoDatastatAgg(@Param("dt") String aggDt);
 
+    void deleteContentPlatformVideoDatastat(@Param("dt") String aggDt);
+
     void batchInsertContentPlatformVideoDatastat(@Param("records") List<ContentPlatformVideoDataStat> saveList);
 
     void batchInsertContentPlatformVideoDatastatAgg(@Param("records") List<ContentPlatformVideoDataStatAgg> saveAggList);
+
+    void updateOtherVideoStatus(@Param("dt") String dt, @Param("videoIdList") List<Long> videoIdList, @Param("now") Long now);
 }

+ 3 - 8
api-module/src/main/java/com/tzld/piaoquan/api/job/ContentPlatformDatastatJob.java

@@ -69,10 +69,6 @@ public class ContentPlatformDatastatJob {
         if (StringUtils.hasText(param)) {
             dt = param;
         }
-        long count = getGzhDatastatCount(dt);
-        if (count > 0) {
-            return ReturnT.SUCCESS;
-        }
         Long now = System.currentTimeMillis();
         // 公众号自动回复数据统计
         String sql = String.format(
@@ -122,6 +118,7 @@ public class ContentPlatformDatastatJob {
                 saveList.add(item);
             }
             if (CollectionUtils.isNotEmpty(saveList)) {
+                dataStatMapperExt.deleteGzhDatastat(dt);
                 dataStatMapperExt.batchInsertGzhDatastat(saveList);
             }
         }
@@ -270,10 +267,6 @@ public class ContentPlatformDatastatJob {
         if (StringUtils.hasText(param)) {
             dt = param;
         }
-        long count = getFwhDatastatCount(dt);
-        if (count > 0) {
-            return ReturnT.SUCCESS;
-        }
         Long now = System.currentTimeMillis();
         // 公众号自动回复数据统计
         String sql = String.format(
@@ -323,6 +316,7 @@ public class ContentPlatformDatastatJob {
                 saveList.add(item);
             }
             if (CollectionUtils.isNotEmpty(saveList)) {
+                dataStatMapperExt.deleteFwhDatastat(dt);
                 dataStatMapperExt.batchInsertFwhDatastat(saveList);
             }
         }
@@ -537,6 +531,7 @@ public class ContentPlatformDatastatJob {
             }
         }
         if (CollectionUtils.isNotEmpty(saveList)) {
+            dataStatMapperExt.deleteQwDatastat(dt);
             dataStatMapperExt.batchInsertQwDatastat(saveList);
         }
         return ReturnT.SUCCESS;

+ 23 - 15
api-module/src/main/java/com/tzld/piaoquan/api/job/ContentPlatformVideoJob.java

@@ -58,12 +58,8 @@ public class ContentPlatformVideoJob {
             aggDt = param;
         }
         List<String> dtList = DateUtil.getBeforeDays(aggDt, null, videoAggDays);
-        // 轮询查询大数据获取最近14天视频
+        // 轮询查询大数据获取最近 videoAggDays 天视频
         for (String dt : dtList) {
-            long videoCount = getVideoCount(dt);
-            if (videoCount > 0) {
-                continue;
-            }
             String sql = String.format("SELECT * FROM loghubods.wecom_cooperation_video_candidate_pool WHERE dt=%s;", dt);
             List<Record> dataList = OdpsUtil.getOdpsData(sql);
             Long now = System.currentTimeMillis();
@@ -102,7 +98,18 @@ public class ContentPlatformVideoJob {
                 }
                 // save
                 if (CollectionUtils.isNotEmpty(saveList)) {
-                    planMapperExt.batchInsertContentPlatformVideo(saveList);
+                    List<ContentPlatformVideo> videoList = getVideoList(dt);
+                    if (CollectionUtils.isNotEmpty(videoList)) {
+                        List<Long> existVideoIds = videoList.stream().map(ContentPlatformVideo::getVideoId).collect(Collectors.toList());
+                        List<Long> videoIdList = saveList.stream().map(ContentPlatformVideo::getVideoId).collect(Collectors.toList());
+                        planMapperExt.updateOtherVideoStatus(dt, videoIdList, now);
+                        saveList = saveList.stream().filter(item -> !existVideoIds.contains(item.getVideoId())).collect(Collectors.toList());
+                        if (CollectionUtils.isNotEmpty(saveList)) {
+                            planMapperExt.batchInsertContentPlatformVideo(saveList);
+                        }
+                    } else {
+                        planMapperExt.batchInsertContentPlatformVideo(saveList);
+                    }
                 }
             }
         }
@@ -155,6 +162,12 @@ public class ContentPlatformVideoJob {
         return videoMapper.countByExample(example);
     }
 
+    private List<ContentPlatformVideo> getVideoList(String dt) {
+        ContentPlatformVideoExample example = new ContentPlatformVideoExample();
+        example.createCriteria().andDtEqualTo(dt);
+        return videoMapper.selectByExample(example);
+    }
+
     private long getVideoAggCount(String dt) {
         ContentPlatformVideoAggExample example = new ContentPlatformVideoAggExample();
         example.createCriteria().andDtEqualTo(dt);
@@ -174,10 +187,9 @@ public class ContentPlatformVideoJob {
             Map<Long, VideoDetail> videoDetailMap = messageAttachmentService.getVideoDetail(new HashSet<>(videoIds));
             for (ContentPlatformVideoAgg video : partition) {
                 VideoDetail videoDetail = videoDetailMap.get(video.getVideoId());
-                if (videoDetail == null) {
-                    continue;
-                }
-                if (videoDetail.getAuditStatus() != 5 || videoDetail.getRecommendStatus() != -6) {
+                if (videoDetail == null
+                        || videoDetail.getAuditStatus() != 5
+                        || videoDetail.getRecommendStatus() != -6) {
                     planMapperExt.updateVideoStatus(video.getVideoId(), now);
                     planMapperExt.updateVideoAggStatus(video.getVideoId(), now);
                 }
@@ -201,11 +213,6 @@ public class ContentPlatformVideoJob {
         List<String> dtList = DateUtil.getBeforeDays(aggDt, aggDt, 6);
         // 轮询查询大数据获取最近14天视频
         for (String dt : dtList) {
-            long videoGroupScoreCount = getVideoGroupScoreCount(dt);
-            if (videoGroupScoreCount > 0) {
-                continue;
-            }
-
             String sql = String.format("SELECT 行业, 渠道, vid, 首层访问人数, t0裂变人数, t0裂变率 " +
                     "FROM loghubods.wecom_cooperation_video_candidate_pool_hy_qd WHERE dt=%s;", dt);
             List<Record> dataList = OdpsUtil.getOdpsData(sql);
@@ -232,6 +239,7 @@ public class ContentPlatformVideoJob {
                 }
                 // save
                 if (CollectionUtils.isNotEmpty(saveList)) {
+                    planMapperExt.deleteContentPlatformVideoDatastat(dt);
                     planMapperExt.batchInsertContentPlatformVideoDatastat(saveList);
                 }
             }

+ 17 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/vo/VideoCharacteristicVO.java

@@ -0,0 +1,17 @@
+package com.tzld.piaoquan.api.model.vo;
+
+import lombok.Data;
+
+@Data
+public class VideoCharacteristicVO {
+
+    private String ghId;
+
+    private String name;
+
+    private Long videoId;
+
+    private String title;
+
+    private String cover;
+}

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

@@ -0,0 +1,36 @@
+package com.tzld.piaoquan.api.model.vo.contentplatform;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
+import com.alibaba.excel.annotation.write.style.ContentRowHeight;
+import com.alibaba.excel.annotation.write.style.HeadRowHeight;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@ColumnWidth(20)//宽
+@HeadRowHeight(50)//表头高
+@ContentRowHeight(25)//正文行高
+public class GzhAccountVideoDatastatItemExportVO {
+
+    @ExcelProperty("日期")
+    private String dateStr;
+
+    @ExcelProperty("公众号名称")
+    private String name;
+
+    @ExcelProperty("视频ID")
+    private Long videoId;
+
+    @ExcelProperty("视频标题")
+    private String title;
+
+    @ExcelProperty("小程序访问人数")
+    private Integer firstLevel;
+
+    @ExcelProperty("本渠道裂变率")
+    private Double score;
+}

+ 5 - 0
api-module/src/main/java/com/tzld/piaoquan/api/service/CgiReplyService.java

@@ -2,6 +2,7 @@ package com.tzld.piaoquan.api.service;
 
 import com.tzld.piaoquan.api.model.bo.BucketDataParam;
 import com.tzld.piaoquan.api.model.bo.ReplyBucketData;
+import com.tzld.piaoquan.api.model.vo.VideoCharacteristicVO;
 import com.tzld.piaoquan.growth.common.model.po.CgiReplyBucketData;
 
 import java.util.List;
@@ -14,4 +15,8 @@ public interface CgiReplyService {
     List<CgiReplyBucketData> getCgiReplyBucketDataListByVideoId(Long videoId);
 
     List<CgiReplyBucketData> getCgiReplyBucketDataListByGhIdVideoId(String ghId, List<Long> videoIds, String strategy);
+
+    List<CgiReplyBucketData> getCgiReplyBucketDataListByRootSourceId(String rootSourceId);
+
+    VideoCharacteristicVO getVideoCharacteristicByRootSourceId(String rootSourceId);
 }

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

@@ -20,5 +20,7 @@ public interface GhDetailService {
 
     GhDetail getGhDetailByGhIdType(String ghId, Integer type);
 
+    GhDetail getGhDetailByGhId(String ghId);
+
     List<GhDetail> getByChannel(String channel);
 }

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

@@ -408,6 +408,8 @@ public class ContentPlatformDatastatServiceImpl implements ContentPlatformDatast
         List<GzhDatastatItemVO> dataList = pageResult.getObjs();
         if (param.getType() == 1 || param.getType() == 3) {
             return generateGzhDatastatExcelFile(dataList);
+        } else if (param.getType() == 4) {
+            return generateGzhAccountVideoDatastatExcelFile(dataList);
         } else {
             return generateTotalGzhDatastatExcelFile(dataList);
         }
@@ -449,6 +451,24 @@ public class ContentPlatformDatastatServiceImpl implements ContentPlatformDatast
         return CdnUtil.DOWNLOAD_CDN_URL_HOST_PICTURE + fileName;
     }
 
+    public String generateGzhAccountVideoDatastatExcelFile(List<GzhDatastatItemVO> dataList) {
+        ArrayList<GzhAccountVideoDatastatItemExportVO> list = new ArrayList<>();
+        if (CollectionUtils.isNotEmpty(dataList)) {
+            for (GzhDatastatItemVO data : dataList) {
+                list.add(new GzhAccountVideoDatastatItemExportVO(data.getDateStr(), data.getName(), data.getVideoId(),
+                        data.getTitle(), data.getFirstLevel(), data.getScore()));
+            }
+        } else {
+            list.add(new GzhAccountVideoDatastatItemExportVO());
+        }
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+        EasyExcel.write(out, GzhAccountVideoDatastatItemExportVO.class).sheet("").doWrite(list);
+        ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(out.toByteArray());
+        String fileName = "公众号数据统计_" + System.currentTimeMillis() + ".xls";
+        AliOssFileTool.saveInPublicReturnHost(byteArrayInputStream, EnumPublicBuckets.PUBBUCKET, fileName, EnumFileType.TEMP_PICTURE);
+        return CdnUtil.DOWNLOAD_CDN_URL_HOST_PICTURE + fileName;
+    }
+
     @Override
     public String qwDatastatExport(QwDatastatListParam param) {
         param.setPageNum(1);

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

@@ -167,7 +167,8 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
                     videoItemVO.setCustomCoverType(video.getCustomCoverType());
                     videoItemVO.setVideo(video.getVideo());
                     videoItemVO.setPageUrl(video.getPageUrl());
-                    if (Objects.nonNull(bucketDataMapByGhId)) {
+                    if (Objects.nonNull(bucketDataMapByGhId) && bucketDataMapByGhId.containsKey(video.getVideoId())
+                            && planItemVO.getType().equals(ContentPlatformGzhPlanTypeEnum.AUTO_REPLY.getVal())) {
                         CgiReplyBucketData bucketData = bucketDataMapByGhId.get(video.getVideoId());
                         if (Objects.nonNull(bucketData)) {
                             videoItemVO.setPageUrl(bucketData.getMiniPagePath());
@@ -470,6 +471,7 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
         int count = planMapperExt.getVideoCount(param, dt, videoMinScore);
         result.setTotalSize(count);
         if (count == 0) {
+            result.setObjs(new ArrayList<>());
             return result;
         }
         String sort = getVideoContentListSort(param.getSort());

+ 49 - 5
api-module/src/main/java/com/tzld/piaoquan/api/service/impl/CgiReplyServiceImpl.java

@@ -1,19 +1,25 @@
 package com.tzld.piaoquan.api.service.impl;
 
 import com.alibaba.fastjson.JSONArray;
-import com.tzld.piaoquan.growth.common.common.enums.GhTypeEnum;
+import com.alibaba.fastjson.JSONObject;
+import com.tzld.piaoquan.api.common.enums.ExceptionEnum;
 import com.tzld.piaoquan.api.common.enums.ReplyStrategyServiceEnum;
-import com.tzld.piaoquan.growth.common.dao.mapper.CgiReplyBucketDataMapper;
-import com.tzld.piaoquan.growth.common.dao.mapper.GhDetailMapper;
+import com.tzld.piaoquan.api.common.exception.CommonException;
 import com.tzld.piaoquan.api.model.bo.BucketDataParam;
 import com.tzld.piaoquan.api.model.bo.ReplyBucketData;
+import com.tzld.piaoquan.api.model.vo.VideoCharacteristicVO;
+import com.tzld.piaoquan.api.service.CgiReplyService;
+import com.tzld.piaoquan.api.service.GhDetailService;
+import com.tzld.piaoquan.api.service.strategy.ReplyStrategyService;
+import com.tzld.piaoquan.growth.common.common.enums.GhTypeEnum;
+import com.tzld.piaoquan.growth.common.dao.mapper.CgiReplyBucketDataMapper;
+import com.tzld.piaoquan.growth.common.dao.mapper.GhDetailMapper;
 import com.tzld.piaoquan.growth.common.model.po.CgiReplyBucketData;
 import com.tzld.piaoquan.growth.common.model.po.CgiReplyBucketDataExample;
 import com.tzld.piaoquan.growth.common.model.po.GhDetail;
 import com.tzld.piaoquan.growth.common.model.po.GhDetailExample;
-import com.tzld.piaoquan.api.service.CgiReplyService;
-import com.tzld.piaoquan.api.service.strategy.ReplyStrategyService;
 import com.tzld.piaoquan.growth.common.utils.LarkRobotUtil;
+import com.tzld.piaoquan.growth.common.utils.RedisUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.ApplicationContext;
@@ -21,6 +27,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
 
 import javax.annotation.PostConstruct;
+import java.util.Comparator;
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
@@ -39,6 +46,12 @@ public class CgiReplyServiceImpl implements CgiReplyService {
     @Autowired
     private CgiReplyBucketDataMapper cgiReplyBucketDataMapper;
 
+    @Autowired
+    GhDetailService ghDetailService;
+
+    @Autowired
+    private RedisUtils redisUtils;
+
     @PostConstruct
     public void init() {
         strategyServiceMap = applicationContext.getBeansOfType(ReplyStrategyService.class);
@@ -114,4 +127,35 @@ public class CgiReplyServiceImpl implements CgiReplyService {
                 .andStrategyEqualTo(strategy).andIsDeleteEqualTo(0);
         return cgiReplyBucketDataMapper.selectByExample(example);
     }
+
+    @Override
+    public List<CgiReplyBucketData> getCgiReplyBucketDataListByRootSourceId(String rootSourceId) {
+        CgiReplyBucketDataExample example = new CgiReplyBucketDataExample();
+        example.createCriteria().andRootSourceIdEqualTo(rootSourceId).andIsDeleteEqualTo(0);
+        return cgiReplyBucketDataMapper.selectByExample(example);
+    }
+
+    @Override
+    public VideoCharacteristicVO getVideoCharacteristicByRootSourceId(String rootSourceId) {
+        String redisKey = "auto_reply_video_detail_" + rootSourceId;
+        String value = redisUtils.get(redisKey);
+        if (StringUtils.isNotEmpty(value)) {
+            return JSONObject.parseObject(value, VideoCharacteristicVO.class);
+        }
+        List<CgiReplyBucketData> list = getCgiReplyBucketDataListByRootSourceId(rootSourceId);
+        if (CollectionUtils.isEmpty(list)) {
+            throw new CommonException(ExceptionEnum.CGI_REPLY_BUCKET_DATA_NOT_FOUND);
+        }
+        list.sort(Comparator.comparing(CgiReplyBucketData::getCreateTime).reversed());
+        CgiReplyBucketData cgiReplyBucketData = list.get(0);
+        GhDetail ghDetail = ghDetailService.getGhDetailByGhId(cgiReplyBucketData.getGhId());
+        VideoCharacteristicVO vo = new VideoCharacteristicVO();
+        vo.setGhId(cgiReplyBucketData.getGhId());
+        vo.setName(ghDetail.getGhName());
+        vo.setVideoId(cgiReplyBucketData.getMiniVideoId());
+        vo.setTitle(cgiReplyBucketData.getTitle());
+        vo.setCover(cgiReplyBucketData.getCoverUrl());
+        redisUtils.set(redisKey, JSONObject.toJSONString(vo), 3L * 24 * 60 * 60);
+        return vo;
+    }
 }

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

@@ -233,6 +233,18 @@ public class GhDetailServiceImpl implements GhDetailService {
         return null;
     }
 
+    @Override
+    public GhDetail getGhDetailByGhId(String ghId) {
+        GhDetailExample example = new GhDetailExample();
+        example.createCriteria().andGhIdEqualTo(ghId).andIsDeleteEqualTo(0);
+        example.setOrderByClause("id desc");
+        List<GhDetail> ghDetails = ghDetailMapper.selectByExample(example);
+        if (!CollectionUtils.isEmpty(ghDetails)) {
+            return ghDetails.get(0);
+        }
+        return null;
+    }
+
     @Override
     public List<GhDetail> getByChannel(String channel) {
         GhDetailExample ghDetailExample = new GhDetailExample();

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

@@ -80,7 +80,7 @@ public class WeComAutoReplyImpl implements WeComAutoReply {
                 JSONObject attachment = new JSONObject();
                 attachment.put("msgtype", "miniprogram");
                 JSONObject miniprogram = new JSONObject();
-                String picMediaId = messageAttachmentService.getPicMediaId(msgData.getCoverUrl(), corpId);
+                String picMediaId = messageAttachmentService.getPicMediaId(msgData.getCoverUrl(), corpId, msgData.getMiniVideoId());
                 miniprogram.put("title", msgData.getTitle());
                 miniprogram.put("pic_media_id", picMediaId);
                 miniprogram.put("appid", msgData.getMiniAppId());

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

@@ -17,6 +17,7 @@ import com.tzld.piaoquan.api.model.po.AlgGhAutoreplyVideoRankDataExample;
 import com.tzld.piaoquan.growth.common.model.po.CgiReplyBucketData;
 import com.tzld.piaoquan.growth.common.model.po.CgiReplyBucketDataExample;
 import com.tzld.piaoquan.api.service.strategy.ReplyStrategyService;
+import com.tzld.piaoquan.growth.common.utils.MessageUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.BeanUtils;
@@ -318,6 +319,7 @@ public class BuckStrategyV1 implements ReplyStrategyService {
             }
             cgiReplyBucketData.setPagePathUrlId(smallPageUrlDetail.getId());
             cgiReplyBucketData.setMiniPagePath(smallPageUrlDetail.getUrl());
+            cgiReplyBucketData.setRootSourceId(MessageUtil.getRootSourceId(smallPageUrlDetail.getUrl()));
         }
         return smallDataCgiReplyList;
     }

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

@@ -16,6 +16,7 @@ import com.tzld.piaoquan.api.model.po.AlgGhAutoreplyVideoRankDataExample;
 import com.tzld.piaoquan.growth.common.model.po.CgiReplyBucketData;
 import com.tzld.piaoquan.growth.common.model.po.CgiReplyBucketDataExample;
 import com.tzld.piaoquan.api.service.strategy.ReplyStrategyService;
+import com.tzld.piaoquan.growth.common.utils.MessageUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.BeanUtils;
@@ -210,6 +211,7 @@ public class ThirdPartyPushMessageStrategyV1 implements ReplyStrategyService {
             }
             cgiReplyBucketData.setPagePathUrlId(smallPageUrlDetail.getId());
             cgiReplyBucketData.setMiniPagePath(smallPageUrlDetail.getUrl());
+            cgiReplyBucketData.setRootSourceId(MessageUtil.getRootSourceId(smallPageUrlDetail.getUrl()));
         }
         return smallDataCgiReplyList;
     }

+ 2 - 0
api-module/src/main/java/com/tzld/piaoquan/api/service/strategy/impl/WeComPushMessageStrategyV1.java

@@ -13,6 +13,7 @@ import com.tzld.piaoquan.api.model.po.AlgGhAutoreplyVideoRankDataExample;
 import com.tzld.piaoquan.growth.common.model.po.CgiReplyBucketData;
 import com.tzld.piaoquan.growth.common.model.po.CgiReplyBucketDataExample;
 import com.tzld.piaoquan.api.service.strategy.ReplyStrategyService;
+import com.tzld.piaoquan.growth.common.utils.MessageUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.BeanUtils;
@@ -204,6 +205,7 @@ public class WeComPushMessageStrategyV1 implements ReplyStrategyService {
             }
             cgiReplyBucketData.setPagePathUrlId(smallPageUrlDetail.getId());
             cgiReplyBucketData.setMiniPagePath(smallPageUrlDetail.getUrl());
+            cgiReplyBucketData.setRootSourceId(MessageUtil.getRootSourceId(smallPageUrlDetail.getUrl()));
         }
         return smallDataCgiReplyList;
     }

+ 12 - 0
api-module/src/main/resources/mapper/contentplatform/ext/ContentPlatformDataStatMapperExt.xml

@@ -317,6 +317,10 @@
         group by cpa.channel
     </select>
 
+    <delete id="deleteQwDatastat">
+        delete from content_platform_qw_datastat where date_str = #{dt}
+    </delete>
+
     <delete id="deleteQwDatastatTotal">
         delete from content_platform_qw_datastat_total where date_str = #{dt}
     </delete>
@@ -329,10 +333,18 @@
         delete from content_platform_qw_datastat_sub_channel where date_str = #{dt}
     </delete>
 
+    <delete id="deleteGzhDatastat">
+        delete from content_platform_gzh_datastat where date_str = #{dt}
+    </delete>
+
     <delete id="deleteGzhDatastatTotal">
         delete from content_platform_gzh_datastat_total where date_str = #{dt}
     </delete>
 
+    <delete id="deleteFwhDatastat">
+        delete from content_platform_fwh_datastat where date_str = #{dt}
+    </delete>
+
     <delete id="deleteFwhDatastatTotal">
         delete from content_platform_fwh_datastat_total where date_str = #{dt}
     </delete>

+ 19 - 0
api-module/src/main/resources/mapper/contentplatform/ext/ContentPlatformPlanMapperExt.xml

@@ -232,6 +232,7 @@
             #{item}
         </foreach>
         and status = 1
+        and cover is not null
         ) AS t
         WHERE t.rn = 1;
     </select>
@@ -266,6 +267,10 @@
         ORDER BY t1.dt DESC
     </select>
 
+    <delete id="deleteContentPlatformVideo">
+        delete from content_platform_video where dt = #{dt}
+    </delete>
+
     <delete id="deleteContentPlatformVideoAgg">
         delete from content_platform_video_agg where dt = #{dt}
     </delete>
@@ -274,6 +279,10 @@
         delete from content_platform_video_datastat_agg where dt = #{dt}
     </delete>
 
+    <delete id="deleteContentPlatformVideoDatastat">
+        delete from content_platform_video_datastat where dt = #{dt}
+    </delete>
+
     <insert id="batchInsertContentPlatformVideoDatastat">
         insert into content_platform_video_datastat (dt, video_id, `type`, channel, first_level, fission0,
                                                          fission_rate, create_timestamp)
@@ -294,4 +303,14 @@
         </foreach>
     </insert>
 
+    <update id="updateOtherVideoStatus">
+        update content_platform_video
+        set status = 0,
+            update_timestamp = #{now}
+        where dt = #{dt} and video_id not in
+        <foreach collection="videoIdList" item="item" open="(" close=")" separator=",">
+            #{item}
+        </foreach>
+    </update>
+
 </mapper>

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

@@ -50,6 +50,8 @@
             <property name="enableSubPackages" value="true"/>
         </javaClientGenerator>
 
+        <table tableName="cgi_reply_bucket_data" domainObjectName="CgiReplyBucketData" alias=""/>
+<!--        <table tableName="we_com_user" domainObjectName="WeComUser" alias=""/>-->
 <!--        <table tableName="we_com_alert_message" domainObjectName="AlertMessage" alias=""/>-->
 <!--        <table tableName="gh_detail" domainObjectName="GhDetail" alias=""/>-->
 <!--        <table tableName="we_com_guarantees_video" domainObjectName="GuaranteesVideo" alias=""/>-->
@@ -58,7 +60,12 @@
 <!--        <table tableName="we_com_special_pre_send_message" domainObjectName="PreSpecialSendMessage" alias=""/>-->
 <!--        <table tableName="we_com_send_msg_result" domainObjectName="SendMsgResult" alias=""/>-->
 <!--        <table tableName="we_com_corp" domainObjectName="Corp" alias=""/>-->
-        <table tableName="we_com_moment_send_message" domainObjectName="MomentSendMessage" alias=""/>
+<!--        <table tableName="we_com_moment_send_message" domainObjectName="MomentSendMessage" alias=""/>-->
+<!--        <table tableName="we_com_staff_with_user" domainObjectName="StaffWithUser" alias=""/>-->
+<!--        <table tableName="we_com_corp_statistics_total" domainObjectName="CorpStatisticsTotal" alias=""/>-->
+<!--        <table tableName="we_com_staff_statistics_total" domainObjectName="StaffStatisticsTotal" alias=""/>-->
+
+
 
 
     </context>

+ 7 - 1
api-module/src/test/java/com/tzld/piaoquan/api/ContentPlatformTest.java

@@ -18,10 +18,16 @@ public class ContentPlatformTest {
 
     @Test
     public void testSyncContentPlatformQwDatastatReplyTotalJob() {
-        List<String> dtList = DateUtil.getBeforeDays(1);
+        List<String> dtList = DateUtil.getBeforeDays(7);
         for (String dt : dtList) {
             datastatJob.syncContentPlatformGzhDatastatJob(dt);
+            datastatJob.syncContentPlatformGzhVideoDatastatJob(dt);
+            datastatJob.syncContentPlatformGzhDatastatTotalJob(dt);
             datastatJob.syncContentPlatformFwhDatastatJob(dt);
+            datastatJob.syncContentPlatformFwhDatastatTotalJob(dt);
+            datastatJob.syncContentPlatformQwDatastatJob(dt);
+            datastatJob.syncContentPlatformQwDatastatTotalJob(dt);
+            datastatJob.syncContentPlatformQwDatastatReplyTotalJob(dt);
             datastatJob.syncContentPlatformQwDatastatSubChannelJob(dt);
         }
     }

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

@@ -4,4 +4,7 @@ public interface RedisConstant {
 
     String WE_COM_ACCESS_TOKEN = "WE_COM_ACCESS_TOKEN_%s";
 
+    String WE_COM_USER_AB_TYPE = "WE_COM_USER_AB_TYPE_COUNT";
+
+
 }

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

@@ -46,4 +46,6 @@ public interface WeComConstant {
 
     //发送朋友圈
     String POST_WE_COM_ADD_MOMENT_TASK = "https://qyapi.weixin.qq.com/cgi-bin/externalcontact/add_moment_task";
+
+    String POST_WE_COM_USER_BEHAVIOR_DATA = "https://qyapi.weixin.qq.com/cgi-bin/externalcontact/get_user_behavior_data";
 }

+ 9 - 6
common-module/src/main/java/com/tzld/piaoquan/growth/common/dao/mapper/CgiReplyBucketDataMapper.java

@@ -1,15 +1,18 @@
 package com.tzld.piaoquan.growth.common.dao.mapper;
 
-
 import com.tzld.piaoquan.growth.common.model.po.CgiReplyBucketData;
 import com.tzld.piaoquan.growth.common.model.po.CgiReplyBucketDataExample;
+import java.util.List;
+
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
 
 import java.util.Date;
 import java.util.List;
 
 @Mapper
+@Repository
 public interface CgiReplyBucketDataMapper {
     long countByExample(CgiReplyBucketDataExample example);
 
@@ -17,19 +20,19 @@ public interface CgiReplyBucketDataMapper {
 
     int deleteByPrimaryKey(Long id);
 
-    int insert(CgiReplyBucketData row);
+    int insert(CgiReplyBucketData record);
 
-    int insertSelective(CgiReplyBucketData row);
+    int insertSelective(CgiReplyBucketData record);
 
     List<CgiReplyBucketData> selectByExample(CgiReplyBucketDataExample example);
 
     CgiReplyBucketData selectByPrimaryKey(Long id);
 
-    int updateByExampleSelective(@Param("row") CgiReplyBucketData row, @Param("example") CgiReplyBucketDataExample example);
+    int updateByExampleSelective(@Param("record") CgiReplyBucketData record, @Param("example") CgiReplyBucketDataExample example);
 
-    int updateByExample(@Param("row") CgiReplyBucketData row, @Param("example") CgiReplyBucketDataExample example);
+    int updateByExample(@Param("record") CgiReplyBucketData record, @Param("example") CgiReplyBucketDataExample example);
 
-    int updateByPrimaryKeySelective(CgiReplyBucketData row);
+    int updateByPrimaryKeySelective(CgiReplyBucketData record);
 
     int updateByPrimaryKey(CgiReplyBucketData row);
 

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

@@ -0,0 +1,35 @@
+package com.tzld.piaoquan.growth.common.dao.mapper;
+
+import com.tzld.piaoquan.growth.common.model.po.CorpStatisticsTotal;
+import com.tzld.piaoquan.growth.common.model.po.CorpStatisticsTotalExample;
+import java.util.List;
+
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+@Mapper
+@Repository
+public interface CorpStatisticsTotalMapper {
+    long countByExample(CorpStatisticsTotalExample example);
+
+    int deleteByExample(CorpStatisticsTotalExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(CorpStatisticsTotal record);
+
+    int insertSelective(CorpStatisticsTotal record);
+
+    List<CorpStatisticsTotal> selectByExample(CorpStatisticsTotalExample example);
+
+    CorpStatisticsTotal selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") CorpStatisticsTotal record, @Param("example") CorpStatisticsTotalExample example);
+
+    int updateByExample(@Param("record") CorpStatisticsTotal record, @Param("example") CorpStatisticsTotalExample example);
+
+    int updateByPrimaryKeySelective(CorpStatisticsTotal record);
+
+    int updateByPrimaryKey(CorpStatisticsTotal record);
+}

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

@@ -0,0 +1,35 @@
+package com.tzld.piaoquan.growth.common.dao.mapper;
+
+import com.tzld.piaoquan.growth.common.model.po.StaffStatisticsTotal;
+import com.tzld.piaoquan.growth.common.model.po.StaffStatisticsTotalExample;
+import java.util.List;
+
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+@Mapper
+@Repository
+public interface StaffStatisticsTotalMapper {
+    long countByExample(StaffStatisticsTotalExample example);
+
+    int deleteByExample(StaffStatisticsTotalExample example);
+
+    int deleteByPrimaryKey(Long id);
+
+    int insert(StaffStatisticsTotal record);
+
+    int insertSelective(StaffStatisticsTotal record);
+
+    List<StaffStatisticsTotal> selectByExample(StaffStatisticsTotalExample example);
+
+    StaffStatisticsTotal selectByPrimaryKey(Long id);
+
+    int updateByExampleSelective(@Param("record") StaffStatisticsTotal record, @Param("example") StaffStatisticsTotalExample example);
+
+    int updateByExample(@Param("record") StaffStatisticsTotal record, @Param("example") StaffStatisticsTotalExample example);
+
+    int updateByPrimaryKeySelective(StaffStatisticsTotal record);
+
+    int updateByPrimaryKey(StaffStatisticsTotal record);
+}

+ 47 - 9
common-module/src/main/java/com/tzld/piaoquan/growth/common/model/po/CgiReplyBucketData.java

@@ -25,6 +25,8 @@ public class CgiReplyBucketData {
 
     private Long miniVideoId;
 
+    private String rootSourceId;
+
     private Long pagePathUrlId;
 
     private String newsPublishContentId;
@@ -50,7 +52,7 @@ public class CgiReplyBucketData {
     }
 
     public void setStrategy(String strategy) {
-        this.strategy = strategy == null ? null : strategy.trim();
+        this.strategy = strategy;
     }
 
     public Integer getSort() {
@@ -66,7 +68,7 @@ public class CgiReplyBucketData {
     }
 
     public void setStrategyDt(String strategyDt) {
-        this.strategyDt = strategyDt == null ? null : strategyDt.trim();
+        this.strategyDt = strategyDt;
     }
 
     public String getGhId() {
@@ -74,7 +76,7 @@ public class CgiReplyBucketData {
     }
 
     public void setGhId(String ghId) {
-        this.ghId = ghId == null ? null : ghId.trim();
+        this.ghId = ghId;
     }
 
     public Integer getMsgType() {
@@ -90,7 +92,7 @@ public class CgiReplyBucketData {
     }
 
     public void setTitle(String title) {
-        this.title = title == null ? null : title.trim();
+        this.title = title;
     }
 
     public String getCoverUrl() {
@@ -98,7 +100,7 @@ public class CgiReplyBucketData {
     }
 
     public void setCoverUrl(String coverUrl) {
-        this.coverUrl = coverUrl == null ? null : coverUrl.trim();
+        this.coverUrl = coverUrl;
     }
 
     public String getMiniAppId() {
@@ -106,7 +108,7 @@ public class CgiReplyBucketData {
     }
 
     public void setMiniAppId(String miniAppId) {
-        this.miniAppId = miniAppId == null ? null : miniAppId.trim();
+        this.miniAppId = miniAppId;
     }
 
     public String getMiniPagePath() {
@@ -114,7 +116,7 @@ public class CgiReplyBucketData {
     }
 
     public void setMiniPagePath(String miniPagePath) {
-        this.miniPagePath = miniPagePath == null ? null : miniPagePath.trim();
+        this.miniPagePath = miniPagePath;
     }
 
     public Long getMiniVideoId() {
@@ -125,6 +127,14 @@ public class CgiReplyBucketData {
         this.miniVideoId = miniVideoId;
     }
 
+    public String getRootSourceId() {
+        return rootSourceId;
+    }
+
+    public void setRootSourceId(String rootSourceId) {
+        this.rootSourceId = rootSourceId;
+    }
+
     public Long getPagePathUrlId() {
         return pagePathUrlId;
     }
@@ -138,7 +148,7 @@ public class CgiReplyBucketData {
     }
 
     public void setNewsPublishContentId(String newsPublishContentId) {
-        this.newsPublishContentId = newsPublishContentId == null ? null : newsPublishContentId.trim();
+        this.newsPublishContentId = newsPublishContentId;
     }
 
     public String getPlanId() {
@@ -146,7 +156,7 @@ public class CgiReplyBucketData {
     }
 
     public void setPlanId(String planId) {
-        this.planId = planId == null ? null : planId.trim();
+        this.planId = planId;
     }
 
     public Integer getIsDelete() {
@@ -172,4 +182,32 @@ public class CgiReplyBucketData {
     public void setUpdateTime(Date updateTime) {
         this.updateTime = updateTime;
     }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", strategy=").append(strategy);
+        sb.append(", sort=").append(sort);
+        sb.append(", strategyDt=").append(strategyDt);
+        sb.append(", ghId=").append(ghId);
+        sb.append(", msgType=").append(msgType);
+        sb.append(", title=").append(title);
+        sb.append(", coverUrl=").append(coverUrl);
+        sb.append(", miniAppId=").append(miniAppId);
+        sb.append(", miniPagePath=").append(miniPagePath);
+        sb.append(", miniVideoId=").append(miniVideoId);
+        sb.append(", rootSourceId=").append(rootSourceId);
+        sb.append(", pagePathUrlId=").append(pagePathUrlId);
+        sb.append(", newsPublishContentId=").append(newsPublishContentId);
+        sb.append(", planId=").append(planId);
+        sb.append(", isDelete=").append(isDelete);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append("]");
+        return sb.toString();
+    }
 }

+ 84 - 2
common-module/src/main/java/com/tzld/piaoquan/growth/common/model/po/CgiReplyBucketDataExample.java

@@ -1,5 +1,6 @@
 package com.tzld.piaoquan.growth.common.model.po;
 
+import com.tzld.piaoquan.growth.common.utils.page.Page;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
@@ -11,8 +12,10 @@ public class CgiReplyBucketDataExample {
 
     protected List<Criteria> oredCriteria;
 
+    protected Page page;
+
     public CgiReplyBucketDataExample() {
-        oredCriteria = new ArrayList<>();
+        oredCriteria = new ArrayList<Criteria>();
     }
 
     public void setOrderByClause(String orderByClause) {
@@ -64,12 +67,20 @@ public class CgiReplyBucketDataExample {
         distinct = false;
     }
 
+    public void setPage(Page page) {
+        this.page=page;
+    }
+
+    public Page getPage() {
+        return page;
+    }
+
     protected abstract static class GeneratedCriteria {
         protected List<Criterion> criteria;
 
         protected GeneratedCriteria() {
             super();
-            criteria = new ArrayList<>();
+            criteria = new ArrayList<Criterion>();
         }
 
         public boolean isValid() {
@@ -835,6 +846,76 @@ public class CgiReplyBucketDataExample {
             return (Criteria) this;
         }
 
+        public Criteria andRootSourceIdIsNull() {
+            addCriterion("root_source_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRootSourceIdIsNotNull() {
+            addCriterion("root_source_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRootSourceIdEqualTo(String value) {
+            addCriterion("root_source_id =", value, "rootSourceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRootSourceIdNotEqualTo(String value) {
+            addCriterion("root_source_id <>", value, "rootSourceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRootSourceIdGreaterThan(String value) {
+            addCriterion("root_source_id >", value, "rootSourceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRootSourceIdGreaterThanOrEqualTo(String value) {
+            addCriterion("root_source_id >=", value, "rootSourceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRootSourceIdLessThan(String value) {
+            addCriterion("root_source_id <", value, "rootSourceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRootSourceIdLessThanOrEqualTo(String value) {
+            addCriterion("root_source_id <=", value, "rootSourceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRootSourceIdLike(String value) {
+            addCriterion("root_source_id like", value, "rootSourceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRootSourceIdNotLike(String value) {
+            addCriterion("root_source_id not like", value, "rootSourceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRootSourceIdIn(List<String> values) {
+            addCriterion("root_source_id in", values, "rootSourceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRootSourceIdNotIn(List<String> values) {
+            addCriterion("root_source_id not in", values, "rootSourceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRootSourceIdBetween(String value1, String value2) {
+            addCriterion("root_source_id between", value1, value2, "rootSourceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRootSourceIdNotBetween(String value1, String value2) {
+            addCriterion("root_source_id not between", value1, value2, "rootSourceId");
+            return (Criteria) this;
+        }
+
         public Criteria andPagePathUrlIdIsNull() {
             addCriterion("page_path_url_id is null");
             return (Criteria) this;
@@ -1217,6 +1298,7 @@ public class CgiReplyBucketDataExample {
     }
 
     public static class Criteria extends GeneratedCriteria {
+
         protected Criteria() {
             super();
         }

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

@@ -0,0 +1,125 @@
+package com.tzld.piaoquan.growth.common.model.po;
+
+import java.util.Date;
+
+public class CorpStatisticsTotal {
+    private Long id;
+
+    private String date;
+
+    private Long corpId;
+
+    private Integer chatCnt;
+
+    private Integer messageCnt;
+
+    private Integer negativeFeedbackCnt;
+
+    private Integer newApplyCnt;
+
+    private Integer newContactCnt;
+
+    private Date createTime;
+
+    private Date updateTime;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getDate() {
+        return date;
+    }
+
+    public void setDate(String date) {
+        this.date = date;
+    }
+
+    public Long getCorpId() {
+        return corpId;
+    }
+
+    public void setCorpId(Long corpId) {
+        this.corpId = corpId;
+    }
+
+    public Integer getChatCnt() {
+        return chatCnt;
+    }
+
+    public void setChatCnt(Integer chatCnt) {
+        this.chatCnt = chatCnt;
+    }
+
+    public Integer getMessageCnt() {
+        return messageCnt;
+    }
+
+    public void setMessageCnt(Integer messageCnt) {
+        this.messageCnt = messageCnt;
+    }
+
+    public Integer getNegativeFeedbackCnt() {
+        return negativeFeedbackCnt;
+    }
+
+    public void setNegativeFeedbackCnt(Integer negativeFeedbackCnt) {
+        this.negativeFeedbackCnt = negativeFeedbackCnt;
+    }
+
+    public Integer getNewApplyCnt() {
+        return newApplyCnt;
+    }
+
+    public void setNewApplyCnt(Integer newApplyCnt) {
+        this.newApplyCnt = newApplyCnt;
+    }
+
+    public Integer getNewContactCnt() {
+        return newContactCnt;
+    }
+
+    public void setNewContactCnt(Integer newContactCnt) {
+        this.newContactCnt = newContactCnt;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", date=").append(date);
+        sb.append(", corpId=").append(corpId);
+        sb.append(", chatCnt=").append(chatCnt);
+        sb.append(", messageCnt=").append(messageCnt);
+        sb.append(", negativeFeedbackCnt=").append(negativeFeedbackCnt);
+        sb.append(", newApplyCnt=").append(newApplyCnt);
+        sb.append(", newContactCnt=").append(newContactCnt);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append("]");
+        return sb.toString();
+    }
+}

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

@@ -0,0 +1,822 @@
+package com.tzld.piaoquan.growth.common.model.po;
+
+import com.tzld.piaoquan.growth.common.utils.page.Page;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class CorpStatisticsTotalExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    protected Page page;
+
+    public CorpStatisticsTotalExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    public void setPage(Page page) {
+        this.page=page;
+    }
+
+    public Page getPage() {
+        return page;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateIsNull() {
+            addCriterion("`date` is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateIsNotNull() {
+            addCriterion("`date` is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateEqualTo(String value) {
+            addCriterion("`date` =", value, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateNotEqualTo(String value) {
+            addCriterion("`date` <>", value, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateGreaterThan(String value) {
+            addCriterion("`date` >", value, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateGreaterThanOrEqualTo(String value) {
+            addCriterion("`date` >=", value, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateLessThan(String value) {
+            addCriterion("`date` <", value, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateLessThanOrEqualTo(String value) {
+            addCriterion("`date` <=", value, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateLike(String value) {
+            addCriterion("`date` like", value, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateNotLike(String value) {
+            addCriterion("`date` not like", value, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateIn(List<String> values) {
+            addCriterion("`date` in", values, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateNotIn(List<String> values) {
+            addCriterion("`date` not in", values, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateBetween(String value1, String value2) {
+            addCriterion("`date` between", value1, value2, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateNotBetween(String value1, String value2) {
+            addCriterion("`date` not between", value1, value2, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdIsNull() {
+            addCriterion("corp_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdIsNotNull() {
+            addCriterion("corp_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdEqualTo(Long value) {
+            addCriterion("corp_id =", value, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdNotEqualTo(Long value) {
+            addCriterion("corp_id <>", value, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdGreaterThan(Long value) {
+            addCriterion("corp_id >", value, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("corp_id >=", value, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdLessThan(Long value) {
+            addCriterion("corp_id <", value, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdLessThanOrEqualTo(Long value) {
+            addCriterion("corp_id <=", value, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdIn(List<Long> values) {
+            addCriterion("corp_id in", values, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdNotIn(List<Long> values) {
+            addCriterion("corp_id not in", values, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdBetween(Long value1, Long value2) {
+            addCriterion("corp_id between", value1, value2, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdNotBetween(Long value1, Long value2) {
+            addCriterion("corp_id not between", value1, value2, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatCntIsNull() {
+            addCriterion("chat_cnt is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatCntIsNotNull() {
+            addCriterion("chat_cnt is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatCntEqualTo(Integer value) {
+            addCriterion("chat_cnt =", value, "chatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatCntNotEqualTo(Integer value) {
+            addCriterion("chat_cnt <>", value, "chatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatCntGreaterThan(Integer value) {
+            addCriterion("chat_cnt >", value, "chatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatCntGreaterThanOrEqualTo(Integer value) {
+            addCriterion("chat_cnt >=", value, "chatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatCntLessThan(Integer value) {
+            addCriterion("chat_cnt <", value, "chatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatCntLessThanOrEqualTo(Integer value) {
+            addCriterion("chat_cnt <=", value, "chatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatCntIn(List<Integer> values) {
+            addCriterion("chat_cnt in", values, "chatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatCntNotIn(List<Integer> values) {
+            addCriterion("chat_cnt not in", values, "chatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatCntBetween(Integer value1, Integer value2) {
+            addCriterion("chat_cnt between", value1, value2, "chatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatCntNotBetween(Integer value1, Integer value2) {
+            addCriterion("chat_cnt not between", value1, value2, "chatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageCntIsNull() {
+            addCriterion("message_cnt is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageCntIsNotNull() {
+            addCriterion("message_cnt is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageCntEqualTo(Integer value) {
+            addCriterion("message_cnt =", value, "messageCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageCntNotEqualTo(Integer value) {
+            addCriterion("message_cnt <>", value, "messageCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageCntGreaterThan(Integer value) {
+            addCriterion("message_cnt >", value, "messageCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageCntGreaterThanOrEqualTo(Integer value) {
+            addCriterion("message_cnt >=", value, "messageCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageCntLessThan(Integer value) {
+            addCriterion("message_cnt <", value, "messageCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageCntLessThanOrEqualTo(Integer value) {
+            addCriterion("message_cnt <=", value, "messageCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageCntIn(List<Integer> values) {
+            addCriterion("message_cnt in", values, "messageCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageCntNotIn(List<Integer> values) {
+            addCriterion("message_cnt not in", values, "messageCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageCntBetween(Integer value1, Integer value2) {
+            addCriterion("message_cnt between", value1, value2, "messageCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageCntNotBetween(Integer value1, Integer value2) {
+            addCriterion("message_cnt not between", value1, value2, "messageCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNegativeFeedbackCntIsNull() {
+            addCriterion("negative_feedback_cnt is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNegativeFeedbackCntIsNotNull() {
+            addCriterion("negative_feedback_cnt is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNegativeFeedbackCntEqualTo(Integer value) {
+            addCriterion("negative_feedback_cnt =", value, "negativeFeedbackCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNegativeFeedbackCntNotEqualTo(Integer value) {
+            addCriterion("negative_feedback_cnt <>", value, "negativeFeedbackCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNegativeFeedbackCntGreaterThan(Integer value) {
+            addCriterion("negative_feedback_cnt >", value, "negativeFeedbackCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNegativeFeedbackCntGreaterThanOrEqualTo(Integer value) {
+            addCriterion("negative_feedback_cnt >=", value, "negativeFeedbackCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNegativeFeedbackCntLessThan(Integer value) {
+            addCriterion("negative_feedback_cnt <", value, "negativeFeedbackCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNegativeFeedbackCntLessThanOrEqualTo(Integer value) {
+            addCriterion("negative_feedback_cnt <=", value, "negativeFeedbackCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNegativeFeedbackCntIn(List<Integer> values) {
+            addCriterion("negative_feedback_cnt in", values, "negativeFeedbackCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNegativeFeedbackCntNotIn(List<Integer> values) {
+            addCriterion("negative_feedback_cnt not in", values, "negativeFeedbackCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNegativeFeedbackCntBetween(Integer value1, Integer value2) {
+            addCriterion("negative_feedback_cnt between", value1, value2, "negativeFeedbackCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNegativeFeedbackCntNotBetween(Integer value1, Integer value2) {
+            addCriterion("negative_feedback_cnt not between", value1, value2, "negativeFeedbackCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewApplyCntIsNull() {
+            addCriterion("new_apply_cnt is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewApplyCntIsNotNull() {
+            addCriterion("new_apply_cnt is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewApplyCntEqualTo(Integer value) {
+            addCriterion("new_apply_cnt =", value, "newApplyCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewApplyCntNotEqualTo(Integer value) {
+            addCriterion("new_apply_cnt <>", value, "newApplyCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewApplyCntGreaterThan(Integer value) {
+            addCriterion("new_apply_cnt >", value, "newApplyCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewApplyCntGreaterThanOrEqualTo(Integer value) {
+            addCriterion("new_apply_cnt >=", value, "newApplyCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewApplyCntLessThan(Integer value) {
+            addCriterion("new_apply_cnt <", value, "newApplyCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewApplyCntLessThanOrEqualTo(Integer value) {
+            addCriterion("new_apply_cnt <=", value, "newApplyCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewApplyCntIn(List<Integer> values) {
+            addCriterion("new_apply_cnt in", values, "newApplyCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewApplyCntNotIn(List<Integer> values) {
+            addCriterion("new_apply_cnt not in", values, "newApplyCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewApplyCntBetween(Integer value1, Integer value2) {
+            addCriterion("new_apply_cnt between", value1, value2, "newApplyCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewApplyCntNotBetween(Integer value1, Integer value2) {
+            addCriterion("new_apply_cnt not between", value1, value2, "newApplyCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewContactCntIsNull() {
+            addCriterion("new_contact_cnt is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewContactCntIsNotNull() {
+            addCriterion("new_contact_cnt is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewContactCntEqualTo(Integer value) {
+            addCriterion("new_contact_cnt =", value, "newContactCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewContactCntNotEqualTo(Integer value) {
+            addCriterion("new_contact_cnt <>", value, "newContactCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewContactCntGreaterThan(Integer value) {
+            addCriterion("new_contact_cnt >", value, "newContactCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewContactCntGreaterThanOrEqualTo(Integer value) {
+            addCriterion("new_contact_cnt >=", value, "newContactCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewContactCntLessThan(Integer value) {
+            addCriterion("new_contact_cnt <", value, "newContactCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewContactCntLessThanOrEqualTo(Integer value) {
+            addCriterion("new_contact_cnt <=", value, "newContactCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewContactCntIn(List<Integer> values) {
+            addCriterion("new_contact_cnt in", values, "newContactCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewContactCntNotIn(List<Integer> values) {
+            addCriterion("new_contact_cnt not in", values, "newContactCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewContactCntBetween(Integer value1, Integer value2) {
+            addCriterion("new_contact_cnt between", value1, value2, "newContactCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewContactCntNotBetween(Integer value1, Integer value2) {
+            addCriterion("new_contact_cnt not between", value1, value2, "newContactCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNull() {
+            addCriterion("create_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNotNull() {
+            addCriterion("create_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeEqualTo(Date value) {
+            addCriterion("create_time =", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotEqualTo(Date value) {
+            addCriterion("create_time <>", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThan(Date value) {
+            addCriterion("create_time >", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("create_time >=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThan(Date value) {
+            addCriterion("create_time <", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("create_time <=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIn(List<Date> values) {
+            addCriterion("create_time in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotIn(List<Date> values) {
+            addCriterion("create_time not in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeBetween(Date value1, Date value2) {
+            addCriterion("create_time between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("create_time not between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNull() {
+            addCriterion("update_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNotNull() {
+            addCriterion("update_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeEqualTo(Date value) {
+            addCriterion("update_time =", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotEqualTo(Date value) {
+            addCriterion("update_time <>", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThan(Date value) {
+            addCriterion("update_time >", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("update_time >=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThan(Date value) {
+            addCriterion("update_time <", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("update_time <=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIn(List<Date> values) {
+            addCriterion("update_time in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotIn(List<Date> values) {
+            addCriterion("update_time not in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeBetween(Date value1, Date value2) {
+            addCriterion("update_time between", value1, value2, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("update_time not between", value1, value2, "updateTime");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

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

@@ -0,0 +1,147 @@
+package com.tzld.piaoquan.growth.common.model.po;
+
+import java.util.Date;
+
+public class StaffStatisticsTotal {
+    private Long id;
+
+    private String date;
+
+    private Long corpId;
+
+    private Long staffId;
+
+    private Long statTime;
+
+    private Integer chatCnt;
+
+    private Integer messageCnt;
+
+    private Integer negativeFeedbackCnt;
+
+    private Integer newApplyCnt;
+
+    private Integer newContactCnt;
+
+    private Date createTime;
+
+    private Date updateTime;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getDate() {
+        return date;
+    }
+
+    public void setDate(String date) {
+        this.date = date;
+    }
+
+    public Long getCorpId() {
+        return corpId;
+    }
+
+    public void setCorpId(Long corpId) {
+        this.corpId = corpId;
+    }
+
+    public Long getStaffId() {
+        return staffId;
+    }
+
+    public void setStaffId(Long staffId) {
+        this.staffId = staffId;
+    }
+
+    public Long getStatTime() {
+        return statTime;
+    }
+
+    public void setStatTime(Long statTime) {
+        this.statTime = statTime;
+    }
+
+    public Integer getChatCnt() {
+        return chatCnt;
+    }
+
+    public void setChatCnt(Integer chatCnt) {
+        this.chatCnt = chatCnt;
+    }
+
+    public Integer getMessageCnt() {
+        return messageCnt;
+    }
+
+    public void setMessageCnt(Integer messageCnt) {
+        this.messageCnt = messageCnt;
+    }
+
+    public Integer getNegativeFeedbackCnt() {
+        return negativeFeedbackCnt;
+    }
+
+    public void setNegativeFeedbackCnt(Integer negativeFeedbackCnt) {
+        this.negativeFeedbackCnt = negativeFeedbackCnt;
+    }
+
+    public Integer getNewApplyCnt() {
+        return newApplyCnt;
+    }
+
+    public void setNewApplyCnt(Integer newApplyCnt) {
+        this.newApplyCnt = newApplyCnt;
+    }
+
+    public Integer getNewContactCnt() {
+        return newContactCnt;
+    }
+
+    public void setNewContactCnt(Integer newContactCnt) {
+        this.newContactCnt = newContactCnt;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", date=").append(date);
+        sb.append(", corpId=").append(corpId);
+        sb.append(", staffId=").append(staffId);
+        sb.append(", statTime=").append(statTime);
+        sb.append(", chatCnt=").append(chatCnt);
+        sb.append(", messageCnt=").append(messageCnt);
+        sb.append(", negativeFeedbackCnt=").append(negativeFeedbackCnt);
+        sb.append(", newApplyCnt=").append(newApplyCnt);
+        sb.append(", newContactCnt=").append(newContactCnt);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append("]");
+        return sb.toString();
+    }
+}

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

@@ -0,0 +1,942 @@
+package com.tzld.piaoquan.growth.common.model.po;
+
+import com.tzld.piaoquan.growth.common.utils.page.Page;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class StaffStatisticsTotalExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    protected Page page;
+
+    public StaffStatisticsTotalExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    public void setPage(Page page) {
+        this.page=page;
+    }
+
+    public Page getPage() {
+        return page;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Long value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Long value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Long value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Long value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Long value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Long> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Long> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Long value1, Long value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Long value1, Long value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateIsNull() {
+            addCriterion("`date` is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateIsNotNull() {
+            addCriterion("`date` is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateEqualTo(String value) {
+            addCriterion("`date` =", value, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateNotEqualTo(String value) {
+            addCriterion("`date` <>", value, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateGreaterThan(String value) {
+            addCriterion("`date` >", value, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateGreaterThanOrEqualTo(String value) {
+            addCriterion("`date` >=", value, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateLessThan(String value) {
+            addCriterion("`date` <", value, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateLessThanOrEqualTo(String value) {
+            addCriterion("`date` <=", value, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateLike(String value) {
+            addCriterion("`date` like", value, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateNotLike(String value) {
+            addCriterion("`date` not like", value, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateIn(List<String> values) {
+            addCriterion("`date` in", values, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateNotIn(List<String> values) {
+            addCriterion("`date` not in", values, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateBetween(String value1, String value2) {
+            addCriterion("`date` between", value1, value2, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andDateNotBetween(String value1, String value2) {
+            addCriterion("`date` not between", value1, value2, "date");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdIsNull() {
+            addCriterion("corp_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdIsNotNull() {
+            addCriterion("corp_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdEqualTo(Long value) {
+            addCriterion("corp_id =", value, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdNotEqualTo(Long value) {
+            addCriterion("corp_id <>", value, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdGreaterThan(Long value) {
+            addCriterion("corp_id >", value, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("corp_id >=", value, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdLessThan(Long value) {
+            addCriterion("corp_id <", value, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdLessThanOrEqualTo(Long value) {
+            addCriterion("corp_id <=", value, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdIn(List<Long> values) {
+            addCriterion("corp_id in", values, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdNotIn(List<Long> values) {
+            addCriterion("corp_id not in", values, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdBetween(Long value1, Long value2) {
+            addCriterion("corp_id between", value1, value2, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andCorpIdNotBetween(Long value1, Long value2) {
+            addCriterion("corp_id not between", value1, value2, "corpId");
+            return (Criteria) this;
+        }
+
+        public Criteria andStaffIdIsNull() {
+            addCriterion("staff_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStaffIdIsNotNull() {
+            addCriterion("staff_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStaffIdEqualTo(Long value) {
+            addCriterion("staff_id =", value, "staffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andStaffIdNotEqualTo(Long value) {
+            addCriterion("staff_id <>", value, "staffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andStaffIdGreaterThan(Long value) {
+            addCriterion("staff_id >", value, "staffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andStaffIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("staff_id >=", value, "staffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andStaffIdLessThan(Long value) {
+            addCriterion("staff_id <", value, "staffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andStaffIdLessThanOrEqualTo(Long value) {
+            addCriterion("staff_id <=", value, "staffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andStaffIdIn(List<Long> values) {
+            addCriterion("staff_id in", values, "staffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andStaffIdNotIn(List<Long> values) {
+            addCriterion("staff_id not in", values, "staffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andStaffIdBetween(Long value1, Long value2) {
+            addCriterion("staff_id between", value1, value2, "staffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andStaffIdNotBetween(Long value1, Long value2) {
+            addCriterion("staff_id not between", value1, value2, "staffId");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatTimeIsNull() {
+            addCriterion("stat_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatTimeIsNotNull() {
+            addCriterion("stat_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatTimeEqualTo(Long value) {
+            addCriterion("stat_time =", value, "statTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatTimeNotEqualTo(Long value) {
+            addCriterion("stat_time <>", value, "statTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatTimeGreaterThan(Long value) {
+            addCriterion("stat_time >", value, "statTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatTimeGreaterThanOrEqualTo(Long value) {
+            addCriterion("stat_time >=", value, "statTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatTimeLessThan(Long value) {
+            addCriterion("stat_time <", value, "statTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatTimeLessThanOrEqualTo(Long value) {
+            addCriterion("stat_time <=", value, "statTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatTimeIn(List<Long> values) {
+            addCriterion("stat_time in", values, "statTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatTimeNotIn(List<Long> values) {
+            addCriterion("stat_time not in", values, "statTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatTimeBetween(Long value1, Long value2) {
+            addCriterion("stat_time between", value1, value2, "statTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatTimeNotBetween(Long value1, Long value2) {
+            addCriterion("stat_time not between", value1, value2, "statTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatCntIsNull() {
+            addCriterion("chat_cnt is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatCntIsNotNull() {
+            addCriterion("chat_cnt is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatCntEqualTo(Integer value) {
+            addCriterion("chat_cnt =", value, "chatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatCntNotEqualTo(Integer value) {
+            addCriterion("chat_cnt <>", value, "chatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatCntGreaterThan(Integer value) {
+            addCriterion("chat_cnt >", value, "chatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatCntGreaterThanOrEqualTo(Integer value) {
+            addCriterion("chat_cnt >=", value, "chatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatCntLessThan(Integer value) {
+            addCriterion("chat_cnt <", value, "chatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatCntLessThanOrEqualTo(Integer value) {
+            addCriterion("chat_cnt <=", value, "chatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatCntIn(List<Integer> values) {
+            addCriterion("chat_cnt in", values, "chatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatCntNotIn(List<Integer> values) {
+            addCriterion("chat_cnt not in", values, "chatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatCntBetween(Integer value1, Integer value2) {
+            addCriterion("chat_cnt between", value1, value2, "chatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andChatCntNotBetween(Integer value1, Integer value2) {
+            addCriterion("chat_cnt not between", value1, value2, "chatCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageCntIsNull() {
+            addCriterion("message_cnt is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageCntIsNotNull() {
+            addCriterion("message_cnt is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageCntEqualTo(Integer value) {
+            addCriterion("message_cnt =", value, "messageCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageCntNotEqualTo(Integer value) {
+            addCriterion("message_cnt <>", value, "messageCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageCntGreaterThan(Integer value) {
+            addCriterion("message_cnt >", value, "messageCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageCntGreaterThanOrEqualTo(Integer value) {
+            addCriterion("message_cnt >=", value, "messageCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageCntLessThan(Integer value) {
+            addCriterion("message_cnt <", value, "messageCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageCntLessThanOrEqualTo(Integer value) {
+            addCriterion("message_cnt <=", value, "messageCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageCntIn(List<Integer> values) {
+            addCriterion("message_cnt in", values, "messageCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageCntNotIn(List<Integer> values) {
+            addCriterion("message_cnt not in", values, "messageCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageCntBetween(Integer value1, Integer value2) {
+            addCriterion("message_cnt between", value1, value2, "messageCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andMessageCntNotBetween(Integer value1, Integer value2) {
+            addCriterion("message_cnt not between", value1, value2, "messageCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNegativeFeedbackCntIsNull() {
+            addCriterion("negative_feedback_cnt is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNegativeFeedbackCntIsNotNull() {
+            addCriterion("negative_feedback_cnt is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNegativeFeedbackCntEqualTo(Integer value) {
+            addCriterion("negative_feedback_cnt =", value, "negativeFeedbackCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNegativeFeedbackCntNotEqualTo(Integer value) {
+            addCriterion("negative_feedback_cnt <>", value, "negativeFeedbackCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNegativeFeedbackCntGreaterThan(Integer value) {
+            addCriterion("negative_feedback_cnt >", value, "negativeFeedbackCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNegativeFeedbackCntGreaterThanOrEqualTo(Integer value) {
+            addCriterion("negative_feedback_cnt >=", value, "negativeFeedbackCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNegativeFeedbackCntLessThan(Integer value) {
+            addCriterion("negative_feedback_cnt <", value, "negativeFeedbackCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNegativeFeedbackCntLessThanOrEqualTo(Integer value) {
+            addCriterion("negative_feedback_cnt <=", value, "negativeFeedbackCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNegativeFeedbackCntIn(List<Integer> values) {
+            addCriterion("negative_feedback_cnt in", values, "negativeFeedbackCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNegativeFeedbackCntNotIn(List<Integer> values) {
+            addCriterion("negative_feedback_cnt not in", values, "negativeFeedbackCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNegativeFeedbackCntBetween(Integer value1, Integer value2) {
+            addCriterion("negative_feedback_cnt between", value1, value2, "negativeFeedbackCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNegativeFeedbackCntNotBetween(Integer value1, Integer value2) {
+            addCriterion("negative_feedback_cnt not between", value1, value2, "negativeFeedbackCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewApplyCntIsNull() {
+            addCriterion("new_apply_cnt is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewApplyCntIsNotNull() {
+            addCriterion("new_apply_cnt is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewApplyCntEqualTo(Integer value) {
+            addCriterion("new_apply_cnt =", value, "newApplyCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewApplyCntNotEqualTo(Integer value) {
+            addCriterion("new_apply_cnt <>", value, "newApplyCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewApplyCntGreaterThan(Integer value) {
+            addCriterion("new_apply_cnt >", value, "newApplyCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewApplyCntGreaterThanOrEqualTo(Integer value) {
+            addCriterion("new_apply_cnt >=", value, "newApplyCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewApplyCntLessThan(Integer value) {
+            addCriterion("new_apply_cnt <", value, "newApplyCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewApplyCntLessThanOrEqualTo(Integer value) {
+            addCriterion("new_apply_cnt <=", value, "newApplyCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewApplyCntIn(List<Integer> values) {
+            addCriterion("new_apply_cnt in", values, "newApplyCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewApplyCntNotIn(List<Integer> values) {
+            addCriterion("new_apply_cnt not in", values, "newApplyCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewApplyCntBetween(Integer value1, Integer value2) {
+            addCriterion("new_apply_cnt between", value1, value2, "newApplyCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewApplyCntNotBetween(Integer value1, Integer value2) {
+            addCriterion("new_apply_cnt not between", value1, value2, "newApplyCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewContactCntIsNull() {
+            addCriterion("new_contact_cnt is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewContactCntIsNotNull() {
+            addCriterion("new_contact_cnt is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewContactCntEqualTo(Integer value) {
+            addCriterion("new_contact_cnt =", value, "newContactCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewContactCntNotEqualTo(Integer value) {
+            addCriterion("new_contact_cnt <>", value, "newContactCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewContactCntGreaterThan(Integer value) {
+            addCriterion("new_contact_cnt >", value, "newContactCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewContactCntGreaterThanOrEqualTo(Integer value) {
+            addCriterion("new_contact_cnt >=", value, "newContactCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewContactCntLessThan(Integer value) {
+            addCriterion("new_contact_cnt <", value, "newContactCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewContactCntLessThanOrEqualTo(Integer value) {
+            addCriterion("new_contact_cnt <=", value, "newContactCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewContactCntIn(List<Integer> values) {
+            addCriterion("new_contact_cnt in", values, "newContactCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewContactCntNotIn(List<Integer> values) {
+            addCriterion("new_contact_cnt not in", values, "newContactCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewContactCntBetween(Integer value1, Integer value2) {
+            addCriterion("new_contact_cnt between", value1, value2, "newContactCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewContactCntNotBetween(Integer value1, Integer value2) {
+            addCriterion("new_contact_cnt not between", value1, value2, "newContactCnt");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNull() {
+            addCriterion("create_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIsNotNull() {
+            addCriterion("create_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeEqualTo(Date value) {
+            addCriterion("create_time =", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotEqualTo(Date value) {
+            addCriterion("create_time <>", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThan(Date value) {
+            addCriterion("create_time >", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("create_time >=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThan(Date value) {
+            addCriterion("create_time <", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("create_time <=", value, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeIn(List<Date> values) {
+            addCriterion("create_time in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotIn(List<Date> values) {
+            addCriterion("create_time not in", values, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeBetween(Date value1, Date value2) {
+            addCriterion("create_time between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("create_time not between", value1, value2, "createTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNull() {
+            addCriterion("update_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIsNotNull() {
+            addCriterion("update_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeEqualTo(Date value) {
+            addCriterion("update_time =", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotEqualTo(Date value) {
+            addCriterion("update_time <>", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThan(Date value) {
+            addCriterion("update_time >", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("update_time >=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThan(Date value) {
+            addCriterion("update_time <", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
+            addCriterion("update_time <=", value, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeIn(List<Date> values) {
+            addCriterion("update_time in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotIn(List<Date> values) {
+            addCriterion("update_time not in", values, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeBetween(Date value1, Date value2) {
+            addCriterion("update_time between", value1, value2, "updateTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
+            addCriterion("update_time not between", value1, value2, "updateTime");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

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

@@ -13,6 +13,10 @@ public class StaffWithUser {
 
     private Date deleteTime;
 
+    private Integer newIsDelete;
+
+    private Date newDeleteTime;
+
     private Date createTime;
 
     private Date updateTime;
@@ -57,6 +61,22 @@ public class StaffWithUser {
         this.deleteTime = deleteTime;
     }
 
+    public Integer getNewIsDelete() {
+        return newIsDelete;
+    }
+
+    public void setNewIsDelete(Integer newIsDelete) {
+        this.newIsDelete = newIsDelete;
+    }
+
+    public Date getNewDeleteTime() {
+        return newDeleteTime;
+    }
+
+    public void setNewDeleteTime(Date newDeleteTime) {
+        this.newDeleteTime = newDeleteTime;
+    }
+
     public Date getCreateTime() {
         return createTime;
     }
@@ -84,6 +104,8 @@ public class StaffWithUser {
         sb.append(", userId=").append(userId);
         sb.append(", isDelete=").append(isDelete);
         sb.append(", deleteTime=").append(deleteTime);
+        sb.append(", newIsDelete=").append(newIsDelete);
+        sb.append(", newDeleteTime=").append(newDeleteTime);
         sb.append(", createTime=").append(createTime);
         sb.append(", updateTime=").append(updateTime);
         sb.append("]");

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

@@ -417,6 +417,126 @@ public class StaffWithUserExample {
             return (Criteria) this;
         }
 
+        public Criteria andNewIsDeleteIsNull() {
+            addCriterion("new_is_delete is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewIsDeleteIsNotNull() {
+            addCriterion("new_is_delete is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewIsDeleteEqualTo(Integer value) {
+            addCriterion("new_is_delete =", value, "newIsDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewIsDeleteNotEqualTo(Integer value) {
+            addCriterion("new_is_delete <>", value, "newIsDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewIsDeleteGreaterThan(Integer value) {
+            addCriterion("new_is_delete >", value, "newIsDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewIsDeleteGreaterThanOrEqualTo(Integer value) {
+            addCriterion("new_is_delete >=", value, "newIsDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewIsDeleteLessThan(Integer value) {
+            addCriterion("new_is_delete <", value, "newIsDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewIsDeleteLessThanOrEqualTo(Integer value) {
+            addCriterion("new_is_delete <=", value, "newIsDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewIsDeleteIn(List<Integer> values) {
+            addCriterion("new_is_delete in", values, "newIsDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewIsDeleteNotIn(List<Integer> values) {
+            addCriterion("new_is_delete not in", values, "newIsDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewIsDeleteBetween(Integer value1, Integer value2) {
+            addCriterion("new_is_delete between", value1, value2, "newIsDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewIsDeleteNotBetween(Integer value1, Integer value2) {
+            addCriterion("new_is_delete not between", value1, value2, "newIsDelete");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewDeleteTimeIsNull() {
+            addCriterion("new_delete_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewDeleteTimeIsNotNull() {
+            addCriterion("new_delete_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewDeleteTimeEqualTo(Date value) {
+            addCriterion("new_delete_time =", value, "newDeleteTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewDeleteTimeNotEqualTo(Date value) {
+            addCriterion("new_delete_time <>", value, "newDeleteTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewDeleteTimeGreaterThan(Date value) {
+            addCriterion("new_delete_time >", value, "newDeleteTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewDeleteTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("new_delete_time >=", value, "newDeleteTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewDeleteTimeLessThan(Date value) {
+            addCriterion("new_delete_time <", value, "newDeleteTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewDeleteTimeLessThanOrEqualTo(Date value) {
+            addCriterion("new_delete_time <=", value, "newDeleteTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewDeleteTimeIn(List<Date> values) {
+            addCriterion("new_delete_time in", values, "newDeleteTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewDeleteTimeNotIn(List<Date> values) {
+            addCriterion("new_delete_time not in", values, "newDeleteTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewDeleteTimeBetween(Date value1, Date value2) {
+            addCriterion("new_delete_time between", value1, value2, "newDeleteTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andNewDeleteTimeNotBetween(Date value1, Date value2) {
+            addCriterion("new_delete_time not between", value1, value2, "newDeleteTime");
+            return (Criteria) this;
+        }
+
         public Criteria andCreateTimeIsNull() {
             addCriterion("create_time is null");
             return (Criteria) this;

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

@@ -31,6 +31,8 @@ public class WeComUser {
 
     private Long deletedAt;
 
+    private String abtype;
+
     private Date createTime;
 
     private Date updateTime;
@@ -147,6 +149,14 @@ public class WeComUser {
         this.deletedAt = deletedAt;
     }
 
+    public String getAbtype() {
+        return abtype;
+    }
+
+    public void setAbtype(String abtype) {
+        this.abtype = abtype;
+    }
+
     public Date getCreateTime() {
         return createTime;
     }
@@ -183,6 +193,7 @@ public class WeComUser {
         sb.append(", createdAt=").append(createdAt);
         sb.append(", updatedAt=").append(updatedAt);
         sb.append(", deletedAt=").append(deletedAt);
+        sb.append(", abtype=").append(abtype);
         sb.append(", createTime=").append(createTime);
         sb.append(", updateTime=").append(updateTime);
         sb.append("]");

+ 70 - 1
common-module/src/main/java/com/tzld/piaoquan/growth/common/model/po/WeComUserExample.java

@@ -1,7 +1,6 @@
 package com.tzld.piaoquan.growth.common.model.po;
 
 import com.tzld.piaoquan.growth.common.utils.page.Page;
-
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
@@ -1007,6 +1006,76 @@ public class WeComUserExample {
             return (Criteria) this;
         }
 
+        public Criteria andAbtypeIsNull() {
+            addCriterion("abtype is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAbtypeIsNotNull() {
+            addCriterion("abtype is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andAbtypeEqualTo(String value) {
+            addCriterion("abtype =", value, "abtype");
+            return (Criteria) this;
+        }
+
+        public Criteria andAbtypeNotEqualTo(String value) {
+            addCriterion("abtype <>", value, "abtype");
+            return (Criteria) this;
+        }
+
+        public Criteria andAbtypeGreaterThan(String value) {
+            addCriterion("abtype >", value, "abtype");
+            return (Criteria) this;
+        }
+
+        public Criteria andAbtypeGreaterThanOrEqualTo(String value) {
+            addCriterion("abtype >=", value, "abtype");
+            return (Criteria) this;
+        }
+
+        public Criteria andAbtypeLessThan(String value) {
+            addCriterion("abtype <", value, "abtype");
+            return (Criteria) this;
+        }
+
+        public Criteria andAbtypeLessThanOrEqualTo(String value) {
+            addCriterion("abtype <=", value, "abtype");
+            return (Criteria) this;
+        }
+
+        public Criteria andAbtypeLike(String value) {
+            addCriterion("abtype like", value, "abtype");
+            return (Criteria) this;
+        }
+
+        public Criteria andAbtypeNotLike(String value) {
+            addCriterion("abtype not like", value, "abtype");
+            return (Criteria) this;
+        }
+
+        public Criteria andAbtypeIn(List<String> values) {
+            addCriterion("abtype in", values, "abtype");
+            return (Criteria) this;
+        }
+
+        public Criteria andAbtypeNotIn(List<String> values) {
+            addCriterion("abtype not in", values, "abtype");
+            return (Criteria) this;
+        }
+
+        public Criteria andAbtypeBetween(String value1, String value2) {
+            addCriterion("abtype between", value1, value2, "abtype");
+            return (Criteria) this;
+        }
+
+        public Criteria andAbtypeNotBetween(String value1, String value2) {
+            addCriterion("abtype not between", value1, value2, "abtype");
+            return (Criteria) this;
+        }
+
         public Criteria andCreateTimeIsNull() {
             addCriterion("create_time is null");
             return (Criteria) this;

+ 5 - 1
common-module/src/main/java/com/tzld/piaoquan/growth/common/service/Impl/MessageAttachmentServiceImpl.java

@@ -337,7 +337,11 @@ public class MessageAttachmentServiceImpl implements MessageAttachmentService {
     }
 
     @Override
-    public String getPicMediaId(String cover, Long corpId) {
+    public String getPicMediaId(String cover, Long corpId, Long miniprogramVideoId) {
+        if (StringUtils.isEmpty(cover)) {
+            Map<Long, VideoDetail> videoDetail = getVideoDetail(Collections.singleton(miniprogramVideoId));
+            cover = videoDetail.get(miniprogramVideoId).getCover();
+        }
         String key = corpId + "_" + cover;
         String mediaId = (String) redisTemplate.opsForValue().get(key);
         if (StringUtils.isNotEmpty(mediaId)) {

+ 41 - 2
common-module/src/main/java/com/tzld/piaoquan/growth/common/service/Impl/WeComUserServiceImpl.java

@@ -25,6 +25,7 @@ import org.checkerframework.checker.units.qual.A;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
 
@@ -32,6 +33,7 @@ import java.io.IOException;
 import java.util.*;
 import java.util.stream.Collectors;
 
+import static com.tzld.piaoquan.growth.common.common.constant.RedisConstant.WE_COM_USER_AB_TYPE;
 import static com.tzld.piaoquan.growth.common.common.constant.WeComConstant.GET_WE_COM_EXTERNAL_CONTACT_GET;
 import static com.tzld.piaoquan.growth.common.common.constant.WeComConstant.POST_WE_COM_ADD_USER_TAG;
 
@@ -65,11 +67,12 @@ public class WeComUserServiceImpl implements WeComUserService {
     @Autowired
     private TagMapper tagMapper;
 
+    @Autowired
+    private RedisTemplate<String, Object> redisTemplate;
+
     @Value("${needFilterTagIdConfig:[]}")
     private String needFilterTagIdConfig;
 
-    @Autowired
-    private WeComSendService weComSendService;
 
 
     @Override
@@ -122,6 +125,10 @@ public class WeComUserServiceImpl implements WeComUserService {
                 weComUser.setType(type);
                 weComUser.setGender(gender);
                 weComUser.setCorpId(corpId);
+                Long increment = redisTemplate.opsForValue().increment(WE_COM_USER_AB_TYPE);
+                if(increment != null){
+                    weComUser.setAbtype("ab" + increment % 10);
+                }
                 weComUserMapper.insertSelective(weComUser);
                 Long userId = weComUser.getId();
                 if (userId == null) {
@@ -159,7 +166,14 @@ public class WeComUserServiceImpl implements WeComUserService {
                     StaffWithUser staffWithUser = staffWithUserList.get(0);
                     if (staffWithUser.getIsDelete() == 1) {
                         staffWithUser.setIsDelete(0);
+                        staffWithUser.setNewIsDelete(0);
                         staffWithUserMapper.updateByPrimaryKeySelective(staffWithUser);
+                        Long userId = staffWithUser.getUserId();
+                        WeComUser weComUser1 = weComUserMapper.selectByPrimaryKey(userId);
+                        if(weComUser1.getIsDelete() == 1){
+                            weComUser1.setIsDelete(0);
+                            weComUserMapper.updateByPrimaryKeySelective(weComUser1);
+                        }
                     }
                 }
             }
@@ -192,6 +206,17 @@ public class WeComUserServiceImpl implements WeComUserService {
         staffWithUser.setDeleteTime(new Date());
         staffWithUser.setIsDelete(1);
         staffWithUserMapper.updateByPrimaryKeySelective(staffWithUser);
+        StaffWithUserExample staffWithUserExample = new StaffWithUserExample();
+        staffWithUserExample.createCriteria().andUserIdEqualTo(weComUser.getId()).andIsDeleteEqualTo(0);
+        long l = staffWithUserMapper.countByExample(staffWithUserExample);
+        if (l == 0) {
+            Long userId = staffWithUser.getUserId();
+            WeComUser weComUser1 = weComUserMapper.selectByPrimaryKey(userId);
+            if(weComUser1.getIsDelete() == 0){
+                weComUser1.setIsDelete(1);
+                weComUserMapper.updateByPrimaryKeySelective(weComUser1);
+            }
+        }
     }
 
     @Override
@@ -208,9 +233,23 @@ public class WeComUserServiceImpl implements WeComUserService {
         StaffWithUser staffWithUser = staffWithUserList.get(0);
         if (deleteTime != null) {
             staffWithUser.setDeleteTime(new Date(deleteTime));
+            staffWithUser.setNewDeleteTime(new Date(deleteTime));
+        }else {
+            staffWithUser.setNewDeleteTime(new Date());
         }
         staffWithUser.setIsDelete(1);
+        staffWithUser.setNewIsDelete(1);
         staffWithUserMapper.updateByPrimaryKeySelective(staffWithUser);
+        StaffWithUserExample staffWithUserExample = new StaffWithUserExample();
+        staffWithUserExample.createCriteria().andUserIdEqualTo(userId).andIsDeleteEqualTo(0);
+        long l = staffWithUserMapper.countByExample(staffWithUserExample);
+        if (l == 0) {
+            WeComUser weComUser1 = weComUserMapper.selectByPrimaryKey(userId);
+            if(weComUser1.getIsDelete() == 0){
+                weComUser1.setIsDelete(1);
+                weComUserMapper.updateByPrimaryKeySelective(weComUser1);
+            }
+        }
     }
 
 

+ 1 - 1
common-module/src/main/java/com/tzld/piaoquan/growth/common/service/MessageAttachmentService.java

@@ -23,7 +23,7 @@ public interface MessageAttachmentService {
 
     Map<Long, VideoDetail> getVideoDetail(Set<Long> videoIdList);
 
-    String getPicMediaId(String cover, Long corpId);
+    String getPicMediaId(String cover, Long corpId, Long miniprogramVideoId);
 
     String getPage(Staff staff, Long videoId);
 

+ 6 - 0
common-module/src/main/java/com/tzld/piaoquan/growth/common/utils/MessageUtil.java

@@ -18,6 +18,12 @@ public class MessageUtil {
     }
 
     public static String getRootSourceId(String page) {
+        if(StringUtils.isEmpty(page)){
+            return null;
+        }
+        if(!page.contains("rootSourceId")){
+            return null;
+        }
         String translate = URLUtil.translate(page);
         if (translate.contains("rootSourceId=")) {
             String rootSourceId = translate.split("rootSourceId=")[1].split("&")[0];

+ 95 - 72
common-module/src/main/resources/mapper/CgiReplyBucketDataMapper.xml

@@ -13,6 +13,7 @@
     <result column="mini_app_id" jdbcType="VARCHAR" property="miniAppId" />
     <result column="mini_page_path" jdbcType="VARCHAR" property="miniPagePath" />
     <result column="mini_video_id" jdbcType="BIGINT" property="miniVideoId" />
+    <result column="root_source_id" jdbcType="VARCHAR" property="rootSourceId" />
     <result column="page_path_url_id" jdbcType="BIGINT" property="pagePathUrlId" />
     <result column="news_publish_content_id" jdbcType="VARCHAR" property="newsPublishContentId" />
     <result column="plan_id" jdbcType="VARCHAR" property="planId" />
@@ -79,9 +80,9 @@
     </where>
   </sql>
   <sql id="Base_Column_List">
-    id, strategy, sort, strategy_dt, gh_id, msg_type, title, cover_url, mini_app_id,
-    mini_page_path, mini_video_id, page_path_url_id, news_publish_content_id, plan_id,
-    is_delete, create_time, update_time
+    id, strategy, sort, strategy_dt, gh_id, msg_type, title, cover_url, mini_app_id, 
+    mini_page_path, mini_video_id, root_source_id, page_path_url_id, news_publish_content_id, 
+    plan_id, is_delete, create_time, update_time
   </sql>
   <select id="selectByExample" parameterType="com.tzld.piaoquan.growth.common.model.po.CgiReplyBucketDataExample" resultMap="BaseResultMap">
     select
@@ -96,9 +97,12 @@
     <if test="orderByClause != null">
       order by ${orderByClause}
     </if>
+    <if test="page != null">
+      limit #{page.offset} , #{page.pageSize}
+    </if>
   </select>
   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
-    select
+    select 
     <include refid="Base_Column_List" />
     from cgi_reply_bucket_data
     where id = #{id,jdbcType=BIGINT}
@@ -114,21 +118,20 @@
     </if>
   </delete>
   <insert id="insert" parameterType="com.tzld.piaoquan.growth.common.model.po.CgiReplyBucketData">
-    <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
-      SELECT LAST_INSERT_ID()
-    </selectKey>
-    insert into cgi_reply_bucket_data (strategy, sort, strategy_dt,
-      gh_id, msg_type, title,
-      cover_url, mini_app_id, mini_page_path,
-      mini_video_id, page_path_url_id, news_publish_content_id,
-      plan_id, is_delete, create_time,
-      update_time)
-    values (#{strategy,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, #{strategyDt,jdbcType=VARCHAR},
-      #{ghId,jdbcType=VARCHAR}, #{msgType,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR},
-      #{coverUrl,jdbcType=VARCHAR}, #{miniAppId,jdbcType=VARCHAR}, #{miniPagePath,jdbcType=VARCHAR},
-      #{miniVideoId,jdbcType=BIGINT}, #{pagePathUrlId,jdbcType=BIGINT}, #{newsPublishContentId,jdbcType=VARCHAR},
-      #{planId,jdbcType=VARCHAR}, #{isDelete,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
-      #{updateTime,jdbcType=TIMESTAMP})
+    insert into cgi_reply_bucket_data (id, strategy, sort, 
+      strategy_dt, gh_id, msg_type, 
+      title, cover_url, mini_app_id, 
+      mini_page_path, mini_video_id, root_source_id, 
+      page_path_url_id, news_publish_content_id, plan_id, 
+      is_delete, create_time, update_time
+      )
+    values (#{id,jdbcType=BIGINT}, #{strategy,jdbcType=VARCHAR}, #{sort,jdbcType=INTEGER}, 
+      #{strategyDt,jdbcType=VARCHAR}, #{ghId,jdbcType=VARCHAR}, #{msgType,jdbcType=INTEGER}, 
+      #{title,jdbcType=VARCHAR}, #{coverUrl,jdbcType=VARCHAR}, #{miniAppId,jdbcType=VARCHAR}, 
+      #{miniPagePath,jdbcType=VARCHAR}, #{miniVideoId,jdbcType=BIGINT}, #{rootSourceId,jdbcType=VARCHAR}, 
+      #{pagePathUrlId,jdbcType=BIGINT}, #{newsPublishContentId,jdbcType=VARCHAR}, #{planId,jdbcType=VARCHAR}, 
+      #{isDelete,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
+      )
   </insert>
   <insert id="insertSelective" parameterType="com.tzld.piaoquan.growth.common.model.po.CgiReplyBucketData">
     <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
@@ -136,6 +139,9 @@
     </selectKey>
     insert into cgi_reply_bucket_data
     <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
       <if test="strategy != null">
         strategy,
       </if>
@@ -166,6 +172,9 @@
       <if test="miniVideoId != null">
         mini_video_id,
       </if>
+      <if test="rootSourceId != null">
+        root_source_id,
+      </if>
       <if test="pagePathUrlId != null">
         page_path_url_id,
       </if>
@@ -186,6 +195,9 @@
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=BIGINT},
+      </if>
       <if test="strategy != null">
         #{strategy,jdbcType=VARCHAR},
       </if>
@@ -216,6 +228,9 @@
       <if test="miniVideoId != null">
         #{miniVideoId,jdbcType=BIGINT},
       </if>
+      <if test="rootSourceId != null">
+        #{rootSourceId,jdbcType=VARCHAR},
+      </if>
       <if test="pagePathUrlId != null">
         #{pagePathUrlId,jdbcType=BIGINT},
       </if>
@@ -245,82 +260,86 @@
   <update id="updateByExampleSelective" parameterType="map">
     update cgi_reply_bucket_data
     <set>
-      <if test="row.id != null">
-        id = #{row.id,jdbcType=BIGINT},
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.strategy != null">
+        strategy = #{record.strategy,jdbcType=VARCHAR},
       </if>
-      <if test="row.strategy != null">
-        strategy = #{row.strategy,jdbcType=VARCHAR},
+      <if test="record.sort != null">
+        sort = #{record.sort,jdbcType=INTEGER},
       </if>
-      <if test="row.sort != null">
-        sort = #{row.sort,jdbcType=INTEGER},
+      <if test="record.strategyDt != null">
+        strategy_dt = #{record.strategyDt,jdbcType=VARCHAR},
       </if>
-      <if test="row.strategyDt != null">
-        strategy_dt = #{row.strategyDt,jdbcType=VARCHAR},
+      <if test="record.ghId != null">
+        gh_id = #{record.ghId,jdbcType=VARCHAR},
       </if>
-      <if test="row.ghId != null">
-        gh_id = #{row.ghId,jdbcType=VARCHAR},
+      <if test="record.msgType != null">
+        msg_type = #{record.msgType,jdbcType=INTEGER},
       </if>
-      <if test="row.msgType != null">
-        msg_type = #{row.msgType,jdbcType=INTEGER},
+      <if test="record.title != null">
+        title = #{record.title,jdbcType=VARCHAR},
       </if>
-      <if test="row.title != null">
-        title = #{row.title,jdbcType=VARCHAR},
+      <if test="record.coverUrl != null">
+        cover_url = #{record.coverUrl,jdbcType=VARCHAR},
       </if>
-      <if test="row.coverUrl != null">
-        cover_url = #{row.coverUrl,jdbcType=VARCHAR},
+      <if test="record.miniAppId != null">
+        mini_app_id = #{record.miniAppId,jdbcType=VARCHAR},
       </if>
-      <if test="row.miniAppId != null">
-        mini_app_id = #{row.miniAppId,jdbcType=VARCHAR},
+      <if test="record.miniPagePath != null">
+        mini_page_path = #{record.miniPagePath,jdbcType=VARCHAR},
       </if>
-      <if test="row.miniPagePath != null">
-        mini_page_path = #{row.miniPagePath,jdbcType=VARCHAR},
+      <if test="record.miniVideoId != null">
+        mini_video_id = #{record.miniVideoId,jdbcType=BIGINT},
       </if>
-      <if test="row.miniVideoId != null">
-        mini_video_id = #{row.miniVideoId,jdbcType=BIGINT},
+      <if test="record.rootSourceId != null">
+        root_source_id = #{record.rootSourceId,jdbcType=VARCHAR},
       </if>
-      <if test="row.pagePathUrlId != null">
-        page_path_url_id = #{row.pagePathUrlId,jdbcType=BIGINT},
+      <if test="record.pagePathUrlId != null">
+        page_path_url_id = #{record.pagePathUrlId,jdbcType=BIGINT},
       </if>
-      <if test="row.newsPublishContentId != null">
-        news_publish_content_id = #{row.newsPublishContentId,jdbcType=VARCHAR},
+      <if test="record.newsPublishContentId != null">
+        news_publish_content_id = #{record.newsPublishContentId,jdbcType=VARCHAR},
       </if>
-      <if test="row.planId != null">
-        plan_id = #{row.planId,jdbcType=VARCHAR},
+      <if test="record.planId != null">
+        plan_id = #{record.planId,jdbcType=VARCHAR},
       </if>
-      <if test="row.isDelete != null">
-        is_delete = #{row.isDelete,jdbcType=INTEGER},
+      <if test="record.isDelete != null">
+        is_delete = #{record.isDelete,jdbcType=INTEGER},
       </if>
-      <if test="row.createTime != null">
-        create_time = #{row.createTime,jdbcType=TIMESTAMP},
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
       </if>
-      <if test="row.updateTime != null">
-        update_time = #{row.updateTime,jdbcType=TIMESTAMP},
+      <if test="record.updateTime != null">
+        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
       </if>
     </set>
-    <if test="example != null">
+    <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
   </update>
   <update id="updateByExample" parameterType="map">
     update cgi_reply_bucket_data
-    set id = #{row.id,jdbcType=BIGINT},
-      strategy = #{row.strategy,jdbcType=VARCHAR},
-      sort = #{row.sort,jdbcType=INTEGER},
-      strategy_dt = #{row.strategyDt,jdbcType=VARCHAR},
-      gh_id = #{row.ghId,jdbcType=VARCHAR},
-      msg_type = #{row.msgType,jdbcType=INTEGER},
-      title = #{row.title,jdbcType=VARCHAR},
-      cover_url = #{row.coverUrl,jdbcType=VARCHAR},
-      mini_app_id = #{row.miniAppId,jdbcType=VARCHAR},
-      mini_page_path = #{row.miniPagePath,jdbcType=VARCHAR},
-      mini_video_id = #{row.miniVideoId,jdbcType=BIGINT},
-      page_path_url_id = #{row.pagePathUrlId,jdbcType=BIGINT},
-      news_publish_content_id = #{row.newsPublishContentId,jdbcType=VARCHAR},
-      plan_id = #{row.planId,jdbcType=VARCHAR},
-      is_delete = #{row.isDelete,jdbcType=INTEGER},
-      create_time = #{row.createTime,jdbcType=TIMESTAMP},
-      update_time = #{row.updateTime,jdbcType=TIMESTAMP}
-    <if test="example != null">
+    set id = #{record.id,jdbcType=BIGINT},
+      strategy = #{record.strategy,jdbcType=VARCHAR},
+      sort = #{record.sort,jdbcType=INTEGER},
+      strategy_dt = #{record.strategyDt,jdbcType=VARCHAR},
+      gh_id = #{record.ghId,jdbcType=VARCHAR},
+      msg_type = #{record.msgType,jdbcType=INTEGER},
+      title = #{record.title,jdbcType=VARCHAR},
+      cover_url = #{record.coverUrl,jdbcType=VARCHAR},
+      mini_app_id = #{record.miniAppId,jdbcType=VARCHAR},
+      mini_page_path = #{record.miniPagePath,jdbcType=VARCHAR},
+      mini_video_id = #{record.miniVideoId,jdbcType=BIGINT},
+      root_source_id = #{record.rootSourceId,jdbcType=VARCHAR},
+      page_path_url_id = #{record.pagePathUrlId,jdbcType=BIGINT},
+      news_publish_content_id = #{record.newsPublishContentId,jdbcType=VARCHAR},
+      plan_id = #{record.planId,jdbcType=VARCHAR},
+      is_delete = #{record.isDelete,jdbcType=INTEGER},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      update_time = #{record.updateTime,jdbcType=TIMESTAMP}
+    <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
   </update>
@@ -357,6 +376,9 @@
       <if test="miniVideoId != null">
         mini_video_id = #{miniVideoId,jdbcType=BIGINT},
       </if>
+      <if test="rootSourceId != null">
+        root_source_id = #{rootSourceId,jdbcType=VARCHAR},
+      </if>
       <if test="pagePathUrlId != null">
         page_path_url_id = #{pagePathUrlId,jdbcType=BIGINT},
       </if>
@@ -390,6 +412,7 @@
       mini_app_id = #{miniAppId,jdbcType=VARCHAR},
       mini_page_path = #{miniPagePath,jdbcType=VARCHAR},
       mini_video_id = #{miniVideoId,jdbcType=BIGINT},
+      root_source_id = #{rootSourceId,jdbcType=VARCHAR},
       page_path_url_id = #{pagePathUrlId,jdbcType=BIGINT},
       news_publish_content_id = #{newsPublishContentId,jdbcType=VARCHAR},
       plan_id = #{planId,jdbcType=VARCHAR},

+ 294 - 0
common-module/src/main/resources/mapper/CorpStatisticsTotalMapper.xml

@@ -0,0 +1,294 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.tzld.piaoquan.growth.common.dao.mapper.CorpStatisticsTotalMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.growth.common.model.po.CorpStatisticsTotal">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="date" jdbcType="VARCHAR" property="date" />
+    <result column="corp_id" jdbcType="BIGINT" property="corpId" />
+    <result column="chat_cnt" jdbcType="INTEGER" property="chatCnt" />
+    <result column="message_cnt" jdbcType="INTEGER" property="messageCnt" />
+    <result column="negative_feedback_cnt" jdbcType="INTEGER" property="negativeFeedbackCnt" />
+    <result column="new_apply_cnt" jdbcType="INTEGER" property="newApplyCnt" />
+    <result column="new_contact_cnt" jdbcType="INTEGER" property="newContactCnt" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, `date`, corp_id, chat_cnt, message_cnt, negative_feedback_cnt, new_apply_cnt, 
+    new_contact_cnt, create_time, update_time
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.growth.common.model.po.CorpStatisticsTotalExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from we_com_corp_statistics_total
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    <if test="page != null">
+      limit #{page.offset} , #{page.pageSize}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from we_com_corp_statistics_total
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from we_com_corp_statistics_total
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.growth.common.model.po.CorpStatisticsTotalExample">
+    delete from we_com_corp_statistics_total
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.growth.common.model.po.CorpStatisticsTotal">
+    insert into we_com_corp_statistics_total (id, `date`, corp_id, 
+      chat_cnt, message_cnt, negative_feedback_cnt, 
+      new_apply_cnt, new_contact_cnt, create_time, 
+      update_time)
+    values (#{id,jdbcType=BIGINT}, #{date,jdbcType=VARCHAR}, #{corpId,jdbcType=BIGINT}, 
+      #{chatCnt,jdbcType=INTEGER}, #{messageCnt,jdbcType=INTEGER}, #{negativeFeedbackCnt,jdbcType=INTEGER}, 
+      #{newApplyCnt,jdbcType=INTEGER}, #{newContactCnt,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{updateTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.growth.common.model.po.CorpStatisticsTotal">
+    insert into we_com_corp_statistics_total
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="date != null">
+        `date`,
+      </if>
+      <if test="corpId != null">
+        corp_id,
+      </if>
+      <if test="chatCnt != null">
+        chat_cnt,
+      </if>
+      <if test="messageCnt != null">
+        message_cnt,
+      </if>
+      <if test="negativeFeedbackCnt != null">
+        negative_feedback_cnt,
+      </if>
+      <if test="newApplyCnt != null">
+        new_apply_cnt,
+      </if>
+      <if test="newContactCnt != null">
+        new_contact_cnt,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="updateTime != null">
+        update_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=BIGINT},
+      </if>
+      <if test="date != null">
+        #{date,jdbcType=VARCHAR},
+      </if>
+      <if test="corpId != null">
+        #{corpId,jdbcType=BIGINT},
+      </if>
+      <if test="chatCnt != null">
+        #{chatCnt,jdbcType=INTEGER},
+      </if>
+      <if test="messageCnt != null">
+        #{messageCnt,jdbcType=INTEGER},
+      </if>
+      <if test="negativeFeedbackCnt != null">
+        #{negativeFeedbackCnt,jdbcType=INTEGER},
+      </if>
+      <if test="newApplyCnt != null">
+        #{newApplyCnt,jdbcType=INTEGER},
+      </if>
+      <if test="newContactCnt != null">
+        #{newContactCnt,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.tzld.piaoquan.growth.common.model.po.CorpStatisticsTotalExample" resultType="java.lang.Long">
+    select count(*) from we_com_corp_statistics_total
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update we_com_corp_statistics_total
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.date != null">
+        `date` = #{record.date,jdbcType=VARCHAR},
+      </if>
+      <if test="record.corpId != null">
+        corp_id = #{record.corpId,jdbcType=BIGINT},
+      </if>
+      <if test="record.chatCnt != null">
+        chat_cnt = #{record.chatCnt,jdbcType=INTEGER},
+      </if>
+      <if test="record.messageCnt != null">
+        message_cnt = #{record.messageCnt,jdbcType=INTEGER},
+      </if>
+      <if test="record.negativeFeedbackCnt != null">
+        negative_feedback_cnt = #{record.negativeFeedbackCnt,jdbcType=INTEGER},
+      </if>
+      <if test="record.newApplyCnt != null">
+        new_apply_cnt = #{record.newApplyCnt,jdbcType=INTEGER},
+      </if>
+      <if test="record.newContactCnt != null">
+        new_contact_cnt = #{record.newContactCnt,jdbcType=INTEGER},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.updateTime != null">
+        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update we_com_corp_statistics_total
+    set id = #{record.id,jdbcType=BIGINT},
+      `date` = #{record.date,jdbcType=VARCHAR},
+      corp_id = #{record.corpId,jdbcType=BIGINT},
+      chat_cnt = #{record.chatCnt,jdbcType=INTEGER},
+      message_cnt = #{record.messageCnt,jdbcType=INTEGER},
+      negative_feedback_cnt = #{record.negativeFeedbackCnt,jdbcType=INTEGER},
+      new_apply_cnt = #{record.newApplyCnt,jdbcType=INTEGER},
+      new_contact_cnt = #{record.newContactCnt,jdbcType=INTEGER},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      update_time = #{record.updateTime,jdbcType=TIMESTAMP}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.growth.common.model.po.CorpStatisticsTotal">
+    update we_com_corp_statistics_total
+    <set>
+      <if test="date != null">
+        `date` = #{date,jdbcType=VARCHAR},
+      </if>
+      <if test="corpId != null">
+        corp_id = #{corpId,jdbcType=BIGINT},
+      </if>
+      <if test="chatCnt != null">
+        chat_cnt = #{chatCnt,jdbcType=INTEGER},
+      </if>
+      <if test="messageCnt != null">
+        message_cnt = #{messageCnt,jdbcType=INTEGER},
+      </if>
+      <if test="negativeFeedbackCnt != null">
+        negative_feedback_cnt = #{negativeFeedbackCnt,jdbcType=INTEGER},
+      </if>
+      <if test="newApplyCnt != null">
+        new_apply_cnt = #{newApplyCnt,jdbcType=INTEGER},
+      </if>
+      <if test="newContactCnt != null">
+        new_contact_cnt = #{newContactCnt,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.growth.common.model.po.CorpStatisticsTotal">
+    update we_com_corp_statistics_total
+    set `date` = #{date,jdbcType=VARCHAR},
+      corp_id = #{corpId,jdbcType=BIGINT},
+      chat_cnt = #{chatCnt,jdbcType=INTEGER},
+      message_cnt = #{messageCnt,jdbcType=INTEGER},
+      negative_feedback_cnt = #{negativeFeedbackCnt,jdbcType=INTEGER},
+      new_apply_cnt = #{newApplyCnt,jdbcType=INTEGER},
+      new_contact_cnt = #{newContactCnt,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_time = #{updateTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 326 - 0
common-module/src/main/resources/mapper/StaffStatisticsTotalMapper.xml

@@ -0,0 +1,326 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.tzld.piaoquan.growth.common.dao.mapper.StaffStatisticsTotalMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.growth.common.model.po.StaffStatisticsTotal">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="date" jdbcType="VARCHAR" property="date" />
+    <result column="corp_id" jdbcType="BIGINT" property="corpId" />
+    <result column="staff_id" jdbcType="BIGINT" property="staffId" />
+    <result column="stat_time" jdbcType="BIGINT" property="statTime" />
+    <result column="chat_cnt" jdbcType="INTEGER" property="chatCnt" />
+    <result column="message_cnt" jdbcType="INTEGER" property="messageCnt" />
+    <result column="negative_feedback_cnt" jdbcType="INTEGER" property="negativeFeedbackCnt" />
+    <result column="new_apply_cnt" jdbcType="INTEGER" property="newApplyCnt" />
+    <result column="new_contact_cnt" jdbcType="INTEGER" property="newContactCnt" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, `date`, corp_id, staff_id, stat_time, chat_cnt, message_cnt, negative_feedback_cnt, 
+    new_apply_cnt, new_contact_cnt, create_time, update_time
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.growth.common.model.po.StaffStatisticsTotalExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from we_com_staff_statistics_total
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    <if test="page != null">
+      limit #{page.offset} , #{page.pageSize}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from we_com_staff_statistics_total
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from we_com_staff_statistics_total
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.growth.common.model.po.StaffStatisticsTotalExample">
+    delete from we_com_staff_statistics_total
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.growth.common.model.po.StaffStatisticsTotal">
+    insert into we_com_staff_statistics_total (id, `date`, corp_id, 
+      staff_id, stat_time, chat_cnt, 
+      message_cnt, negative_feedback_cnt, new_apply_cnt, 
+      new_contact_cnt, create_time, update_time
+      )
+    values (#{id,jdbcType=BIGINT}, #{date,jdbcType=VARCHAR}, #{corpId,jdbcType=BIGINT}, 
+      #{staffId,jdbcType=BIGINT}, #{statTime,jdbcType=BIGINT}, #{chatCnt,jdbcType=INTEGER}, 
+      #{messageCnt,jdbcType=INTEGER}, #{negativeFeedbackCnt,jdbcType=INTEGER}, #{newApplyCnt,jdbcType=INTEGER}, 
+      #{newContactCnt,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.growth.common.model.po.StaffStatisticsTotal">
+    insert into we_com_staff_statistics_total
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="date != null">
+        `date`,
+      </if>
+      <if test="corpId != null">
+        corp_id,
+      </if>
+      <if test="staffId != null">
+        staff_id,
+      </if>
+      <if test="statTime != null">
+        stat_time,
+      </if>
+      <if test="chatCnt != null">
+        chat_cnt,
+      </if>
+      <if test="messageCnt != null">
+        message_cnt,
+      </if>
+      <if test="negativeFeedbackCnt != null">
+        negative_feedback_cnt,
+      </if>
+      <if test="newApplyCnt != null">
+        new_apply_cnt,
+      </if>
+      <if test="newContactCnt != null">
+        new_contact_cnt,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="updateTime != null">
+        update_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=BIGINT},
+      </if>
+      <if test="date != null">
+        #{date,jdbcType=VARCHAR},
+      </if>
+      <if test="corpId != null">
+        #{corpId,jdbcType=BIGINT},
+      </if>
+      <if test="staffId != null">
+        #{staffId,jdbcType=BIGINT},
+      </if>
+      <if test="statTime != null">
+        #{statTime,jdbcType=BIGINT},
+      </if>
+      <if test="chatCnt != null">
+        #{chatCnt,jdbcType=INTEGER},
+      </if>
+      <if test="messageCnt != null">
+        #{messageCnt,jdbcType=INTEGER},
+      </if>
+      <if test="negativeFeedbackCnt != null">
+        #{negativeFeedbackCnt,jdbcType=INTEGER},
+      </if>
+      <if test="newApplyCnt != null">
+        #{newApplyCnt,jdbcType=INTEGER},
+      </if>
+      <if test="newContactCnt != null">
+        #{newContactCnt,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.tzld.piaoquan.growth.common.model.po.StaffStatisticsTotalExample" resultType="java.lang.Long">
+    select count(*) from we_com_staff_statistics_total
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update we_com_staff_statistics_total
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.date != null">
+        `date` = #{record.date,jdbcType=VARCHAR},
+      </if>
+      <if test="record.corpId != null">
+        corp_id = #{record.corpId,jdbcType=BIGINT},
+      </if>
+      <if test="record.staffId != null">
+        staff_id = #{record.staffId,jdbcType=BIGINT},
+      </if>
+      <if test="record.statTime != null">
+        stat_time = #{record.statTime,jdbcType=BIGINT},
+      </if>
+      <if test="record.chatCnt != null">
+        chat_cnt = #{record.chatCnt,jdbcType=INTEGER},
+      </if>
+      <if test="record.messageCnt != null">
+        message_cnt = #{record.messageCnt,jdbcType=INTEGER},
+      </if>
+      <if test="record.negativeFeedbackCnt != null">
+        negative_feedback_cnt = #{record.negativeFeedbackCnt,jdbcType=INTEGER},
+      </if>
+      <if test="record.newApplyCnt != null">
+        new_apply_cnt = #{record.newApplyCnt,jdbcType=INTEGER},
+      </if>
+      <if test="record.newContactCnt != null">
+        new_contact_cnt = #{record.newContactCnt,jdbcType=INTEGER},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.updateTime != null">
+        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update we_com_staff_statistics_total
+    set id = #{record.id,jdbcType=BIGINT},
+      `date` = #{record.date,jdbcType=VARCHAR},
+      corp_id = #{record.corpId,jdbcType=BIGINT},
+      staff_id = #{record.staffId,jdbcType=BIGINT},
+      stat_time = #{record.statTime,jdbcType=BIGINT},
+      chat_cnt = #{record.chatCnt,jdbcType=INTEGER},
+      message_cnt = #{record.messageCnt,jdbcType=INTEGER},
+      negative_feedback_cnt = #{record.negativeFeedbackCnt,jdbcType=INTEGER},
+      new_apply_cnt = #{record.newApplyCnt,jdbcType=INTEGER},
+      new_contact_cnt = #{record.newContactCnt,jdbcType=INTEGER},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      update_time = #{record.updateTime,jdbcType=TIMESTAMP}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.growth.common.model.po.StaffStatisticsTotal">
+    update we_com_staff_statistics_total
+    <set>
+      <if test="date != null">
+        `date` = #{date,jdbcType=VARCHAR},
+      </if>
+      <if test="corpId != null">
+        corp_id = #{corpId,jdbcType=BIGINT},
+      </if>
+      <if test="staffId != null">
+        staff_id = #{staffId,jdbcType=BIGINT},
+      </if>
+      <if test="statTime != null">
+        stat_time = #{statTime,jdbcType=BIGINT},
+      </if>
+      <if test="chatCnt != null">
+        chat_cnt = #{chatCnt,jdbcType=INTEGER},
+      </if>
+      <if test="messageCnt != null">
+        message_cnt = #{messageCnt,jdbcType=INTEGER},
+      </if>
+      <if test="negativeFeedbackCnt != null">
+        negative_feedback_cnt = #{negativeFeedbackCnt,jdbcType=INTEGER},
+      </if>
+      <if test="newApplyCnt != null">
+        new_apply_cnt = #{newApplyCnt,jdbcType=INTEGER},
+      </if>
+      <if test="newContactCnt != null">
+        new_contact_cnt = #{newContactCnt,jdbcType=INTEGER},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.growth.common.model.po.StaffStatisticsTotal">
+    update we_com_staff_statistics_total
+    set `date` = #{date,jdbcType=VARCHAR},
+      corp_id = #{corpId,jdbcType=BIGINT},
+      staff_id = #{staffId,jdbcType=BIGINT},
+      stat_time = #{statTime,jdbcType=BIGINT},
+      chat_cnt = #{chatCnt,jdbcType=INTEGER},
+      message_cnt = #{messageCnt,jdbcType=INTEGER},
+      negative_feedback_cnt = #{negativeFeedbackCnt,jdbcType=INTEGER},
+      new_apply_cnt = #{newApplyCnt,jdbcType=INTEGER},
+      new_contact_cnt = #{newContactCnt,jdbcType=INTEGER},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_time = #{updateTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 45 - 7
common-module/src/main/resources/mapper/StaffWithUserMapper.xml

@@ -7,6 +7,8 @@
     <result column="user_id" jdbcType="BIGINT" property="userId" />
     <result column="is_delete" jdbcType="INTEGER" property="isDelete" />
     <result column="delete_time" jdbcType="TIMESTAMP" property="deleteTime" />
+    <result column="new_is_delete" jdbcType="INTEGER" property="newIsDelete" />
+    <result column="new_delete_time" jdbcType="TIMESTAMP" property="newDeleteTime" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
   </resultMap>
@@ -69,7 +71,8 @@
     </where>
   </sql>
   <sql id="Base_Column_List">
-    id, staff_id, user_id, is_delete, delete_time, create_time, update_time
+    id, staff_id, user_id, is_delete, delete_time, new_is_delete, new_delete_time, create_time, 
+    update_time
   </sql>
   <select id="selectByExample" parameterType="com.tzld.piaoquan.growth.common.model.po.StaffWithUserExample" resultMap="BaseResultMap">
     select
@@ -89,7 +92,7 @@
     </if>
   </select>
   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
-    select
+    select 
     <include refid="Base_Column_List" />
     from we_com_staff_with_user
     where id = #{id,jdbcType=BIGINT}
@@ -105,11 +108,14 @@
     </if>
   </delete>
   <insert id="insert" parameterType="com.tzld.piaoquan.growth.common.model.po.StaffWithUser">
-    insert into we_com_staff_with_user (id, staff_id, user_id, delete_time, create_time,
-      update_time)
-    values (#{id,jdbcType=BIGINT}, #{staffId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT},
-      #{deleteTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
-      #{updateTime,jdbcType=TIMESTAMP})
+    insert into we_com_staff_with_user (id, staff_id, user_id, 
+      is_delete, delete_time, new_is_delete, 
+      new_delete_time, create_time, update_time
+      )
+    values (#{id,jdbcType=BIGINT}, #{staffId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, 
+      #{isDelete,jdbcType=INTEGER}, #{deleteTime,jdbcType=TIMESTAMP}, #{newIsDelete,jdbcType=INTEGER}, 
+      #{newDeleteTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
+      )
   </insert>
   <insert id="insertSelective" parameterType="com.tzld.piaoquan.growth.common.model.po.StaffWithUser">
     insert into we_com_staff_with_user
@@ -129,6 +135,12 @@
       <if test="deleteTime != null">
         delete_time,
       </if>
+      <if test="newIsDelete != null">
+        new_is_delete,
+      </if>
+      <if test="newDeleteTime != null">
+        new_delete_time,
+      </if>
       <if test="createTime != null">
         create_time,
       </if>
@@ -152,6 +164,12 @@
       <if test="deleteTime != null">
         #{deleteTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="newIsDelete != null">
+        #{newIsDelete,jdbcType=INTEGER},
+      </if>
+      <if test="newDeleteTime != null">
+        #{newDeleteTime,jdbcType=TIMESTAMP},
+      </if>
       <if test="createTime != null">
         #{createTime,jdbcType=TIMESTAMP},
       </if>
@@ -184,6 +202,12 @@
       <if test="record.deleteTime != null">
         delete_time = #{record.deleteTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="record.newIsDelete != null">
+        new_is_delete = #{record.newIsDelete,jdbcType=INTEGER},
+      </if>
+      <if test="record.newDeleteTime != null">
+        new_delete_time = #{record.newDeleteTime,jdbcType=TIMESTAMP},
+      </if>
       <if test="record.createTime != null">
         create_time = #{record.createTime,jdbcType=TIMESTAMP},
       </if>
@@ -202,6 +226,8 @@
       user_id = #{record.userId,jdbcType=BIGINT},
       is_delete = #{record.isDelete,jdbcType=INTEGER},
       delete_time = #{record.deleteTime,jdbcType=TIMESTAMP},
+      new_is_delete = #{record.newIsDelete,jdbcType=INTEGER},
+      new_delete_time = #{record.newDeleteTime,jdbcType=TIMESTAMP},
       create_time = #{record.createTime,jdbcType=TIMESTAMP},
       update_time = #{record.updateTime,jdbcType=TIMESTAMP}
     <if test="_parameter != null">
@@ -223,6 +249,12 @@
       <if test="deleteTime != null">
         delete_time = #{deleteTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="newIsDelete != null">
+        new_is_delete = #{newIsDelete,jdbcType=INTEGER},
+      </if>
+      <if test="newDeleteTime != null">
+        new_delete_time = #{newDeleteTime,jdbcType=TIMESTAMP},
+      </if>
       <if test="createTime != null">
         create_time = #{createTime,jdbcType=TIMESTAMP},
       </if>
@@ -238,6 +270,8 @@
       user_id = #{userId,jdbcType=BIGINT},
       is_delete = #{isDelete,jdbcType=INTEGER},
       delete_time = #{deleteTime,jdbcType=TIMESTAMP},
+      new_is_delete = #{newIsDelete,jdbcType=INTEGER},
+      new_delete_time = #{newDeleteTime,jdbcType=TIMESTAMP},
       create_time = #{createTime,jdbcType=TIMESTAMP},
       update_time = #{updateTime,jdbcType=TIMESTAMP}
     where id = #{id,jdbcType=BIGINT}
@@ -250,6 +284,8 @@
     user_id,
     is_delete,
     delete_time,
+    new_is_delete,
+    new_delete_time,
     create_time,
     update_time
     )
@@ -260,6 +296,8 @@
       #{item.userId,jdbcType=BIGINT},
       #{item.isDelete,jdbcType=INTEGER},
       #{item.deleteTime,jdbcType=TIMESTAMP},
+      #{newIsDelete,jdbcType=INTEGER},
+      #{newDeleteTime,jdbcType=TIMESTAMP},
       #{item.createTime,jdbcType=TIMESTAMP},
       #{item.updateTime,jdbcType=TIMESTAMP}
       )

+ 480 - 472
common-module/src/main/resources/mapper/WeComUserMapper.xml

@@ -1,498 +1,506 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.tzld.piaoquan.growth.common.dao.mapper.WeComUserMapper">
-    <resultMap id="BaseResultMap" type="com.tzld.piaoquan.growth.common.model.po.WeComUser">
-        <id column="id" jdbcType="BIGINT" property="id"/>
-        <result column="corp_id" jdbcType="BIGINT" property="corpId"/>
-        <result column="external_user_id" jdbcType="VARCHAR" property="externalUserId"/>
-        <result column="union_id" jdbcType="VARCHAR" property="unionId"/>
-        <result column="external_user_id_3rd_party" jdbcType="VARCHAR" property="externalUserId3rdParty"/>
-        <result column="type" jdbcType="INTEGER" property="type"/>
-        <result column="name" jdbcType="VARCHAR" property="name"/>
-        <result column="avatar" jdbcType="VARCHAR" property="avatar"/>
-        <result column="gender" jdbcType="INTEGER" property="gender"/>
-        <result column="is_delete" jdbcType="INTEGER" property="isDelete"/>
-        <result column="group_msg_disabled" jdbcType="TINYINT" property="groupMsgDisabled"/>
-        <result column="created_at" jdbcType="BIGINT" property="createdAt"/>
-        <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="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
-    </resultMap>
-    <sql id="Example_Where_Clause">
-        <where>
-            <foreach collection="oredCriteria" item="criteria" separator="or">
-                <if test="criteria.valid">
-                    <trim prefix="(" prefixOverrides="and" suffix=")">
-                        <foreach collection="criteria.criteria" item="criterion">
-                            <choose>
-                                <when test="criterion.noValue">
-                                    and ${criterion.condition}
-                                </when>
-                                <when test="criterion.singleValue">
-                                    and ${criterion.condition} #{criterion.value}
-                                </when>
-                                <when test="criterion.betweenValue">
-                                    and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                                </when>
-                                <when test="criterion.listValue">
-                                    and ${criterion.condition}
-                                    <foreach close=")" collection="criterion.value" item="listItem" open="("
-                                             separator=",">
-                                        #{listItem}
-                                    </foreach>
-                                </when>
-                            </choose>
-                        </foreach>
-                    </trim>
-                </if>
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.growth.common.model.po.WeComUser">
+    <id column="id" jdbcType="BIGINT" property="id" />
+    <result column="corp_id" jdbcType="BIGINT" property="corpId" />
+    <result column="external_user_id" jdbcType="VARCHAR" property="externalUserId" />
+    <result column="union_id" jdbcType="VARCHAR" property="unionId" />
+    <result column="external_user_id_3rd_party" jdbcType="VARCHAR" property="externalUserId3rdParty" />
+    <result column="type" jdbcType="INTEGER" property="type" />
+    <result column="name" jdbcType="VARCHAR" property="name" />
+    <result column="avatar" jdbcType="VARCHAR" property="avatar" />
+    <result column="gender" jdbcType="INTEGER" property="gender" />
+    <result column="is_delete" jdbcType="INTEGER" property="isDelete" />
+    <result column="group_msg_disabled" jdbcType="TINYINT" property="groupMsgDisabled" />
+    <result column="created_at" jdbcType="BIGINT" property="createdAt" />
+    <result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
+    <result column="deleted_at" jdbcType="BIGINT" property="deletedAt" />
+    <result column="abtype" jdbcType="VARCHAR" property="abtype" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
             </foreach>
-        </where>
-    </sql>
-    <sql id="Update_By_Example_Where_Clause">
-        <where>
-            <foreach collection="example.oredCriteria" item="criteria" separator="or">
-                <if test="criteria.valid">
-                    <trim prefix="(" prefixOverrides="and" suffix=")">
-                        <foreach collection="criteria.criteria" item="criterion">
-                            <choose>
-                                <when test="criterion.noValue">
-                                    and ${criterion.condition}
-                                </when>
-                                <when test="criterion.singleValue">
-                                    and ${criterion.condition} #{criterion.value}
-                                </when>
-                                <when test="criterion.betweenValue">
-                                    and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
-                                </when>
-                                <when test="criterion.listValue">
-                                    and ${criterion.condition}
-                                    <foreach close=")" collection="criterion.value" item="listItem" open="("
-                                             separator=",">
-                                        #{listItem}
-                                    </foreach>
-                                </when>
-                            </choose>
-                        </foreach>
-                    </trim>
-                </if>
-            </foreach>
-        </where>
-    </sql>
-    <sql id="Base_Column_List">
-        id
-        , corp_id, external_user_id, union_id, external_user_id_3rd_party, `type`, `name`,
-    avatar, gender, is_delete, group_msg_disabled, created_at, updated_at, deleted_at, 
-    create_time, update_time
-    </sql>
-    <select id="selectByExample" parameterType="com.tzld.piaoquan.growth.common.model.po.WeComUserExample"
-            resultMap="BaseResultMap">
-        select
-        <if test="distinct">
-            distinct
-        </if>
-        <include refid="Base_Column_List"/>
-        from we_com_user
-        <if test="_parameter != null">
-            <include refid="Example_Where_Clause"/>
-        </if>
-        <if test="orderByClause != null">
-            order by ${orderByClause}
-        </if>
-        <if test="page != null">
-            limit #{page.offset} , #{page.pageSize}
+          </trim>
         </if>
-    </select>
-    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
-        select
-        <include refid="Base_Column_List"/>
-        from we_com_user
-        where id = #{id,jdbcType=BIGINT}
-    </select>
-    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
-        delete
-        from we_com_user
-        where id = #{id,jdbcType=BIGINT}
-    </delete>
-    <delete id="deleteByExample" parameterType="com.tzld.piaoquan.growth.common.model.po.WeComUserExample">
-        delete from we_com_user
-        <if test="_parameter != null">
-            <include refid="Example_Where_Clause"/>
-        </if>
-    </delete>
-    <insert id="insert" parameterType="com.tzld.piaoquan.growth.common.model.po.WeComUser" useGeneratedKeys="true"
-            keyProperty="id">
-        insert into we_com_user (id, corp_id, external_user_id,
-        union_id, external_user_id_3rd_party, `type`,
-        `name`, avatar, gender,
-        is_delete, group_msg_disabled, created_at,
-        updated_at, deleted_at, create_time,
-        update_time)
-        values (#{id,jdbcType=BIGINT}, #{corpId,jdbcType=BIGINT}, #{externalUserId,jdbcType=VARCHAR},
-        #{unionId,jdbcType=VARCHAR}, #{externalUserId3rdParty,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER},
-        #{name,jdbcType=VARCHAR}, #{avatar,jdbcType=VARCHAR}, #{gender,jdbcType=INTEGER},
-        #{isDelete,jdbcType=INTEGER}, #{groupMsgDisabled,jdbcType=TINYINT}, #{createdAt,jdbcType=BIGINT},
-        #{updatedAt,jdbcType=BIGINT}, #{deletedAt,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
-        #{updateTime,jdbcType=TIMESTAMP})
-        <selectKey resultType="java.lang.Long" order="AFTER" keyProperty="id">
-            select LAST_INSERT_ID()
-        </selectKey>
-    </insert>
-    <insert id="insertSelective" parameterType="com.tzld.piaoquan.growth.common.model.po.WeComUser"
-            useGeneratedKeys="true" keyProperty="id">
-        insert into we_com_user
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="id != null">
-                id,
-            </if>
-            <if test="corpId != null">
-                corp_id,
-            </if>
-            <if test="externalUserId != null">
-                external_user_id,
-            </if>
-            <if test="unionId != null">
-                union_id,
-            </if>
-            <if test="externalUserId3rdParty != null">
-                external_user_id_3rd_party,
-            </if>
-            <if test="type != null">
-                `type`,
-            </if>
-            <if test="name != null">
-                `name`,
-            </if>
-            <if test="avatar != null">
-                avatar,
-            </if>
-            <if test="gender != null">
-                gender,
-            </if>
-            <if test="isDelete != null">
-                is_delete,
-            </if>
-            <if test="groupMsgDisabled != null">
-                group_msg_disabled,
-            </if>
-            <if test="createdAt != null">
-                created_at,
-            </if>
-            <if test="updatedAt != null">
-                updated_at,
-            </if>
-            <if test="deletedAt != null">
-                deleted_at,
-            </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="corpId != null">
-                #{corpId,jdbcType=BIGINT},
-            </if>
-            <if test="externalUserId != null">
-                #{externalUserId,jdbcType=VARCHAR},
-            </if>
-            <if test="unionId != null">
-                #{unionId,jdbcType=VARCHAR},
-            </if>
-            <if test="externalUserId3rdParty != null">
-                #{externalUserId3rdParty,jdbcType=VARCHAR},
-            </if>
-            <if test="type != null">
-                #{type,jdbcType=INTEGER},
-            </if>
-            <if test="name != null">
-                #{name,jdbcType=VARCHAR},
-            </if>
-            <if test="avatar != null">
-                #{avatar,jdbcType=VARCHAR},
-            </if>
-            <if test="gender != null">
-                #{gender,jdbcType=INTEGER},
-            </if>
-            <if test="isDelete != null">
-                #{isDelete,jdbcType=INTEGER},
-            </if>
-            <if test="groupMsgDisabled != null">
-                #{groupMsgDisabled,jdbcType=TINYINT},
-            </if>
-            <if test="createdAt != null">
-                #{createdAt,jdbcType=BIGINT},
-            </if>
-            <if test="updatedAt != null">
-                #{updatedAt,jdbcType=BIGINT},
-            </if>
-            <if test="deletedAt != null">
-                #{deletedAt,jdbcType=BIGINT},
-            </if>
-            <if test="createTime != null">
-                #{createTime,jdbcType=TIMESTAMP},
-            </if>
-            <if test="updateTime != null">
-                #{updateTime,jdbcType=TIMESTAMP},
-            </if>
-        </trim>
-        <selectKey resultType="java.lang.Long" order="AFTER" keyProperty="id">
-            select LAST_INSERT_ID()
-        </selectKey>
-    </insert>
-    <select id="countByExample" parameterType="com.tzld.piaoquan.growth.common.model.po.WeComUserExample"
-            resultType="java.lang.Long">
-        select count(*) from we_com_user
-        <if test="_parameter != null">
-            <include refid="Example_Where_Clause"/>
-        </if>
-    </select>
-    <update id="updateByExampleSelective" parameterType="map">
-        update we_com_user
-        <set>
-            <if test="record.id != null">
-                id = #{record.id,jdbcType=BIGINT},
-            </if>
-            <if test="record.corpId != null">
-                corp_id = #{record.corpId,jdbcType=BIGINT},
-            </if>
-            <if test="record.externalUserId != null">
-                external_user_id = #{record.externalUserId,jdbcType=VARCHAR},
-            </if>
-            <if test="record.unionId != null">
-                union_id = #{record.unionId,jdbcType=VARCHAR},
-            </if>
-            <if test="record.externalUserId3rdParty != null">
-                external_user_id_3rd_party = #{record.externalUserId3rdParty,jdbcType=VARCHAR},
-            </if>
-            <if test="record.type != null">
-                `type` = #{record.type,jdbcType=INTEGER},
-            </if>
-            <if test="record.name != null">
-                `name` = #{record.name,jdbcType=VARCHAR},
-            </if>
-            <if test="record.avatar != null">
-                avatar = #{record.avatar,jdbcType=VARCHAR},
-            </if>
-            <if test="record.gender != null">
-                gender = #{record.gender,jdbcType=INTEGER},
-            </if>
-            <if test="record.isDelete != null">
-                is_delete = #{record.isDelete,jdbcType=INTEGER},
-            </if>
-            <if test="record.groupMsgDisabled != null">
-                group_msg_disabled = #{record.groupMsgDisabled,jdbcType=TINYINT},
-            </if>
-            <if test="record.createdAt != null">
-                created_at = #{record.createdAt,jdbcType=BIGINT},
-            </if>
-            <if test="record.updatedAt != null">
-                updated_at = #{record.updatedAt,jdbcType=BIGINT},
-            </if>
-            <if test="record.deletedAt != null">
-                deleted_at = #{record.deletedAt,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"/>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
         </if>
-    </update>
-    <update id="updateByExample" parameterType="map">
-        update we_com_user
-        set id = #{record.id,jdbcType=BIGINT},
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, corp_id, external_user_id, union_id, external_user_id_3rd_party, `type`, `name`, 
+    avatar, gender, is_delete, group_msg_disabled, created_at, updated_at, deleted_at, 
+    abtype, create_time, update_time
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.growth.common.model.po.WeComUserExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from we_com_user
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    <if test="page != null">
+      limit #{page.offset} , #{page.pageSize}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from we_com_user
+    where id = #{id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
+    delete from we_com_user
+    where id = #{id,jdbcType=BIGINT}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.growth.common.model.po.WeComUserExample">
+    delete from we_com_user
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.growth.common.model.po.WeComUser" useGeneratedKeys="true" keyProperty="id">
+    insert into we_com_user (id, corp_id, external_user_id, 
+      union_id, external_user_id_3rd_party, `type`, 
+      `name`, avatar, gender, 
+      is_delete, group_msg_disabled, created_at, 
+      updated_at, deleted_at, abtype, 
+      create_time, update_time)
+    values (#{id,jdbcType=BIGINT}, #{corpId,jdbcType=BIGINT}, #{externalUserId,jdbcType=VARCHAR}, 
+      #{unionId,jdbcType=VARCHAR}, #{externalUserId3rdParty,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, 
+      #{name,jdbcType=VARCHAR}, #{avatar,jdbcType=VARCHAR}, #{gender,jdbcType=INTEGER}, 
+      #{isDelete,jdbcType=INTEGER}, #{groupMsgDisabled,jdbcType=TINYINT}, #{createdAt,jdbcType=BIGINT}, 
+      #{updatedAt,jdbcType=BIGINT}, #{deletedAt,jdbcType=BIGINT}, #{abtype,jdbcType=VARCHAR}, 
+      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
+    <selectKey resultType="java.lang.Long" order="AFTER" keyProperty="id">
+      select LAST_INSERT_ID()
+    </selectKey>
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.growth.common.model.po.WeComUser" useGeneratedKeys="true" keyProperty="id">
+    insert into we_com_user
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="corpId != null">
+        corp_id,
+      </if>
+      <if test="externalUserId != null">
+        external_user_id,
+      </if>
+      <if test="unionId != null">
+        union_id,
+      </if>
+      <if test="externalUserId3rdParty != null">
+        external_user_id_3rd_party,
+      </if>
+      <if test="type != null">
+        `type`,
+      </if>
+      <if test="name != null">
+        `name`,
+      </if>
+      <if test="avatar != null">
+        avatar,
+      </if>
+      <if test="gender != null">
+        gender,
+      </if>
+      <if test="isDelete != null">
+        is_delete,
+      </if>
+      <if test="groupMsgDisabled != null">
+        group_msg_disabled,
+      </if>
+      <if test="createdAt != null">
+        created_at,
+      </if>
+      <if test="updatedAt != null">
+        updated_at,
+      </if>
+      <if test="deletedAt != null">
+        deleted_at,
+      </if>
+      <if test="abtype != null">
+        abtype,
+      </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="corpId != null">
+        #{corpId,jdbcType=BIGINT},
+      </if>
+      <if test="externalUserId != null">
+        #{externalUserId,jdbcType=VARCHAR},
+      </if>
+      <if test="unionId != null">
+        #{unionId,jdbcType=VARCHAR},
+      </if>
+      <if test="externalUserId3rdParty != null">
+        #{externalUserId3rdParty,jdbcType=VARCHAR},
+      </if>
+      <if test="type != null">
+        #{type,jdbcType=INTEGER},
+      </if>
+      <if test="name != null">
+        #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="avatar != null">
+        #{avatar,jdbcType=VARCHAR},
+      </if>
+      <if test="gender != null">
+        #{gender,jdbcType=INTEGER},
+      </if>
+      <if test="isDelete != null">
+        #{isDelete,jdbcType=INTEGER},
+      </if>
+      <if test="groupMsgDisabled != null">
+        #{groupMsgDisabled,jdbcType=TINYINT},
+      </if>
+      <if test="createdAt != null">
+        #{createdAt,jdbcType=BIGINT},
+      </if>
+      <if test="updatedAt != null">
+        #{updatedAt,jdbcType=BIGINT},
+      </if>
+      <if test="deletedAt != null">
+        #{deletedAt,jdbcType=BIGINT},
+      </if>
+      <if test="abtype != null">
+        #{abtype,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+    <selectKey resultType="java.lang.Long" order="AFTER" keyProperty="id">
+      select LAST_INSERT_ID()
+    </selectKey>
+  </insert>
+  <select id="countByExample" parameterType="com.tzld.piaoquan.growth.common.model.po.WeComUserExample" resultType="java.lang.Long">
+    select count(*) from we_com_user
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update we_com_user
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=BIGINT},
+      </if>
+      <if test="record.corpId != null">
         corp_id = #{record.corpId,jdbcType=BIGINT},
+      </if>
+      <if test="record.externalUserId != null">
         external_user_id = #{record.externalUserId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.unionId != null">
         union_id = #{record.unionId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.externalUserId3rdParty != null">
         external_user_id_3rd_party = #{record.externalUserId3rdParty,jdbcType=VARCHAR},
+      </if>
+      <if test="record.type != null">
         `type` = #{record.type,jdbcType=INTEGER},
+      </if>
+      <if test="record.name != null">
         `name` = #{record.name,jdbcType=VARCHAR},
+      </if>
+      <if test="record.avatar != null">
         avatar = #{record.avatar,jdbcType=VARCHAR},
+      </if>
+      <if test="record.gender != null">
         gender = #{record.gender,jdbcType=INTEGER},
+      </if>
+      <if test="record.isDelete != null">
         is_delete = #{record.isDelete,jdbcType=INTEGER},
+      </if>
+      <if test="record.groupMsgDisabled != null">
         group_msg_disabled = #{record.groupMsgDisabled,jdbcType=TINYINT},
+      </if>
+      <if test="record.createdAt != null">
         created_at = #{record.createdAt,jdbcType=BIGINT},
+      </if>
+      <if test="record.updatedAt != null">
         updated_at = #{record.updatedAt,jdbcType=BIGINT},
+      </if>
+      <if test="record.deletedAt != null">
         deleted_at = #{record.deletedAt,jdbcType=BIGINT},
+      </if>
+      <if test="record.abtype != null">
+        abtype = #{record.abtype,jdbcType=VARCHAR},
+      </if>
+      <if test="record.createTime != null">
         create_time = #{record.createTime,jdbcType=TIMESTAMP},
-        update_time = #{record.updateTime,jdbcType=TIMESTAMP}
-        <if test="_parameter != null">
-            <include refid="Update_By_Example_Where_Clause"/>
-        </if>
-    </update>
-    <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.growth.common.model.po.WeComUser">
-        update we_com_user
-        <set>
-            <if test="corpId != null">
-                corp_id = #{corpId,jdbcType=BIGINT},
-            </if>
-            <if test="externalUserId != null">
-                external_user_id = #{externalUserId,jdbcType=VARCHAR},
-            </if>
-            <if test="unionId != null">
-                union_id = #{unionId,jdbcType=VARCHAR},
-            </if>
-            <if test="externalUserId3rdParty != null">
-                external_user_id_3rd_party = #{externalUserId3rdParty,jdbcType=VARCHAR},
-            </if>
-            <if test="type != null">
-                `type` = #{type,jdbcType=INTEGER},
-            </if>
-            <if test="name != null">
-                `name` = #{name,jdbcType=VARCHAR},
-            </if>
-            <if test="avatar != null">
-                avatar = #{avatar,jdbcType=VARCHAR},
-            </if>
-            <if test="gender != null">
-                gender = #{gender,jdbcType=INTEGER},
-            </if>
-            <if test="isDelete != null">
-                is_delete = #{isDelete,jdbcType=INTEGER},
-            </if>
-            <if test="groupMsgDisabled != null">
-                group_msg_disabled = #{groupMsgDisabled,jdbcType=TINYINT},
-            </if>
-            <if test="createdAt != null">
-                created_at = #{createdAt,jdbcType=BIGINT},
-            </if>
-            <if test="updatedAt != null">
-                updated_at = #{updatedAt,jdbcType=BIGINT},
-            </if>
-            <if test="deletedAt != null">
-                deleted_at = #{deletedAt,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.growth.common.model.po.WeComUser">
-        update we_com_user
-        set corp_id                    = #{corpId,jdbcType=BIGINT},
-            external_user_id           = #{externalUserId,jdbcType=VARCHAR},
-            union_id                   = #{unionId,jdbcType=VARCHAR},
-            external_user_id_3rd_party = #{externalUserId3rdParty,jdbcType=VARCHAR},
-            `type`                     = #{type,jdbcType=INTEGER},
-            `name`                     = #{name,jdbcType=VARCHAR},
-            avatar                     = #{avatar,jdbcType=VARCHAR},
-            gender                     = #{gender,jdbcType=INTEGER},
-            is_delete                  = #{isDelete,jdbcType=INTEGER},
-            group_msg_disabled         = #{groupMsgDisabled,jdbcType=TINYINT},
-            created_at                 = #{createdAt,jdbcType=BIGINT},
-            updated_at                 = #{updatedAt,jdbcType=BIGINT},
-            deleted_at                 = #{deletedAt,jdbcType=BIGINT},
-            create_time                = #{createTime,jdbcType=TIMESTAMP},
-            update_time                = #{updateTime,jdbcType=TIMESTAMP}
-        where id = #{id,jdbcType=BIGINT}
-    </update>
+      </if>
+      <if test="record.updateTime != null">
+        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update we_com_user
+    set id = #{record.id,jdbcType=BIGINT},
+      corp_id = #{record.corpId,jdbcType=BIGINT},
+      external_user_id = #{record.externalUserId,jdbcType=VARCHAR},
+      union_id = #{record.unionId,jdbcType=VARCHAR},
+      external_user_id_3rd_party = #{record.externalUserId3rdParty,jdbcType=VARCHAR},
+      `type` = #{record.type,jdbcType=INTEGER},
+      `name` = #{record.name,jdbcType=VARCHAR},
+      avatar = #{record.avatar,jdbcType=VARCHAR},
+      gender = #{record.gender,jdbcType=INTEGER},
+      is_delete = #{record.isDelete,jdbcType=INTEGER},
+      group_msg_disabled = #{record.groupMsgDisabled,jdbcType=TINYINT},
+      created_at = #{record.createdAt,jdbcType=BIGINT},
+      updated_at = #{record.updatedAt,jdbcType=BIGINT},
+      deleted_at = #{record.deletedAt,jdbcType=BIGINT},
+      abtype = #{record.abtype,jdbcType=VARCHAR},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      update_time = #{record.updateTime,jdbcType=TIMESTAMP}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.growth.common.model.po.WeComUser">
+    update we_com_user
+    <set>
+      <if test="corpId != null">
+        corp_id = #{corpId,jdbcType=BIGINT},
+      </if>
+      <if test="externalUserId != null">
+        external_user_id = #{externalUserId,jdbcType=VARCHAR},
+      </if>
+      <if test="unionId != null">
+        union_id = #{unionId,jdbcType=VARCHAR},
+      </if>
+      <if test="externalUserId3rdParty != null">
+        external_user_id_3rd_party = #{externalUserId3rdParty,jdbcType=VARCHAR},
+      </if>
+      <if test="type != null">
+        `type` = #{type,jdbcType=INTEGER},
+      </if>
+      <if test="name != null">
+        `name` = #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="avatar != null">
+        avatar = #{avatar,jdbcType=VARCHAR},
+      </if>
+      <if test="gender != null">
+        gender = #{gender,jdbcType=INTEGER},
+      </if>
+      <if test="isDelete != null">
+        is_delete = #{isDelete,jdbcType=INTEGER},
+      </if>
+      <if test="groupMsgDisabled != null">
+        group_msg_disabled = #{groupMsgDisabled,jdbcType=TINYINT},
+      </if>
+      <if test="createdAt != null">
+        created_at = #{createdAt,jdbcType=BIGINT},
+      </if>
+      <if test="updatedAt != null">
+        updated_at = #{updatedAt,jdbcType=BIGINT},
+      </if>
+      <if test="deletedAt != null">
+        deleted_at = #{deletedAt,jdbcType=BIGINT},
+      </if>
+      <if test="abtype != null">
+        abtype = #{abtype,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateTime != null">
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.growth.common.model.po.WeComUser">
+    update we_com_user
+    set corp_id = #{corpId,jdbcType=BIGINT},
+      external_user_id = #{externalUserId,jdbcType=VARCHAR},
+      union_id = #{unionId,jdbcType=VARCHAR},
+      external_user_id_3rd_party = #{externalUserId3rdParty,jdbcType=VARCHAR},
+      `type` = #{type,jdbcType=INTEGER},
+      `name` = #{name,jdbcType=VARCHAR},
+      avatar = #{avatar,jdbcType=VARCHAR},
+      gender = #{gender,jdbcType=INTEGER},
+      is_delete = #{isDelete,jdbcType=INTEGER},
+      group_msg_disabled = #{groupMsgDisabled,jdbcType=TINYINT},
+      created_at = #{createdAt,jdbcType=BIGINT},
+      updated_at = #{updatedAt,jdbcType=BIGINT},
+      deleted_at = #{deletedAt,jdbcType=BIGINT},
+      abtype = #{abtype,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      update_time = #{updateTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=BIGINT}
+  </update>
 
-    <select id="selectIdByExternalUserId" parameterType="String" resultType="Long">
-        select id
-        from we_com_user
-        where external_user_id = #{externalUserId}
-    </select>
+  <select id="selectIdByExternalUserId" parameterType="String" resultType="Long">
+    select id
+    from we_com_user
+    where external_user_id = #{externalUserId}
+  </select>
 
-    <insert id="insertList" parameterType="java.util.List">
-        insert into we_com_user
-        (
-        corp_id,
-        external_user_id,
-        union_id,
-        external_user_id_3rd_party,
-        `type`,
-        `name`,
-        avatar,
-        gender,
-        created_at,
-        updated_at,
-        deleted_at,
-        create_time,
-        update_time
-        )
-        values
-        <foreach collection="list" item="item" separator=",">
-            (
-            #{item.corpId,jdbcType=BIGINT}
-            #{item.externalUserId,jdbcType=VARCHAR},
-            #{item.unionId,jdbcType=VARCHAR},
-            #{item.externalUserId3rdParty,jdbcType=VARCHAR},
-            #{item.type,jdbcType=INTEGER},
-            #{item.name,jdbcType=VARCHAR},
-            #{item.avatar,jdbcType=VARCHAR},
-            #{item.gender,jdbcType=INTEGER},
-            #{item.createdAt,jdbcType=BIGINT},
-            #{item.updatedAt,jdbcType=BIGINT},
-            #{item.deletedAt,jdbcType=BIGINT},
-            #{item.createTime,jdbcType=TIMESTAMP},
-            #{item.updateTime,jdbcType=TIMESTAMP}
-            )
-        </foreach>
-    </insert>
+  <insert id="insertList" parameterType="java.util.List">
+    insert into we_com_user
+    (
+    corp_id,
+    external_user_id,
+    union_id,
+    external_user_id_3rd_party,
+    `type`,
+    `name`,
+    avatar,
+    gender,
+    created_at,
+    updated_at,
+    deleted_at,
+    abtype,
+    create_time,
+    update_time
+    )
+    values
+    <foreach collection="list" item="item" separator=",">
+      (
+      #{item.corpId,jdbcType=BIGINT}
+      #{item.externalUserId,jdbcType=VARCHAR},
+      #{item.unionId,jdbcType=VARCHAR},
+      #{item.externalUserId3rdParty,jdbcType=VARCHAR},
+      #{item.type,jdbcType=INTEGER},
+      #{item.name,jdbcType=VARCHAR},
+      #{item.avatar,jdbcType=VARCHAR},
+      #{item.gender,jdbcType=INTEGER},
+      #{item.createdAt,jdbcType=BIGINT},
+      #{item.updatedAt,jdbcType=BIGINT},
+      #{item.deletedAt,jdbcType=BIGINT},
+      #{item.abtype,jdbcType=VARCHAR},
+      #{item.createTime,jdbcType=TIMESTAMP},
+      #{item.updateTime,jdbcType=TIMESTAMP}
+      )
+    </foreach>
+  </insert>
 
+  <select id="selectUserList" resultType="com.tzld.piaoquan.growth.common.model.po.WeComUser">
+    select t1.*
+    from we_com_user t1
+    left join we_com_staff_with_user t2 on t1.id = t2.user_id
+    where t1.group_msg_disabled = #{groupMsgDisabled,jdbcType=TINYINT}
+    and t2.staff_id = #{staffId,jdbcType=BIGINT}
+    and t2.is_delete = 0
+    <if test="filterTagIdList != null and filterTagIdList.size() > 0">
+      and t1.id not in (
+      select t2.id
+      from we_com_user_with_tag t1
+      join we_com_user t2 on t1.user_id = t2.id
+      where t1.tag_id in
+      <foreach item="item" index="index" collection="filterTagIdList"
+               open="(" separator="," close=")">
+        #{item}
+      </foreach>
+      )
+    </if>
+    limit #{pageNum}, #{pageSize}
+  </select>
 
-    <select id="selectUserList" resultType="com.tzld.piaoquan.growth.common.model.po.WeComUser">
-        select t1.*
-        from we_com_user t1
-        left join we_com_staff_with_user t2 on t1.id = t2.user_id
-        where t1.group_msg_disabled = #{groupMsgDisabled,jdbcType=TINYINT}
-        and t2.staff_id = #{staffId,jdbcType=BIGINT}
-        and t2.is_delete = 0
-        <if test="filterTagIdList != null and filterTagIdList.size() > 0">
-            and t1.id not in (
-            select t2.id
-            from we_com_user_with_tag t1
-            join we_com_user t2 on t1.user_id = t2.id
-            where t1.tag_id in
-            <foreach item="item" index="index" collection="filterTagIdList"
-                     open="(" separator="," close=")">
-                #{item}
-            </foreach>
-            )
-        </if>
-        limit #{pageNum}, #{pageSize}
-    </select>
-
-    <select id="selectByTagUserList" resultType="com.tzld.piaoquan.growth.common.model.po.WeComUser">
-        select t1.*
-        from we_com_user t1
-                 join we_com_user_with_tag t2 on t1.id = t2.user_id
-        where t2.tag_id = #{tagId,jdbcType=BIGINT}
-    </select>
+  <select id="selectByTagUserList" resultType="com.tzld.piaoquan.growth.common.model.po.WeComUser">
+    select t1.*
+    from we_com_user t1
+           join we_com_user_with_tag t2 on t1.id = t2.user_id
+    where t2.tag_id = #{tagId,jdbcType=BIGINT}
+  </select>
 
-    <select id="selectByGenderUserList" resultType="com.tzld.piaoquan.growth.common.model.po.WeComUser">
-        select t1.*
-        from we_com_user t1
-        left join we_com_staff_with_user t2 on t1.id = t2.user_id
-        where t1.group_msg_disabled = #{groupMsgDisabled,jdbcType=TINYINT}
-        and t2.staff_id = #{staffId,jdbcType=BIGINT}
-        and t2.is_delete = 0
-        and t1.gender = #{gender,jdbcType=INTEGER}
-        <if test="filterTagIdList != null and filterTagIdList.size() > 0">
-            and t1.id not in (
-            select t2.id
-            from we_com_user_with_tag t1
-            join we_com_user t2 on t1.user_id = t2.id
-            where t1.tag_id in
-            <foreach item="item" index="index" collection="filterTagIdList"
-                     open="(" separator="," close=")">
-                #{item}
-            </foreach>
-            )
-        </if>
-    </select>
+  <select id="selectByGenderUserList" resultType="com.tzld.piaoquan.growth.common.model.po.WeComUser">
+    select t1.*
+    from we_com_user t1
+    left join we_com_staff_with_user t2 on t1.id = t2.user_id
+    where t1.group_msg_disabled = #{groupMsgDisabled,jdbcType=TINYINT}
+    and t2.staff_id = #{staffId,jdbcType=BIGINT}
+    and t2.is_delete = 0
+    and t1.gender = #{gender,jdbcType=INTEGER}
+    <if test="filterTagIdList != null and filterTagIdList.size() > 0">
+      and t1.id not in (
+      select t2.id
+      from we_com_user_with_tag t1
+      join we_com_user t2 on t1.user_id = t2.id
+      where t1.tag_id in
+      <foreach item="item" index="index" collection="filterTagIdList"
+               open="(" separator="," close=")">
+        #{item}
+      </foreach>
+      )
+    </if>
+  </select>
 </mapper>

+ 23 - 0
offline-module/src/main/java/com/tzld/piaoquan/offline/job/AutoReplyVideoDataJob.java

@@ -17,6 +17,8 @@ import com.tzld.piaoquan.growth.common.model.po.GhDetail;
 import com.tzld.piaoquan.growth.common.model.po.GhDetailExample;
 import com.tzld.piaoquan.growth.common.utils.DateUtil;
 import com.tzld.piaoquan.growth.common.utils.LarkRobotUtil;
+import com.tzld.piaoquan.growth.common.utils.MessageUtil;
+import com.tzld.piaoquan.growth.common.utils.page.Page;
 import com.xxl.job.core.biz.model.ReturnT;
 import com.xxl.job.core.handler.annotation.XxlJob;
 import lombok.extern.slf4j.Slf4j;
@@ -221,4 +223,25 @@ public class AutoReplyVideoDataJob {
         return columns;
     }
 
+    @XxlJob("updateRootSourceIdJob")
+    public ReturnT<String> updateRootSourceId(String param) {
+        CgiReplyBucketDataExample example = new CgiReplyBucketDataExample();
+        example.createCriteria().andRootSourceIdIsNull();
+        List<CgiReplyBucketData> cgiReplyBucketData = cgiReplyBucketDataMapper.selectByExample(example);
+        if (!CollectionUtils.isEmpty(cgiReplyBucketData)) {
+            for (CgiReplyBucketData replyBucketData : cgiReplyBucketData) {
+                String rootSourceId = MessageUtil.getRootSourceId(replyBucketData.getMiniPagePath());
+                if(StringUtils.isEmpty(rootSourceId)){
+                    continue;
+                }
+                CgiReplyBucketData updateReplyBucketData = new CgiReplyBucketData();
+                updateReplyBucketData.setId(replyBucketData.getId());
+                updateReplyBucketData.setRootSourceId(rootSourceId);
+                cgiReplyBucketDataMapper.updateByPrimaryKeySelective(updateReplyBucketData);
+            }
+        }
+        return ReturnT.SUCCESS;
+    }
+
+
 }

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

@@ -535,7 +535,7 @@ public class WeComMessageDataJob {
                 title = ToolUtils.truncateString(title, MAX_BYTES - 3) + "...";
             }
             miniprogram.put("title", title);
-            String picMediaId = messageAttachmentService.getPicMediaId(messageAttachment.getCover(), sendMessage.getCorpId());
+            String picMediaId = messageAttachmentService.getPicMediaId(messageAttachment.getCover(), sendMessage.getCorpId(), messageAttachment.getMiniprogramVideoId());
             if (StringUtils.isEmpty(picMediaId)) {
                 log.error("pushMessage getPicMediaId error cover={}", messageAttachment.getCover());
                 return false;

+ 129 - 6
offline-module/src/main/java/com/tzld/piaoquan/offline/job/WeComStaffDataJob.java

@@ -1,17 +1,20 @@
 package com.tzld.piaoquan.offline.job;
 
+import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
+import com.tzld.piaoquan.growth.common.common.enums.TimeEnum;
 import com.tzld.piaoquan.growth.common.component.HttpPoolClient;
 import com.tzld.piaoquan.growth.common.component.ProxyHttpPoolClient;
 import com.tzld.piaoquan.growth.common.dao.mapper.CorpMapper;
+import com.tzld.piaoquan.growth.common.dao.mapper.CorpStatisticsTotalMapper;
 import com.tzld.piaoquan.growth.common.dao.mapper.StaffMapper;
+import com.tzld.piaoquan.growth.common.dao.mapper.StaffStatisticsTotalMapper;
 import com.tzld.piaoquan.growth.common.model.bo.XxlJobParam;
-import com.tzld.piaoquan.growth.common.model.po.Corp;
-import com.tzld.piaoquan.growth.common.model.po.CorpExample;
-import com.tzld.piaoquan.growth.common.model.po.Staff;
-import com.tzld.piaoquan.growth.common.model.po.StaffExample;
+import com.tzld.piaoquan.growth.common.model.po.*;
 import com.tzld.piaoquan.growth.common.service.WeComAccessTokenService;
 import com.tzld.piaoquan.growth.common.service.WeComSendService;
+import com.tzld.piaoquan.growth.common.utils.DateUtil;
+import com.tzld.piaoquan.growth.common.utils.DateUtils;
 import com.tzld.piaoquan.growth.common.utils.LarkRobotUtil;
 import com.xxl.job.core.biz.model.ReturnT;
 import com.xxl.job.core.handler.annotation.XxlJob;
@@ -22,10 +25,12 @@ import org.springframework.stereotype.Component;
 import org.springframework.util.CollectionUtils;
 
 import java.io.IOException;
+import java.util.ArrayList;
 import java.util.List;
+import java.util.Map;
 import java.util.stream.Collectors;
 
-import static com.tzld.piaoquan.growth.common.common.constant.WeComConstant.GET_WE_COM_FOLLOW_USER_LIST;
+import static com.tzld.piaoquan.growth.common.common.constant.WeComConstant.*;
 
 @Slf4j
 @Component
@@ -47,7 +52,10 @@ public class WeComStaffDataJob {
     private CorpMapper corpMapper;
 
     @Autowired
-    private WeComSendService weComSendService;
+    private StaffStatisticsTotalMapper staffStatisticsTotalMapper;
+
+    @Autowired
+    private CorpStatisticsTotalMapper corpStatisticsTotalMapper;
 
     @XxlJob("insertStaffJob")
     public ReturnT<String> insertStaff(String param) {
@@ -107,4 +115,119 @@ public class WeComStaffDataJob {
         return null;
     }
 
+    @XxlJob("statisticsTotalJob")
+    public ReturnT<String> statisticsTotal(String param) throws IOException {
+        String date;
+        if (StringUtils.isNotEmpty(param)) {
+            date = param;
+        } else {
+            date = DateUtil.getBeforeDayDateString1();
+        }
+        long startTime = DateUtil.dateStrToTimestamp(date, "yyyy-MM-dd");
+        long endTime = startTime + TimeEnum.DAY.getTime() - 1;
+        StaffExample staffExample = new StaffExample();
+        staffExample.createCriteria().andIsDeleteEqualTo(0);
+        List<Staff> staffs = staffMapper.selectByExample(staffExample);
+        for (Staff staff : staffs) {
+            statisticsStaffTotal(staff, startTime, endTime, date);
+        }
+        StaffStatisticsTotalExample staffStatisticsTotalExample = new StaffStatisticsTotalExample();
+        staffStatisticsTotalExample.createCriteria().andDateEqualTo(date);
+        List<StaffStatisticsTotal> staffStatisticsTotals = staffStatisticsTotalMapper.selectByExample(staffStatisticsTotalExample);
+        if (!CollectionUtils.isEmpty(staffStatisticsTotals)) {
+            // 2. 分组并多字段求和(不使用构造方法)
+            List<CorpStatisticsTotal> results = processStaffStatistics(staffStatisticsTotals);
+            for (CorpStatisticsTotal corpStatisticsTotal : results) {
+                corpStatisticsTotal.setDate(date);
+                try {
+                    corpStatisticsTotalMapper.insertSelective(corpStatisticsTotal);
+                } catch (Exception e) {
+                    log.error("insert corpStatisticsTotal error", e);
+                }
+            }
+        }
+
+
+        return ReturnT.SUCCESS;
+    }
+
+    public List<CorpStatisticsTotal> processStaffStatistics(List<StaffStatisticsTotal> staffStatisticsTotals) {
+        // 使用 toMap 收集器高效分组和聚合
+        Map<Long, CorpStatisticsTotal> resultMap = staffStatisticsTotals.stream()
+                .collect(Collectors.toMap(
+                        StaffStatisticsTotal::getCorpId,
+                        this::convertToCorpStats,  // 方法引用转换
+                        this::mergeCorpStats       // 方法引用合并
+                ));
+
+        return new ArrayList<>(resultMap.values());
+    }
+
+    private CorpStatisticsTotal mergeCorpStats(CorpStatisticsTotal existing, CorpStatisticsTotal newcomer) {
+        existing.setChatCnt(existing.getChatCnt() + newcomer.getChatCnt());
+        existing.setMessageCnt(existing.getMessageCnt() + newcomer.getMessageCnt());
+        existing.setNegativeFeedbackCnt(existing.getNegativeFeedbackCnt() + newcomer.getNegativeFeedbackCnt());
+        existing.setNewApplyCnt(existing.getNewApplyCnt() + newcomer.getNewApplyCnt());
+        existing.setNewContactCnt(existing.getNewContactCnt() + newcomer.getNewContactCnt());
+        return existing;
+    }
+
+    // 转换方法:将 Staff 对象转换为 Corp 对象
+    private CorpStatisticsTotal convertToCorpStats(StaffStatisticsTotal staff) {
+        CorpStatisticsTotal corp = new CorpStatisticsTotal();
+        corp.setCorpId(staff.getCorpId());
+        corp.setChatCnt(staff.getChatCnt());
+        corp.setMessageCnt(staff.getMessageCnt());
+        corp.setNegativeFeedbackCnt(staff.getNegativeFeedbackCnt());
+        corp.setNewApplyCnt(staff.getNewApplyCnt());
+        corp.setNewContactCnt(staff.getNewContactCnt());
+        return corp;
+    }
+
+    private void statisticsStaffTotal(Staff staff, long startTime, long endTime, String date) throws IOException {
+        Long corpId = staff.getCorpId();
+        StaffStatisticsTotalExample example = new StaffStatisticsTotalExample();
+        example.createCriteria().andCorpIdEqualTo(corpId).andStaffIdEqualTo(staff.getId()).andDateEqualTo(date);
+        long l = staffStatisticsTotalMapper.countByExample(example);
+        if (l > 0) {
+            return;
+        }
+        String accessToken = weComAccessTokenService.getWeComAccessToken(corpId);
+        String url = POST_WE_COM_USER_BEHAVIOR_DATA
+                + "?access_token=" + accessToken;
+        JSONObject params = new JSONObject();
+        params.put("start_time", startTime);
+        params.put("end_time", endTime);
+        JSONArray userIds = new JSONArray();
+        userIds.add(staff.getCarrierId());
+        params.put("userid", userIds);
+        String res;
+        if (staff.getCorpId() == 1L) {
+            res = httpPoolClient.post(url, params.toJSONString());
+        } else {
+            res = proxyHttpPoolClient.post(url, params.toJSONString());
+        }
+        if (StringUtils.isNotEmpty(res)) {
+            JSONObject jsonObject = JSONObject.parseObject(res);
+            Integer errcode = jsonObject.getInteger("errcode");
+            if (errcode == 0) {
+                JSONArray jsonArray = jsonObject.getJSONArray("behavior_data");
+                if (!jsonArray.isEmpty()) {
+                    JSONObject data = jsonArray.getJSONObject(0);
+                    StaffStatisticsTotal statisticsTotal = new StaffStatisticsTotal();
+                    statisticsTotal.setStatTime(data.getLong("stat_time"));
+                    statisticsTotal.setChatCnt(data.getInteger("chat_cnt"));
+                    statisticsTotal.setMessageCnt(data.getInteger("message_cnt"));
+                    statisticsTotal.setNegativeFeedbackCnt(data.getInteger("negative_feedback_cnt"));
+                    statisticsTotal.setNewApplyCnt(data.getInteger("new_apply_cnt"));
+                    statisticsTotal.setNewContactCnt(data.getInteger("new_contact_cnt"));
+                    statisticsTotal.setDate(date);
+                    statisticsTotal.setCorpId(corpId);
+                    statisticsTotal.setStaffId(staff.getId());
+                    staffStatisticsTotalMapper.insertSelective(statisticsTotal);
+                }
+            }
+        }
+    }
+
 }

+ 11 - 7
offline-module/src/main/java/com/tzld/piaoquan/offline/job/WeComUserDataJob.java

@@ -18,6 +18,7 @@ import com.xxl.job.core.handler.annotation.XxlJob;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.stereotype.Component;
 import org.springframework.util.CollectionUtils;
 
@@ -28,6 +29,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.stream.Collectors;
 
+import static com.tzld.piaoquan.growth.common.common.constant.RedisConstant.WE_COM_USER_AB_TYPE;
 import static com.tzld.piaoquan.growth.common.common.constant.WeComConstant.*;
 
 @Slf4j
@@ -66,13 +68,7 @@ public class WeComUserDataJob {
     private TagMapper tagMapper;
 
     @Autowired
-    private UserWithTagMapper userWithTagMapper;
-
-    @Autowired
-    private WeComStaffService weComStaffService;
-
-    @Autowired
-    private WeComSendService weComSendService;
+    private RedisTemplate<String, Object> redisTemplate;
 
 
     @XxlJob("updateStaffWithUserJob")
@@ -145,6 +141,10 @@ public class WeComUserDataJob {
                     weComUser.setCreatedAt(createAt);
                     Long userId;
                     if (CollectionUtils.isEmpty(weComUserList)) {
+                        Long increment = redisTemplate.opsForValue().increment(WE_COM_USER_AB_TYPE);
+                        if (increment != null) {
+                            weComUser.setAbtype("ab" + increment % 10);
+                        }
                         weComUserMapper.insertSelective(weComUser);
                         userId = weComUser.getId();
                     } else {
@@ -510,6 +510,10 @@ public class WeComUserDataJob {
             weComUser.setGender(gender);
             weComUser.setAvatar(avatar);
             weComUser.setCreatedAt(createAt);
+            Long increment = redisTemplate.opsForValue().increment(WE_COM_USER_AB_TYPE);
+            if (increment != null) {
+                weComUser.setAbtype("ab" + increment % 10);
+            }
             weComUserMapper.insertSelective(weComUser);
             userId = weComUser.getId();
             StaffWithUser staffWithUser = new StaffWithUser();