From f4de31f92b54104ab3dcd0767b4fde31fcf6e1c8 Mon Sep 17 00:00:00 2001 From: lkddi Date: Sun, 1 Mar 2026 12:17:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E5=A5=96=E5=8A=B1?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E5=8F=91=E9=80=81=E8=80=85=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E3=80=8C=E9=83=A8=E9=97=A8=C2=B7=E8=81=8C=E5=8A=A1=E3=80=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit $positionName 由单一职务名改为「部门名 · 职务名」格式, 例如:「生产部 · 系长」,无部门时退化为仅显示职务名, 超管保持「超级管理员」不变。 公告文案、私信、Toast 通知均同步更新。 --- app/Http/Controllers/AdminCommandController.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/AdminCommandController.php b/app/Http/Controllers/AdminCommandController.php index 7bf4d28..cabf419 100644 --- a/app/Http/Controllers/AdminCommandController.php +++ b/app/Http/Controllers/AdminCommandController.php @@ -525,7 +525,16 @@ class AdminCommandController extends Controller } // 发放金币(通过 UserCurrencyService 原子性更新 + 写流水) - $positionName = $isSuperAdmin ? '超级管理员' : ($position->name ?? '职务'); + // 组合「部门 · 职务」显示名,超管特殊处理 + if ($isSuperAdmin) { + $positionName = '超级管理员'; + } elseif ($position) { + $deptName = $position->department?->name; + $positionName = $deptName ? "{$deptName} · {$position->name}" : $position->name; + } else { + $positionName = '职务'; + } + $this->currencyService->change( $target, 'gold',