| @@ -152,7 +152,7 @@ | |||||
| ) a | ) a | ||||
| left join ( | left join ( | ||||
| select wcuf.from_id, | 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 | from wx_c_user_from wcuf | ||||
| where wcuf.from_type = #{fromType} | where wcuf.from_type = #{fromType} | ||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| @@ -167,11 +167,11 @@ | |||||
| <if test=" null != endDate"> | <if test=" null != endDate"> | ||||
| and wcuf.`create_date` <= #{endDate} | and wcuf.`create_date` <= #{endDate} | ||||
| </if> | </if> | ||||
| group by wcuf.from_id,wcuf.c_user_id | |||||
| group by wcuf.from_id | |||||
| ) b on b.from_id = a.from_id | ) b on b.from_id = a.from_id | ||||
| left join ( | left join ( | ||||
| select wcuf.from_id, | 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 | from wx_c_user_from wcuf | ||||
| where wcuf.from_type = #{fromType} | where wcuf.from_type = #{fromType} | ||||
| and wcuf.is_new_user = 1 | and wcuf.is_new_user = 1 | ||||
| @@ -187,7 +187,7 @@ | |||||
| <if test=" null != endDate"> | <if test=" null != endDate"> | ||||
| and wcuf.`create_date` <= #{endDate} | and wcuf.`create_date` <= #{endDate} | ||||
| </if> | </if> | ||||
| group by wcuf.from_id,wcuf.c_user_id | |||||
| group by wcuf.from_id | |||||
| ) c on c.from_id = a.from_id | ) c on c.from_id = a.from_id | ||||
| order by a.visits desc | order by a.visits desc | ||||
| <if test=" null != begin "> | <if test=" null != begin "> | ||||