统计数据优化

feat/task1-c-wallet
devil_gong 2019-06-20 18:14:37 +08:00
parent fb5362726a
commit 71a832fdba
1 changed files with 1 additions and 1 deletions

View File

@ -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))