public override void WinMoney(blast_bet_orderdetail orderdetail, string winNum) { string antuCode = this.BuildCodes(orderdetail.AnteCodes); bool isWin = false; string[] winarr = winNum.Split(','); if (winarr.Length != 10) { // string tempcode= arr[0]; return; } string[] weiCodes = antuCode.Split('|'); // int sum = int.Parse(winarr[0]) + int.Parse(winarr[1]); // string[] weiCodes = antuCode.Split('|'); int wincount = 0; int index = 0; foreach (var item in weiCodes) { string[] codeList = item.Split(','); string code = winarr[index]; foreach (var item1 in codeList) { if (item1.Trim() == code) { wincount++; break; } } index++; } string userId = orderdetail.userId; decimal winMoney = 0; int orderDetailId = orderdetail.id; // int BonusStatus = 3; if (isWin) { decimal Odds = decimal.Parse(orderdetail.OddsArr.Split(',')[index]); winMoney = decimal.Parse(orderdetail.unitPrices) * Odds * orderdetail.BeiSu * 1; // BonusStatus = 2; } BaseOrderModel bmodel = new BaseOrderModel() { isWin = isWin, winMoney = winMoney, orderDetailId = orderDetailId, userId = userId }; base.buildOrder(this.DB, bmodel); }
public override void WinMoney(blast_bet_orderdetail orderdetail, string winNum) { string antuCode = orderdetail.AnteCodes; bool isWin = false; string[] winarr = winNum.Split(','); if (winarr.Length != 10) { // string tempcode= arr[0]; return; } string one = winarr[0]; string two = winarr[1]; int sum = int.Parse(one) + int.Parse(two); string[] antuArr = antuCode.Split(','); int index = 0; foreach (var item in antuArr) { if (int.Parse(item) == sum) { isWin = true; break; } index++; } string userId = orderdetail.userId; decimal winMoney = 0; int orderDetailId = orderdetail.id; // int BonusStatus = 3; if (isWin) { decimal Odds = decimal.Parse(orderdetail.OddsArr.Split(',')[index]); winMoney = decimal.Parse(orderdetail.unitPrices) * Odds * orderdetail.BeiSu; // BonusStatus = 2; } BaseOrderModel bmodel = new BaseOrderModel() { isWin = isWin, winMoney = winMoney, orderDetailId = orderDetailId, userId = userId }; base.buildOrder(this.DB, bmodel); }
public override void WinMoney(blast_bet_orderdetail orderdetail, string winNum) { string antuCode = this.BuildCodes(orderdetail.AnteCodes); bool isWin = false; string[] arr = winNum.Split(','); if (arr.Length == 10) { string tempcode = arr[0]; if (antuCode.Contains(tempcode.Trim())) { isWin = true; } } string userId = orderdetail.userId; decimal winMoney = 0; int orderDetailId = orderdetail.id; // int BonusStatus = 3; if (isWin) { decimal Odds = decimal.Parse(orderdetail.OddsArr); winMoney = decimal.Parse(orderdetail.unitPrices) * Odds * orderdetail.BeiSu; // BonusStatus = 2; } BaseOrderModel bmodel = new BaseOrderModel() { isWin = isWin, winMoney = winMoney, orderDetailId = orderDetailId, userId = userId }; base.buildOrder(this.DB, bmodel); }
public override void WinMoney(blast_bet_orderdetail orderdetail, string winNum) { string tm = winNum.Split('|')[1]; string zm = winNum.Split('|')[0]; string userId = orderdetail.userId; decimal winMoney = 0; int orderDetailId = orderdetail.id; int BonusStatus = 3; if (tm.Trim() == orderdetail.AnteCodes.Trim()) { decimal Odds = decimal.Parse(orderdetail.OddsArr); winMoney = orderdetail.unitPrice * Odds * orderdetail.BeiSu; BonusStatus = 2; } DB.GetDal <blast_bet_orderdetail>().Update(b => new blast_bet_orderdetail { winNumber = winNum, BonusAwardsMoney = 0, updateTime = DateTime.Now, BonusStatus = BonusStatus //为中奖状态 }, b => b.id == orderDetailId); if (tm.Trim() == orderdetail.AnteCodes.Trim()) { DB.GetDal <blast_member>().Update(b => new blast_member { gameMoney = b.gameMoney + winMoney }, b => b.userId == userId.ToString()); } }
public override void WinMoney(blast_bet_orderdetail orderdetail, string winNum) { string tm = winNum.Split('|')[1]; string zm = winNum.Split('|')[0]; var codeArr = orderdetail.AnteCodes.Trim().Split(','); string userId = orderdetail.userId; int winCount = 0; List <string> winCodeList = new List <string>(); var tp = orderdetail.AnteCodes.Split(','); bool isWin = false; if (tp.Contains(tm)) { //中奖一次 isWin = true; } //故中奖 //计算中奖号码 decimal Odds = decimal.Parse(orderdetail.OddsArr); decimal winMoney = (orderdetail.unitPrice * (Odds - 1) + orderdetail.unitPrice) * orderdetail.BeiSu; int orderDetailId = orderdetail.id; string windesc = string.Join(",", winCodeList); if (isWin) { DB.GetDal <blast_bet_orderdetail>().Update(b => new blast_bet_orderdetail { winNumber = winNum, BonusAwardsMoney = winMoney, updateTime = DateTime.Now, BonusStatus = 2, //为中奖状态 winNumberDesc = windesc }, b => b.id == orderDetailId); } else { DB.GetDal <blast_bet_orderdetail>().Update(b => new blast_bet_orderdetail { //winNumber = winNum, //BonusAwardsMoney = winMoney, updateTime = DateTime.Now, BonusStatus = 3, //为中奖状态 winNumber = winNum, winNumberDesc = windesc }, b => b.id == orderDetailId); } //添加用户金币 加钱 blast_member if (winCount > 0) { DB.GetDal <blast_member>().Update(b => new blast_member { gameMoney = b.gameMoney + winMoney }, b => b.userId == userId.ToString()); } }
public override void WinMoney(blast_bet_orderdetail orderdetail, string winNum) { string tm = winNum.Split('|')[1]; string zm = winNum.Split('|')[0]; var codeArr = orderdetail.AnteCodes.Trim().Split(','); string userId = orderdetail.userId; int winCount = 0; List <string> winCodeList = new List <string>(); string antuCode = orderdetail.AnteCodes; bool isWin = false; switch (antuCode) { case "Red": if (SXHelper.GreenBox.Contains(tm)) { isWin = true; } break; case "Blu": if (SXHelper.BluBox.Contains(tm)) { isWin = true; } break; case "Green": if (SXHelper.GreenBox.Contains(tm)) { isWin = true; } break; case "HeJu": //局 if (int.Parse(tm) == 49) { isWin = true; } break; default: break; } //故中奖 //计算中奖号码 decimal Odds = decimal.Parse(orderdetail.OddsArr); decimal winMoney = orderdetail.unitPrice * (Odds) * orderdetail.BeiSu; int orderDetailId = orderdetail.id; string windesc = string.Join(",", winCodeList); if (isWin) { DB.GetDal <blast_bet_orderdetail>().Update(b => new blast_bet_orderdetail { winNumber = winNum, BonusAwardsMoney = winMoney, updateTime = DateTime.Now, BonusStatus = 2, //为中奖状态 winNumberDesc = "" }, b => b.id == orderDetailId); } else { DB.GetDal <blast_bet_orderdetail>().Update(b => new blast_bet_orderdetail { //winNumber = winNum, //BonusAwardsMoney = winMoney, updateTime = DateTime.Now, BonusStatus = 3, //为中奖状态 winNumber = winNum, winNumberDesc = windesc }, b => b.id == orderDetailId); } //添加用户金币 加钱 blast_member if (isWin) { DB.GetDal <blast_member>().Update(b => new blast_member { gameMoney = b.gameMoney + winMoney }, b => b.userId == userId.ToString()); } }
public override void WinMoney(blast_bet_orderdetail orderdetail, string winNum) { string tm = winNum.Split('|')[1]; string zm = winNum.Split('|')[0]; string AnteCodes = orderdetail.AnteCodes.Trim(); var clist = zm.Split(','); List <string> CoreList = clist.ToList(); CoreList.Add(tm); string userId = orderdetail.userId; int winCount = 0; List <string> winCodeList = new List <string>(); List <XiaoModel> xlist = SXHelper.XiaoCollection12(); List <XiaoModel> countList = new List <XiaoModel>(); foreach (var code in CoreList) { var p = (from b in xlist where b.CodeList.Contains(code) select b).FirstOrDefault(); countList.Add(p); } var count = 0; bool isWin = false; count = countList.DistinctBy(p => p.Index).Count(); switch (AnteCodes) { case "234X": if (count >= 2 & count <= 4) { isWin = true; } break; case "5X": if (count == 5) { isWin = true; } break; case "6X": if (count == 6) { isWin = true; } break; case "7X": if (count == 6) { isWin = true; } break; case "DX": if (count % 2 != 0) { isWin = true; } break; case "SX": if (count % 2 == 0) { isWin = true; } break; default: break; } //故中奖 //计算中奖号码 decimal Odds = decimal.Parse(orderdetail.OddsArr); decimal winMoney = (orderdetail.unitPrice * (Odds - 1) * 1 + orderdetail.unitPrice) * orderdetail.BeiSu; int orderDetailId = orderdetail.id; string windesc = string.Join(",", winCodeList); if (isWin) { DB.GetDal <blast_bet_orderdetail>().Update(b => new blast_bet_orderdetail { winNumber = winNum, BonusAwardsMoney = winMoney, updateTime = DateTime.Now, BonusStatus = 2, //为中奖状态 winNumberDesc = windesc }, b => b.id == orderDetailId); } else { DB.GetDal <blast_bet_orderdetail>().Update(b => new blast_bet_orderdetail { //winNumber = winNum, //BonusAwardsMoney = winMoney, updateTime = DateTime.Now, BonusStatus = 3, //为中奖状态 winNumber = winNum, winNumberDesc = windesc }, b => b.id == orderDetailId); } //添加用户金币 加钱 blast_member if (winCount > 0) { DB.GetDal <blast_member>().Update(b => new blast_member { gameMoney = b.gameMoney + winMoney }, b => b.userId == userId.ToString()); } }
public override void WinMoney(blast_bet_orderdetail orderdetail, string winNum) { string antuCode = orderdetail.AnteCodes; bool isWin = false; string[] winarr = winNum.Split(','); if (winarr.Length != 10) { // string tempcode= arr[0]; return; } string one = winarr[0]; string two = winarr[1]; int sum = int.Parse(one) + int.Parse(two); string codes = winarr[0]; IList <String> anlistCode = new List <string>(); IList <String> unitPricesList = new List <string>(); IList <String> OddsList = new List <string>(); anlistCode.Add(antuCode); unitPricesList.Add(orderdetail.unitPrices); OddsList.Add(orderdetail.OddsArr); if (antuCode.Contains(",")) { anlistCode = antuCode.Split(',').ToList(); } if (orderdetail.unitPrices.Contains(",")) { unitPricesList = orderdetail.unitPrices.Split(','); } if (orderdetail.OddsArr.Contains(",")) { OddsList = orderdetail.OddsArr.Split(','); } decimal winMoney = 0; int index = 0; foreach (var item in anlistCode) { if (item == "01") { if (sum >= 12 && sum <= 19) { isWin = true; winMoney = winMoney + decimal.Parse(unitPricesList[index]) * decimal.Parse(unitPricesList[index]); } } else if (item == "02") { if (sum >= 3 && sum <= 11) { isWin = true; winMoney = winMoney + decimal.Parse(unitPricesList[index]) * decimal.Parse(unitPricesList[index]); } } else if (item == "03") { if (sum % 2 != 0) { isWin = true; winMoney = winMoney + decimal.Parse(unitPricesList[index]) * decimal.Parse(unitPricesList[index]); } } else if (item == "04") { if (sum % 2 == 0) { isWin = true; winMoney = winMoney + decimal.Parse(unitPricesList[index]) * decimal.Parse(unitPricesList[index]); } } index++; } string userId = orderdetail.userId; int orderDetailId = orderdetail.id; int BonusStatus = 3; if (isWin) { // decimal Odds = decimal.Parse(orderdetail.OddsArr.Split(',')[index]); // winMoney = orderdetail.unitPrice * Odds * orderdetail.BeiSu ; BonusStatus = 2; } DB.GetDal <blast_bet_orderdetail>().Update(b => new blast_bet_orderdetail { winNumber = winNum, BonusAwardsMoney = winMoney, updateTime = DateTime.Now, BonusStatus = BonusStatus //为中奖状态 }, b => b.id == orderDetailId); if (isWin) { DB.GetDal <blast_member>().Update(b => new blast_member { gameMoney = b.gameMoney + winMoney }, b => b.userId == userId.ToString()); } }
public override void WinMoney(blast_bet_orderdetail orderdetail, string winNum) { string antuCode = orderdetail.AnteCodes; bool isWin = false; string[] winarr = winNum.Split(','); if (winarr.Length != 10) { // string tempcode= arr[0]; return; } string codes = winarr[0]; switch (orderdetail.playId) { case 76: codes = winarr[0]; break; case 77: codes = winarr[1]; break; case 78: codes = winarr[2]; break; } if (antuCode.Contains(",")) { var antuArr = antuCode.Split(','); foreach (var item in antuArr) { if (item == "03") { if (int.Parse(codes) % 2 != 0) { isWin = true; } } else if (item == "04") { if (int.Parse(codes) % 2 == 0) { isWin = true; } } } } string userId = orderdetail.userId; decimal winMoney = 0; int orderDetailId = orderdetail.id; // int BonusStatus = 3; if (isWin) { decimal Odds = decimal.Parse(orderdetail.OddsArr); winMoney = decimal.Parse(orderdetail.unitPrices) * Odds * orderdetail.BeiSu; //BonusStatus = 2; } BaseOrderModel bmodel = new BaseOrderModel() { isWin = isWin, winMoney = winMoney, orderDetailId = orderDetailId, userId = userId }; base.buildOrder(this.DB, bmodel); }
public override void WinMoney(blast_bet_orderdetail orderdetail, string winNum) { string antuCode = orderdetail.AnteCodes; bool isWin = false; string[] winarr = winNum.Split(','); if (winarr.Length != 10) { // string tempcode= arr[0]; return; } //冠军 string dcodes = winarr[0]; switch (orderdetail.playId) { case 70: dcodes = winarr[0]; break; case 71: dcodes = winarr[1]; break; case 72: dcodes = winarr[2]; break; } List <string> codeList = new List <string>(); if (antuCode.Contains(",")) { var antucodeArr = antuCode.Split(','); foreach (var item in antucodeArr) { switch (item) { case "01": codeList.Add("01"); codeList.Add("02"); break; case "02": codeList.Add("03"); codeList.Add("04"); break; case "03": codeList.Add("05"); codeList.Add("06"); break; case "04": codeList.Add("07"); codeList.Add("08"); break; case "05": codeList.Add("09"); codeList.Add("10"); break; default: break; } } } else { switch (antuCode) { case "01": codeList.Add("01"); codeList.Add("02"); break; case "02": codeList.Add("03"); codeList.Add("04"); break; case "03": codeList.Add("05"); codeList.Add("06"); break; case "04": codeList.Add("07"); codeList.Add("08"); break; case "05": codeList.Add("09"); codeList.Add("10"); break; default: break; } } if (codeList.Contains(dcodes)) { isWin = true; } string userId = orderdetail.userId; decimal winMoney = 0; int orderDetailId = orderdetail.id; if (isWin) { decimal Odds = decimal.Parse(orderdetail.OddsArr); winMoney = decimal.Parse(orderdetail.unitPrices) * Odds * orderdetail.BeiSu; } BaseOrderModel bmodel = new BaseOrderModel() { isWin = isWin, winMoney = winMoney, orderDetailId = orderDetailId, userId = userId }; base.buildOrder(this.DB, bmodel); }
// public abstract string BuildCodes(string content); public static BaseOrderHelper GetOrderHelper(blast_bet_orderdetail orderdetail, IDbProvider DB) { BaseOrderHelper iorder = null; switch (orderdetail.playId) { #region hk6 case 1: iorder = new TeMaOrderHelper(DB); break; case 3: iorder = new ZhengMaOrderHelper(DB); break; case 2: iorder = new LingMianOrderHelper(DB); break; case 39: iorder = new ZhengXiaoOrderHelper(DB); break; case 40: iorder = new TeXiaoOrderHelper(DB); break; case 41: iorder = new YiXiaoOrderHelper(DB); break; case 42: iorder = new ZongXiaoOrderHelper(DB); break; case 44: iorder = new SBSanSeOrderHelper(DB); break; case 45: iorder = new SBBanOrderHelper(DB); break; case 46: iorder = new SBBanBanOrderHelper(DB); break; case 47: iorder = new SBQiSeOrderHelper(DB); break; #endregion #region pk10 case 58: iorder = new QianYiOrderHelper(DB); break; case 59: iorder = new QianErOrderHelper(DB); break; case 60: iorder = new QianSanOrderHelper(DB); break; case 61: iorder = new DingWeiWuOrderHelper(DB); break; case 62: iorder = new DingWeiLiuOrderHelper(DB); break; case 63: iorder = new DingWeiOrderHelper(DB); break; case 64: iorder = new GYHZOrderHelper(DB); break; case 65: case 66: case 67: case 68: case 69: iorder = new LongHuOrderHelper(DB); break; case 70: case 71: case 72: iorder = new WuXingOrderHelper(DB); break; case 73: case 74: case 75: iorder = new DanXiaoOrderHelper(DB); break; case 76: case 77: case 78: iorder = new DanShuanOrderHelper(DB); break; case 79: iorder = new GYHDanXiaoDSOrderHelper(DB); break; #endregion default: break; } return(iorder); }
public abstract void WinMoney(blast_bet_orderdetail orderdetail, string winNum);
public override void WinMoney(blast_bet_orderdetail orderdetail, string winNum) { string tm = winNum.Split('|')[1]; string zm = winNum.Split('|')[0]; string antuCode = orderdetail.AnteCodes; bool isWin = false; int sum = 0; char[] arr = null; List <XiaoModel> xiaoList = new List <XiaoModel>(); XiaoCollectionModel xm = SXHelper.XiaoCollection(); var t = zm.Split(','); sum = 0; foreach (var item in t) { sum += int.Parse(item); } sum += int.Parse(tm); switch (antuCode) { case "TD": //特单 if (int.Parse(tm) % 2 != 0 && int.Parse(tm) != 49) { isWin = true; } break; case "TS": //特双 if (int.Parse(tm) % 2 == 0 && int.Parse(tm) != 49) { isWin = true; } break; case "TDa": //特大 if (int.Parse(tm) > (49 / 2) && int.Parse(tm) != 49) { isWin = true; } break; case "TXiao": //特小 if (int.Parse(tm) < (49 / 2) && int.Parse(tm) != 49) { isWin = true; } break; case "THDan": //特合单 arr = tm.ToCharArray(); sum = 0; foreach (var item in arr) { sum += int.Parse(item + ""); } if (sum % 2 != 0) { isWin = true; } break; case "THShuang": //特合双 arr = tm.ToCharArray(); sum = 0; foreach (var item in arr) { sum += int.Parse(item + ""); } if (sum % 2 == 0) { isWin = true; } break; case "THDa": //特合大 arr = tm.ToCharArray(); sum = 0; foreach (var item in arr) { sum += int.Parse(item + ""); } if (sum > 6 && int.Parse(tm) != 49) { isWin = true; } break; case "THX": //特合小 arr = tm.ToCharArray(); sum = 0; foreach (var item in arr) { sum += int.Parse(item + ""); } if (sum < 7 && int.Parse(tm) != 49) { isWin = true; } break; case "TWDa": //尾大 arr = tm.ToCharArray(); sum = 0; sum = int.Parse(arr[1] + ""); if (sum > 4 && int.Parse(tm) != 49) { isWin = true; } break; case "TWXiao": //尾小 arr = tm.ToCharArray(); sum = 0; sum = int.Parse(arr[1] + ""); if (sum < 5 && int.Parse(tm) != 49) { isWin = true; } break; case "TDXiao": //特地肖 //鼠(11 23 35 47)、虎(09 21 33 45)、蛇(06 18 30 42)、羊(04 16 28 40)、鸡(02 14 26 38)、狗(01 13 25 37 49) xiaoList = (from b in xm.DiXiao where b.CodeList.Contains(tm) select b).ToList(); if (xiaoList.Count > 0) { isWin = true; } break; case "TTXiao": //特地肖 //鼠(11 23 35 47)、虎(09 21 33 45)、蛇(06 18 30 42)、羊(04 16 28 40)、鸡(02 14 26 38)、狗(01 13 25 37 49) xiaoList = (from b in xm.TianXiao where b.CodeList.Contains(tm) select b).ToList(); if (xiaoList.Count > 0) { isWin = true; } break; case "TQXiao": //特前肖 //鼠(11 23 35 47)、虎(09 21 33 45)、蛇(06 18 30 42)、羊(04 16 28 40)、鸡(02 14 26 38)、狗(01 13 25 37 49) xiaoList = (from b in xm.QianXiao where b.CodeList.Contains(tm) select b).ToList(); if (xiaoList.Count > 0) { isWin = true; } break; case "THXiao": //特后肖 //鼠(11 23 35 47)、虎(09 21 33 45)、蛇(06 18 30 42)、羊(04 16 28 40)、鸡(02 14 26 38)、狗(01 13 25 37 49) xiaoList = (from b in xm.HouXiao where b.CodeList.Contains(tm) select b).ToList(); if (xiaoList.Count > 0) { isWin = true; } break; case "TJiaXiao": //特地肖 //鼠(11 23 35 47)、虎(09 21 33 45)、蛇(06 18 30 42)、羊(04 16 28 40)、鸡(02 14 26 38)、狗(01 13 25 37 49) xiaoList = (from b in xm.JiaShou where b.CodeList.Contains(tm) select b).ToList(); if (xiaoList.Count > 0) { isWin = true; } break; case "TYXiao": //特野肖 //鼠(11 23 35 47)、虎(09 21 33 45)、蛇(06 18 30 42)、羊(04 16 28 40)、鸡(02 14 26 38)、狗(01 13 25 37 49) xiaoList = (from b in xm.YeShou where b.CodeList.Contains(tm) select b).ToList(); if (xiaoList.Count > 0) { isWin = true; } break; case "ZongDa": //总单 //鼠(11 23 35 47)、虎(09 21 33 45)、蛇(06 18 30 42)、羊(04 16 28 40)、鸡(02 14 26 38)、狗(01 13 25 37 49) if (sum > 174) { isWin = true; } break; case "ZongXiao": //总单 //鼠(11 23 35 47)、虎(09 21 33 45)、蛇(06 18 30 42)、羊(04 16 28 40)、鸡(02 14 26 38)、狗(01 13 25 37 49) if (sum < 175) { isWin = true; } break; case "ZongDan": //总单 //鼠(11 23 35 47)、虎(09 21 33 45)、蛇(06 18 30 42)、羊(04 16 28 40)、鸡(02 14 26 38)、狗(01 13 25 37 49) if (sum % 2 != 0) { isWin = true; } break; case "ZongShuan": //总单 //鼠(11 23 35 47)、虎(09 21 33 45)、蛇(06 18 30 42)、羊(04 16 28 40)、鸡(02 14 26 38)、狗(01 13 25 37 49) if (sum % 2 == 0) { isWin = true; } break; default: break; } string userId = orderdetail.userId; decimal winMoney = 0; int orderDetailId = orderdetail.id; int BonusStatus = 3; if (isWin) { decimal Odds = decimal.Parse(orderdetail.OddsArr); winMoney = orderdetail.unitPrice * Odds * orderdetail.BeiSu; BonusStatus = 2; } DB.GetDal <blast_bet_orderdetail>().Update(b => new blast_bet_orderdetail { winNumber = winNum, BonusAwardsMoney = winMoney, updateTime = DateTime.Now, BonusStatus = BonusStatus //为中奖状态 }, b => b.id == orderDetailId); if (tm.Trim() == orderdetail.AnteCodes.Trim()) { DB.GetDal <blast_member>().Update(b => new blast_member { gameMoney = b.gameMoney + winMoney }, b => b.userId == userId.ToString()); } }
public override void WinMoney(blast_bet_orderdetail orderdetail, string winNum) { string[] arr = winNum.Split(','); string antuCode = this.BuildCodes(orderdetail.AnteCodes); if (arr.Length != 10) { return; } if (!antuCode.Contains("|")) { return; } string one = ""; string two = ""; string three = ""; string winone = winNum.Split(',')[0]; string wintwo = winNum.Split(',')[1]; string winthree = winNum.Split(',')[2]; bool isWin = false; int winCount = 0; List <string> onelist = new List <string>(); List <string> twolist = new List <string>(); List <string> threelist = new List <string>(); if (antuCode.Contains("|")) { one = antuCode.Split('|')[0]; two = antuCode.Split('|')[1]; winthree = antuCode.Split('|')[2]; } //else { // one = antuCode.Split(',')[0]; // two = antuCode.Split(',')[1]; // three = antuCode.Split(',')[2]; //} onelist.Add(one); if (one.Contains(",")) { onelist = one.Split(',').ToList(); } twolist.Add(two); if (two.Contains(",")) { twolist = two.Split(',').ToList(); } threelist.Add(three); if (three.Contains(",")) { threelist = three.Split(',').ToList(); } foreach (var item in onelist) { if (item.Trim() == winone.Trim()) { foreach (var item2 in twolist) { if (item2.Trim() == wintwo.Trim()) { foreach (var item3 in threelist) { if (item3.Trim() == winthree.Trim()) { winCount++; isWin = true; } } } } } } string userId = orderdetail.userId; decimal winMoney = 0; int orderDetailId = orderdetail.id; // int BonusStatus = 3; if (isWin) { decimal Odds = decimal.Parse(orderdetail.OddsArr); winMoney = decimal.Parse(orderdetail.unitPrices) * Odds * orderdetail.BeiSu * winCount; // BonusStatus = 2; } BaseOrderModel bmodel = new BaseOrderModel() { isWin = isWin, winMoney = winMoney, orderDetailId = orderDetailId, userId = userId }; base.buildOrder(this.DB, bmodel); }
public override void WinMoney(blast_bet_orderdetail orderdetail, string winNum) { string antuCode = orderdetail.AnteCodes; bool isWin = false; string[] winarr = winNum.Split(','); if (winarr.Length != 10) { // string tempcode= arr[0]; return; } //冠军 string dcodes = winarr[0]; switch (orderdetail.playId) { case 65: dcodes = winarr[0]; break; case 66: dcodes = winarr[1]; break; case 67: dcodes = winarr[2]; break; case 68: dcodes = winarr[3]; break; case 69: dcodes = winarr[4]; break; } if (int.Parse(dcodes) > int.Parse(winarr[9]) && antuCode.Contains("01")) { isWin = true; } if (int.Parse(winarr[0]) < int.Parse(winarr[9]) && antuCode.Contains("02")) { isWin = true; } string userId = orderdetail.userId; decimal winMoney = 0; int orderDetailId = orderdetail.id; int BonusStatus = 3; if (isWin) { decimal Odds = decimal.Parse(orderdetail.OddsArr); winMoney = decimal.Parse(orderdetail.unitPrices) * Odds * orderdetail.BeiSu * 0; BonusStatus = 2; } BaseOrderModel bmodel = new BaseOrderModel() { isWin = isWin, winMoney = winMoney, orderDetailId = orderDetailId, userId = userId }; base.buildOrder(this.DB, bmodel); }