private void AddUserBeedingAndBonusPercent(Sports_Manager sportsManager, string userId, string gameCode, string gameType)
        {
            var beeding = sportsManager.QueryUserBeedings(userId, gameCode, gameType);

            if (beeding == null)
            {
                var UserBeedings = new C_User_Beedings
                {
                    UserId               = userId,
                    UpdateTime           = DateTime.Now,
                    GameCode             = gameCode,
                    GameType             = gameType,
                    BeFollowedTotalMoney = 0M,
                    BeFollowerUserCount  = 0,
                    GoldCrownCount       = 0,
                    GoldCupCount         = 0,
                    GoldDiamondsCount    = 0,
                    GoldStarCount        = 0,
                    SilverCrownCount     = 0,
                    SilverCupCount       = 0,
                    SilverDiamondsCount  = 0,
                    SilverStarCount      = 0,
                    TotalBonusMoney      = 0M,
                    TotalBonusTimes      = 0,
                };
                sportsManager.AddUserBeedings(UserBeedings);
            }
            var bonusPercent = sportsManager.QueryUserBonusPercent(userId, gameCode, gameType);

            if (bonusPercent == null)
            {
                var UserBonusPercent = new C_User_BonusPercent
                {
                    BonusPercent    = 0M,
                    CreateTime      = DateTime.Now,
                    CurrentDate     = DateTime.Now.ToString("yyyyMM"),
                    GameCode        = gameCode,
                    GameType        = gameType,
                    UserId          = userId,
                    BonusOrderCount = 0,
                    TotalOrderCount = 0,
                };
                sportsManager.AddUserBonusPercent(UserBonusPercent);
            }
        }
Beispiel #2
0
 /// <summary>
 /// 初始化用户中奖概率
 /// </summary>
 /// <param name="UserBeedings"></param>
 public void AddUserBonusPercent(C_User_BonusPercent UserBonusPercent)
 {
     DB.GetDal <C_User_BonusPercent>().Add(UserBonusPercent);
 }