import request from '@/utils/request'

// 查询充值批次记录列表
export function findBatchRecordPage(data) {
  return request({
    url: '/mapi/recharge/card/batchRecord/findPage',
    method: 'post',
    data: data
  })
}


export function updateExpireTimeByBatchNo(data) {
  return request({
    url: '/mapi/recharge/card/batchRecord/updateExpireTimeByBatchNo',
    method: 'post',
    data: data
  })
}

export function updateUseLevelByBatchNo(data) {
  return request({
    url: '/mapi/recharge/card/batchRecord/updateUseLevelByBatchNo',
    method: 'post',
    data: data
  })
}

export function listCardUseRecordByBatchNo(data) {
  return request({
    url: '/mapi/recharge/card/batchRecord/listCardUseRecordByBatchNo',
    method: 'post',
    data: data
  })
}

export function listCardDetailByBatchNo(data) {
  return request({
    url: '/mapi/recharge/card/batchRecord/listCardDetailByBatchNo',
    method: 'post',
    data: data
  })
}

// 查询充值批次
export function getOneByBatchNo(batchNo) {
  return request({
    url: '/mapi/recharge/card/batchRecord/getOneByBatchNo',
    method: 'get',
    params: { batchNo:batchNo}
  })
}

// 批次号明细详情-充值卡撤单
export function refundCardByCardId(rechargeCardId) {
  return request({
    url: '/mapi/recharge/card/batchRecord/refundCardByCardId',
    method: 'get',
    params: { rechargeCardId:rechargeCardId}
  })
}

// 批次号明细详情-充值卡删除
export function deleteCardByCardId(rechargeCardId) {
  return request({
    url: '/mapi/recharge/card/batchRecord/deleteCardByCardId',
    method: 'get',
    params: { rechargeCardId:rechargeCardId}
  })
}

//批次号明细详情-充值卡新增
export function addOneCard(data) {
  return request({
    url: '/mapi/recharge/card/batchRecord/addOneCard',
    method: 'post',
    data: data
  })
}
