接入可配置文档编辑与智能取数服务

This commit is contained in:
baiyanyun
2026-07-13 14:53:14 +08:00
parent ab4e84004f
commit 474a4866d2
16 changed files with 443 additions and 9 deletions

View File

@@ -185,6 +185,12 @@ eco-market:
mcp:
proxy-base-url: ${MCP_PROXY_URL:http://localhost:8020}
intelligent-data:
service-url: ${INTELLIGENT_DATA_SERVICE_URL:http://192.168.2.106:3000/test-console}
document-editor:
service-url: ${DOCUMENT_EDITOR_SERVICE_URL:}
knife4j:
# 开启增强配置
enable: true

View File

@@ -185,6 +185,12 @@ eco-market:
mcp:
proxy-base-url: ${MCP_PROXY_URL:http://localhost:18020}
intelligent-data:
service-url: ${INTELLIGENT_DATA_SERVICE_URL:http://192.168.2.106:3000/test-console}
document-editor:
service-url: ${DOCUMENT_EDITOR_SERVICE_URL:}
knife4j:
# 开启增强配置
enable: true

View File

@@ -182,6 +182,12 @@ eco-market:
mcp:
proxy-base-url: ${MCP_PROXY_URL:http://localhost:8020}
intelligent-data:
service-url: ${INTELLIGENT_DATA_SERVICE_URL:http://192.168.2.106:3000/test-console}
document-editor:
service-url: ${DOCUMENT_EDITOR_SERVICE_URL:}
knife4j:
# 开启增强配置
enable: true

View File

@@ -182,6 +182,12 @@ eco-market:
mcp:
proxy-base-url: ${MCP_PROXY_URL:http://localhost:8020}
intelligent-data:
service-url: ${INTELLIGENT_DATA_SERVICE_URL:http://192.168.2.106:3000/test-console}
document-editor:
service-url: ${DOCUMENT_EDITOR_SERVICE_URL:}
knife4j:
# 开启增强配置
enable: true

View File

@@ -179,6 +179,12 @@ public class TenantConfigDto implements Serializable {
@Schema(description = "模型API根地址")
private String baseModelApiUrl;
@Schema(description = "智能取数服务地址")
private String intelligentDataServiceUrl;
@Schema(description = "文档编辑服务地址")
private String documentEditorServiceUrl;
public enum AuthTypeEnum {
PHONE(1, "手机"),
CAS(2, "CAS"),

View File

@@ -72,6 +72,30 @@ public class TenantConfigServiceImpl extends ServiceImpl<TenantConfigMapper, Ten
.required(true)
.sort(1)
.build());
tenantConfigDefaultList.add(TenantConfig.builder()
.name("intelligentDataServiceUrl")
.description("智能取数服务地址")
.value("http://192.168.2.106:3000/test-console")
.notice("客户端点击智能取数时加载的 HTTP 或 HTTPS 服务地址")
.placeholder("请输入智能取数服务地址")
.category(TenantConfig.ConfigCategory.BaseConfig)
.inputType(TenantConfig.InputType.Input)
.dataType(TenantConfig.DataType.String)
.required(true)
.sort(2)
.build());
tenantConfigDefaultList.add(TenantConfig.builder()
.name("documentEditorServiceUrl")
.description("文档编辑服务地址")
.value("")
.notice("客户端点击文档编辑时加载的 HTTP 或 HTTPS 服务地址")
.placeholder("请输入文档编辑服务地址")
.category(TenantConfig.ConfigCategory.BaseConfig)
.inputType(TenantConfig.InputType.Input)
.dataType(TenantConfig.DataType.String)
.required(false)
.sort(3)
.build());
tenantConfigDefaultList.add(TenantConfig.builder()
.name("siteDescription")
.description("站点介绍")

View File

@@ -38,6 +38,12 @@ public class TenantController {
@Value("${model-api-proxy.base-api-url:}")
private String baseApiUrl;
@Value("${intelligent-data.service-url:http://192.168.2.106:3000/test-console}")
private String intelligentDataServiceUrl;
@Value("${document-editor.service-url:}")
private String documentEditorServiceUrl;
@Operation(summary = "租户配置信息查询接口")
@RequestMapping(path = "/config", method = RequestMethod.GET)
public ReqResult<TenantConfigDto> getConfig() {
@@ -69,6 +75,12 @@ public class TenantController {
tenantConfigDto.setFaviconUrl(iFileAccessService.getFileUrlWithAk(tenantConfigDto.getFaviconUrl(), true));
tenantConfigDto.setSquareBanner(iFileAccessService.getFileUrlWithAk(tenantConfigDto.getSquareBanner(), true));
tenantConfigDto.setMaxFileSize(maxFileSize);
if (StringUtils.isBlank(tenantConfigDto.getIntelligentDataServiceUrl())) {
tenantConfigDto.setIntelligentDataServiceUrl(intelligentDataServiceUrl);
}
if (StringUtils.isBlank(tenantConfigDto.getDocumentEditorServiceUrl())) {
tenantConfigDto.setDocumentEditorServiceUrl(documentEditorServiceUrl);
}
if (StringUtils.isBlank(tenantConfigDto.getTemplateConfig()) || tenantConfigDto.getTemplateConfig().equals("{}")) {
tenantConfigDto.setTemplateConfig("{\"primaryColor\":\"#5147ff\",\"backgroundId\":\"bg-variant-1\",\"antdTheme\":\"light\",\"layoutStyle\":\"light\",\"navigationStyle\":\"style1\",\"timestamp\":1757425328082}");
}
@@ -108,4 +120,4 @@ public class TenantController {
I18nUtil.replaceSystemMessage(tenantConfigDto);
return ReqResult.success(tenantConfigDto);
}
}
}