|
|
@@ -49,15 +49,8 @@
|
|
|
u.is_delete,
|
|
|
COALESCE(gco.gift_card_pay_amount, 0) gift_card_pay_amount,
|
|
|
COALESCE(pul.current_points, 0) current_points,
|
|
|
- COALESCE(pul.total_points, 0) total_points,
|
|
|
- a.openid,
|
|
|
- a.phone,
|
|
|
- a.user_name,
|
|
|
- a.atlas_add,
|
|
|
- a.type,
|
|
|
- a.address
|
|
|
+ COALESCE(pul.total_points, 0) total_points
|
|
|
FROM t_wx_user u
|
|
|
- LEFT JOIN (select * from t_address where is_delete = 0 and type = 1) a ON u.c_openid = a.openid
|
|
|
LEFT JOIN (
|
|
|
SELECT user_id,
|
|
|
COALESCE(SUM(gco.pay_amount), 0) gift_card_pay_amount
|