123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728 |
- using Business.KJH;
- using Cache;
- using Cache.Cache;
- using Common;
- using JobService;
- using KJH55128_Rec.Business.TrendChart;
- using KJH55128_Rec.ViewModels;
- using Models;
- using Models.Entity.LotteryNumDB;
- using Models.Views;
- using Newtonsoft.Json;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- namespace KJH55128_Rec.Business
- {
- public static class KJApiBLL
- {
- // private static LogHelper log = null;
- static KJApiBLL()
- {
- JobMange jobMange= new JobMange();
- jobMange.JobStart();
- // log = new LogHelper();
- }
- public static List<LotteryData> GetLottery()
- {
- List<LotteryData> list = new List<LotteryData>();
- try
- {
- list = LotteryCache.GetLottery();
- }
- catch (Exception ee)
- {
- LogHelper.Error(typeof(KJApiBLL), ee.Message + "GetLottery");
- }
- return list;
- }
- public static LotteryData GetLottery(string typename)
- {
- return LotteryCache.GetLottery(typename);
- }
- public static KaijiangDetailsEntity GetKaijiangEntity(string type, string id)
- {
- try
- {
- return KJBLL.GetKaijiangEntity(type, id);
- }
- catch (Exception ee)
- {
- LogHelper.Error(typeof(KJApiBLL), ee.Message + ":GetKaijiangEntity(string type, string id)");
- return null;
- }
-
-
- }
- /// <summary>
- /// 获取几天以内的开奖历史数据
- /// </summary>
- /// <param name="lotterytype"></param>
- /// <param name="day"></param>
- /// <returns></returns>
- public static List<LotteryViewModel> GetLotteryList(string lotterytype, int day, int num,
- string order, Dictionary<string, Object> param, int count = 0, Boolean isdesc = true,bool kjhOrsjh = false)
- {
- try
- {
- Dictionary<string, Object> dict = new Dictionary<string, object>();
- List<LotteryData> data = new List<LotteryData>();
- if (day > 0)
- {
- data = LotteryCache.GetLotteryList(lotterytype, day);
- }
- else if (count > 0)
- {
- data = LotteryCache.GetTopNumList(lotterytype, order, count, isdesc);
- }
- else
- {
- data = LotteryCache.GetLotteryList(lotterytype, param);
- }
- List<LotteryViewModel> result = new List<LotteryViewModel>();
- List<LotteryViewModel.LotteryDetail> detaillist = new List<LotteryViewModel.LotteryDetail>();
- for (int i = 0; i < data.Count; i++)
- {
- LotteryViewModel tmp = new LotteryViewModel()
- {
- NextOpenTime = data[i].NextOpenTime,
- MoneyPond = data[i].MoneyPond,
- OpenTime = data[i].OpenTime,
- SkipDate = data[i].SkipDate,
- StartHour = data[i].StartHour,
- StartMinute = data[i].StartMinute,
- MoneyCount = data[i].MoneyCount,
- TimesPerDay = data[i].TimesPerDay,
- RedBall = data[i].RedBall,
- RuleId = data[i].RuleId,
- MenuName = data[i].MenuName,
- LotteryName = data[i].LotteryName,
- KJTime = data[i].KJTime,
- LotteryText = data[i].LotteryText,
- LotteryType = data[i].LotteryType,
- KaiJiHao = data[i].KaiJiHao,
- Interval = data[i].Interval,
- ShiJiHao = data[i].ShiJiHao,
- BallCount = data[i].BallCount,
- BlueBall = data[i].BlueBall,
- DaXiaoZJZ = data[i].DaXiaoZJZ,
- Term = data[i].Term,
- HasLotteryZS = data[i].HasLotteryZS,
- Details = null,
- ID = data[i].ID,
- ZhongZhi = 14,
- HKBall = HongKongHelper.GetHongKongLotteryAttr(data[i].RedBall.ToList())
- };
- var lottery = Enum.Parse(typeof(SCCLottery), data[i].LotteryType);
- var lotteryttext = EnumHelper.GetLotteryText((SCCLottery)lottery);
- tmp.LotteryText = lotteryttext;
- var detials = data[i].Details;
- //tmp.Results = reslist as List<LotteryViewModel.LotteryResults>;
- //开奖详情转换
- if (data[i].ResultsList != null)
- {
- var enumer = data[i].ResultsList.GetEnumerator();
- List<LotteryViewModel.LotteryResults> tmpresult = new List<LotteryViewModel.LotteryResults>();
- while (enumer.MoveNext())
- {
- LotteryViewModel.LotteryResults tmplr = new LotteryViewModel.LotteryResults()
- {
- Count = enumer.Current.Count,
- LevelName = enumer.Current.LevelName,
- Money = enumer.Current.Money
- };
- tmpresult.Add(tmplr);
- }
- tmp.Results = tmpresult;//开奖内容添加进去
- }
- foreach (var item in detials)
- {
- if (item.Label == "大小比")
- {
- tmp.daxiao = item.Value;
- }
- else if (item.Label == "三区比")
- {
- tmp.sanqu = item.Value;
- }
- else if (item.Label == "012路个数比")
- {
- tmp.zotgsb = item.Value;
- }
- else if (item.Label == "大小形态")
- {
- tmp.dxxt = String.Join(",", item.Value.ToCharArray());
- }
- else if (item.Label == "奇偶形态")
- {
- tmp.jioxt = String.Join(",", item.Value.ToCharArray());
- }
- else if (item.Label == "质合比")
- {
- tmp.zihebi = item.Value;
- }
- else if (item.Label == "奇偶比")
- {
- tmp.jio = item.Value;
- }
- else if (item.Label == "跨度")
- {
- tmp.kuadu = item.Value;
- }
- else if (item.Label == "和值")
- {
- tmp.hezhi = item.Value;
- }
- else
- {
- LotteryViewModel.LotteryDetail tmpd = new LotteryViewModel.LotteryDetail()
- {
- Label = item.Label,
- Value = item.Value
- };
- detaillist.Add(tmpd);
- }
- }
- tmp.Details = detaillist;
- detaillist = new List<LotteryViewModel.LotteryDetail>();
- if (lotterytype == SCCLottery.QG_FCSSQ.ToString())
- {
- tmp.shama = @"http://zx.55128.cn/ssq/ssqyc_list/42.htm";
- tmp.danma = @"http://zx.55128.cn/ssq/ssqdm_list/52.htm";
- tmp.zoushi = @"http://www.55128.cn/zs/4_26.htm";
- tmp.gongju = @"http://www.55128.cn/tool/ssq_ss.aspx";
- }
- if (lotterytype == SCCLottery.QG_FC3D.ToString())
- {
- tmp.shama = @"http://zx.55128.cn/3dsm/38.htm";
- tmp.danma = @"http://zx.55128.cn/3ddm/29.htm";
- tmp.zoushi = @"http://www.55128.cn/zs/1_1.htm";
- tmp.gongju = @"http://www.55128.cn/tool/3dss.aspx";
- tmp.yuce = @"http://zx.55128.cn/3d/3dyc_list/15.htm";
- }
- if (lotterytype == SCCLottery.QG_TCP3.ToString())
- {
- tmp.shama = @"http://zx.55128.cn/p3/p3sm_list/40.htm";
- tmp.danma = @"http://zx.55128.cn/p3/p3dm_list/48.htm";
- tmp.zoushi = @"http://www.55128.cn/zs/2_14.htm";
- tmp.gongju = @"http://www.55128.cn/tool/p3ss.aspx";
- tmp.yuce = "http://zx.55128.cn/p3/p3yc_list/23.htm";
- }
- if (lotterytype == SCCLottery.QG_TCDLT.ToString())
- {
- tmp.zoushi = @"http://www.55128.cn/zs/12_96.htm";
- tmp.gongju = @"http://www.55128.cn/tool/dlt_qss.aspx";
- }
- result.Add(tmp);
- }
- return result;
- }
- catch (Exception ee)
- {
- return null;
- }
- }
- public static List<LotteryKaiJiHaoAdShijihaoHModel> GetLotteryListKaiJiHao(string lotterytype, int day, int num, string order, Dictionary<string, Object> param, int count = 0, Boolean isdesc = true)
- {
- var data = GetLotteryList(lotterytype, day, num, order, param, count, isdesc,true);
- if (data== null)
- {
- return new List<LotteryKaiJiHaoAdShijihaoHModel>();
- }
- List<LotteryKaiJiHaoAdShijihaoHModel> list = new List<LotteryKaiJiHaoAdShijihaoHModel>();
- foreach (var item in data)
- {
- KaiJiHaoAdShijihaoHModel kaijianghao = new KaiJiHaoAdShijihaoHModel()
- {
- BallCount = item.BallCount,
- BlueBall = item.BlueBall,
- daxiao = item.daxiao,
- Details = item.Details,
- HasLotteryZS = item.HasLotteryZS,
- hezhi = item.hezhi,
- ID = item.ID,
- jio = item.jio,
- LotteryName = item.LotteryName,
- LotteryText = item.LotteryText,
- LotteryType = item.LotteryType,
- MenuName = item.MenuName,
- NextOpenTime = item.NextOpenTime,
- OpenTime = item.OpenTime,
- RedBall = item.RedBall,
- RuleId = item.RuleId,
- Term = item.Term,
- yuce = item.yuce,
- ZhongZhi = item.ZhongZhi,
- KJTime=item.KJTime
-
- };
- List<LotteryViewModel.LotteryDetail> detaillist = new List<LotteryViewModel.LotteryDetail>();
- KaiJiHaoAdShijihaoHModel kaijihao = new KaiJiHaoAdShijihaoHModel();
- if (!string.IsNullOrEmpty(item.KaiJiHao))
- {
- var ary = Array.ConvertAll<string, int>(item.KaiJiHao.Split(',').ToArray(), s => int.Parse(s));
- var item2 = KJBLL.GetLotteryData(lotterytype, int.Parse(item.Term.ToString()), DateTime.Parse(item.OpenTime), item.ID, ary, null, "", item.KaiJiHao == null ? "" : item.KaiJiHao == null ? "" : item.KaiJiHao, item.ShiJiHao);
- kaijihao = new KaiJiHaoAdShijihaoHModel()
- {
- BallCount = item2.BallCount,
- BlueBall = item2.BlueBall,
- // daxiao = item2.daxiao,
- //Details = item2.Details,
- HasLotteryZS = item2.HasLotteryZS,
- //hezhi = item2.hezhi,
- ID = item2.ID,
- // jio = item2.jio,
- LotteryName = item2.LotteryName,
- LotteryText = item2.LotteryText,
- LotteryType = item2.LotteryType,
- MenuName = item2.MenuName,
- NextOpenTime = item2.NextOpenTime,
- OpenTime = item2.OpenTime,
- RedBall = item2.RedBall,
- RuleId = item2.RuleId,
- Term = item2.Term,
- // yuce = item2.yuce,
- ZhongZhi = 14
- };
- var detials = item2.Details;
- foreach (var itemdetials in detials)
- {
- if (itemdetials.Label == "大小比")
- {
- kaijihao.daxiao = itemdetials.Value;
- }
- else if (itemdetials.Label == "奇偶比")
- {
- kaijihao.jio = itemdetials.Value;
- }
- else if (itemdetials.Label == "和值")
- {
- kaijihao.hezhi = itemdetials.Value;
- }
- else
- {
- LotteryViewModel.LotteryDetail tmpd = new LotteryViewModel.LotteryDetail()
- {
- Label = itemdetials.Label,
- Value = itemdetials.Value
- };
- detaillist.Add(tmpd);
- }
- }
- kaijihao.Details = detaillist;
- }
- detaillist = new List<LotteryViewModel.LotteryDetail>();
- list.Add(new LotteryKaiJiHaoAdShijihaoHModel() { Kaijianghao = kaijianghao, Kaijihao = kaijihao });
- }
- return list;
-
- }
- public static List<LotteryKaiJiHaoAdShijihaoHModel> GetLotteryListShiJiHao(string lotterytype, int day, int num, string order, Dictionary<string, Object> param, int count = 0, Boolean isdesc = true)
- {
- try
- {
- var data = GetLotteryList(lotterytype, day, num, order, param, count, isdesc, true);
- List<LotteryKaiJiHaoAdShijihaoHModel> list = new List<LotteryKaiJiHaoAdShijihaoHModel>();
- foreach (var item in data)
- {
- KaiJiHaoAdShijihaoHModel kaijianghao = new KaiJiHaoAdShijihaoHModel()
- {
- BallCount = item.BallCount,
- BlueBall = item.BlueBall,
- daxiao = item.daxiao,
- Details = item.Details,
- HasLotteryZS = item.HasLotteryZS,
- hezhi = item.hezhi,
- ID = item.ID,
- jio = item.jio,
- LotteryName = item.LotteryName,
- LotteryText = item.LotteryText,
- LotteryType = item.LotteryType,
- MenuName = item.MenuName,
- NextOpenTime = item.NextOpenTime,
- OpenTime = item.OpenTime,
- RedBall = item.RedBall,
- RuleId = item.RuleId,
- Term = item.Term,
- yuce = item.yuce,
- ZhongZhi = item.ZhongZhi,
- KJTime = item.KJTime
- };
- KaiJiHaoAdShijihaoHModel shijihao = new KaiJiHaoAdShijihaoHModel();
- List<LotteryViewModel.LotteryDetail> detaillist = new List<LotteryViewModel.LotteryDetail>();
- if (!string.IsNullOrEmpty(item.ShiJiHao))
- {
- var ary = Array.ConvertAll<string, int>(item.ShiJiHao.Split(',').ToArray(), s => int.Parse(s));
- var item2 = KJBLL.GetLotteryData(lotterytype, int.Parse(item.Term.ToString()), DateTime.Parse(item.OpenTime), item.ID, ary, null, "", item.KaiJiHao == null ? "" : item.KaiJiHao == null ? "" : item.KaiJiHao, item.ShiJiHao);
- shijihao = new KaiJiHaoAdShijihaoHModel()
- {
- BallCount = item2.BallCount,
- BlueBall = item2.BlueBall,
- // daxiao = item2.daxiao,
- //Details = item2.Details,
- HasLotteryZS = item2.HasLotteryZS,
- //hezhi = item2.hezhi,
- ID = item2.ID,
- // jio = item2.jio,
- LotteryName = item2.LotteryName,
- LotteryText = item2.LotteryText,
- LotteryType = item2.LotteryType,
- MenuName = item2.MenuName,
- NextOpenTime = item2.NextOpenTime,
- OpenTime = item2.OpenTime,
- RedBall = item2.RedBall,
- RuleId = item2.RuleId,
- Term = item2.Term,
- // yuce = item2.yuce,
- ZhongZhi = 14
- };
- var detials = item2.Details;
- foreach (var itemdetials in detials)
- {
- if (itemdetials.Label == "大小比")
- {
- shijihao.daxiao = itemdetials.Value;
- }
- else if (itemdetials.Label == "奇偶比")
- {
- shijihao.jio = itemdetials.Value;
- }
- else if (itemdetials.Label == "和值")
- {
- shijihao.hezhi = itemdetials.Value;
- }
- else
- {
- LotteryViewModel.LotteryDetail tmpd = new LotteryViewModel.LotteryDetail()
- {
- Label = itemdetials.Label,
- Value = itemdetials.Value
- };
- detaillist.Add(tmpd);
- }
- }
- shijihao.Details = detaillist;
- }
- detaillist = new List<LotteryViewModel.LotteryDetail>();
- list.Add(new LotteryKaiJiHaoAdShijihaoHModel() { Kaijianghao = kaijianghao, Shijihao = shijihao });
- }
- return list;
- }
- catch (Exception ee)
- {
- LogHelper.Error(typeof(KJApiBLL), ee.Message + "GetLotteryListShiJiHao");
- return null;
- }
- }
- /// <summary>
- /// 彩票类型集合
- /// </summary>
- /// <returns></returns>
- public static List<LotteryType> TypeList()
- {
- try
- {
- List<LotteryType> list = new List<LotteryType>();
- list = LotteryCache.GetLotteryType();
- return list;
- }
- catch (Exception ee)
- {
- LogHelper.Error(typeof(KJApiBLL), ee.Message + ":TypeList");
- return null;
- }
-
- }
- /// <summary>
- /// 彩种集合(包括倒计时、推荐链接)
- /// </summary>
- /// <param name="types">筛选彩种</param>
- /// <returns>得到筛选彩种集合</returns>
- public static List<LotteryData> GetLotteryAdTJ(List<string> types)
- {
- try
- {
- List<LotteryData> list = new List<LotteryData>();
- var data = LotteryCache.GetLotteryListAdKjTimeCache();
- list = data.Where(w => types.Contains(w.LotteryType)).ToList();
- //添加走势图
- var datadetails = DataItemDetailCache.GetDataItemModelDetailCache();
- for (int i = 0; i < list.Count; i++)
- {
- string type = list[i].LotteryType;
- EnumZXCid typezs;
- if (Enum.TryParse<EnumZXCid>(type, out typezs))
- {
- if (list[i].MenuName == "qgc")
- {
- var tools = TrendChastApiBLL.GetTrendChartChache( (int)typezs,(int)EnumZXTid.工具);
- var zoushis = TrendChastApiBLL.GetTrendChartChache((int)typezs, (int)EnumZXTid.走势图);
- zoushis.AddRange(tools);
- List<TrendChartIem> trs = new List<TrendChartIem>();
- foreach (var item in zoushis)
- {
- if ( !string.IsNullOrEmpty(item.Url) && (!item.Name.Contains("手机")))
- {
- TrendChartIem tmp = new TrendChartIem()
- {
- Text = item.Name,
- UrlStr = item.Url,
- };
- trs.Add(tmp);
- }
-
- }
- list[i].Charts = trs;
- }
- else
- {
- var zoushis = TrendChastApiBLL.GetTrendChartChache((int)typezs, (int)EnumZXTid.走势图);
- List<TrendChartIem> trs = new List<TrendChartIem>();
- foreach (var item in zoushis)
- {
- if (!string.IsNullOrEmpty(item.Url)&&(!item.Name.Contains("手机")))
- {
- TrendChartIem tmp = new TrendChartIem()
- {
- Text = item.Name,
- UrlStr = item.Url,
- };
- trs.Add(tmp);
- }
- }
- list[i].Charts = trs;
- }
- }
- //添加sortcode
- if (ZSlotterType.TypeOfNameDict.Keys.Contains(list[i].LotteryType))
- {
- var sort=datadetails.SingleOrDefault(w => w.ItemValue == ZSlotterType.TypeOfNameDict[list[i].LotteryType]);
- if (sort != null)
- {
- list[i].SortCode = sort.SortCode.Value;
- }
-
- }
- }
- //foreach (string type in types)
- //{
- // LotteryData temp = new LotteryData();
- // temp = data.Find(d => d.LotteryType == type);
- // list.Add(temp);
- //}
- return list.OrderBy(d=>d.SortCode).ToList();
- }
- catch (Exception ee)
- {
- LogHelper.Error(typeof(KJApiBLL), "GetLotteryAdTJ" + ee.Message);
- return null;
- }
- }
- /// <summary>
- /// 某个彩种(包括倒计时、推荐链接)详情
- /// </summary>
- /// <param name="type">筛选彩种code</param>
- /// <returns>得到筛选彩种的详情</returns>
- public static LotteryData GetLotteryAdTJ(string type)
- {
- try
- {
- //LotteryData model = new LotteryData();
- //var data = LotteryCache.GetLotteryListAdKjTimeCache().ToList();
- //model = data.FirstOrDefault(d => d.LotteryType == type);
- //return model;
- return LotteryCache.GetLotteryListAdKjTimeCache(type);
- }
- catch (Exception ee)
- {
- LogHelper.Error(typeof(KJApiBLL), ee.Message + ":GetLotteryAdTJ(string type)");
- return null;
- }
-
- }
- /// <summary>
- /// header数据组装
- /// </summary>
- /// <returns></returns>
- public static List<ViewLotteryType> getHeaderNav()
- {
- List<ViewLotteryType> data = new List<ViewLotteryType>();
- try
- {
- var list = TypeList();
- //全国彩
- //var qgc = list.Where(d => d.MenuName == "qgc")
- // .Select(d => new LotteryItems(d.Name, "qgc", d.TypeCode, d.ZSTypeCode))
- // .ToList();
- ////地方彩
- //var dfc = list.Where(d => d.MenuName == "dfc")
- // .Select(d => new LotteryItems(d.Name, "dfc", d.TypeCode, d.ZSTypeCode))
- // .ToList();
- ////11x5
- //var l11x5 = list.Where(d => d.MenuName == "c11x5")
- // .Select(d => new LotteryItems(d.Name, "gpc", d.TypeCode, d.ZSTypeCode))
- // .ToList();
- ////k3
- //var lk3 = list.Where(d => d.MenuName == "k3")
- // .Select(d => new LotteryItems(d.Name, "gpc", d.TypeCode, d.ZSTypeCode))
- // .ToList();
- ////kl12
- //var lKL12 = list.Where(d => d.MenuName == "kl12")
- // .Select(d => new LotteryItems(d.Name, "gpc", d.TypeCode, d.ZSTypeCode))
- // .ToList();
- ////klsf
- //var lKLSF = list.Where(d => d.MenuName == "klsf")
- // .Select(d => new LotteryItems(d.Name, "gpc", d.TypeCode, d.ZSTypeCode))
- // .ToList();
- ////时时彩
- //var ssc = list.Where(d => d.MenuName == "ssc")
- // .Select(d => new LotteryItems(d.Name, "gpc", d.TypeCode, d.ZSTypeCode))
- // .ToList();
- //其他彩
- //var qtc = list.Where(d => d.MenuName == "qt")
- // .Select(d => new LotteryItems(d.Name, "gpc", d.TypeCode, d.ZSTypeCode))
- // .ToList();
- List<LotteryItems> qgcc = new List<LotteryItems>();
- List<LotteryItems> dfcc = new List<LotteryItems>();
- List<LotteryItems> qtcc = new List<LotteryItems>();
- List<LotteryItems> sscc = new List<LotteryItems>();
- List<LotteryItems> lKLSFc = new List<LotteryItems>();
- List<LotteryItems> lKL12c = new List<LotteryItems>();
- List<LotteryItems> lk3c = new List<LotteryItems>();
- List<LotteryItems> l11x5c = new List<LotteryItems>();
- if (list!=null)
- {
- foreach (var item in list)
- {
- if (item.MenuName== "qgc")
- {
- LotteryItems tmp = new LotteryItems(item.Name, "qgc", item.TypeCode, item.ZSTypeCode);
- qgcc.Add(tmp);
-
- }
- if (item.MenuName == "dfc")
- {
- LotteryItems tmp = new LotteryItems(item.Name, "dfc", item.TypeCode, item.ZSTypeCode);
- dfcc.Add(tmp);
- }
- if (item.MenuName == "c11x5")
- {
- LotteryItems tmp = new LotteryItems(item.Name, "gpc", item.TypeCode, item.ZSTypeCode);
- l11x5c.Add(tmp);
- }
- if (item.MenuName == "k3")
- {
- LotteryItems tmp = new LotteryItems(item.Name, "gpc", item.TypeCode, item.ZSTypeCode);
- lk3c.Add(tmp);
- }
- if (item.MenuName == "kl12")
- {
- LotteryItems tmp = new LotteryItems(item.Name, "gpc", item.TypeCode, item.ZSTypeCode);
- lKL12c.Add(tmp);
- }
- if (item.MenuName == "klsf")
- {
- LotteryItems tmp = new LotteryItems(item.Name, "gpc", item.TypeCode, item.ZSTypeCode);
- lKLSFc.Add(tmp);
- }
- if (item.MenuName == "ssc")
- {
- LotteryItems tmp = new LotteryItems(item.Name, "gpc", item.TypeCode, item.ZSTypeCode);
- sscc.Add(tmp);
- }
- if (item.MenuName == "qt")
- {
- LotteryItems tmp = new LotteryItems(item.Name, "gpc", item.TypeCode, item.ZSTypeCode);
- qtcc.Add(tmp);
- }
- }
- }
- data.Add(new ViewLotteryType("全国彩", "QGC", qgcc));
- data.Add(new ViewLotteryType("地方彩", "DFC", dfcc));
- data.Add(new ViewLotteryType("11选5", "GPC11X5", l11x5c));
- data.Add(new ViewLotteryType("快3", "GPCK3", lk3c));
- data.Add(new ViewLotteryType("快乐十二", "GPCKL12", lKL12c));
- data.Add(new ViewLotteryType("快乐十分", "GPCKLSF", lKLSFc));
- data.Add(new ViewLotteryType("时时彩", "GPCSSC", sscc));
- data.Add(new ViewLotteryType("其他彩种", "GPCQTC", qtcc));
-
- }
- catch (Exception ee)
- {
- LogHelper.Error(typeof(KJApiBLL), ee.Message + ":getHeaderNav");
-
- }
- return data;
- }
- /// <summary>
- /// 获取页面TDK
- /// </summary>
- /// <param name="TDKType"></param>
- /// <returns></returns>
- public static TDKModel GetTDK(string TDKType)
- {
- try
- {
- var query = TDKDataCache.GetTDKId(TDKType);
- if (query != null)
- {
- TDKModel tdk = new TDKModel();
- tdk.Description = query.Description;
- tdk.Keywords = query.Keywords;
- tdk.Title = query.Title;
- tdk.Tags = query.Tags;
- return tdk;
- }
- return null;
- }
- catch (Exception e)
- {
- LogHelper.Error(typeof(KJApiBLL), "GetTDK" + e.Message);
- return null;
- }
-
- }
- }
- }
|