using LeaRun.Application.Busines.BaseManage; using LeaRun.Application.Entity.BaseManage; using LeaRun.Cache.Factory; using System.Collections.Generic; using System.Data; using System.Linq; namespace LeaRun.Application.Cache { /// /// 版 本 6.1 /// Copyright (c) 2013-2016 上海力软信息技术有限公司 /// 创建人:佘赐雄 /// 日 期:2016.3.4 9:56 /// 描 述:职位信息缓存 /// public class JobCache { private JobBLL busines = new JobBLL(); /// /// 职位列表 /// /// public IEnumerable GetList() { var cacheList = CacheFactory.Cache().GetCache>(busines.cacheKey); if (cacheList == null) { var data = busines.GetList(); CacheFactory.Cache().WriteCache(data, busines.cacheKey); return data; } else { return cacheList; } } /// /// 职位列表 /// /// 公司Id /// public IEnumerable GetList(string organizeId) { var data = this.GetList(); if (!string.IsNullOrEmpty(organizeId)) { data = data.Where(t => t.OrganizeId == organizeId); } return data; } } }