作者 lyh

gx

... ... @@ -101,6 +101,7 @@ class VideoTask extends Command
continue;
}
$keywordInfo = $this->getKeywordImage($val->id,$task_project->project_id,$domainInfo['domain']);
if(!empty($keywordInfo['product_list'])){
$array = [
'project_id' => $task_project->project_id,
'keyword_id' => $val->id,
... ... @@ -115,6 +116,7 @@ class VideoTask extends Command
KeywordVideoTaskLog::insert($array);
$sub_task_num--;
}
}
$task_project->status = KeywordVideoTask::STATUS_CLOSE;
$task_project->save();
}
... ... @@ -237,7 +239,7 @@ class VideoTask extends Command
$productIds[] = $item->id;
}
if (count($productIds)<7){
$product_all_id = Product::where("project_id", $project_id)->whereNotIn('id', $productIds)->where("status",Product::STATUS_ON)->pluck('id')->toArray();
$product_all_id = Product::where("project_id", $project_id)->where('thumb','!=',null)->whereNotIn('id', $productIds)->where("status",Product::STATUS_ON)->pluck('id')->toArray();
$number = 40;
$array_count = count($product_all_id);
if ($array_count > 0) {
... ... @@ -249,7 +251,7 @@ class VideoTask extends Command
$products = $productsQuery;
}
}else{
$product_all_id = Product::where("project_id", $project_id)->where("status",Product::STATUS_ON)->pluck('id')->toArray();
$product_all_id = Product::where("project_id", $project_id)->where('thumb','!=',null)->where("status",Product::STATUS_ON)->pluck('id')->toArray();
$number = 40;
$array_count = count($product_all_id);
if ($array_count > 0)
... ...