feat: 新增客服备用金台账与后台用户中文显示名
- 新增备用金账户、流水、支出、对账与权限 - 后台用户支持中文显示名并同步备用金姓名 - 审计、登录记录、任务及工单操作人优先展示中文名 - 补充备用金与人工支出方案文档
This commit is contained in:
@@ -29,7 +29,11 @@ import { getWorkerRiskConfig, saveWorkerRiskConfig } from './worker-risk-config-
|
||||
* - **留痕层**:worker_risk_events(只记显著事件)。持久、可追溯。
|
||||
*/
|
||||
|
||||
export type WorkerRiskActor = { userId?: number | null; username?: string }
|
||||
export type WorkerRiskActor = {
|
||||
userId?: number | null
|
||||
username?: string
|
||||
displayName?: string
|
||||
}
|
||||
|
||||
const OVERVIEW_SUMMARY_WINDOW_MS = 24 * 60 * 60 * 1000
|
||||
|
||||
@@ -123,7 +127,7 @@ export async function banAdminWorkerRisk(
|
||||
reason,
|
||||
action: 'manual',
|
||||
actorUserId: actor.userId ?? null,
|
||||
actorUsername: actor.username || '',
|
||||
actorUsername: actor.displayName || actor.username || '',
|
||||
})
|
||||
|
||||
return { workerId: id, status: 'frozen', reason }
|
||||
@@ -162,7 +166,7 @@ export async function unbanAdminWorkerRisk(
|
||||
reason,
|
||||
action: 'manual',
|
||||
actorUserId: actor.userId ?? null,
|
||||
actorUsername: actor.username || '',
|
||||
actorUsername: actor.displayName || actor.username || '',
|
||||
})
|
||||
|
||||
return { workerId: id, status: 'active', reason }
|
||||
@@ -182,7 +186,7 @@ export async function releaseAdminWorkerRiskTracker(
|
||||
reason: '后台仅释放内存风控状态(账号状态未变更)',
|
||||
action: 'manual',
|
||||
actorUserId: actor.userId ?? null,
|
||||
actorUsername: actor.username || '',
|
||||
actorUsername: actor.displayName || actor.username || '',
|
||||
})
|
||||
return { workerId: id }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user