Browse Source

fix:修复ObjectMapperConfiguration配置文件冲突问题,新增SqlServer数据集

wangkang4 1 năm trước cách đây
mục cha
commit
17ab99f6f5

+ 3 - 1
DataRoom/dataroom-core/src/main/java/com/gccloud/dataroom/core/config/ObjectMapperConfiguration.java

@@ -7,6 +7,7 @@ import com.fasterxml.jackson.datatype.jsonorg.JsonOrgModule;
 import com.gccloud.dataroom.core.constant.DataRoomConst;
 import lombok.extern.slf4j.Slf4j;
 import org.json.JSONArray;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
 import org.springframework.context.annotation.Configuration;
 
@@ -15,7 +16,8 @@ import javax.annotation.Resource;
 
 @Slf4j
 @Configuration
-@ConditionalOnProperty(prefix = "gc.starter.dataroom.component", name = "ObjectMapperConfiguration", havingValue = "ObjectMapperConfiguration", matchIfMissing = true)
+@ConditionalOnMissingClass(value = "com.gccloud.dashboard.core.config.ObjectMapperConfiguration")
+//@ConditionalOnProperty(prefix = "gc.starter.dataroom.component", name = "ObjectMapperConfiguration", havingValue = "ObjectMapperConfiguration", matchIfMissing = true)
 public class ObjectMapperConfiguration {
 
     @Resource

+ 14 - 1
data-room-ui/packages/DataSetManagement/src/StoredProcedureEditForm.vue

@@ -143,6 +143,7 @@
                     filterable
                     placeholder="请选择数据源"
                     :disabled="!isEdit"
+                    @change="setSqlProcess($event)"
                   >
                     <el-option
                       v-for="source in sourceList"
@@ -211,7 +212,7 @@
               />
               <div class="bs-codemirror-bottom-text">
                 示例:
-                <strong>call 存储过程名称(<span style="color: red;">${参数名称}</span>,?)</strong>
+                <strong>call 存储过程名称(<span style="color: red;">${参数名称}</span>,?),SqlServer数据源使用:exec 存储过程名称 <span style="color: red;">@参数名称</span>=?</strong>
               </div>
             </div>
             <div style="text-align: center; padding: 16px 0;">
@@ -793,6 +794,18 @@ export default {
         this.sourceList = data
       })
     },
+    setSqlProcess (v, e) {
+      console.log('value:' + v)
+      for (let i = 0; i < this.sourceList.length; i++) {
+        if (this.sourceList[i].id === v) {
+          if (this.sourceList[i].sourceType === 'sqlserver') {
+            this.dataForm.sqlProcess = 'exec '
+          } else {
+            this.dataForm.sqlProcess = 'call '
+          }
+        }
+      }
+    },
     /**
      * 打开参数配置弹窗
      */

+ 3 - 2
data-room-ui/packages/DataSourceManagement/src/setDatasource.vue

@@ -227,7 +227,8 @@ export default {
         { name: 'Mysql', code: 'mysql' },
         { name: 'ClickHouse', code: 'clickhouse' },
         { name: 'PostgreSQL', code: 'postgresql' },
-        { name: 'Oracle', code: 'oracle' }
+        { name: 'Oracle', code: 'oracle' },
+        { name: 'Sqlserver', code: 'sqlserver' }
       ],
       driverCLassList: [
         { code: 'mysqlDriver', name: 'com.mysql.jdbc.Driver' },
@@ -338,7 +339,7 @@ export default {
         case 'com.ibm.db2.jcc.DB2Driver':
           return 'jdbc:db2://localhost:5000/db_name'
         case 'com.microsoft.sqlserver.jdbc.SQLServerDriver':
-          return 'jdbc:microsoft:sqlserver://localhost:1433DatabaseName=db_name'
+          return 'jdbc:sqlserver://localhost:1433;databaseName=mydatabase'
         case 'org.postgresql.Driver':
           return 'jdbc:postgresql://localhost:13308/db_name'
         case 'org.apache.hive.jdbc.HiveDriver':