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

添加资源自动刷新获取

parent b498a418
......@@ -9,6 +9,7 @@ import com.mortals.framework.util.AESUtil;
import com.mortals.framework.utils.ServletUtils;
import com.mortals.framework.web.interceptor.BaseInterceptor;
import com.mortals.xhx.base.framework.config.InterceptorConfig;
import com.mortals.xhx.module.user.model.UserEntity;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
......@@ -90,7 +91,7 @@ public class AuthUserInterceptor extends BaseInterceptor {
private boolean checkAuth(HttpServletRequest request, String requestUrl, String securityKey) throws Exception {
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;
String menuUrl = loginUser.getMenuUrl();
if (ObjectUtils.isEmpty(menuUrl)) return false;
......
......@@ -114,169 +114,171 @@ public class AuthTokenServiceImpl implements IAuthTokenService {
}
userEntity.setMenuUrl(menuUrlCode);
return userEntity;
return new IUser() {
/**
/*return new IUser() {
*//**
* @return
*/
*//*
@Override
public Long getId() {
return userEntity.getId();
}
/**
*//**
* @return
*/
*//*
@Override
public Long getDeptId() {
return userEntity.getDeptId();
}
/**
*//**
* @return
*/
*//*
@Override
public String getDeptName() {
return userEntity.getDeptName();
}
/**
*//**
* @return
*/
*//*
@Override
public Long getCustomerId() {
return userEntity.getCustomerId();
}
/**
*//**
* @return
*/
*//*
@Override
public Long getSiteId() {
return userEntity.getSiteId();
}
/**
*//**
* @return
*/
*//*
@Override
public String getSiteIds() {
return userEntity.getSiteIds();
}
/**
*//**
* @return
*/
*//*
@Override
public String getAreaCodes() {
return userEntity.getAreaCodes();
}
/**
*//**
* @return
*/
*//*
@Override
public Long getCustomerJoinId() {
return userEntity.getCustomerJoinId();
}
/**
*//**
* @return
*/
*//*
@Override
public String getCustomerNum() {
return userEntity.getCustomerNum();
}
/**
*//**
* @return
*/
*//*
@Override
public String getLoginName() {
return userEntity.getLoginName();
}
/**
*//**
* @return
*/
*//*
@Override
public String getRealName() {
return userEntity.getRealName();
}
/**
*//**
* @return
*/
*//*
@Override
public boolean isAdmin() {
return userEntity.isAdmin();
}
/**
*//**
* @return
*/
*//*
@Override
public boolean isSystemUser() {
return userEntity.isSystemUser();
}
/**
*//**
* @return
*/
*//*
@Override
public boolean isManager() {
return userEntity.isManager();
}
/**
*//**
* @return
*/
*//*
@Override
public Integer getUserType() {
return userEntity.getUserType();
}
/**
*//**
* @return
*/
*//*
@Override
public String getToken() {
return userEntity.getToken();
}
/**
*//**
* @return
*/
*//*
@Override
public Long getLoginTime() {
return userEntity.getLoginTime();
}
/**
*//**
* @return
*/
*//*
@Override
public Long getExpireTime() {
return userEntity.getExpireTime();
}
/**
*//**
* @param expireTime
*/
*//*
@Override
public void setExpireTime(Long expireTime) {
}
/**
*//**
* @return
*/
*//*
@Override
public String getMenuUrl() {
return userEntity.getMenuUrl();
}
};
};*/
// 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