public GetOpenedSecuritiesOM GetUserOpenedSecurities(UserAccount user)
        {
            var country = new CountryDAC().GetById(user.CountryId);
            GetOpenedSecuritiesOM entity = new GetOpenedSecuritiesOM();

            entity.IsOpenedAuthencator = ValidationFlagComponent.CheckSecurityOpened(user.ValidationFlag, ValidationFlag.GooogleAuthenticator);
            entity.CellPhone           = new UserAccountComponent().GetMaskedCellphone(country.PhoneCode, user.Cellphone);
            return(entity);
        }
示例#2
0
        public GetOpenedSecuritiesOM GetMerchantOpenedSecurities(Guid merchantId)
        {
            var merchant = new MerchantAccountDAC().GetById(merchantId);

            if (merchant == null)
            {
                throw new CommonException(ReasonCode.ACCOUNT_NOT_EXISTS, Resources.用户不存在);
            }
            GetOpenedSecuritiesOM entity = new GetOpenedSecuritiesOM();

            entity.IsOpenedAuthencator = ValidationFlagComponent.CheckSecurityOpened(merchant.ValidationFlag, ValidationFlag.GooogleAuthenticator);
            entity.CellPhone           = GetMaskedCellphone(merchant.PhoneCode, merchant.Cellphone);
            return(entity);
        }