Commit 2be51beb authored by macro's avatar macro
Browse files

Update UmsAdminServiceImpl.java

parent 7ff60a1b
......@@ -225,12 +225,15 @@ public class UmsAdminServiceImpl implements UmsAdminService {
@Override
public List<UmsResource> getResourceList(Long adminId) {
//先从缓存中获取数据
List<UmsResource> resourceList = getCacheService().getResourceList(adminId);
if(CollUtil.isNotEmpty(resourceList)){
return resourceList;
}
//缓存中没有从数据库中获取
resourceList = adminRoleRelationDao.getResourceList(adminId);
if(CollUtil.isNotEmpty(resourceList)){
//将数据库中的数据存入缓存中
getCacheService().setResourceList(adminId,resourceList);
}
return resourceList;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment