优化:奖励消息发送者显示「部门·职务」
$positionName 由单一职务名改为「部门名 · 职务名」格式, 例如:「生产部 · 系长」,无部门时退化为仅显示职务名, 超管保持「超级管理员」不变。 公告文案、私信、Toast 通知均同步更新。
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user