| | |
| | | } |
| | | |
| | | public static User getUser(Long userId) { |
| | | return (User) CacheUtil.get("blade:user", USER_CACHE_ID, userId, () -> { |
| | | return (User) userService.getById(userId); |
| | | return CacheUtil.get("blade:user", USER_CACHE_ID, userId, () -> { |
| | | return userService.getById(userId); |
| | | }, ExtCacheConstant.TENANT_MODE); |
| | | } |
| | | |
| | | public static User getUser(String tenantId, String account) { |
| | | return (User) CacheUtil.get("blade:user", USER_CACHE_ACCOUNT, tenantId + "-" + account, () -> { |
| | | return CacheUtil.get("blade:user", USER_CACHE_ACCOUNT, tenantId + "-" + account, () -> { |
| | | return userService.userByAccount(tenantId, account); |
| | | }, ExtCacheConstant.TENANT_MODE); |
| | | } |