统计有误修复
This commit is contained in:
@@ -43,8 +43,8 @@
|
|||||||
sum(IFNULL(b.account_points, 0)) as points,
|
sum(IFNULL(b.account_points, 0)) as points,
|
||||||
count(c.id) as couponNum
|
count(c.id) as couponNum
|
||||||
from tb_user_info as a
|
from tb_user_info as a
|
||||||
left join tb_shop_user as b on a.id = b.user_id
|
join tb_shop_user as b on a.id = b.user_id
|
||||||
left join tb_shop_activate_coupon_record as c
|
join tb_shop_activate_coupon_record as c
|
||||||
on c.shop_id = b.shop_id and c.shop_user_id = b.id and c.`status` = 1 and c.use_start_time < now() and c.use_end_time > now()
|
on c.shop_id = b.shop_id and c.shop_user_id = b.id and c.`status` = 1 and c.use_start_time < now() and c.use_end_time > now()
|
||||||
where a.id = #{userId}
|
where a.id = #{userId}
|
||||||
</select>
|
</select>
|
||||||
@@ -55,8 +55,8 @@
|
|||||||
IFNULL(SUM(DISTINCT f.amount), 0) AS rechargeAmount
|
IFNULL(SUM(DISTINCT f.amount), 0) AS rechargeAmount
|
||||||
FROM
|
FROM
|
||||||
tb_shop_user a
|
tb_shop_user a
|
||||||
LEFT JOIN tb_user_info b ON b.id = a.user_id
|
JOIN tb_user_info b ON b.id = a.user_id
|
||||||
left join tb_shop_activate_coupon_record c on c.shop_user_id=a.id and c.`status`=0 and c.use_start_time < now() and c.use_end_time > now()
|
join tb_shop_activate_coupon_record c on c.shop_user_id=a.id and c.`status`=0 and c.use_start_time < now() and c.use_end_time > now()
|
||||||
left join tb_order_info as d on d.user_id=a.user_id and d.shop_id=a.shop_id
|
left join tb_order_info as d on d.user_id=a.user_id and d.shop_id=a.shop_id
|
||||||
left join tb_shop_user_flow as f on f.user_id=a.user_id and f.shop_id=a.shop_id and f.biz_code in ('cashIn', 'wechatIn', 'alipayIn')
|
left join tb_shop_user_flow as f on f.user_id=a.user_id and f.shop_id=a.shop_id and f.biz_code in ('cashIn', 'wechatIn', 'alipayIn')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user