| | |
| | | import com.lf.server.helper.StringHelper; |
| | | import com.lf.server.helper.WebHelper; |
| | | import com.lf.server.mapper.sys.TokenMapper; |
| | | import com.lf.server.service.all.PermsService; |
| | | import com.lf.server.service.all.RedisService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | @Service |
| | | public class TokenService implements TokenMapper { |
| | | @Autowired |
| | | public RedisService redisService; |
| | | |
| | | @Autowired |
| | | TokenMapper tokenMapper; |
| | | |
| | | @Autowired |
| | |
| | | |
| | | @Autowired |
| | | LoginService loginService; |
| | | |
| | | @Autowired |
| | | public RedisService redisService; |
| | | |
| | | @Autowired |
| | | public PermsService permsService; |
| | | |
| | | @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; |
| | | } |
| | | |