فهرست منبع

保留部分用户不发送

xueyiming 4 ماه پیش
والد
کامیت
ebc2afb256

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

@@ -35,28 +35,28 @@
             <property name="forceBigDecimals" value="false"/>
             <property name="forceBigDecimals" value="false"/>
         </javaTypeResolver>
         </javaTypeResolver>
 
 
-        <javaModelGenerator targetPackage="com.tzld.piaoquan.api.model.po" targetProject="/Users/shimeng/Desktop/project/growth-manager/api-module/src/main/java">
+        <javaModelGenerator targetPackage="com.tzld.piaoquan.growth.common.model.po" targetProject="/Users/shimeng/Desktop/project/growth-manager/common-module/src/main/java">
             <property name="constructorBased" value="false"/>
             <property name="constructorBased" value="false"/>
             <property name="enableSubPackages" value="true"/>
             <property name="enableSubPackages" value="true"/>
             <property name="immutable" value="false"/>
             <property name="immutable" value="false"/>
         </javaModelGenerator>
         </javaModelGenerator>
 
 
-        <sqlMapGenerator targetPackage="mapper" targetProject="/Users/shimeng/Desktop/project/growth-manager/api-module/src/main/resources">
+        <sqlMapGenerator targetPackage="mapper" targetProject="/Users/shimeng/Desktop/project/growth-manager/common-module/src/main/resources">
             <property name="enableSubPackages" value="true"/>
             <property name="enableSubPackages" value="true"/>
         </sqlMapGenerator>
         </sqlMapGenerator>
 
 
-        <javaClientGenerator targetPackage="com.tzld.piaoquan.api.dao.mapper" type="XMLMAPPER"
-                             targetProject="/Users/shimeng/Desktop/project/growth-manager/api-module/src/main/java">
+        <javaClientGenerator targetPackage="com.tzld.piaoquan.growth.common.dao.mapper" type="XMLMAPPER"
+                             targetProject="/Users/shimeng/Desktop/project/growth-manager/common-module/src/main/java">
             <property name="enableSubPackages" value="true"/>
             <property name="enableSubPackages" value="true"/>
         </javaClientGenerator>
         </javaClientGenerator>
 
 
 <!--        <table tableName="we_com_alert_message" domainObjectName="AlertMessage" alias=""/>-->
 <!--        <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_guarantees_video" domainObjectName="GuaranteesVideo" alias=""/>-->
 <!--        <table tableName="we_com_staff" domainObjectName="Staff" alias=""/>-->
 <!--        <table tableName="we_com_staff" domainObjectName="Staff" alias=""/>-->
 <!--        <table tableName="we_com_staff_with_user" domainObjectName="StaffWithUser" alias=""/>-->
 <!--        <table tableName="we_com_staff_with_user" domainObjectName="StaffWithUser" alias=""/>-->
 <!--        <table tableName="we_com_send_message" domainObjectName="SendMessage" alias=""/>-->
 <!--        <table tableName="we_com_send_message" domainObjectName="SendMessage" alias=""/>-->
-<!--        <table tableName="we_com_user" domainObjectName="WeComUser" alias=""/>-->
+        <table tableName="we_com_user" domainObjectName="WeComUser" alias=""/>
 <!--        <table tableName="we_com_corp" domainObjectName="Corp" alias=""/>-->
 <!--        <table tableName="we_com_corp" domainObjectName="Corp" alias=""/>-->
 
 
     </context>
     </context>

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

@@ -32,8 +32,4 @@ public interface WeComUserMapper {
     int updateByPrimaryKeySelective(WeComUser record);
     int updateByPrimaryKeySelective(WeComUser record);
 
 
     int updateByPrimaryKey(WeComUser record);
     int updateByPrimaryKey(WeComUser record);
-
-    Long selectIdByExternalUserId(String externalUserId);
-
-    void insertList(@Param("list") List<WeComUser> list);
 }
 }

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

@@ -23,6 +23,8 @@ public class WeComUser {
 
 
     private Integer isDelete;
     private Integer isDelete;
 
 
+    private Byte groupMsgDisabled;
+
     private Long createdAt;
     private Long createdAt;
 
 
     private Long updatedAt;
     private Long updatedAt;
@@ -113,6 +115,14 @@ public class WeComUser {
         this.isDelete = isDelete;
         this.isDelete = isDelete;
     }
     }
 
 
+    public Byte getGroupMsgDisabled() {
+        return groupMsgDisabled;
+    }
+
+    public void setGroupMsgDisabled(Byte groupMsgDisabled) {
+        this.groupMsgDisabled = groupMsgDisabled;
+    }
+
     public Long getCreatedAt() {
     public Long getCreatedAt() {
         return createdAt;
         return createdAt;
     }
     }
@@ -169,6 +179,7 @@ public class WeComUser {
         sb.append(", avatar=").append(avatar);
         sb.append(", avatar=").append(avatar);
         sb.append(", gender=").append(gender);
         sb.append(", gender=").append(gender);
         sb.append(", isDelete=").append(isDelete);
         sb.append(", isDelete=").append(isDelete);
+        sb.append(", groupMsgDisabled=").append(groupMsgDisabled);
         sb.append(", createdAt=").append(createdAt);
         sb.append(", createdAt=").append(createdAt);
         sb.append(", updatedAt=").append(updatedAt);
         sb.append(", updatedAt=").append(updatedAt);
         sb.append(", deletedAt=").append(deletedAt);
         sb.append(", deletedAt=").append(deletedAt);

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

@@ -767,6 +767,66 @@ public class WeComUserExample {
             return (Criteria) this;
             return (Criteria) this;
         }
         }
 
 
+        public Criteria andGroupMsgDisabledIsNull() {
+            addCriterion("group_msg_disabled is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andGroupMsgDisabledIsNotNull() {
+            addCriterion("group_msg_disabled is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andGroupMsgDisabledEqualTo(Byte value) {
+            addCriterion("group_msg_disabled =", value, "groupMsgDisabled");
+            return (Criteria) this;
+        }
+
+        public Criteria andGroupMsgDisabledNotEqualTo(Byte value) {
+            addCriterion("group_msg_disabled <>", value, "groupMsgDisabled");
+            return (Criteria) this;
+        }
+
+        public Criteria andGroupMsgDisabledGreaterThan(Byte value) {
+            addCriterion("group_msg_disabled >", value, "groupMsgDisabled");
+            return (Criteria) this;
+        }
+
+        public Criteria andGroupMsgDisabledGreaterThanOrEqualTo(Byte value) {
+            addCriterion("group_msg_disabled >=", value, "groupMsgDisabled");
+            return (Criteria) this;
+        }
+
+        public Criteria andGroupMsgDisabledLessThan(Byte value) {
+            addCriterion("group_msg_disabled <", value, "groupMsgDisabled");
+            return (Criteria) this;
+        }
+
+        public Criteria andGroupMsgDisabledLessThanOrEqualTo(Byte value) {
+            addCriterion("group_msg_disabled <=", value, "groupMsgDisabled");
+            return (Criteria) this;
+        }
+
+        public Criteria andGroupMsgDisabledIn(List<Byte> values) {
+            addCriterion("group_msg_disabled in", values, "groupMsgDisabled");
+            return (Criteria) this;
+        }
+
+        public Criteria andGroupMsgDisabledNotIn(List<Byte> values) {
+            addCriterion("group_msg_disabled not in", values, "groupMsgDisabled");
+            return (Criteria) this;
+        }
+
+        public Criteria andGroupMsgDisabledBetween(Byte value1, Byte value2) {
+            addCriterion("group_msg_disabled between", value1, value2, "groupMsgDisabled");
+            return (Criteria) this;
+        }
+
+        public Criteria andGroupMsgDisabledNotBetween(Byte value1, Byte value2) {
+            addCriterion("group_msg_disabled not between", value1, value2, "groupMsgDisabled");
+            return (Criteria) this;
+        }
+
         public Criteria andCreatedAtIsNull() {
         public Criteria andCreatedAtIsNull() {
             addCriterion("created_at is null");
             addCriterion("created_at is null");
             return (Criteria) this;
             return (Criteria) this;

+ 23 - 7
common-module/src/main/resources/mapper/WeComUserMapper.xml

@@ -12,6 +12,7 @@
     <result column="avatar" jdbcType="VARCHAR" property="avatar" />
     <result column="avatar" jdbcType="VARCHAR" property="avatar" />
     <result column="gender" jdbcType="INTEGER" property="gender" />
     <result column="gender" jdbcType="INTEGER" property="gender" />
     <result column="is_delete" jdbcType="INTEGER" property="isDelete" />
     <result column="is_delete" jdbcType="INTEGER" property="isDelete" />
+    <result column="group_msg_disabled" jdbcType="TINYINT" property="groupMsgDisabled" />
     <result column="created_at" jdbcType="BIGINT" property="createdAt" />
     <result column="created_at" jdbcType="BIGINT" property="createdAt" />
     <result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
     <result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
     <result column="deleted_at" jdbcType="BIGINT" property="deletedAt" />
     <result column="deleted_at" jdbcType="BIGINT" property="deletedAt" />
@@ -78,7 +79,8 @@
   </sql>
   </sql>
   <sql id="Base_Column_List">
   <sql id="Base_Column_List">
     id, corp_id, external_user_id, union_id, external_user_id_3rd_party, `type`, `name`, 
     id, corp_id, external_user_id, union_id, external_user_id_3rd_party, `type`, `name`, 
-    avatar, gender, is_delete, created_at, updated_at, deleted_at, create_time, update_time
+    avatar, gender, is_delete, group_msg_disabled, created_at, updated_at, deleted_at, 
+    create_time, update_time
   </sql>
   </sql>
   <select id="selectByExample" parameterType="com.tzld.piaoquan.growth.common.model.po.WeComUserExample" resultMap="BaseResultMap">
   <select id="selectByExample" parameterType="com.tzld.piaoquan.growth.common.model.po.WeComUserExample" resultMap="BaseResultMap">
     select
     select
@@ -117,15 +119,15 @@
     insert into we_com_user (id, corp_id, external_user_id, 
     insert into we_com_user (id, corp_id, external_user_id, 
       union_id, external_user_id_3rd_party, `type`, 
       union_id, external_user_id_3rd_party, `type`, 
       `name`, avatar, gender, 
       `name`, avatar, gender, 
-      created_at, updated_at,
-      deleted_at, create_time, update_time
-      )
+      is_delete, group_msg_disabled, created_at, 
+      updated_at, deleted_at, create_time, 
+      update_time)
     values (#{id,jdbcType=BIGINT}, #{corpId,jdbcType=BIGINT}, #{externalUserId,jdbcType=VARCHAR}, 
     values (#{id,jdbcType=BIGINT}, #{corpId,jdbcType=BIGINT}, #{externalUserId,jdbcType=VARCHAR}, 
       #{unionId,jdbcType=VARCHAR}, #{externalUserId3rdParty,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, 
       #{unionId,jdbcType=VARCHAR}, #{externalUserId3rdParty,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, 
       #{name,jdbcType=VARCHAR}, #{avatar,jdbcType=VARCHAR}, #{gender,jdbcType=INTEGER}, 
       #{name,jdbcType=VARCHAR}, #{avatar,jdbcType=VARCHAR}, #{gender,jdbcType=INTEGER}, 
-      #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT},
-      #{deletedAt,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
-      )
+      #{isDelete,jdbcType=INTEGER}, #{groupMsgDisabled,jdbcType=TINYINT}, #{createdAt,jdbcType=BIGINT}, 
+      #{updatedAt,jdbcType=BIGINT}, #{deletedAt,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{updateTime,jdbcType=TIMESTAMP})
     <selectKey resultType="java.lang.Long" order="AFTER" keyProperty="id">
     <selectKey resultType="java.lang.Long" order="AFTER" keyProperty="id">
       select LAST_INSERT_ID()
       select LAST_INSERT_ID()
     </selectKey>
     </selectKey>
@@ -163,6 +165,9 @@
       <if test="isDelete != null">
       <if test="isDelete != null">
         is_delete,
         is_delete,
       </if>
       </if>
+      <if test="groupMsgDisabled != null">
+        group_msg_disabled,
+      </if>
       <if test="createdAt != null">
       <if test="createdAt != null">
         created_at,
         created_at,
       </if>
       </if>
@@ -210,6 +215,9 @@
       <if test="isDelete != null">
       <if test="isDelete != null">
         #{isDelete,jdbcType=INTEGER},
         #{isDelete,jdbcType=INTEGER},
       </if>
       </if>
+      <if test="groupMsgDisabled != null">
+        #{groupMsgDisabled,jdbcType=TINYINT},
+      </if>
       <if test="createdAt != null">
       <if test="createdAt != null">
         #{createdAt,jdbcType=BIGINT},
         #{createdAt,jdbcType=BIGINT},
       </if>
       </if>
@@ -266,6 +274,9 @@
       <if test="record.isDelete != null">
       <if test="record.isDelete != null">
         is_delete = #{record.isDelete,jdbcType=INTEGER},
         is_delete = #{record.isDelete,jdbcType=INTEGER},
       </if>
       </if>
+      <if test="record.groupMsgDisabled != null">
+        group_msg_disabled = #{record.groupMsgDisabled,jdbcType=TINYINT},
+      </if>
       <if test="record.createdAt != null">
       <if test="record.createdAt != null">
         created_at = #{record.createdAt,jdbcType=BIGINT},
         created_at = #{record.createdAt,jdbcType=BIGINT},
       </if>
       </if>
@@ -298,6 +309,7 @@
       avatar = #{record.avatar,jdbcType=VARCHAR},
       avatar = #{record.avatar,jdbcType=VARCHAR},
       gender = #{record.gender,jdbcType=INTEGER},
       gender = #{record.gender,jdbcType=INTEGER},
       is_delete = #{record.isDelete,jdbcType=INTEGER},
       is_delete = #{record.isDelete,jdbcType=INTEGER},
+      group_msg_disabled = #{record.groupMsgDisabled,jdbcType=TINYINT},
       created_at = #{record.createdAt,jdbcType=BIGINT},
       created_at = #{record.createdAt,jdbcType=BIGINT},
       updated_at = #{record.updatedAt,jdbcType=BIGINT},
       updated_at = #{record.updatedAt,jdbcType=BIGINT},
       deleted_at = #{record.deletedAt,jdbcType=BIGINT},
       deleted_at = #{record.deletedAt,jdbcType=BIGINT},
@@ -337,6 +349,9 @@
       <if test="isDelete != null">
       <if test="isDelete != null">
         is_delete = #{isDelete,jdbcType=INTEGER},
         is_delete = #{isDelete,jdbcType=INTEGER},
       </if>
       </if>
+      <if test="groupMsgDisabled != null">
+        group_msg_disabled = #{groupMsgDisabled,jdbcType=TINYINT},
+      </if>
       <if test="createdAt != null">
       <if test="createdAt != null">
         created_at = #{createdAt,jdbcType=BIGINT},
         created_at = #{createdAt,jdbcType=BIGINT},
       </if>
       </if>
@@ -366,6 +381,7 @@
       avatar = #{avatar,jdbcType=VARCHAR},
       avatar = #{avatar,jdbcType=VARCHAR},
       gender = #{gender,jdbcType=INTEGER},
       gender = #{gender,jdbcType=INTEGER},
       is_delete = #{isDelete,jdbcType=INTEGER},
       is_delete = #{isDelete,jdbcType=INTEGER},
+      group_msg_disabled = #{groupMsgDisabled,jdbcType=TINYINT},
       created_at = #{createdAt,jdbcType=BIGINT},
       created_at = #{createdAt,jdbcType=BIGINT},
       updated_at = #{updatedAt,jdbcType=BIGINT},
       updated_at = #{updatedAt,jdbcType=BIGINT},
       deleted_at = #{deletedAt,jdbcType=BIGINT},
       deleted_at = #{deletedAt,jdbcType=BIGINT},

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

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