import request from '@/utils/request'

// 查询商品组合套餐列表
export function listStoreProductPackage(query) {
  return request({
    url: '/store/store/storeProductPackage/list',
    method: 'get',
    params: query
  })
}

// 查询商品组合套餐详细
export function getStoreProductPackage(packageId) {
  return request({
    url: '/store/store/storeProductPackage/' + packageId,
    method: 'get'
  })
}

// 新增商品组合套餐
export function addStoreProductPackage(data) {
  return request({
    url: '/store/store/storeProductPackage',
    method: 'post',
    data: data
  })
}

// 修改商品组合套餐
export function updateStoreProductPackage(data) {
  return request({
    url: '/store/store/storeProductPackage',
    method: 'put',
    data: data
  })
}

// 删除商品组合套餐
export function delStoreProductPackage(packageId) {
  return request({
    url: '/store/store/storeProductPackage/' + packageId,
    method: 'delete'
  })
}

// 导出商品组合套餐
export function exportStoreProductPackage(query) {
  return request({
    url: '/store/store/storeProductPackage/export',
    method: 'get',
    params: query
  })
}


// 批量修改商品组合套餐
export function modifyStoreProductPackages(data) {
  return request({
    url: '/store/store/storeProductPackage/modifyMore',
    method: 'post',
    data: data
  })
}

export function packageBySearch(query) {
  return request({
    url: '/store/store/storeProductPackage/listBySearch',
    method: 'get',
    params: query
  })
}
