aa
This commit is contained in:
@@ -791,7 +791,7 @@ func OrderNotifyReport(ctx *jxcontext.Context, storeIDs, brandIDs []int, vendorI
|
||||
results []*OrderNotifyReportResult
|
||||
)
|
||||
sql := `
|
||||
SELECT IF(a.store_id = 0, a.jx_store_id, a.store_id) store_id, b.name ,COUNT(*) count, COUNT(a.notify_type = 1 or NULL) sms_count, COUNT(a.notify_type = 2 or NULL) voice_count
|
||||
SELECT SQL_CALC_FOUND_ROWS IF(a.store_id = 0, a.jx_store_id, a.store_id) store_id, b.name ,COUNT(*) count, COUNT(a.notify_type = 1 or NULL) sms_count, COUNT(a.notify_type = 2 or NULL) voice_count
|
||||
FROM goods_order a
|
||||
LEFT JOIN store b ON IF(a.store_id = 0 ,a.jx_store_id, a.store_id) = b.id
|
||||
LEFT JOIN user c ON c.mobile = b.market_man_phone
|
||||
|
||||
Reference in New Issue
Block a user