This commit is contained in:
南浔
2025-06-16 19:50:39 +08:00
7 changed files with 60 additions and 4 deletions
@@ -6,5 +6,6 @@ namespace Apimanager_backend.Services
{
public Task<SystemConfig> UpdateSystemConfig(string configName,string configBody);
public Task<SystemConfig> GetSystemConfig(string configName);
public Task<List<SystemConfig>> GetAllSystemConfig();
}
}
@@ -36,5 +36,15 @@ namespace Apimanager_backend.Services
}
return config;
}
public async Task<List<SystemConfig>> GetAllSystemConfig()
{
var config = await apiContext.SystemConfigs.ToListAsync();
if (config == null)
{
throw new BaseException(5006, "配置不存在");
}
return config;
}
}
}