import request from '@/utils/request'

// 查询充值订单列表
export function listRechargeOrder(query) {
  return request({
    url: '/cai/rechargeOrder/list',
    method: 'get',
    params: query
  })
}

export function totalPageRechargeOrder(query) {
  return request({
    url: '/cai/rechargeOrder/totalPage',
    method: 'get',
    params: query
  })
}


// 查询充值订单详细
export function getRechargeOrder(id) {
  return request({
    url: '/cai/rechargeOrder/' + id,
    method: 'get'
  })
}

export function getRechargeOrderByTraceId(traceId) {
  return request({
    url: '/cai/rechargeOrder/trace',
    method: 'get',
    params: {traceId}
  })
}

// 新增充值订单
export function addRechargeOrder(data) {
  return request({
    url: '/cai/rechargeOrder',
    method: 'post',
    data: data
  })
}

// 修改充值订单
export function updateRechargeOrder(data) {
  return request({
    url: '/cai/rechargeOrder',
    method: 'put',
    data: data
  })
}

// 删除充值订单
export function delRechargeOrder(id) {
  return request({
    url: '/cai/rechargeOrder/' + id,
    method: 'delete'
  })
}

export function listOrderLogsByOrderNo(queryParams) {
  return request({
    url: '/cai/orderLogs/allByOrderNo',
    method: 'get',
    params: queryParams
  })
}


export function checkRechargeOrder(orderNo,payType) {
  return request({
    url: '/cai/rechargeOrder/checkPay',
    method: 'get',
    params: {orderNo,payType}
  })
}


export function getCurrentDayUser() {
  return request({
    url: '/cai/fastPayTotal/getCurrentDay',
    method: 'get',
  })
}


export function fastPayTotalList(query) {
  return request({
    url: '/cai/fastPayTotal/list',
    method: 'get',
    params: query
  })
}

