From bec72465c94b68ac1e4b287151ce5e395431384c Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 13 Oct 2022 10:17:34 +0800 Subject: [PATCH] =?UTF-8?q?/api/auth/login/logout=E5=A6=82=E6=9E=9C?= =?UTF-8?q?=E6=98=AF=E5=B7=A5=E4=BD=9C=E7=AB=AF=E6=8E=A8=E5=87=BA=E7=99=BB?= =?UTF-8?q?=E5=BD=95=EF=BC=8C=E5=88=A0=E9=99=A4CustomerStaffRedis.delStaff?= =?UTF-8?q?InfoFormCache?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/service/impl/LoginServiceImpl.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/epmet-auth/src/main/java/com/epmet/service/impl/LoginServiceImpl.java b/epmet-auth/src/main/java/com/epmet/service/impl/LoginServiceImpl.java index 25524fa9e0..3e1e580fce 100644 --- a/epmet-auth/src/main/java/com/epmet/service/impl/LoginServiceImpl.java +++ b/epmet-auth/src/main/java/com/epmet/service/impl/LoginServiceImpl.java @@ -6,8 +6,10 @@ import cn.binarywang.wx.miniapp.bean.WxMaPhoneNumberInfo; import cn.binarywang.wx.miniapp.bean.WxMaUserInfo; import com.alibaba.fastjson.JSON; import com.epmet.common.token.constant.LoginConstant; +import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.security.password.PasswordUtils; import com.epmet.commons.tools.utils.CpUserDetailRedis; @@ -366,6 +368,10 @@ public class LoginServiceImpl implements LoginService { } else { logger.error(String.format("运营人员%s退出成功,清空菜单和权限redis异常", tokenDto.getUserId())); } + //如果是工作端退出,删除当前工作人员缓存 + if(AppClientConstant.APP_GOV.equals(tokenDto.getApp())){ + CustomerStaffRedis.delStaffInfoFormCache(tokenDto.getCustomerId(),tokenDto.getUserId()); + } return new Result(); }