import request from '@/utils/request';

// 查询平台配置列表
export function listPlatformConfig(query: any) {
  return request({
    url: '/system/platformConfig/list',
    method: 'get',
    params: query
  });
}

// 查询平台配置详细
export function getPlatformConfig(id: number) {
  return request({
    url: '/system/platformConfig/' + id,
    method: 'get'
  });
}

// 新增平台配置
export function addPlatformConfig(data: any) {
  return request({
    url: '/system/platformConfig',
    method: 'post',
    data: data
  });
}

// 修改平台配置
export function updatePlatformConfig(data: any) {
  return request({
    url: '/system/platformConfig',
    method: 'put',
    data: data
  });
}

// 删除平台配置
export function delPlatformConfig(id: number | number[]) {
  return request({
    url: '/system/platformConfig/' + id,
    method: 'delete'
  });
}

// 批量保存平台配置
export function saveBatchPlatformConfig(data: any[]) {
  return request({
    url: '/system/platformConfig/saveBatch',
    method: 'post',
    data: data
  });
}
