import { get, post } from '../../http'

/**
 * @description: 获取系统配置
 * @return {*}
 */
export const getSysConfig = async (params: Record<string, any>) => {
  return await get<any>('/sysConfig/page', params)
}

/**
 * @description: 更新系统配置
 * @return {*}
 */
export const updateSysConfig = async (data: Record<string, any>) => {
  return await post<any>('/sysConfig/edit', {
    ...data,
    sysFlag: 'Y',
    groupCode: 'DEFAULT',
  })
}

/**
 * @description: 新增系统配置
 * @return {*}
 */
export const addSysConfig = async (data: Record<string, any>) => {
  return await post<any>('/sysConfig/add', {
    ...data,
    sysFlag: 'Y',
    groupCode: 'DEFAULT',
  })
}
