diff --git a/crmeb/app/dao/product/product/StoreProductDao.php b/crmeb/app/dao/product/product/StoreProductDao.php index 809efd58b..9ff1822ac 100644 --- a/crmeb/app/dao/product/product/StoreProductDao.php +++ b/crmeb/app/dao/product/product/StoreProductDao.php @@ -223,7 +223,7 @@ class StoreProductDao extends BaseDao ->when($limit, function ($query) use ($limit) { $query->limit($limit); }) - ->order('sort DESC, id DESC')->select()->toArray(); + ->order(($field == 'is_hot' ? 'sales DESC' : 'sort DESC') . ', id DESC')->select()->toArray(); }