public async Task <IActionResult> PhoneCheckversionNew([FromServices] IServiceProxyProvider _serviceProxyProvider, LotteryServiceRequest entity) { try { SchemeSource Type = entity.SourceCode; if (Type == SchemeSource.NewAndroid) { var AKey = "ANDRIOD_PhoneCheckversionNew_V2"; var AValue = await GetAppConfigByKey(_serviceProxyProvider, AKey); return(Json(new LotteryServiceResponse { Code = ResponseCode.成功, Message = "查询配置成功", MsgId = entity.MsgId, Value = JsonHelper.Deserialize <object>(AValue) })); } else if (Type == SchemeSource.NewIphone) { var IKey = "IOS_PhoneCheckversionNew_V2"; var IValue = await GetAppConfigByKey(_serviceProxyProvider, IKey); return(Json(new LotteryServiceResponse { Code = ResponseCode.成功, Message = "查询配置成功", MsgId = entity.MsgId, Value = JsonHelper.Deserialize <object>(IValue) })); } else { return(Json(new LotteryServiceResponse { Code = ResponseCode.成功, Message = "查询配置成功", MsgId = entity.MsgId, Value = "" })); } } catch (Exception ex) { return(Json(new LotteryServiceResponse { Code = ResponseCode.失败, Message = "查询配置失败" + "●" + ex.ToString(), MsgId = entity.MsgId, Value = ex.ToGetMessage() })); } }
/// <summary> /// 转换订单来源名称 /// </summary> /// <param name="source">订单来源</param> /// <returns>订单来源名称</returns> public static string SchemeSourceName(SchemeSource source) { switch (source) { case SchemeSource.Iphone: return("iPhone"); case SchemeSource.Android: return("Android"); case SchemeSource.Web: return("Site"); case SchemeSource.Wap: return("Wap"); default: return("Site"); } }
public A20141203GiveLottery GetA20141203GiveLottery(string userId, SchemeSource schemeSource) { return(Session.Query <A20141203GiveLottery>().FirstOrDefault(s => s.UserId == userId && s.ActivityType == schemeSource)); }
public C_Sports_Order_Running AddRunningOrderAndOrderDetail(string schemeId, SchemeBettingCategory category, string gameCode, string gameType, string playType, bool stopAfterBonus, string issuseNumber, int amount, int betCount, int totalMatchCount, decimal totalMoney, DateTime stopTime, SchemeSource schemeSource, TogetherSchemeSecurity security, SchemeType schemeType, bool canChase, bool isVirtualOrder, string userId, string userAgent, DateTime betTime, ActivityType activityType, string attach, bool isAppend, decimal redBagMoney, ProgressStatus progressStatus, TicketStatus ticketStatus) { //if (DateTime.Now >= stopTime) if (betTime >= stopTime) { throw new LogicException(string.Format("订单结束时间是{0},订单不能投注。", stopTime.ToString("yyyy-MM-dd HH:mm"))); } var sportsManager = new Sports_Manager(); if (new string[] { "JCZQ", "JCLQ" }.Contains(gameCode)) { issuseNumber = DateTime.Now.ToString("yyyy-MM-dd"); } DateTime?ticketTime = null; if (ticketStatus == TicketStatus.Ticketed) { ticketTime = DateTime.Now; } DateTime createtime = DateTime.Now; if (betTime != null && betTime.ToString() != "0001/1/1 0:00:00") { createtime = betTime; } else { betTime = DateTime.Now; } betTime = createtime; var order = new C_Sports_Order_Running { AfterTaxBonusMoney = 0M, AgentId = userAgent, Amount = amount, BonusStatus = (int)BonusStatus.Waitting, CanChase = canChase, IsVirtualOrder = isVirtualOrder, IsPayRebate = false, RealPayRebateMoney = 0M, TotalPayRebateMoney = 0M, CreateTime = createtime, GameCode = gameCode, GameType = gameType, IssuseNumber = issuseNumber, PlayType = playType, PreTaxBonusMoney = 0M, ProgressStatus = (int)progressStatus, SchemeId = schemeId, SchemeType = (int)schemeType, SchemeBettingCategory = (int)category, TicketId = string.Empty, TicketLog = string.Empty, TicketStatus = (int)ticketStatus, TotalMatchCount = totalMatchCount, TotalMoney = totalMoney, SuccessMoney = totalMoney, UserId = userId, StopTime = stopTime, SchemeSource = (int)schemeSource, BetCount = betCount, BonusCount = 0, HitMatchCount = 0, RightCount = 0, Error1Count = 0, Error2Count = 0, MaxBonusMoney = 0, MinBonusMoney = 0, Security = (int)security, TicketGateway = string.Empty, TicketProgress = 1M, BetTime = betTime, ExtensionOne = string.Format("{0}{1}", "3X1_", (int)activityType), Attach = string.IsNullOrEmpty(attach) ? string.Empty : attach.ToUpper(), QueryTicketStopTime = stopTime.AddMinutes(1).ToString("yyyyMMddHHmm"), IsAppend = isAppend, RedBagMoney = redBagMoney, IsSplitTickets = ticketStatus == TicketStatus.Ticketed, TicketTime = ticketTime, }; sportsManager.AddSports_Order_Running(order); //订单总表信息 var orderDetail = new C_OrderDetail { AfterTaxBonusMoney = 0M, AgentId = userAgent, BonusStatus = (int)BonusStatus.Waitting, // ComplateTime = null, CreateTime = createtime, CurrentBettingMoney = ticketStatus == TicketStatus.Ticketed ? totalMoney : 0M, GameCode = gameCode, GameType = gameType, GameTypeName = BettingHelper.FormatGameType(gameCode, gameType), PreTaxBonusMoney = 0M, ProgressStatus = (int)progressStatus, SchemeId = schemeId, SchemeSource = (int)schemeSource, SchemeType = (int)schemeType, SchemeBettingCategory = (int)category, StartIssuseNumber = issuseNumber, StopAfterBonus = stopAfterBonus, TicketStatus = (int)ticketStatus, TotalIssuseCount = 1, TotalMoney = totalMoney, UserId = userId, CurrentIssuseNumber = issuseNumber, IsVirtualOrder = isVirtualOrder, PlayType = playType, Amount = amount, AddMoney = 0M, BetTime = betTime, IsAppend = isAppend, RedBagMoney = redBagMoney, BonusAwardsMoney = 0M, RealPayRebateMoney = 0M, RedBagAwardsMoney = 0M, TotalPayRebateMoney = 0M, TicketTime = ticketTime, }; new SchemeManager().AddOrderDetail(orderDetail); return(order); }