提交 c1123139 编写于 作者: D Devil

商品评论有哈

上级 9c78d097
...@@ -570,7 +570,7 @@ class GoodsCommentsService ...@@ -570,7 +570,7 @@ class GoodsCommentsService
['goods_id', '=', $goods_id], ['goods_id', '=', $goods_id],
['rating', '>', 0], ['rating', '>', 0],
]; ];
$data = Db::name('GoodsComments')->where($where)->group('rating')->column('count(*) as count, rating', 'rating'); $data = Db::name('GoodsComments')->where($where)->group('rating')->column('count(*) as count', 'rating');
if(!empty($data)) if(!empty($data))
{ {
$sum = array_sum($data); $sum = array_sum($data);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册