import apiRequest from '@/network/http/apiRequest'

/**
 * 列表查询基础配置
 * @param data
 * @returns
 */
export function getSettingByList(data: any) {
  return apiRequest({
    url: '/setting',
    method: 'GET',
    params: data,
  })
}

/**
 * 基于ID查询基础配置
 * @param settingId 配置项ID
 * @returns
 */
export function getSettingById(settingId: number) {
  return apiRequest({
    url: `/setting/${settingId}`,
    method: 'GET',
  })
}

/**
 * 更新基础配置
 * @param data
 * @returns
 */
export function updateSetting(data: any) {
  return apiRequest({
    url: '/setting/update',
    method: 'PUT',
    data,
  })
}
