Ejemplo n.º 1
0
        public UserProfile GetUserProfile(Guid id)
        {
            UserProfile result = null;
            var         server = QueryKYCRouter(id);

            if (server == null)
            {
                throw new InvalidProfileServiceException();
            }

            var dac = new UserProfileRPC(server);

            result = dac.GetById(id);
            return(result);
        }
Ejemplo n.º 2
0
        public UserProfileSet GetUserProfileSet(Guid id)
        {
            var            profileSet     = new UserProfileSet();
            UserAccountDAC userAccountDAC = new UserAccountDAC();
            UserAccount    userAccount    = userAccountDAC.GetById(id);

            if (userAccount == null)
            {
                return(null);//查无
            }
            //赋值
            profileSet.Id                = userAccount.Id;
            profileSet.Cellphone         = userAccount.Cellphone;
            profileSet.Email             = userAccount.Email;
            profileSet.IsVerifiedEmail   = userAccount.IsVerifiedEmail;
            profileSet.RegistrationDate  = userAccount.RegistrationDate;
            profileSet.CountryId         = userAccount.CountryId;
            profileSet.Photo             = userAccount.Photo;
            profileSet.Password          = userAccount.Password;
            profileSet.Pin               = userAccount.Pin;
            profileSet.SecretKey         = userAccount.SecretKey;
            profileSet.Status            = userAccount.Status;
            profileSet.IsAllowWithdrawal = userAccount.IsAllowWithdrawal;
            profileSet.IsAllowExpense    = userAccount.IsAllowExpense;
            profileSet.FiatCurrency      = userAccount.FiatCurrency;
            profileSet.InvitationCode    = userAccount.InvitationCode;
            profileSet.InviterCode       = userAccount.InviterCode;
            profileSet.ValidationFlag    = userAccount.ValidationFlag;
            profileSet.AuthSecretKey     = userAccount.AuthSecretKey;


            var         routerDAC   = new ProfileRouterDAC();
            var         server      = routerDAC.GetRouter(userAccount.CountryId);
            UserProfile userProfile = null;

            if (server == null)
            {
                throw new InvalidProfileServiceException();
            }

            var userProfileDAC = new UserProfileRPC(server);

            userProfile = userProfileDAC.GetById(userAccount.Id);
            if (userProfile != null)
            {
                profileSet.UserAccountId = userProfile.UserAccountId;
                profileSet.LastName      = userProfile.LastName;
                profileSet.FirstName     = userProfile.FirstName;
                //profileSet.Fullname = userProfile.Fullname;
                profileSet.IdentityDocNo   = userProfile.IdentityDocNo;
                profileSet.IdentityDocType = userProfile.IdentityDocType;
                //profileSet.IdentityDocFile = userProfile.IdentityDocFile;
                //profileSet.IsIdentityDocVerified = userProfile.IsIdentityDocVerified;
                profileSet.IdentityExpiryDate = userProfile.IdentityExpiryDate;
                profileSet.DateOfBirth        = userProfile.DateOfBirth;
                profileSet.Address1           = userProfile.Address1;
                profileSet.Address2           = userProfile.Address2;
                profileSet.City               = userProfile.City;
                profileSet.State              = userProfile.State;
                profileSet.Postcode           = userProfile.Postcode;
                profileSet.Country            = userProfile.Country;
                profileSet.Gender             = userProfile.Gender;
                profileSet.FrontIdentityImage = userProfile.FrontIdentityImage;
                profileSet.ResidentImage      = userProfile.ResidentImage;
                profileSet.BackIdentityImage  = userProfile.BackIdentityImage;
                profileSet.HandHoldWithCard   = userProfile.HandHoldWithCard;
                profileSet.L1VerifyStatus     = userProfile.L1VerifyStatus;
                profileSet.L2VerifyStatus     = userProfile.L2VerifyStatus;
                profileSet.L1SubmissionDate   = userProfile.L1SubmissionDate;
                profileSet.L2SubmissionDate   = userProfile.L2SubmissionDate;
                profileSet.L1Remark           = userProfile.L1Remark;
                profileSet.L2Remark           = userProfile.L2Remark;
            }
            return(profileSet);
        }