mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
[修复]修改产品列表搜索
This commit is contained in:
parent
3a50473818
commit
47f525d040
@ -50,8 +50,11 @@ class Product extends BasicAdmin
|
|||||||
$this->title = '产品管理';
|
$this->title = '产品管理';
|
||||||
$get = $this->request->get();
|
$get = $this->request->get();
|
||||||
$db = Db::name($this->table)->where(['is_deleted' => '0']);
|
$db = Db::name($this->table)->where(['is_deleted' => '0']);
|
||||||
foreach (['tags_id', 'goods_title'] as $field) {
|
if (isset($get['tags_id']) && $get['tags_id'] !== '') {
|
||||||
(isset($get[$field]) && $get[$field] !== '') && $db->whereLike($field, "%,{$get[$field]},%");
|
$db->whereLike('tags_id', "%,{$get['tags_id']},%");
|
||||||
|
}
|
||||||
|
if (isset($get['goods_title']) && $get['goods_title'] !== '') {
|
||||||
|
$db->whereLike('goods_title', "%{$get['goods_title']}%");
|
||||||
}
|
}
|
||||||
foreach (['cate_id', 'brand_id'] as $field) {
|
foreach (['cate_id', 'brand_id'] as $field) {
|
||||||
(isset($get[$field]) && $get[$field] !== '') && $db->where($field, $get[$field]);
|
(isset($get[$field]) && $get[$field] !== '') && $db->where($field, $get[$field]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user