From 123fb7d4647a203d2b33ef51de56890f38491f9c Mon Sep 17 00:00:00 2001 From: KKSU <15274802129@163.com> Date: Mon, 01 Jul 2024 16:54:17 +0800 Subject: [PATCH] 后台 --- src/main/java/cc/mrbird/febs/common/interceptor/LoginInterceptor.java | 4 ---- src/main/java/cc/mrbird/febs/mall/service/impl/AdminMallMemberServiceImpl.java | 4 ++++ src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/cc/mrbird/febs/common/interceptor/LoginInterceptor.java b/src/main/java/cc/mrbird/febs/common/interceptor/LoginInterceptor.java index 55107f7..5f01f06 100644 --- a/src/main/java/cc/mrbird/febs/common/interceptor/LoginInterceptor.java +++ b/src/main/java/cc/mrbird/febs/common/interceptor/LoginInterceptor.java @@ -52,10 +52,6 @@ return false; } MallMember member = JSON.parseObject(userJsonStr, MallMember.class); - if(MallMember.ACCOUNT_STATUS_ENABLE.equals(member.getIsFrozen())){ - responseUnAuth(response); - return false; - } request.getSession().setAttribute("member", member); return true; diff --git a/src/main/java/cc/mrbird/febs/mall/service/impl/AdminMallMemberServiceImpl.java b/src/main/java/cc/mrbird/febs/mall/service/impl/AdminMallMemberServiceImpl.java index 4c607a3..79494eb 100644 --- a/src/main/java/cc/mrbird/febs/mall/service/impl/AdminMallMemberServiceImpl.java +++ b/src/main/java/cc/mrbird/febs/mall/service/impl/AdminMallMemberServiceImpl.java @@ -7,6 +7,7 @@ import cc.mrbird.febs.common.utils.AppContants; import cc.mrbird.febs.common.utils.LoginUserUtil; import cc.mrbird.febs.common.utils.MallUtils; +import cc.mrbird.febs.common.utils.RedisUtils; import cc.mrbird.febs.mall.dto.*; import cc.mrbird.febs.mall.entity.*; import cc.mrbird.febs.mall.entity.MallNewsInfo; @@ -76,6 +77,7 @@ private final MallScoreAchieveReleaseMapper mallScoreAchieveReleaseMapper; private final NBYHService nbyhService; private final MallMemberAmountMapper mallMemberAmountMapper; + private final RedisUtils redisUtils; @Override public IPage<MallMember> getMallMemberList(MallMember mallMember, QueryRequest request) { @@ -969,6 +971,8 @@ } mallMember.setIsFrozen(i); mallMemberMapper.updateById(mallMember); + + redisUtils.del(AppContants.APP_LOGIN_PREFIX + mallMember.getId()); return new FebsResponse().success(); } diff --git a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java index ddc256f..4ed53bf 100644 --- a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java +++ b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java @@ -179,7 +179,7 @@ if (mallMember == null) { throw new FebsException("账号或密码错误"); } - if (MallMember.ACCOUNT_STATUS_ENABLE.equals(mallMember.getIsFrozen())) { + if (ProductEnum.MEMBER_FROZEN.getValue() == mallMember.getIsFrozen()) { throw new FebsException("账号已冻结"); } -- Gitblit v1.9.1