/// <summary> /// 获取购物车 /// </summary> /// <param name="CustomerID"></param> /// <returns></returns> public ShopCart GetShopCart(int CustomerID) { string key = "ShopCart_" + CustomerID.ToString(); ShopCart shopCart = new ShopCart(); if (_IRedisServer.KeyExists(key)) { shopCart = _IRedisServer.GetStringKey <ShopCart>(key); } else { return(null); } return(shopCart); }