作者 刘锟

update

... ... @@ -66,7 +66,7 @@ class HtmlLanguageSpecialCollect extends Command
//设置数据库
$project = ProjectServer::useProject($project_id);
if ($project) {
$collect_info = CollectTask::select(['id', 'domain', 'route', 'language'])->where('id', $collect_id)->where('status', CollectTask::STATUS_UN)->where('language', '=', '')->first();
$collect_info = CollectTask::select(['id', 'domain', 'route', 'language'])->where('id', $collect_id)->where('status', CollectTask::STATUS_UN)->where('language', '!=', '')->first();
if (!$collect_info) {
sleep(2);
... ... @@ -138,7 +138,7 @@ class HtmlLanguageSpecialCollect extends Command
}
$update_log = UpdateLog::where('project_id',555)->where('status', UpdateLog::STATUS_COM)->where('collect_status', '>', UpdateLog::COLLECT_STATUS_MAIN)->orderBy('collect_status', 'asc')->first();
$update_log = UpdateLog::where('status', UpdateLog::STATUS_COM)->where('collect_status', '>', UpdateLog::COLLECT_STATUS_MAIN)->orderBy('collect_status', 'asc')->first();
if (!$update_log) {
return false;
}
... ... @@ -162,7 +162,7 @@ class HtmlLanguageSpecialCollect extends Command
//设置数据库
$project = ProjectServer::useProject($update_log->project_id);
if ($project) {
$collect_list = CollectTask::select(['id', 'project_id'])->where('project_id', $update_log['project_id'])->where('source', $source)->where('language', '=', '')->where('status', CollectTask::STATUS_UN)->orderBy('id', 'asc')->limit(50)->get();
$collect_list = CollectTask::select(['id', 'project_id'])->where('project_id', $update_log['project_id'])->where('source', $source)->where('language', '!=', '')->where('status', CollectTask::STATUS_UN)->orderBy('id', 'asc')->limit(50)->get();
if ($collect_list->count() == 0) {
$complete = true;
... ...