Esempio n. 1
0
        /// <summary>
        /// 新品上市
        /// </summary>
        /// <param name="MerchantSysNo"></param>
        /// <param name="C1SysNo"></param>
        /// <param name="count"></param>
        /// <param name="languageCode"></param>
        /// <param name="companyCode"></param>
        /// <returns></returns>
        public static List <RecommendProduct> QueryStoreNewRecommendProduct(
            int MerchantSysNo,
            string CategoryCode,
            int count,
            string languageCode = "zh-CN",
            string companyCode  = "8601")
        {
            string cacheKey = CommonFacade.GenerateKey("QueryStoreNewRecommendProduct", languageCode, companyCode, MerchantSysNo.ToString());

            if (HttpRuntime.Cache[cacheKey] != null)
            {
                return((List <RecommendProduct>)HttpRuntime.Cache[cacheKey]);
            }

            List <RecommendProduct> result = StoreDA.QueryStoreNewRecommendProduct(MerchantSysNo, CategoryCode, count, languageCode, companyCode);

            HttpRuntime.Cache.Insert(cacheKey, result, null, DateTime.Now.AddSeconds(CacheTime.Long), Cache.NoSlidingExpiration);

            return(result);
        }