import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { ComplaintVO, ComplaintQuery } from '@/api/system/complaint/types';

/**
 * 查询投诉建议列表
 */
export const listComplaint = (query?: ComplaintQuery): AxiosPromise<ComplaintVO[]> => {
  return request({
    url: '/system/complaint/list',
    method: 'get',
    params: query
  });
};

/**
 * 删除投诉建议
 */
export const delComplaint = (id: string | number | Array<string | number>) => {
  return request({
    url: '/system/complaint/' + id,
    method: 'delete'
  });
};
