|  |  |  | 
|---|
|  |  |  | 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", "用户名及密码输入错误!"); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | if (IS_DELETE_FALSE.equals(account.getIsDelete())) { | 
|---|
|  |  |  | if(existRole!=null) { | 
|---|
|  |  |  | if (existRole != null) { | 
|---|
|  |  |  | result.put("msg", "登录成功!"); | 
|---|
|  |  |  | result.put("accountId", account.getId()); | 
|---|
|  |  |  | result.put("orgId", account.getOrganizationId()); | 
|---|
|  |  |  | result.put("data",menuList); | 
|---|
|  |  |  | result.put("data", menuList); | 
|---|
|  |  |  | setOrgIdsByAccount(result); | 
|---|
|  |  |  | }else{ | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | result.put("msg", "账户没有权限!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | 
|---|
|  |  |  | List<Menu> menuList = accountMapper.getParentMenuListsByAccountName(accountName); | 
|---|
|  |  |  | Integer organizationId = accountMapper.getByAccountName(accountName).getOrganizationId(); | 
|---|
|  |  |  | Map<String, Object> organizationMap = new LinkedHashMap<>(); | 
|---|
|  |  |  | organizationMap.put("organizationId",organizationId); | 
|---|
|  |  |  | organizationMap.put("organizationId", organizationId); | 
|---|
|  |  |  | String email = accountMapper.getEmailByAccountName(accountName); | 
|---|
|  |  |  | Map<String, Object> mapList = new LinkedHashMap<>(); | 
|---|
|  |  |  | Map<String, Object> appMap = new LinkedHashMap<>(); | 
|---|