import request from '@/utils/request'

// 分页查询推广账号列表
export function pagePromotionAccount(query) {
  return request({
    url: '/adv/promotion-account/page',
    method: 'get',
    params: query
  })
}

// 根据ID查询推广账号详情
export function getPromotionAccount(id) {
  return request({
    url: '/adv/promotion-account/' + id,
    method: 'get'
  })
}

// 创建推广账号
export function addPromotionAccount(data) {
  return request({
    url: '/adv/promotion-account',
    method: 'post',
    data: data
  })
}

// 更新推广账号
export function updatePromotionAccount(id, data) {
  return request({
    url: '/adv/promotion-account/' + id,
    method: 'put',
    data: data
  })
}

// 删除推广账号
export function delPromotionAccount(id) {
  return request({
    url: '/adv/promotion-account/' + id,
    method: 'delete'
  })
}

// 批量删除推广账号
export function batchDelPromotionAccount(ids) {
  return request({
    url: '/adv/promotion-account/batch',
    method: 'delete',
    data: ids
  })
}

