From 5f04752d8238a6fe32e5290381b32c2222bd11ed Mon Sep 17 00:00:00 2001 From: zhengfangyuan Date: Mon, 18 Jan 2021 10:38:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E4=BA=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/WxCUserFromMapper.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mallinkService/src/main/resources/mapper/WxCUserFromMapper.xml b/mallinkService/src/main/resources/mapper/WxCUserFromMapper.xml index fa27bbe6b..c28c58138 100644 --- a/mallinkService/src/main/resources/mapper/WxCUserFromMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxCUserFromMapper.xml @@ -152,7 +152,7 @@ ) a left join ( select wcuf.from_id, - count(wcuf.c_user_id) reach_user + count(DISTINCT wcuf.c_user_id) reach_user from wx_c_user_from wcuf where wcuf.from_type = #{fromType} @@ -167,11 +167,11 @@ and wcuf.`create_date` <= #{endDate} - group by wcuf.from_id,wcuf.c_user_id + group by wcuf.from_id ) b on b.from_id = a.from_id left join ( select wcuf.from_id, - count(wcuf.c_user_id) new_user + count(DISTINCT wcuf.c_user_id) new_user from wx_c_user_from wcuf where wcuf.from_type = #{fromType} and wcuf.is_new_user = 1 @@ -187,7 +187,7 @@ and wcuf.`create_date` <= #{endDate} - group by wcuf.from_id,wcuf.c_user_id + group by wcuf.from_id ) c on c.from_id = a.from_id order by a.visits desc