| | |
| | | // 判断账号是否存在 |
| | | CtAccount ctAccount = null; |
| | | CtUser ctUser = null; |
| | | //如果和亿迅系统的手机号对不上,在用身份证号去查询用户,如果查询得到,就对得上,如果查询不到,就说明用户不存在 |
| | | ctUser = ctUserService.getByIdCard(gridUserBaseDTO.getIdNumber()); |
| | | if (ObjectUtils.isNotEmpty(ctUser)) { |
| | | ctAccount = this.getByUserIdAndType(ctUser.getId(), UserBaseConsts.ACC_TYPE_1); |
| | | ctAccount = this.getByAccAndType(gridUserBaseDTO.getAccount(), UserBaseConsts.ACC_TYPE_1); |
| | | if (ObjectUtils.isEmpty(ctAccount)) { |
| | | ctAccount = this.getByAccAndType(gridUserBaseDTO.getMobile(), UserBaseConsts.ACC_TYPE_1); |
| | | } |
| | | // CtAccount ctAccount = this.getByAccAndType(gridUserBaseDTO.getAccount(), UserBaseConsts.ACC_TYPE_1); |
| | | // if (ObjectUtils.isEmpty(ctAccount)) { |
| | | // ctAccount = this.getByAccAndType(gridUserBaseDTO.getMobile(), UserBaseConsts.ACC_TYPE_1); |
| | | // } |
| | | |
| | | // if (ObjectUtils.isNotEmpty(ctAccount)) { |
| | | // //返回结果 |
| | | // ctUser = ctUserService.getById(ctAccount.getUserId()); |
| | | // if (ObjectUtils.isEmpty(ctUser)) { |
| | | // return ReturnFailUtils.getRepInfo("用户不存在!"); |
| | | // } |
| | | // } else { |
| | | // |
| | | // } |
| | | if (ObjectUtils.isNotEmpty(ctAccount)) { |
| | | //返回结果 |
| | | ctUser = ctUserService.getById(ctAccount.getUserId()); |
| | | if (ObjectUtils.isEmpty(ctUser)) { |
| | | return ReturnFailUtils.getRepInfo("用户不存在!"); |
| | | } |
| | | } else { |
| | | //如果和亿迅系统的手机号对不上,在用身份证号去查询用户,如果查询得到,就对得上,如果查询不到,就说明用户不存在 |
| | | ctUser = ctUserService.getByIdCard(gridUserBaseDTO.getIdNumber()); |
| | | if (ObjectUtils.isNotEmpty(ctUser)) { |
| | | ctAccount = this.getByUserIdAndType(ctUser.getId(), UserBaseConsts.ACC_TYPE_1); |
| | | } |
| | | } |
| | | if (ObjectUtils.isNotEmpty(ctUser)) { |
| | | //有对应用户,则模拟登录,返回对应信息 |
| | | UserLoginDTO userLoginDTO = login(ctAccount, ctUser); |
| | |
| | | } |
| | | //拿到用户角色菜单权限信息 |
| | | GridRoleMenuVo gridRoleMenuVo = new GridRoleMenuVo(); |
| | | gridRoleMenuVo.setOrgRoleId(userRoleDTO.getRoleId()); |
| | | gridRoleMenuVo.setOrgRoleId(userRoleDTO.getOrgRoleId()); |
| | | gridRoleMenuVo.setMenuSys("sub-mdjfhj"); |
| | | CtUserole roleMenu = sysClient.getRoleMenu(gridRoleMenuVo); |
| | | if (roleMenu == null || StringUtils.isEmpty(roleMenu.getRoleId())) { |