作者 lyh

gx

... ... @@ -305,9 +305,7 @@ class Demo extends Command
public function getRecommendAndHotProducts($route,$project_id): ?array
{
$productIds = [];
dd($route);
$productKeyword = Keyword::where("project_id",$project_id)->where("route",$route)->first();
dd($productKeyword);
if (!empty($productKeyword)){
$productsQuery = Product::where("project_id", $project_id)->where("status",1)->where("keyword_id","like","%,".$productKeyword->id.",%")->limit(7)->get();
if (!empty($productsQuery)){
... ...