作者 lyh

修改服務器配置

@@ -235,7 +235,7 @@ class VideoTask extends Command @@ -235,7 +235,7 @@ class VideoTask extends Command
235 } 235 }
236 } 236 }
237 //TODO::所有产品 237 //TODO::所有产品
238 - $thumb = $this->getRecommendAndHotProducts($keywordInfo['route'],$project_id); 238 + $thumb = $this->getRecommendAndHotProducts($keyword_id,$project_id);
239 $keyword_arr = Keyword::where("project_id",$project_id)->where("status",1)->inRandomOrder()->take(10)->pluck('title')->toArray(); 239 $keyword_arr = Keyword::where("project_id",$project_id)->where("status",1)->inRandomOrder()->take(10)->pluck('title')->toArray();
240 $data = [ 240 $data = [
241 'url'=> 'https://' . $domain.'/'.$keywordInfo['route'], 241 'url'=> 'https://' . $domain.'/'.$keywordInfo['route'],
@@ -251,11 +251,10 @@ class VideoTask extends Command @@ -251,11 +251,10 @@ class VideoTask extends Command
251 /** 251 /**
252 * 关键词聚合页-推荐&热门产品 252 * 关键词聚合页-推荐&热门产品
253 */ 253 */
254 - public function getRecommendAndHotProducts($route,$project_id): ?array 254 + public function getRecommendAndHotProducts($keyword_id,$project_id): ?array
255 { 255 {
256 $productIds = []; 256 $productIds = [];
257 - $productKeyword = Keyword::where("project_id",$project_id)->where("route",$route)->first();  
258 - if (!empty($productKeyword)){ 257 + $productKeyword = Keyword::where("project_id",$project_id)->where("id",$keyword_id)->first();
259 $productsQuery = Product::where("project_id", $project_id)->where("status",1)->where("keyword_id","like","%,".$productKeyword->id.",%")->limit(7)->get(); 258 $productsQuery = Product::where("project_id", $project_id)->where("status",1)->where("keyword_id","like","%,".$productKeyword->id.",%")->limit(7)->get();
260 if (!empty($productsQuery)){ 259 if (!empty($productsQuery)){
261 foreach ($productsQuery as $item){ 260 foreach ($productsQuery as $item){
@@ -283,7 +282,7 @@ class VideoTask extends Command @@ -283,7 +282,7 @@ class VideoTask extends Command
283 $products = Product::where("project_id", $project_id)->whereIn("id", $product_id)->get(); 282 $products = Product::where("project_id", $project_id)->whereIn("id", $product_id)->get();
284 } 283 }
285 } 284 }
286 - } 285 +
287 $data = []; 286 $data = [];
288 if (!empty($products)){ 287 if (!empty($products)){
289 foreach ($products as $item){ 288 foreach ($products as $item){
@@ -38,7 +38,7 @@ class ServersIpController extends BaseController @@ -38,7 +38,7 @@ class ServersIpController extends BaseController
38 $this->response('當前服務器不存在',Code::SERVER_ERROR); 38 $this->response('當前服務器不存在',Code::SERVER_ERROR);
39 } 39 }
40 $serversIpModel = new ServersIpModel(); 40 $serversIpModel = new ServersIpModel();
41 - $this->map['total'] = ['<',$info['ip_num']]; 41 + $this->map['total'] = ['<',$info['ip_total']];
42 $data = $serversIpModel->list($this->map); 42 $data = $serversIpModel->list($this->map);
43 $this->response('success',Code::SUCCESS,$data); 43 $this->response('success',Code::SUCCESS,$data);
44 } 44 }