提交 bf450868 编写于 作者: G gongfuxiang

数据统计优化

上级 acc143cd
......@@ -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)->group('goods_id')->limit(10)->select();
$data = Db::name('OrderDetail')->field('title AS name,sum(buy_number) AS value')->where('order_id', 'IN', $order_ids)->group('goods_id')->order('value desc')->limit(10)->select();
}
if(!empty($data))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册