From 14581ffebce16d8c631e380bfb0093ef3bea562e Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Wed, 24 Aug 2022 11:45:55 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BD=91=E7=BB=9C=E8=AF=B7=E6=B1=82=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E6=8F=90=E7=A4=BA=E5=8E=BB=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yunbao/common/manager/IMLoginManager.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java b/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java index 2f9abb3a2..b4d4c4add 100644 --- a/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java +++ b/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java @@ -84,10 +84,12 @@ public class IMLoginManager extends BaseCacheManager { if (null == userInfo) { userInfo = new Gson().fromJson( getString(KEY_USER_INFO), IMLoginModel.class); - if (userInfo != null) + if (userInfo != null){ token = userInfo.getToken(); - userInfo.setGiftEffect(getBoolean(GiftEffect, false)); - userInfo.setMountEffect(getBoolean(MountEffect, false)); + userInfo.setGiftEffect(getBoolean(GiftEffect, false)); + userInfo.setMountEffect(getBoolean(MountEffect, false)); + } + } return userInfo; @@ -150,7 +152,6 @@ public class IMLoginManager extends BaseCacheManager { } userInfo.setGiftEffect(getBoolean(GiftEffect, false)); userInfo.setMountEffect(getBoolean(MountEffect, false)); - deleteByKey(KEY_USER_INFO); put(KEY_USER_INFO, new Gson().toJson(userInfo)); //兼容老模块(之后要把用户维护的类更换掉) SpUtil.getInstance().setStringValue(SpUtil.USER_INFO, new Gson().toJson(userInfo));