using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace IStation.Application { /// /// 数据对接标准缓存辅助类 /// public class DataDockingStandardCacheHelper { private static Dictionary> _dict = null; /// /// 设置缓存 /// public static void SetCache(long corpId, List cache) { if (_dict == null) { _dict = new Dictionary>(); } if (_dict.ContainsKey(corpId)) { _dict[corpId] = cache; } else { _dict.Add(corpId,cache); } } /// /// 获取缓存 /// public static List GetCache(long corpId) { if (_dict == null) return default; if (!_dict.ContainsKey(corpId)) return default; var cache= _dict[corpId]; if (cache == null || cache.Count < 1) return default; return cache; } } }