Commit 2a331ba0 authored by shiyu's avatar shiyu

保存玩物得志用户信息-手机号

parent 3aeafc10
...@@ -144,8 +144,6 @@ public class UserServiceImpl implements UserService { ...@@ -144,8 +144,6 @@ public class UserServiceImpl implements UserService {
result.put("isInvited", true); result.put("isInvited", true);
User user = userDao.queryById(dto.getUserId()); User user = userDao.queryById(dto.getUserId());
logger.info("登录用户的信息:{}", JsonUtils.from(user)); logger.info("登录用户的信息:{}", JsonUtils.from(user));
//保存新登录的用户信息
userDao.insertByMapper(user);
String phone = user.getMobile(); String phone = user.getMobile();
//如果用户手机号为空,则调用微信接口查询出手机号进行保存 //如果用户手机号为空,则调用微信接口查询出手机号进行保存
...@@ -170,6 +168,9 @@ public class UserServiceImpl implements UserService { ...@@ -170,6 +168,9 @@ public class UserServiceImpl implements UserService {
} }
} }
} }
user.setMobile(phone);
//保存新登录的用户信息
userDao.insertByMapper(user);
result.put("phone", phone); result.put("phone", phone);
// 缓存用户信息 // 缓存用户信息
String userKey = MessageFormat.format(CacheCodeConstants.USER_INFO_KEY, user.getId()); String userKey = MessageFormat.format(CacheCodeConstants.USER_INFO_KEY, user.getId());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment