Ejemplo n.º 1
0
        /// <summary>
        /// 可释放的奖金 若返回的值,小于0,则 不允许释放金额
        /// </summary>
        /// <param name="lotteryCode"></param>
        /// <returns></returns>
        public decimal GetWinMonery(string lotteryCode)
        {
            lock (LockObject)
            {
                OpendHistory outOpendHistory = null;
                if (!mOpendHistory.TryGetValue(lotteryCode, out outOpendHistory))
                {
                    return(0);
                }

                var disMonery = outOpendHistory.DisposeMonery();
                if (disMonery < 0)
                {
                    return(0);
                }
                return(disMonery);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 记录数据
        /// </summary>
        /// <param name="lotteryCode"></param>
        /// <param name="bettMonery"></param>
        /// <param name="winMonery"></param>
        /// <returns></returns>
        public void PutLotteryData(string lotteryCode, decimal bettMonery, decimal winMonery)
        {
            lock (LockObject)
            {
                OpendHistory outOpendHistory = null;
                if (!mOpendHistory.TryGetValue(lotteryCode, out outOpendHistory))
                {
                    outOpendHistory = new OpendHistory();
                    mOpendHistory.Add(lotteryCode, outOpendHistory);
                }
                //获取返点比
                outOpendHistory.BettMonery += bettMonery;
                if (winMonery > 0)
                {
                    outOpendHistory.Inint();
                }

                LogManager.Error(outOpendHistory.ToString());
            }
        }