| | |
| | | return Array.isArray(payload?.records) ? payload.records : [] |
| | | } |
| | | |
| | | export function getDashboard() { |
| | | return http.get<DashboardStats, DashboardStats>('/api/admin/business/dashboard') |
| | | export function getDashboard(params: Record<string, any> = {}) { |
| | | return http.get<DashboardStats, DashboardStats>('/api/admin/workbench/statistics', { params }) |
| | | } |
| | | |
| | | export function uploadAdminImage(file: File) { |
| | |
| | | data.append('file', file) |
| | | return http.post<ImageUploadResult, ImageUploadResult>('/api/admin/uploads/images', data) |
| | | } |
| | | |
| | | export function uploadAdminPdf(file: File) { |
| | | const data = new FormData() |
| | | data.append('file', file) |
| | | return http.post<ImageUploadResult, ImageUploadResult>('/api/admin/uploads/pdfs', data) |
| | | } |
| | | export function uploadAdminVideo(file: File) { |
| | | const data = new FormData() |
| | | data.append('file', file) |
| | |
| | | } |
| | | |
| | | export function getPlatformSettings() { return http.get<Record<string, string>, Record<string, string>>('/api/admin/management/settings') } |
| | | export interface AdminPendingNotice { |
| | | id: string |
| | | category: string |
| | | content: string |
| | | time: string |
| | | path: string |
| | | } |
| | | export function getAdminPendingNotices() { return http.get<AdminPendingNotice[], AdminPendingNotice[]>('/api/admin/business/pending-notices') } |
| | | export function savePlatformSettings(payload: Record<string, string>) { return http.put<Record<string, string>, Record<string, string>>('/api/admin/management/settings', payload) } |
| | | export function getProtocolSetting(key: string) { return http.get<Record<string, any>, Record<string, any>>(`/api/admin/management/protocols/${key}`) } |
| | | export function saveProtocolSetting(key: string, contentHtml: string) { return http.put<Record<string, any>, Record<string, any>>(`/api/admin/management/protocols/${key}`, { contentHtml }) } |
| | |
| | | export function updateAdminRoleStatus(id: number | string, status: number) { return http.patch<AdminRole, AdminRole>(`/api/admin/management/roles/${id}/status`, { status }) } |
| | | export function deleteAdminRole(id: number | string) { return http.delete<any, any>(`/api/admin/management/roles/${id}`) } |
| | | export function getAdminStaff() { return http.get<AdminStaff[], AdminStaff[]>('/api/admin/management/staff') } |
| | | export function checkAdminStaffAccount(account: string) { return http.get<{ available: boolean }, { available: boolean }>('/api/admin/management/staff/account-available', { params: { account } }) } |
| | | export function createAdminStaff(payload: Omit<AdminStaff, 'id' | 'createdAt'> & { password: string }) { return http.post<AdminStaff, AdminStaff>('/api/admin/management/staff', payload) } |
| | | 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 }) } |
| | |
| | | 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 getMerchantSettlement(kind: 'onboardings' | 'bank-cards', params: MerchantSettlementQuery = {}) { return http.get<PageResult<any>, PageResult<any>>(`/api/admin/management/merchant-settlement/${kind}`, { params }) } |
| | | /** 商家类型筛选项:取自后端目录,避免前端另抄一份而与库里的取值失配。拉不到就先留空,不打扰用户。 */ |
| | | export function getMerchantSettlementMerchantTypes() { return http.get<string[], string[]>('/api/admin/management/merchant-settlement/merchant-types', { silent: true }) } |
| | | /** 结算记录直接来自斗拱:按结算日期区间返回真实结算流水,用于监控每天自动结算了多少到银行卡。 */ |
| | | export function getMerchantSettlements(params: { beginDate?: string; endDate?: string; size?: number; merchantName?: string; contactMobile?: string; merchantType?: string; status?: string } = {}) { |
| | | return http.get<{ records: Record<string, any>[]; total: number; failures: string[] }, { records: Record<string, any>[]; total: number; failures: string[] }>('/api/admin/management/merchant-settlement/settlements', { params }) |
| | | } |
| | | export function getMerchantOnboardingDetail(id: number | string) { return http.get<Record<string, any>, Record<string, any>>(`/api/admin/management/merchant-settlement/onboardings/${id}`) } |
| | | 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 refreshMerchantOnboarding(id: number | string, retry = false) { return http.post<Record<string, any>, Record<string, any>>(`/api/admin/management/merchant-settlement/onboardings/${id}/progress/refresh`, null, { params: { retry } }) } |
| | | // 微信实名认证:平台运营代为发起。未决申请不会重复提交,retry 只对通道已明确驳回时有意义。 |
| | | export function submitMerchantRealname(id: number | string, retry = false) { return http.post<Record<string, any>, Record<string, any>>(`/api/admin/management/merchant-settlement/onboardings/${id}/realname`, null, { params: { retry } }) } |
| | | |
| | | export interface ManagedOnboardingPayload { |
| | | merchantId: number | string |
| | | providerHuifuId: string |
| | | providerApplyNo?: string |
| | | confirmed?: boolean |
| | | } |
| | | /** |
| | | * 纳管前置核验:用我们自己的签名身份只读查一次该商户,把运营要人工核对的商户注册名称、商户简称、 |
| | | * 主体类型与结算卡取回来。通道查不到会明确报错(该商户不在我们渠道商的管辖范围内)。 |
| | | */ |
| | | export function previewManagedOnboarding(payload: ManagedOnboardingPayload) { |
| | | return http.post<Record<string, any>, Record<string, any>>('/api/admin/management/merchant-settlement/onboardings/managed/preview', payload) |
| | | } |
| | | /** |
| | | * 纳管:把已在汇付侧完成进件的外部商户接到我方某个商家上。confirmed 是运营肉眼核对通道名称后的 |
| | | * 显式确认,后端要求它为真才受理——名称不做字符串判定,那个确认框就是防绑错的人工闸门。 |
| | | */ |
| | | export function adoptManagedOnboarding(payload: ManagedOnboardingPayload & { providerApplyNo: string; confirmed: boolean }) { |
| | | return http.post<Record<string, any>, Record<string, any>>('/api/admin/management/merchant-settlement/onboardings/managed', payload) |
| | | } |
| | | /** |
| | | * 解绑:只解除我方绑定,清理这条纳管产生的进件与结算卡记录,**不回退通道侧的任何改动**。 |
| | | * 该商户号上还有在途订单或待结算资金时后端会拒绝并给出原因。 |
| | | */ |
| | | export function unbindManagedOnboarding(id: number | string) { |
| | | return http.post<Record<string, any>, Record<string, any>>(`/api/admin/management/merchant-settlement/onboardings/${id}/unbind`) |
| | | } |
| | | |
| | | export function getAdminNews(params: NewsArticleQuery = {}) { |
| | | return http.get<PageResult<NewsArticle>, PageResult<NewsArticle>>('/api/admin/business/news', { params }) |
| | |
| | | return http.patch<Talent, Talent>(`/api/talents/${id}/card-level`, { talentLevel }) |
| | | } |
| | | |
| | | /** 游客(无人才卡)补录信息并升级为持卡人:补认证信息 + 选等级 + 发卡。 */ |
| | | export function upgradeTalent( |
| | | id: number | string, |
| | | payload: Pick<TalentPayload, 'name' | 'idCardNo' | 'gender' | 'workUnit' | 'talentLevel' | 'talentCardNo' | 'sourceAreaType' | 'workAddress' | 'contactAddress'>, |
| | | ) { |
| | | return http.post<Talent, Talent>(`/api/talents/${id}/upgrade`, payload) |
| | | } |
| | | |
| | | export function getTalentAdvisors() { |
| | | return http.get<TalentAdvisor[], TalentAdvisor[]>('/api/talents/advisors') |
| | | } |
| | |
| | | return http.get<Merchant, Merchant>(`/api/admin/business/merchants/${id}`) |
| | | } |
| | | |
| | | export function checkMerchantLoginAccount(account: string) { |
| | | return http.get<{ available: boolean }, { available: boolean }>('/api/admin/business/merchants/login-account-available', { params: { account } }) |
| | | export function checkMerchantLoginAccount(account: string, merchantId?: number | string) { |
| | | return http.get<{ available: boolean }, { available: boolean }>('/api/admin/business/merchants/login-account-available', { |
| | | params: { account, merchantId }, |
| | | }) |
| | | } |
| | | |
| | | export function createMerchant(payload: MerchantPayload) { |
| | |
| | | |
| | | export function getAdminProducts(params: ProductQuery = {}) { |
| | | return http.get<PageResult<Product>, PageResult<Product>>('/api/admin/business/products', { params }) |
| | | } |
| | | |
| | | // 商家编辑页面的团单列表按商品维度返回(一条团单一行),修改团单不会多出一行待审核记录。 |
| | | export function getAdminMerchantProducts(merchantId: number | string, params: ProductQuery = {}) { |
| | | return http.get<PageResult<Product>, PageResult<Product>>(`/api/admin/business/merchants/${merchantId}/products`, { params }) |
| | | } |
| | | |
| | | export function getAdminProductDetail(id: number | string) { |
| | |
| | | return http.get<PageResult<RefundRecord>, PageResult<RefundRecord>>('/api/orders/refunds', { params }) |
| | | } |
| | | |
| | | // 刷新一笔退款的状态:退款通知和支付通知一样可能到不了,线上排查时不必干等定时任务或手写 SQL。 |
| | | export function refreshRefundStatus(refundNo: string) { |
| | | return http.post<RefundRecord, RefundRecord>(`/api/orders/refunds/${refundNo}/query`) |
| | | } |
| | | |
| | | // 查询通道状态:重新读一次斗拱侧的收款能力快照。进件通过后新增的结算卡也靠这条路径收敛为已批准。 |
| | | export function refreshMerchantPaymentCapability(id: number | string) { |
| | | return http.post<Record<string, any>, Record<string, any>>( |
| | | `/api/admin/management/merchant-settlement/onboardings/${id}/payment-capability/refresh`, |
| | | ) |
| | | } |
| | | |
| | | // 立即对账:人工触发一次**真实**的对账(待支付流水向通道确认 + 在途退款收敛)。 |
| | | // 给收不到回调的环境用:它走的是与定时任务完全相同的逻辑,不是「跳过真实通道」的捷径。 |
| | | export function runPaymentReconciliation(pendingAfterMinutes = 5) { |
| | | return http.post<Record<string, any>, Record<string, any>>('/api/admin/management/payment-reconciliation/run', null, { |
| | | params: { pendingAfterMinutes }, |
| | | }) |
| | | } |
| | | |
| | | export function getVerificationRecords(params: VerificationQuery = {}) { |
| | | return http.get<PageResult<VerificationRecord>, PageResult<VerificationRecord>>('/api/orders/verifications', { params }) |
| | | } |
| | | |
| | | function serviceApplicationParams(params: ServiceApplicationQuery = {}) { |
| | | const requestParams: Record<string, unknown> = { ...params } |
| | | if (params.talentKeyword && !requestParams.keyword) { |
| | | requestParams.keyword = params.talentKeyword |
| | | } |
| | | if (!requestParams.serviceKeyword) { |
| | | requestParams.serviceKeyword = params.merchantName || params.hospitalName || params.parkingLot |
| | | } |
| | | delete requestParams.talentKeyword |
| | | delete requestParams.merchantName |
| | | delete requestParams.hospitalName |
| | | delete requestParams.parkingLot |
| | | return requestParams |
| | | } |
| | | |
| | | export function getServiceApplications(params: ServiceApplicationQuery = {}) { |
| | | return http.get<PageResult<ServiceApplication>, PageResult<ServiceApplication>>('/api/admin/service-applications', { |
| | | params, |
| | | return http.get<PageResult<ServiceApplication>, PageResult<ServiceApplication>>('/api/admin/service-appointment-applications', { |
| | | params: serviceApplicationParams(params), |
| | | }) |
| | | } |
| | | |
| | | export function getServiceApplicationDetail(id: number | string) { |
| | | return http.get<ServiceApplication, ServiceApplication>(`/api/admin/service-applications/${id}`) |
| | | return http.get<ServiceApplication, ServiceApplication>(`/api/admin/service-appointment-applications/${id}`) |
| | | } |
| | | |
| | | export function updateServiceApplicationStatus(id: number | string, status: string, handlerName = '管理员') { |
| | | return http.patch<ServiceApplication, ServiceApplication>(`/api/admin/service-applications/${id}/status`, { |
| | | export function updateServiceApplicationStatus( |
| | | id: number | string, |
| | | status: string, |
| | | handlerName = '管理员', |
| | | remark = '', |
| | | rejectReason = '', |
| | | ) { |
| | | return http.patch<ServiceApplication, ServiceApplication>(`/api/admin/service-appointment-applications/${id}/status`, { |
| | | status, |
| | | handlerName, |
| | | remark, |
| | | rejectReason, |
| | | }) |
| | | } |
| | | |
| | | export function exportServiceApplications(params: ServiceApplicationQuery = {}) { |
| | | return http.get<Blob, Blob>('/api/admin/service-appointment-applications/export', { |
| | | params: serviceApplicationParams(params), |
| | | responseType: 'blob', |
| | | }) |
| | | } |
| | | |
| | | export function getFamilyCardApplications(params: FamilyCardQuery = {}) { |
| | | return http.get<PageResult<FamilyCardApplication>, PageResult<FamilyCardApplication>>( |
| | | '/api/admin/cards/family-applications', |
| | | '/api/admin/dependent-card-applies', |
| | | { params }, |
| | | ) |
| | | } |
| | | |
| | | export function getFamilyCardApplicationDetail(id: number | string) { |
| | | return http.get<FamilyCardApplication, FamilyCardApplication>(`/api/admin/cards/family-applications/${id}`) |
| | | return http.get<FamilyCardApplication, FamilyCardApplication>(`/api/admin/dependent-card-applies/${id}`) |
| | | } |
| | | |
| | | export function getFamilyCards(params: FamilyCardQuery = {}) { |
| | | return http.get<PageResult<FamilyCardApplication>, PageResult<FamilyCardApplication>>('/api/admin/cards/family-cards', { |
| | | params, |
| | | }) |
| | | } |
| | | |
| | | export function auditFamilyCardApplication(id: number | string, status: string, auditRemark = '') { |
| | | return http.patch<FamilyCardApplication, FamilyCardApplication>(`/api/admin/cards/family-applications/${id}/audit`, { |
| | | status, |
| | | auditorName: '管理员', |
| | | export function auditFamilyCardApplication(id: number | string, status: string | number, auditRemark = '') { |
| | | const statusValue = typeof status === 'number' ? status : status === '通过' || status === '已通过' ? 1 : 2 |
| | | return http.patch<FamilyCardApplication, FamilyCardApplication>(`/api/admin/dependent-card-applies/${id}/audit`, { |
| | | status: statusValue, |
| | | auditRemark, |
| | | }) |
| | | } |
| | | |
| | | export function updateFamilyCardStatus(cardId: number | string, status: number) { |
| | | return http.patch<FamilyCardApplication, FamilyCardApplication>(`/api/admin/cards/family-cards/${cardId}/status`, { |
| | | status, |
| | | }) |
| | | export function unbindFamilyCard(id: number | string) { |
| | | return http.patch<FamilyCardApplication, FamilyCardApplication>(`/api/admin/dependent-card-applies/${id}/unbind`) |
| | | } |
| | | |
| | | export function getUpgradeApplications(params: UpgradeApplicationQuery = {}) { |
| | |
| | | { params }, |
| | | ) |
| | | } |
| | | |
| | | |
| | | export type AnyRecord = Record<string, any> |
| | | |
| | | export function getServiceAppointmentOperationLogs(id: number | string) { |
| | | return http.get<AnyRecord[], AnyRecord[]>(`/api/admin/service-appointment-applications/${id}/operation-logs`) |
| | | } |
| | | |
| | | export function getParkingPlateSubmissions(params: AnyRecord = {}) { |
| | | return http.get<PageResult<AnyRecord>, PageResult<AnyRecord>>('/api/admin/parking-plate-submissions', { params }) |
| | | } |
| | | |
| | | export function getParkingPlateSubmissionDetail(id: number | string) { |
| | | return http.get<AnyRecord, AnyRecord>(`/api/admin/parking-plate-submissions/${id}`) |
| | | } |
| | | |
| | | export function getParkingPlateOperationLogs(id: number | string) { |
| | | return http.get<AnyRecord[], AnyRecord[]>(`/api/admin/parking-plate-submissions/${id}/operation-logs`) |
| | | } |
| | | |
| | | export function updateParkingPlateSubmissionStatus(id: number | string, status: string, remark = '', handlerName = '管理员') { |
| | | return http.patch<AnyRecord, AnyRecord>(`/api/admin/parking-plate-submissions/${id}/status`, { status, remark, handlerName }) |
| | | } |
| | | |
| | | export function getDependentCardApplies(params: AnyRecord = {}) { |
| | | return http.get<PageResult<AnyRecord>, PageResult<AnyRecord>>('/api/admin/dependent-card-applies', { params }) |
| | | } |
| | | |
| | | export function getDependentCardApplyDetail(id: number | string) { |
| | | return http.get<AnyRecord, AnyRecord>(`/api/admin/dependent-card-applies/${id}`) |
| | | } |
| | | |
| | | export function auditDependentCardApply(id: number | string, status: number, auditRemark = '') { |
| | | return http.patch<AnyRecord, AnyRecord>(`/api/admin/dependent-card-applies/${id}/audit`, { status, auditRemark }) |
| | | } |
| | | |
| | | export function getDependentCardApplyStatusLogs(id: number | string) { |
| | | return http.get<AnyRecord[], AnyRecord[]>(`/api/admin/dependent-card-applies/${id}/status-logs`) |
| | | } |
| | | |
| | | export function getBenefitServiceCoupons(params: AnyRecord = {}) { |
| | | return http.get<PageResult<AnyRecord>, PageResult<AnyRecord>>('/api/admin/benefit-service-config/coupons', { params }) |
| | | } |
| | | |
| | | export function getBenefitServiceCouponDetail(id: number | string) { |
| | | return http.get<AnyRecord, AnyRecord>(`/api/admin/benefit-service-config/coupons/${id}`) |
| | | } |
| | | |
| | | export function createBenefitServiceCoupon(payload: AnyRecord) { |
| | | return http.post<AnyRecord, AnyRecord>('/api/admin/benefit-service-config/coupons', payload) |
| | | } |
| | | |
| | | export function updateBenefitServiceCoupon(id: number | string, payload: AnyRecord) { |
| | | return http.put<AnyRecord, AnyRecord>(`/api/admin/benefit-service-config/coupons/${id}`, payload) |
| | | } |
| | | |
| | | export function updateBenefitServiceCouponStatus(id: number | string, status: number) { |
| | | return http.patch<AnyRecord, AnyRecord>(`/api/admin/benefit-service-config/coupons/${id}/status`, { status }) |
| | | } |
| | | |
| | | export function issueBenefitServiceCoupon(id: number | string, payload: AnyRecord) { |
| | | return http.post<AnyRecord, AnyRecord>(`/api/admin/benefit-service-config/coupons/${id}/claims`, payload) |
| | | } |
| | | |
| | | export function getBenefitServiceCouponClaims(params: AnyRecord = {}) { |
| | | return http.get<PageResult<AnyRecord>, PageResult<AnyRecord>>('/api/admin/benefit-service-config/coupons/claims', { params }) |
| | | } |
| | | |
| | | export function updateBenefitServiceCouponClaimStatus(claimId: number | string, payload: AnyRecord) { |
| | | return http.patch<AnyRecord, AnyRecord>(`/api/admin/benefit-service-config/coupons/claims/${claimId}/status`, payload) |
| | | } |
| | | |
| | | export function getCarWashJumpConfigs(params: AnyRecord = {}) { |
| | | return http.get<PageResult<AnyRecord>, PageResult<AnyRecord>>('/api/admin/car-wash-merchant-jump-configs', { params }) |
| | | } |
| | | |
| | | export function saveCarWashJumpConfig(merchantId: number | string, payload: AnyRecord) { |
| | | return http.put<AnyRecord, AnyRecord>(`/api/admin/car-wash-merchant-jump-configs/${merchantId}`, payload) |
| | | } |
| | | |
| | | export function getCarWashCredentials(params: AnyRecord = {}) { |
| | | return http.get<PageResult<AnyRecord>, PageResult<AnyRecord>>('/api/admin/car-wash-benefits/credentials', { params }) |
| | | } |
| | | |
| | | export function getCarWashCredentialDetail(id: number | string) { |
| | | return http.get<AnyRecord, AnyRecord>(`/api/admin/car-wash-benefits/credentials/${id}`) |
| | | } |
| | | |
| | | export function auditCarWashCredential(id: number | string, status: number, auditRemark = '') { |
| | | return http.patch<AnyRecord, AnyRecord>(`/api/admin/car-wash-benefits/credentials/${id}/audit`, { status, auditRemark }) |
| | | } |
| | | |
| | | export function rollbackCarWashCredential(id: number | string, rollbackReason = '') { |
| | | return http.post<AnyRecord, AnyRecord>(`/api/admin/car-wash-benefits/credentials/${id}/rollback`, { rollbackReason }) |
| | | } |
| | | |
| | | export function getDisplayServices(params: AnyRecord = {}) { |
| | | return http.get<PageResult<AnyRecord>, PageResult<AnyRecord>>('/api/admin/display-services', { params }) |
| | | } |
| | | |
| | | export function getDisplayServiceDetail(serviceId: number | string) { |
| | | return http.get<AnyRecord, AnyRecord>(`/api/admin/display-services/${serviceId}`) |
| | | } |
| | | |
| | | export function getDisplayServiceCategories() { |
| | | return http.get<AnyRecord[], AnyRecord[]>('/api/admin/display-services/categories') |
| | | } |
| | | |
| | | export function createDisplayService(payload: AnyRecord) { |
| | | return http.post<AnyRecord, AnyRecord>('/api/admin/display-services', payload) |
| | | } |
| | | |
| | | export function updateDisplayService(serviceId: number | string, payload: AnyRecord) { |
| | | return http.put<AnyRecord, AnyRecord>(`/api/admin/display-services/${serviceId}`, payload) |
| | | } |
| | | |
| | | export function updateDisplayServiceStatus(serviceId: number | string, status: number) { |
| | | return http.patch<AnyRecord, AnyRecord>(`/api/admin/display-services/${serviceId}/status`, { status }) |
| | | } |
| | | |
| | | export function updateDisplayServiceSort(serviceId: number | string, sortNo: number) { |
| | | return http.patch<AnyRecord, AnyRecord>(`/api/admin/display-services/${serviceId}/sort`, { sortNo }) |
| | | } |
| | | |
| | | export function getTicketPackages(params: AnyRecord = {}) { |
| | | return http.get<PageResult<AnyRecord>, PageResult<AnyRecord>>('/api/admin/ticket-packages', { params }) |
| | | } |
| | | |
| | | export function getTicketPackageDetail(packageId: number | string) { |
| | | return http.get<AnyRecord, AnyRecord>(`/api/admin/ticket-packages/${packageId}`) |
| | | } |
| | | |
| | | // 票包表单的「适用商家」下拉:走票包自己的只读接口,避免要求「商家查询」权限。 |
| | | export function getTicketPackageMerchantOptions(params: AnyRecord = {}) { |
| | | return http.get<AnyRecord[], AnyRecord[]>('/api/admin/ticket-packages/merchant-options', { params }) |
| | | } |
| | | |
| | | export function createTicketPackage(payload: AnyRecord) { |
| | | return http.post<AnyRecord, AnyRecord>('/api/admin/ticket-packages', payload) |
| | | } |
| | | |
| | | export function updateTicketPackage(packageId: number | string, payload: AnyRecord) { |
| | | return http.put<AnyRecord, AnyRecord>(`/api/admin/ticket-packages/${packageId}`, payload) |
| | | } |
| | | |
| | | export function updateTicketPackageStatus(packageId: number | string, status: string) { |
| | | return http.patch<AnyRecord, AnyRecord>(`/api/admin/ticket-packages/${packageId}/status`, { status }) |
| | | } |
| | | |
| | | export function importTicketPackageCodes(packageId: number | string, payload: AnyRecord) { |
| | | return http.post<AnyRecord, AnyRecord>(`/api/admin/ticket-packages/${packageId}/codes/import`, payload) |
| | | } |
| | | |
| | | export function generateTicketPackageCodes(packageId: number | string, payload: AnyRecord) { |
| | | return http.post<AnyRecord, AnyRecord>(`/api/admin/ticket-packages/${packageId}/codes/generate`, payload) |
| | | } |
| | | |
| | | export function getTicketPackageCodes(params: AnyRecord = {}) { |
| | | return http.get<PageResult<AnyRecord>, PageResult<AnyRecord>>('/api/admin/ticket-packages/codes', { params }) |
| | | } |
| | | |
| | | export function voidTicketPackageCode(codeId: number | string, remark = '') { |
| | | return http.patch<AnyRecord, AnyRecord>(`/api/admin/ticket-packages/codes/${codeId}/void`, { remark }) |
| | | } |
| | | |
| | | export function getTicketPackageClaims(params: AnyRecord = {}) { |
| | | return http.get<PageResult<AnyRecord>, PageResult<AnyRecord>>('/api/admin/ticket-packages/claims', { params }) |
| | | } |
| | | |
| | | export function getTicketPackageVerifications(params: AnyRecord = {}) { |
| | | return http.get<PageResult<AnyRecord>, PageResult<AnyRecord>>('/api/admin/ticket-packages/verifications', { params }) |
| | | } |
| | | |
| | | export function supplementTicketPackageClaim(payload: AnyRecord) { |
| | | return http.post<AnyRecord, AnyRecord>('/api/admin/ticket-packages/claims/supplement', payload) |
| | | } |
| | | |
| | | export function getDisplayMerchantPolicies(params: AnyRecord = {}) { |
| | | return http.get<PageResult<AnyRecord>, PageResult<AnyRecord>>('/api/admin/display-merchant-policies', { params }) |
| | | } |
| | | |
| | | export function updateDisplayMerchantPolicyStatus(merchantId: number | string, status: number) { |
| | | return http.patch<AnyRecord, AnyRecord>(`/api/admin/display-merchant-policies/${merchantId}/status`, { status }) |
| | | } |
| | | |
| | | |
| | | |