升级druid到最新版本v1.1.23

This commit is contained in:
RuoYi 2020-09-04 14:47:07 +08:00
parent f84b157419
commit 50ac363682
3 changed files with 6 additions and 9 deletions

View File

@ -18,7 +18,7 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version> <java.version>1.8</java.version>
<mybatis.boot.version>1.3.2</mybatis.boot.version> <mybatis.boot.version>1.3.2</mybatis.boot.version>
<druid.version>1.1.14</druid.version> <druid.version>1.1.23</druid.version>
<bitwalker.version>1.19</bitwalker.version> <bitwalker.version>1.19</bitwalker.version>
<swagger.version>2.9.2</swagger.version> <swagger.version>2.9.2</swagger.version>
<kaptcha.version>2.3.2</kaptcha.version> <kaptcha.version>2.3.2</kaptcha.version>

View File

@ -79,14 +79,11 @@ public class DataScopeAspect
} }
// 获取当前的用户 // 获取当前的用户
LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest()); LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
if (loginUser == null) { if (StringUtils.isNotNull(loginUser))
return;
}
SysUser currentUser = loginUser.getUser();
if (currentUser != null)
{ {
SysUser currentUser = loginUser.getUser();
// 如果是超级管理员则不过滤数据 // 如果是超级管理员则不过滤数据
if (!currentUser.isAdmin()) if (StringUtils.isNotNull(currentUser) && !currentUser.isAdmin())
{ {
dataScopeFilter(joinPoint, currentUser, controllerDataScope.deptAlias(), dataScopeFilter(joinPoint, currentUser, controllerDataScope.deptAlias(),
controllerDataScope.userAlias()); controllerDataScope.userAlias());

View File

@ -76,12 +76,12 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService
public List<SysDictData> selectDictDataByType(String dictType) public List<SysDictData> selectDictDataByType(String dictType)
{ {
List<SysDictData> dictDatas = DictUtils.getDictCache(dictType); List<SysDictData> dictDatas = DictUtils.getDictCache(dictType);
if (null!=dictDatas&&!dictDatas.isEmpty()) if (StringUtils.isNotEmpty(dictDatas))
{ {
return dictDatas; return dictDatas;
} }
dictDatas = dictDataMapper.selectDictDataByType(dictType); dictDatas = dictDataMapper.selectDictDataByType(dictType);
if (null!=dictDatas&&!dictDatas.isEmpty()) if (StringUtils.isNotEmpty(dictDatas))
{ {
DictUtils.setDictCache(dictType, dictDatas); DictUtils.setDictCache(dictType, dictDatas);
return dictDatas; return dictDatas;