mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-30 14:31:04 +00:00
【程序目录】优化热销产品按照销量排序
This commit is contained in:
parent
8d098b5484
commit
85483987b7
@ -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();
|
||||
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user