| | |
| | | export function updateAdminStaff(id: number | string, payload: Omit<AdminStaff, 'id' | 'createdAt'> & { password?: string }) { return http.put<AdminStaff, AdminStaff>(`/api/admin/management/staff/${id}`, payload) } |
| | | export function resetAdminStaffPassword(id: number | string, password: string) { return http.patch<any, any>(`/api/admin/management/staff/${id}/password`, { password }) } |
| | | export function deleteAdminStaff(id: number | string) { return http.delete<any, any>(`/api/admin/management/staff/${id}`) } |
| | | export function getMerchantSettlement(kind: 'onboardings' | 'bank-cards' | 'withdrawals') { return http.get<PageResult<any>, PageResult<any>>(`/api/admin/management/merchant-settlement/${kind}`) } |
| | | export interface MerchantSettlementQuery { |
| | | page?: number |
| | | size?: number |
| | | merchantName?: string |
| | | contactMobile?: string |
| | | merchantType?: string |
| | | status?: string |
| | | startDate?: string |
| | | endDate?: string |
| | | } |
| | | export function getMerchantSettlement(kind: 'onboardings' | 'bank-cards' | 'withdrawals', params: MerchantSettlementQuery = {}) { return http.get<PageResult<any>, PageResult<any>>(`/api/admin/management/merchant-settlement/${kind}`, { params }) } |
| | | export function reviewMerchantSettlement(kind: 'onboardings' | 'bank-cards' | 'withdrawals', id: number | string, status: string, reason = '', providerValue = '') { const body: Record<string, string> = { status, reason }; if (kind === 'onboardings') body.huifuId = providerValue; if (kind === 'bank-cards') body.tokenNo = providerValue; return http.patch<any, any>(`/api/admin/management/merchant-settlement/${kind}/${id}`, body) } |
| | | |
| | | export function getAdminNews(params: NewsArticleQuery = {}) { |