From 1f1ce5b4c10afe6c960a9e40aa27f975834fea88 Mon Sep 17 00:00:00 2001 From: x ronger Date: Thu, 5 Dec 2019 20:24:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E7=94=A8=E6=88=B7=E6=98=B5?= =?UTF-8?q?=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/rymcu/vertical/service/impl/UserServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; }