修改商品列表查询
This commit is contained in:
parent
3e43da4b95
commit
d02f33f201
@ -71,7 +71,9 @@ class StoreProductLists extends BaseAdminDataLists implements ListsSearchInterfa
|
|||||||
$query = StoreProduct::where($this->searchWhere);
|
$query = StoreProduct::where($this->searchWhere);
|
||||||
if (isset($this->params['type_filter'])) {
|
if (isset($this->params['type_filter'])) {
|
||||||
if ($this->params['type_filter'] == 0) {
|
if ($this->params['type_filter'] == 0) {
|
||||||
$query->where('product_type', 6)->where('is_show', 0);
|
$query->where(function ($query) {
|
||||||
|
$query->where('product_type', 6)->whereOr('is_show', 0);
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
$query->where('is_show', 1);
|
$query->where('is_show', 1);
|
||||||
}
|
}
|
||||||
@ -156,7 +158,17 @@ class StoreProductLists extends BaseAdminDataLists implements ListsSearchInterfa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return StoreProduct::where($this->searchWhere)->count();
|
$query = StoreProduct::where($this->searchWhere);
|
||||||
|
if (isset($this->params['type_filter'])) {
|
||||||
|
if ($this->params['type_filter'] == 0) {
|
||||||
|
$query->where(function ($query) {
|
||||||
|
$query->where('product_type', 6)->whereOr('is_show', 0);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
$query->where('is_show', 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $query->count();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user