//获取投资项目列表 protected void GetProjectList(ProjectBLL bll) { ProjectListRequest projectRequest = new ProjectListRequest(); projectRequest.RequestSource = 2; projectRequest.ProjectType = 0; projectRequest.PageSize = GlobalUtils.PageSize; projectRequest.PageIndex = 1; projectRequest.OrderByDeadline = 0; projectRequest.OrderByYearRate = 0; projectList = bll.WXGetProjectShowList(projectRequest, out RecordCount); double divide = RecordCount / GlobalUtils.PageSize; double floor = System.Math.Floor(divide); if (RecordCount % GlobalUtils.PageSize != 0) { floor++; } pageCount = Convert.ToInt32(floor);//总页数 //新手加息判断 WebSettingInfo GylSetInfo = new WebSettingBLL().GetWebSettingInfo("5AC96A83-B678-4191-BADB-C39C02DFEBB5"); if (GylSetInfo != null) { GylPlusRate = Tool.StrObj.StrToDecimalDef(GylSetInfo.Param3Value, 0); Day15PlusRate = Tool.StrObj.StrToDecimalDef(GylSetInfo.Param4Value, 0); } }
protected FundAccountInfo_Zx ZxFundModelFromDq; //定期库统计智享数据 protected void Page_Load(object sender, EventArgs e) { if (!WebUserAuth.IsAuthenticated) { Response.Redirect("//passport.tuandai.com/2login?ret=" + HttpUtility.UrlEncode(HttpContext.Current.Request.RawUrl)); return; } var xiajia = new WebSettingBLL().GetWebSettingInfo("D3E0C6CC-30A0-4E5B-8A83-446269F8C96F"); if (xiajia == null) { xiajia = new WebSettingInfo(); xiajia.Param1Value = "2018-04-17"; } var userId = WebUserAuth.UserId.Value; var userModel = new UserBLL().GetUserBasicInfoModelById(userId); if ((GetDQDueInMoney(userId) <= 0 && new GlobalUtils().GetNewVipUserInfo(userId).Level < 5) || userModel.AddDate >= DateTime.Parse(xiajia.Param1Value)) { Response.Redirect("/Member/My_account.aspx"); } DqFundModel = GetDQFundModel(userId); if (DqFundModel == null) { DqFundModel = new WXFundStatistModel(); } if (DqFundModel.DueComeInterest >= decimal.Parse("-0.03") && DqFundModel.DueComeInterest < 0) { DqFundModel.DueComeInterest = 0; } GetZxFundModelFromDQ(userId); }
/// <summary> /// We返现标签 /// </summary> /// <param name="model"></param> /// <returns></returns> protected string ShowWePubCach(WeProductDetailInfo model) { string pic = ""; //发标时就设置返现 if ((model.TuandaiCashRate ?? 0) > 0) { WebSettingBLL webSettingBll = new WebSettingBLL(); WebSettingInfo AllWeCachSet = webSettingBll.GetWebSettingInfo("421DBE8C-6435-4A9A-852A-EC51F0B0DDA8"); string cashFormat = AllWeCachSet.Param2Value; if ((model.CashLimitAmount ?? 0) > 0) { cashFormat = AllWeCachSet.Param1Value; } if (cashFormat.ToText() == "") { cashFormat = ((model.CashLimitAmount ?? 0) > 0 ? "起投{Amount}元," : "") + "返现{Rate}%"; } decimal limitAmount = model.CashLimitAmount ?? 0; string strLimitAmount = limitAmount >= 10000 ? ToolStatus.DeleteZero(limitAmount / 10000) + "万" : ToolStatus.DeleteZero(limitAmount / 1000) + "千"; pic += "<div class=\"rect_r f11px c-ffffff text-center\" style=\"width: auto;padding: 0px 10px;\">" + cashFormat.Replace("{Rate}", ToolStatus.DeleteZero(model.TuandaiCashRate)).Replace("{Amount}", strLimitAmount) + "</div>"; } return(pic); }
protected string WeDeadlines = string.Empty; //we计划月份 protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { Guid UserId = WebUserAuth.UserId.Value; var para = new Dapper.DynamicParameters(); para.Add("@UserId", UserId); para.Add("@rank", 0, DbType.Int32, ParameterDirection.Output); TuanDai.DB.TuanDaiDB.Execute(TdConfig.ApplicationName, TdConfig.DBRead, "exec p_GetUserAutoQueue @UserId,@rank out", ref para); rankid = para.Get <int?>("@rank") ?? 0; //List<UserAutoTenderSettingInfo> list = // new UserAutoTenderSettingBLL().GetUserAutoTenderSettingListByUserId(UserId); //autoList = list.ToList(); string sql = @"SELECT * FROM (SELECT * FROM dbo.UserAutoTenderSetting WITH(NOLOCK) WHERE UserId=@UserId UNION SELECT Id,UserId,ProjectType,''AS RepaymentType,0 AS StartRate,0 AS EndRate,0 AS StartDeadLine,0 AS EndDeadLine,StartDate,EndDate,ReservedAmout,0 AS PreAmout,SortOrder,Status,CreateDate,0 AS StartDeadType,0 AS EndDeadType FROM dbo.UserAutoWePlanSetting WITH(NOLOCK) WHERE UserId=@UserId)a ORDER BY a.SortOrder"; var settingList = TuanDai.DB.TuanDaiDB.Query <UserAutoTenderSettingInfo>(TdConfig.ApplicationName, TdConfig.DBRealRead, sql, ref para); autoList = settingList; //获取自动投标设置 WebSettingInfo webSettingInfo = new WebSettingBLL().GetWebSettingInfo("17191362-568A-4F46-8D7D-5C23D80C9D8B"); this.perAmountLimit = !string.IsNullOrEmpty(webSettingInfo.Param2Value) ? webSettingInfo.Param2Value : "100"; this.limitPercent = !string.IsNullOrEmpty(webSettingInfo.Param3Value) ? webSettingInfo.Param3Value : "100"; } }
protected bool IsAct1248 = false; //是否1218后显示 protected void Page_Load(object sender, EventArgs e) { StatusTab = WEBRequest.GetQueryString("tab"); if (StatusTab == "") { StatusTab = "Inprogress"; } TypeTab = WEBRequest.GetQueryString("typeTab"); if (TypeTab == "") { TypeTab = "WePlan"; } OrderTab = WEBRequest.GetQueryString("orderTab"); if (OrderTab == "") { OrderTab = "1"; } WebSettingBLL webSettingBll = new WebSettingBLL(); curSellSet = webSettingBll.GetWebSettingInfo("B11558CB-3C6B-4DAD-9D2F-D6D2DE13CCF7"); if (DateTime.Now >= DateTime.Parse(curSellSet.Param1Value) && DateTime.Now <= DateTime.Parse("2016-12-25 23:59:59")) { IsAct1248 = true; } }
protected void Page_Load(object sender, EventArgs e) { WebSettingInfo webSetting = new WebSettingBLL().GetWebSettingInfo("E27798C9-9301-4176-AC0B-6F3916F389EA"); //string oidPartner = "201408071000001543"; //string md5key = "201408071000001543test_20140812"; //string TraderPriKey = "MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAOilN4tR7HpNYvSBra/DzebemoAiGtGeaxa+qebx/O2YAdUFPI+xTKTX2ETyqSzGfbxXpmSax7tXOdoa3uyaFnhKRGRvLdq1kTSTu7q5s6gTryxVH2m62Py8Pw0sKcuuV0CxtxkrxUzGQN+QSxf+TyNAv5rYi/ayvsDgWdB3cRqbAgMBAAECgYEAj02d/jqTcO6UQspSY484GLsL7luTq4Vqr5L4cyKiSvQ0RLQ6DsUG0g+Gz0muPb9ymf5fp17UIyjioN+ma5WquncHGm6ElIuRv2jYbGOnl9q2cMyNsAZCiSWfR++op+6UZbzpoNDiYzeKbNUz6L1fJjzCt52w/RbkDncJd2mVDRkCQQD/Uz3QnrWfCeWmBbsAZVoM57n01k7hyLWmDMYoKh8vnzKjrWScDkaQ6qGTbPVL3x0EBoxgb/smnT6/A5XyB9bvAkEA6UKhP1KLi/ImaLFUgLvEvmbUrpzY2I1+jgdsoj9Bm4a8K+KROsnNAIvRsKNgJPWd64uuQntUFPKkcyfBV1MXFQJBAJGs3Mf6xYVIEE75VgiTyx0x2VdoLvmDmqBzCVxBLCnvmuToOU8QlhJ4zFdhA1OWqOdzFQSw34rYjMRPN24wKuECQEqpYhVzpWkA9BxUjli6QUo0feT6HUqLV7O8WqBAIQ7X/IkLdzLa/vwqxM6GLLMHzylixz9OXGZsGAkn83GxDdUCQA9+pQOitY0WranUHeZFKWAHZszSjtbe6wDAdiKdXCfig0/rOdxAODCbQrQs7PYy1ed8DuVQlHPwRGtokVGHATU="; //string YTPublicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCSS/DiwdCf/aZsxxcacDnooGph3d2JOj5GXWi+q3gznZauZjkNP8SKl3J2liP0O6rU/Y/29+IUe+GTMhMOFJuZm1htAtKiu5ekW0GlBMWxf4FPkYlQkPE0FtaoMP3gYfh+OwI+fIRrpW3ySn3mScnc6Z700nU/VYrRkfcSCbSnRwIDAQAB"; partnerConfig = new PartnerConfig(webSetting.Param1Value, webSetting.Param2Value, webSetting.Param3Value, webSetting.Param5Value);//new PartnerConfig(oidPartner, md5key, TraderPriKey, YTPublicKey); //partnerConfig.YTPublicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCSS/DiwdCf/aZsxxcacDnooGph3d2JOj5GXWi+q3gznZauZjkNP8SKl3J2liP0O6rU/Y/29+IUe+GTMhMOFJuZm1htAtKiu5ekW0GlBMWxf4FPkYlQkPE0FtaoMP3gYfh+OwI+fIRrpW3ySn3mScnc6Z700nU/VYrRkfcSCbSnRwIDAQAB"; //partnerConfig.TraderPriKey = "MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAMhKNA1Ws0H6PrZ8t1lQxhQjERj0hYf8QWBlF2DtlMajYU52WsiGIvid6iQQhJGc+aPNTf3MfWCWSHk2XRIYRpjoVPQ8Oz8sLF8j3pT3I2h2gDRNvO2xqX+x+jyFDMnAXm4uMyBYS9wabuhUchF5JkHT1A3rZZFYapPqMTj/zeEFAgMBAAECgYB+uPwwCFAIiYVOPqBe4U1CBmHV8TffLwpKLAvbptX/y/VQCHAt+Th9JqSyxsSpwLDuI4KZ9tzI1KzsDCpcvYFEMuoPNgwjZBFBsmTdXD+nxUTKVbTII6kITyzMMWDBnF8LxAicMKpYcRKaVOULCg/AHPGV32Efd4pH8cyJGcJ6TQJBAP+7+YygfcJLvxI9kk/2Se+dI//mX6WVh1V0RFgSl0cWry+xq9xTQofy0wU++TiXkA05aCJbwY0EjyodUOcpHkMCQQDIf3r3WVpW4Fx6t6B2geew4mllckFEHHDf0pXE5GWymccQHHxo6knFrzZ8F/97XwAIGTabNBXQiWd9G1DfEyMXAkEAow/84wpCpe0efEb+UDY+lqagGb+PJUne7UIhgfb4tr9kHQkxCF+egIj4vNOWndsmYwhDugS/uWc60iO3Pm4deQJAC3qA57hN27tsj/oDTcWSJiZQMmagJe4a6DV+LY+F4vu60clPthHzt0WYsPIOxllh/xSyc6A/v3ieXCM8Ngk6cQJBAJiX6nzlyLyHrHQ0jIdQ97bYtJTqh0ZC6bZ3PShCj3we/Cu+5v6L5Rmwx0s+OJ84OnWIopuuc5QwmOT53VRIntE="; //partnerConfig.MD5Key = "201306031000001013"; }
protected int IsRegHasOneMonth = 1; //注册是否满一个月 protected void Page_Load(object sender, EventArgs e) { Response.Redirect("/pages/downloadGuide.aspx", true); if (!this.IsPostBack) { var userId = WebUserAuth.UserId.Value; if (userId != null && userId != Guid.Empty) { GetIsProjectFreePaidUser(userId); GetUserVipMsg(userId); var userBll = new UserBLL(); var user = userBll.GetUserBasicInfoModelById(userId); //2016.5.4号注册的加条件: 注册满1个月才能发资产标,即1个月零1天才能发资产标,一个月以内进入发标页面后弹框提示“您好,注册满一个月后才能发布资产标” if (user.AddDate >= DateTime.Parse("2016-05-04 12:00")) { IsRegHasOneMonth = user.AddDate.Value.AddMonths(1) < DateTime.Now ? 1 : 0; } this.options = new List <Tuple <int, decimal, decimal, int, string> >(); var result1 = WXInvest.CheckNetIssueConditions(userId); if (result1.Success) { var fund = userBll.GetUserFundAccountInfo(userId); var setting = WXInvest.GetJingSetting(); tuandaiFeeRate = user.Level == 1 ? setting.Param1Value.ToDecimal(0) : setting.Param2Value.ToDecimal(0); creditAmount = WXInvest.GetUserJingAvailableAmount(user, fund, setting, out maxDeadline); string text = string.Format("资产标(借款额度{0}元)", ToolStatus.ConvertLowerMoney(creditAmount)); this.options.Add(new Tuple <int, decimal, decimal, int, string>(6, creditAmount, tuandaiFeeRate, maxDeadline, text)); this.deadLineDesc = string.Format("还款期限最高{0}个月", maxDeadline); } //资产标短期标配置 WebSettingBLL setbll = new WebSettingBLL(); WebSettingInfo deadlineDay = setbll.GetWebSettingInfo("78A758ED-6D5C-4991-A804-6601E50960AD"); minDeadlineDay = Tool.SafeConvert.ToInt32(deadlineDay.Param1Value, 15); maxDeadlineDay = Tool.SafeConvert.ToInt32(deadlineDay.Param2Value, 29); endDeadlineDay = deadlineDay.Param3Value.ToDateTime(DateTime.MaxValue); //var result2 = WXInvest.CheckStockIssueConditions(userId); //if (result2.Success) //{ // var setting = WXInvest.GetStockSetting(); // var tuandaiFeeRate = user.Level == 1 ? setting.Param1Value.ToDecimal(0) : setting.Param2Value.ToDecimal(0); // var amount = user.aviCreditGrantingAmount ?? 0; // var text = string.Format("资产标-综合授信(授信额度{0}元)", ToolStatus.ConvertLowerMoney(amount)); // this.options.Add(new Tuple<int, decimal, decimal, int, string>(7, amount, tuandaiFeeRate, 24, text)); // if (!result1.Success) this.deadLineDesc = string.Format("还款期限最高{0}个月", 24); //} } } }
protected void LoadData() { ProjectBLL bll = new ProjectBLL(); var dyParams = new Dapper.DynamicParameters(); dyParams.Add("@SubscribeId", TransferId); dyParams.Add("@projectId", null, DbType.Guid, ParameterDirection.Output, 36); dyParams.Add("@addDate", null, DbType.DateTime, ParameterDirection.Output, 0); dyParams.Add("@refundedMonths", null, DbType.Int32, ParameterDirection.Output, 0); string strSQL = @"select @projectId=ProjectId, @addDate=AddDate,@refundedMonths= RefundedMonths FROM dbo.Subscribe WITH(NOLOCK) where Id=@SubscribeId"; PublicConn.ExecuteTD(PublicConn.DBWriteType.Read, strSQL, ref dyParams); Guid projectId = dyParams.Get <Guid>("@projectId"); //获取项目信息 model = bll.GetProjectDetailInfo(projectId); DateTime investDate = dyParams.Get <DateTime>("@addDate"); int refundedMonths = dyParams.Get <Int32>("@refundedMonths"); string sql = string.Empty; if (model.RepaymentType.Value == 1)//到期还本息 { sql = "SELECT dateDiff(day,@BeginDate,getdate())-1"; } else { sql = "SELECT dateDiff(day,dbo.f_GetRepaymentAdvance_Date(@BeginDate,@Month),getdate())"; } dyParams = new Dapper.DynamicParameters(); dyParams.Add("@BeginDate", investDate); dyParams.Add("@Month", refundedMonths); DiffDay = PublicConn.QuerySingle <int>(sql, ref dyParams); WebSettingBLL websetbll = new WebSettingBLL(); WebSettingEntity = websetbll.GetWebSettingInfo("588B23C6-56EC-40C1-80A6-09B19C6F21E1"); if (WebSettingEntity == null) { WebSettingEntity = new WebSettingInfo(); } zqzrRateSet = websetbll.GetWebSettingInfo("63C10EF7-3961-4CA3-B277-147AAD8E7D42"); if (zqzrRateSet.Param1Value == "1" && DateTime.Parse(zqzrRateSet.Param2Value) < DateTime.Now && DateTime.Now < DateTime.Parse(zqzrRateSet.Param3Value)) { IsOpenRateLimit = true; } }
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); //借款人信息 WebSettingInfo gylSet = new WebSettingBLL().GetWebSettingInfo("75F593E2-40FF-4777-A6F8-4ED54D39FF70"); if (gylSet.Param2Value.IsEmpty()) { gylSet.Param2Value = "2017-02-10"; } if (proModel.AddDate >= DateTime.Parse(gylSet.Param2Value)) { DanBaoCompany = "东莞市志诚非融资性担保有限公司"; DanBaoImage = "http://image.tuandai.com/User/UserUpload/201508/20150825145522_3283.png"; } //印章小图片 //this.AssureModel.image = new Common.Contract().GetSmallImage(this.AssureModel.image); RepaymentTypeDesc = this.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); //借款人身份证号 } }
protected void Page_Load(object sender, EventArgs e) { WebSettingInfo webSetting = new WebSettingBLL().GetWebSettingInfo("fe5e5a30-b12c-4888-9858-12cbe80e1018"); // 商户唯一订单号 string no_order = "" + Request.QueryString["orderno"]; //LogHelper.WriteLog("宝付支付我方订单号", "", no_order); SysLogHelper.WriteTraceLog("宝付支付我方订单号", no_order); AccountRechareInfo rechargemodel = getAccountRechare(no_order); if (null == rechargemodel) { Response.Write("您好,获取充值记录为null!"); return; } string strMd5Key; strMemberID = "100000178"; //webSetting.Param1Value.ToString().Trim();//商户号 strPayID = ""; //Request.Params["PayID"];//招商银行是1001 strTradeDate = DateTime.Now.ToString("yyyyMMddHHmmss"); strTransID = rechargemodel.TranOrder.Trim(); //strMemberID + DateTime.Now.ToString("MMddHHmmss");//商户订单号(交易流水号)(建议使用商户订单号加上贵方的唯一标识号) strOrderMoney = (float.Parse(rechargemodel.Amount.ToString("f2")) * 100).ToString(); //订单金额,需要和卡面额一致(此处以分为单位) strProductName = "宝付在线充值"; //商品名称 strAmount = "1"; //商品数量,为1 strUsername = ""; strAdditionalInfo = ""; strPageUrl = GlobalUtils.WebURL + "/PaymentPlatform/Baofu/page_url.aspx"; //客户端跳转地址 strReturnUrl = GlobalUtils.WebURL + "/PaymentPlatform/Baofu/return_url.aspx"; //ConfigurationManager.AppSettings["BaofuNotifyUrl"];//ConfigurationManager.AppSettings["ReturnUrl"];//服务器端返回地址 strNoticeType = "1"; //0 不跳转 1 会跳转 strMd5Key = "abcdefg"; //webSetting.Param2Value.Trim();//ConfigurationManager.AppSettings["Md5key"];//密钥 双方约定 strTerminalID = "10000001"; //webSetting.Param3Value.Trim();//ConfigurationManager.AppSettings["TerminalID"];//终端 strInterfaceVersion = "4.0"; // webSetting.Param4Value.Trim();//ConfigurationManager.AppSettings["InterfaceVersion"];//版本 当前为4.0请勿修改 strKeyType = webSetting.Param5Value.Trim(); //ConfigurationManager.AppSettings["KeyType"]; //加密方式默认1 MD5 strSignature = GetMd5Sign(strMemberID, strPayID, strTradeDate, strTransID, strOrderMoney, strPageUrl, strReturnUrl, strNoticeType, strMd5Key); //LogHelper.WriteLog("支付请求签名", "", strSignature); SysLogHelper.WriteTraceLog("支付请求签名", no_order); }
protected void LoadData() { Guid? userId = WebUserAuth.UserId; WeProductBLL bll = new WeProductBLL(); WebSettingBLL setbll = new WebSettingBLL(); WebSettingInfo setInfo1 = setbll.GetWebSettingInfo("5E08DFE3-6CED-4E71-8CF9-2A2E3BAC9036"); WebSettingInfo setInfo2 = setbll.GetWebSettingInfo("06A6344D-E1FB-4AAA-890A-E39351D5E7A3"); decimal rewardInterest_1 = 0; string strSQL = "select ProductId, OrderDate, isnull(InvestedAmount,0) as InvestedAmount, isnull(TuandaiRedRate,0) as TuandaiRedRate from dbo.We_Order with(nolock) where Id=@weOrderId"; Dapper.DynamicParameters dyParams = new Dapper.DynamicParameters(); dyParams.Add("@weOrderId", weOrderId); MyWePlanOrderInfo weOrderInfo = PublicConn.QuerySingle <MyWePlanOrderInfo>(strSQL, ref dyParams); //model = bll.GetWeProductInfo(weOrderInfo.ProductId); if (GlobalUtils.IsRedis && GlobalUtils.IsWePlanRedis) { string err = string.Empty; var weRedisInfo = TuanDai.RedisApi.Client.WePlanRedis.GetWePlanRedisByProductIdJson(weOrderInfo.ProductId, out err, TdConfig.ApplicationName); if (weRedisInfo != null) { model = JsonConvert.DeserializeObject <WeProductDetailInfo>(weRedisInfo); } if (model == null || !string.IsNullOrEmpty(err)) { model = new WeProductBLL().GetWeProductInfo(weOrderInfo.ProductId); } } else { model = new WeProductBLL().GetWeProductInfo(weOrderInfo.ProductId); } DueInterestAmount = 0; //查询订单加息 RewardRate += GetOrderJxRate(weOrderInfo.TuandaiRedRate, weOrderId.Value, userId.Value); rewardInterest_1 = GetInterest(weOrderInfo.InvestedAmount, model.Deadline ?? 0, GetOrderJxRate(weOrderInfo.TuandaiRedRate, weOrderId.Value, userId.Value)); RewardInterest = rewardInterest_1; DueInterestAmount = GetInterest(weOrderInfo.InvestedAmount, model.Deadline ?? 0, model.YearRate ?? 0); DueInterestAmount += RewardInterest; }
protected void Page_Load(object sender, EventArgs e) { Context.Response.Redirect("//mvip.tdw.cn/pages/invest/invest_newHand.aspx"); return; WebSettingBLL websetbll = new WebSettingBLL(); WebSettingInfo setInfo = websetbll.GetWebSettingInfo("28ED2C47-C151-47AA-9D58-63277C0483C1"); WebSettingInfo NewHandExtSet = websetbll.GetWebSettingInfo("20B98405-633B-4559-95C9-C0E96DD3BD2C"); int limitRegDay = NewHandExtSet.Param1Value.ToInt(30); IsNewHandNewRule = setInfo.Param5Value == "1"; if (IsNewHandNewRule) { NewHandTips = "1.限" + DateTime.Today.AddDays(-limitRegDay).ToString("yyyy-MM-dd") + "起新注册用户。<br />2.注册30天内 , 限投" + setInfo.Param4Value + "次新手标。<br />3.新手标累计投资金额为" + int.Parse(setInfo.Param1Value) / 10000 + "万元。"; } GetNewHandProject(); type = Tool.WEBRequest.GetString("type"); }
/// <summary> /// 获取新手标限制金额 /// </summary> private void GetLimitInvestMoney() { WebSettingInfo setInfo = new WebSettingBLL().GetWebSettingInfo("28ED2C47-C151-47AA-9D58-63277C0483C1"); limitInvest = decimal.Parse(setInfo.Param1Value); limitInvestNum = setInfo.Param4Value.ToInt(3); IsNewHandNewRule = setInfo.Param5Value == "1"; if (limitInvest >= 10000) { limitInvestStr = ToolStatus.DeleteZero(Math.Floor(limitInvest / 10000)) + "万"; } else if (limitInvest >= 1000 && limitInvest < 10000) { limitInvestStr = ToolStatus.DeleteZero(Math.Floor(limitInvest / 1000)) + "千"; } else { limitInvestStr = Math.Floor(limitInvest).ToString(); } }
/// <summary> /// 获取邀请人数 /// add by linhelin /// 2016-08-26 /// </summary> /// <returns></returns> private int GetInvitationCount() { WebSettingInfo timeset = new WebSettingBLL().GetWebSettingInfo("CF25D857-6144-4242-AA51-1227D5918024"); DateTime NewPartnerBeginDate = DateTime.Parse(timeset.Param1Value); DateTime NewPartnerEndDate = DateTime.Parse(timeset.Param2Value); int count = 0; string sql = @"SELECT COUNT(1) FROM dbo.ExtenderRelation(nolock) r LEFT JOIN dbo.UserBasicInfo(nolock) u ON u.Id = r.UserId WHERE r.ExtenderKey =@extendkey AND r.AddDate >= @begintime --AND r.AddDate < @activityEndTime"; Dapper.DynamicParameters whereParame = new Dapper.DynamicParameters(); whereParame.Add("@extendkey", extendkey); whereParame.Add("@begintime", NewPartnerBeginDate); whereParame.Add("@activityEndTime", NewPartnerEndDate); count = PublicConn.QuerySingle <int?>(sql, ref whereParame) ?? 0; return(count); }
private void GetData() { var webset = new WebSettingBLL().GetWebSettingInfo("42E7BF6F-74F0-4375-A614-00AD81A4638E"); if (webset == null) { webset = new WebSettingInfo(); webset.Param1Value = "6"; } Guid userId = WebUserAuth.UserId.Value; model = WXGetMyBills(userId, 1, 10, DateTime.Now.AddDays(-int.Parse(webset.Param1Value)).ToDateString()); int recordCount = model.TotalCount; int firstPageSize = 10; if (recordCount < 10) { firstPageSize = 10 - recordCount; } var bigModel = WXGetMyBillsFromBigData(userId, DateTime.Now.AddMonths(-2), DateTime.Now.AddDays(-int.Parse(webset.Param1Value)), 1, 10, firstPageSize); if (firstPageSize < 10 && bigModel.List != null) { model.List.AddRange(bigModel.List); } recordCount += bigModel.TotalCount; double divide = recordCount / 10; double floor = System.Math.Floor(divide); if (recordCount % 10 != 0) { floor++; } pageCount = Convert.ToInt32(floor);//总页数 BannerList = new AdImageBLL().GetTuanDaiHot((int)ConstString.AdImageType.WEBImage, 1); }
private bool GetData() { UserBLL userbll = new UserBLL(); //获取项目信息 model = bll.WXGetMyLoanDetail(this.projectId.Value, WebUserAuth.UserId.Value); if (model == null) { Response.Redirect(GlobalUtils.MTuanDaiURL + "/Member/Repayment/borrowLog.aspx"); return(false); } //需提前还款时才做查询数据 if (model.IsPrepayment) { WebSettingInfo set = new WebSettingBLL().GetWebSettingInfo("3F902315-6986-44FF-9F00-9D420C07FCDA"); if (set != null && DateTime.Parse(set.Param4Value) >= model.AddDate) { ProjectBLL projectbll = new ProjectBLL(); projectbll.WXGetPrepaymentActualAmountAndBalance(WebUserAuth.UserId.Value, this.projectId.Value, ref actualAmount, ref AviMoney); } else { var whereParams = new DynamicParameters(); whereParams.Add("@projectId", projectId); whereParams.Add("@DueOutMoney", 0, DbType.Double, ParameterDirection.Output); TuanDaiDB.Execute(TdConfig.ApplicationName, TdConfig.DBRead, "p_ShowDueOutOfProject_ZC", ref whereParams, CommandType.StoredProcedure); actualAmount = (decimal)whereParams.Get <double>("@DueOutMoney"); } AviMoney = userbll.GetUserAviMoney(WebUserAuth.UserId.Value); } GetRepayedMsg(model.ProjectId); return(true); }
private void GetData() { WebSettingBLL webSettingBll = new WebSettingBLL(); preSellSet = webSettingBll.GetWebSettingInfo("6F9D3B77-C15C-4A5A-B883-21004E10BE29"); curSellSet = webSettingBll.GetWebSettingInfo("B11558CB-3C6B-4DAD-9D2F-D6D2DE13CCF7"); sellSet518 = webSettingBll.GetWebSettingInfo("5E02F517-E6FC-4451-8232-378377837EC1"); IsPreView1218 = System.Configuration.ConfigurationManager.AppSettings["IsPreView1218"]; if (IsPreView1218 == "1") { preSellSet.Param1Value = DateTime.Today.ToString("yyyy-MM-dd"); preSellSet.Param2Value = DateTime.Today.ToString("yyyy-MM-dd 23:59:59"); } else if (IsPreView1218 == "2") { preSellSet.Param1Value = DateTime.Today.AddDays(-1).ToString("yyyy-MM-dd"); preSellSet.Param2Value = DateTime.Today.AddDays(-1).ToString("yyyy-MM-dd 23:59:59"); curSellSet.Param1Value = DateTime.Today.ToString("yyyy-MM-dd"); curSellSet.Param2Value = DateTime.Today.ToString("yyyy-MM-dd 23:59:59"); } ProjectBLL bll = new ProjectBLL(); WeList = GetInvestListWePlan(out recordCount); double divide = recordCount / GlobalUtils.PageSize; double floor = System.Math.Floor(divide); if (recordCount % GlobalUtils.PageSize != 0) { floor++; } pageCount = Convert.ToInt32(floor);//总页数 GetShowImage(); }
private void OnInitData() { basicinfo = bll.GetUserBasicInfoModelById(userId); //从Java接口获取银行卡信息 var bankJavaService = new BankFromJavaService(); if (GlobalUtils.IsBankService) { WXResponsePublicInfo <WXResponseSelectBankInfoChild> bankInfo = bankJavaService.GetBankInfo(userId, ServiceType.TuoMin); if (bankInfo != null && bankInfo.respData != null) { bankName = bankInfo.respData.bankName; bankNo = bankInfo.respData.bankNo; } } if (string.IsNullOrEmpty(bankNo)) { GlobalUtils.GetBankImg(basicinfo.Id, out bankName); var bankinfo = GlobalUtils.GetBankInfo(basicinfo.Id); if (bankinfo != null) { bankNo = bankinfo.BankNo; } } if (basicinfo.sex == 2) { sexname = "小姐"; } vailStatus = getVailStatusByUserModel(basicinfo); accountInfo = new FundAccountBLL().GetFundAccountInfoById(userId); if (GlobalUtils.IsBankService) { cadAviMoney = bankJavaService.GetAviMoney(userId); } else { cadAviMoney = bll.GetDrawAviAmount(userId); } WebSettingInfo setmodel = new WebSettingBLL().GetWebSettingInfo("1F9F7CF7-267E-4F88-B3A4-F2775401CA0F"); topwithdrawamount = (basicinfo.Level ?? 1) == (int)ConstString.UserType.VipUser ? decimal.Parse(setmodel.Param5Value) : decimal.Parse(setmodel.Param4Value); //UserPrizeBll prizebll = new UserPrizeBll(); //VoucherInfoList = prizebll.GetWithdrawVoucher(userId); string err = ""; //从接口获取未使用提现券 List <TuanDai.UserPrizeNew.ServiceClient.Models.UserPrizeInfo> ulist = new TuanDai.UserPrizeNew.Client.UserPrizeQueryClient(TdConfig.ApplicationName).GetWithdrawVoucher(userId, out err); if (!string.IsNullOrEmpty(err)) { TuanDai.LogSystem.LogClient.LogClients.ErrorLog(TdConfig.ApplicationName, "TuanDai.UserPrizeNew.Client.UserPrizeQueryClient.GetUserPrizeListByUserId", userId.ToString(), err); } WithdrawVoucherInfo1 wvi = null; if (VoucherInfoList == null) { VoucherInfoList = new List <WithdrawVoucherInfo1>(); } if (ulist != null && ulist.Count > 0) { //循坏写入VoucherInfoList foreach (var u in ulist) { wvi = new WithdrawVoucherInfo1(); wvi.Amount = u.PrizeValue; wvi.ExpirationDate = u.ExpirationDate; wvi.Id = u.Id; wvi.SubTypeId = u.SubTypeId; if (wvi.ExpirationDate.HasValue) { wvi.DateDeadline = (int)MyDateTime.DateDiff(MyDateTime.DateDiffOption.Day, DateTime.Now, wvi.ExpirationDate.Value); } VoucherInfoList.Add(wvi); } } count = VoucherInfoList.Count; //获取默认支付方式 DefPayType = 2; IsNoCanDraw = (DateTime.Now > DateTime.Parse(DateTime.Now.ToString("d") + " 22:59:59") && DateTime.Now <= DateTime.Parse(DateTime.Now.ToString("d") + " 23:59:59")) || (DateTime.Now >= DateTime.Parse(DateTime.Now.ToString("d") + " 00:00:00") && DateTime.Now < DateTime.Parse(DateTime.Now.ToString("d") + " 00:10:00")); }
protected bool GetData() { UserBLL userbll = new UserBLL(); //获取项目信息 model = bll.GetProjectDetailInfo(projectId.Value); if (model == null) { Response.Redirect(GlobalUtils.WebURL + "/Member/my_account.aspx"); return(false); } switch (model.Rating) { case 1: rating = "<span style=\"color:Green;\">低</span>"; break; case 2: rating = "<span style=\"color:Orange;\">中</span>"; break; case 3: rating = "<span style=\"color:Red;\">高</span>"; break; } GetBorrowUserInfo(); WebSettingBLL setbll = new WebSettingBLL(); //新手加息判断 WebSettingInfo GylSetInfo = setbll.GetWebSettingInfo("5AC96A83-B678-4191-BADB-C39C02DFEBB5"); if (GylSetInfo != null) { GylPlusRate = Tool.StrObj.StrToDecimalDef(GylSetInfo.Param3Value, 0); Day15PlusRate = Tool.StrObj.StrToDecimalDef(GylSetInfo.Param4Value, 0); } if (this.model.DeadType.Value == 2 && (this.model.Deadline == 7 && GylPlusRate > 0) || (this.model.Deadline == 15 && Day15PlusRate > 0)) { IsShowPlusRate = true; } DynamicParameters dyParams; string sql = ""; if (WebUserAuth.IsAuthenticated && IsShowPlusRate) { //判断是否投资新手 sql = "select count(1) from Subscribe with(Nolock) where SubscribeUserId=@userid"; dyParams = new DynamicParameters(); dyParams.Add("@userid", WebUserAuth.UserId.Value); bool IsNewHand = PublicConn.QuerySingle <int>(sql, ref dyParams) == 0; NewHandRate = IsNewHand ? (this.model.Deadline == 7 ? GylPlusRate : Day15PlusRate) : 0; } dyParams = new DynamicParameters(); dyParams.Add("@projectid", projectId); sql = @"select ProjectID,ProjectDesc2,CreditStatus,EnterpriseCredit,OperatingConditions,RoyalRiskAbility from dbo.Project_GYL with(nolock) where ProjectID=@projectid"; ProjectGylInfo = PublicConn.QuerySingle <Project_GYLInfo>(sql, ref dyParams); if (ProjectGylInfo != null) { OverallRanking = setbll.GetWebSettingInfo(new Guid("A874BE7E-492F-4A21-9064-B75CA16D2DF3").ToString()); } if (ProjectGylInfo != null) { TotalCreditScore = ProjectGylInfo.CreditStatus + ProjectGylInfo.EnterpriseCredit + ProjectGylInfo.OperatingConditions + ProjectGylInfo.RoyalRiskAbility; } GetBusinessRange(model.Id); 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); InterestModel = TuanDai.PortalSystem.Redis.ProjectRedis.GetProjectInterestMode(model.Type.Value, model.RepaymentType.Value); return(true); }
protected void Page_Load(object sender, EventArgs e) { Guid userId = WebUserAuth.UserId.Value; UserBLL bll = new UserBLL(); UserSettingBLL uBll = new UserSettingBLL(); SetModel = new WebSettingBLL().GetWebSettingInfo("5E08DFE3-6CED-4E71-8CF9-2A2E3BAC9036"); if (userId != null && userId != Guid.Empty) { var rInfo = new UserRiskEvaluationBLL().GetAssassTimeThisYear(userId, TdConfig.ApplicationName); if (rInfo == null) { Response.Redirect("/Member/safety/pre_invest.aspx", true); } AviMoney = bll.GetUserAviMoney(userId); userModel = bll.GetUserBasicInfoModelById(userId); userSetting = uBll.GetUserSettingInfo(userId); if (userSetting == null) { userSetting = new UserSettingInfo(); userSetting.IsTenderNeedPayPassword = false; } //假如数据还不同步过来,设置未身份证验证 if (userModel == null) { userModel = new UserBasicInfoInfo(); userModel.IsValidateIdentity = false; AviMoney = 0; } } else { Response.Redirect("/user/Login.aspx?ReturnUrl=" + Request.RawUrl, true); } Tool.CookieHelper.WriteCookie("InvestUrl", HttpContext.Current.Request.RawUrl, 30); var projectIdStr = Tool.WEBRequest.GetQueryString("projectid");// Request.QueryString["projectid"]; if (!string.IsNullOrEmpty(projectIdStr)) { projectId = Guid.Parse(projectIdStr); //model = new WeProductBLL().GetWeProductInfo(projectId); string isOpenMobileCode = "false"; var webSet = new WebSettingBLL().GetWebSettingInfo("C7FC6726-A36D-4035-A36C-957D43F5EF96"); if (webSet == null) { webSet = new WebSettingInfo(); } if (webSet.Param1Value == "1") { isOpenMobileCode = "true"; } if (IsZQZR(projectId) && !TuanDai.PortalSystem.Redis.mRedis.GetZqzrInvestCodePass(projectId, userId) && isOpenMobileCode == "true") { IsShowMobileCode = true; } } else { Response.Redirect("/pages/invest/invest_list.aspx"); } investType = Tool.WEBRequest.GetQueryString("investType"); //Request.QueryString["investType"]; var payMoneyStr = Tool.WEBRequest.GetQueryString("payMoney"); //Request.QueryString["payMoney"]; if (!string.IsNullOrEmpty(payMoneyStr) && payMoneyStr != "NaN") { PayMoney = decimal.Parse(payMoneyStr); } else { Response.Redirect("/pages/invest/invest_list.aspx"); } ProfitMoney = Tool.WEBRequest.GetQueryString("profitMoney"); //Request.QueryString["profitMoney"]; var unitStr = Tool.WEBRequest.GetQueryString("unit"); //Request.QueryString["unit"]; if (!string.IsNullOrEmpty(unitStr)) { unit = int.Parse(unitStr); } else { Response.Redirect("/pages/invest/invest_list.aspx"); } var repeatInvestTypeStr = Tool.WEBRequest.GetQueryString("repeatInvestType"); //Request.QueryString["repeatInvestType"]; if (!string.IsNullOrEmpty(repeatInvestTypeStr)) { RepeatInvestType = int.Parse(repeatInvestTypeStr); } if (Tool.WEBRequest.GetQueryString("PrizeId") != "") { PrizeId = WEBRequest.GetGuid("PrizeId"); } PrizeName = WEBRequest.GetQueryString("PrizeName"); }
public void GetBankBin() { ResultModel result = new ResultModel(); Dictionary <String, String> bankPath = new Dictionary <String, String>(); bankPath.Add("01020000", "3"); // 中国工商银行 bankPath.Add("01030000", "5"); // 中国农业银行 bankPath.Add("01040000", "2"); // 中国银行 bankPath.Add("01050000", "4"); // 中国建设银行 bankPath.Add("03100000", "7"); // 浦发银行 bankPath.Add("01000000", "16"); // 中国邮政银行 //bankPath.Add("03040000", "16"); // 华夏银行 bankPath.Add("03050000", "8"); // 民生银行 bankPath.Add("03060000", "14"); // 广东发展银行 bankPath.Add("03070000", "15"); // 平安银行 bankPath.Add("03030000", "10"); // 光大银行 bankPath.Add("03080000", "1"); // 招商银行 bankPath.Add("03090000", "9"); // 兴业银行 bankPath.Add("03020000", "13"); // 中信银行 bankPath.Add("03010000", "6"); // 交通银行 bankPath.Add("04031000", "12"); // 北京银行 string strCardNo = Context.Request["CardNo"]; Guid userId = WebUserAuth.UserId.Value; if (string.IsNullOrEmpty(strCardNo)) { result.status = 2; result.msg = "卡号不能为空"; } SortedDictionary <string, string> sParaTemp = new SortedDictionary <string, string>(); //var id = Guid.Parse("E27798C9-9301-4176-AC0B-6F3916F389EA"); //var webSetting = db.WebSetting.FirstOrDefault(x => x.Id == id); var webSetting = new WebSettingBLL().GetWebSettingInfo("E27798C9-9301-4176-AC0B-6F3916F389EA"); var partnerConfig = new PartnerConfig(webSetting.Param1Value, webSetting.Param2Value, webSetting.Param3Value, webSetting.Param4Value); string timestamp = PaymentUtil.GetCurrentDateTimeStr(); //基本请求参数 sParaTemp.Add("oid_partner", partnerConfig.OidPartner); sParaTemp.Add("sign_type", "RSA"); //业务参数 sParaTemp.Add("card_no", strCardNo); //卡号 //加签 string sign = PaymentUtil.AddSign(sParaTemp, partnerConfig.TraderPriKey, partnerConfig.MD5Key); sParaTemp.Add("sign", sign); var reqJson = PaymentUtil.DictToJson(sParaTemp); //LogEnum.Batchwithdraw.WriteLog("连连银行卡卡BIN查询-请求报文", "[" + reqJson + "]"); string responseJSON = postJson("https://yintong.com.cn/traderapi/bankcardquery.htm", reqJson); //LogEnum.Batchwithdraw.WriteLog("连连银行卡卡BIN查询-响应报文", "[" + responseJSON + "]"); SortedDictionary <string, string> sArray = JsonConvert.DeserializeObject <SortedDictionary <string, string> >(responseJSON); if (sArray.Count > 0) { //查询成功 if (sArray["ret_code"].ToString().Trim() == "0000") { string strBankCode = sArray["bank_code"].ToString().Trim(); string strBandPath; if (!bankPath.ContainsKey(strBankCode)) { strBandPath = "9999"; } else { strBandPath = bankPath[strBankCode]; } BankBin bankBin = new BankBin(); bankBin.card_no = strCardNo; bankBin.bank_code = strBandPath; bankBin.bank_name = sArray["bank_name"].ToString().Trim(); bankBin.card_type = sArray["card_type"].ToString().Trim(); bankBin.card_bound = BankNoExists(strCardNo, userId) ? "true" : "false"; result.status = 1; result.msg = "查询成功"; result.model = bankBin; } else { result.status = 0; result.msg = "查询信息失败,连连返回错误号:" + sArray["ret_code"].ToString().Trim() + ",错误信息:" + sArray["ret_msg"].ToString().Trim(); } } else { result.status = -1; result.msg = "未查询到信息"; } var sbq = GetSupportBank(); if (sbq == null) { result.status = -2; result.msg = "手机支付不支持该卡"; } IsoDateTimeConverter timeConverter = new IsoDateTimeConverter(); timeConverter.DateTimeFormat = "yyyy'-'MM'-'dd' 'HH':'mm':'ss"; string resultJson = Newtonsoft.Json.JsonConvert.SerializeObject(result, timeConverter); Context.Response.Write(resultJson); }
private void InitData() { try { WebSettingInfo webSetting = new WebSettingBLL().GetWebSettingInfo("fe5e5a30-b12c-4888-9858-12cbe80e1018"); string MemberID = Request.Params["MemberID"]; //商户号 string TerminalID = Request.Params["TerminalID"]; //商户终端号 string TransID = Request.Params["TransID"]; //商户流水号 string Result = Request.Params["Result"]; //支付结果(1:成功,0:失败) string ResultDesc = Request.Params["ResultDesc"]; //支付结果描述 string FactMoney = Request.Params["FactMoney"]; //实际成交金额 string AdditionalInfo = Request.Params["AdditionalInfo"]; //订单附加消息 string SuccTime = Request.Params["SuccTime"]; //交易成功时间 string Md5Sign = Request.Params["Md5Sign"].ToLower(); //md5签名 string Md5Key = "abcdefg"; //webSetting.Param2Value;//ConfigurationManager.AppSettings["Md5key"];//密钥 双方约定 String mark = "~|~"; //分隔符 //string _Md5Key = "100000178";//测试商户号//webSetting.Param1Value;//WebConfigurationManager.AppSettings["Md5key"]; string _WaitSign = "MemberID=" + MemberID + mark + "TerminalID=" + TerminalID + mark + "TransID=" + TransID + mark + "Result=" + Result + mark + "ResultDesc=" + ResultDesc + mark + "FactMoney=" + FactMoney + mark + "AdditionalInfo=" + AdditionalInfo + mark + "SuccTime=" + SuccTime + mark + "Md5Sign=" + Md5Key; SysLogHelper.WriteTraceLog("等待验签参数", _WaitSign); //验证签名成功 if (Md5Sign.ToLower() == Md5Encrypt(_WaitSign).ToLower()) { ///支付结果(1:成功,0:失败) DynamicParameters dyParams = new DynamicParameters(); string strSQL = ""; if (Result == "1") { strSQL = "p_OnLineRechargeHandler"; dyParams = new DynamicParameters(); dyParams.Add("@handlerStatus", 2); dyParams.Add("@MediumMoney", decimal.Divide(decimal.Parse(FactMoney), 100)); dyParams.Add("@MediumOrderNo", (TransID + SuccTime).Trim()); dyParams.Add("@outStatus", 0, DbType.Int32, ParameterDirection.Output, 20); PublicConn.ExecuteTD(PublicConn.DBWriteType.FundWrite, strSQL, ref dyParams, CommandType.StoredProcedure); int presult = dyParams.Get <int>("@outStatus"); SysLogHelper.WriteTraceLog("宝付支付交易成功", string.Concat("签名:", Md5Sign.ToLower(), "签名方式:", "MD5", "我方处理状态:", presult.ToString().Trim(), "宝付处理状态:", Result, "支付单号:", TransID)); AccountRechareInfo accountRechare = getAccountRechare(TransID); if (accountRechare != null) { strSQL = "select count(1) from AccountRechare where UserId=@userId and Status=2 and [type] in(2, 3, 4, 6, 8, 12)"; dyParams = new DynamicParameters(); dyParams.Add("@userId", accountRechare.UserId); int iCount = PublicConn.QuerySingleWrite <int>(strSQL, ref dyParams); if (iCount > 0) { TuanDai.PortalSystem.BLL.VipGetWorthBLL.AddGetWorth(accountRechare.UserId, (int)ConstString.UserGrowthType.FirstReCharge, null, 0); } UserBasicInfoInfo userBasicInfo = new UserBLL().GetUserBasicInfoModelById(accountRechare.UserId); if (userBasicInfo != null) { var isNewSmsRequest = ConfigHelper.getConfigString("IsNewSmsRequest", "0"); if (isNewSmsRequest == "0") { var parameters = new Dictionary <string, object>(); parameters.Add("CurrentDate", DateTime.Now); //parameters.Add("RechargeMoney", FactMoney); parameters.Add("RechargeMoney", decimal.Divide(decimal.Parse(FactMoney), 100));//宝付充值以分为单位 parameters.Add("User", userBasicInfo); parameters.Add("Host", GlobalUtils.WebURL); var msgSender = new BusinessDll.MessageSend(); msgSender.SendMessage2(eventCode: MessageTemplates.RechargeSuccess, parameters: parameters, mobile: userBasicInfo.TelNo, email: userBasicInfo.Email, userId: userBasicInfo.Id); } else { SmsRequest rechargeSuccessSmsRequest = new SmsRequest(); rechargeSuccessSmsRequest.EventCode = MsgTemplatesType.RechargeSuccess; rechargeSuccessSmsRequest.PlatformSource = PlatformSource.Pc; rechargeSuccessSmsRequest.UserId = userBasicInfo.Id; rechargeSuccessSmsRequest.EmailAddress = userBasicInfo.Email; rechargeSuccessSmsRequest.Mobile = userBasicInfo.TelNo; rechargeSuccessSmsRequest.Parameters = new Dictionary <string, object>(); rechargeSuccessSmsRequest.Parameters.Add("RechargeMoney", FactMoney); string errorMessage = string.Empty; SmsClient.SendMessage(rechargeSuccessSmsRequest, ref errorMessage); } } } Response.Write("OK"); Response.End(); } //if (Result == "0") //{ // db.p_OnLineRechargeHandler(1, TransID.Trim(), decimal.Divide(decimal.Parse(FactMoney), 100), (TransID + SuccTime).Trim(), outStatus); // int presult = int.Parse(outStatus.Value.ToString()); // NetLog.WriteLoginHandler("宝付支付交易失败", string.Concat("签名:", Md5Sign.ToLower(), "签名方式:", "MD5", "我方处理状态:", presult.ToString().Trim(), "宝付处理状态:", Result, "支付单号:", TransID)); // Response.Write("Fail"); //} } else { SysLogHelper.WriteTraceLog("宝付验签失败", string.Concat("宝付返回签名:", Md5Sign.ToLower(), "等待验签", Md5Encrypt(_WaitSign).ToLower(), "签名方式:", "MD5", "宝付处理状态:", Result)); Response.Write("校验失败"); Response.End(); } } catch (Exception ex) { SysLogHelper.WriteErrorLog("宝付支付失败", "错误详细信息:" + ex.Message + "|" + ex.StackTrace); Response.Write("Fail"); Response.End(); } }
protected void Page_Load(object sender, EventArgs e) { WebSettingInfo webSetting = new WebSettingBLL().GetWebSettingInfo("E27798C9-9301-4176-AC0B-6F3916F389EA"); partnerConfig = new PartnerConfig(webSetting.Param1Value, webSetting.Param2Value, webSetting.Param3Value, webSetting.Param5Value); SortedDictionary <string, string> sPara = GetRequestPost(); if (null == sPara) { Response.End(); } if (sPara.Count > 0)//判断是否有带返回参数 { NetLog.WriteBatchwithdrawHandler("接收连连支付异步通知数据", string.Concat("【", "签名:", sPara["sign"].ToString(), "签名方式:", sPara["sign_type"].ToString(), "我方订单号:", sPara["no_order"].ToString(), "充值金额:", sPara["money_order"].ToString(), "连连订单号:", sPara["oid_paybill"].ToString(), "】")); if (!PaymentUtil.CheckSign(sPara, partnerConfig.YTPublicKey, //验证失败 partnerConfig.MD5Key)) { var out_trade_no = sPara["no_order"].ToString(); var rechargeMoney = sPara["money_order"].ToString(); var transaction_id = sPara["oid_paybill"].ToString(); //ObjectParameter outStatus = new ObjectParameter("outStatus", "0"); //db.p_OnLineRechargeHandler(1, out_trade_no, decimal.Parse(rechargeMoney), transaction_id, outStatus); //int result = int.Parse(outStatus.Value.ToString()); NetLog.WriteBatchwithdrawHandler("连连验签失败", string.Concat("签名:", sPara["sign"].ToString(), "签名方式:", sPara["sign_type"].ToString(), "连连处理状态:9999")); Response.Write(@"{""ret_code"":""9999"",""ret_msg"":""验签失败""}"); Response.End(); } else { var out_trade_no = sPara["no_order"].ToString(); var rechargeMoney = sPara["money_order"].ToString(); var transaction_id = sPara["oid_paybill"].ToString(); string strSQL = "p_OnLineRechargeHandler"; DynamicParameters dyParams = new DynamicParameters(); dyParams.Add("@orderno", out_trade_no); dyParams.Add("@MediumMoney", decimal.Parse(rechargeMoney)); dyParams.Add("@MediumOrderNo", transaction_id); dyParams.Add("@outStatus", 0, DbType.Int32, ParameterDirection.Output, 20); if (sPara["result_pay"].ToString().ToLower() == "success".ToLower()) { dyParams.Add("@handlerStatus", 2); } else { dyParams.Add("@handlerStatus", 1); } PublicConn.ExecuteTD(PublicConn.DBWriteType.FundWrite, strSQL, ref dyParams, CommandType.StoredProcedure); int result = dyParams.Get <int>("@outStatus"); AccountRechareInfo accountRechare = getAccountRechare(out_trade_no); if (accountRechare != null) { var para = new DynamicParameters(); para.Add("@UserId", accountRechare.UserId); var count = PublicConn.QuerySingleWrite <int>("select count(0) from AccountRechare with(nolock) where UserId=@UserId and Status =2 and type in (2, 3, 4, 6, 8, 12)", ref para); if (count == 1) { TuanDai.PortalSystem.BLL.VipGetWorthBLL.AddGetWorth(accountRechare.UserId, (int)ConstString.UserGrowthType.FirstReCharge, null, 0); } UserBasicInfoInfo userBasicInfo = new UserBLL().GetUserBasicInfoModelById(accountRechare.UserId); if (userBasicInfo != null) { var isNewSmsRequest = ConfigHelper.getConfigString("IsNewSmsRequest", "0"); if (isNewSmsRequest == "0") { var parameters = new Dictionary <string, object>(); parameters.Add("User", userBasicInfo); parameters.Add("CurrentDate", DateTime.Now); parameters.Add("RechargeMoney", rechargeMoney); parameters.Add("Host", GlobalUtils.WebURL); var messageSender = new BusinessDll.MessageSend(); messageSender.SendMessage2(eventCode: MessageTemplates.RechargeSuccess, parameters: parameters, mobile: userBasicInfo.TelNo, email: userBasicInfo.Email, userId: userBasicInfo.Id); } else { SmsRequest rechargeSuccessSmsRequest = new SmsRequest(); rechargeSuccessSmsRequest.EventCode = MsgTemplatesType.RechargeSuccess; rechargeSuccessSmsRequest.PlatformSource = PlatformSource.Pc; rechargeSuccessSmsRequest.UserId = userBasicInfo.Id; rechargeSuccessSmsRequest.EmailAddress = userBasicInfo.Email; rechargeSuccessSmsRequest.Mobile = userBasicInfo.TelNo; rechargeSuccessSmsRequest.Parameters = new Dictionary <string, object>(); rechargeSuccessSmsRequest.Parameters.Add("RechargeMoney", rechargeMoney); string errorMessage = string.Empty; SmsClient.SendMessage(rechargeSuccessSmsRequest, ref errorMessage); } //第三方渠道回调 try { TuanDai.PortalSystem.BLL.ThirdPartyChannel.RechargeCallBack(accountRechare.Id, accountRechare.UserId); } catch (Exception ex) { new TuanDai.LogSystem.LogClient.LogClients().WriteErrorLog( "TuanDai.PortalSystem.BLL.ThirdPartyChannel.RechargeCallBack", "", "", ex.Message); } } } NetLog.WriteTraceLogHandler("交易成功", string.Concat("签名:", sPara["sign"].ToString(), "签名方式:", sPara["sign_type"].ToString(), "我方处理状态:", result.ToString().Trim(), "连连处理状态:", sPara["result_pay"].ToString())); Response.Write(@"{""ret_code"":""0000"",""ret_msg"":""交易成功""}"); Response.End(); } } else { //var out_trade_no = sPara["no_order"].ToString(); //var rechargeMoney = sPara["money_order"].ToString(); //var transaction_id = sPara["oid_paybill"].ToString(); //ObjectParameter outStatus = new ObjectParameter("outStatus", "0"); //db.p_OnLineRechargeHandler(1, out_trade_no, decimal.Parse(rechargeMoney), transaction_id, outStatus); ////Response.Write(@"{""ret_code"":""9999"",""ret_msg"":""验签失败""}"); //int result = int.Parse(outStatus.Value.ToString()); NetLog.WriteBatchwithdrawHandler("连连交易参数为空失败", "连连处理状态:9999"); Response.Write(@"{""ret_code"":""9999"",""ret_msg"":""交易失败""}"); Response.End(); } // 解析异步通知对象 // sPara 字典对象 // TODO:更新订单,发货等后续处理 }
private void GetIsWeZnq() { Guid? userId = WebUserAuth.UserId; WeProductBLL bll = new WeProductBLL(); WebSettingBLL setbll = new WebSettingBLL(); //var weproduct = bll.GetWeProductInfo(model.ProductId); WeProductDetailInfo weproduct = null; if (GlobalUtils.IsRedis && GlobalUtils.IsWePlanRedis) { string err = string.Empty; var weRedisInfo = TuanDai.RedisApi.Client.WePlanRedis.GetWePlanRedisByProductIdJson(model.ProductId, out err, TdConfig.ApplicationName); if (weRedisInfo != null) { weproduct = JsonConvert.DeserializeObject <WeProductDetailInfo>(weRedisInfo); } if (weproduct == null || !string.IsNullOrEmpty(err)) { weproduct = new WeProductBLL().GetWeProductInfo(model.ProductId); } } else { weproduct = new WeProductBLL().GetWeProductInfo(model.ProductId); } IsY7Z7 = weproduct.TypeWord.ToLower().Contains("y7") || weproduct.TypeWord.ToLower().Contains("z7"); //查询订单加息 RewardRate += GetOrderJxRate(weOrderId.Value, userId.Value); RewardInterest = GetInterest(model.AmountInvestment, model.Deadline, RewardRate); DueInterestAmount = model.DueInterestAmount + RewardInterest; if (RewardRate > 0) { IsWeZnq = true; } /* * * WebSettingInfo setInfo1 = setbll.GetWebSettingInfo("5E08DFE3-6CED-4E71-8CF9-2A2E3BAC9036"); * WebSettingInfo setInfo2 = setbll.GetWebSettingInfo("06A6344D-E1FB-4AAA-890A-E39351D5E7A3"); * decimal rewardInterest_1 = 0, rewardInterest_2 = 0, rewardInterest_3 = 0; * //查询预热期加息 * if (setInfo1 != null) * { * if (weproduct.StartDate.Value >= DateTime.Parse(setInfo1.Param1Value) && weproduct.StartDate.Value < DateTime.Parse(setInfo1.Param2Value)) * { * IsWeZnq = weproduct.TypeWord.ToLower().IsIn("p", "q", "r"); * if (IsWeZnq) * { * RewardRate += decimal.Parse(setInfo1.Param3Value); * rewardInterest_1 = GetInterest(model.AmountInvestment, model.Deadline, decimal.Parse(setInfo1.Param3Value)); * } * } * } * //查询7.8号后加息 * if (setInfo2 != null) * { * if (weproduct.StartDate.Value >= DateTime.Parse(setInfo2.Param1Value) && weproduct.StartDate.Value < DateTime.Parse(setInfo2.Param2Value)) * { * IsWeZnq = true; * RewardRate += decimal.Parse(setInfo2.Param3Value); * rewardInterest_2 = GetInterest(model.AmountInvestment, model.Deadline, decimal.Parse(setInfo2.Param3Value)); * } * } * //查询定向加息 * string strSQL = "SELECT TOP 1 RedRate FROM dbo.UserAddInterest with(nolock) WHERE UserId=@UserId AND @OrderDate>=StartDate AND @OrderDate<EndDate AND @Deadline>=StartDeadline AND @Deadline<=EndDeadline order by RedRate desc"; * Dapper.DynamicParameters dyParams = new Dapper.DynamicParameters(); * dyParams.Add("@UserId", userId); * dyParams.Add("@Deadline", model.Deadline); * dyParams.Add("@OrderDate", weproduct.StartDate.Value); * decimal? specialRate = TuanDai.DB.TuanDaiDB.QueryFirstOrDefault<decimal?>(TdConfig.DBRead, strSQL, ref dyParams); * if (specialRate.HasValue && specialRate.Value > 0) * { * IsWeZnq = true; * RewardRate += specialRate.Value; * rewardInterest_3 = GetInterest(model.AmountInvestment, model.Deadline, specialRate.Value); * } * RewardInterest = rewardInterest_1 + rewardInterest_2 + rewardInterest_3; * DueInterestAmount = model.DueInterestAmount + RewardInterest; */ }
public void GetLongUrl() { Guid webSetId = Guid.Parse("28670136-C253-4B88-962F-F99E81806D5E"); WebSettingInfo webSettingEntity = new WebSettingBLL().GetWebSettingInfo(webSetId.ToString()); string url = webSettingEntity.Param1Value; try { string shortUrlKey = string.Empty; int functonType = 0; int shareToolType = 0; GetSharedAddressKey(ref shortUrlKey, ref functonType, ref shareToolType); //获取段地址的key、功能类型、分享类型 if (functonType > 0 && shareToolType > 0) { string sharedUrl = GetSharedAddress(functonType, shareToolType);//获取分享设置表中对应功能、分享类型的url if (!string.IsNullOrEmpty(sharedUrl)) { url = sharedUrl; } } //ShortUrlService serviceShortUrl = new ShortUrlService(); ShortUrlRequest requestShortUrl = new ShortUrlRequest(); requestShortUrl.ShortUrlKey = shortUrlKey; TuanDai.InfoSystem.Model.RequestContentApi reqApi = new TuanDai.InfoSystem.Model.RequestContentApi(); reqApi.Data = JsonConvert.SerializeObject(requestShortUrl); ReplyContentApi repApi = null; InfoSystemClient_New client = new InfoSystemClient_New(); string errorMsg = ""; repApi = client.getlongurl(reqApi, out errorMsg); List <UserExtendShortUrl> shortUrList = new List <UserExtendShortUrl>(); if (errorMsg == "" && repApi.Data != null && repApi.ReturnCode == 1) { shortUrList = JsonConvert.DeserializeObject <List <UserExtendShortUrl> >(repApi.Data.ToString()); } if (shortUrList.Count <= 0) { Response.Redirect(url); } string resultUrl = string.Empty; UserExtendShortUrl shortUrEntity = shortUrList.FirstOrDefault(); if (shortUrEntity != null && !string.IsNullOrEmpty(shortUrEntity.LongUrl)) { resultUrl = url + shortUrEntity.LongUrl; } if (!string.IsNullOrEmpty(resultUrl)) { Response.Redirect(resultUrl, false); } else { Response.Redirect(url, false); } } catch (Exception ex) { SysLogHelper.WriteErrorLog("GetLongUrl应用系统错误:" + ex.TargetSite.Name, ex.ToString()); Response.Redirect(url, false); } finally { Response.End(); } }
/// <summary> /// 获取我的账单记录 /// </summary> public void GetMyBillsShowList() { int pagesize = 10; int pageindex = Tool.SafeConvert.ToInt32(Context.Request.Form["pageIndex"], 1); if (pageindex < 1) { pageindex = 1; } TuanDai.PortalSystem.Model.WebSettingInfo webset = new WebSettingBLL().GetWebSettingInfo("42E7BF6F-74F0-4375-A614-00AD81A4638E"); if (webset == null) { webset = new TuanDai.PortalSystem.Model.WebSettingInfo(); webset.Param1Value = "6"; } StringBuilder sb = new StringBuilder(); int totalcount = 0; WXMyBillsInfo myBillModel = new my_bills().WXGetMyBills(WebUserAuth.UserId.Value, pageindex, GlobalUtils.PageSize, DateTime.Now.AddDays(-int.Parse(webset.Param1Value)).ToDateString()); if (myBillModel == null) { myBillModel = new WXMyBillsInfo(); } if (myBillModel != null) { //思路:先从主库取数据,再从大数据取数据衔接 totalcount = myBillModel.TotalCount; int index = 1; int pageCount = GetPageCount(totalcount, pagesize);//总页数 主库数据页数 int firstPageSize = 10; int newPageIndex = 0; if (pageindex >= pageCount) { newPageIndex = pageindex - pageCount + 1; firstPageSize = 10 - (totalcount % pagesize); } var bigModel = new my_bills().WXGetMyBillsFromBigData(WebUserAuth.UserId.Value, DateTime.Now.AddMonths(-2), DateTime.Now.AddDays(-int.Parse(webset.Param1Value)), newPageIndex, 10, firstPageSize); if (bigModel == null) { bigModel = new WXMyBillsInfo(); } if (pageindex >= pageCount && bigModel.List != null) { myBillModel.List.AddRange(bigModel.List); } totalcount += bigModel.TotalCount; //加上大数据的近两个月总条数 pageCount = GetPageCount(totalcount, pagesize); //加上大数据的近两个月总页数 if (myBillModel.List != null && myBillModel.List.Count > 0) { sb.Append("{\"result\":\"1\",\"totalcount\":\"" + totalcount + "\",\"pagecount\":\"" + pageCount + "\",\"list\":["); foreach (WXMyBillDetialInfo temp in myBillModel.List) { if (index == myBillModel.List.Count()) { sb.Append("{\"Title\":\"" + my_bills.GetBillTitle(temp) + "\",\"BillDate\":\"" + Convert.ToDateTime(temp.BillDate).ToString("yyyyMM") + "\",\"OperateStr\":\"" + (temp.PayOutAmount > 0 ? "-" : "+") + "\",\"Amount\":\"" + Tool.MoneyHelper.ConvertDetailWanMoney((temp.PayOutAmount ?? 0) > 0 ? temp.PayOutAmount : (temp.InAmount ?? 0)) + "\",\"BillType\":\"" + my_bills.GetBillType(temp) + "\",\"Day\":\"" + temp.BillDate.ToString("MM-dd") + "\",\"Hour\":\"" + temp.BillDate.ToString("HH:mm:ss") + "\",\"Year\":\"" + temp.BillDate.ToString("yyyy") + "\",\"Month\":\"" + temp.BillDate.ToString("MM") + "\",\"Id\":\"" + temp.Id + "\"}]}"); } else { sb.Append("{\"Title\":\"" + my_bills.GetBillTitle(temp) + "\",\"BillDate\":\"" + Convert.ToDateTime(temp.BillDate).ToString("yyyyMM") + "\",\"OperateStr\":\"" + (temp.PayOutAmount > 0 ? "-" : "+") + "\",\"Amount\":\"" + Tool.MoneyHelper.ConvertDetailWanMoney((temp.PayOutAmount ?? 0) > 0 ? temp.PayOutAmount : (temp.InAmount ?? 0)) + "\",\"BillType\":\"" + my_bills.GetBillType(temp) + "\",\"Day\":\"" + temp.BillDate.ToString("MM-dd") + "\",\"Hour\":\"" + temp.BillDate.ToString("HH:mm:ss") + "\",\"Year\":\"" + temp.BillDate.ToString("yyyy") + "\",\"Month\":\"" + temp.BillDate.ToString("MM") + "\",\"Id\":\"" + temp.Id + "\"},"); } index++; } } else { sb.Append("{\"result\":\"0\",\"totalcount\":\"" + totalcount + "\",\"pagecount\":\"0\"}"); } } else { sb.Append("{\"result\":\"0\",\"totalcount\":\"" + totalcount + "\",\"pagecount\":\"0\"}"); } this.Context.Response.Write(sb.ToString()); this.Context.Response.End(); }
public void GetMyFtbInvestList() { Guid?weOrderId = SafeConvert.ToGuid(WEBRequest.GetFormString("weOrderId")); int pageIndex; int.TryParse(Context.Request["pageIndex"], out pageIndex); int totalCount = 0; List <WeFTBWxInvestInfo> dataList = null; if (GlobalUtils.IsOpenSubscribeApi)//走CDC查询服务 { string err = ""; string resp = HttpClient.HttpUtil.HttpGet(TdConfig.ApplicationName, GlobalUtils.SubApiUrl + "/app/appGetMyFTBClaimDetail?weOrderId=" + weOrderId + "&userId=" + WebUserAuth.UserId.Value + "&pagesize=15&pageindex=" + pageIndex, "", out err); if (!string.IsNullOrEmpty(resp)) { var pub = JsonConvert.DeserializeObject < ResponsePublicModel <ResponseGeWeFTBWxInvestInfo> >(resp); if (pub != null) { dataList = pub.data.dataList; totalCount = pub.data.totalCount; } } //dataList = service.GetDataPager<WeFTBWxInvestInfo>("/app/APPGetMyFTBClaimDetail", param, // out totalCount); } else { string strSQL = @"SELECT * FROM ( select SUM(1) OVER() as TotalCount, s.Id as SubscribeId,s.ContractNo,p.[Type], case when isnull(s.TotalShares,0)=0 and isnull(s.TransferedShares,0)=0 then s.Amount when isnull(s.TransferedShares,0)>0 and (s.TotalShares=0 or s.TotalShares=s.TransferedShares) then ISNULL(s.TranedAmount,0) else s.Amount+isnull(s.TranedAmount,0) end Amount,p.Title,u.RealName as UserName,isnull(s.TranDate,s.AddDate) as AddDate, isnull(s.IsFromTran,0) as IsFromTran, s.TranId, ROW_NUMBER() OVER(order by s.AddDate desc) rownumber from Subscribe s with(nolock) left join Project p with(nolock) on s.ProjectId=p.Id left join UserBasicInfo u with(nolock) on p.UserId=u.Id where s.SubscribeUserId=@userId AND s.WeOrderId=@weOrderId and s.ContractNo not like '%[_]%' )M WHERE M.rownumber> @pagesize*(@pageindex-1) and M.rownumber<=@pagesize*@pageindex "; Dapper.DynamicParameters dyParams = new Dapper.DynamicParameters(); dyParams.Add("@weOrderId", weOrderId); dyParams.Add("@userId", WebUserAuth.UserId.Value); dyParams.Add("@pagesize", 15); dyParams.Add("@pageindex", pageIndex); dataList = TuanDai.DB.TuanDaiDB.Query <WeFTBWxInvestInfo>(TdConfig.ApplicationName, TdConfig.DBRead, strSQL, ref dyParams); if (dataList != null && dataList.Count > 0) { totalCount = dataList[0].TotalCount; foreach (var item in dataList) { if (item.UserName != null) { if (item.UserName.Length > 1) { item.UserName = item.UserName.Substring(0, 1) + "**"; } } } } } if (dataList != null && dataList.Count > 0) { WebSettingInfo ftzqSet = new WebSettingBLL().GetWebSettingInfo("BA8B8D06-A510-436C-B996-3D66D43FDF40"); foreach (var item in dataList) { item.IsFromTran = item.IsFromTran && item.AddDate > DateTime.Parse(ftzqSet.Param2Value); if (GlobalUtils.IsOpenSubscribeApi) { item.ContractUrl = GetContractViewUrl(item.TypeId, item.IsFromTran, item.ContractUrl, item.SubscribeId); item.Title = item.ProjectTitle; var borrowerModel = new UserBLL().GetUserBasicInfoModelById(item.BorrowerId); if (borrowerModel == null) { borrowerModel = new UserBasicInfoInfo(); } var relName = borrowerModel.RealName; if (!string.IsNullOrEmpty(relName)) { item.UserName = relName.Substring(0, 1) + "**"; } } else { item.ContractUrl = GetContractViewUrl(item.Type, item.IsFromTran, item.ContractNo, item.SubscribeId); } } if (ftzqSet.Param1Value == "1") { DateTime checkDate = DateTime.Parse(ftzqSet.Param2Value.Trim()); //查询是否有承接记录 List <string> subIdList = dataList.Select(p => p.SubscribeId.ToString()).ToList(); if (subIdList != null && subIdList.Any()) { //加开关控制 dataList.ForEach(p => p.IsFromTran = p.AddDate > checkDate && p.IsFromTran); //string strSQL = "select UsedShares,SubscribeId, AddDate from dbo.ProjectFQBExTransfer where SubscribeId in(" + StrObj.StrToInSQL(subIdList) + ")"; //var dyParams = new Dapper.DynamicParameters(); //List<ProjectFQBExTransferInfo> fqbTranList = TuanDai.DB.TuanDaiDB.Query<ProjectFQBExTransferInfo>(TdConfig.ApplicationName, TdConfig.DBRead, strSQL, ref dyParams); //if (fqbTranList == null || fqbTranList.Count == 0 || fqbTranList.Count < dataList.Count) //{ // //查询历史库 // List<ProjectFQBExTransferInfo> fqbTranList2 = TuanDai.DB.TuanDaiDB.Query<ProjectFQBExTransferInfo>(TdConfig.ApplicationName, TdConfig.DBWePlanRead, strSQL, ref dyParams); // if (fqbTranList2 != null) // { // if (fqbTranList == null) // fqbTranList = new List<ProjectFQBExTransferInfo>(); // fqbTranList.AddRange(fqbTranList2); // } //} string subids = ""; if (subIdList != null && subIdList.Count > 0) { foreach (var subid in subIdList) { if (string.IsNullOrEmpty(subids)) { subids = subid.ToUpper(); } else { subids += "," + subid.ToUpper(); } } } List <ProjectFQBExTransferInfo> fqbTranList = GetTranList(subids); if (fqbTranList != null && fqbTranList.Any()) { foreach (var item in dataList) { ProjectFQBExTransferInfo findObj = fqbTranList.Where(p => p.SubscribeId == item.SubscribeId).FirstOrDefault(); if (findObj != null) { //加开关控制 item.IsHaveTranList = findObj.AddDate > checkDate && findObj.UsedShares > 0; } } } } } } this.Context.Response.Write(JsonConvert.SerializeObject( new { result = totalCount > 0 ? 1 : 0, totalcount = totalCount, msg = dataList })); this.Context.Response.End(); }
private bool GetData() { //获取项目信息 if (GlobalUtils.IsRedis && GlobalUtils.IsWePlanRedis) { this.model = new WeProductBLL().GetWePlanByRedis(TypeId, projectId.Value, IsPreSell, TdConfig.ApplicationName); } else { this.model = bll.GetWeProductInfo(projectId.Value); } if (model == null || model.IsFTB == false) { return(false); } #region 判断满标 if (model.StartDate > DateTime.Now && model.StatusId == 1) { IsWeFinish = false; } else if (model.StartDate < DateTime.Now && model.OrderQty != model.TotalQty) { IsWeFinish = false; } else { IsWeFinish = true; } #endregion #region 判断新手标 if (!model.IsNewHand) { WeFTBBLL ftbll = new WeFTBBLL(); FTBRateList = this.GetWeFTBRateList(model.ProductTypeId ?? 0, model.StartDate ?? DateTime.Today); if (FTBRateList == null) { FTBRateList = new List <WeProductFTBRateInfo>(); } //补充提前退出前几个月的数据 if (FTBRateList.Any()) { WeProductFTBRateInfo firstRate = FTBRateList[0]; List <WeProductFTBRateInfo> tmpList = new List <WeProductFTBRateInfo>(); for (int i = 1; i < model.ExitLockMonth; i++) { tmpList.Add(new WeProductFTBRateInfo() { MonthType = i, ProductTypeId = model.ProductTypeId ?? 0, YearRate = firstRate.YearRate }); } if (tmpList.Any()) { FTBRateList.InsertRange(0, tmpList); } } FTBRateList = FTBRateList.OrderByDescending(p => p.MonthType).ToList(); } #endregion decimal deadLineType = model.DeadType == 1 ? 12 : 365; PreInterestRate = decimal.Parse("10000") * (model.Deadline ?? 0) * ((model.YearRate ?? 0) + (model.TuandaiRedRate ?? 0)) * decimal.Parse("0.01") / deadLineType; EbaoMultiple = int.Parse(Math.Ceiling(model.YearRate.Value / decimal.Parse("2.5")).ToString()); EbaoInterest = GetEbaoMultipleInterest(10000); GetLimitInvestMoney(); WebSettingBLL webSettingBll = new WebSettingBLL(); preSellSet = webSettingBll.GetWebSettingInfo("6F9D3B77-C15C-4A5A-B883-21004E10BE29"); curSellSet = webSettingBll.GetWebSettingInfo("B11558CB-3C6B-4DAD-9D2F-D6D2DE13CCF7"); sellSet518 = webSettingBll.GetWebSettingInfo("5E02F517-E6FC-4451-8232-378377837EC1"); IsPreView1218 = System.Configuration.ConfigurationManager.AppSettings["IsPreView1218"]; if (IsPreView1218 == "1") { preSellSet.Param1Value = DateTime.Today.ToString("yyyy-MM-dd"); preSellSet.Param2Value = DateTime.Today.ToString("yyyy-MM-dd 23:59:59"); } else if (IsPreView1218 == "2") { preSellSet.Param1Value = DateTime.Today.AddDays(-1).ToString("yyyy-MM-dd"); preSellSet.Param2Value = DateTime.Today.AddDays(-1).ToString("yyyy-MM-dd 23:59:59"); curSellSet.Param1Value = DateTime.Today.ToString("yyyy-MM-dd"); curSellSet.Param2Value = DateTime.Today.ToString("yyyy-MM-dd 23:59:59"); } return(true); }
protected bool GetData() { UserBLL userbll = new UserBLL(); //获取项目信息 model = bll.GetProjectDetailInfo(projectId.Value); if (model == null) { Response.Redirect(GlobalUtils.WebURL + "/Member/my_account.aspx"); return(false); } borrowerUserInfo = userbll.GetUserBasicInfoModelById(model.UserId.Value); borrowerUserInfoExt = userbll.GetUserBasicInfoExtInfo(model.UserId.Value); this.GetBorrowerData(); InterestRateNum1 = ToolStatus.DeleteZero(model.InterestRate.Value).Split('.')[0]; InterestRateNum2 = ToolStatus.DeleteZero(model.InterestRate.Value).Contains(".") ? ToolStatus.DeleteZero(model.InterestRate.Value).Split('.')[1] : string.Empty; if (model.Status != 3 && model.Status != 6) { RemainMoney = (int.Parse(ToolStatus.diff(model.TotalShares ?? 0, model.CastedShares ?? 0)) * decimal.Parse(ToolStatus.DeleteZero(model.LowerUnit.Value))).ToString("N2"); } else { RemainMoney = "0"; } 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); List <SubscribeTotalInfo> repaylist = new SubscribeBLL().GetRepaymentInfo(this.projectId.Value); if (repaylist != null && repaylist.Count > 0) { foreach (SubscribeTotalInfo item in repaylist) { switch (item.status) { case 1: repayedAmount = SafeConvert.ToDecimal(item.Amount) + SafeConvert.ToDecimal(item.InterestAmount); break; case 2: overdueAmount = SafeConvert.ToDecimal(item.Amount) + SafeConvert.ToDecimal(item.InterestAmount); break; case 3: duerepayAmount = SafeConvert.ToDecimal(item.Amount) + SafeConvert.ToDecimal(item.InterestAmount); break; } } } string jzsql = "select isnull(AvgNetAssets,0) from VipMonthlyNetAssets with(nolock) where UserId=@UserId and ReportDate=@ReportDate"; var dyParamJZ = new Dapper.DynamicParameters(); dyParamJZ.Add("@UserId", model.UserId.Value); dyParamJZ.Add("@ReportDate", DateTime.Now.AddMonths(-1).ToString("yyyy-MM-01")); this.monthJZ = TuanDai.DB.TuanDaiDB.QueryFirstOrDefault <decimal>(TdConfig.ApplicationName, TdConfig.DBReportWrite, jzsql, ref dyParamJZ); regulaSet = new WebSettingBLL().GetWebSettingInfo("293A1C07-1D90-4D22-ADD4-39E6735DAC06"); InterestModel = TuanDai.PortalSystem.Redis.ProjectRedis.GetProjectInterestMode(model.Type.Value, model.RepaymentType.Value); // 截标时间为NULL时候取审核时间 +4 天 if (model.TenderDate == null) { WebSettingInfo set = new WebSettingBLL().GetWebSettingInfo("3F902315-6986-44FF-9F00-9D420C07FCDA"); if (model.AddDate >= Convert.ToDateTime(set.Param4Value)) { model.TenderDate = Convert.ToDateTime(model.AuditDate == null ? model.AddDate : model.AuditDate).AddDays(2); } else { model.TenderDate = Convert.ToDateTime(model.AuditDate == null ? model.AddDate : model.AuditDate).AddDays(4); } } if (model.AuditDate == null) { model.TenderStartDate = model.AddDate; } else { model.TenderStartDate = model.AuditDate; } return(true); }
protected bool GetData() { UserBLL userbll = new UserBLL(); //获取项目信息 model = bll.GetProjectDetailInfo(projectId.Value); if (model == null) { Response.Redirect(GlobalUtils.WebURL + "/Member/my_account.aspx"); return(false); } if (model.Type.Value != 19) { Response.Redirect(GlobalUtils.WebURL + "/Member/my_account.aspx"); return(false); } WebSettingInfo gylSet = new WebSettingBLL().GetWebSettingInfo("75F593E2-40FF-4777-A6F8-4ED54D39FF70"); if (gylSet.Param2Value.IsEmpty()) { gylSet.Param2Value = "2017-02-10"; } if (model.AddDate >= DateTime.Parse(gylSet.Param2Value)) { DanBaoCompany = "东莞市志诚非融资性担保有限公司"; } switch (model.Rating) { case 1: rating = "<span style=\"color:Green;\">低</span>"; break; case 2: rating = "<span style=\"color:Orange;\">中</span>"; break; case 3: rating = "<span style=\"color:Red;\">高</span>"; break; } GetBorrowUserInfo(); WebSettingBLL setbll = new WebSettingBLL(); //新手加息判断 WebSettingInfo GylSetInfo = setbll.GetWebSettingInfo("5AC96A83-B678-4191-BADB-C39C02DFEBB5"); if (GylSetInfo != null) { GylPlusRate = Tool.StrObj.StrToDecimalDef(GylSetInfo.Param3Value, 0); Day15PlusRate = Tool.StrObj.StrToDecimalDef(GylSetInfo.Param4Value, 0); } if (this.model.DeadType.Value == 2 && (this.model.Deadline == 7 && GylPlusRate > 0) || (this.model.Deadline == 15 && Day15PlusRate > 0)) { IsShowPlusRate = true; } DynamicParameters dyParams; string sql = ""; if (WebUserAuth.IsAuthenticated && IsShowPlusRate) { //判断是否投资新手 sql = "select count(1) from Subscribe with(Nolock) where SubscribeUserId=@userid"; dyParams = new DynamicParameters(); dyParams.Add("@userid", WebUserAuth.UserId.Value); bool IsNewHand = PublicConn.QuerySingle <int>(sql, ref dyParams) == 0; NewHandRate = IsNewHand ? (this.model.Deadline == 7 ? GylPlusRate : Day15PlusRate) : 0; } dyParams = new DynamicParameters(); dyParams.Add("@projectid", projectId); sql = @"select ProjectID,ProjectDesc2,CreditStatus,EnterpriseCredit,OperatingConditions,RoyalRiskAbility from dbo.Project_GYL with(nolock) where ProjectID=@projectid"; ProjectGylInfo = PublicConn.QuerySingle <Project_GYLInfo>(sql, ref dyParams); 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); regulaSet = new WebSettingBLL().GetWebSettingInfo("293A1C07-1D90-4D22-ADD4-39E6735DAC06"); InterestModel = TuanDai.PortalSystem.Redis.ProjectRedis.GetProjectInterestMode(model.Type.Value, model.RepaymentType.Value); //截标时间为NULL时候取审核时间 +5 天 if (model.TenderDate == null) { model.TenderDate = Convert.ToDateTime(model.AuditDate == null ? model.AddDate : model.AuditDate).AddDays(5); } else { model.TenderDate = model.TenderDate; } if (model.AuditDate == null) { model.TenderStartDate = model.AddDate; } else { model.TenderStartDate = model.AuditDate; } return(true); }