From b5360973db1c318ae4ce5731af4b3a3fbf001434 Mon Sep 17 00:00:00 2001 From: cody <648753004@qq.com> Date: Sun, 28 Sep 2025 11:13:50 +0800 Subject: [PATCH 1/3] =?UTF-8?q?refactor(app):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E9=82=AE=E4=BB=B6=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...9_28_111112_alert_supply_demands_table.php | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 database/migrations/2025_09_28_111112_alert_supply_demands_table.php diff --git a/database/migrations/2025_09_28_111112_alert_supply_demands_table.php b/database/migrations/2025_09_28_111112_alert_supply_demands_table.php new file mode 100644 index 0000000..dab5791 --- /dev/null +++ b/database/migrations/2025_09_28_111112_alert_supply_demands_table.php @@ -0,0 +1,32 @@ +string('fund_company')->nullable()->comment('融资公司'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('supply_demands', function (Blueprint $table) { + // + }); + } +}; From b3429a562e26616c7c7f576053c7120f5907587b Mon Sep 17 00:00:00 2001 From: cody <648753004@qq.com> Date: Sun, 28 Sep 2025 11:17:05 +0800 Subject: [PATCH 2/3] =?UTF-8?q?refactor(app):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E9=82=AE=E4=BB=B6=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Console/Commands/UpdateLetter.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Console/Commands/UpdateLetter.php b/app/Console/Commands/UpdateLetter.php index 894b82f..282312e 100755 --- a/app/Console/Commands/UpdateLetter.php +++ b/app/Console/Commands/UpdateLetter.php @@ -45,7 +45,11 @@ class UpdateLetter extends Command // 更新用户首字母 $users = User::whereNull('letter')->whereNotNull('name')->limit(100)->get(); foreach ($users as $user) { - $user->letter = strtoupper(Pinyin::abbr(mb_substr($user->name, 0, 1))[0]); + $name = $user->username; + if ($user->name) { + $name = $user->name; + } + $user->letter = strtoupper(Pinyin::abbr(mb_substr($name, 0, 1))[0]); $user->save(); } return self::SUCCESS; From cc4ab76f2deac2c34caa0080014f8782583b08b8 Mon Sep 17 00:00:00 2001 From: cody <648753004@qq.com> Date: Sun, 28 Sep 2025 11:18:51 +0800 Subject: [PATCH 3/3] =?UTF-8?q?refactor(app):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E9=82=AE=E4=BB=B6=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Console/Commands/UpdateLetter.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Console/Commands/UpdateLetter.php b/app/Console/Commands/UpdateLetter.php index 282312e..5775fd5 100755 --- a/app/Console/Commands/UpdateLetter.php +++ b/app/Console/Commands/UpdateLetter.php @@ -43,7 +43,10 @@ class UpdateLetter extends Command public function handle() { // 更新用户首字母 - $users = User::whereNull('letter')->whereNotNull('name')->limit(100)->get(); + $users = User::whereNull('letter') + ->where(function ($query) { + $query->whereNotNull('name')->orWhereNotNull('username'); + })->limit(100)->get(); foreach ($users as $user) { $name = $user->username; if ($user->name) {