import request from '@/utils/request'

// 查询提现记录列表
export function listWithdraw(query) {
  return request({
    url: '/system/withdraw/list',
    method: 'get',
    params: query
  })
}

// 查询提现记录详细
export function getWithdraw(id) {
  return request({
    url: '/system/withdraw/' + id,
    method: 'get'
  })
}

// 新增提现记录
export function addWithdraw(data) {
  return request({
    url: '/system/withdraw',
    method: 'post',
    data: data
  })
}

// 修改提现记录
export function updateWithdraw(data) {
  return request({
    url: '/system/withdraw',
    method: 'put',
    data: data
  })
}

// 删除提现记录
export function delWithdraw(id) {
  return request({
    url: '/system/withdraw/' + id,
    method: 'delete'
  })
}

export function getuserWithdraw(id) {
  return request({
    url: '/user/user/getUserWithdrawChannelList?userId=' + id,
    method: 'get'
  })
}
// 修改提现记录
export function putuserWithdraw(data) {
  return request({
    url: '/user/user/eidtUserWithdrawChannel',
    method: 'put',
    data: data
  })
}