校验用户昵称
This commit is contained in:
parent
d686a68afa
commit
1f1ce5b4c1
@ -81,7 +81,8 @@ public class UserServiceImpl extends AbstractService<User> implements UserServic
|
|||||||
private String checkNickname(String nickname) {
|
private String checkNickname(String nickname) {
|
||||||
Integer result = userMapper.selectCountByNickName(nickname);
|
Integer result = userMapper.selectCountByNickName(nickname);
|
||||||
if (result > 0) {
|
if (result > 0) {
|
||||||
return checkNickname(nickname + System.currentTimeMillis());
|
StringBuilder stringBuilder = new StringBuilder(nickname);
|
||||||
|
return checkNickname(stringBuilder.append("_").append(System.currentTimeMillis()).toString());
|
||||||
}
|
}
|
||||||
return nickname;
|
return nickname;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user