|
@@ -146,7 +146,7 @@ class PageService extends BaseService
|
|
|
$mapQuery = GoodsSpecMap::query();
|
|
|
foreach ($attrMap as $attr) {
|
|
|
$mapQuery->orWhere(function (Builder $query) use ($attr) {
|
|
|
- $query->where("spec_id", $attr['spec_id'])->Where("value", $attr['value']);
|
|
|
+ $query->where("spec_id", $attr['spec_id'])->where("value", "like", "%{$attr['value']}%");
|
|
|
});
|
|
|
}
|
|
|
$goodsIdArr = $mapQuery->groupBy("goods_id")->having(DB::raw("count(`goods_id`)"), count($attrMap))->get("goods_id")->pluck("goods_id")->toArray();
|
|
@@ -183,7 +183,7 @@ class PageService extends BaseService
|
|
|
$mapQuery = GoodsSpecMap::query();
|
|
|
foreach ($attrMap as $attr) {
|
|
|
$mapQuery->orWhere(function (Builder $query) use ($attr) {
|
|
|
- $query->where("spec_id", $attr['spec_id'])->Where("value", $attr['value']);
|
|
|
+ $query->where("spec_id", $attr['spec_id'])->where("value", "like", "%{$attr['value']}%");
|
|
|
});
|
|
|
}
|
|
|
$goodsIdArr = $mapQuery->groupBy("goods_id")->having(DB::raw("count(`goods_id`)"), count($attrMap))->get("goods_id")->pluck("goods_id")->toArray();
|
|
@@ -204,7 +204,7 @@ class PageService extends BaseService
|
|
|
"weight" => $model->weight,
|
|
|
];
|
|
|
}, $p->items()),
|
|
|
- "category" => $this->searchCategory($params['keyword']),
|
|
|
+ "category" => [],
|
|
|
];
|
|
|
}
|
|
|
|