Ver Fonte

用户模块: 优化用户获取token逻辑

songfuqiang há 1 ano atrás
pai
commit
cf7c7fbd6d

+ 7 - 17
backend-core/src/main/java/cn/kdan/pdf/backend/core/service/impl/AuthServiceImpl.java

@@ -331,23 +331,13 @@ public class AuthServiceImpl implements AuthService {
                     memberVo.setTimeZone(member.getTimeZone());
                     memberVo.setAvatarUrl(avatarService.selectAvatarByMemberId(memberId));
                 }else {
-                    if("false".equals(password)){
-                        memberVo.setName(member.getName());
-                        memberVo.setEmail(member.getEmail());
-                        memberVo.setPhone(member.getPhone());
-                        memberVo.setPhoneZone(member.getPhoneZone());
-                        memberVo.setTimeZone(member.getTimeZone());
-                        memberId = member.getId();
-                        memberVo.setAvatarUrl(avatarService.selectAvatarByMemberId(memberId));
-                    } else{
-                        memberVo.setName(member.getName());
-                        memberVo.setEmail(member.getEmail());
-                        memberVo.setPhone(member.getPhone());
-                        memberVo.setPhoneZone(member.getPhoneZone());
-                        memberVo.setTimeZone(member.getTimeZone());
-                        memberId = member.getId();
-                        memberVo.setAvatarUrl(avatarService.selectAvatarByMemberId(memberId));
-                    }
+                    memberVo.setName(member.getName());
+                    memberVo.setEmail(member.getEmail());
+                    memberVo.setPhone(member.getPhone());
+                    memberVo.setPhoneZone(member.getPhoneZone());
+                    memberVo.setTimeZone(member.getTimeZone());
+                    memberId = member.getId();
+                    memberVo.setAvatarUrl(avatarService.selectAvatarByMemberId(memberId));
                 }
             }else {
                 //如果用户存在将用户id返回,否则其他情况(邮箱登录)全部抛异常:用户未注册