/// <summary>
        ///vip活动礼包
        /// </summary>
        public static void GetVipFestival(string userID)
        {
            FestivalInfo info = GetInfo(FestivalType.VIPFestival);

            if (info != null && info.FestivalExtend != null)
            {
                var cacheSet           = new PersonalCacheStruct <FestivalRestrain>();
                FestivalRestrain fRest = cacheSet.FindKey(userID, info.FestivalID);
                if (fRest == null || fRest.RefreashDate < info.StartDate ||
                    (fRest.RestrainNum < info.RestrainNum && fRest.RefreashDate >= info.StartDate &&
                     fRest.RefreashDate <= info.EndDate))
                {
                    CacheList <PrizeInfo> prizeList = PrizeHelper.GetPrizeInfo(info.Reward);
                    foreach (PrizeInfo prize in prizeList)
                    {
                        UserTakePrize userTask = PrizeHelper.GetUserTake(prize, userID, info);
                        new ShareCacheStruct <UserTakePrize>().Add(userTask);
                    }
                    if (fRest == null)
                    {
                        fRest              = new FestivalRestrain();
                        fRest.FestivalID   = info.FestivalID;
                        fRest.RefreashDate = DateTime.Now;
                        fRest.RestrainNum  = 1;
                        fRest.UserID       = userID;
                        cacheSet.Add(fRest);
                    }
                    else
                    {
                        fRest.RestrainNum  = MathUtils.Addition(fRest.RestrainNum, 1);
                        fRest.RefreashDate = DateTime.Now;
                    }
                }
            }
        }
        /// <summary>
        /// 累计消费活动奖励(晶石,金币,精力)
        /// </summary>
        private static void FestivalConsumeCount(FestivalInfo info, string userID)
        {
            UserConsume consume = new PersonalCacheStruct <UserConsume>().FindKey(userID);

            if (consume == null)
            {
                return;
            }
            var cacheSet           = new PersonalCacheStruct <FestivalRestrain>();
            FestivalRestrain fRest = cacheSet.FindKey(userID, info.FestivalID);

            if (fRest != null && fRest.RestrainNum >= 1 && fRest.RefreashDate == info.StartDate)
            {
                return;
            }
            if ((info.FestivalType == FestivalType.SparConsumption && consume.GoldDate >= info.StartDate && consume.GoldNum >= info.RestrainNum) ||
                (info.FestivalType == FestivalType.GameCoin && consume.CoinDate >= info.StartDate && consume.GameCoin >= info.RestrainNum) ||
                (info.FestivalType == FestivalType.Energy && consume.EnergyDate >= info.StartDate && consume.EnergyNum >= info.RestrainNum))
            {
                CacheList <PrizeInfo> prizeList = PrizeHelper.GetPrizeInfo(info.Reward);
                foreach (PrizeInfo prize in prizeList)
                {
                    UserTakePrize userTask = PrizeHelper.GetUserTake(prize, userID, info);
                    new ShareCacheStruct <UserTakePrize>().Add(userTask);
                }
                if (fRest == null)
                {
                    fRest              = new FestivalRestrain();
                    fRest.FestivalID   = info.FestivalID;
                    fRest.RefreashDate = info.StartDate;
                    fRest.RestrainNum  = 1;
                    fRest.UserID       = userID;
                    cacheSet.Add(fRest);
                }
                else
                {
                    fRest.RefreashDate = info.StartDate;
                    fRest.RestrainNum  = 1;
                    //fRest.Update();
                }
            }
        }
        /// <summary>
        /// 累计充值活动
        /// </summary>
        public static void FestivalPayCount(FestivalInfo info, GameUser user)
        {
            UserRecharge recharge = new PersonalCacheStruct <UserRecharge>().FindKey(user.UserID);

            if (recharge == null)
            {
                return;
            }
            var cacheSet           = new PersonalCacheStruct <FestivalRestrain>();
            FestivalRestrain fRest = cacheSet.FindKey(user.UserID, info.FestivalID);

            if (fRest != null && fRest.RestrainNum >= 1 && fRest.RefreashDate == info.StartDate)
            {
                return;
            }
            if (recharge.FestivalDate >= info.StartDate &&
                recharge.FestivalCount >= info.RestrainNum)
            {
                CacheList <PrizeInfo> prizeList = PrizeHelper.GetPrizeInfo(info.Reward);
                foreach (PrizeInfo prize in prizeList)
                {
                    UserTakePrize userTask = PrizeHelper.GetUserTake(prize, user.UserID, info);
                    new ShareCacheStruct <UserTakePrize>().Add(userTask);
                }
                if (fRest == null)
                {
                    fRest              = new FestivalRestrain();
                    fRest.FestivalID   = info.FestivalID;
                    fRest.RefreashDate = info.StartDate;
                    fRest.RestrainNum  = 1;
                    fRest.UserID       = user.UserID;
                    cacheSet.Add(fRest);
                }
                else
                {
                    fRest.RefreashDate = info.StartDate;
                    fRest.RestrainNum  = 1;
                }
            }
        }