浏览代码

代码优化

刘俊驰 1 年之前
父节点
当前提交
c0656adb14

+ 2 - 5
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/SmsCodeServiceImpl.java

@@ -125,11 +125,8 @@ public class SmsCodeServiceImpl implements SmsCodeService {
                     }
                 }else if(ClientEnum.SYSTEM == platform) {
                     Employee employee = employeeService.get(userId);
-                    if (employee == null) {
-                        throw new UsernameNotFoundException("账户不存在");
-                    }
-                    if (UserLockFlag.LOCKED.equals(employee.getLockFlag())) {
-                        throw new LockedException("账号已冻结,请联系管理员");
+                    if (employee != null && (UserLockFlag.LOCKED.equals(employee.getLockFlag()))) {
+                            throw new LockedException("账号已冻结,请联系管理员");
                     }
                 } else if (ClientEnum.TENANT == platform) {
                     TenantStaff tenantStaff = tenantStaffService.getByUserId(userId);