Commit 52c4b942 by zhanghj

V1.1.0--登录成功后新增是否小程序绑定

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@20502 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 6b3d59f8
...@@ -834,6 +834,7 @@ public class UserController extends BaseController { ...@@ -834,6 +834,7 @@ public class UserController extends BaseController {
*/ */
Integer userType = user.getUserType(); Integer userType = user.getUserType();
Integer id = user.getId(); Integer id = user.getId();
String miniOpenId = user.getMiniOpenId();
logger.info("用户类型=" + userType); logger.info("用户类型=" + userType);
if (terminalType != userType) { if (terminalType != userType) {
if (Constants.USER_TYPE_MANAGER == terminalType) { if (Constants.USER_TYPE_MANAGER == terminalType) {
...@@ -876,6 +877,11 @@ public class UserController extends BaseController { ...@@ -876,6 +877,11 @@ public class UserController extends BaseController {
session.setAttribute(com.glsx.common.constants.Constants.SESSION_USERNAME_KEY, username); session.setAttribute(com.glsx.common.constants.Constants.SESSION_USERNAME_KEY, username);
session.setAttribute(com.glsx.common.constants.Constants.SESSION_USERID_KEY, user.getId()); session.setAttribute(com.glsx.common.constants.Constants.SESSION_USERID_KEY, user.getId());
map.put("JSESSIONID", subject.getSession().getId()); map.put("JSESSIONID", subject.getSession().getId());
if (StringUtils.isEmpty(miniOpenId)) {
map.put("isMiniAuth", false);
} else {
map.put("isMiniAuth", true);
}
result.setData(map); result.setData(map);
logger.info("用户登录成功:username=" + username); logger.info("用户登录成功:username=" + username);
} catch (UnknownAccountException uae) { } catch (UnknownAccountException uae) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!