import request from '@/router/axios';

export const getList = (current, size, params) => {
  return request({
    url: '/api/cyzh-bussiness-user-withdraw/bussinessuserwithdraw/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const getDetail = (id) => {
  return request({
    url: '/api/cyzh-bussiness-user-withdraw/bussinessuserwithdraw/detail',
    method: 'get',
    params: {
      id
    }
  })
}

export const remove = (ids) => {
  return request({
    url: '/api/cyzh-bussiness-user-withdraw/bussinessuserwithdraw/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}

export const add = (row) => {
  return request({
    url: '/api/cyzh-bussiness-user-withdraw/bussinessuserwithdraw/submit',
    method: 'post',
    data: row
  })
}

export const update = (row) => {
  return request({
    url: '/api/cyzh-bussiness-user-withdraw/bussinessuserwithdraw/submit',
    method: 'post',
    data: row
  })
}

export const withdrawStat = (params) => {
  return request({
    url: '/api/cyzh-bussiness-user-withdraw/bussinessuserwithdraw/withdrawStat',
    method: 'get',
    params: {
      ...params,
    }
  })
}

export const payToUser = (row) => {
  return request({
    url: '/api/cyzh-bussiness-user-withdraw/bussinessuserwithdraw/payToUser',
    method: 'post',
    data: row
  })
}

