!424 修复问题 I937IA

Merge pull request !424 from caojingwei/fix-I937IA
This commit is contained in:
Michael Yang 2024-02-26 01:21:40 +00:00 committed by Gitee
commit 1095d69155
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -82,8 +82,9 @@ public class MapperInvocationHandler implements InvocationHandler {
dbType = dbTypeGlobal ;
}
if (dbType == null) {
if (dataSourceKey != null && dataSource != null) {
dbType = dataSource.getDbType(dataSourceKey);
if (shardingDataSourceKey != null && dataSource != null) {
//使用最终分片获取数据源类型
dbType = dataSource.getDbType(shardingDataSourceKey);
}
if (dbType == null) {
dbType = FlexGlobalConfig.getDefaultConfig().getDbType();