|
|
@ -353,7 +353,9 @@ public class UserLoginServiceImpl extends ServiceImpl<UserLoginDao, UserEntity> |
|
|
|
// 用户的唯一标识(openid)
|
|
|
|
// 用户的唯一标识(openid)
|
|
|
|
String openid = (String) json.get("openid"); |
|
|
|
String openid = (String) json.get("openid"); |
|
|
|
|
|
|
|
|
|
|
|
System.out.println("session_key======"+session_key+"openid===="+openid); |
|
|
|
String unionid = json.get("unionid").toString(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
System.out.println("session_key======"+session_key+"openid===="+openid+"unionid===="+unionid); |
|
|
|
|
|
|
|
|
|
|
|
Map map = new HashMap(); |
|
|
|
Map map = new HashMap(); |
|
|
|
|
|
|
|
|
|
|
@ -376,9 +378,11 @@ public class UserLoginServiceImpl extends ServiceImpl<UserLoginDao, UserEntity> |
|
|
|
userInfo.put("province", userInfoJSON.get("province")); |
|
|
|
userInfo.put("province", userInfoJSON.get("province")); |
|
|
|
userInfo.put("country", userInfoJSON.get("country")); |
|
|
|
userInfo.put("country", userInfoJSON.get("country")); |
|
|
|
userInfo.put("avatarUrl", userInfoJSON.get("avatarUrl")); |
|
|
|
userInfo.put("avatarUrl", userInfoJSON.get("avatarUrl")); |
|
|
|
userInfo.put("unionId", userInfoJSON.get("unionId")); |
|
|
|
//userInfo.put("unionId", userInfoJSON.get("unionId"));
|
|
|
|
|
|
|
|
userInfo.put("unionId", unionid); |
|
|
|
|
|
|
|
|
|
|
|
System.out.println("unionId============"+userInfoJSON.get("unionId")); |
|
|
|
System.out.println("unionId1============"+userInfoJSON.get("unionId")); |
|
|
|
|
|
|
|
System.out.println("unionId2============"+userInfoJSON.get("unionId")); |
|
|
|
map.put("userInfo", userInfo); |
|
|
|
map.put("userInfo", userInfo); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
map.put("status", 0); |
|
|
|
map.put("status", 0); |
|
|
@ -422,6 +426,7 @@ public class UserLoginServiceImpl extends ServiceImpl<UserLoginDao, UserEntity> |
|
|
|
userEntity.setWechatId(md5UnionId);//加密后unionId
|
|
|
|
userEntity.setWechatId(md5UnionId);//加密后unionId
|
|
|
|
userEntity.setHeadPortaritUrl(userMap.get("avatarUrl").toString());//头像路径
|
|
|
|
userEntity.setHeadPortaritUrl(userMap.get("avatarUrl").toString());//头像路径
|
|
|
|
userEntity.setCreateTime(new Date());//创建时间
|
|
|
|
userEntity.setCreateTime(new Date());//创建时间
|
|
|
|
|
|
|
|
userEntity.setType(loginRequest.getType());//登录类型(1:手机号 2:微信扫码登录 3:客户小程序登录 4:企业小程序登录)
|
|
|
|
userLoginDao.insert(userEntity); |
|
|
|
userLoginDao.insert(userEntity); |
|
|
|
loginRequest.setPhone(userMap.get("nickName").toString());//账号默认为微信名称
|
|
|
|
loginRequest.setPhone(userMap.get("nickName").toString());//账号默认为微信名称
|
|
|
|
} |
|
|
|
} |
|
|
|