/// <summary> /// 获取物流 /// 不存在或已删除时返回null /// 结果会按物流Id缓存一定时间 /// </summary> /// <param name="logisticsId">物流Id</param> /// <returns></returns> public virtual Database.Logistics GetLogistics(long logisticsId) { return(LogisticsCache.GetOrCreate(logisticsId, () => UnitOfWork.ReadData <Database.Logistics, Database.Logistics>(r => { return r.GetByIdWhereNotDeleted(logisticsId); }), LogisticsCacheTime)); }
/// <summary> /// 获取物流 /// 不存在或已删除时返回null /// 结果会按物流Id缓存一定时间 /// </summary> /// <param name="logisticsId">物流Id</param> /// <returns></returns> public virtual Entities.Logistics GetWithCache(Guid logisticsId) { return(LogisticsCache.GetOrCreate( logisticsId, () => Get(logisticsId), LogisticsCacheTime)); }