Browse Source

医生端登录

LiTaohong 6 years ago
parent
commit
55e79b86ed

+ 4 - 2
server/svr-authentication/src/main/java/com/yihu/jw/security/core/userdetails/jdbc/WlyyUserDetailsService.java

@ -66,7 +66,7 @@ public class WlyyUserDetailsService extends JdbcDaoSupport implements UserDetail
        if (users == null || users.size() == 0) {
            throw new UsernameNotFoundException(username);
        }
        if (users.get(0).isLocked()) {
        if (null != users.get(0).isLocked() && users.get(0).isLocked()) {
            Date date = users.get(0).getLockedDate();
            if (new Date().after(DateUtils.addMinutes(date, autoUnlockTime))) {
                //解除锁定
@ -74,7 +74,9 @@ public class WlyyUserDetailsService extends JdbcDaoSupport implements UserDetail
                users.get(0).setLocked(false);
            }
        }
        return new SaltUser(username, users.get(0).getPassword(), users.get(0).getSalt(), users.get(0).isEnabled(), users.get(0).isLocked(), getGrantedAuthorities(username));
        boolean isEnabled = null == users.get(0).isEnabled() ? false : users.get(0).isEnabled();
        boolean isLocked = null == users.get(0).isLocked() ? false : users.get(0).isLocked();
        return new SaltUser(username, users.get(0).getPassword(), users.get(0).getSalt(), isEnabled, isLocked, getGrantedAuthorities(username));
    }