import request from '@/utils/request'

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

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

// 新增投诉分类
export function addCategory(data) {
  return request({
    url: '/complaint/category',
    method: 'post',
    data: data
  })
}

// 修改投诉分类
export function updateCategory(data) {
  return request({
    url: '/complaint/category',
    method: 'put',
    data: data
  })
}

// 删除投诉分类
export function delCategory(ids) {
  return request({
    url: '/complaint/category/' + ids,
    method: 'delete'
  })
}

// 修改投诉分类状态
export function changeStatus(data) {
  return request({
    url: '/complaint/category/status',
    method: 'put',
    data: data
  })
}
