| @@ -117,7 +117,7 @@ | |||||
| </select> | </select> | ||||
| <select id="visits" parameterType="com.iformall.domain.po.WxCUserFrom" resultType="com.iformall.domain.po.WxCUserFrom"> | <select id="visits" parameterType="com.iformall.domain.po.WxCUserFrom" resultType="com.iformall.domain.po.WxCUserFrom"> | ||||
| select a.from_id fromId,a.from_name fromName,a.from_phone fromPhone,a.visits visits,b.reach_user reachUser,c.new_user newUser from ( | |||||
| select a.from_id fromId,a.from_name fromName,a.from_phone fromPhone,IFNULL(a.visits,0) visits,IFNULL(b.reach_user,0) reachUser,IFNULL(c.new_user,0) newUser from ( | |||||
| select wcuf.from_id, | select wcuf.from_id, | ||||
| <if test=" fromType == 2 ">wcubi.nick_name from_name,wcubi.phone from_phone,</if> | <if test=" fromType == 2 ">wcubi.nick_name from_name,wcubi.phone from_phone,</if> | ||||
| <if test=" fromType == 5 ">wm.name from_name,wm.link_phone from_phone,</if> | <if test=" fromType == 5 ">wm.name from_name,wm.link_phone from_phone,</if> | ||||
| @@ -142,7 +142,7 @@ | |||||
| ) a | ) a | ||||
| left join ( | left join ( | ||||
| select wcuf.from_id, | select wcuf.from_id, | ||||
| count(wcuf.c_user_id) reach_user, | |||||
| count(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"> | ||||
| @@ -161,7 +161,7 @@ | |||||
| ) 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(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 | ||||