import request from '@/utils/request'

// 秒杀可选商品列表
export function enableSeckillGoodsList(query) {
  return request({
    url: '/mall/mallSeckillGoods/enableSeckillGoodsList',
    method: 'get',
    params: query
  })
}
// 查询秒杀商品列表
export function listMallSeckillGoods(query) {
  return request({
    url: '/mall/mallSeckillGoods/list',
    method: 'get',
    params: query
  })
}

// 查询秒杀商品详细
export function getMallSeckillGoods(id) {
  return request({
    url: '/mall/mallSeckillGoods/' + id,
    method: 'get'
  })
}

// 新增秒杀商品
export function addMallSeckillGoods(data) {
  return request({
    url: '/mall/mallSeckillGoods',
    method: 'post',
    data: data
  })
}

// 修改秒杀商品
export function updateMallSeckillGoods(data) {
  return request({
    url: '/mall/mallSeckillGoods',
    method: 'put',
    data: data
  })
}

// 删除秒杀商品
export function delMallSeckillGoods(id) {
  return request({
    url: '/mall/mallSeckillGoods/' + id,
    method: 'delete'
  })
}

// 导出秒杀商品
export function exportMallSeckillGoods(query) {
  return request({
    url: '/mall/mallSeckillGoods/export',
    method: 'get',
    params: query
  })
}
