diff --git a/luoo_user/src/main/java/com/luoo/user/controller/MyController.java b/luoo_user/src/main/java/com/luoo/user/controller/MyController.java index 05c388c..dc0d3bb 100644 --- a/luoo_user/src/main/java/com/luoo/user/controller/MyController.java +++ b/luoo_user/src/main/java/com/luoo/user/controller/MyController.java @@ -132,11 +132,8 @@ public class MyController extends BaseController { } } - boolean isChangeNickName = false; - if(!Objects.equals(nickName, user.getNickName())) { - // 修改了昵称 - isChangeNickName = true; - } + // 修改了昵称 + boolean isChangeNickName = !Objects.equals(nickName, user.getNickName()); if (!StringTools.isEmpty(nickName)) { user.setNickName(nickName);