import { defHttp } from '/@/utils/http/axios'; import { setParams } from '/@/utils/index'; enum Api { infraStorageconfigQueryPage = '/infra/storageconfig/query/page', infraStorageconfigDetail = '/infra/storageconfig/detail', infraStorageconfigAdd = '/infra/storageconfig/add', infraStorageconfigEdit = '/infra/storageconfig/edit', infraStorageconfigRemove = '/infra/storageconfig/removeByIds', } /** * * @author fan * @date 2023/05/04 14:21 * @description: 根据条件查询文件存储配置列表,权限 - infra:storageconfig:query * @method: POST * @param: * {String} name 文件配置名称 * {String} type 存储类型 * @return: * {String} code 文件配置编码 * {String} name 文件配置名称 * {Boolean} master 主配置 * {String} type 存储类型 * {String} config 文件配置 * {String} remark 备注 */ export const infraStorageconfigQueryPage = (params?: object) => { return defHttp.post({ url: Api.infraStorageconfigQueryPage, params: setParams(params) }); }; /** * * @author fan * @date 2023/05/04 14:21 * @description: 根据id查询文件存储配置详细信息,权限 - infra:storageconfig:query * @method: GET * @param: id 文件存储配置主键id * @return: * {String} code 文件配置编码 * {String} name 文件配置名称 * {Boolean} master 主配置 * {String} type 存储类型 * {String} config 文件配置 * {String} remark 备注 */ export const infraStorageconfigDetail = (id: string) => { return defHttp.get({ url: Api.infraStorageconfigDetail + '/' + id }); }; /** * * @author fan * @date 2023/05/04 14:21 * @description: 添加文件存储配置,权限 - infra:storageconfig:add * @method: POST * @param: * {String} code 文件配置编码 * {String} name 文件配置名称 * {Boolean} master 主配置 * {String} type 存储类型 * {String} config 文件配置 * {String} remark 备注 * @return: * 0 添加失败 * 1 添加成功 */ export const infraStorageconfigAdd = (params?: object) => { return defHttp.post({ url: Api.infraStorageconfigAdd, params: params }); }; /** * * @author fan * @date 2023/05/04 14:21 * @description: 通过主键id编辑文件存储配置,权限 - infra:storageconfig:edit * @method: POST * @param: * {String} code 文件配置编码 * {String} name 文件配置名称 * {Boolean} master 主配置 * {String} type 存储类型 * {String} config 文件配置 * {String} remark 备注 * @return: * 0 编辑失败 * 1 编辑成功 */ export const infraStorageconfigEdit = (params?: object) => { return defHttp.post({ url: Api.infraStorageconfigEdit, params: params }); }; /** * @description: 删除,权限 - infra:storageconfig:remove * @method: POST */ export const infraStorageconfigRemove = (params: Array) => { return defHttp.post({ url: Api.infraStorageconfigRemove, params: params }); };