import request from '@/utils/request'

// 查询积分商品列表
export function listIntegralGoods(query) {
  return request({
    url: '/his/integralGoods/list',
    method: 'get',
    params: query
  })
}

// 查询积分商品详细
export function getIntegralGoods(goodsId) {
  return request({
    url: '/his/integralGoods/' + goodsId,
    method: 'get'
  })
}
export function importTemplate() {
  return request({
    url: '/his/integralGoods/importTemplate',
    method: 'get'
  })
}
// 新增积分商品
export function addIntegralGoods(data) {
  return request({
    url: '/his/integralGoods',
    method: 'post',
    data: data
  })
}

// 修改积分商品
export function updateIntegralGoods(data) {
  return request({
    url: '/his/integralGoods',
    method: 'put',
    data: data
  })
}

// 删除积分商品
export function delIntegralGoods(goodsId) {
  return request({
    url: '/his/integralGoods/' + goodsId,
    method: 'delete'
  })
}

// 导出积分商品
export function exportIntegralGoods(query) {
  return request({
    url: '/his/integralGoods/export',
    method: 'get',
    params: query
  })
}

// 获取选择积分商品列表
export function getChooseIntegralGoodsList(query) {
  return request({
    url: '/his/integralGoods/getChooseIntegralGoodsList',
    method: 'get',
    params: query
  })
}
