Browse Source

切换帐套时同步session

zhaohongpeng 7 years ago
parent
commit
01abe68063

+ 2 - 1
src/main/java/com/uas/platform/b2c/common/account/controller/AuthenticationController.java

@@ -42,7 +42,7 @@ public class AuthenticationController {
 	@RequestMapping(method = RequestMethod.GET, headers = "Accept=application/json")
 	@ResponseBody
 	@ResponseStatus(value = HttpStatus.OK)
-	public UserInfo getAuthentication() {
+	public UserInfo getAuthentication(HttpServletRequest request) {
 		if (SystemSession.getUser() == null) {
 			return null;
 		}
@@ -55,6 +55,7 @@ public class AuthenticationController {
 				user.setIssys(Constant.YES);
 			}
 		} catch (NullPointerException e) { }
+		request.getSession().setAttribute("user",user);
 		UserInfo userInfo = new UserInfo(user);
 		Integer hasQuestion = user.getHasQuestion();
 		if (hasQuestion != null && hasQuestion ==1) {