aa
This commit is contained in:
@@ -709,9 +709,9 @@ func UserMemberReport(ctx *jxcontext.Context, vendorID int, keyword string, offs
|
|||||||
)
|
)
|
||||||
var list []*dao.UserMemberReportResult
|
var list []*dao.UserMemberReportResult
|
||||||
sql := `
|
sql := `
|
||||||
SELECT SQL_CALC_FOUND_ROWS a.mobile, IF(a.vendor_id = ?, c.name, b.consignee_name) name, IF(a.deleted_at = '1970-01-01 00:00:00',0,1) status, a.vendor_id,
|
SELECT SQL_CALC_FOUND_ROWS a.mobile, IF(a.vendor_id = ?, c.name, b.consignee_name) name, IF(a.deleted_at = '1970-01-01 00:00:00',1,0) status, a.vendor_id,
|
||||||
COUNT(b.*) buy_count, COUNT(bb.*) finished_count, SUM(b.actual_pay_price) buy_price, SUM(b.actual_pay_price) finished_price, COUNT(d.score > 3) good_comment_count,
|
COUNT(DISTINCT b.vendor_store_id) buy_count, COUNT(DISTINCT bb.vendor_store_id) finished_count, SUM(DISTINCT b.actual_pay_price) buy_price,
|
||||||
COUNT(d.score < 3) bad_comment_count
|
SUM(DISTINCT b.actual_pay_price) finished_price, COUNT(d.score > 3) good_comment_count, COUNT(d.score < 3) bad_comment_count
|
||||||
FROM user_member a
|
FROM user_member a
|
||||||
LEFT JOIN goods_order b ON a.mobile = b.consignee_mobile2 AND a.vendor_id = b.vendor_id
|
LEFT JOIN goods_order b ON a.mobile = b.consignee_mobile2 AND a.vendor_id = b.vendor_id
|
||||||
LEFT JOIN goods_order bb ON a.mobile = bb.consignee_mobile2 AND bb.status = ? AND a.vendor_id = bb.vendor_id
|
LEFT JOIN goods_order bb ON a.mobile = bb.consignee_mobile2 AND bb.status = ? AND a.vendor_id = bb.vendor_id
|
||||||
|
|||||||
Reference in New Issue
Block a user