import request from '@/utils/request'

// 查询拼团商品列表
export function listMallCombineGoods(query) {
  return request({
    url: '/mall/mallCombineGoods/list',
    method: 'get',
    params: query
  })
}

// 查询拼团商品详细
export function getMallCombineGoods(combineId) {
  return request({
    url: '/mall/mallCombineGoods/' + combineId,
    method: 'get'
  })
}

// 新增拼团商品
export function addMallCombineGoods(data) {
  return request({
    url: '/mall/mallCombineGoods',
    method: 'post',
    data: data
  })
}

// 修改拼团商品
export function updateMallCombineGoods(data) {
  return request({
    url: '/mall/mallCombineGoods',
    method: 'put',
    data: data
  })
}

// 删除拼团商品
export function delMallCombineGoods(combineId) {
  return request({
    url: '/mall/mallCombineGoods/' + combineId,
    method: 'delete'
  })
}

// 导出拼团商品
export function exportMallCombineGoods(query) {
  return request({
    url: '/mall/mallCombineGoods/export',
    method: 'get',
    params: query
  })
}

// 拼团商品可选商品列表
export function enableCombineGoodsList(query) {
  return request({
    url: '/mall/mallCombineGoods/enableCombineGoodsList',
    method: 'get',
    params: query
  })
}
