forked from gzzfw/backEnd/gz-dyh

xusd
2024-10-16 70a8bd2c65bb24af82c5bc8c88b4352622aec1d5
dyh-service/dyh-cust/src/main/java/cn/huge/module/ctuser/service/CtAccountService.java
@@ -354,25 +354,23 @@
            // 判断账号是否存在
            CtAccount ctAccount = null;
            CtUser ctUser = null;
            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 {
            //如果和亿迅系统的手机号对不上,在用身份证号去查询用户,如果查询得到,就对得上,如果查询不到,就说明用户不存在
            ctUser = ctUserService.getByIdCard(gridUserBaseDTO.getIdNumber());
            if (ObjectUtils.isNotEmpty(ctUser)) {
                ctAccount = this.getByUserIdAndType(ctUser.getId(), 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(ctUser)) {
                //有对应用户,则模拟登录,返回对应信息
                UserLoginDTO userLoginDTO = login(ctAccount, ctUser);
@@ -449,7 +447,7 @@
        }
        //拿到用户角色菜单权限信息
        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())) {