提交代码

master
胡锐 2 months ago
parent accf49d08c
commit 1ff35f0c36
  1. 3
      service/src/main/java/com/hfkj/service/user/impl/BsUserServiceImpl.java

@ -89,6 +89,7 @@ public class BsUserServiceImpl implements BsUserService {
if (user == null) { if (user == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到用户"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到用户");
} }
String oldPhone = user.getPhone();
user.setPhone(newPhone); user.setPhone(newPhone);
editData(user); editData(user);
@ -97,6 +98,8 @@ public class BsUserServiceImpl implements BsUserService {
session.setUser(user); session.setUser(user);
SessionObject sessionObject = new SessionObject(userToken(user.getId()), session); SessionObject sessionObject = new SessionObject(userToken(user.getId()), session);
userCenter.save(sessionObject); userCenter.save(sessionObject);
// 删除缓存
redisUtil.hdel(CACHE_KEY, oldPhone);
} }
@Override @Override

Loading…
Cancel
Save