From f0829b28de7d37a31adbf28ada500c907081b266 Mon Sep 17 00:00:00 2001 From: robin <850379744@qq.com> Date: Fri, 23 Jun 2023 15:57:20 +0800 Subject: [PATCH] bugfix --- .../src/main/resources/i18n/messages.properties | 2 +- .../src/main/resources/i18n/messages_en_US.properties | 2 +- .../src/main/resources/i18n/messages_zh_CN.properties | 2 +- .../ai/chat2db/server/web/api/aspect/ConnectionInfoHandler.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/chat2db-server/chat2db-server-start/src/main/resources/i18n/messages.properties b/chat2db-server/chat2db-server-start/src/main/resources/i18n/messages.properties index a2203e59..0148a15b 100644 --- a/chat2db-server/chat2db-server-start/src/main/resources/i18n/messages.properties +++ b/chat2db-server/chat2db-server-start/src/main/resources/i18n/messages.properties @@ -1,4 +1,4 @@ -common.businessError=请尝试重新提交或者刷新页面 +common.businessError=Please try resubmitting or refreshing the page later common.systemError=系统开小差啦,请尝试刷新页面或者联系管理员 common.needLoggedIn=需要登陆页面 common.redirect=重定向页面 diff --git a/chat2db-server/chat2db-server-start/src/main/resources/i18n/messages_en_US.properties b/chat2db-server/chat2db-server-start/src/main/resources/i18n/messages_en_US.properties index a2203e59..0148a15b 100644 --- a/chat2db-server/chat2db-server-start/src/main/resources/i18n/messages_en_US.properties +++ b/chat2db-server/chat2db-server-start/src/main/resources/i18n/messages_en_US.properties @@ -1,4 +1,4 @@ -common.businessError=请尝试重新提交或者刷新页面 +common.businessError=Please try resubmitting or refreshing the page later common.systemError=系统开小差啦,请尝试刷新页面或者联系管理员 common.needLoggedIn=需要登陆页面 common.redirect=重定向页面 diff --git a/chat2db-server/chat2db-server-start/src/main/resources/i18n/messages_zh_CN.properties b/chat2db-server/chat2db-server-start/src/main/resources/i18n/messages_zh_CN.properties index a2203e59..8dc0f5d2 100644 --- a/chat2db-server/chat2db-server-start/src/main/resources/i18n/messages_zh_CN.properties +++ b/chat2db-server/chat2db-server-start/src/main/resources/i18n/messages_zh_CN.properties @@ -1,5 +1,5 @@ common.businessError=请尝试重新提交或者刷新页面 -common.systemError=系统开小差啦,请尝试刷新页面或者联系管理员 +common.systemError=系统发生异常,可在帮助中查看异常详情,如无法解决,可关注微信公众号Text2SQL咨询帮助 common.needLoggedIn=需要登陆页面 common.redirect=重定向页面 common.paramError=您输入的参数异常 diff --git a/chat2db-server/chat2db-server-web/chat2db-server-web-api/src/main/java/ai/chat2db/server/web/api/aspect/ConnectionInfoHandler.java b/chat2db-server/chat2db-server-web/chat2db-server-web-api/src/main/java/ai/chat2db/server/web/api/aspect/ConnectionInfoHandler.java index 2029d365..0871a288 100644 --- a/chat2db-server/chat2db-server-web/chat2db-server-web-api/src/main/java/ai/chat2db/server/web/api/aspect/ConnectionInfoHandler.java +++ b/chat2db-server/chat2db-server-web/chat2db-server-web-api/src/main/java/ai/chat2db/server/web/api/aspect/ConnectionInfoHandler.java @@ -60,7 +60,7 @@ public class ConnectionInfoHandler { public ConnectInfo toInfo(Long dataSourceId, String database, Long consoleId) { DataResult result = dataSourceService.queryById(dataSourceId); DataSource dataSource = result.getData(); - if (!result.success() && dataSource != null) { + if (!result.success() && dataSource == null) { throw new ParamBusinessException("dataSourceId"); } ConnectInfo connectInfo = new ConnectInfo();