Commit 21e89310 authored by 赵啸非's avatar 赵啸非

添加资源自动刷新获取

parent b498a418
...@@ -9,6 +9,7 @@ import com.mortals.framework.util.AESUtil; ...@@ -9,6 +9,7 @@ import com.mortals.framework.util.AESUtil;
import com.mortals.framework.utils.ServletUtils; import com.mortals.framework.utils.ServletUtils;
import com.mortals.framework.web.interceptor.BaseInterceptor; import com.mortals.framework.web.interceptor.BaseInterceptor;
import com.mortals.xhx.base.framework.config.InterceptorConfig; import com.mortals.xhx.base.framework.config.InterceptorConfig;
import com.mortals.xhx.module.user.model.UserEntity;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -90,7 +91,7 @@ public class AuthUserInterceptor extends BaseInterceptor { ...@@ -90,7 +91,7 @@ public class AuthUserInterceptor extends BaseInterceptor {
private boolean checkAuth(HttpServletRequest request, String requestUrl, String securityKey) throws Exception { private boolean checkAuth(HttpServletRequest request, String requestUrl, String securityKey) throws Exception {
int code = requestUrl.hashCode() & (Integer.MAX_VALUE - 1); int code = requestUrl.hashCode() & (Integer.MAX_VALUE - 1);
IUser loginUser = authTokenService.getLoginUser(request); UserEntity loginUser = (UserEntity) authTokenService.getLoginUser(request);
if (ObjectUtils.isEmpty(loginUser)) return false; if (ObjectUtils.isEmpty(loginUser)) return false;
String menuUrl = loginUser.getMenuUrl(); String menuUrl = loginUser.getMenuUrl();
if (ObjectUtils.isEmpty(menuUrl)) return false; if (ObjectUtils.isEmpty(menuUrl)) return false;
......
...@@ -114,169 +114,171 @@ public class AuthTokenServiceImpl implements IAuthTokenService { ...@@ -114,169 +114,171 @@ public class AuthTokenServiceImpl implements IAuthTokenService {
} }
userEntity.setMenuUrl(menuUrlCode); userEntity.setMenuUrl(menuUrlCode);
return userEntity;
return new IUser() {
/** /*return new IUser() {
*//**
* @return * @return
*/ *//*
@Override @Override
public Long getId() { public Long getId() {
return userEntity.getId(); return userEntity.getId();
} }
/** *//**
* @return * @return
*/ *//*
@Override @Override
public Long getDeptId() { public Long getDeptId() {
return userEntity.getDeptId(); return userEntity.getDeptId();
} }
/** *//**
* @return * @return
*/ *//*
@Override @Override
public String getDeptName() { public String getDeptName() {
return userEntity.getDeptName(); return userEntity.getDeptName();
} }
/** *//**
* @return * @return
*/ *//*
@Override @Override
public Long getCustomerId() { public Long getCustomerId() {
return userEntity.getCustomerId(); return userEntity.getCustomerId();
} }
/** *//**
* @return * @return
*/ *//*
@Override @Override
public Long getSiteId() { public Long getSiteId() {
return userEntity.getSiteId(); return userEntity.getSiteId();
} }
/** *//**
* @return * @return
*/ *//*
@Override @Override
public String getSiteIds() { public String getSiteIds() {
return userEntity.getSiteIds(); return userEntity.getSiteIds();
} }
/** *//**
* @return * @return
*/ *//*
@Override @Override
public String getAreaCodes() { public String getAreaCodes() {
return userEntity.getAreaCodes(); return userEntity.getAreaCodes();
} }
/** *//**
* @return * @return
*/ *//*
@Override @Override
public Long getCustomerJoinId() { public Long getCustomerJoinId() {
return userEntity.getCustomerJoinId(); return userEntity.getCustomerJoinId();
} }
/** *//**
* @return * @return
*/ *//*
@Override @Override
public String getCustomerNum() { public String getCustomerNum() {
return userEntity.getCustomerNum(); return userEntity.getCustomerNum();
} }
/** *//**
* @return * @return
*/ *//*
@Override @Override
public String getLoginName() { public String getLoginName() {
return userEntity.getLoginName(); return userEntity.getLoginName();
} }
/** *//**
* @return * @return
*/ *//*
@Override @Override
public String getRealName() { public String getRealName() {
return userEntity.getRealName(); return userEntity.getRealName();
} }
/** *//**
* @return * @return
*/ *//*
@Override @Override
public boolean isAdmin() { public boolean isAdmin() {
return userEntity.isAdmin(); return userEntity.isAdmin();
} }
/** *//**
* @return * @return
*/ *//*
@Override @Override
public boolean isSystemUser() { public boolean isSystemUser() {
return userEntity.isSystemUser(); return userEntity.isSystemUser();
} }
/** *//**
* @return * @return
*/ *//*
@Override @Override
public boolean isManager() { public boolean isManager() {
return userEntity.isManager(); return userEntity.isManager();
} }
/** *//**
* @return * @return
*/ *//*
@Override @Override
public Integer getUserType() { public Integer getUserType() {
return userEntity.getUserType(); return userEntity.getUserType();
} }
/** *//**
* @return * @return
*/ *//*
@Override @Override
public String getToken() { public String getToken() {
return userEntity.getToken(); return userEntity.getToken();
} }
/** *//**
* @return * @return
*/ *//*
@Override @Override
public Long getLoginTime() { public Long getLoginTime() {
return userEntity.getLoginTime(); return userEntity.getLoginTime();
} }
/** *//**
* @return * @return
*/ *//*
@Override @Override
public Long getExpireTime() { public Long getExpireTime() {
return userEntity.getExpireTime(); return userEntity.getExpireTime();
} }
/** *//**
* @param expireTime * @param expireTime
*/ *//*
@Override @Override
public void setExpireTime(Long expireTime) { public void setExpireTime(Long expireTime) {
} }
/** *//**
* @return * @return
*/ *//*
@Override @Override
public String getMenuUrl() { public String getMenuUrl() {
return userEntity.getMenuUrl(); return userEntity.getMenuUrl();
} }
}; };*/
// return userEntity; // return userEntity;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment