forked from github/cool-admin-java
refactor: 注销时用户名加时间戳后缀、邮箱加时间戳前缀
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user