优化(账号分配): 重构智能候选池与定量发放
按生命周期、租约、预售台账、积分、宝典和皮肤能力筛选账号池;支持指定客服定量发放、手工分配撤回,并为后续自助领取复用同一发放链路。
This commit is contained in:
@@ -8,6 +8,8 @@ import type {
|
||||
AccountBulkTagRequest,
|
||||
AccountExportRequest,
|
||||
AccountOverview,
|
||||
AssignmentDispatchRequest,
|
||||
AssignmentOptions,
|
||||
AssignmentsSummary,
|
||||
BasicSummary,
|
||||
BatchAssignRequest,
|
||||
@@ -42,6 +44,9 @@ export const accountApi = {
|
||||
elite_opened?: boolean;
|
||||
esports_opened?: boolean;
|
||||
role_bind_status?: string;
|
||||
occupancy?: string;
|
||||
commodity_id?: string;
|
||||
commodity_scope?: string;
|
||||
sort?: 'username' | 'status' | 'bind' | 'points' | 'high_value' | 'exchange' | 'tag';
|
||||
order?: 'asc' | 'desc';
|
||||
},
|
||||
@@ -69,6 +74,9 @@ export const accountApi = {
|
||||
esports_opened?: boolean;
|
||||
role_bind_status?: string;
|
||||
account_names?: string;
|
||||
occupancy?: string;
|
||||
commodity_id?: string;
|
||||
commodity_scope?: string;
|
||||
},
|
||||
) =>
|
||||
api.get<
|
||||
@@ -87,6 +95,13 @@ export const accountApi = {
|
||||
// 同一接口的选择集版本:可带筛选条件(all_matching),供「按筛选全选」分配
|
||||
batchAssignSelection: (data: BatchAssignRequest) =>
|
||||
api.post<MessageCountResponse, MessageCountResponse>('/accounts/batch-assign', data),
|
||||
dispatchAssignments: (data: AssignmentDispatchRequest) =>
|
||||
api.post<
|
||||
MessageCountResponse & { account_ids: number[]; assigned_username: string },
|
||||
MessageCountResponse & { account_ids: number[]; assigned_username: string }
|
||||
>('/accounts/assignments/dispatch', data),
|
||||
assignmentOptions: () =>
|
||||
api.get<AssignmentOptions, AssignmentOptions>('/accounts/assignments/options'),
|
||||
assignmentsSummary: () =>
|
||||
api.get<AssignmentsSummary, AssignmentsSummary>('/accounts/assignments/summary'),
|
||||
setRemark: (id: number, remark: string) =>
|
||||
|
||||
@@ -51,6 +51,9 @@ export interface AccountBulkSelection {
|
||||
elite_opened?: boolean;
|
||||
esports_opened?: boolean;
|
||||
role_bind_status?: string;
|
||||
occupancy?: string;
|
||||
commodity_id?: string;
|
||||
commodity_scope?: string;
|
||||
}
|
||||
|
||||
export interface AccountExportRequest extends AccountBulkSelection {
|
||||
@@ -66,6 +69,12 @@ export interface BatchAssignRequest extends AccountBulkSelection {
|
||||
assigned_to?: number | null;
|
||||
}
|
||||
|
||||
export interface AssignmentDispatchRequest extends AccountBulkSelection {
|
||||
assigned_to: number;
|
||||
quantity: number;
|
||||
strategy?: 'balanced' | 'points' | 'fresh_ck' | 'oldest';
|
||||
}
|
||||
|
||||
export interface PaginatedResponse<T> {
|
||||
items: T[];
|
||||
total: number;
|
||||
@@ -439,6 +448,8 @@ export interface AccountItem {
|
||||
ck_checked_at: string | null;
|
||||
points: number | null;
|
||||
gold_balance: number | null;
|
||||
elite_opened: boolean | null;
|
||||
esports_opened: boolean | null;
|
||||
role_bind_status: BindStatus;
|
||||
role_bind_label: string;
|
||||
esports_bind_status: BindStatus;
|
||||
@@ -457,6 +468,9 @@ export interface AccountItem {
|
||||
quality_score?: number | null;
|
||||
redundancy_class?: string;
|
||||
ck_remaining_hours?: number | null;
|
||||
active_lease_purpose: string;
|
||||
active_lease_expires_at: string | null;
|
||||
in_active_collab: boolean;
|
||||
}
|
||||
|
||||
export interface AssignmentsSummary {
|
||||
@@ -472,6 +486,30 @@ export interface SupportUserItem {
|
||||
assigned_count: number;
|
||||
}
|
||||
|
||||
export interface AssignmentSkinOption {
|
||||
commodity_id: string;
|
||||
commodity_name: string;
|
||||
scope: string;
|
||||
account_count: number;
|
||||
}
|
||||
|
||||
export interface AssignmentOptions {
|
||||
occupancy: {
|
||||
assignable: number;
|
||||
free: number;
|
||||
no_lease: number;
|
||||
no_collab: number;
|
||||
leased: number;
|
||||
collab: number;
|
||||
};
|
||||
presets: {
|
||||
zero_points: number;
|
||||
elite_points: number;
|
||||
high_value: number;
|
||||
};
|
||||
skins: AssignmentSkinOption[];
|
||||
}
|
||||
|
||||
// ==================== Login Task ====================
|
||||
|
||||
export interface LoginTaskLogItem {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user