|
|
|
@@ -149,39 +149,14 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="touchUsersReportList" resultType="com.iformall.domain.vo.TouchUsersReportVo" parameterType="com.iformall.domain.dto.MarkingCouponDataReportDto"> |
|
|
|
SELECT DATE_FORMAT(create_date,'%Y-%m-%d') as xTime |
|
|
|
,COUNT(DISTINCT c_user_id) as userCount,count(*) as couponCount |
|
|
|
,(select Count(*) from wx_coupon_order c |
|
|
|
where coupon_order_status=1 |
|
|
|
and DATE_FORMAT(create_date,'%Y-%m-%d')=xTime |
|
|
|
and tenant_id=#{tenantId} |
|
|
|
SELECT xTime, tenant_id, pv, uv, couponCount, userCount, verifyCount, verifyUserCount |
|
|
|
FROM view_touch_user |
|
|
|
WHERE view_touch_user.tenant_id=#{tenantId} |
|
|
|
<if test="startTime != null"> |
|
|
|
and c.update_date >= #{startTime} |
|
|
|
and view_touch_user.xTime >= DATE_FORMAT(#{startTime},'%Y-%m-%d') |
|
|
|
</if> |
|
|
|
<if test="endTime != null"> |
|
|
|
and c.update_date <= #{endTime} |
|
|
|
</if> |
|
|
|
) |
|
|
|
as verifyCount |
|
|
|
,(select Count(DISTINCT c_user_id) from wx_coupon_order d |
|
|
|
where coupon_order_status=1 |
|
|
|
and DATE_FORMAT(create_date,'%Y-%m-%d')=xTime |
|
|
|
and tenant_id=#{tenantId} |
|
|
|
<if test="startTime != null"> |
|
|
|
and d.update_date >= #{startTime} |
|
|
|
</if> |
|
|
|
<if test="endTime != null"> |
|
|
|
and d.update_date <= #{endTime} |
|
|
|
</if> |
|
|
|
) |
|
|
|
as verifyUserCount |
|
|
|
from wx_coupon_order |
|
|
|
where tenant_id=#{tenantId} |
|
|
|
<if test="startTime != null"> |
|
|
|
AND create_date >= #{startTime} |
|
|
|
</if> |
|
|
|
<if test="endTime != null"> |
|
|
|
and create_date <= #{endTime} |
|
|
|
and view_touch_user.xTime <= DATE_FORMAT(#{endTime},'%Y-%m-%d') |
|
|
|
</if> |
|
|
|
GROUP BY xTime |
|
|
|
order by xTime desc |
|
|
|
|