From 71a832fdba86e1f2c453b81932391b3bc94d54cc Mon Sep 17 00:00:00 2001 From: devil_gong Date: Thu, 20 Jun 2019 18:14:37 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=95=B0=E6=8D=AE=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/service/StatisticalService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/service/StatisticalService.php b/application/service/StatisticalService.php index 275907618..5d1d81372 100755 --- a/application/service/StatisticalService.php +++ b/application/service/StatisticalService.php @@ -426,7 +426,7 @@ class StatisticalService { $data = []; } else { - $data = Db::name('OrderDetail')->field('title AS name,sum(buy_number) AS value')->where('order_id', 'IN', $order_ids)->select(); + $data = Db::name('OrderDetail')->field('title AS name,sum(buy_number) AS value')->where('order_id', 'IN', $order_ids)->group('goods_id')->select(); } if(!empty($data)) -- GitLab