/// <summary>
 /// 获取最后交易日记录
 /// </summary>
 /// <returns></returns>
 public QH_LastTradingDay GetCacheQH_LastTradingDayByID(int id)
 {
     return(qh_LastTradingDay.GetByKey(id));
 }
 /// <summary>
 /// 根据商品Code获取港股信息实体
 /// </summary>
 /// <param name="code">代码</param>
 /// <returns></returns>
 public HK_Commodity GetCacheHKCommodityByCode(string code)
 {
     return(hk_commodity.GetByKey(code));
 }
 /// <summary>
 /// 根据品种类型获取所有商品代码列表(目前此列表只缓存了期货的代码)
 /// </summary>
 /// <param name="breedClassID">代码</param>
 /// <returns></returns>
 public List <CM_Commodity> GetCacheCommodityByBreedClassID(int breedClassID)
 {
     return(commotityQHByBreedClassID.GetByKey(breedClassID));;
 }
 /// <summary>
 /// 根据主键商品类别ID获取期货交易规则
 /// </summary>
 /// <param name="breedClassID"></param>
 /// <returns></returns>
 public QH_FuturesTradeRules GetCacheQH_FuturesTradeRulesByKey(int breedClassID)
 {
     return(qh_FuturesTradeRules.GetByKey(breedClassID));
 }
 /// <summary>
 /// 根据主键(交易所ID和非交易日期)获取此非交易日期
 /// 因为这里缓存时是以所ID+@+非交易日期来缓存的
 /// </summary>
 /// <returns></returns>
 public CM_NotTradeDate GetCacheNotTradeDateByKey(string key)
 {
     return(cm_notTradeDate.GetByKey(key));
 }
 /// <summary>
 /// 根据主键(交易所ID)ID获取交易所实体
 /// </summary>
 /// <param name="bourseTypeID">主键</param>
 /// <returns></returns>
 public CM_BourseType GetCacheCM_BourseTypeByKey(int bourseTypeID)
 {
     return(bourseTypes.GetByKey(bourseTypeID));
 }
 /// <summary>
 /// 根据交易所ID(即主键)获取此交易所的所有交易时间
 /// 因为这里缓存时是以交易所ID来缓存的
 /// </summary>
 /// <returns></returns>
 public List <CM_TradeTime> GetCacheCM_TradeTimeByBourseID(int bourseID)
 {
     return(tradeTimes.GetByKey(bourseID));
 }
 /// <summary>
 /// 根据ID获取现货上下限(涨跌幅)类型
 /// </summary>
 /// <param name="breedClassHighLowID">涨跌幅类型id即breedClassHighLowID</param>
 /// <returns></returns>
 public XH_SpotHighLowControlType GetCacheXH_SpotHighLowControlTypeByKey(int breedClassHighLowID)
 {
     return(xh_SpotHighLowControlType.GetByKey(breedClassHighLowID));
 }
        ///// <summary>
        ///// 8.获取交易规则上下限范围值列表
        ///// </summary>
        ///// <returns></returns>
        //public List<CM_FieldRange> GetCacheCM_FileldRange()
        //{
        //    return fieldRanages.GetAll();
        //}
        #endregion

        #region 9.根据品种ID和范围ID获取现货交易规则_最小变动价位_范围_值
        ///// <summary>
        ///// 根据主键获取现货交易规则_最小变动价位_范围_值
        ///// </summary>
        ///// <param name="breedClassID">品种id</param>
        ///// <param name="fieldRangeID">范围id</param>
        ///// <returns></returns>
        //public XH_MinChangePriceValue GetCacheMinChangePriceValueByKey(int breedClassID, int fieldRangeID)
        //{
        //    return minChangePriceValues.GetByKey(breedClassID.ToString() + "@" + fieldRangeID.ToString());
        //}
        #endregion

        #region 10.根据商品类别ID获取商品类型实体
        /// <summary>
        /// 根据商品类别ID获取商品类型实体
        /// </summary>
        /// <param name="breedClassID"></param>
        /// <returns></returns>
        public CM_BreedClass GetCacheCM_BreedClassByKey(int breedClassID)
        {
            return(breedClasss.GetByKey(breedClassID));
        }
 /// <summary>
 /// 根据ID获取有效申报类型
 /// </summary>
 /// <param name="breedClassValidID">有效申报id即BreedClassValidID</param>
 /// <returns></returns>
 public XH_ValidDeclareType GetCacheXH_ValideDeclareTypeByID(int breedClassValidID)
 {
     return(validDeclareTypes.GetByKey(breedClassValidID));
 }
 /// <summary>
 /// 根据主键商品类别ID获取现货交易规则
 /// </summary>
 /// <param name="breedClassID"></param>
 /// <returns></returns>
 public XH_SpotTradeRules GetCacheXH_SpotTradeRulesByKey(int breedClassID)
 {
     return(spotTradeRules.GetByKey(breedClassID));
 }
 /// <summary>
 /// 根据商品代码获取是增发股实体
 /// </summary>
 /// <param name="code">代码</param>
 /// <returns></returns>
 public ZFInfo GetCacheZFInfoByCode(string code)
 {
     return(zFCommodity.GetByKey(code));
 }
 /// <summary>
 /// 根据商品Code获取商品信息实体
 /// </summary>
 /// <param name="code">代码</param>
 /// <returns></returns>
 public CM_Commodity GetCacheCommodityByCode(string code)
 {
     return(commotity.GetByKey(code));
 }
 /// <summary>
 /// 根据商品代码获取缓存表中的熔断实体
 /// </summary>
 /// <returns></returns>
 public CM_CommodityFuse GetCacheCommodityFuseByCode(string code)
 {
     return(commodityFuses.GetByKey(code));
 }