89 lines
1.8 KiB
TypeScript
89 lines
1.8 KiB
TypeScript
|
|
import request from '/@/utils/request';
|
||
|
|
|
||
|
|
export interface LiveAccountParams {
|
||
|
|
pageNum: number;
|
||
|
|
pageSize: number;
|
||
|
|
platform?: string;
|
||
|
|
accountName?: string;
|
||
|
|
accountId?: string;
|
||
|
|
status?: number;
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface LiveAccountSaveParams {
|
||
|
|
id?: string;
|
||
|
|
platform: string;
|
||
|
|
accountName: string;
|
||
|
|
accountId: string;
|
||
|
|
status?: number;
|
||
|
|
remark?: string;
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface LiveAccount {
|
||
|
|
id: string;
|
||
|
|
platform: string;
|
||
|
|
accountName: string;
|
||
|
|
accountId: string;
|
||
|
|
status: number;
|
||
|
|
statusName: string;
|
||
|
|
remark: string;
|
||
|
|
createdAt: number;
|
||
|
|
updatedAt: number;
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface LiveAccountListResult {
|
||
|
|
list: LiveAccount[];
|
||
|
|
total: number;
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface LiveAccountListResponse {
|
||
|
|
code: number;
|
||
|
|
message: string;
|
||
|
|
data: LiveAccountListResult;
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface LiveAccountDetailResponse {
|
||
|
|
code: number;
|
||
|
|
message: string;
|
||
|
|
data: LiveAccount;
|
||
|
|
}
|
||
|
|
|
||
|
|
export function getLiveAccountList(params: LiveAccountParams): Promise<LiveAccountListResponse> {
|
||
|
|
return request({
|
||
|
|
url: '/erp/live/account/controller/listLiveAccounts',
|
||
|
|
method: 'get',
|
||
|
|
params,
|
||
|
|
}) as Promise<LiveAccountListResponse>;
|
||
|
|
}
|
||
|
|
|
||
|
|
export function getLiveAccountDetail(params: { id: string }): Promise<LiveAccountDetailResponse> {
|
||
|
|
return request({
|
||
|
|
url: '/erp/live/account/controller/getLiveAccount',
|
||
|
|
method: 'get',
|
||
|
|
params,
|
||
|
|
}) as Promise<LiveAccountDetailResponse>;
|
||
|
|
}
|
||
|
|
|
||
|
|
export function createLiveAccount(data: LiveAccountSaveParams) {
|
||
|
|
return request({
|
||
|
|
url: '/erp/live/account/controller/createLiveAccount',
|
||
|
|
method: 'post',
|
||
|
|
data,
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
export function updateLiveAccount(data: LiveAccountSaveParams) {
|
||
|
|
return request({
|
||
|
|
url: '/erp/live/account/controller/updateLiveAccount',
|
||
|
|
method: 'put',
|
||
|
|
data,
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
export function deleteLiveAccount(params: { id: string }) {
|
||
|
|
return request({
|
||
|
|
url: '/erp/live/account/controller/deleteLiveAccount',
|
||
|
|
method: 'delete',
|
||
|
|
params,
|
||
|
|
});
|
||
|
|
}
|