Merge branch 'master' of http://47.244.231.31:8099/zhl/globalso-v6
正在显示
1 个修改的文件
包含
4 行增加
和
3 行删除
| @@ -101,6 +101,7 @@ class VideoTask extends Command | @@ -101,6 +101,7 @@ class VideoTask extends Command | ||
| 101 | continue; | 101 | continue; |
| 102 | } | 102 | } |
| 103 | $keywordInfo = $this->getKeywordImage($val->id,$task_project->project_id,$domainInfo['domain']); | 103 | $keywordInfo = $this->getKeywordImage($val->id,$task_project->project_id,$domainInfo['domain']); |
| 104 | + if(!empty($keywordInfo['product_list'])){ | ||
| 104 | $array = [ | 105 | $array = [ |
| 105 | 'project_id' => $task_project->project_id, | 106 | 'project_id' => $task_project->project_id, |
| 106 | 'keyword_id' => $val->id, | 107 | 'keyword_id' => $val->id, |
| @@ -115,6 +116,7 @@ class VideoTask extends Command | @@ -115,6 +116,7 @@ class VideoTask extends Command | ||
| 115 | KeywordVideoTaskLog::insert($array); | 116 | KeywordVideoTaskLog::insert($array); |
| 116 | $sub_task_num--; | 117 | $sub_task_num--; |
| 117 | } | 118 | } |
| 119 | + } | ||
| 118 | $task_project->status = KeywordVideoTask::STATUS_CLOSE; | 120 | $task_project->status = KeywordVideoTask::STATUS_CLOSE; |
| 119 | $task_project->save(); | 121 | $task_project->save(); |
| 120 | } | 122 | } |
| @@ -209,7 +211,6 @@ class VideoTask extends Command | @@ -209,7 +211,6 @@ class VideoTask extends Command | ||
| 209 | } | 211 | } |
| 210 | } | 212 | } |
| 211 | } | 213 | } |
| 212 | - | ||
| 213 | //TODO::所有产品 | 214 | //TODO::所有产品 |
| 214 | $thumb = $this->getRecommendAndHotProducts($keywordInfo['route'],$project_id); | 215 | $thumb = $this->getRecommendAndHotProducts($keywordInfo['route'],$project_id); |
| 215 | $keyword_arr = Keyword::where("project_id",$project_id)->where("status",1)->inRandomOrder()->take(10)->pluck('title')->toArray(); | 216 | $keyword_arr = Keyword::where("project_id",$project_id)->where("status",1)->inRandomOrder()->take(10)->pluck('title')->toArray(); |
| @@ -238,7 +239,7 @@ class VideoTask extends Command | @@ -238,7 +239,7 @@ class VideoTask extends Command | ||
| 238 | $productIds[] = $item->id; | 239 | $productIds[] = $item->id; |
| 239 | } | 240 | } |
| 240 | if (count($productIds)<7){ | 241 | if (count($productIds)<7){ |
| 241 | - $product_all_id = Product::where("project_id", $project_id)->whereNotIn('id', $productIds)->where("status",Product::STATUS_ON)->pluck('id')->toArray(); | 242 | + $product_all_id = Product::where("project_id", $project_id)->where('thumb','!=',null)->whereNotIn('id', $productIds)->where("status",Product::STATUS_ON)->pluck('id')->toArray(); |
| 242 | $number = 40; | 243 | $number = 40; |
| 243 | $array_count = count($product_all_id); | 244 | $array_count = count($product_all_id); |
| 244 | if ($array_count > 0) { | 245 | if ($array_count > 0) { |
| @@ -250,7 +251,7 @@ class VideoTask extends Command | @@ -250,7 +251,7 @@ class VideoTask extends Command | ||
| 250 | $products = $productsQuery; | 251 | $products = $productsQuery; |
| 251 | } | 252 | } |
| 252 | }else{ | 253 | }else{ |
| 253 | - $product_all_id = Product::where("project_id", $project_id)->where("status",Product::STATUS_ON)->pluck('id')->toArray(); | 254 | + $product_all_id = Product::where("project_id", $project_id)->where('thumb','!=',null)->where("status",Product::STATUS_ON)->pluck('id')->toArray(); |
| 254 | $number = 40; | 255 | $number = 40; |
| 255 | $array_count = count($product_all_id); | 256 | $array_count = count($product_all_id); |
| 256 | if ($array_count > 0) | 257 | if ($array_count > 0) |
-
请 注册 或 登录 后发表评论