mirror of
https://gitee.com/dromara/dbswitch.git
synced 2025-08-29 08:54:00 +00:00
修复issue反馈的问题
This commit is contained in:
@@ -41,17 +41,14 @@
|
||||
</template>
|
||||
<el-table-column property="driverVersion"
|
||||
label="驱动版本号"
|
||||
min-width="15%"></el-table-column>
|
||||
min-width="30%"></el-table-column>
|
||||
<el-table-column property="driverClass"
|
||||
label="驱动类名"
|
||||
min-width="20%"></el-table-column>
|
||||
min-width="30%"></el-table-column>
|
||||
<el-table-column property="jarFiles"
|
||||
:formatter="formatJarFileList"
|
||||
label="驱动JAR名称"
|
||||
min-width="30%"></el-table-column>
|
||||
<el-table-column property="driverPath"
|
||||
label="驱动版本路径"
|
||||
min-width="50%"></el-table-column>
|
||||
min-width="40%"></el-table-column>
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
|
@@ -9,7 +9,6 @@
|
||||
/////////////////////////////////////////////////////////////
|
||||
package com.gitee.dbswitch.admin.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.gitee.dbswitch.admin.common.exception.DbswitchException;
|
||||
import com.gitee.dbswitch.admin.common.response.PageResult;
|
||||
import com.gitee.dbswitch.admin.common.response.Result;
|
||||
@@ -18,13 +17,13 @@ import com.gitee.dbswitch.admin.controller.converter.AssignmentDetailConverter;
|
||||
import com.gitee.dbswitch.admin.controller.converter.AssignmentInfoConverter;
|
||||
import com.gitee.dbswitch.admin.controller.converter.AssignmentsConverter;
|
||||
import com.gitee.dbswitch.admin.dao.AssignmentConfigDAO;
|
||||
import com.gitee.dbswitch.admin.dao.AssignmentJobDAO;
|
||||
import com.gitee.dbswitch.admin.dao.AssignmentTaskDAO;
|
||||
import com.gitee.dbswitch.admin.dao.DatabaseConnectionDAO;
|
||||
import com.gitee.dbswitch.admin.entity.AssignmentConfigEntity;
|
||||
import com.gitee.dbswitch.admin.entity.AssignmentJobEntity;
|
||||
import com.gitee.dbswitch.admin.entity.AssignmentTaskEntity;
|
||||
import com.gitee.dbswitch.admin.entity.DatabaseConnectionEntity;
|
||||
import com.gitee.dbswitch.admin.mapper.AssignmentJobMapper;
|
||||
import com.gitee.dbswitch.admin.model.request.AssigmentCreateRequest;
|
||||
import com.gitee.dbswitch.admin.model.request.AssigmentUpdateRequest;
|
||||
import com.gitee.dbswitch.admin.model.request.AssignmentSearchRequest;
|
||||
@@ -64,6 +63,9 @@ public class AssignmentService {
|
||||
@Resource
|
||||
private AssignmentConfigDAO assignmentConfigDAO;
|
||||
|
||||
@Resource
|
||||
private AssignmentJobDAO assignmentJobDAO;
|
||||
|
||||
@Resource
|
||||
private ScheduleService scheduleService;
|
||||
|
||||
@@ -73,9 +75,6 @@ public class AssignmentService {
|
||||
@Resource
|
||||
private DriverLoadService driverLoadService;
|
||||
|
||||
@Resource
|
||||
private AssignmentJobMapper assignmentJobMapper;
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AssignmentInfoResponse createAssignment(AssigmentCreateRequest request) {
|
||||
AssignmentTaskEntity assignment = request.toAssignmentTask();
|
||||
@@ -351,30 +350,26 @@ public class AssignmentService {
|
||||
AssignmentsDataResponse assignmentsDataResponse = ConverterFactory.getConverter(AssignmentsConverter.class)
|
||||
.convert(assignmentTaskEntity);
|
||||
|
||||
AssignmentConfigEntity assignmentConfigEntity = this.assignmentConfigDAO.getByAssignmentTaskId(id);
|
||||
AssignmentConfigEntity assignmentConfigEntity = assignmentConfigDAO.getByAssignmentTaskId(id);
|
||||
|
||||
Long sourceConnectionId = assignmentConfigEntity.getSourceConnectionId();
|
||||
DatabaseConnectionEntity databaseConnectionEntity = this.databaseConnectionDAO.getById(sourceConnectionId);
|
||||
DatabaseConnectionEntity databaseConnectionEntity = databaseConnectionDAO.getById(sourceConnectionId);
|
||||
String sourceSchema = assignmentConfigEntity.getSourceSchema();
|
||||
assignmentsDataResponse.setSourceSchema(sourceSchema);
|
||||
String sourceType = databaseConnectionEntity.getType().getName();
|
||||
assignmentsDataResponse.setSourceType(sourceType);
|
||||
|
||||
Long targetConnectionId = assignmentConfigEntity.getTargetConnectionId();
|
||||
DatabaseConnectionEntity databaseConnectionEntity1 = this.databaseConnectionDAO.getById(targetConnectionId);
|
||||
DatabaseConnectionEntity databaseConnectionEntity1 = databaseConnectionDAO.getById(targetConnectionId);
|
||||
String targetSchema = assignmentConfigEntity.getTargetSchema();
|
||||
assignmentsDataResponse.setTargetSchema(targetSchema);
|
||||
String targetType = databaseConnectionEntity1.getType().getName();
|
||||
assignmentsDataResponse.setTargetType(targetType);
|
||||
|
||||
AssignmentJobEntity assignmentJobEntity = this.assignmentJobMapper.selectOne(
|
||||
new LambdaQueryWrapper<AssignmentJobEntity>()
|
||||
.eq(AssignmentJobEntity::getAssignmentId, assignmentsDataResponse.getId())
|
||||
.orderByDesc(AssignmentJobEntity::getCreateTime)
|
||||
.last(" limit 1 "));
|
||||
Integer status = (assignmentJobEntity == null || assignmentJobEntity.getStatus() == null) ?
|
||||
JobStatusEnum.INIT.getValue() :
|
||||
assignmentJobEntity.getStatus();
|
||||
AssignmentJobEntity assignmentJobEntity = assignmentJobDAO.getLatestJobEntity(id);
|
||||
Integer status = (assignmentJobEntity == null || assignmentJobEntity.getStatus() == null)
|
||||
? JobStatusEnum.INIT.getValue()
|
||||
: assignmentJobEntity.getStatus();
|
||||
assignmentsDataResponse.setRunStatus(JobStatusEnum.of(status).getName());
|
||||
assignmentsDataResponses.add(assignmentsDataResponse);
|
||||
}
|
||||
|
@@ -1 +1 @@
|
||||
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>异构数据迁移工具</title><link href=/static/css/app.48fb2adc31db789f5ffbeccb7b71c011.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.125e7b77fc066142d0ea.js></script><script type=text/javascript src=/static/js/vendor.8200341f98478c8f7552.js></script><script type=text/javascript src=/static/js/app.36911b44fc7ed34e7641.js></script></body></html>
|
||||
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>异构数据迁移工具</title><link href=/static/css/app.f0e8b5065a7b737d46659aa49052e78a.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.abc11e34d797dee7d4d2.js></script><script type=text/javascript src=/static/js/vendor.8200341f98478c8f7552.js></script><script type=text/javascript src=/static/js/app.36911b44fc7ed34e7641.js></script></body></html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,2 +0,0 @@
|
||||
webpackJsonp([19],{WfA7:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a={data:function(){return{dialogVisible:!1,loading:!0,connectionTypes:[],versionDrivers:[],isActive:-1}},methods:{loadConnectionTypes:function(){var t=this;this.$http({method:"GET",url:"/dbswitch/admin/api/v1/connection/types"}).then(function(e){0===e.data.code?(t.connectionTypes=e.data.data,t.handleChooseClick("MYSQL",0)):e.data.message&&alert("初始化数据库类型信息失败:"+e.data.message)})},handleChooseClick:function(t,e){var i=this;this.isActive=e,this.$http.get("/dbswitch/admin/api/v1/connection/"+t+"/drivers").then(function(t){0===t.data.code?i.versionDrivers=t.data.data:t.data.message&&alert("查询驱动版本信息失败,"+t.data.message)})},handleClose:function(t){this.$confirm("确认关闭?").then(function(e){t()}).catch(function(t){})},formatJarFileList:function(t,e){return t[e.property].join(";\n")}},created:function(){this.loadConnectionTypes()},beforeDestroy:function(){}},n={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("el-card",[i("div",{staticClass:"container"},[i("el-card",{staticClass:"box-card"},[i("div",{staticClass:"clearfix",attrs:{slot:"header",align:"center"},slot:"header"},[i("span",[i("b",[t._v("数据库产品类型列表")])])]),t._v(" "),i("div",{staticClass:"navsBox"},[i("el-scrollbar",{staticStyle:{height:"600px"}},[i("ul",t._l(t.connectionTypes,function(e,a){return i("li",{key:a,class:{active:a==t.isActive},on:{click:function(i){return t.handleChooseClick(e.type,a)}}},[t._v("["+t._s(e.id)+"] "+t._s(e.name)+"\n ")])}),0)])],1)]),t._v(" "),i("div",{staticClass:"contentBox"},[i("div",{staticStyle:{margin:"10px 5px"},attrs:{align:"right",width:"95%"}},[i("el-button",{attrs:{type:"primary",size:"mini",icon:"el-icon-document-add"},on:{click:function(e){t.dialogVisible=!0}}},[t._v("添加\n ")])],1),t._v(" "),i("el-table",{attrs:{"header-cell-style":{background:"#eef1f6",color:"#606266"},data:t.versionDrivers,size:"small",stripe:"",border:""}},[i("template",{slot:"empty"},[i("span",[t._v("单击左侧数据库类型来查看对应的驱动版本信息")])]),t._v(" "),i("el-table-column",{attrs:{property:"driverVersion",label:"驱动版本号","min-width":"15%"}}),t._v(" "),i("el-table-column",{attrs:{property:"driverClass",label:"驱动类名","min-width":"20%"}}),t._v(" "),i("el-table-column",{attrs:{property:"jarFiles",formatter:t.formatJarFileList,label:"驱动JAR名称","min-width":"30%"}}),t._v(" "),i("el-table-column",{attrs:{property:"driverPath",label:"驱动版本路径","min-width":"50%"}})],2)],1)],1)]),t._v(" "),i("el-dialog",{attrs:{title:"添加说明",visible:t.dialogVisible,width:"40%","before-close":t.handleClose},on:{"update:visible":function(e){t.dialogVisible=e}}},[i("span",[t._v("请按照驱动路径所在的目录${DBSWITCH_HOME}/drivers下,在数据库类型为名称的目录下,以驱动版本号为名称创建目录并放置对应的驱动jar文件,然后重启即可生效。具体可参考https://gitee.com/inrgihc/dbswitch/tree/master/drivers下的目录结构。")]),t._v(" "),i("span"),t._v(" "),i("span",[t._v("特殊说明:驱动版本目录下的所有JAR必须无任何外部依赖,否则,也需将其依赖JAR一起放置到对应的目录下。")]),t._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(e){t.dialogVisible=!1}}},[t._v("取 消")]),t._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:function(e){t.dialogVisible=!1}}},[t._v("确 定")])],1)])],1)},staticRenderFns:[]};var s=i("VU/8")(a,n,!1,function(t){i("djDS")},"data-v-400971a6",null);e.default=s.exports},djDS:function(t,e){}});
|
||||
//# sourceMappingURL=19.b1e6da86c8a7dcf8425b.js.map
|
File diff suppressed because one or more lines are too long
@@ -0,0 +1,2 @@
|
||||
webpackJsonp([19],{TT6I:function(t,e){},WfA7:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a={data:function(){return{dialogVisible:!1,loading:!0,connectionTypes:[],versionDrivers:[],isActive:-1}},methods:{loadConnectionTypes:function(){var t=this;this.$http({method:"GET",url:"/dbswitch/admin/api/v1/connection/types"}).then(function(e){0===e.data.code?(t.connectionTypes=e.data.data,t.handleChooseClick("MYSQL",0)):e.data.message&&alert("初始化数据库类型信息失败:"+e.data.message)})},handleChooseClick:function(t,e){var i=this;this.isActive=e,this.$http.get("/dbswitch/admin/api/v1/connection/"+t+"/drivers").then(function(t){0===t.data.code?i.versionDrivers=t.data.data:t.data.message&&alert("查询驱动版本信息失败,"+t.data.message)})},handleClose:function(t){this.$confirm("确认关闭?").then(function(e){t()}).catch(function(t){})},formatJarFileList:function(t,e){return t[e.property].join(";\n")}},created:function(){this.loadConnectionTypes()},beforeDestroy:function(){}},n={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("el-card",[i("div",{staticClass:"container"},[i("el-card",{staticClass:"box-card"},[i("div",{staticClass:"clearfix",attrs:{slot:"header",align:"center"},slot:"header"},[i("span",[i("b",[t._v("数据库产品类型列表")])])]),t._v(" "),i("div",{staticClass:"navsBox"},[i("el-scrollbar",{staticStyle:{height:"600px"}},[i("ul",t._l(t.connectionTypes,function(e,a){return i("li",{key:a,class:{active:a==t.isActive},on:{click:function(i){return t.handleChooseClick(e.type,a)}}},[t._v("["+t._s(e.id)+"] "+t._s(e.name)+"\n ")])}),0)])],1)]),t._v(" "),i("div",{staticClass:"contentBox"},[i("div",{staticStyle:{margin:"10px 5px"},attrs:{align:"right",width:"95%"}},[i("el-button",{attrs:{type:"primary",size:"mini",icon:"el-icon-document-add"},on:{click:function(e){t.dialogVisible=!0}}},[t._v("添加\n ")])],1),t._v(" "),i("el-table",{attrs:{"header-cell-style":{background:"#eef1f6",color:"#606266"},data:t.versionDrivers,size:"small",stripe:"",border:""}},[i("template",{slot:"empty"},[i("span",[t._v("单击左侧数据库类型来查看对应的驱动版本信息")])]),t._v(" "),i("el-table-column",{attrs:{property:"driverVersion",label:"驱动版本号","min-width":"30%"}}),t._v(" "),i("el-table-column",{attrs:{property:"driverClass",label:"驱动类名","min-width":"30%"}}),t._v(" "),i("el-table-column",{attrs:{property:"jarFiles",formatter:t.formatJarFileList,label:"驱动JAR名称","min-width":"40%"}})],2)],1)],1)]),t._v(" "),i("el-dialog",{attrs:{title:"添加说明",visible:t.dialogVisible,width:"40%","before-close":t.handleClose},on:{"update:visible":function(e){t.dialogVisible=e}}},[i("span",[t._v("请按照驱动路径所在的目录${DBSWITCH_HOME}/drivers下,在数据库类型为名称的目录下,以驱动版本号为名称创建目录并放置对应的驱动jar文件,然后重启即可生效。具体可参考https://gitee.com/inrgihc/dbswitch/tree/master/drivers下的目录结构。")]),t._v(" "),i("span"),t._v(" "),i("span",[t._v("特殊说明:驱动版本目录下的所有JAR必须无任何外部依赖,否则,也需将其依赖JAR一起放置到对应的目录下。")]),t._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(e){t.dialogVisible=!1}}},[t._v("取 消")]),t._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:function(e){t.dialogVisible=!1}}},[t._v("确 定")])],1)])],1)},staticRenderFns:[]};var s=i("VU/8")(a,n,!1,function(t){i("TT6I")},"data-v-34e9157e",null);e.default=s.exports}});
|
||||
//# sourceMappingURL=19.dd345b856062984bc737.js.map
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
|
||||
!function(e){var c=window.webpackJsonp;window.webpackJsonp=function(n,f,a){for(var o,d,i,u=0,b=[];u<n.length;u++)d=n[u],r[d]&&b.push(r[d][0]),r[d]=0;for(o in f)Object.prototype.hasOwnProperty.call(f,o)&&(e[o]=f[o]);for(c&&c(n,f,a);b.length;)b.shift()();if(a)for(u=0;u<a.length;u++)i=t(t.s=a[u]);return i};var n={},r={25:0};function t(c){if(n[c])return n[c].exports;var r=n[c]={i:c,l:!1,exports:{}};return e[c].call(r.exports,r,r.exports,t),r.l=!0,r.exports}t.e=function(e){var c=r[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var n=new Promise(function(n,t){c=r[e]=[n,t]});c[2]=n;var f=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,t.nc&&a.setAttribute("nonce",t.nc),a.src=t.p+"static/js/"+e+"."+{0:"9f5c7dfe2e2d505911a3",1:"fed755dff73c923d7f16",2:"22e821ec8c9909429f09",3:"ef5e983cf9ad9dc27899",4:"f7c0ea89f712c0335ac9",5:"de32c8bd9fcd7cba61b2",6:"d7f3aa182a9403e7c6f6",7:"2c3ef6028bafee6fbaca",8:"535ff4d6dbb1131433ea",9:"4590fe5acd44e077ba19",10:"1d1a99a89d92bca35121",11:"f1220d9f411fa31f402d",12:"f04608dc3d77cd7fb925",13:"522b8e9b509523953170",14:"5d055f12c2b831e53cd6",15:"9742967c21d37f7c493f",16:"3d8d1b4a2cf253b6dcec",17:"68d3bb07f9efaf16b653",18:"b6bf70f4f372e952d31f",19:"b1e6da86c8a7dcf8425b",20:"beeb2cdb187564a0c9fe",21:"5bf6235c9914a933db4d",22:"c4c6da570159683c5736"}[e]+".js";var o=setTimeout(d,12e4);function d(){a.onerror=a.onload=null,clearTimeout(o);var c=r[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),r[e]=void 0)}return a.onerror=a.onload=d,f.appendChild(a),n},t.m=e,t.c=n,t.d=function(e,c,n){t.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(c,"a",c),c},t.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},t.p="/",t.oe=function(e){throw console.error(e),e}}([]);
|
||||
//# sourceMappingURL=manifest.125e7b77fc066142d0ea.js.map
|
||||
!function(e){var c=window.webpackJsonp;window.webpackJsonp=function(n,f,o){for(var a,d,b,i=0,u=[];i<n.length;i++)d=n[i],r[d]&&u.push(r[d][0]),r[d]=0;for(a in f)Object.prototype.hasOwnProperty.call(f,a)&&(e[a]=f[a]);for(c&&c(n,f,o);u.length;)u.shift()();if(o)for(i=0;i<o.length;i++)b=t(t.s=o[i]);return b};var n={},r={25:0};function t(c){if(n[c])return n[c].exports;var r=n[c]={i:c,l:!1,exports:{}};return e[c].call(r.exports,r,r.exports,t),r.l=!0,r.exports}t.e=function(e){var c=r[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var n=new Promise(function(n,t){c=r[e]=[n,t]});c[2]=n;var f=document.getElementsByTagName("head")[0],o=document.createElement("script");o.type="text/javascript",o.charset="utf-8",o.async=!0,o.timeout=12e4,t.nc&&o.setAttribute("nonce",t.nc),o.src=t.p+"static/js/"+e+"."+{0:"9f5c7dfe2e2d505911a3",1:"fed755dff73c923d7f16",2:"22e821ec8c9909429f09",3:"ef5e983cf9ad9dc27899",4:"483abcc3a4b8f904c65d",5:"de32c8bd9fcd7cba61b2",6:"d7f3aa182a9403e7c6f6",7:"2c3ef6028bafee6fbaca",8:"535ff4d6dbb1131433ea",9:"4590fe5acd44e077ba19",10:"1d1a99a89d92bca35121",11:"f1220d9f411fa31f402d",12:"f04608dc3d77cd7fb925",13:"522b8e9b509523953170",14:"5d055f12c2b831e53cd6",15:"9742967c21d37f7c493f",16:"3d8d1b4a2cf253b6dcec",17:"68d3bb07f9efaf16b653",18:"b6bf70f4f372e952d31f",19:"dd345b856062984bc737",20:"beeb2cdb187564a0c9fe",21:"5bf6235c9914a933db4d",22:"c4c6da570159683c5736"}[e]+".js";var a=setTimeout(d,12e4);function d(){o.onerror=o.onload=null,clearTimeout(a);var c=r[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),r[e]=void 0)}return o.onerror=o.onload=d,f.appendChild(o),n},t.m=e,t.c=n,t.d=function(e,c,n){t.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(c,"a",c),c},t.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},t.p="/",t.oe=function(e){throw console.error(e),e}}([]);
|
||||
//# sourceMappingURL=manifest.abc11e34d797dee7d4d2.js.map
|
File diff suppressed because one or more lines are too long
@@ -264,7 +264,12 @@ public abstract class AbstractMetadataProvider
|
||||
@Override
|
||||
public String getPrimaryKeyAsString(List<String> pks) {
|
||||
if (!pks.isEmpty()) {
|
||||
return quoteName(StringUtils.join(pks, quoteName(StrPool.COMMA)));
|
||||
return quoteName(
|
||||
StringUtils.join(
|
||||
pks.stream().distinct().collect(Collectors.toList())
|
||||
, quoteName(StrPool.COMMA)
|
||||
)
|
||||
);
|
||||
}
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
|
@@ -111,7 +111,7 @@ public class OceanbaseMetadataQueryProvider extends AbstractMetadataProvider {
|
||||
|
||||
@Override
|
||||
public String getQuotedSchemaTableCombination(String schemaName, String tableName) {
|
||||
return this.delegate.getQuotedSchemaTableCombination(schemaName, tableName);
|
||||
return quoteSchemaTableName(schemaName, tableName);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -34,10 +34,10 @@ public class OceanbaseUtils {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
throw new RuntimeException();
|
||||
throw new RuntimeException("Execute SQL[" + sql + "] return null value");
|
||||
}
|
||||
} else {
|
||||
throw new RuntimeException();
|
||||
throw new RuntimeException("Execute SQL[" + sql + "] no result");
|
||||
}
|
||||
}
|
||||
} catch (SQLException sqlException) {
|
||||
|
@@ -25,6 +25,7 @@ import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
@@ -328,10 +329,10 @@ public class SqlserverMetadataQueryProvider extends AbstractMetadataProvider {
|
||||
@Override
|
||||
public String getPrimaryKeyAsString(List<String> pks) {
|
||||
if (null != pks && !pks.isEmpty()) {
|
||||
return "[" + StringUtils.join(pks, "] , [") + "]";
|
||||
return "[" + StringUtils.join(pks.stream().distinct().collect(Collectors.toList()), "] , [") + "]";
|
||||
}
|
||||
|
||||
return "";
|
||||
return StringUtils.EMPTY;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user