用户token有效期改为一天

master
zhiyong.ning 4 years ago
parent aa5f221a90
commit 9b60a9f544
  1. 2
      src/main/java/com/yipin/liuwanr/service/UserInfoService.java

@ -493,7 +493,7 @@ public class UserInfoService {
userInfoMapper.updateLogInNumber(user);
String token = user.getToken();
ValueOperations<String, String> redis = stringRedisTemplate.opsForValue();
redis.set(token,lastLoginTime, 30 * 60, TimeUnit.SECONDS);
redis.set(token,lastLoginTime, 24, TimeUnit.HOURS);
user.setDataTime(lastLoginTime);
resp.put("retvalue",user);
resp.put("retcode", 200);

Loading…
Cancel
Save