Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userId = WebUserAuth.UserId.Value;
            if (!IsPostBack)
            {
                UserBLL userBll = new UserBLL();
                userModel = userBll.GetUserBasicInfoModelById(userId);

                DrawType = WEBRequest.GetQueryInt("drawtype", 2);
                if (DrawType != 1 && DrawType != 2)
                {
                    DrawType = 2;
                }
                string            strSQL   = "select Id, ActualWithdrawDeposit, merchanType from AppWithdrewFund where UserId=@userId  order by AppDate desc";
                DynamicParameters dyParams = new DynamicParameters();
                dyParams.Add("@userId", userId);

                WXAppWithdrewFund appWith = PublicConn.QuerySingleWrite <WXAppWithdrewFund>(strSQL, ref dyParams);
                if (appWith != null)
                {
                    Amout = appWith.ActualWithdrawDeposit ?? 0;
                    if (DrawType == 1)
                    {
                        strSQL   = " update AppWithdrewFund set merchanType=9 where Id=@id";
                        dyParams = new DynamicParameters();
                        dyParams.Add("@id", appWith.Id);
                        PublicConn.ExecuteTD(PublicConn.DBWriteType.FundWrite, strSQL, ref dyParams);
                    }
                }
            }
        }
Ejemplo n.º 2
0
        private void GetContractInfo(string key)
        {
            string contactno = this.key;

            this.submodel = new SubscribeBLL().GetSubscribeInfoContractNo(contactno);
            if (submodel.AddDate < Convert.ToDateTime("2016-3-11"))
            {
                companyName = "广东俊特团贷网络信息服务股份有限公司";
            }
            else
            {
                companyName = "东莞团贷网互联网科技服务有限公司";
            }
            this.subBasicModel  = userbll.GetUserBasicInfoModelById(submodel.SubscribeUserId.Value); //基本信息
            this.proModel       = projectbll.GetProjectDetailInfo(submodel.ProjectId.Value);         //标信息
            this.publisherModel = userbll.GetUserBasicInfoModelById(proModel.UserId.Value);

            var Params = new Dapper.DynamicParameters();

            Params.Add("@ProjectId", proModel.Id);
            string selSQL = @"select * from fq_ItemSetsProject with(nolock) where ProjectId=@ProjectId";

            itemProjectInfo = PublicConn.QuerySingle <Fq_ItemSetsProjectInfo>(selSQL, ref Params);

            RepaymentTypeDesc = ToolStatus.ConvertRepaymentType(proModel.RepaymentType.Value);

            if (WebUserAuth.UserId == publisherModel.Id)
            {
                this.subBasicModel.RealName     = StringHandler.MaskStartPre(subBasicModel.RealName, 1); //出借人
                this.subBasicModel.IdentityCard = StringHandler.MaskCardNo(subBasicModel.IdentityCard);  //出借人身份证号
            }
            else
            {
                this.itemProjectInfo.RealName     = StringHandler.MaskStartPre(itemProjectInfo.RealName, 1); //借款人
                this.itemProjectInfo.IdentityCard = StringHandler.MaskCardNo(itemProjectInfo.IdentityCard);  //出借人身份证号
            }

            UserEnterpriseInfo userEnterprise = new Common.Contract().GetBorrowerGuaranteeEnterprise(proModel.UserId.Value, proModel.AddDate.Value, proModel.Type.Value);

            if (userEnterprise != null)
            {
                assureModel = new Common.Contract().GetAssureOrganizationByUserId(userEnterprise.UserId);
            }
            else
            {
                int gid = 0;
                int.TryParse(proModel.Guarantors, out gid);
                assureModel = new Common.Contract().GetAssureOrganizationById(gid);
                if (gid == 1 && DateTime.Now < DateTime.Parse("2013-11-27"))
                {
                    assureModel.FullName = "东莞市俊特团贷网络信息服务有限公司";
                }
            }

            //印章小图片
            if (assureModel != null)
            {
                this.assureModel.image = this.GetSmallImage(this.assureModel.image);
            }
        }
Ejemplo n.º 3
0
        private void GetContractInfo(string key)
        {
            string contactno = this.key;
            string strSQL    = @"SELECT a.ProductName, a.PlanAmount,a.ProjectTypes,a.Deadline,b.RepeatInvestType,
                b.YearRate, b.MinYearRate, a.StartDate,a.UnitAmount, b.Amount as JoinAmount, b.OrderQty,
                b.UserId, b.OrderDate,c.TypeWord
                FROM dbo.We_Product a WITH(NOLOCK)
                left JOIN dbo.We_Order b WITH(NOLOCK) on b.ProductId=a.Id
                INNER JOIN dbo.We_ProductType c WITH(NOLOCK) ON a.ProductTypeId = c.Id
                WHERE b.Id=@WeOrderId";
            var    dyParams  = new Dapper.DynamicParameters();

            dyParams.Add("@WeOrderId", contactno);
            model = PublicConn.QuerySingle <MyWeOrderInfo>(strSQL, ref dyParams);
            if (model == null)
            {
                model = new MyWeOrderInfo();
            }
            this.subBasicModel = userbll.GetUserBasicInfoModelById(model.UserId);
            if (model.OrderDate >= DateTime.Parse("2016-03-11"))
            {
                strCompanyName = "东莞团贷网互联网科技服务有限公司";
                Sealt_TuanDai  = "images/tuandai_ss.png";
            }

            //this.subBasicModel.RealName = StringHandler.MaskStartPre(subBasicModel.RealName, 1);//出借人
            //this.subBasicModel.IdentityCard = StringHandler.MaskCardNo(subBasicModel.IdentityCard);//出借人身份证号
            this.GetRedemptionRate();
        }
Ejemplo n.º 4
0
        protected bool GetData()
        {
            model = bll.GetSubScriberansfer(projectId);

            //获取项目信息
            DynamicParameters dyParams = new DynamicParameters();

            dyParams.Add("@id", projectId);
            string strSQL          = "select top 1  SubscribeUserId from Subscribe with(nolock) where Id=(select m_FromSubscribeId from t_SubScribeTransfer  with(nolock) where m_id=@id)";
            var    SubscribeUserId = PublicConn.QuerySingle <Guid?>(strSQL, ref dyParams);

            dyParams = new DynamicParameters();
            dyParams.Add("@userid", SubscribeUserId);
            strSQL         = "select * from UserBasicInfo with(nolock) where Id=@userid";
            borrowUserInfo = PublicConn.QuerySingle <UserBasicInfoInfo>(strSQL, ref dyParams);

            //申购笔数
            strSQL   = @"select COUNT(0)
						from dbo.Subscribe S with(nolock) 
						inner join UserBasicInfo C  with(nolock)  on S.SubscribeUserId=C.Id 
						inner join t_SubScribeTransfer as D  with(nolock) 
						on D.m_id=S.TranId
						where s.tranid=@ProjectId"                        ;
            dyParams = new DynamicParameters();
            dyParams.Add("@ProjectId", projectId);
            SubscribeUserCount = PublicConn.QuerySingle <int>(strSQL, ref dyParams);

            return(true);
        }
Ejemplo n.º 5
0
        private void GetContractInfo(string key)
        {
            string contactno = this.key;
            string strSQL    = @"SELECT a.ProductName, a.PlanAmount,a.ProjectTypes,a.Deadline,b.RepeatInvestType,
                             b.YearRate, b.MinYearRate, a.StartDate,a.UnitAmount, b.Amount as JoinAmount, b.OrderQty,
                             b.UserId, b.OrderDate, c.TypeWord, a.ProductTypeId,a.ExitLockMonth
                             FROM dbo.We_Product a WITH(NOLOCK)
                             left JOIN dbo.We_Order b WITH(NOLOCK) on b.ProductId=a.Id
                             inner join We_ProductType c  WITH(NOLOCK) on c.Id=a.ProductTypeId
                             WHERE b.Id=@WeOrderId";
            var    dyParams  = new Dapper.DynamicParameters();

            dyParams.Add("@WeOrderId", contactno);
            model = TuanDai.DB.TuanDaiDB.QueryFirstOrDefault <MyWeOrderInfo>(TdConfig.ApplicationName, TdConfig.DBRead, strSQL, ref dyParams);
            if (model == null)
            {
                model = new MyWeOrderInfo();
            }

            this.subBasicModel = userbll.GetUserBasicInfoModelById(model.UserId);

            WeFTBBLL ftbll = new WeFTBBLL();

            ftbRateList = this.GetWeFTBRateList(model.ProductTypeId, model.StartDate ?? DateTime.Today);
            if (ftbRateList == null)
            {
                ftbRateList = new List <WeProductFTBRateInfo>();
            }
        }
Ejemplo n.º 6
0
        /// <summary>
        /// 获取统计数据
        /// </summary>
        private void GetStatistics()
        {
            WebSiteDataInfo websitedatemodel = new WebSiteDataBLL().GetWebSiteData();

            if (websitedatemodel != null)
            {
                this.UserCount = websitedatemodel.TotalUser.ToString();
                this.UserName  = Tool.CookieHelper.GetCookie("TDWUserName");
                TuanDai.PortalSystem.BLL.UserBLL userBll = new TuanDai.PortalSystem.BLL.UserBLL();
                userBasicObj = userBll.GetUserBasicInfoModelById(WebUserAuth.UserId.Value);
                if (this.UserName.IsEmpty())
                {
                    if (userBasicObj != null)
                    {
                        this.UserName = userBasicObj.UserName;
                    }
                }
                this.returnUrl = Tool.WEBRequest.GetString("ReturnUrl");
                if (!string.IsNullOrEmpty(returnUrl) && returnUrl.ToLower().Contains(TuanDai.WXApiWeb.GlobalUtils.ActivityWebsiteUrl.ToLower()))//跳转回ReturnUrl
                {
                    try
                    {
                        Response.Redirect(returnUrl, false);
                    }
                    catch (Exception ex)
                    {
                        SysLogHelper.WriteErrorLog("注册成功页面跳转异常", Tool.ExceptionHelper.GetExceptionMessage(ex));
                    }
                    finally {
                        Response.End();
                    }
                }
            }
        }
Ejemplo n.º 7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            IsOpenCgt = ConfigHelper.getConfigString("IsOpenCGT") == "1";
            Guid userId = WebUserAuth.UserId.Value;

            if (userId == Guid.Empty)
            {
                Response.Redirect("/Member/my_userdetailinfo.aspx");
            }
            if (!this.IsPostBack)
            {
                UserBLL bll = new UserBLL();
                userModel = bll.GetUserBasicInfoModelById(userId);
                if (userModel != null)
                {
                    if (!string.IsNullOrEmpty(userModel.HeadImage))
                    {
                        headImage = userModel.HeadImage;
                    }
                    //登录时判断超级会员是否过期
                    userModel.Level = BusinessDll.Users.JudgeUserLevel(userModel.Level.Value, userModel.LevelEndDate);
                }
                accountModel = bll.GetWXFundAccountInfo(userId);
            }
        }
Ejemplo n.º 8
0
        private void GetContractInfo(string key)
        {
            string contactno = key;

            this.submodel = new SubscribeBLL().GetSubscribeInfoContractNo(contactno);
            if (submodel.AddDate < Convert.ToDateTime("2016-3-11"))
            {
                companyName = "广东俊特团贷网络信息服务股份有限公司";
            }
            else
            {
                companyName = "东莞团贷网互联网科技服务有限公司";
            }


            this.subBasicModel  = userbll.GetUserBasicInfoModelById(submodel.SubscribeUserId.Value); //投资人信息
            this.proModel       = projectbll.GetProjectDetailInfo(submodel.ProjectId.Value);
            this.publisherModel = userbll.GetUserBasicInfoModelById(proModel.UserId.Value);          //借款人信息

            //印章小图片
            //this.AssureModel.image = new Common.Contract().GetSmallImage(this.AssureModel.image);

            RepaymentTypeDesc = new Common.Contract().GetRepaymentTypeDesc(proModel.RepaymentType ?? 0);

            if (WebUserAuth.UserId == publisherModel.Id)
            {
                this.subBasicModel.RealName     = StringHandler.MaskStartPre(subBasicModel.RealName, 1); //出借人
                this.subBasicModel.IdentityCard = StringHandler.MaskCardNo(subBasicModel.IdentityCard);  //出借人身份证号
            }
            else
            {
                this.publisherModel.RealName     = StringHandler.MaskStartPre(publisherModel.RealName, 1); //借款 人
                this.publisherModel.IdentityCard = StringHandler.MaskCardNo(publisherModel.IdentityCard);  //借款人身份证号
            }
        }
Ejemplo n.º 9
0
        private void GetContractInfo()
        {
            string strSQL   = @"SELECT a.Id as ProductId,a.ProductName, a.PlanAmount,a.ProjectTypes,a.Deadline,b.RepeatInvestType,
                             b.YearRate, b.MinYearRate, a.StartDate,a.UnitAmount, b.Amount as JoinAmount, b.OrderQty,
                             b.UserId, b.OrderDate
                             FROM dbo.We_Product a WITH(NOLOCK)
                             left JOIN dbo.We_Order b WITH(NOLOCK) on b.ProductId=a.Id
                             WHERE b.Id=@WeOrderId";
            var    dyParams = new Dapper.DynamicParameters();

            dyParams.Add("@WeOrderId", Key);
            List <MyWeOrderInfo> list = new List <MyWeOrderInfo>();

            list    = PublicConn.QueryBySql <MyWeOrderInfo>(strSQL, ref dyParams);
            WeOrder = list.Count > 0 ? list[0] : new MyWeOrderInfo();
            if (WeOrder.OrderDate >= DateTime.Parse("2016-03-11"))
            {
                companyName   = "东莞团贷网互联网科技服务有限公司";
                Sealt_TuanDai = "images/tuandai_ss.png";
            }

            this.subBasicModel = userbll.GetUserBasicInfoModelById(WeOrder.UserId);//投资人信息
            switch (GetTypeWord(WeOrder.ProductId).ToLower())
            {
            case "b":
            case "c":
                RepaymentTypeDesc = "每月付息";
                break;

            case "a":
                RepaymentTypeDesc = "每月付息或到期本息";
                break;
            }
        }
Ejemplo n.º 10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //判断openid为空时,重新授权
                if (GlobalUtils.IsWeiXinBrowser)
                {
                    Guid?userId = WebUserAuth.UserId;
                    if (userId == null || userId == Guid.Empty)
                    {
                        PrintJson("-1", "对不起,您还未登录!");
                        return;
                    }

                    TuanDai.PortalSystem.BLL.UserBLL bll = new TuanDai.PortalSystem.BLL.UserBLL();
                    userModel = bll.GetUserBasicInfoModelById(userId.Value);

                    if (GlobalUtils.OpenId.IsEmpty())
                    {
                        string strOpenId = TuanDai.WXApiWeb.Common.WeiXinApi.GetUserWXOpenId(userModel.Id);
                        if (strOpenId.IsNotEmpty())
                        {
                            GlobalUtils.WriteOpenIdToCookie(strOpenId.ToText());
                        }
                        else
                        {
                            TuanDai.WXApiWeb.Common.WeiXinApi wxApi = new Common.WeiXinApi();
                            wxApi.GetOpenidAndAccessToken(this);
                        }
                    }
                }

                GetWXJsApiParam();
            }
        }
Ejemplo n.º 11
0
        private void GetData()
        {
            UserBasicInfoInfo user = null;

            if (WebUserAuth.IsAuthenticated)
            {
                user = new UserBLL().GetUserBasicInfoModelById(WebUserAuth.UserId.Value);
            }
            else
            {
                user = new UserBLL().GetUserBasicInfoByExtendKey(extendKey);
            }
            if (user == null)
            {
                TotalEranMoney = 0;
            }
            else
            {
                TotalEranMoney = GetExtendEarn(user.Id) ?? 0;
            }


            #region .net数据库版
            //var dyParams = new Dapper.DynamicParameters();
            //dyParams.Add("@UserId", user.Id);
            //string querySql = @"   SELECT  SUM([EarnMoney]) [EarnMoney] FROM dbo.ExtendEarnRecord   with(nolock)
            //                 where UserID= @UserId ";
            //decimal? eranMoney = TuanDai.DB.TuanDaiDB.Query<decimal?>(TdConfig.ApplicationName, TdConfig.DBReportWrite, querySql, ref dyParams).FirstOrDefault();
            //TotalEranMoney = Math.Floor((eranMoney ?? 0) * 100) / 100;
            #endregion
        }
Ejemplo n.º 12
0
        protected void InitFormData()
        {
            var userid = WebUserAuth.UserId.Value;

            if (userid != null && userid != Guid.Empty)
            {
                model = new UserBLL().GetUserBasicInfoModelById(userid);
            }
            else
            {
                Response.Redirect("/user/Login.aspx?ReturnUrl=/member/cgt/opencgt.aspx");
            }
            if (model == null)
            {
                model = new UserBasicInfoInfo();
                model.IsValidateIdentity = false;
            }

            GetCgtAccountStageResponse response = new CgtTool().CgtAccountStage(userid.ToString());

            if (response != null && response.status != 10100)
            {
                Response.Redirect("/Member/my_account.aspx");
            }
        }
Ejemplo n.º 13
0
        protected void LoadData()
        {
            Guid userId = WebUserAuth.UserId.Value;

            TuanDai.PortalSystem.BLL.UserBLL bll = new TuanDai.PortalSystem.BLL.UserBLL();
            userModel = bll.GetUserBasicInfoModelById(userId);
            if (userModel == null)
            {
                Response.Redirect("/Member/my_account.aspx");
                return;
            }

            GetProfitStatistics(userId);
            GetAccountInfo(userId);
            GetPayStatistics(userId);

            JoinTDDay = Tool.DateHelper.GetDateDiffDay(DateTime.Parse(userModel.AddDate.Value.ToString("yyyy-MM-dd")), DateTime.Today.AddDays(1));
            if (JoinTDDay <= 0)
            {
                JoinTDDay = 1;
            }

            totalPayAmount = paymodel.RepayedInterest + (fundAccountInfo.TotalPayOutMember ?? 0) + (fundAccountInfo.TotalWithdrawDepositHandRecharge ?? 0)
                             + (fundAccountInfo.TotalPayOutAvalidate ?? 0) + (fundAccountInfo.TotalInvestCommission ?? 0) + (fundAccountInfo.BorrowCommission ?? 0);
            //计算累计收入 待收不算累计  =逾期收益+已收利息+活动奖励+红包收益
            if (profitmodel != null)
            {
                totalInAmount = profitmodel.overDueAmount + profitmodel.recAmount + (fundAccountInfo.RewardMoney ?? 0) + profitmodel.prizeAmount + profitmodel.extenderMoney;
            }

            GetTotalWithDrawal();
        }
Ejemplo n.º 14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            userId = WebUserAuth.UserId.Value;
            UserBLL bll = new UserBLL();

            if (!this.IsPostBack)
            {
                userModel = bll.GetUserBasicInfoModelById(userId);
                if (userModel != null)
                {
                    BankAccountNo = userModel.BankAccountNo;
                }
                UserSettingInfo UserSetting = new UserSettingBLL().GetUserSettingInfo(userId);

                if (UserSetting != null)
                {
                    IsTenderNeedPayPassword = UserSetting.IsTenderNeedPayPassword;
                }
                if (string.IsNullOrEmpty(BankAccountNo))
                {
                    //string sql = @"SELECT BankNo FROM UserBankInfo WITH(NOLOCK) WHERE UserId = @UserId ";
                    //var para = new Dapper.DynamicParameters();
                    //para.Add("@UserId", userId);
                    //BankAccountNo = PublicConn.QuerySingle<string>(sql, ref para);
                    var bankInfo = GlobalUtils.GetBankInfo(userId);
                    BankAccountNo = bankInfo.BankNo;
                }
            }
        }
Ejemplo n.º 15
0
 protected void Page_Load(object sender, EventArgs e)
 {
     UserId = WebUserAuth.UserId.Value;
     if (!this.IsPostBack)
     {
         userModel = new UserBLL().GetUserBasicInfoModelById(UserId);
     }
 }
Ejemplo n.º 16
0
        //获取借款人信息
        protected void GetBorrowUserInfo()
        {
            string sqlbow = "select RealName,TelNo,Address as BankCity from dbo.project_NSD with(nolock) where ProjectId=@ProjectId";

            Dapper.DynamicParameters parm = new Dapper.DynamicParameters();
            parm.Add("@ProjectId", model.Id);

            this.borrowerUserInfo = TuanDaiDB.QueryFirstOrDefault <UserBasicInfoInfo>(TdConfig.ApplicationName, TdConfig.DBRead, sqlbow, ref parm);
        }
Ejemplo n.º 17
0
        protected bool GetData()
        {
            UserBLL userbll = new UserBLL();

            //获取项目信息
            model = bll.GetProjectDetailInfo(projectId.Value);
            if (model == null || !(model.Type == 48))
            {
                Response.Redirect(GlobalUtils.WebURL + "/Member/my_account.aspx");
                return(false);
            }

            var dyParams = new DynamicParameters();

            dyParams.Add("@userid", model.UserId);
            string strSQL = "select * from UserBasicInfo with(nolock) where Id=@userid";

            borrowUserInfo = PublicConn.QuerySingle <UserBasicInfoInfo>(strSQL, ref dyParams);

            dyParams = new DynamicParameters();
            dyParams.Add("@ProjectId", model.Id);
            strSQL = string.Empty;
            strSQL = @"select top 1 ext from Project_Common with(nolock) where ProjectId=@ProjectId";
            string ext = PublicConn.QuerySingle <string>(strSQL, ref dyParams);

            if (!string.IsNullOrEmpty(ext))
            {
                UserInfoExt = JsonConvert.DeserializeObject <ProjectUserInfoExt>(ext);
            }
            if (UserInfoExt == null)
            {
                UserInfoExt = new ProjectUserInfoExt();
            }

            dyParams = new DynamicParameters();
            dyParams.Add("@ProjectId", model.Id);
            strSQL  = string.Empty;
            strSQL  = @"select * from BorrowerComplianceInfo with(nolock) where ProjectId=@ProjectId";
            comInfo = PublicConn.QuerySingle <BorrowerComplianceInfo>(strSQL, ref dyParams);

            if (comInfo == null)
            {
                comInfo = new BorrowerComplianceInfo();
            }

            //信用档案
            creditInfo    = CommUtils.GetBorrowerCreditData(model.UserId.Value);
            finishProcess = CommUtils.GetProjectProcess(model);

            SubscribeUserCount = CommUtils.GetSubscribeUserCount(this.projectId.Value);
            //计算预期收益
            PreInterestRate  = CommUtils.CalcInvestInterest(model, 10000);
            EbaoMultiple     = int.Parse(Math.Ceiling(model.InterestRate.Value / decimal.Parse("2.5")).ToString());
            EbaoInterest     = CommUtils.GetEbaoMultipleInterest(model, 10000);
            preSubscribeList = CommUtils.GetPreSubscribeDetail(model, 10000);
            return(true);
        }
Ejemplo n.º 18
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.returnUrl = WEBRequest.GetQueryString("ReturnUrl");
            LoginType      = CookieHelper.GetCookie("WXLoginType");
            code           = WEBRequest.GetQueryString("code");
            //微信登录时从cookie中没法取到
            if (LoginType.ToText().IsEmpty())
            {
                LoginType = WEBRequest.GetQueryString("state");
                CookieHelper.WriteCookie("WXLoginType", LoginType);
            }

            if (returnUrl.ToText().IsEmpty())
            {
                returnUrl = "/Member/my_account.aspx";
            }
            if (code.ToText() == "")
            {
                //授权失败时返回到登录框
                Response.Redirect("/user/Login.aspx?ReturnUrl=" + returnUrl);
                return;
            }

            //判断当前第三方帐号是否有绑定过,若有绑定过直接登录。
            ThirdLoginSDK shareSdk = new ThirdLoginSDK();

            shareSdk.InitSDK(ThirdLoginSDK.GetLoginType(LoginType.ToString()));
            //根据code获取第三方用户信息
            ThirdLoginSDK.ThirdUserInfo mUserInfo = shareSdk.GetUserSampleInfo(code);

            if (LoginType.ToInt(0) == (int)ThirdLoginSDK.ThirdLoginType.QQ)
            {
                CookieHelper.WriteCookie("OpenId", Tool.Cryptography.TripleDESEncrypt(mUserInfo.UId));
            }
            else if (LoginType.ToInt(0) == (int)ThirdLoginSDK.ThirdLoginType.Sina)
            {
                CookieHelper.WriteCookie("weiboUserId", mUserInfo.UId);
            }
            else if (LoginType.ToInt(0) == (int)ThirdLoginSDK.ThirdLoginType.WeiXin)
            {
                CookieHelper.WriteCookie("weixinUserId", mUserInfo.UId);
            }
            CookieHelper.WriteCookie("ThirdLoginUserInfo", JsonHelper.ToJson(mUserInfo));

            UserBLL userbll = new UserBLL();

            SqlParameter[]    paramData = new SqlParameter[] { new SqlParameter("@ThirdPartyId", mUserInfo.UId) };
            UserBasicInfoInfo model     = userbll.WXGetUserBasicInfo("ThirdPartyId=@ThirdPartyId", paramData);

            if (model != null)
            {
                //先前已绑定过,就直接登录
                WXRegister.UserLogin(model);
                Response.Redirect(this.returnUrl);
                return;
            }
        }
Ejemplo n.º 19
0
        //获取借款人信息
        protected void GetBorrowUserInfo()
        {
            UserBLL userbll = new UserBLL();

            this.borrowerUserInfo = userbll.GetUserBasicInfoModelById(model.UserId.Value);

            //借款次数统计
            allMonthBadrate = calcrate(model.TotalSumShares ?? 0, model.badShares ?? 0);
        }
Ejemplo n.º 20
0
        //获取中止转让验证码
        public void GetStopTranCode()
        {
            Guid              userid  = WebUserAuth.UserId.Value;
            UserBLL           userbll = new UserBLL();
            UserBasicInfoInfo model   = userbll.GetUserBasicInfoModelById(userid);

            if (model == null)
            {
                PrintJson("-1", "用户不存在");
            }

            //string random = StringUtilily.GetRandomString(6);
            string telNo = model.TelNo;
            string strIP = Tool.WebFormHandler.GetIP();

            //TuanDB.CodeRecord codeRecord = new TuanDB.CodeRecord();
            //codeRecord.Id = Guid.NewGuid();
            //codeRecord.UserId = userid;
            //codeRecord.Code = random;
            //codeRecord.AddDate = DateTime.Now;
            //codeRecord.Status = 0;
            //codeRecord.Type = 2;
            //codeRecord.Type2 = 20;
            //codeRecord.token = token;
            //codeRecord.TypeValue = telNo;
            //db.CodeRecord.AddObject(codeRecord);
            //if (db.SaveChanges() > 0)
            var canSend = new CodeRecordBLL().IsCanSendNewCodeRecord(telNo, MsCodeType.PhoneCode, MsCodeType2.PCStopTransferCode, null, 1, strIP);

            if (!canSend.Success)
            {
                PrintJson("-1", canSend.Message);
            }
            var code = new CodeRecordBLL().CreateCodeRecordInfo(userid, "", MsCodeType.PhoneCode, MsCodeType2.PCStopTransferCode, telNo);

            if (code != null)
            {
                var parameters = new Dictionary <string, object>();
                parameters.Add("ValidateCode", code.Code);
                var msgSender  = new BusinessDll.MessageSend();
                var sendResult = msgSender.SendMessage2(option: SendOption.Sms,
                                                        eventCode: MessageTemplates.ValidateCode, parameters: parameters, mobile: telNo, content: code.Code);
                if (sendResult != "1")
                {
                    PrintJson("-1", "短信发送失败");
                }
                else
                {
                    PrintJson("1", "");
                }
            }
            else
            {
                PrintJson("-1", "短信发送失败");
            }
        }
Ejemplo n.º 21
0
        private void GetContractInfo(string key)
        {
            string contactno = key;

            this.submodel = new SubscribeBLL().GetSubscribeInfoContractNo(contactno);
            if (submodel.AddDate < Convert.ToDateTime("2016-3-11"))
            {
                companyName = "广东俊特团贷网络信息服务股份有限公司";
            }
            else
            {
                companyName = "东莞团贷网互联网科技服务有限公司";
            }


            this.subBasicModel  = userbll.GetUserBasicInfoModelById(submodel.SubscribeUserId.Value); //投资人信息
            this.proModel       = projectbll.GetProjectDetailInfo(submodel.ProjectId.Value);
            this.publisherModel = userbll.GetUserBasicInfoModelById(proModel.UserId.Value);          //借款人信息



            UserEnterpriseInfo userEnterprise = new Common.Contract().GetBorrowerGuaranteeEnterprise(proModel.UserId.Value, proModel.AddDate.Value, proModel.Type ?? 0);

            if (userEnterprise != null)
            {
                AssureModel = new Common.Contract().GetAssureOrganizationByUserId(userEnterprise.UserId);
            }
            else
            {
                int gid = 0;
                int.TryParse(proModel.Guarantors, out gid);
                AssureModel = new Common.Contract().GetAssureOrganizationById(gid);
                if (gid == 1 && DateTime.Now < DateTime.Parse("2013-11-27"))
                {
                    AssureModel.FullName = "东莞市俊特团贷网络信息服务有限公司";
                }
            }

            //印章小图片
            this.AssureModel.image = new Common.Contract().GetSmallImage(this.AssureModel.image);

            RepaymentTypeDesc = new Common.Contract().GetRepaymentTypeDesc(proModel.RepaymentType ?? 0);

            if (WebUserAuth.UserId == publisherModel.Id)
            {
                this.subBasicModel.RealName     = StringHandler.MaskStartPre(subBasicModel.RealName, 1); //出借人
                this.subBasicModel.IdentityCard = StringHandler.MaskCardNo(subBasicModel.IdentityCard);  //出借人身份证号
            }
            else
            {
                this.publisherModel.RealName     = StringHandler.MaskStartPre(publisherModel.RealName, 1); //借款 人
                this.publisherModel.IdentityCard = StringHandler.MaskCardNo(publisherModel.IdentityCard);  //借款人身份证号
            }
        }
Ejemplo n.º 22
0
        /// <summary>
        /// 根据用户实体类得到用户验证状态
        /// </summary>
        /// <param name="model"></param>
        /// <returns>返回用户状态 小于4:未通过实名认证 4:已通过实名认证 11:未修改昵称 12:未修改交易密码</returns>
        private int getVailStatusByUserModel(UserBasicInfoInfo userModel)
        {
            int vailStatus = 0;

            if (userModel != null)
            {
                //未绑定银行卡
                //if (string.IsNullOrEmpty(userModel.BankAccountNo))
                //{
                //    vailStatus = 5;
                //}
                //else if (string.IsNullOrEmpty(userModel.OpenBankName) || string.IsNullOrEmpty(userModel.BankProvice) || string.IsNullOrEmpty(userModel.BankCity))
                //{
                //    vailStatus = 6;
                //}
                //else
                WXResponsePublicInfo <WXResponseSelectBankInfoChild> bankInfo =
                    new BankFromJavaService().GetBankInfo(userModel.Id, ServiceType.TuoMin);
                if (bankInfo == null || (bankInfo != null && string.IsNullOrEmpty(bankInfo.respData.bankNo)))
                {
                    vailStatus = 5;
                }
                if ((!userModel.IsValidateIdentity || !userModel.IsValidateMobile))
                {
                    vailStatus = 0;
                }
                else if (!userModel.IsValidateIdentity)
                { //没有身份认证
                    vailStatus = 1;
                }
                else if (!userModel.IsValidateMobile)
                {//没有手机认证
                    vailStatus = 3;
                }
                else
                { //验证通过
                    vailStatus = 4;
                }
                if (GlobalUtils.IsOpenCGT)
                {
                    var cgtmode = new QueryClient().GetUserByPlatformUserNo(userModel.Id);
                    if (cgtmode == null)
                    {
                        vailStatus = -2;//未开通存管
                    }
                    else if (cgtmode.accountStage == 3 && !cgtmode.isAllowRechare)
                    {
                        //三要素用户提示去修改预留手机号
                        vailStatus = -1;
                    }
                }
            }
            return(vailStatus);
        }
Ejemplo n.º 23
0
        //中止债权转让
        public void StopTransfer()
        {
            Guid userId     = WebUserAuth.UserId.Value;
            Guid transferId = Guid.Empty;

            Guid.TryParse(Context.Request["transferid"], out transferId);
            string            code      = Context.Request["code"];
            UserBLL           bll       = new UserBLL();
            UserBasicInfoInfo userModel = bll.GetUserBasicInfoModelById(userId);

            if (userModel != null && !string.IsNullOrEmpty(userModel.TelNo))
            {
                int msgCode = new TuanDai.PortalSystem.BLL.CodeRecordBLL().CheckCodeRecord(code, userModel.TelNo, MsCodeType.PhoneCode, MsCodeType2.PCStopTransferCode, userId, true);
                /*1:验证通过;0:参数错误;-1:验证码不存在;-2:验证码已过期;-3:验证码已使用;-4:验证已过期*/
                string msg = string.Empty;
                switch (msgCode)
                {
                case 0:
                    msg = "参数错误";
                    break;

                case -1:
                    msg = "验证码不存在";
                    break;

                case -2:
                    msg = "验证码已过期";
                    break;

                case -3:
                    msg = "验证码已使用";
                    break;

                case -4:
                    msg = "验证已过期";
                    break;

                default:
                    break;
                }
                if (msgCode != 1)
                {
                    PrintJson(msgCode.ToString(), msg);
                    return;
                }
                int result = new TuanDai.PortalSystem.BLL.SubScriberansferBLL().StopTransfer(userId, transferId);
                if (result != 1)
                {
                    PrintJson(result.ToString(), "终止转让失败");
                    return;
                }
                PrintJson(result.ToString(), "终止转让成功");
            }
        }
Ejemplo n.º 24
0
        private void GetContractInfo(string key)
        {
            string contactno = key;

            this.submodel = new SubscribeBLL().GetSubscribeInfoContractNo(contactno);

            if (submodel.AddDate < Convert.ToDateTime("2016-3-11"))
            {
                companyName = "广东俊特团贷网络信息服务股份有限公司";
            }
            else
            {
                companyName = "东莞团贷网互联网科技服务有限公司";
            }
            if (submodel.AddDate.Value <= DateTime.Parse("2015-07-31"))
            {
                Response.Redirect(string.Format("/Contract/ContractJzdb.aspx?key={0}&type=mobileapp", key));
                return;
            }
            Dapper.DynamicParameters param = new Dapper.DynamicParameters();
            param = new Dapper.DynamicParameters();
            param.Add("@ProjectId", submodel.ProjectId);
            param.Add("@curUserId", WebUserAuth.UserId);
            string strSQL  = "select Count(1) from project(nolock) where Id=@ProjectId and UserId=@curUserId";
            bool   isExist = PublicConn.QuerySingle <int>(strSQL, ref param) > 0;

            if (this.submodel.SubscribeUserId != WebUserAuth.UserId && !isExist)
            {
                HttpContext.Current.Response.Write("对不起,您没有权限查看此合同。");
                HttpContext.Current.Response.End();
                return;
            }
            this.subBasicModel     = userbll.GetUserBasicInfoModelById(submodel.SubscribeUserId.Value); //投资人信息
            this.proModel          = projectbll.GetProjectDetailInfo(submodel.ProjectId.Value);
            this.publisherModel    = userbll.GetUserBasicInfoModelById(proModel.UserId.Value);          //借款人信息
            this.SharesPercent     = (publisherModel.NumberOfShares * 10000m / 100000000m * 100m).ToString("0.00");
            this.PrincipalInterest = submodel.Amount.Value + submodel.InterestAmount.Value;
            AssureModel            = new Common.Contract().GetAssureOrganizationByProjectId(proModel.Id);
            //印章小图片
            this.AssureModel.image = new Common.Contract().GetSmallImage(this.AssureModel.image);
            RepaymentTypeDesc      = new Common.Contract().GetRepaymentTypeDesc(proModel.RepaymentType ?? 0);
            if (WebUserAuth.UserId == publisherModel.Id)
            {
                this.subBasicModel.RealName     = StringHandler.MaskStartPre(subBasicModel.RealName, 1); //出借人
                this.subBasicModel.IdentityCard = StringHandler.MaskCardNo(subBasicModel.IdentityCard);  //出借人身份证号
            }
            else
            {
                this.publisherModel.RealName     = StringHandler.MaskStartPre(publisherModel.RealName, 1); //借款 人
                this.publisherModel.IdentityCard = StringHandler.MaskCardNo(publisherModel.IdentityCard);  //借款人身份证号
            }
        }
Ejemplo n.º 25
0
        /// <summary>
        /// 根据用户实体类得到用户验证状态
        /// </summary>
        /// <param name="model"></param>
        /// <returns>返回用户状态 小于4:未通过实名认证 4:已通过实名认证 11:未修改昵称 12:未修改交易密码</returns>
        public int getVailStatusByUserModel(UserBasicInfoInfo model)
        {
            int vailStatus = 0;

            if (model != null)
            {
                if (string.IsNullOrEmpty(model.PayPwd) || model.PayPwd.ToLower() == model.Pwd.ToLower())//如果没有修改交易密码
                {
                    vailStatus = 12;
                }
            }
            return(vailStatus);
        }
Ejemplo n.º 26
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (WebUserAuth.IsAuthenticated)
            {
                Guid              userId    = WebUserAuth.UserId.Value;
                UserBLL           bll       = new UserBLL();
                UserBasicInfoInfo info      = bll.GetUserBasicInfoModelById(userId);
                string            ExtendKey = info.ExtendKey;

                //获取注册链接地址.
                this.inviteUrl = string.Format("{0}/user/Register.aspx?extendkey={1}", GlobalUtils.WebURL, ExtendKey);
            }
        }
Ejemplo n.º 27
0
        protected bool GetData()
        {
            UserBLL userbll = new UserBLL();

            //获取项目信息
            model = bll.GetProjectDetailInfo(projectId.Value);
            if (model == null || (model.Type != 28))
            {
                Response.Redirect(GlobalUtils.WebURL + "/Member/my_account.aspx");
                return(false);
            }

            string strSQL = @"select b.OrgId,b.ShortName, ProjectDesc,OrgDecription,ProjectDescription,ProjectRiskDesc from dbo.fq_ItemSetsProject  a with(nolock)
                            INNER JOIN dbo.fq_Organization b ON a.OrgId=b.OrgId
                            WHERE   projectid = @projectid OR CHARINDEX(@projectid,OldProjectID)>0";

            DynamicParameters dyParams = new DynamicParameters();

            dyParams.Add("@projectid", model.Id.ToString());
            organization = PublicConn.QuerySingle <Organizations>(strSQL, ref dyParams);
            if (organization == null)
            {
                organization           = new Organizations();
                organization.ShortName = "快来贷";
            }

            dyParams = new DynamicParameters();
            dyParams.Add("@userid", model.UserId);
            strSQL         = "select * from UserBasicInfo with(nolock) where Id=@userid";
            borrowUserInfo = PublicConn.QuerySingle <UserBasicInfoInfo>(strSQL, ref dyParams);


            fq_ItemSetsProjectInfo = new fq_ItemSetsProjectBLL().GetFqItemSetsProjectInfoByPorjectId(model.Id);
            if (fq_ItemSetsProjectInfo == null)
            {
                fq_ItemSetsProjectInfo = new Fq_ItemSetsProjectInfo();
            }

            //信用档案
            creditInfo    = CommUtils.GetBorrowerCreditData(model.UserId.Value);
            finishProcess = CommUtils.GetProjectProcess(model);

            SubscribeUserCount = CommUtils.GetSubscribeUserCount(this.projectId.Value);
            //计算预期收益
            PreInterestRate  = CommUtils.CalcInvestInterest(model, 10000);
            EbaoMultiple     = int.Parse(Math.Ceiling(model.InterestRate.Value / decimal.Parse("2.5")).ToString());
            EbaoInterest     = CommUtils.GetEbaoMultipleInterest(model, 10000);
            preSubscribeList = CommUtils.GetPreSubscribeDetail(model, 10000);
            return(true);
        }
Ejemplo n.º 28
0
 private static void AsyncAfterRegisterAction(string dec, UserBasicInfoInfo model)
 {
     //所有第三方回调接口,如果有第三方需要回调,可以在API项目中增加
     //ThirdPartyUserLoginRequest req = new ThirdPartyUserLoginRequest {
     //    LoginType = "0",
     //    TelNo = model.TelNo,
     //    Tid = "",
     //    LoginFrom = dec,
     //    UserId = model.Id,
     //    UserName = model.UserName
     //};
     //var url = ConfigurationManager.AppSettings["OtherApiWebUrl"] + "/ThirdPartyCommon/PostUserRegisterCallBack";
     //HttpUtils.HttpPostJson(url, JsonConvert.SerializeObject(req));
 }
Ejemplo n.º 29
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Guid              userId      = WebUserAuth.UserId.Value;
         UserBLL           bll         = new UserBLL();
         UserSettingInfo   UserSetting = new UserSettingBLL().GetUserSettingInfo(userId);
         UserBasicInfoInfo basicinfo   = bll.GetUserBasicInfoModelById(userId);
         vailStatus = getVailStatusByUserModel(basicinfo);
         if (UserSetting != null)
         {
             IsTenderNeedPayPassword = UserSetting.IsTenderNeedPayPassword;
         }
     }
 }
Ejemplo n.º 30
0
 protected void GetBankCardNo(UserBasicInfoInfo userInfo, Guid userid)
 {
     if (string.IsNullOrEmpty(userInfo.BankAccountNo))
     {
         UserBankInfo      ubi  = new UserBankInfo();
         string            sql  = @"SELECT BankAccountNo AS BankNo,BankType FROM UserBasicInfo WITH(NOLOCK) WHERE Id = @UserId ";
         DynamicParameters para = new DynamicParameters();
         para.Add("@UserId", userid);
         ubi = PublicConn.QuerySingle <UserBankInfo>(sql, ref para);
         if (ubi != null)
         {
             userInfo.BankAccountNo = ubi.BankNo;
             userInfo.BankType      = ubi.BankType;
         }
     }
 }