refactor: 修改产品列表接口筛选
This commit is contained in:
@@ -71,11 +71,11 @@ class ProductModel extends ProductBaseModel
|
||||
}
|
||||
|
||||
// 上架状态查询
|
||||
public function scopeIsSaleNullable($query, bool|null $value)
|
||||
public function scopeIsShowNullable($query, bool|null $value)
|
||||
{
|
||||
if (is_null($value)) {
|
||||
return;
|
||||
}
|
||||
$query->where('is_sale', '=', (int)$value);
|
||||
$query->where('is_show', '=', (int)$value);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user