import request from '@/utils/request'

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

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

// 新增商品
export function addMallGoodsGoods(data) {
  return request({
    url: '/mall/mallGoodsGoods',
    method: 'post',
    data: data
  })
}

// 修改商品
export function updateMallGoodsGoods(data) {
  return request({
    url: '/mall/mallGoodsGoods',
    method: 'put',
    data: data
  })
}

// 删除商品
export function delMallGoodsGoods(id) {
  return request({
    url: '/mall/mallGoodsGoods/' + id,
    method: 'delete'
  })
}

// 导出商品
export function exportMallGoodsGoods(query) {
  return request({
    url: '/mall/mallGoodsGoods/export',
    method: 'get',
    params: query
  })
}
// 导出商品
export function getClassList() {
  return request({
    url: '/mall/mallGoodsClass/getClassList',
    method: 'get'
  })
}
// 导出商品
export function getSpecList() {
  return request({
    url: '/mall/mallGoodsSpec/getSpecList',
    method: 'get'
  })
}
