diff --git a/business/jxstore/report/report.go b/business/jxstore/report/report.go index 06007b28a..b7270ab2e 100644 --- a/business/jxstore/report/report.go +++ b/business/jxstore/report/report.go @@ -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