提交 7ebe4cd0 编写于 作者: T Terry

购物车数据查询加入排序

上级 874738fb
......@@ -270,7 +270,8 @@ class QuoteItem extends Service
if (!isset($this->_cart_product_info[$cart_id])) {
$data = $this->_itemModel->find()->where([
'cart_id' => $cart_id,
])->all();
])->orderBy( ['active' => SORT_ASC, 'updated_at' => SORT_DESC]) // 加入按照active updated_at 进行排序
->all();
if (is_array($data) && !empty($data)) {
foreach ($data as $one) {
$active = $one['active'];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册