diff --git a/src/main/java/com/rymcu/vertical/service/impl/UserServiceImpl.java b/src/main/java/com/rymcu/vertical/service/impl/UserServiceImpl.java index 48f99e9..13439cf 100644 --- a/src/main/java/com/rymcu/vertical/service/impl/UserServiceImpl.java +++ b/src/main/java/com/rymcu/vertical/service/impl/UserServiceImpl.java @@ -81,7 +81,8 @@ public class UserServiceImpl extends AbstractService implements UserServic private String checkNickname(String nickname) { Integer result = userMapper.selectCountByNickName(nickname); if (result > 0) { - return checkNickname(nickname + System.currentTimeMillis()); + StringBuilder stringBuilder = new StringBuilder(nickname); + return checkNickname(stringBuilder.append("_").append(System.currentTimeMillis()).toString()); } return nickname; }