配置管理anon

This commit is contained in:
guixinman
2025-06-19 11:18:01 +08:00
parent c625dbc7e1
commit 88ffe7921e

View File

@@ -31,19 +31,10 @@ public class AnonConfigController {
private ConfigService configService; private ConfigService configService;
@GetMapping("/appVersion") @GetMapping("/code/{configCode}")
public AlitaResult<String> getAppVersion() { public AlitaResult<ConfigDTO> getAppVersion(@PathVariable("configCode") String configCode) {
String value = ""; ConfigDTO configDto = configService.getConfigDto(configCode, CommonConstants.PLATFORM_ORG_ID, Boolean.TRUE);
ConfigDTO configDto = configService.getConfigDto("APP_VERSION_CONFIG", CommonConstants.PLATFORM_ORG_ID, Boolean.TRUE); return AlitaResult.success(configDto);
String configValue = configDto.getConfigValue();
if (StringUtils.isNotBlank(configValue)) {
List<AppVersionConfigInfo> appVersionConfigInfos = JsonUtils.toList(configValue, AppVersionConfigInfo.class);
if (CollectionUtils.isNotEmpty(appVersionConfigInfos)) {
value = JsonUtils.toJsonString(appVersionConfigInfos.get(0));
}
}
return AlitaResult.success(value);
} }