/** * 领域层的userInfo转换为南向的对象 * * @param userInfo 领域层的用户信息 * @return UserInfoSouth 南向的用户信息 * @since eSDK IVS V100R003C00 */ public UserInfoSouth getUserInfoModal2Soap(UserInfo userInfo) { UserInfoSouth userInfoSouth = new UserInfoSouth(); userInfoSouth.clear(); if (null != userInfo.getDomainCode()) { userInfoSouth.domainCode = BytesUtils.stringToBytesForIVS(userInfo.getDomainCode()); } if (null != userInfo.getEmail()) { userInfoSouth.email = BytesUtils.stringToBytesForIVS(userInfo.getEmail()); } userInfoSouth.groupId = userInfo.getGroupId(); if (null != userInfo.getIsFirstLogin()) { userInfoSouth.isFirstLogin = userInfo.getIsFirstLogin() ? 1 : 0; } if (null != userInfo.getLockTime()) { userInfoSouth.lockTime = BytesUtils.stringToBytesForIVS(userInfo.getLockTime()); } if (null != userInfo.getLoginName()) { userInfoSouth.loginName = BytesUtils.stringToBytesForIVS(userInfo.getLoginName()); } userInfoSouth.maxSessionCount = userInfo.getMaxSessionCount(); userInfoSouth.maxVideoCount = userInfo.getMaxVideoCount(); if (null != userInfo.getPassword()) { userInfoSouth.password = BytesUtils.stringToBytesForIVS(userInfo.getPassword()); } if (null != userInfo.getPhone()) { userInfoSouth.phone = BytesUtils.stringToBytesForIVS(userInfo.getPhone()); } userInfoSouth.ptzLevel = userInfo.getPtzLevel(); if (null != userInfo.getPwdModifyDate()) { userInfoSouth.pwdModifyDate = BytesUtils.stringToBytesForIVS(userInfo.getPwdModifyDate()); } if (null != userInfo.getRegisterDate()) { userInfoSouth.registerDate = BytesUtils.stringToBytesForIVS(userInfo.getRegisterDate()); } if (null != userInfo.getReserve()) { userInfoSouth.reserve = BytesUtils.stringToBytesForIVS(userInfo.getReserve()); } userInfoSouth.roleId = userInfo.getRoleId(); userInfoSouth.sex = userInfo.getSex(); userInfoSouth.validDateFlag = userInfo.getValidDateFlag(); userInfoSouth.validDateStart = BytesUtils.stringToBytesForIVS(userInfo.getValidDateStart()); userInfoSouth.validDateEnd = BytesUtils.stringToBytesForIVS(userInfo.getValidDateEnd()); userInfoSouth.status = userInfo.getStatus(); if (null != userInfo.getUserDesc()) { userInfoSouth.userDesc = BytesUtils.stringToBytesForIVS(userInfo.getUserDesc()); } if (null != userInfo.getUserDomain()) { userInfoSouth.userDomain = BytesUtils.stringToBytesForIVS(userInfo.getUserDomain()); } userInfoSouth.userId = userInfo.getId(); if (null != userInfo.getUserName()) { userInfoSouth.userName = BytesUtils.stringToBytesForIVS(userInfo.getUserName()); } userInfoSouth.userType = userInfo.getUserType(); return userInfoSouth; }
/** * 南向的UserInfoSouth转换为领域层的对象 * * @param UserInfoSouth 南向的用户信息 * @return UserInfo 领域层的用户对象 * @since eSDK IVS V100R003C00 */ public UserInfo getUserInfoSoap2Modal(UserInfoSouth userInfoSouth) { UserInfo usermodal = new UserInfo(); usermodal.setDomainCode(BytesUtils.bytesToStringForIVS(userInfoSouth.domainCode)); usermodal.setEmail(BytesUtils.bytesToStringForIVS(userInfoSouth.email)); usermodal.setGroupId(userInfoSouth.groupId); usermodal.setIsFirstLogin(0 == userInfoSouth.isFirstLogin ? false : true); usermodal.setLockTime(BytesUtils.bytesToStringForIVS(userInfoSouth.lockTime)); usermodal.setLoginName(BytesUtils.bytesToStringForIVS(userInfoSouth.loginName)); usermodal.setMaxSessionCount(userInfoSouth.maxSessionCount); usermodal.setMaxVideoCount(userInfoSouth.maxVideoCount); usermodal.setPassword(BytesUtils.bytesToStringForIVS(userInfoSouth.password)); usermodal.setPhone(BytesUtils.bytesToStringForIVS(userInfoSouth.phone)); usermodal.setPtzLevel(userInfoSouth.ptzLevel); usermodal.setPwdModifyDate(BytesUtils.bytesToStringForIVS(userInfoSouth.pwdModifyDate)); usermodal.setRegisterDate(BytesUtils.bytesToStringForIVS(userInfoSouth.registerDate)); usermodal.setReserve(BytesUtils.bytesToStringForIVS(userInfoSouth.reserve)); usermodal.setRoleId(userInfoSouth.roleId); usermodal.setSex(userInfoSouth.sex); usermodal.setValidDateFlag(userInfoSouth.validDateFlag); usermodal.setValidDateStart(BytesUtils.bytesToStringForIVS(userInfoSouth.validDateStart)); usermodal.setValidDateEnd(BytesUtils.bytesToStringForIVS(userInfoSouth.validDateEnd)); usermodal.setStatus(userInfoSouth.status); usermodal.setUserDesc(BytesUtils.bytesToStringForIVS(userInfoSouth.userDesc)); usermodal.setUserDomain(BytesUtils.bytesToStringForIVS(userInfoSouth.userDomain)); usermodal.setId(userInfoSouth.userId); usermodal.setUserName(BytesUtils.bytesToStringForIVS(userInfoSouth.userName)); usermodal.setUserType(userInfoSouth.userType); return usermodal; }