作者 张关杰

Merge branch 'develop' of http://47.244.231.31:8099/zhl/globalso-v6 into bate

... ... @@ -101,19 +101,21 @@ class VideoTask extends Command
continue;
}
$keywordInfo = $this->getKeywordImage($val->id,$task_project->project_id,$domainInfo['domain']);
$array = [
'project_id' => $task_project->project_id,
'keyword_id' => $val->id,
'keyword' => $val->title,
'data' => json_encode(['url' => $keywordInfo['url'],'title' => $keywordInfo['title'],
'description' => $keywordInfo['keyword_content'], 'images' => $keywordInfo['product_list'],
'keywords' => $keywordInfo['keyword_list'], 'logo_bg' => $logo_bg]),
'status' => KeywordVideoTaskLog::STATUS_INIT,
'updated_at' => date('Y-m-d H:i:s'),
'created_at' => date('Y-m-d H:i:s'),
];
KeywordVideoTaskLog::insert($array);
$sub_task_num--;
if(!empty($keywordInfo['product_list'])){
$array = [
'project_id' => $task_project->project_id,
'keyword_id' => $val->id,
'keyword' => $val->title,
'data' => json_encode(['url' => $keywordInfo['url'],'title' => $keywordInfo['title'],
'description' => $keywordInfo['keyword_content'], 'images' => $keywordInfo['product_list'],
'keywords' => $keywordInfo['keyword_list'], 'logo_bg' => $logo_bg]),
'status' => KeywordVideoTaskLog::STATUS_INIT,
'updated_at' => date('Y-m-d H:i:s'),
'created_at' => date('Y-m-d H:i:s'),
];
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)
... ...