import { http } from '@/http/alova'

/**
 *
 * 发券人账户表-通过userId查询账户信息
 */

// export function getCouponIssuerApplyById() {
//     return http.Get<CouponIssuerApplyByIdResponse>('/couponCenter/APP/couponIssuerAccount/queryByUserId')
// }

export interface CouponIssuerAccountByPageMapForm {
    pageNo: number
    pageSize: number
    startTime: string
    endTime: string
    status: number // 0-待结算, 1-已结算/成功
    type: number // 明细类型: 1-佣金收入, 2-提现支出, 3-退款扣减, 4-系统调整
}

// 定义账户明细项接口
export interface AccountDetailItem {
    id: number
    receiveUserName: string
    couponName: string
    changeAmount: number
    settleTime: string
    [key: string]: any
}

// 定义分页响应数据接口
export interface PageMapResponse {
    detailList: AccountDetailItem[]
    [key: string]: any
}

// 获取账户明细分页数据(Map格式)
export function getCouponIssuerAccountByPageMap(couponIssuerAccountByPageMapForm: CouponIssuerAccountByPageMapForm) {
    return http.Post<PageMapResponse>('/couponCenter/APP/couponIssuerAccountDetail/pageMap', couponIssuerAccountByPageMapForm)
}
