Browse Source

Merge branch 'dev-xym-total' of Server/growth-manager into master

xueyiming 3 weeks ago
parent
commit
b3dc87b6eb

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

@@ -59,7 +59,10 @@
 <!--        <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_staff_with_user" domainObjectName="StaffWithUser" 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=""/>
+
 
 
 

+ 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";
 }

+ 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);
+}

+ 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);
+        }
+    }
+}

+ 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>

+ 119 - 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,109 @@ 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);
+                corpStatisticsTotalMapper.insertSelective(corpStatisticsTotal);
+            }
+        }
+
+
+        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();
+        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);
+                }
+            }
+        }
+    }
+
 }