AccountController.ts
6.73 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
import {AxiosResponse, AxiosStatic} from 'axios';
import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包
import {Account} from "lib/src/entity/account/entity/Account";
import {AccountTag} from "lib/src/entity/account/entity/AccountTag";
import {Page} from "autumn-vue/lib/core/page/Page";
import {ApproveHistory} from "lib/src/entity/track/entity/ApproveHistory";
import {AccountTotalStat} from "lib/src/entity/account/domain/AccountTotalStat";
import {NameCount} from "lib/src/entity/analysis/domain/NameCount";
import {AccountProjection} from "lib/src/entity/account/domain/AccountProjection";
import {ProvinceCount} from "lib/src/entity/account/domain/ProvinceCount";
import {AccountDateStat} from "lib/src/entity/account/domain/AccountDateStat";
// endregion
/**
* 个人账户(Account) PI接口
* @author gonglei
* @since 2025-10-13 12:18:11
*/
export class AccountController{
/**
* 新增用户分组
* @param accountTag
* @return AccountTag
*/
static addAccountTag(axios:AxiosStatic, accountTag: any): Promise<AxiosResponse<AccountTag>> {
return axios.post('account/addAccountTag', accountTag);
}
/**
*/
static addTagAccounts(axios:AxiosStatic, tagAccount: any): Promise<AxiosResponse<boolean>> {
return axios.post('account/addTagAccounts', tagAccount);
}
/**
* 审核用户申请
* @param approveHistory
* @return ApproveHistory
*/
static auditAccount(axios:AxiosStatic, approveHistory: any): Promise<AxiosResponse<ApproveHistory>> {
return axios.post('account/auditAccount', approveHistory);
}
/**
* 批量审核用户申请
* @param approveHistory
* @param authentication
* @return ApproveHistory
*/
static auditAccounts(axios:AxiosStatic, approveHistory: any): Promise<AxiosResponse<ApproveHistory>> {
return axios.post('account/auditAccounts', approveHistory);
}
/**
*/
static enableAccount(axios:AxiosStatic, disableReason: any, accountId: number, enabled: boolean): Promise<AxiosResponse<boolean>> {
return axios.post('account/enableAccount', disableReason, {params: {accountId: accountId,enabled: enabled}});
}
/**
*/
static exportAccount(axios:AxiosStatic, pagination: any, config?:any): Promise<AxiosResponse<void>> {
return axios.post('account/exportAccount', pagination, config);
}
/**
* 根据id查询个人账户
* @param accountId
* @return Account
*/
static getAccountById(axios:AxiosStatic, accountId: number): Promise<AxiosResponse<Account>> {
return axios.get('account/getAccountById', {params: {accountId: accountId}});
}
/**
*/
static getAccountByNameOrMobile(axios:AxiosStatic, searchText: string): Promise<AxiosResponse<AccountProjection[]>> {
return axios.get('account/getAccountByNameOrMobile', {params: {searchText: searchText}});
}
/**
*/
static getAccountCountByState(axios:AxiosStatic): Promise<AxiosResponse<any>> {
return axios.get('account/getAccountCountByState');
}
/**
*/
static getAccountCountGroupByCityCode(axios:AxiosStatic): Promise<AxiosResponse<NameCount[]>> {
return axios.get('account/getAccountCountGroupByCityCode');
}
/**
*/
static getAccountCountGroupByProvince(axios:AxiosStatic): Promise<AxiosResponse<ProvinceCount[]>> {
return axios.get('account/getAccountCountGroupByProvince');
}
/**
*/
static getAccountDetailById(axios:AxiosStatic, accountId: number): Promise<AxiosResponse<Account>> {
return axios.get('account/getAccountDetailById', {params: {accountId: accountId}});
}
/**
*/
static getAccountStat(axios:AxiosStatic, startDate: Dayjs | string, endDate: Dayjs | string): Promise<AxiosResponse<AccountDateStat>> {
if(startDate instanceof Object) {startDate = dayjs(startDate).format('YYYY-MM-DD') }
if(endDate instanceof Object) {endDate = dayjs(endDate).format('YYYY-MM-DD') }
return axios.get('account/getAccountStat', {params: {startDate: startDate,endDate: endDate}});
}
/**
* 根据id查询用户分组
* @param groupId
* @return AccountTag
*/
static getAccountTagById(axios:AxiosStatic, groupId: number): Promise<AxiosResponse<AccountTag>> {
return axios.get('account/getAccountTagById', {params: {groupId: groupId}});
}
/**
*/
static getAccountTagGroupName(axios:AxiosStatic): Promise<AxiosResponse<string[]>> {
return axios.get('account/getAccountTagGroupName');
}
/**
*/
static getAccountTags(axios:AxiosStatic): Promise<AxiosResponse<AccountTag[]>> {
return axios.get('account/getAccountTags');
}
/**
*/
static getDashboardAccountStat(axios:AxiosStatic): Promise<AxiosResponse<AccountTotalStat>> {
return axios.get('account/getDashboardAccountStat');
}
/**
* 分页查询个人账户
* @param pagination
* @return Page
*/
static pageAccount(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Account>>> {
return axios.post('account/pageAccount', pagination);
}
static PAGE_ACCOUNT = 'account/pageAccount';
/**
* 分页查询用户分组
* @param pagination
* @return Page
*/
static pageAccountTag(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<AccountTag>>> {
return axios.post('account/pageAccountTag', pagination);
}
static PAGE_ACCOUNT_TAG = 'account/pageAccountTag';
/**
*/
static pageAuctionAccount(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Account>>> {
return axios.post('account/pageAuctionAccount', pagination);
}
static PAGE_AUCTION_ACCOUNT = 'account/pageAuctionAccount';
/**
* 删除个人账户
* @param accountId
* @return int
*/
static removeAccountById(axios:AxiosStatic, accountId: number): Promise<AxiosResponse<number>> {
return axios.delete('account/removeAccountById', {params: {accountId: accountId}});
}
/**
* 删除用户分组
* @param tagId
* @return int
*/
static removeAccountTagById(axios:AxiosStatic, tagId: number): Promise<AxiosResponse<number>> {
return axios.delete('account/removeAccountTagById', {params: {tagId: tagId}});
}
/**
* 修改个人账户
* @param account
* @return Account
*/
static updateAccount(axios:AxiosStatic, account: any): Promise<AxiosResponse<Account>> {
return axios.post('account/updateAccount', account);
}
/**
* 修改用户分组
* @param accountTag
* @return AccountTag
*/
static updateAccountTag(axios:AxiosStatic, accountTag: any): Promise<AxiosResponse<AccountTag>> {
return axios.post('account/updateAccountTag', accountTag);
}
// region 前端扩展代码区
// endregion
}