| | |
| | | result.put("msg", "登录成功!");
|
| | | result.put("accountId", account.getId());
|
| | | result.put("orgId", account.getOrganizationId());
|
| | | setOrgIdsByAccount(result);
|
| | | } else {
|
| | | result.put("msg","您的账号已禁用,请联系管理员!");
|
| | | }
|
| | |
| | | }
|
| | | @Override
|
| | | public void setOrgIdsByAccount(Map<String, Object> parameters) {
|
| | | String accountId = (String) parameters.get("accountId");
|
| | | String accountId = parameters.get("accountId").toString();
|
| | | accountId = accountId.replaceFirst("-", "");
|
| | | if (!isNumeric((String) parameters.get("accountId"))) {
|
| | | if (!isNumeric(accountId)) {
|
| | | throw new BusinessException("accountId 参数不合法!");
|
| | | }
|
| | |
|
| | |
| | | account.setPassword(parameters.get("password").toString());
|
| | | return account;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public Map<String, Object> getOrganizationIdByAccountId(String id) {
|
| | | Integer accountId = Integer.parseInt(id);
|
| | | Map<String, Object> map = accountMapper.getOrganizationIdByAccountId(accountId);
|
| | | return map;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<Account> getAccountList(String accountName) {
|
| | | List<Account> accountList = accountMapper.getAccountList(accountName);
|
| | | return accountList;
|
| | | }
|
| | | }
|