| @@ -108,7 +108,7 @@ | |||||
| <select id="touchUsersReportList" resultType="com.iformall.domain.vo.TouchUsersReportVo" | <select id="touchUsersReportList" resultType="com.iformall.domain.vo.TouchUsersReportVo" | ||||
| parameterType="com.iformall.domain.dto.MarkingCouponDataReportDto"> | parameterType="com.iformall.domain.dto.MarkingCouponDataReportDto"> | ||||
| SELECT DATE_FORMAT(day_date,'%Y-%m-%d') as xTime,visit_pv as pv,visit_uv as uv | |||||
| SELECT DATE_FORMAT(day_date,'%Y-%m-%d') as xTime,sum(visit_pv) as pv,sum(visit_uv) as uv | |||||
| from wx_user_visit | from wx_user_visit | ||||
| where 1=1 | where 1=1 | ||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| @@ -124,12 +124,13 @@ | |||||
| and day_date <= #{endTime} | and day_date <= #{endTime} | ||||
| </if> | </if> | ||||
| group by xTime | |||||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | <if test=" null != sortColumns"> order by ${sortColumns} </if> | ||||
| <if test=" null == sortColumns"> order by day_date desc </if> | |||||
| <if test=" null == sortColumns"> order by xTime desc </if> | |||||
| </select> | </select> | ||||
| <select id="touchUsersReportData" resultType="com.iformall.domain.vo.TouchUsersReportVo" parameterType="hashmap"> | <select id="touchUsersReportData" resultType="com.iformall.domain.vo.TouchUsersReportVo" parameterType="hashmap"> | ||||
| SELECT DATE_FORMAT(day_date,'%m/%d') as xTime,visit_pv as pv,visit_uv as uv | |||||
| SELECT DATE_FORMAT(day_date,'%m/%d') as xTime,sum(visit_pv) as pv,sum(visit_uv) as uv | |||||
| from wx_user_visit | from wx_user_visit | ||||
| where 1=1 | where 1=1 | ||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| @@ -144,11 +145,12 @@ | |||||
| <if test="endTime != null"> | <if test="endTime != null"> | ||||
| and day_date <= #{endTime} | and day_date <= #{endTime} | ||||
| </if> | </if> | ||||
| order by day_date desc | |||||
| group by xTime | |||||
| order by xTime desc | |||||
| </select> | </select> | ||||
| <select id="queryVisitUv" resultType="Long" parameterType="hashmap"> | <select id="queryVisitUv" resultType="Long" parameterType="hashmap"> | ||||
| select count(visit_uv) from wx_user_visit where 1=1 | |||||
| select sum(visit_uv) from wx_user_visit where 1=1 | |||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| and `tenant_id` = #{tenantId} | and `tenant_id` = #{tenantId} | ||||
| </if> | </if> | ||||