Authored by mali

登录账户

1 package com.yoho.ufo.service.impl; 1 package com.yoho.ufo.service.impl;
2 2
  3 +import com.yoho.ufo.constants.PlatformConstant;
3 import com.yoho.ufo.login.model.UserInfoResponseBO; 4 import com.yoho.ufo.login.model.UserInfoResponseBO;
4 import org.slf4j.Logger; 5 import org.slf4j.Logger;
5 import org.slf4j.LoggerFactory; 6 import org.slf4j.LoggerFactory;
@@ -21,7 +22,7 @@ public class UserHelper { @@ -21,7 +22,7 @@ public class UserHelper {
21 logger.info("method UserHelper in, userId is {} userName is {}", userId, userName); 22 logger.info("method UserHelper in, userId is {} userName is {}", userId, userName);
22 if(this.userId == 0) { 23 if(this.userId == 0) {
23 HttpServletRequest httpRequest = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); 24 HttpServletRequest httpRequest = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
24 - UserInfoResponseBO siteType = (UserInfoResponseBO)httpRequest.getSession().getAttribute("userSession"); 25 + UserInfoResponseBO siteType = (UserInfoResponseBO)httpRequest.getSession().getAttribute(PlatformConstant.USER_SESSION);
25 26
26 logger.info("method UserHelper in, userId is {} userName is {}", userId, userName); 27 logger.info("method UserHelper in, userId is {} userName is {}", userId, userName);
27 28