浏览代码

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

songfuqiang 1 年之前
父节点
当前提交
cf7c7fbd6d
共有 1 个文件被更改,包括 7 次插入17 次删除
  1. 7 17
      backend-core/src/main/java/cn/kdan/pdf/backend/core/service/impl/AuthServiceImpl.java

+ 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返回,否则其他情况(邮箱登录)全部抛异常:用户未注册