作者 刘锟

合并分支 'akun' 到 'master'

Akun



查看合并请求 !111
@@ -272,7 +272,7 @@ class ProjectUpdate extends Command @@ -272,7 +272,7 @@ class ProjectUpdate extends Command
272 } 272 }
273 try { 273 try {
274 $item['ttile'] = $this->special2str($item['ttile'] ?? ''); 274 $item['ttile'] = $this->special2str($item['ttile'] ?? '');
275 - $id = $model->addReturnId([ 275 + $id = $model->insertGetId([
276 'project_id' => $project_id, 276 'project_id' => $project_id,
277 'title' => $item['ttile'], 277 'title' => $item['ttile'],
278 'intro' => $item['description'] ?? '', 278 'intro' => $item['description'] ?? '',
@@ -286,6 +286,9 @@ class ProjectUpdate extends Command @@ -286,6 +286,9 @@ class ProjectUpdate extends Command
286 'description' => $item['description'] ?? '' 286 'description' => $item['description'] ?? ''
287 ]), 287 ]),
288 'status' => Product::STATUS_ON, 288 'status' => Product::STATUS_ON,
  289 + 'created_at' => $item['post_date'] ?? date('Y-m-d H:i:s'),
  290 + 'updated_at' => $item['post_date'] ?? date('Y-m-d H:i:s'),
  291 + 'sort' => $item['sort'] ?? 0,
289 'is_upgrade' => 1, 292 'is_upgrade' => 1,
290 'route' => $route 293 'route' => $route
291 ]); 294 ]);
@@ -338,7 +341,7 @@ class ProjectUpdate extends Command @@ -338,7 +341,7 @@ class ProjectUpdate extends Command
338 $image = $item['images'] ?? ''; 341 $image = $item['images'] ?? '';
339 } 342 }
340 343
341 - $id = $model->addReturnId([ 344 + $id = $model->insertGetId([
342 'project_id' => $project_id, 345 'project_id' => $project_id,
343 'name' => $item['ttile'], 346 'name' => $item['ttile'],
344 'seo_title' => $item['ttile'], 347 'seo_title' => $item['ttile'],
@@ -347,6 +350,9 @@ class ProjectUpdate extends Command @@ -347,6 +350,9 @@ class ProjectUpdate extends Command
347 'text' => $item['content'] ?? '', 350 'text' => $item['content'] ?? '',
348 'image' => $this->source_download($image, $project_id, $domain_arr['host'], $web_url_domain, $home_url), 351 'image' => $this->source_download($image, $project_id, $domain_arr['host'], $web_url_domain, $home_url),
349 'status' => $api_type == 'news' ? News::STATUS_ONE : Blog::STATUS_ONE, 352 'status' => $api_type == 'news' ? News::STATUS_ONE : Blog::STATUS_ONE,
  353 + 'created_at' => $item['post_date'] ?? date('Y-m-d H:i:s'),
  354 + 'updated_at' => $item['post_date'] ?? date('Y-m-d H:i:s'),
  355 + 'sort' => $item['sort'] ?? 0,
350 'is_upgrade' => 1, 356 'is_upgrade' => 1,
351 'url' => $route 357 'url' => $route
352 ]); 358 ]);
@@ -388,7 +394,7 @@ class ProjectUpdate extends Command @@ -388,7 +394,7 @@ class ProjectUpdate extends Command
388 if (!$custom) { 394 if (!$custom) {
389 try { 395 try {
390 $item['ttile'] = $this->special2str($item['ttile'] ?? ''); 396 $item['ttile'] = $this->special2str($item['ttile'] ?? '');
391 - $id = $model->addReturnId([ 397 + $id = $model->insertGetId([
392 'project_id' => $project_id, 398 'project_id' => $project_id,
393 'name' => $item['ttile'], 399 'name' => $item['ttile'],
394 'title' => $item['ttile'], 400 'title' => $item['ttile'],
@@ -396,6 +402,8 @@ class ProjectUpdate extends Command @@ -396,6 +402,8 @@ class ProjectUpdate extends Command
396 'description' => $item['description'] ?? '', 402 'description' => $item['description'] ?? '',
397 'html' => $item['content'] ?? '', 403 'html' => $item['content'] ?? '',
398 'status' => 1, 404 'status' => 1,
  405 + 'created_at' => $item['post_date'] ?? date('Y-m-d H:i:s'),
  406 + 'updated_at' => $item['post_date'] ?? date('Y-m-d H:i:s'),
399 'is_upgrade' => 1, 407 'is_upgrade' => 1,
400 'url' => $route 408 'url' => $route
401 ]); 409 ]);