| | |
| | | |
| | | @Override |
| | | public UserInfo userInfo(String tenantId, String account, String password, UserEnum userEnum) { |
| | | User user = baseMapper.getUser(tenantId, account, password); |
| | | return buildUserInfo(user, userEnum); |
| | | try { |
| | | User user = baseMapper.getUser(tenantId, account, password); |
| | | return buildUserInfo(user, userEnum); |
| | | }catch (Exception e){ |
| | | throw new ServiceException("账号["+account+"]"+"重复!"); |
| | | } |
| | | } |
| | | |
| | | private UserInfo buildUserInfo(User user) { |
| | |
| | | String deptIds = userDeptService.selectIn(user.getDeptId()); |
| | | if (null!=deptIds && !deptIds.equals("")) { |
| | | if (null != deptId && !deptId.equals("")) { |
| | | //管理员不分单位导入 |
| | | if (!deptId.equals(deptIds)) { |
| | | throw new ServiceException("导入失败!不能导入不是本公司的保安员数据!"); |
| | | if(!deptId.equals("1123598813738675201")) { |
| | | throw new ServiceException("导入失败!不能导入不是本公司的保安员数据!"); |
| | | } |
| | | } |
| | | } |
| | | user.setDeptId(deptIds); |