|
|
|
@ -76,7 +76,7 @@ public class ThirdLoginServiceImpl implements ThirdLoginService { |
|
|
|
} |
|
|
|
if (null == user || StringUtils.isEmpty(user.getLoginName())) { |
|
|
|
// 电话号码解密并获取用户
|
|
|
|
String phone = IdCardCryptoUtil.symmetricDecryptIdCard(srzSecretKey, jsonObject.getString("phone")); |
|
|
|
String phone = IdCardCryptoUtil.symmetricDecryptIdCard(secretKey, jsonObject.getString("phone")); |
|
|
|
log.info("电话号码:{}",phone); |
|
|
|
user = userApi.getUserByUserPhone(phone); |
|
|
|
} |
|
|
|
@ -145,9 +145,14 @@ public class ThirdLoginServiceImpl implements ThirdLoginService { |
|
|
|
//用户姓名
|
|
|
|
userBean.setUserName(jsonObject.getString("userName")); |
|
|
|
//登录账号
|
|
|
|
userBean.setLoginName(jsonObject.getString("account")); |
|
|
|
String phone = IdCardCryptoUtil.symmetricDecryptIdCard(secretKey,jsonObject.getString("phone")); |
|
|
|
if (StringUtils.isNotEmpty(jsonObject.getString("account"))) { |
|
|
|
userBean.setLoginName(jsonObject.getString("account")); |
|
|
|
} else { |
|
|
|
userBean.setLoginName(phone); |
|
|
|
} |
|
|
|
//手机号码
|
|
|
|
userBean.setPhonenumber(IdCardCryptoUtil.symmetricDecryptIdCard(secretKey,jsonObject.getString("phone"))); |
|
|
|
userBean.setPhonenumber(phone); |
|
|
|
//设置为默认密码
|
|
|
|
userBean.setPassword("123456"); |
|
|
|
userBean.setCreateTime(DateUtils.getNowDate()); |
|
|
|
|