提交 4e32c232 作者: zhenjie

认证相关

上级 567ebb3d
......@@ -87,11 +87,13 @@ public class AuthServiceImpl implements AuthService {
}
//数据库查询用户信息
UserAccountVO userAccountVO = userAccountService.getUserAccountInfoByUnionId(unionId);
String uid = userAccountVO.getUid();
if (userAccountVO == null) {
UserAccountDO userAccountDO = new UserAccountDO();
userAccountDO.setUnionId(unionId);
userAccountDO.setOpenId(openId);
userAccountDO.setUid(CodeUtil.generateUserUID());
uid = CodeUtil.generateUserUID();
userAccountDO.setUid(uid);
userAccountDO.setAccountType(0);
userAccountDO.setPortType(100);
userAccountDO.setSource(wxLoginVO.getSource());
......@@ -104,7 +106,7 @@ public class AuthServiceImpl implements AuthService {
map.put(JwtConstant.TOKEN_TYPE, JwtConstant.IUAV_TOKEN);
String token = JwtUtil.createJwt(map);
LoginSuccessDTO loginSuccessDTO = LoginSuccessDTO.builder().token(token).userAccountId(userAccountVO.getId()).accountNo(userAccountVO.getAccountNo()).uid(userAccountVO.getUid())
LoginSuccessDTO loginSuccessDTO = LoginSuccessDTO.builder().token(token).userAccountId(userAccountVO.getId()).accountNo(userAccountVO.getAccountNo()).uid(uid)
.userName(userAccountVO.getUserName()).nickName(userAccountVO.getNickName()).phoneNum(userAccountVO.getPhoneNum()).build();
stringRedisTemplate.opsForValue().set(
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论