using System; using System.Collections.Generic; using System.Linq; using System.Text; using CB.Cache; using CB.Entity; namespace CB.Data { public partial class Caches { /// /// 走势图项配置 /// /// public static IList GetTrendChartItemList() { var cache = CBCache.GetCacheService(); IList list = cache.GetObject(CacheKeys.TrendChartItemList) as IList; if (null == list) { list = TrendChartItemService.ToList(); cache.AddObject(CacheKeys.TrendChartItemList, list); } return list; } /// /// 获取走势图项配置 /// /// /// /// public static IList GetTrendChartItemList(int chartId, TrendChartType chartType) { var list = GetTrendChartItemList(); if (null == list || 0 >= list.Count) return null; IList r = new List(); foreach (var item in list) { if (chartId == item.ChartId && chartType == item.ChartType) r.Add(item); } return r; } } }