正在显示
1 个修改的文件
包含
4 行增加
和
2 行删除
| @@ -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 | } |
| @@ -237,7 +239,7 @@ class VideoTask extends Command | @@ -237,7 +239,7 @@ class VideoTask extends Command | ||
| 237 | $productIds[] = $item->id; | 239 | $productIds[] = $item->id; |
| 238 | } | 240 | } |
| 239 | if (count($productIds)<7){ | 241 | if (count($productIds)<7){ |
| 240 | - $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(); |
| 241 | $number = 40; | 243 | $number = 40; |
| 242 | $array_count = count($product_all_id); | 244 | $array_count = count($product_all_id); |
| 243 | if ($array_count > 0) { | 245 | if ($array_count > 0) { |
| @@ -249,7 +251,7 @@ class VideoTask extends Command | @@ -249,7 +251,7 @@ class VideoTask extends Command | ||
| 249 | $products = $productsQuery; | 251 | $products = $productsQuery; |
| 250 | } | 252 | } |
| 251 | }else{ | 253 | }else{ |
| 252 | - $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(); |
| 253 | $number = 40; | 255 | $number = 40; |
| 254 | $array_count = count($product_all_id); | 256 | $array_count = count($product_all_id); |
| 255 | if ($array_count > 0) | 257 | if ($array_count > 0) |
-
请 注册 或 登录 后发表评论