Beispiel #1
0
        /// <summary>
        /// 刷新品牌信息缓存
        /// </summary>
        /// <param name="cloudName">品牌所在云名称</param>
        public static void RefreshBrandInfoByCloudName(string cloudName)
        {
            //1.获取全部品牌信息
            JobBll           jobBll     = new JobBll();
            List <BrandInfo> brandInfos = jobBll.GetBrandInfosByApi(cloudName);

            if (brandInfos == null || brandInfos.Count == 0)
            {
                return;
            }
            //2.存入缓存
            jobBll.SetHBrands(cloudName, brandInfos);
        }
Beispiel #2
0
        /// <summary>
        /// 刷新品牌信息缓存
        /// </summary>
        /// <param name="cloudName">品牌所在云名称</param>
        public static void RefreshProductNumByCloudName(string cloudName)
        {
            //1.获取全部品牌HashId
            var hashIds = CacheManager.RedisCache.Sget(cloudName);

            if (hashIds == null || hashIds.Count == 0)
            {
                return;
            }
            //2.更新缓存
            JobBll jobBll = new JobBll();

            jobBll.UpdateProductNum(hashIds);
        }