mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2025-12-22 13:56:38 +08:00
Merge pull request #9004 from SunJary/patch-1
fix#9002 解决字典注解查询出现异常之后,数据源不能恢复问题
This commit is contained in:
@ -371,11 +371,19 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, SysDict> impl
|
|||||||
if (isCustomDataSource) {
|
if (isCustomDataSource) {
|
||||||
DynamicDataSourceContextHolder.push(dataSource);
|
DynamicDataSourceContextHolder.push(dataSource);
|
||||||
}
|
}
|
||||||
List<DictModel> restData = sysDictMapper.queryTableDictByKeysAndFilterSql(table, text, code, filterSql, codeValues);
|
//update-begin---author:jarysun ---date:20251020 for:[issues/#9002]解决表字典查询出现异常之后,数据源不能恢复问题------------
|
||||||
|
List<DictModel> restData = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
restData = sysDictMapper.queryTableDictByKeysAndFilterSql(table, text, code, filterSql, codeValues);
|
||||||
|
} finally {
|
||||||
// 清理自定义的数据源
|
// 清理自定义的数据源
|
||||||
if (isCustomDataSource) {
|
if (isCustomDataSource) {
|
||||||
DynamicDataSourceContextHolder.clear();
|
DynamicDataSourceContextHolder.clear();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
//update-end---author:jarysun ---date:20251020 for:[issues/#9002]解决表字典查询出现异常之后,数据源不能恢复问题------------
|
||||||
|
|
||||||
return restData;
|
return restData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user