feat:会员管理优化增加导出

This commit is contained in:
dzc committed 2026-10-30 20:03:11 +08:00
1 parent 42d7049318
commit 57a35f2f9d
5 files changed
+1057 -24

No files matched your search

+35
View File
@@ -9,6 +9,9 @@ export interface UserVO {
loginIp: string
mark: string
mobile: string
wechatNum?: string | null
wechatQrCode?: string | null
addressAreaNames?: string[]
name: string | undefined
nickname: string | undefined
registerIp: string
@@ -27,6 +30,38 @@ export const getUserPage = async (params) => {
return await request.get({ url: `/member/user/page`, params })
}
export interface UserExportProgress {
taskId: string
status: 'WAITING' | 'RUNNING' | 'SUCCESS' | 'FAILURE'
total: number
processed: number
progress: number
message: string
fileName: string
existingTask: boolean
retentionHours: number
}
// 使用与列表相同的查询参数序列化方式,时间范围、标签数组等保持一致。
export const exportUsers = (params: Record<string, unknown>) => {
return request.post<UserExportProgress>({ url: '/member/user/export-async', params })
}
export const getUserExportProgress = (taskId: string) => {
return request.get<UserExportProgress>({
url: '/member/user/export-progress',
params: { taskId }
})
}
export const downloadUserExport = (taskId: string) => {
return request.download<Blob>({
url: '/member/user/export-download',
params: { taskId },
timeout: 300000
})
}
// 查询会员用户详情
export const getUser = async (id: number) => {
return await request.get({ url: `/member/user/get?id=` + id })