import request from '@/utils/request'

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

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

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

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

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

// 导出用户投诉
export function exportComplaint(query) {
  return request({
    url: '/user/complaint/export',
    method: 'get',
    params: query
  })
}