class UserDetailServiceImpl implements ZltUserDetailsService {
    private static final String ACCOUNT_TYPE = SecurityConstants.DEF_ACCOUNT_TYPE;

    @Resource
    private UserService userService;

    @Override
    public boolean supports(String accountType) {
        return ACCOUNT_TYPE.equals(accountType);
    }

    @Override
    public UserDetails loadUserByUsername(String username) {<FILL_FUNCTION_BODY>}

    @Override
    public UserDetails loadUserByUserId(String openId) {
        SysUser sysUser = userService.findByOpenId(openId);
        checkUser(sysUser);
        return LoginUserUtils.getLoginAppUser(sysUser);
    }

    @Override
    public UserDetails loadUserByMobile(String mobile) {
        SysUser sysUser = userService.findByMobile(mobile);
        checkUser(sysUser);
        return LoginUserUtils.getLoginAppUser(sysUser);
    }

    private void checkUser(SysUser sysUser) {
        if (sysUser != null && !sysUser.getEnabled()) {
            throw new DisabledException("用户已作废");
        }
    }
}

        SysUser sysUser = userService.findByUsername(username);
        if (sysUser == null) {
            throw new InternalAuthenticationServiceException("用户名或密码错误");
        }
        checkUser(sysUser);
        return LoginUserUtils.getLoginAppUser(sysUser);
    
<no_super_class>