import request from '@/utils/request'

// 查询游戏开奖记录列表
export function listLottery(query) {
  return request({
    url: '/business/lottery/list',
    method: 'get',
    params: query
  })
}

// 查询所有开奖选项
export function allList(query) {
  return request({
    url: '/business/game_item/allList',
    method: 'get',
    params: query
  })
}

// 查询游戏开奖记录详细
export function getLottery(id) {
  return request({
    url: '/business/lottery/' + id,
    method: 'get'
  })
}

// 新增游戏开奖记录
export function addLottery(data) {
  return request({
    url: '/business/lottery',
    method: 'post',
    data: data
  })
}

// 手动开奖记录
export function kjLottery(data) {
  return request({
    url: '/business/lottery/addLottery',
    method: 'post',
    data: data
  })
}

// 修改游戏开奖记录
export function updateLottery(data) {
  return request({
    url: '/business/lottery',
    method: 'put',
    data: data
  })
}

// 删除游戏开奖记录
export function delLottery(id) {
  return request({
    url: '/business/lottery/' + id,
    method: 'delete'
  })
}
