作者 刘锟

update

... ... @@ -296,7 +296,7 @@ class ProjectUpdate extends Command
$id = $model->insertGetId([
'project_id' => $project_id,
'title' => $item['ttile'],
'intro' => $item['description'] ?? '',
'intro' => $item['short_description'] ?? '',
'content' => $item['content'] ?? '',
'category_id' => $category_id,
'thumb' => isset($gallery[0]) ? Arr::a2s($gallery[0]) : '',
... ... @@ -322,6 +322,8 @@ class ProjectUpdate extends Command
echo 'date:' . date('Y-m-d H:i:s') . ', task_id: ' . $task->id . ', error: ' . $e->getMessage() . PHP_EOL;
continue;
}
}else{
$model->edit(['intro'=>$item['short_description'] ?? ''],['id'=>$project['id']]);
}
}
}
... ... @@ -478,7 +480,7 @@ class ProjectUpdate extends Command
return $task_id;
}
$task_list = UpdateLog::where('project_id', 543)->where('status', UpdateLog::STATUS_UN)->orderBy('project_id', 'asc')->orderBy('sort', 'asc')->limit(8)->get();
$task_list = UpdateLog::where('project_id', 528)->where('status', UpdateLog::STATUS_UN)->orderBy('project_id', 'asc')->orderBy('sort', 'asc')->limit(8)->get();
if ($task_list->count() == 0) {
return false;
}
... ...