refactor: 注销时用户名加时间戳后缀、邮箱加时间戳前缀

This commit is contained in:
OpenCode
2026-07-22 21:50:43 +08:00
parent 7fc636a020
commit f9fd0a42dd
@@ -52,10 +52,10 @@ public class UserInfoServiceImpl extends BaseServiceImpl<UserInfoMapper, UserInf
info.setStatus(2);
info.setNickName("已注销-00" + userId);
if (info.getUsername() != null) {
info.setUsername("__logoff__" + userId + "__" + System.currentTimeMillis());
info.setUsername(info.getUsername() + "_logoff_" + System.currentTimeMillis());
}
if (info.getEmail() != null) {
info.setEmail("__logoff__" + userId + "__" + System.currentTimeMillis() + "@deleted");
info.setEmail("logoff_" + System.currentTimeMillis() + "_" + info.getEmail());
}
info.updateById();
}