From 16e01495e401f67151fc556e060792c15497733a Mon Sep 17 00:00:00 2001 From: liu <1873441552@qq.com> Date: Mon, 11 Mar 2024 11:56:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B6=85=E7=AE=A1=E5=90=8E=E5=8F=B0=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/dao/store/product/ProductDao.php | 6 +++++- app/controller/admin/store/StoreProduct.php | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/common/dao/store/product/ProductDao.php b/app/common/dao/store/product/ProductDao.php index 873bb8a8..1bc05941 100755 --- a/app/common/dao/store/product/ProductDao.php +++ b/app/common/dao/store/product/ProductDao.php @@ -171,7 +171,11 @@ class ProductDao extends BaseDao } $query->order($where['order'] . ',rank DESC ,create_time DESC '); } else if($where['order'] !== ''){ - $query->order('U.'.$where['order'].' DESC,U.create_time DESC'); + if($where['order'] == 'check'){ + $query->order('Product.update_time DESC'); + }else{ + $query->order('U.'.$where['order'].' DESC,U.create_time DESC'); + } } else { $query->order('U.create_time DESC'); } diff --git a/app/controller/admin/store/StoreProduct.php b/app/controller/admin/store/StoreProduct.php index c56e7adf..eea39459 100755 --- a/app/controller/admin/store/StoreProduct.php +++ b/app/controller/admin/store/StoreProduct.php @@ -57,6 +57,7 @@ class StoreProduct extends BaseController $_where = $this->repository->switchType($where['type'], null, 0); unset($_where['product_type']); unset($_where['star']); + $where['order'] = "check";//标识后台查询更新时间倒叙 $where = array_merge($where, $_where); return app('json')->success($this->repository->getAdminList($merId, $where, $page, $limit)); }