feat(admin-frontend): 补齐活跃筛选与支付快照能力

新增用户管理“活跃状态”高级筛选,并在后端支持
activity_status 复合规则,支持按活跃与非活跃筛选用户。

补齐订单支付成功快照落库与后台展示,保存支付渠道、
支付方法、实付金额和支付 IP,并在订单详情中优先展示。

同时增强节点页在线/离线筛选与批量删除、仪表盘快捷入口,
并修复已关闭工单再次回复后自动重开的统一语义。

附带同步测试、迁移、CI 工作流命名及知识库记录
This commit is contained in:
yinjianm
2026-04-25 00:59:08 +08:00
parent 2218457237
commit c64badfc23
55 changed files with 2023 additions and 71 deletions
+18 -2
View File
@@ -32,6 +32,7 @@ export type UserAdvancedFieldKey =
| 'email'
| 'id'
| 'plan_id'
| 'activity_status'
| 'transfer_enable'
| 'total_used'
| 'online_count'
@@ -52,7 +53,7 @@ export type UserAdvancedOperator =
| 'null'
| 'notnull'
export type UserAdvancedInputKind = 'text' | 'number' | 'plan' | 'status' | 'date'
export type UserAdvancedInputKind = 'text' | 'number' | 'plan' | 'status' | 'activity' | 'date'
export interface UserAdvancedFilterItem {
key: string
@@ -77,6 +78,11 @@ export const USER_STATUS_VALUE_OPTIONS = [
{ label: '封禁', value: 1 },
] as const
export const USER_ACTIVITY_STATUS_OPTIONS = [
{ label: '活跃', value: 1 },
{ label: '非活跃', value: 0 },
] as const
export const USER_ADVANCED_FIELD_DEFINITIONS: UserAdvancedFieldDefinition[] = [
{
field: 'email',
@@ -113,6 +119,12 @@ export const USER_ADVANCED_FIELD_DEFINITIONS: UserAdvancedFieldDefinition[] = [
{ value: 'notnull', label: '已订阅' },
],
},
{
field: 'activity_status',
label: '活跃状态',
input: 'activity',
operators: [{ value: 'eq', label: '是' }],
},
{
field: 'transfer_enable',
label: '流量',
@@ -303,7 +315,7 @@ function normalizeAdvancedFilterValue(item: UserAdvancedFilterItem): string | nu
return timestamp ? `${item.operator}:${timestamp}` : null
}
if (item.field === 'id' || item.field === 'plan_id' || item.field === 'online_count' || item.field === 'banned') {
if (item.field === 'id' || item.field === 'plan_id' || item.field === 'activity_status' || item.field === 'online_count' || item.field === 'banned') {
const numeric = Number(item.value)
return Number.isFinite(numeric) ? `${item.operator}:${numeric}` : null
}
@@ -331,6 +343,10 @@ function formatAdvancedFilterValue(item: UserAdvancedFilterItem, plans: AdminPla
return Number(item.value) === 1 ? '封禁' : '正常'
}
if (item.field === 'activity_status') {
return Number(item.value) === 1 ? '活跃' : '非活跃'
}
if (item.field === 'transfer_enable' || item.field === 'total_used') {
return `${Number(item.value)} GB`
}