From b6a4f1b19725ae56fa0d2d3c276e772fcbc36397 Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Mon, 14 Jul 2025 14:30:59 +0800 Subject: [PATCH 1/3] =?UTF-8?q?pref:=20=E6=95=B0=E6=8D=AE=E5=90=8C?= =?UTF-8?q?=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/command/DataMigration.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/app/command/DataMigration.php b/app/command/DataMigration.php index e506ef9a..06e237f0 100644 --- a/app/command/DataMigration.php +++ b/app/command/DataMigration.php @@ -930,7 +930,8 @@ class DataMigration extends Command { $videos = Db::connect('old') ->name('video') - ->where('id', '>', 844) + // ->where('id', '>', 844) + ->where('cid', 'in', array_keys($category_map)) ->where('country_code', 'in', ['ZH', 'US']) ->order(['id' => 'asc']) ->cursor(); @@ -970,7 +971,16 @@ class DataMigration extends Command 'seo_desc' => $val['seo_description'], 'deleted_at' => $val['stat'] == -1 ? date('Y-m-d H:i:s') : null ]; - Db::name('video')->insert($item); + $ret = Db::name('video') + ->where('language_id', '=', $item['language_id']) + ->where('name', '=', $item['name']) + ->find(); + if (empty($ret)) { + Db::name('video')->insert($item); + } else { + Db::name('video')->where('id', '=', $ret['id'])->update($item); + } + $this->println('迁移视频ID:' . $val['id']); } } From 3332f55587dcb847e530c4508b7162715dc323ec Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Mon, 14 Jul 2025 15:49:50 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20=E5=BA=95=E9=83=A8=E5=A4=87=E6=A1=88?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/index/view/mobile/public/footer.html | 2 +- app/index/view/pc/public/nas_footer.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/index/view/mobile/public/footer.html b/app/index/view/mobile/public/footer.html index 0d54de8d..b69683d8 100644 --- a/app/index/view/mobile/public/footer.html +++ b/app/index/view/mobile/public/footer.html @@ -64,7 +64,7 @@