|
@@ -204,7 +204,12 @@ class PageService extends BaseService
|
|
|
$query->whereIn("id", $goodsIdArr);
|
|
|
|
|
|
})->when($params['keyword'], function (Builder $query) use ($params) {
|
|
|
- $query->where("name", "like", "%" . $params['keyword'] . "%");
|
|
|
+ $query->where(function (Builder $query) use ($params) {
|
|
|
+ $query->where("name", "like", "%" . $params['keyword'] . "%")
|
|
|
+ ->orWhere("custom", "like", "%" . $params['keyword'] . "%")
|
|
|
+ ->orWhere("desc_html", "like", "%" . $params['keyword'] . "%")
|
|
|
+ ->orWhereIn("id", GoodsSpecMap::where("value", "like", "%{$params['keyword']}%")->get(["goods_id"])->pluck("goods_id")->toArray());
|
|
|
+ });
|
|
|
})->orderByDesc("weight")->paginate($pageSize);
|
|
|
|
|
|
return [
|