private bool AddItem(KFBoCaiShopDB Item) { try { lock (this.mutex) { KFBoCaiShopDB data = this.cacheList.Find((KFBoCaiShopDB x) => x.ID == Item.ID && Item.WuPinID == x.WuPinID); if (null == data) { data = Item; this.cacheList.Add(Item); } else { data.BuyNum += Item.BuyNum; } KFBoCaiDbManager.ReplaceBoCaiShop(data); } return(true); } catch (Exception ex) { LogManager.WriteLog(LogTypes.Exception, string.Format("[ljl_博彩商店]{0}", ex.ToString()), null, true); } return(false); }