feat(weibo): 增加账号分配与客服数据隔离

This commit is contained in:
yml2213
2026-11-08 18:30:51 +08:00
parent c8b62e5267
commit 6b2285913f
16 changed files with 1320 additions and 55 deletions
+2
View File
@@ -754,6 +754,8 @@ export interface WeiboAccountItem {
nickname: string;
tag: string;
remark: string;
assigned_to: number | null;
assigned_username: string;
is_enabled: boolean;
disabled_at: string | null;
disabled_reason: string;
+22
View File
@@ -1,5 +1,6 @@
import api from './client';
import type {
AssignmentsSummary,
MessageResponse,
PaginatedResponse,
WeiboAccountItem,
@@ -22,6 +23,8 @@ export const weiboApi = {
tag?: string;
bind_status?: string;
enabled?: boolean;
assign_status?: string;
assigned_user_id?: number;
page: number;
page_size: number;
}) =>
@@ -29,6 +32,18 @@ export const weiboApi = {
'/weibo/accounts',
{ params },
),
listAccountIds: (params: {
search?: string;
tag?: string;
bind_status?: string;
enabled?: boolean;
assign_status?: string;
assigned_user_id?: number;
}) =>
api.get<{ account_ids: number[]; total: number }, { account_ids: number[]; total: number }>(
'/weibo/accounts/ids',
{ params },
),
getAccount: (accountId: number) =>
api.get<WeiboAccountItem, WeiboAccountItem>(`/weibo/accounts/${accountId}`),
importCookies: (text: string, tag = '', updateExisting = false) =>
@@ -69,6 +84,13 @@ export const weiboApi = {
'/weibo/accounts/batch-tag',
{ ids, tag },
),
batchAssign: (accountIds: number[], assignedTo: number | null) =>
api.post<MessageResponse, MessageResponse>('/weibo/accounts/batch-assign', {
account_ids: accountIds,
assigned_to: assignedTo,
}),
assignmentsSummary: () =>
api.get<AssignmentsSummary, AssignmentsSummary>('/weibo/assignments/summary'),
accountTags: () =>
api.get<{ tags: string[] }, { tags: string[] }>('/weibo/accounts/tags'),
workbenchTags: () =>