Bläddra i källkod

客户群发条件筛选

三七 2 veckor sedan
förälder
incheckning
4f12700b20

+ 4 - 2
fs-service/src/main/java/com/fs/qw/mapper/QwExternalContactMapper.java

@@ -97,6 +97,7 @@ public interface QwExternalContactMapper extends BaseMapper<QwExternalContact> {
             "left join qw_group_chat_user qcu ON qec.user_id = qcu.invitor   " +
             "</if>" +
             " WHERE " +
+            " qec.status = 0 and" +
             " qec.user_id IN " +
             " <foreach collection='map.userIdsSelectList'  item='item' index='index'  open='(' separator=',' close=')'> #{item} </foreach> " +
             " AND qec.corp_id = #{map.corpId} " +
@@ -113,7 +114,7 @@ public interface QwExternalContactMapper extends BaseMapper<QwExternalContact> {
             "</if> " +
 
             "<if test ='map.selectType ==2 and map.outTagsIdsSelectList.size()!=0 '> " +
-            " and <foreach collection='map.outTagsIdsSelectList'  item='item' index='index'  open='( 1=2 ' separator='' close=')'> or find_in_set(  #{item} , REGEXP_REPLACE ( qec.tag_ids, '[\"\\\\[\\\\]]', '' ) )  </foreach> " +
+            " and <foreach collection='map.outTagsIdsSelectList'  item='item' index='index'  open='( 1=2 ' separator='' close=')'> or not find_in_set(  #{item} , REGEXP_REPLACE ( qec.tag_ids, '[\"\\\\[\\\\]]', '' ) )  </foreach> " +
             "</if> " +
 
             "<if test ='map.selectType ==2 and map.timeScreenCharge.size()!=0 and map.timeScreenCharge != null and map.timeScreenCharge.size() == 2 '> " +
@@ -123,6 +124,7 @@ public interface QwExternalContactMapper extends BaseMapper<QwExternalContact> {
             "</script>")
     public int expectQwGroupMsgCountCustomer(@Param("map")QwCountCustomerParam userIdList);
 
+
     @Select("<script>" +
             "SELECT " +
             " DISTINCT qec.external_user_id AS externalUserIdS " +
@@ -132,6 +134,7 @@ public interface QwExternalContactMapper extends BaseMapper<QwExternalContact> {
             "left join qw_group_chat_user qcu ON qec.user_id = qcu.invitor   " +
             "</if>" +
             " WHERE " +
+            " qec.status = 0 and " +
             " qec.user_id IN " +
             " <foreach collection='map.userIdsSelectList'  item='item' index='index'  open='(' separator=',' close=')'> #{item} </foreach> " +
 
@@ -159,7 +162,6 @@ public interface QwExternalContactMapper extends BaseMapper<QwExternalContact> {
             "</script>")
     public ArrayList<String> selectQwGroupMsgExpectCustomerList(@Param("map")QwCountCustomerParam userIdList, @Param("corpId") String corpId);
 
-
     /**
      * 查询企业微信客户列表
      *