|
|
@ -441,7 +441,7 @@ public class UserInfoService { |
|
|
|
//鉴权,登录后将信息存入redis
|
|
|
|
//鉴权,登录后将信息存入redis
|
|
|
|
ValueOperations<String, String> redis = stringRedisTemplate.opsForValue(); |
|
|
|
ValueOperations<String, String> redis = stringRedisTemplate.opsForValue(); |
|
|
|
String loginToken = UUID.randomUUID().toString(); |
|
|
|
String loginToken = UUID.randomUUID().toString(); |
|
|
|
redis.set(loginToken,user.getUserName(),2, TimeUnit.HOURS); |
|
|
|
redis.set(loginToken,user.getUserId().toString(),2, TimeUnit.HOURS); |
|
|
|
obj.put("loginToken",loginToken); |
|
|
|
obj.put("loginToken",loginToken); |
|
|
|
|
|
|
|
|
|
|
|
resp.put("retcode", 200); |
|
|
|
resp.put("retcode", 200); |
|
|
@ -553,7 +553,7 @@ public class UserInfoService { |
|
|
|
|
|
|
|
|
|
|
|
//鉴权,登录后将信息存入redis
|
|
|
|
//鉴权,登录后将信息存入redis
|
|
|
|
String loginToken = UUID.randomUUID().toString(); |
|
|
|
String loginToken = UUID.randomUUID().toString(); |
|
|
|
redis.set(loginToken,user.getUserName(),2, TimeUnit.HOURS); |
|
|
|
redis.set(loginToken,user.getUserId().toString(),2, TimeUnit.HOURS); |
|
|
|
user.setLoginToken(loginToken); |
|
|
|
user.setLoginToken(loginToken); |
|
|
|
|
|
|
|
|
|
|
|
resp.put("retvalue",user); |
|
|
|
resp.put("retvalue",user); |
|
|
|