diff --git a/mall-ums/mall-ums-api/src/main/java/com/youlai/mall/ums/api/dto/MemberDTO.java b/mall-ums/mall-ums-api/src/main/java/com/youlai/mall/ums/api/dto/MemberDTO.java index 9bf27f288..e429ebc31 100644 --- a/mall-ums/mall-ums-api/src/main/java/com/youlai/mall/ums/api/dto/MemberDTO.java +++ b/mall-ums/mall-ums-api/src/main/java/com/youlai/mall/ums/api/dto/MemberDTO.java @@ -2,7 +2,6 @@ package com.youlai.mall.ums.api.dto; import lombok.Data; - @Data public class MemberDTO { @@ -14,4 +13,5 @@ public class MemberDTO { private String avatar; private String nickname; + } diff --git a/youlai-auth/src/main/java/com/youlai/auth/controller/AuthController.java b/youlai-auth/src/main/java/com/youlai/auth/controller/AuthController.java index f8f2c8d6c..110fb02f5 100644 --- a/youlai-auth/src/main/java/com/youlai/auth/controller/AuthController.java +++ b/youlai-auth/src/main/java/com/youlai/auth/controller/AuthController.java @@ -3,7 +3,6 @@ package com.youlai.auth.controller; import cn.binarywang.wx.miniapp.api.WxMaService; import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult; import cn.binarywang.wx.miniapp.bean.WxMaUserInfo; -import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.util.StrUtil; import cn.hutool.json.JSONObject; import cn.hutool.json.JSONUtil; @@ -100,8 +99,8 @@ public class AuthController { long currentTimeSeconds = System.currentTimeMillis() / 1000; - if (exp < currentTimeSeconds) { // token已过期 - return Result.custom(ResultCode.TOKEN_INVALID_OR_EXPIRED); + if (exp < currentTimeSeconds) { // token已过期,无需加入黑名单 + return Result.success(); } redisTemplate.opsForValue().set(AuthConstants.TOKEN_BLACKLIST_PREFIX + jti, null, (exp - currentTimeSeconds), TimeUnit.SECONDS); return Result.success(); diff --git a/youlai-auth/src/main/java/com/youlai/auth/domain/User.java b/youlai-auth/src/main/java/com/youlai/auth/domain/User.java index e0d5874fa..45dd4a0a1 100644 --- a/youlai-auth/src/main/java/com/youlai/auth/domain/User.java +++ b/youlai-auth/src/main/java/com/youlai/auth/domain/User.java @@ -2,7 +2,6 @@ package com.youlai.auth.domain; import com.youlai.admin.api.dto.UserDTO; import com.youlai.common.core.constant.AuthConstants; -import com.youlai.mall.ums.api.dto.MemberDTO; import lombok.Data; import lombok.NoArgsConstructor; import org.springframework.security.core.GrantedAuthority; diff --git a/youlai-auth/src/main/java/com/youlai/auth/service/UserDetailsServiceImpl.java b/youlai-auth/src/main/java/com/youlai/auth/service/UserDetailsServiceImpl.java index 928cb50ce..c9b3c846c 100644 --- a/youlai-auth/src/main/java/com/youlai/auth/service/UserDetailsServiceImpl.java +++ b/youlai-auth/src/main/java/com/youlai/auth/service/UserDetailsServiceImpl.java @@ -4,11 +4,8 @@ import com.youlai.admin.api.dto.UserDTO; import com.youlai.admin.api.feign.RemoteAdminService; import com.youlai.auth.domain.User; import com.youlai.common.core.constant.AuthConstants; -import com.youlai.mall.ums.api.dto.MemberDTO; -import com.youlai.mall.ums.api.entity.UmsMember; import com.youlai.mall.ums.api.feign.RemoteUmsMemberService; import lombok.AllArgsConstructor; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.authentication.AccountExpiredException; import org.springframework.security.authentication.CredentialsExpiredException; import org.springframework.security.authentication.DisabledException;