| | |
| | | @Service |
| | | public class TokenService implements TokenMapper { |
| | | @Autowired |
| | | public RedisService redisService; |
| | | |
| | | @Autowired |
| | | TokenMapper tokenMapper; |
| | | |
| | | @Autowired |
| | |
| | | |
| | | @Autowired |
| | | LoginService loginService; |
| | | |
| | | @Autowired |
| | | RedisService redisService; |
| | | |
| | | @Override |
| | | public Integer selectCount(String name, Integer type) { |
| | |
| | | |
| | | // redis |
| | | Object obj = redisService.get(tokenKey); |
| | | if (obj != null && obj instanceof TokenEntity) { |
| | | if (obj instanceof TokenEntity) { |
| | | return (TokenEntity) obj; |
| | | } |
| | | |
| | |
| | | |
| | | // redis |
| | | Object obj = redisService.get(userKey); |
| | | if (obj != null && obj instanceof UserEntity) { |
| | | if (obj instanceof UserEntity) { |
| | | return (UserEntity) obj; |
| | | } |
| | | |