feat(douyu): 外部单协作支持复制 CK
This commit is contained in:
@@ -104,6 +104,33 @@ export interface DouyuCollabOrderList {
|
||||
page_size: number;
|
||||
}
|
||||
|
||||
export interface DouyuCollabCkExportItem {
|
||||
id: number;
|
||||
order_no: string;
|
||||
account_id: number | null;
|
||||
account_username: string;
|
||||
account_nickname: string;
|
||||
status: DouyuCollabStatus;
|
||||
status_label: string;
|
||||
ck_status: string;
|
||||
ck_status_label: string;
|
||||
ck_text: string;
|
||||
}
|
||||
|
||||
export interface DouyuCollabCkExportSkipped {
|
||||
id: number;
|
||||
order_no: string;
|
||||
reason: string;
|
||||
}
|
||||
|
||||
export interface DouyuCollabCkExportResult {
|
||||
total: number;
|
||||
exported: number;
|
||||
skipped: DouyuCollabCkExportSkipped[];
|
||||
items: DouyuCollabCkExportItem[];
|
||||
}
|
||||
|
||||
|
||||
export interface DouyuCollabSummary {
|
||||
total: number;
|
||||
by_status: Record<string, number>;
|
||||
@@ -264,6 +291,16 @@ export const douyuCollabApi = {
|
||||
),
|
||||
createOrder: (data: DouyuCollabOrderCreate) =>
|
||||
api.post<DouyuCollabOrder, DouyuCollabOrder>('/douyu/external-orders', data),
|
||||
exportOrderCk: (ids: number[]) =>
|
||||
api.post<DouyuCollabCkExportResult, DouyuCollabCkExportResult>(
|
||||
'/douyu/external-orders/ck/export',
|
||||
{ ids },
|
||||
),
|
||||
/** 单行复制 CK(仅超级管理员;后端再次校验角色) */
|
||||
copyOrderCk: (id: number) =>
|
||||
api.post<DouyuCollabCkExportResult, DouyuCollabCkExportResult>(
|
||||
`/douyu/external-orders/${id}/ck/copy`,
|
||||
),
|
||||
getOrder: (id: number) =>
|
||||
api.get<DouyuCollabOrder, DouyuCollabOrder>(`/douyu/external-orders/${id}`),
|
||||
updateOrder: (id: number, data: DouyuCollabOrderUpdate) =>
|
||||
|
||||
Reference in New Issue
Block a user