将 mall-spring-boot-starter-web 接入新的 system-service 服务
This commit is contained in:
@@ -73,7 +73,7 @@ public class AccountAuthInterceptor extends HandlerInterceptorAdapter {
|
||||
}
|
||||
// 设置账号编号
|
||||
Integer accountId = oauth2AccessTokenResult.getData().getAccountId();
|
||||
CommonWebUtil.setAccountId(request, accountId);
|
||||
CommonWebUtil.setUserId(request, accountId);
|
||||
return accountId;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ public class AdminSecurityInterceptor extends HandlerInterceptorAdapter {
|
||||
|
||||
@Override
|
||||
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) {
|
||||
Integer accountId = CommonWebUtil.getAccountId(request);
|
||||
Integer accountId = CommonWebUtil.getUserId(request);
|
||||
if (accountId != null) {
|
||||
// 获得 Admin 信息
|
||||
CommonResult<AdminResponse> adminResult = adminRPC.getAdminByAccountId(accountId);
|
||||
|
||||
@@ -21,7 +21,7 @@ public class UserSecurityInterceptor extends HandlerInterceptorAdapter {
|
||||
|
||||
@Override
|
||||
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) {
|
||||
Integer accountId = CommonWebUtil.getAccountId(request);
|
||||
Integer accountId = CommonWebUtil.getUserId(request);
|
||||
if (accountId != null) {
|
||||
// 获得 Admin 信息
|
||||
CommonResult<UserResponse> userResult = userRPC.getUserByAccountId(accountId);
|
||||
|
||||
Reference in New Issue
Block a user