import request from '@/utils/request'

// 查询充值渠道列表
export function listChannel(query) {
  return request({
    url: '/bst/channel/list',
    method: 'get',
    params: query
  })
}

// 查询所有充值渠道列表
export function listAllChannel() {
  return request({
    url: '/bst/channel/listAll',
    method: 'get'
  })
}

// 查询充值渠道列表
export function listChannelByIds(ids) {
  return request({
    url: '/bst/channel/listByIds',
    method: 'post',
    headers: {
      repeatSubmit: true
    },
    data: ids
  })
}

// 查询充值渠道详细
export function getChannel(channelId) {
  return request({
    url: '/bst/channel/' + channelId,
    method: 'get'
  })
}

// 新增充值渠道
export function addChannel(data) {
  return request({
    url: '/bst/channel',
    method: 'post',
    data: data
  })
}

// 修改充值渠道
export function updateChannel(data) {
  return request({
    url: '/bst/channel',
    method: 'put',
    data: data
  })
}

// 删除充值渠道
export function delChannel(channelId) {
  return request({
    url: '/bst/channel/' + channelId,
    method: 'delete'
  })
}
