Browse Source

PC端 每个客户的菜单信息,不放入缓存,每次登陆重新查询。

dev
zhangyongzhangyong 4 years ago
parent
commit
2d761725a9
  1. 17
      epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovMenuServiceImpl.java

17
epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovMenuServiceImpl.java

@ -187,14 +187,15 @@ public class GovMenuServiceImpl extends BaseServiceImpl<GovMenuDao, GovMenuEntit
@Override
public List<GovMenuDTO> getUserMenuNavList(TokenDto tokenDto) {
List<GovMenuDTO> menuList = govMenuRedis.getUserMenuNavList(tokenDto.getCustomerId(), tokenDto.getApp(), tokenDto.getClient());
if(menuList == null){
menuList = getCustomerMenuList(tokenDto.getCustomerId(), MenuTypeEnum.MENU.value());
govMenuRedis.setUserMenuNavList(tokenDto.getCustomerId(), tokenDto.getApp(), tokenDto.getClient(), menuList);
}
return menuList;
// List<GovMenuDTO> menuList = govMenuRedis.getUserMenuNavList(tokenDto.getCustomerId(), tokenDto.getApp(), tokenDto.getClient());
// if(menuList == null){
// menuList = getCustomerMenuList(tokenDto.getCustomerId(), MenuTypeEnum.MENU.value());
//
// govMenuRedis.setUserMenuNavList(tokenDto.getCustomerId(), tokenDto.getApp(), tokenDto.getClient(), menuList);
// }
// PC端 每个客户的菜单信息,不放入缓存,每次登陆重新查询。
// 或者 你可以选择,在给每个客户 配置可见菜单的时候, 在saveCustomerMenu方法中,增加更新缓存的逻辑
return getCustomerMenuList(tokenDto.getCustomerId(), MenuTypeEnum.MENU.value());
}
/**

Loading…
Cancel
Save