/// <summary> /// 数字彩录入 /// </summary> /// <param name="gameName"></param> /// <param name="all"></param> /// <param name="dic"></param> /// <returns></returns> public bool Start(string gameName, ConcurrentDictionary <string, string> all, Dictionary <string, string> dic) { if (all == null) { return(false); } var query = from q in dic where !all.ContainsKey(q.Key) select q; if (query.Count() > 0) { foreach (var item in query)// { // 采集到数据 //导入数据 ILotteryDataBusiness instan = KaSon.FrameWork.ORM.Helper.WinNumber.LotteryDataBusiness.GetTypeImport(gameName);// = new LotteryDataBusiness(); instan.ImportWinNumber(item.Key, item.Value); //奖期派奖 new KJGameIssuseBusiness().IssusePrize(gameName, item.Key, item.Value); } //生成相关静态数据 try { //step 3 生成相关静态数据 var dpc = new string[] { "FC3D", "PL3", "SSQ", "DLT" }; // this.WriteLog("开始生成静态相关数据."); //this.WriteLog("1.生成最新开奖号"); //var log = this.SendBuildStaticFileNotice("401", gameName); //// this.WriteLog("1.生成最新开奖号结果:" + log); ////if (dpc.Contains(gameCode)) ////{ //// this.WriteLog("2.生成开奖结果首页"); //log = this.SendBuildStaticFileNotice("301"); //// this.WriteLog("2.生成开奖结果首页结果:" + log); ////} //// this.WriteLog("3.生成彩种开奖历史"); //log = this.SendBuildStaticFileNotice("302", gameName); //// this.WriteLog("3.生成彩种开奖历史结果:" + log); //// this.WriteLog("4.生成彩种开奖详细"); //log = this.SendBuildStaticFileNotice("303", gameName); //// this.WriteLog("4.生成彩种开奖详细结果:" + log); //if (dpc.Contains(gameName)) //{ // // this.WriteLog("5.生成网站首页"); // log = this.SendBuildStaticFileNotice("10"); // // this.WriteLog("5.生成网站首页结果:" + log); //} //// this.WriteLog("6.生成走势图"); //log = this.SendBuildStaticFileNotice("900", gameName); // this.WriteLog("6.生成走势图结果:" + log); // this.WriteLog("生成静态相关数据完成."); } catch (Exception ex) { // this.WriteLog("生成静态数据异常:" + ex.Message); return(false); } return(true); } return(false); }
public static ILotteryDataBusiness GetTypeImport(string gameCode) { ILotteryDataBusiness biz = null; try { switch (gameCode) { case "SSQ": biz = new LotteryDataBusiness_SSQ(); break; case "HK6": biz = new LotteryDataBusiness_HK6(); break; case "DLT": biz = new LotteryDataBusiness_DLT(); break; case "FC3D": biz = new LotteryDataBusiness_FC3D(); break; case "PL3": biz = new LotteryDataBusiness_PL3(); break; case "CQSSC": biz = new LotteryDataBusiness_CQSSC(); break; case "JX11X5": biz = new LotteryDataBusiness_JX11X5(); break; case "CQ11X5": biz = new LotteryDataBusiness_CQ11X5(); break; case "CQKLSF": biz = new LotteryDataBusiness_CQKLSF(); break; case "DF6J1": biz = new LotteryDataBusiness_DF6_1(); break; case "GD11X5": biz = new LotteryDataBusiness_GD11X5(); break; case "GDKLSF": biz = new LotteryDataBusiness_GDKLSF(); break; case "HBK3": biz = new LotteryDataBusiness_HBK3(); break; case "HC1": biz = new LotteryDataBusiness_HC1(); break; case "HD15X5": biz = new LotteryDataBusiness_HD15X5(); break; case "HNKLSF": biz = new LotteryDataBusiness_HNKLSF(); break; case "JLK3": biz = new LotteryDataBusiness_JLK3(); break; case "JSKS": biz = new LotteryDataBusiness_JSK3(); break; case "JXSSC": biz = new LotteryDataBusiness_JXSSC(); break; case "LN11X5": biz = new LotteryDataBusiness_LN11X5(); break; case "PL5": biz = new LotteryDataBusiness_PL5(); break; case "QLC": biz = new LotteryDataBusiness_QLC(); break; case "QXC": biz = new LotteryDataBusiness_QXC(); break; case "SDQYH": biz = new LotteryDataBusiness_SDQYH(); break; case "SD11X5": biz = new LotteryDataBusiness_YDJ11(); break; case "SDKLPK3": biz = new LotteryDataBusiness_SDKLPK3(); break; case "CTZQ_T14C": case "CTZQ_TR9": case "CTZQ_T6BQC": case "CTZQ_T4CJQ": biz = new LotteryDataBusiness_CTZQ(gameCode); break; default: throw new Exception(string.Format("未找到匹配的接口:{0}", gameCode)); } // biz.ImportWinNumber(issuseNumber, winNumber); // return new CommonActionResult(true, "导入成功"); } catch (Exception ex) { // return new CommonActionResult(false, "导入失败 " + ex.ToString()); } return(biz); }