Ejemplo n.º 1
0
        /// <summary>保存商品默认运费
        /// </summary>
        /// <param name="pid"></param>
        public void ChangeProductDefaultFreight(Int64 pid)
        {
            var proKey = RedisKeyConst.GetProductDefaultFreightKey(pid).Key;

            using (WcfTcpClient <IFreightTemplateService> clint = factory.CreateClient <IFreightTemplateService>())
            {
                var item = clint.Channel.GetProductDetailFreight(pid);
                if (item != null && item.Count > 0)
                {
                    CN100.Redis.Client.RedisClientUtility.SetData <IList <ProductFreightModel> >(proKey, item);
                }
                else
                {
                    DeleteByKey(proKey);
                }
            }
        }