import request from '@/utils/request'

// 查询投诉列表
export function listComplaint(query) {
  return request({
    url: '/system/complaint/list',
    method: 'get',
    params: query
  })
}

// 查询投诉详细
export function getComplaint(id) {
  return request({
    url: '/system/complaint/' + id,
    method: 'get'
  })
}

// 新增投诉
export function addComplaint(data) {
  return request({
    url: '/system/complaint',
    method: 'post',
    data: data
  })
}

// 修改投诉
export function updateComplaint(data) {
  return request({
    url: '/system/complaint',
    method: 'put',
    data: data
  })
}

// 删除投诉
export function delComplaint(id) {
  return request({
    url: '/system/complaint/' + id,
    method: 'delete'
  })
}
