ZhuDongming
2020-05-06 39ecc194aeca3ded5cd046270dc1ca3d0749d09b
update
1 files modified
8 ■■■■ changed files
src/main/java/com/moral/service/impl/AccountServiceImpl.java 8 ●●●● patch | view | raw | blame | history
src/main/java/com/moral/service/impl/AccountServiceImpl.java
@@ -89,8 +89,12 @@
        String rawPassword = (String) parameters.get("password");
//        account.setPassword(encoder.encode((String) parameters.get("password")));
        account = accountMapper.selectOne(account);
        Integer existRole=accountMapper.getScreenRoleByAccountName(account.getAccountName());
        List<Menu> menuList = accountMapper.getScreenMenuListsByAccountName(account.getAccountName());
        Integer existRole = null;
        List<Menu> menuList = new ArrayList<>();
        if (account != null) {
            existRole = accountMapper.getScreenRoleByAccountName(account.getAccountName());
            menuList = accountMapper.getScreenMenuListsByAccountName(account.getAccountName());
        }
        boolean isValid = account == null ? false : encoder.matches(rawPassword, account.getPassword());
        if (!isValid) {
            result.put("msg", "用户名及密码输入错误!");