record.ts
1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import {
ApplicationRecordPageParams,
CallStatisticsItemType,
ClassifyItemType,
} from './model/record';
import { PaginationResult } from '/#/axios';
import { defHttp } from '/@/utils/http/axios';
enum ApplicationRecordManageApi {
OPEN_API_RECORD = '/openApiRecord',
PAGE_LIST_GET = '/openApiRecord',
PAGE_LIST_GET_PAGE = '/openApiRecord/getPage',
}
//分页
export const applicationRecordPage = (params: ApplicationRecordPageParams) => {
return defHttp.get<PaginationResult<ApplicationRecordPageParams>>({
url: ApplicationRecordManageApi.PAGE_LIST_GET,
params,
});
};
//调用统计分页
export const callStatisticsPage = (params: ApplicationRecordPageParams) => {
return defHttp.get<PaginationResult<CallStatisticsItemType>>({
url: ApplicationRecordManageApi.PAGE_LIST_GET_PAGE,
params,
});
};
// 详情
export const detailApplicationRecord = (id: string) => {
return defHttp.get({
url: `${ApplicationRecordManageApi.OPEN_API_RECORD}/find?id=${id}`,
});
};
// Top5
export const getApplicationRecordTop = () => {
return defHttp.get({
url: `${ApplicationRecordManageApi.OPEN_API_RECORD}/getTop`,
});
};
export const getApplicationRecordClassify = (type?: string) => {
const joinUrlParams = type ? `?type=${type}` : '';
return defHttp.get<ClassifyItemType[]>({
url: `${ApplicationRecordManageApi.OPEN_API_RECORD}/getClassify${joinUrlParams}`,
});
};
export const getCustomApplicationRecordClassify = (params: Recordable) => {
return defHttp.get<ClassifyItemType[]>({
url: `${ApplicationRecordManageApi.OPEN_API_RECORD}/getCustomClassify?type=${params.type}&endTime=${params.endTs}&startTime=${params.startTs}`,
});
};