优化商品类目搜索
This commit is contained in:
parent
16602ce9c6
commit
80bd747584
@ -943,11 +943,9 @@ class GoodsLogic extends Logic
|
|||||||
);
|
);
|
||||||
foreach ($category as &$v) {
|
foreach ($category as &$v) {
|
||||||
$goods[] = Goods::where($onSaleWhere)
|
$goods[] = Goods::where($onSaleWhere)
|
||||||
->where([
|
->where([$con[$v['level']] => $v['id']])
|
||||||
[$con[$v['level']], 'like', '%' . $v['id'] . '%'],
|
->order('sort_weight asc, sort asc, id desc')
|
||||||
])->order('sort_weight asc, sort asc, id desc')
|
|
||||||
->field('id, name')
|
->field('id, name')
|
||||||
->limit(20)
|
|
||||||
->select()
|
->select()
|
||||||
->toArray();
|
->toArray();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user