import request from '@/utils/request'

// 查询app商品单位列表
export function listMallAppGoodsUnit(query) {
  return request({
    url: '/mall/mallAppGoodsUnit/list',
    method: 'get',
    params: query
  })
}

// 查询app商品单位详细
export function getMallAppGoodsUnit(goodsUnitId) {
  return request({
    url: '/mall/mallAppGoodsUnit/' + goodsUnitId,
    method: 'get'
  })
}

// 新增app商品单位
export function addMallAppGoodsUnit(data) {
  return request({
    url: '/mall/mallAppGoodsUnit',
    method: 'post',
    data: data
  })
}

// 修改app商品单位
export function updateMallAppGoodsUnit(data) {
  return request({
    url: '/mall/mallAppGoodsUnit',
    method: 'put',
    data: data
  })
}

// 删除app商品单位
export function delMallAppGoodsUnit(goodsUnitId) {
  return request({
    url: '/mall/mallAppGoodsUnit/' + goodsUnitId,
    method: 'delete'
  })
}

// 导出app商品单位
export function exportMallAppGoodsUnit(query) {
  return request({
    url: '/mall/mallAppGoodsUnit/export',
    method: 'get',
    params: query
  })
}