会员余额明细获取

This commit is contained in:
张松
2025-03-25 00:29:35 +08:00
parent 6c7b92845f
commit 50bb277511

View File

@@ -55,8 +55,8 @@
IFNULL(SUM(DISTINCT f.amount), 0) AS rechargeAmount
FROM
tb_shop_user a
JOIN tb_user_info b ON b.id = a.user_id
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_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()
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')