import request from '@/utils/request'

// 查询广告分佣列表
export function listProfit(query) {
  return request({
    url: '/adv/profit/list',
    method: 'get',
    params: query
  })
}

// 查询广告分佣详细
export function getProfit(id) {
  return request({
    url: '/adv/profit/' + id,
    method: 'get'
  })
}

// 新增广告分佣
export function addProfit(data) {
  return request({
    url: '/adv/profit',
    method: 'post',
    data: data
  })
}

// 修改广告分佣
export function updateProfit(data) {
  return request({
    url: '/adv/profit',
    method: 'put',
    data: data
  })
}

// 删除广告分佣
export function delProfit(id) {
  return request({
    url: '/adv/profit/' + id,
    method: 'delete'
  })
}

// 导出广告分佣
export function exportProfit(query) {
  return request({
    url: '/adv/profit/export',
    method: 'get',
    params: query
  })
}

// 查询用户可提现 和 已提现总金额
export function getWithFinishAndMayWithdraw(query) {
  return request({
    url: '/adv/profit/getWithFinishAndMayWithdraw',
    method: 'get',
    params: query
  })
}
