import { request } from '@/utils/request'

// 根据订单获取投诉记录
export function listComplaintByOrder(orderId) {
  return request({
    url: '/fulfiller/complaint/listByOrder',
    method: 'get',
    params: { orderId }
  })
}

// 分页获取履约者的投诉记录
export function listComplaintByFulfiller(query) {
  return request({
    url: '/fulfiller/complaint/pageByFulfiller',
    method: 'get',
    params: query
  })
}

// 获取我创建的投诉记录
export function listMyComplaint(query) {
  return request({
    url: '/fulfiller/complaint/pageMy',
    method: 'get',
    params: query
  })
}

// 新增投诉 @Author: Antigravity
export function addComplaint(data) {
  return request({
    url: '/fulfiller/complaint/add',
    method: 'post',
    data: data
  })
}
