Ejemplo n.º 1
0
        private NewVipUserInfo GetNewVipUserInfo()
        {
            string strSQL   = "SELECT [Level], LevelName FROM dbo.MUserVipInfo where UserId=@UserId ";
            var    dyParams = new DynamicParameters();

            dyParams.Add("@UserId", userId);
            NewVipUserInfo vipUserInfo = PublicConn.QueryVipSingle <NewVipUserInfo>(strSQL, ref dyParams);

            if (vipUserInfo == null)
            {
                vipUserInfo           = new NewVipUserInfo();
                vipUserInfo.Level     = 1;
                vipUserInfo.LevelName = "投资学徒";
            }
            return(vipUserInfo);
        }
Ejemplo n.º 2
0
        protected void InitFormData()
        {
            UserBLL bll = new UserBLL();

            userModel = bll.GetUserBasicInfoModelById(userId);
            ExtModel  = bll.GetUserBasicInfoExtInfo(userId);
            if (!string.IsNullOrWhiteSpace(userModel.HeadImage))
            {
                headImage = userModel.HeadImage;
            }
            accountModel = bll.GetWXFundAccountInfo(userId);

            //获取紧急联系人信息
            UserBasicInfo_Ext _userBasicInfo_Ext = new UserBLL().GetEmergencyContact(userId);

            if (_userBasicInfo_Ext != null)
            {
                ExtModel.ContactName         = _userBasicInfo_Ext.ContactName;
                ExtModel.ContactTelNo        = _userBasicInfo_Ext.ContactTelNo;
                ExtModel.ContactRelationShip = _userBasicInfo_Ext.ContactRelationShip;
            }
            if (string.IsNullOrEmpty(ExtModel.Graduation) || string.IsNullOrEmpty(ExtModel.University) || string.IsNullOrEmpty(ExtModel.Marriage) || string.IsNullOrEmpty(ExtModel.Address) || string.IsNullOrEmpty(ExtModel.OfficeDomain) || string.IsNullOrEmpty(ExtModel.OfficeScale) || string.IsNullOrEmpty(ExtModel.Position) || string.IsNullOrEmpty(ExtModel.Salary) || !ExtModel.IsHaveHouse.HasValue || !ExtModel.IsHaveCar.HasValue || string.IsNullOrEmpty(ExtModel.ContactName) || string.IsNullOrEmpty(ExtModel.ContactTelNo) || string.IsNullOrEmpty(ExtModel.ContactRelationShip))
            {
                IsCompleteDetailInfo = false;
            }
            UserVipModel = this.GetNewVipUserInfo();
            UserSettingInfo UserSetting = new UserSettingBLL().GetUserSettingInfo(userId);

            if (UserSetting != null)
            {
                IsTenderNeedPayPassword = UserSetting.IsTenderNeedPayPassword;
            }

            //存管通用户
            CgtUser = new QueryClient().GetUserByPlatformUserNo(userId);
            if (GlobalUtils.IsBankService)
            {
                var bankInfo = new BankFromJavaService().GetBankInfo(userId, TuanDai.WXSystem.Core.models.ServiceType.TuoMin);
                if (bankInfo != null && bankInfo.respData != null)
                {
                    userModel.OpenBankName = bankInfo.respData.openBankName;
                }
            }
        }
Ejemplo n.º 3
0
        protected void InitFormData()
        {
            UserBLL bll = new UserBLL();

            userModel = bll.GetUserBasicInfoModelById(userId);
            ExtModel  = bll.GetUserBasicInfoExtInfo(userId);
            if (!string.IsNullOrWhiteSpace(userModel.HeadImage))
            {
                headImage = userModel.HeadImage;
            }
            accountModel = bll.GetWXFundAccountInfo(userId);

            //获取紧急联系人信息
            UserBasicInfo_Ext _userBasicInfo_Ext = new UserBLL().GetEmergencyContact(userId);

            if (_userBasicInfo_Ext != null)
            {
                ExtModel.ContactName         = _userBasicInfo_Ext.ContactName;
                ExtModel.ContactTelNo        = _userBasicInfo_Ext.ContactTelNo;
                ExtModel.ContactRelationShip = _userBasicInfo_Ext.ContactRelationShip;
            }

            UserVipModel = this.GetNewVipUserInfo();
            UserSettingInfo UserSetting = new UserSettingBLL().GetUserSettingInfo(userId);

            if (UserSetting != null)
            {
                IsTenderNeedPayPassword = UserSetting.IsTenderNeedPayPassword;
            }

            //存管通用户
            CgtUser = new QueryClient().GetUserByPlatformUserNo(userId);
            if (GlobalUtils.IsBankService)
            {
                var bankInfo = new BankFromJavaService().GetBankInfo(userId, ServiceType.TuoMin);
                if (bankInfo != null && bankInfo.respData != null)
                {
                    userModel.OpenBankName = bankInfo.respData.openBankName;
                }
            }
        }
Ejemplo n.º 4
0
        protected void InitFormData()
        {
            pageModel = new PageMoneyModel();
            //GetUserAddInterest();
            UserBLL bll = new UserBLL();

            userModel = bll.GetUserBasicInfoModelById(userId);
            if (userModel != null && !string.IsNullOrWhiteSpace(userModel.HeadImage))
            {
                headImage = userModel.HeadImage;
            }
            GetAccountInfo(userId);
            GetDQLCFundData(userId);

            string read = Tool.CookieHelper.GetCookie("ReadUserPrizeFlag");

            if (!string.IsNullOrEmpty(read))
            {
                isShowPrizeBoxIco = !(read == "ReadPass");
            }
            else
            {
                isShowPrizeBoxIco = bll.GetUnReceiveCount(userId) > 0;
            }


            //获取用户收益
            //GetProfitStatistics(userId);
            UserVipModel = GetNewVipUserInfo();

            //待收本息加上复投宝的
            Tuple <decimal, decimal> ftbDueIn = GetFTBDueInAmountInterest(userId);

            accountModel.DueInPAndI = accountModel.DueInPAndI + ftbDueIn.Item1 + ftbDueIn.Item2;

            decimal weWaitInvestAmount = GetWePlanWaitInvestment(userId);

            accountModel.FreezeAcount = accountModel.FreezeAcount + weWaitInvestAmount;  //冻结资金加上We待投

            if (accountModel != null)
            {
                pageModel.P2PSumAmount = (accountModel.AviMoney) + (accountModel.DueInPAndI)
                                         + (accountModel.BorrowerOut) + (accountModel.DueConfirmWithdrawDeposit)
                                         + (accountModel.RewardMoney) + (accountModel.FreezeAcount);
            }
            if (!GlobalUtils.IsOpenSubscribeApi)
            {
                pageModel.P2PSumAmount += dqAccountModel.TotalAmount;
            }

            decimal p2pZxDueIn      = new ZXWXSelectBLL().GetDueDaiShow(userId, "37"); //p2p智享待收
            decimal dqZxDueInFromZx = new ZXWXSelectBLL().GetDueDaiShow(userId, "38"); //定期智享待收从智享数据库取

            decimal?dqZxDueInFromDq = 0;                                               //定期智享待收从定期数据库取
            string  sql             = "select  isnull(DueINAmount,0)+isnull(DueInInterest,0) from dbo.FundAccountInfo_zx with(nolock) where UserId=@UserId";
            var     para            = new Dapper.DynamicParameters();

            para.Add("@UserId", userId);
            dqZxDueInFromDq = TuanDaiDB.QueryFirstOrDefault <decimal?>(TdConfig.ApplicationName, "/BD/dqread", sql, ref para);

            pageModel.P2PAviAmount = accountModel.AviMoney;
            pageModel.P2PDueIn     = accountModel.DueInPAndI - p2pZxDueIn;

            pageModel.DQDueIn     = dqAccountModel.DueInPAndI - (dqZxDueInFromDq ?? 0);
            pageModel.DQAviAmount = dqAccountModel.AviMoney;
            pageModel.DQSumAmount = dqAccountModel.TotalAmount;

            GetPersonalNotice();


            zxDueInMoney = p2pZxDueIn + dqZxDueInFromZx;
        }