diff --git a/application/service/StatisticalService.php b/application/service/StatisticalService.php index 275907618c127be51f8c43850b8635d9bb99f12b..5d1d813728bc9b98c40288db449b1cbcfe9f7dcf 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))