Переглянути джерело

增加分性别发送消息

xueyiming 3 місяців тому
батько
коміт
f63cc5d677

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

@@ -51,11 +51,11 @@
         </javaClientGenerator>
 
 <!--        <table tableName="we_com_alert_message" domainObjectName="AlertMessage" alias=""/>-->
-        <table tableName="gh_detail" domainObjectName="GhDetail" alias=""/>
+<!--        <table tableName="gh_detail" domainObjectName="GhDetail" alias=""/>-->
 <!--        <table tableName="we_com_guarantees_video" domainObjectName="GuaranteesVideo" alias=""/>-->
 <!--        <table tableName="we_com_staff" domainObjectName="Staff" alias=""/>-->
 <!--        <table tableName="we_com_message_attachment" domainObjectName="MessageAttachment" alias=""/>-->
-<!--        <table tableName="we_com_special_pre_send_message" domainObjectName="PreSpecialSendMessage" alias=""/>-->
+        <table tableName="we_com_special_pre_send_message" domainObjectName="PreSpecialSendMessage" alias=""/>
 <!--        <table tableName="we_com_send_msg_result" domainObjectName="SendMsgResult" alias=""/>-->
 <!--        <table tableName="we_com_corp" domainObjectName="Corp" alias=""/>-->
 

+ 20 - 0
common-module/src/main/java/com/tzld/piaoquan/growth/common/common/enums/PreSpecialStatusEnum.java

@@ -0,0 +1,20 @@
+package com.tzld.piaoquan.growth.common.common.enums;
+
+
+import lombok.Getter;
+
+@Getter
+public enum PreSpecialStatusEnum {
+
+    DEFAULT(0, "默认"),
+    TAG(1, "标签"),
+    GENDER(2, "性别");
+
+    private final Integer status;
+    private final String desc;
+
+    PreSpecialStatusEnum(Integer status, String desc) {
+        this.status = status;
+        this.desc = desc;
+    }
+}

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

@@ -45,4 +45,9 @@ public interface WeComUserMapper {
 
     List<WeComUser> selectByTagUserList(@Param("tagId") Long tagId);
 
+    List<WeComUser> selectByGenderUserList(@Param("staffId") Long staffId,
+                                           @Param("groupMsgDisabled") byte groupMsgDisabled,
+                                           @Param("filterTagIdList") List<Long> filterTagIdList,
+                                           @Param("gender") Integer gender);
+
 }

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

@@ -9,6 +9,8 @@ public class PreSpecialSendMessage {
 
     private Long staffId;
 
+    private Integer status;
+
     private String content;
 
     private String attachmentIds;
@@ -21,6 +23,8 @@ public class PreSpecialSendMessage {
 
     private Long tagId;
 
+    private Integer gender;
+
     private Date createTime;
 
     private Date updateTime;
@@ -49,6 +53,14 @@ public class PreSpecialSendMessage {
         this.staffId = staffId;
     }
 
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
     public String getContent() {
         return content;
     }
@@ -97,6 +109,14 @@ public class PreSpecialSendMessage {
         this.tagId = tagId;
     }
 
+    public Integer getGender() {
+        return gender;
+    }
+
+    public void setGender(Integer gender) {
+        this.gender = gender;
+    }
+
     public Date getCreateTime() {
         return createTime;
     }
@@ -122,12 +142,14 @@ public class PreSpecialSendMessage {
         sb.append(", id=").append(id);
         sb.append(", preSendDate=").append(preSendDate);
         sb.append(", staffId=").append(staffId);
+        sb.append(", status=").append(status);
         sb.append(", content=").append(content);
         sb.append(", attachmentIds=").append(attachmentIds);
         sb.append(", groupMsgDisabled=").append(groupMsgDisabled);
         sb.append(", pageNum=").append(pageNum);
         sb.append(", pageSize=").append(pageSize);
         sb.append(", tagId=").append(tagId);
+        sb.append(", gender=").append(gender);
         sb.append(", createTime=").append(createTime);
         sb.append(", updateTime=").append(updateTime);
         sb.append("]");

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

@@ -307,6 +307,66 @@ public class PreSpecialSendMessageExample {
             return (Criteria) this;
         }
 
+        public Criteria andStatusIsNull() {
+            addCriterion("`status` is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNotNull() {
+            addCriterion("`status` is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusEqualTo(Integer value) {
+            addCriterion("`status` =", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotEqualTo(Integer value) {
+            addCriterion("`status` <>", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThan(Integer value) {
+            addCriterion("`status` >", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
+            addCriterion("`status` >=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThan(Integer value) {
+            addCriterion("`status` <", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThanOrEqualTo(Integer value) {
+            addCriterion("`status` <=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIn(List<Integer> values) {
+            addCriterion("`status` in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotIn(List<Integer> values) {
+            addCriterion("`status` not in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusBetween(Integer value1, Integer value2) {
+            addCriterion("`status` between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
+            addCriterion("`status` not between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
         public Criteria andContentIsNull() {
             addCriterion("content is null");
             return (Criteria) this;
@@ -687,6 +747,66 @@ public class PreSpecialSendMessageExample {
             return (Criteria) this;
         }
 
+        public Criteria andGenderIsNull() {
+            addCriterion("gender is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andGenderIsNotNull() {
+            addCriterion("gender is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andGenderEqualTo(Integer value) {
+            addCriterion("gender =", value, "gender");
+            return (Criteria) this;
+        }
+
+        public Criteria andGenderNotEqualTo(Integer value) {
+            addCriterion("gender <>", value, "gender");
+            return (Criteria) this;
+        }
+
+        public Criteria andGenderGreaterThan(Integer value) {
+            addCriterion("gender >", value, "gender");
+            return (Criteria) this;
+        }
+
+        public Criteria andGenderGreaterThanOrEqualTo(Integer value) {
+            addCriterion("gender >=", value, "gender");
+            return (Criteria) this;
+        }
+
+        public Criteria andGenderLessThan(Integer value) {
+            addCriterion("gender <", value, "gender");
+            return (Criteria) this;
+        }
+
+        public Criteria andGenderLessThanOrEqualTo(Integer value) {
+            addCriterion("gender <=", value, "gender");
+            return (Criteria) this;
+        }
+
+        public Criteria andGenderIn(List<Integer> values) {
+            addCriterion("gender in", values, "gender");
+            return (Criteria) this;
+        }
+
+        public Criteria andGenderNotIn(List<Integer> values) {
+            addCriterion("gender not in", values, "gender");
+            return (Criteria) this;
+        }
+
+        public Criteria andGenderBetween(Integer value1, Integer value2) {
+            addCriterion("gender between", value1, value2, "gender");
+            return (Criteria) this;
+        }
+
+        public Criteria andGenderNotBetween(Integer value1, Integer value2) {
+            addCriterion("gender not between", value1, value2, "gender");
+            return (Criteria) this;
+        }
+
         public Criteria andCreateTimeIsNull() {
             addCriterion("create_time is null");
             return (Criteria) this;

+ 40 - 8
common-module/src/main/resources/mapper/PreSpecialSendMessageMapper.xml

@@ -5,12 +5,14 @@
     <id column="id" jdbcType="BIGINT" property="id" />
     <result column="pre_send_date" jdbcType="VARCHAR" property="preSendDate" />
     <result column="staff_id" jdbcType="BIGINT" property="staffId" />
+    <result column="status" jdbcType="INTEGER" property="status" />
     <result column="content" jdbcType="VARCHAR" property="content" />
     <result column="attachment_ids" jdbcType="VARCHAR" property="attachmentIds" />
     <result column="group_msg_disabled" jdbcType="INTEGER" property="groupMsgDisabled" />
     <result column="page_num" jdbcType="INTEGER" property="pageNum" />
     <result column="page_size" jdbcType="INTEGER" property="pageSize" />
     <result column="tag_id" jdbcType="BIGINT" property="tagId" />
+    <result column="gender" jdbcType="INTEGER" property="gender" />
     <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
     <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
   </resultMap>
@@ -73,8 +75,8 @@
     </where>
   </sql>
   <sql id="Base_Column_List">
-    id, pre_send_date, staff_id, content, attachment_ids, group_msg_disabled, page_num, 
-    page_size, tag_id, create_time, update_time
+    id, pre_send_date, staff_id, `status`, content, attachment_ids, group_msg_disabled, 
+    page_num, page_size, tag_id, gender, create_time, update_time
   </sql>
   <select id="selectByExample" parameterType="com.tzld.piaoquan.growth.common.model.po.PreSpecialSendMessageExample" resultMap="BaseResultMap">
     select
@@ -111,13 +113,15 @@
   </delete>
   <insert id="insert" parameterType="com.tzld.piaoquan.growth.common.model.po.PreSpecialSendMessage">
     insert into we_com_special_pre_send_message (id, pre_send_date, staff_id, 
-      content, attachment_ids, group_msg_disabled, 
-      page_num, page_size, tag_id, 
-      create_time, update_time)
+      `status`, content, attachment_ids, 
+      group_msg_disabled, page_num, page_size, 
+      tag_id, gender, create_time, 
+      update_time)
     values (#{id,jdbcType=BIGINT}, #{preSendDate,jdbcType=VARCHAR}, #{staffId,jdbcType=BIGINT}, 
-      #{content,jdbcType=VARCHAR}, #{attachmentIds,jdbcType=VARCHAR}, #{groupMsgDisabled,jdbcType=INTEGER}, 
-      #{pageNum,jdbcType=INTEGER}, #{pageSize,jdbcType=INTEGER}, #{tagId,jdbcType=BIGINT}, 
-      #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
+      #{status,jdbcType=INTEGER}, #{content,jdbcType=VARCHAR}, #{attachmentIds,jdbcType=VARCHAR}, 
+      #{groupMsgDisabled,jdbcType=INTEGER}, #{pageNum,jdbcType=INTEGER}, #{pageSize,jdbcType=INTEGER}, 
+      #{tagId,jdbcType=BIGINT}, #{gender,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{updateTime,jdbcType=TIMESTAMP})
   </insert>
   <insert id="insertSelective" parameterType="com.tzld.piaoquan.growth.common.model.po.PreSpecialSendMessage">
     insert into we_com_special_pre_send_message
@@ -131,6 +135,9 @@
       <if test="staffId != null">
         staff_id,
       </if>
+      <if test="status != null">
+        `status`,
+      </if>
       <if test="content != null">
         content,
       </if>
@@ -149,6 +156,9 @@
       <if test="tagId != null">
         tag_id,
       </if>
+      <if test="gender != null">
+        gender,
+      </if>
       <if test="createTime != null">
         create_time,
       </if>
@@ -166,6 +176,9 @@
       <if test="staffId != null">
         #{staffId,jdbcType=BIGINT},
       </if>
+      <if test="status != null">
+        #{status,jdbcType=INTEGER},
+      </if>
       <if test="content != null">
         #{content,jdbcType=VARCHAR},
       </if>
@@ -184,6 +197,9 @@
       <if test="tagId != null">
         #{tagId,jdbcType=BIGINT},
       </if>
+      <if test="gender != null">
+        #{gender,jdbcType=INTEGER},
+      </if>
       <if test="createTime != null">
         #{createTime,jdbcType=TIMESTAMP},
       </if>
@@ -210,6 +226,9 @@
       <if test="record.staffId != null">
         staff_id = #{record.staffId,jdbcType=BIGINT},
       </if>
+      <if test="record.status != null">
+        `status` = #{record.status,jdbcType=INTEGER},
+      </if>
       <if test="record.content != null">
         content = #{record.content,jdbcType=VARCHAR},
       </if>
@@ -228,6 +247,9 @@
       <if test="record.tagId != null">
         tag_id = #{record.tagId,jdbcType=BIGINT},
       </if>
+      <if test="record.gender != null">
+        gender = #{record.gender,jdbcType=INTEGER},
+      </if>
       <if test="record.createTime != null">
         create_time = #{record.createTime,jdbcType=TIMESTAMP},
       </if>
@@ -244,12 +266,14 @@
     set id = #{record.id,jdbcType=BIGINT},
       pre_send_date = #{record.preSendDate,jdbcType=VARCHAR},
       staff_id = #{record.staffId,jdbcType=BIGINT},
+      `status` = #{record.status,jdbcType=INTEGER},
       content = #{record.content,jdbcType=VARCHAR},
       attachment_ids = #{record.attachmentIds,jdbcType=VARCHAR},
       group_msg_disabled = #{record.groupMsgDisabled,jdbcType=INTEGER},
       page_num = #{record.pageNum,jdbcType=INTEGER},
       page_size = #{record.pageSize,jdbcType=INTEGER},
       tag_id = #{record.tagId,jdbcType=BIGINT},
+      gender = #{record.gender,jdbcType=INTEGER},
       create_time = #{record.createTime,jdbcType=TIMESTAMP},
       update_time = #{record.updateTime,jdbcType=TIMESTAMP}
     <if test="_parameter != null">
@@ -265,6 +289,9 @@
       <if test="staffId != null">
         staff_id = #{staffId,jdbcType=BIGINT},
       </if>
+      <if test="status != null">
+        `status` = #{status,jdbcType=INTEGER},
+      </if>
       <if test="content != null">
         content = #{content,jdbcType=VARCHAR},
       </if>
@@ -283,6 +310,9 @@
       <if test="tagId != null">
         tag_id = #{tagId,jdbcType=BIGINT},
       </if>
+      <if test="gender != null">
+        gender = #{gender,jdbcType=INTEGER},
+      </if>
       <if test="createTime != null">
         create_time = #{createTime,jdbcType=TIMESTAMP},
       </if>
@@ -296,12 +326,14 @@
     update we_com_special_pre_send_message
     set pre_send_date = #{preSendDate,jdbcType=VARCHAR},
       staff_id = #{staffId,jdbcType=BIGINT},
+      `status` = #{status,jdbcType=INTEGER},
       content = #{content,jdbcType=VARCHAR},
       attachment_ids = #{attachmentIds,jdbcType=VARCHAR},
       group_msg_disabled = #{groupMsgDisabled,jdbcType=INTEGER},
       page_num = #{pageNum,jdbcType=INTEGER},
       page_size = #{pageSize,jdbcType=INTEGER},
       tag_id = #{tagId,jdbcType=BIGINT},
+      gender = #{gender,jdbcType=INTEGER},
       create_time = #{createTime,jdbcType=TIMESTAMP},
       update_time = #{updateTime,jdbcType=TIMESTAMP}
     where id = #{id,jdbcType=BIGINT}

+ 22 - 0
common-module/src/main/resources/mapper/WeComUserMapper.xml

@@ -473,4 +473,26 @@
                  join we_com_user_with_tag t2 on t1.id = t2.user_id
         where t2.tag_id = #{tagId,jdbcType=BIGINT}
     </select>
+
+    <select id="selectByGenderUserList" resultType="com.tzld.piaoquan.growth.common.model.po.WeComUser">
+        select t1.*
+        from we_com_user t1
+        left join we_com_staff_with_user t2 on t1.id = t2.user_id
+        where t1.group_msg_disabled = #{groupMsgDisabled,jdbcType=TINYINT}
+        and t2.staff_id = #{staffId,jdbcType=BIGINT}
+        and t2.is_delete = 0
+        and t1.gender = #{gender,jdbcType=INTEGER}
+        <if test="filterTagIdList != null and filterTagIdList.size() > 0">
+            and t1.id not in (
+            select t2.id
+            from we_com_user_with_tag t1
+            join we_com_user t2 on t1.user_id = t2.id
+            where t1.tag_id in
+            <foreach item="item" index="index" collection="filterTagIdList"
+                     open="(" separator="," close=")">
+                #{item}
+            </foreach>
+            )
+        </if>
+    </select>
 </mapper>

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

@@ -244,7 +244,7 @@ public class WeComMessageDataJob {
         for (Corp corp : corps) {
             WeComUserExample weComUserExample = new WeComUserExample();
             WeComUserExample.Criteria criteria = weComUserExample.createCriteria().andExternalUserIdIsNotNull().andCorpIdEqualTo(corp.getId())
-                    .andGroupMsgDisabledNotEqualTo((byte) 2);
+                    .andGroupMsgDisabledEqualTo((byte) 0);
             if (xxlJobParam.getUserId() != null) {
                 criteria.andIdEqualTo(xxlJobParam.getUserId());
             }

+ 42 - 11
offline-module/src/main/java/com/tzld/piaoquan/offline/job/WeComSpecialDataJob.java

@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.google.common.collect.Lists;
 import com.tzld.piaoquan.growth.common.common.constant.MessageConstant;
 import com.tzld.piaoquan.growth.common.common.enums.MessageAttachmentTypeEnum;
+import com.tzld.piaoquan.growth.common.common.enums.PreSpecialStatusEnum;
 import com.tzld.piaoquan.growth.common.dao.mapper.PreSpecialSendMessageMapper;
 import com.tzld.piaoquan.growth.common.dao.mapper.SpecialSendMessageMapper;
 import com.tzld.piaoquan.growth.common.dao.mapper.StaffMapper;
@@ -63,30 +64,43 @@ public class WeComSpecialDataJob {
         PreSpecialSendMessageExample example = new PreSpecialSendMessageExample();
         example.createCriteria().andPreSendDateEqualTo(thatDayDateString);
         List<PreSpecialSendMessage> preSpecialSendMessages = preSpecialSendMessageMapper.selectByExample(example);
-        List<PreSpecialSendMessage> notHasTagPreSpecialSendMessage = preSpecialSendMessages.stream().filter(e -> e.getTagId() == null).collect(Collectors.toList());
-        if (!CollectionUtils.isEmpty(notHasTagPreSpecialSendMessage)) {
-            for (PreSpecialSendMessage preSpecialSendMessage : notHasTagPreSpecialSendMessage) {
-                notHasTagSpecialAssembleSendMessage(preSpecialSendMessage.getId(), preSpecialSendMessage.getStaffId(),
+        List<PreSpecialSendMessage> defaultPreSpecialSendMessage = preSpecialSendMessages.stream()
+                .filter(e -> Objects.equals(e.getStatus(), PreSpecialStatusEnum.DEFAULT.getStatus())).collect(Collectors.toList());
+        if (!CollectionUtils.isEmpty(defaultPreSpecialSendMessage)) {
+            for (PreSpecialSendMessage preSpecialSendMessage : defaultPreSpecialSendMessage) {
+                defaultSpecialAssembleSendMessage(preSpecialSendMessage.getId(), preSpecialSendMessage.getStaffId(),
                         preSpecialSendMessage.getPageNum(), preSpecialSendMessage.getPageSize(),
                         preSpecialSendMessage.getGroupMsgDisabled().byteValue(), preSpecialSendMessage.getAttachmentIds(),
                         preSpecialSendMessage.getContent(), preSpecialSendMessage.getPreSendDate());
             }
         }
-        List<PreSpecialSendMessage> hasTagPreSpecialSendMessage = preSpecialSendMessages.stream().filter(e -> e.getTagId() != null).collect(Collectors.toList());
-        if (!CollectionUtils.isEmpty(hasTagPreSpecialSendMessage)) {
-            for (PreSpecialSendMessage preSpecialSendMessage : hasTagPreSpecialSendMessage) {
-                hasTagSpecialAssembleSendMessage(preSpecialSendMessage.getId(), preSpecialSendMessage.getStaffId(), preSpecialSendMessage.getAttachmentIds(),
+        List<PreSpecialSendMessage> tagPreSpecialSendMessage = preSpecialSendMessages.stream()
+                .filter(e -> Objects.equals(e.getStatus(), PreSpecialStatusEnum.TAG.getStatus())).collect(Collectors.toList());
+        if (!CollectionUtils.isEmpty(tagPreSpecialSendMessage)) {
+            for (PreSpecialSendMessage preSpecialSendMessage : tagPreSpecialSendMessage) {
+                tagSpecialAssembleSendMessage(preSpecialSendMessage.getId(), preSpecialSendMessage.getStaffId(), preSpecialSendMessage.getAttachmentIds(),
                         preSpecialSendMessage.getContent(), preSpecialSendMessage.getPreSendDate(), preSpecialSendMessage.getTagId());
             }
         }
+
+        List<PreSpecialSendMessage> genderPreSpecialSendMessage = preSpecialSendMessages.stream()
+                .filter(e -> Objects.equals(e.getStatus(), PreSpecialStatusEnum.GENDER.getStatus())).collect(Collectors.toList());
+        if (!CollectionUtils.isEmpty(genderPreSpecialSendMessage)) {
+            for (PreSpecialSendMessage preSpecialSendMessage : genderPreSpecialSendMessage) {
+                genderSpecialAssembleSendMessage(preSpecialSendMessage.getId(), preSpecialSendMessage.getStaffId(),
+                        preSpecialSendMessage.getGroupMsgDisabled().byteValue(), preSpecialSendMessage.getAttachmentIds(),
+                        preSpecialSendMessage.getContent(), preSpecialSendMessage.getPreSendDate(), preSpecialSendMessage.getGender());
+            }
+        }
+
         //发送拼装好的消息
         sendSpecialPushMessage();
         return ReturnT.SUCCESS;
     }
 
 
-    public void notHasTagSpecialAssembleSendMessage(Long preId, Long staffId, Integer pageNum, Integer pageSize,
-                                                    byte groupMsgDisabled, String attachmentIds, String content, String date) {
+    public void defaultSpecialAssembleSendMessage(Long preId, Long staffId, Integer pageNum, Integer pageSize,
+                                                  byte groupMsgDisabled, String attachmentIds, String content, String date) {
         List<Long> filterTagId = weComUserService.getFilterTagId();
         List<WeComUser> weComUserList = weComUserMapper.selectUserList(staffId, groupMsgDisabled, filterTagId, (pageNum - 1) * pageSize, pageSize);
         //落库逻辑
@@ -102,7 +116,7 @@ public class WeComSpecialDataJob {
         }
     }
 
-    public void hasTagSpecialAssembleSendMessage(Long preId, Long staffId, String attachmentIds, String content, String date, Long tagId) {
+    public void tagSpecialAssembleSendMessage(Long preId, Long staffId, String attachmentIds, String content, String date, Long tagId) {
         List<WeComUser> weComUsers = weComUserMapper.selectByTagUserList(tagId);
         if (CollectionUtils.isEmpty(weComUsers)) {
             return;
@@ -129,6 +143,23 @@ public class WeComSpecialDataJob {
         }
     }
 
+    public void genderSpecialAssembleSendMessage(Long preId, Long staffId, byte groupMsgDisabled, String attachmentIds,
+                                                 String content, String date, Integer gender) {
+        List<Long> filterTagId = weComUserService.getFilterTagId();
+        List<WeComUser> weComUserList = weComUserMapper.selectByGenderUserList(staffId, groupMsgDisabled, filterTagId, gender);
+        //落库逻辑
+        for (WeComUser weComUser : weComUserList) {
+            SpecialSendMessage specialSendMessage = new SpecialSendMessage();
+            specialSendMessage.setStaffId(staffId);
+            specialSendMessage.setUserId(weComUser.getId());
+            specialSendMessage.setGroup(preId.intValue());
+            specialSendMessage.setAttachmentIds(attachmentIds);
+            specialSendMessage.setContent(content);
+            specialSendMessage.setPreSendDate(date);
+            specialSendMessageMapper.insertSelective(specialSendMessage);
+        }
+    }
+
 
     public void sendSpecialPushMessage() {
         String thatDayDateString = DateUtil.getThatDayDateString();