import request from '@/utils/request'

// 查询SalesPromotion列表
export function listPromotion(query) {
  return request({
    url: '/system/promotion/list',
    method: 'get',
    params: query
  })
}

// 查询SalesPromotion详细
export function getPromotion(id) {
  return request({
    url: '/system/promotion/' + id,
    method: 'get'
  })
}

// 新增SalesPromotion
export function addPromotion(data) {
  return request({
    url: '/system/promotion',
    method: 'post',
    data: data
  })
}

// 修改SalesPromotion
export function updatePromotion(data) {
  return request({
    url: '/system/promotion',
    method: 'put',
    data: data
  })
}

// 删除SalesPromotion
export function delPromotion(id) {
  return request({
    url: '/system/promotion/' + id,
    method: 'delete'
  })
}
