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)); }