| | |
| | | long companyId = userlogin.getCompanyId() == null ? UserEntity.USER_BELONG_TOP : userlogin.getCompanyId(); |
| | | if(companyId > UserEntity.USER_BELONG_TOP){ |
| | | userEntity.setCompanyId(companyId); |
| | | userEntity.setRoleName(RoleEntity.ROLE_ADMIN_NAME); |
| | | userEntity.setRoleId(RoleEntity.ROLE_ADMIN_NAME_ID); |
| | | }else if(companyId == UserEntity.USER_BELONG_TOP){ |
| | | userEntity.setRoleName(RoleEntity.ROLE_SUPER_NAME); |
| | | userEntity.setRoleId(RoleEntity.ROLE_SUPER_NAME_ID); |
| | | } |
| | | if(StrUtil.isNotEmpty(adminUserDto.getUsername())){ |
| | | userEntity.setUsername(adminUserDto.getUsername()); |