作者 lyh

gx

... ... @@ -152,12 +152,14 @@ class UpdateSeoTdk extends Command
public function seo_tdk($project_id)
{
$data = [];
$update = [];//更新统计
$update = [
'created_at'=>date('Y-m-d H:i:s')
];//更新统计
$ai_commands = AiCommand::where('is_batch', 1)->select('key', 'scene', 'ai')->get()->toArray();
$ai_commands = Arr::setValueToKey($ai_commands, 'key');
foreach ($this->maps as $table => $map) {
$update[$table] = ['total_page'=>0, 'title'=>0, 'keyword'=>0, 'des'=>0, 'created_at'=>date('Y-m-d H:i:s')];
echo date('Y-m-d H:i:s') . '更新--' . $table . ': 项目id' . $project_id . PHP_EOL . $update[$table];
$update[$table] = ['total_page'=>0, 'title'=>0, 'keyword'=>0, 'des'=>0];
echo date('Y-m-d H:i:s') . '更新--' . $table . ': 项目id' . $project_id . PHP_EOL . json_encode($update[$table]);
$list = DB::connection('custom_mysql')->table($table)->get()->toArray();
if (!empty($list)) {
foreach ($list as $v) {
... ...