using System; using System.Collections.Generic; using CB.Entity; using CB.Interface.Infrastructure; namespace CB.Data { public class TrendChartService { public static bool Save(TrendChartInfo entity) { var ok = DatabaseProvider.GetDbProvider().Save(entity); CB.Cache.CBCache.GetCacheService().RemoveObject(CB.Cache.CacheKeys.TrendChartList); return ok; } public static bool Update(TrendChartInfo entity) { var ok = DatabaseProvider.GetDbProvider().Update(entity); CB.Cache.CBCache.GetCacheService().RemoveObject(CB.Cache.CacheKeys.TrendChartList); return ok; } public static bool Delete(int id) { var ok = DatabaseProvider.GetDbProvider().Delete(id); CB.Cache.CBCache.GetCacheService().RemoveObject(CB.Cache.CacheKeys.TrendChartList); return ok; } public static TrendChartInfo Get(int id) { return DatabaseProvider.GetDbProvider().Get(id); } public static TrendChartInfo Get(TrendChartInfo entity) { return DatabaseProvider.GetDbProvider().Get(entity); } public static IList ToList() { return DatabaseProvider.GetDbProvider().ToList(); } public static IList ToList(TrendChartInfo entity) { return DatabaseProvider.GetDbProvider().ToList(entity); } public static IList ToPaging(TrendChartInfo entity, int pageSize, int pageIndex, out int recordCount) { return DatabaseProvider.GetDbProvider().ToPaging(entity, pageSize, pageIndex, out recordCount); } /// /// 更新走势图表智能推荐关联 /// /// /// public static void UpdateTrendSmart(int startId, int endId) { DatabaseProvider.GetDbProvider().UpdateTrendSmart(startId, endId); } /// /// 获取关联的走势图表信息 /// /// 走势图ID /// /// public static IList GetTrendSmartList(int chartId, int topSize) { return DatabaseProvider.GetDbProvider().GetTrendSmartList(chartId, topSize); } } }