上传代码

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

@ -482,7 +482,6 @@ public class UserInfoService {
user.setSchoolId(schoolId); user.setSchoolId(schoolId);
} }
} }
if (user==null){ if (user==null){
resp.put("retvalue","账号密码有误,请稍后再试!"); resp.put("retvalue","账号密码有误,请稍后再试!");
resp.put("retcode", 300); resp.put("retcode", 300);
@ -492,7 +491,10 @@ public class UserInfoService {
user.setLastLoginTime(lastLoginTime); user.setLastLoginTime(lastLoginTime);
//登录成功,重新设置最后登录时间以及登录次数 //登录成功,重新设置最后登录时间以及登录次数
userInfoMapper.updateLogInNumber(user); userInfoMapper.updateLogInNumber(user);
String token = user.getToken();
ValueOperations<String, String> redis = stringRedisTemplate.opsForValue();
redis.set(token,lastLoginTime, 30 * 60, TimeUnit.SECONDS);
user.setDataTime(lastLoginTime);
resp.put("retvalue",user); resp.put("retvalue",user);
resp.put("retcode", 200); resp.put("retcode", 200);
} }

Loading…
Cancel
Save