diff --git a/core/core-backend/src/main/java/io/dataease/datasource/provider/MysqlEngineProvider.java b/core/core-backend/src/main/java/io/dataease/datasource/provider/MysqlEngineProvider.java index df27abc227..4b16ed8e0b 100644 --- a/core/core-backend/src/main/java/io/dataease/datasource/provider/MysqlEngineProvider.java +++ b/core/core-backend/src/main/java/io/dataease/datasource/provider/MysqlEngineProvider.java @@ -60,7 +60,7 @@ public class MysqlEngineProvider extends EngineProvider { if (StringUtils.isEmpty(strings[i])) { strings1[i] = null; } else { - strings1[i] = strings[i].replace("'", "\\'"); + strings1[i] = strings[i].replace("\\", "\\\\").replace("'", "\\'"); } } values.append("('").append(String.join("','", Arrays.asList(strings1))) diff --git a/core/core-frontend/src/views/visualized/data/datasource/index.vue b/core/core-frontend/src/views/visualized/data/datasource/index.vue index 5ffa819f6d..73c9750821 100644 --- a/core/core-frontend/src/views/visualized/data/datasource/index.vue +++ b/core/core-frontend/src/views/visualized/data/datasource/index.vue @@ -244,6 +244,11 @@ const validateDS = () => { if (status[i].status === 'Error') { error++ } + for (let i = 0; i < nodeInfo.apiConfiguration.length; i++) { + if (nodeInfo.apiConfiguration[i].name === status[i].name) { + nodeInfo.apiConfiguration[i].status = status[i].status + } + } } if (error === 0) { ElMessage.success('校验成功')