/// <summary> /// 根据订单处理充值 /// </summary> /// <param name="OrderNo">订单号</param> /// <returns>返回处理结果</returns> public string PayManager(string OrderNo) { GameUserServers gus = new GameUserServers(); OrdersServers os = new OrdersServers(); LotteryManager lm = new LotteryManager(); Orders o = os.GetOrder(OrderNo); if (o.PayTypeId == 7) { if (gus.UpdateUserMoney(o.AdminUserName, o.PayMoney * 10, "-")) { if (os.UpdateOrder(OrderNo)) { } else { return "更新订单状态失败!"; } } else { return "扣除平台币失败!"; } } if (o.PayTypeId != 6) { lm.AddUserPoints(o.UserName, o.PayMoney); } if (o.Type == 1) { Games g = new Games(); g = gss.GetGame(o.GameId); switch (g.GameNo) { case "dxz": return new Game_Dxz().Pay(OrderNo); case "sjsg": return new Game_Sjsg().Pay(OrderNo); case "tj": return new Game_Tj().Pay(OrderNo); case "nz": return new Game_Nz().Pay(OrderNo); case "djj": return new Game_Djj().Pay(OrderNo); case "jlc": return new Game_Jlc().Pay(OrderNo); case "ly": return new Game_Ly().Pay(OrderNo); case "xyb": return new Game_Xyb().Pay(OrderNo); case "dhz": return new Game_Dhz().Pay(OrderNo); case "wz": return new Game_Wz().Pay(OrderNo); case "dpqk": return new Game_Dpqk().Pay(OrderNo); case "lm": return new Game_Lm().Pay(OrderNo); case "mxqy": return new Game_Mxqy().Pay(OrderNo); case "zsg": return new Game_Zsg().Pay(OrderNo); case "rxhzw": return new Game_Rxhzw().Pay(OrderNo); case "klsg": return new Game_Klsg().Pay(OrderNo); case "gjqx": return new Game_Gjqx().Pay(OrderNo); case "txj": return new Game_Txj().Pay(OrderNo); case "wdqk": return new Game_Wdqk().Pay(OrderNo); case "chcq": return new Game_Chcq().Pay(OrderNo); case "jjsg": return new Game_Jjsg().Pay(OrderNo); case "qh": return new Game_Qh().Pay(OrderNo); case "yjxy": return new Game_Yjxy().Pay(OrderNo); case "xxas": return new Game_Xxas().Pay(OrderNo); case "tgzt": return new Game_Tgzt().Pay(OrderNo); case "nslm": return new Game_Nslm().Pay(OrderNo); case "ftz": return new Game_Ftz().Pay(OrderNo); case "sbcs": return new Game_Sbcs().Pay(OrderNo); case "zwj": return new Game_Zwj().Pay(OrderNo); case "dqqyz": return new Game_Dqqyz().Pay(OrderNo); case "yxy": return new Game_Yxy().Pay(OrderNo); case "jhwj": return new Game_Jhwj().Pay(OrderNo); default: return "不存在的游戏!"; } } else { if (gus.UpdateUserMoney(o.UserName, o.PayMoney * 10, "+")) { if (os.UpdateOrder(o.OrderNo)) { return "充值成功!"; } else { return "充值失败!错误原因:更新订单状态失败!"; } } else { return "充值失败!"; } } }
/// <summary> /// 根据订单处理充值 /// </summary> /// <param name="OrderNo">订单号</param> /// <returns>返回处理结果</returns> public string PayManager(string OrderNo) { GameUserServers gus = new GameUserServers(); OrdersServers os = new OrdersServers(); LotteryManager lm = new LotteryManager(); Orders o = os.GetOrder(OrderNo); if (o.PayTypeId == 7) { if (gus.UpdateUserMoney(o.AdminUserName, o.PayMoney * 10, "-")) { if (os.UpdateOrder(OrderNo)) { } else { return("更新订单状态失败!"); } } else { return("扣除平台币失败!"); } } if (o.PayTypeId != 6) { lm.AddUserPoints(o.UserName, o.PayMoney); } if (o.Type == 1) { Games g = new Games(); g = gss.GetGame(o.GameId); switch (g.GameNo) { case "dxz": return(new Game_Dxz().Pay(OrderNo)); case "sjsg": return(new Game_Sjsg().Pay(OrderNo)); case "tj": return(new Game_Tj().Pay(OrderNo)); case "nz": return(new Game_Nz().Pay(OrderNo)); case "djj": return(new Game_Djj().Pay(OrderNo)); case "jlc": return(new Game_Jlc().Pay(OrderNo)); case "ly": return(new Game_Ly().Pay(OrderNo)); case "xyb": return(new Game_Xyb().Pay(OrderNo)); case "dhz": return(new Game_Dhz().Pay(OrderNo)); case "wz": return(new Game_Wz().Pay(OrderNo)); case "dpqk": return(new Game_Dpqk().Pay(OrderNo)); case "lm": return(new Game_Lm().Pay(OrderNo)); case "mxqy": return(new Game_Mxqy().Pay(OrderNo)); case "zsg": return(new Game_Zsg().Pay(OrderNo)); case "rxhzw": return(new Game_Rxhzw().Pay(OrderNo)); case "klsg": return(new Game_Klsg().Pay(OrderNo)); case "gjqx": return(new Game_Gjqx().Pay(OrderNo)); case "txj": return(new Game_Txj().Pay(OrderNo)); case "wdqk": return(new Game_Wdqk().Pay(OrderNo)); case "chcq": return(new Game_Chcq().Pay(OrderNo)); case "jjsg": return(new Game_Jjsg().Pay(OrderNo)); case "qh": return(new Game_Qh().Pay(OrderNo)); case "yjxy": return(new Game_Yjxy().Pay(OrderNo)); case "xxas": return(new Game_Xxas().Pay(OrderNo)); case "tgzt": return(new Game_Tgzt().Pay(OrderNo)); case "nslm": return(new Game_Nslm().Pay(OrderNo)); case "ftz": return(new Game_Ftz().Pay(OrderNo)); case "sbcs": return(new Game_Sbcs().Pay(OrderNo)); case "zwj": return(new Game_Zwj().Pay(OrderNo)); case "dqqyz": return(new Game_Dqqyz().Pay(OrderNo)); case "yxy": return(new Game_Yxy().Pay(OrderNo)); case "jhwj": return(new Game_Jhwj().Pay(OrderNo)); default: return("不存在的游戏!"); } } else { if (gus.UpdateUserMoney(o.UserName, o.PayMoney * 10, "+")) { if (os.UpdateOrder(o.OrderNo)) { return("充值成功!"); } else { return("充值失败!错误原因:更新订单状态失败!"); } } else { return("充值失败!"); } } }