import request from '@/utils/request'

// 创建经销商经销产品
export function createDealerGoods(data) {
  return request({
    url: '/basic/dealer-goods/create',
    method: 'post',
    data: data
  })
}

// 更新经销商经销产品
export function updateDealerGoods(data) {
  return request({
    url: '/basic/dealer-goods/update',
    method: 'put',
    data: data
  })
}

// 删除经销商经销产品
export function deleteDealerGoods(id) {
  return request({
    url: '/basic/dealer-goods/delete?id=' + id,
    method: 'delete'
  })
}

// 获得经销商经销产品 
export function getDealerGoods(id) {
  return request({
    url: '/basic/dealer-goods/get?id=' + id,
    method: 'get'
  })
}

// 根据条件获得经销商经销产品列表
export function getDealerGoodsQuery(query) {
  return request({
    url: '/basic/dealer-goods/listQuery',
    method: 'get',
    params: query
  })
}

// 获得经销商经销产品分页
export function getDealerGoodsPage(query) {
  return request({
    url: '/basic/dealer-goods/page',
    method: 'get',
    params: query
  })
}
