Browse Source

调整好哒开机奖励逻辑

lcl 1 year ago
parent
commit
c15f458872
2 changed files with 26 additions and 16 deletions
  1. 11 1
      AppStart/Helper/StatService.cs
  2. 15 15
      AppStart/Helper/SycnSpServer/SycnSpActiveService.cs

+ 11 - 1
AppStart/Helper/StatService.cs

@@ -1168,9 +1168,15 @@ namespace MySystem
                         function.WriteLog("\n\n" + DateTime.Now.ToString() + "\nposid:" + content, "开机奖励发放日志");
                         int PosId = int.Parse(content);
                         Thread.Sleep(1000);
+                        List<int> BrandIds = new List<int>();
+                        BrandIds.Add(14);
+                        BrandIds.Add(18);
+                        BrandIds.Add(19);
+                        BrandIds.Add(20);
+                        BrandIds.Add(21);
                         WebCMSEntities db = new WebCMSEntities();
                         OpModels.WebCMSEntities opdb = new OpModels.WebCMSEntities();
-                        PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == PosId && m.ActivationState == 1 && ((!string.IsNullOrEmpty(m.SeoKeyword) && m.SeoKeyword != "0" && m.CreditTrade >= 1000) || m.BrandId == 14));
+                        PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == PosId && m.ActivationState == 1 && ((!string.IsNullOrEmpty(m.SeoKeyword) && m.SeoKeyword != "0" && m.CreditTrade >= 1000) || BrandIds.Contains(m.BrandId)));
                         if (pos != null)
                         {
                             function.WriteLog("sn:" + pos.PosSn, "开机奖励发放日志");
@@ -1197,6 +1203,10 @@ namespace MySystem
                                                 {
                                                     Prize = 19 * 0.3M;
                                                 }
+                                                if(pos.BrandId == 18 || pos.BrandId == 19 || pos.BrandId == 20 || pos.BrandId == 21)
+                                                {
+                                                    Prize = 20;
+                                                }
                                                 string[] ParentNavs = ParentNav.Trim(',').Replace(",,", ",").Split(',');
                                                 for (int i = ParentNavs.Length - 1; i >= 0; i--)
                                                 {

+ 15 - 15
AppStart/Helper/SycnSpServer/SycnSpActiveService.cs

@@ -98,21 +98,21 @@ namespace MySystem
                                         TopUserId = int.Parse(user.ParentNav.Trim(',').Replace(",,", ",").Split(',')[0]);
                                     }
                                     StatService.Instance.doActiveReward(db, merchant, pos, pos.BuyUserId, user.ParentNav, TopUserId, Prize);
-                                }
-                                DateTime now = DateTime.Now;
-                                SycnSpTradeService.Instance.ActPos(db, pos, 0, 0, false);
-                                if(pos.CardType < 100)
-                                {
-                                    RedisDbconn.Instance.AddList("OpenRewardQueue", pos.Id.ToString());
-                                }
-                                if (Deposit > 0 && pos.LeaderUserId > 0 && db.Leaders.Any(m => m.Id == pos.LeaderUserId && m.ExpiredDate > now) && pos.CardType < 100)
-                                {
-                                    RedisDbconn.Instance.AddList("LeaderPrizeQueue", pos.Id);
-                                }
-                                //发放运营中心奖励
-                                if (Deposit > 0 && pos.CardType < 100)
-                                {
-                                    RedisDbconn.Instance.AddList("OperatePrizeQueue", pos.Id);
+                                    DateTime now = DateTime.Now;
+                                    SycnSpTradeService.Instance.ActPos(db, pos, 0, 0, false);
+                                    if(pos.CardType < 100)
+                                    {
+                                        RedisDbconn.Instance.AddList("OpenRewardQueue", pos.Id.ToString());
+                                    }
+                                    if (Deposit > 0 && pos.LeaderUserId > 0 && db.Leaders.Any(m => m.Id == pos.LeaderUserId && m.ExpiredDate > now) && pos.CardType < 100)
+                                    {
+                                        RedisDbconn.Instance.AddList("LeaderPrizeQueue", pos.Id);
+                                    }
+                                    //发放运营中心奖励
+                                    if (Deposit > 0 && pos.CardType < 100)
+                                    {
+                                        RedisDbconn.Instance.AddList("OperatePrizeQueue", pos.Id);
+                                    }
                                 }
                             }