import request from '@/utils/request'


// 查询用户投诉列表
export function listComplaint(data) {
  return request({
    url: 'store/complaint/list',
    method: 'post',
    data: data
  })
}

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



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



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

// 查询投诉消息记录列表
export function listMsg(query) {
  return request({
    url: 'store/msg/list',
    method: 'get',
    params: query
  })
}

// 查询投诉消息记录详细
export function getMsg(id) {
  return request({
    url: 'store/msg/' + id,
    method: 'get'
  })
}

// 新增投诉消息记录
export function addMsg(data) {
  return request({
    url: 'store/msg',
    method: 'post',
    data: data
  })
}

// 修改投诉消息记录
export function updateMsg(data) {
  return request({
    url: 'store/msg',
    method: 'put',
    data: data
  })
}

// 删除投诉消息记录
export function delMsg(id) {
  return request({
    url: 'store/msg/' + id,
    method: 'delete'
  })
}

// 导出投诉消息记录
export function exportMsg(query) {
  return request({
    url: 'store/msg/export',
    method: 'get',
    params: query
  })
}

// 查询用户投诉列表
export function completeComplaint(data) {
  return request({
    url: 'store/complaint/completeComplaint',
    method: 'post',
    data: data
  })
}
