|
|
@@ -143,25 +143,46 @@ public interface QwExternalContactMapper extends BaseMapper<QwExternalContact> {
|
|
|
"and qec.gender = #{map.gender} " +
|
|
|
"</if> " +
|
|
|
|
|
|
- "<if test ='map.selectType ==2 and map.groupChatSelectList.size()!=0 '> " +
|
|
|
+ "<if test ='map.selectType ==2 and !map.groupChatSelectList.isEmpty() '> " +
|
|
|
" and qcu.chat_id in <foreach collection='map.groupChatSelectList' item='item' index='index' open='(' separator=',' close=')'> #{item} </foreach> " +
|
|
|
"</if> " +
|
|
|
|
|
|
- "<if test ='map.selectType ==2 and map.tagsIdsSelectList.size()!=0 '> " +
|
|
|
+ "<if test ='map.selectType ==2 and !map.tagsIdsSelectList.isEmpty() '> " +
|
|
|
" and <foreach collection='map.tagsIdsSelectList' item='item' index='index' open='( 1=2 ' separator='' close=')'> or find_in_set( #{item} , REGEXP_REPLACE ( qec.tag_ids, '[\"\\\\[\\\\]]', '' ) ) </foreach> " +
|
|
|
"</if> " +
|
|
|
|
|
|
- "<if test ='map.selectType ==2 and map.outTagsIdsSelectList.size()!=0 '> " +
|
|
|
+ "<if test ='map.selectType ==2 and !map.outTagsIdsSelectList.isEmpty() '> " +
|
|
|
" 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 '> " +
|
|
|
+ "<if test ='map.selectType ==2 and !map.timeScreenCharge.isEmpty()and map.timeScreenCharge != null and map.timeScreenCharge.size() == 2 '> " +
|
|
|
" and qec.create_time BETWEEN #{map.timeScreenCharge[0]} and #{map.timeScreenCharge[1]}" +
|
|
|
"</if> " +
|
|
|
|
|
|
"</script>")
|
|
|
public ArrayList<String> selectQwGroupMsgExpectCustomerList(@Param("map")QwCountCustomerParam userIdList, @Param("corpId") String corpId);
|
|
|
|
|
|
+ @Select("<script>" +
|
|
|
+ "SELECT " +
|
|
|
+ " DISTINCT qec.external_user_id AS externalUserIdS " +
|
|
|
+ " FROM " +
|
|
|
+ " qw_external_contact qec " +
|
|
|
+ " 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 = #{corpId} " +
|
|
|
+ "<if test ='map.selectType ==2 and !map.tagsIdsSelectList.isEmpty() '> " +
|
|
|
+ " and <foreach collection='map.tagsIdsSelectList' item='item' index='index' open='( 1=2 ' separator='' close=')'> or find_in_set( #{item} , REGEXP_REPLACE ( qec.tag_ids, '[\"\\\\[\\\\]]', '' ) ) </foreach> " +
|
|
|
+ "</if> " +
|
|
|
+
|
|
|
+ "<if test ='map.selectType ==2 and !map.outTagsIdsSelectList.isEmpty() '> " +
|
|
|
+ " 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> " +
|
|
|
+
|
|
|
+ "</script>")
|
|
|
+ public ArrayList<String> selectQwGroupMsgExpectListBySidebar(@Param("map")QwCountCustomerParam userIdList, @Param("corpId") String corpId);
|
|
|
+
|
|
|
/**
|
|
|
* 查询企业微信客户列表
|
|
|
*
|