Bladeren bron

立刷贷记卡刷卡1000激活,无服务费机具30天内5000返50元激活奖励

lcl 1 jaar geleden
bovenliggende
commit
84e7bfdfa9
3 gewijzigde bestanden met toevoegingen van 44 en 31 verwijderingen
  1. 5 5
      AppStart/Helper/StatService.cs
  2. 38 25
      AppStart/Helper/SycnSpServer/SycnSpTradeService.cs
  3. 1 1
      Startup.cs

+ 5 - 5
AppStart/Helper/StatService.cs

@@ -114,7 +114,7 @@ namespace MySystem
                 {
                     function.WriteLog(DateTime.Now.ToString() + ":start", "实时处理盒易付0押激活奖励");
                     activePrizeWithoutDeposit12();
-                    activePrizeWithoutDeposit122();
+                    // activePrizeWithoutDeposit122();
                     function.WriteLog(DateTime.Now.ToString() + ":end\n\n", "实时处理盒易付0押激活奖励");
                 }
                 catch (Exception ex)
@@ -406,10 +406,10 @@ namespace MySystem
                         {
                             TopUserId = int.Parse(ParentNav.Trim(',').Replace(",,", ",").Split(',')[0]);
                         }
-                        if(pos.BrandId == 6) //首台无押金机返50
-                        {
-                            doActiveReward(db, merchant, pos, GetUserId, ParentNav, TopUserId, 50);
-                        }
+                        // if(pos.BrandId == 6) //首台无押金机返50
+                        // {
+                        //     doActiveReward(db, merchant, pos, GetUserId, ParentNav, TopUserId, 50);
+                        // }
                         else if((pos.BrandId == 10 || pos.BrandId == 11) && DateTime.Now < DateTime.Parse("2023-05-01 00:00:00") && pos.IsFirst == 1) //首台无押金机返50
                         {
                             doActiveReward(db, merchant, pos, GetUserId, ParentNav, TopUserId, 50);

+ 38 - 25
AppStart/Helper/SycnSpServer/SycnSpTradeService.cs

@@ -287,10 +287,6 @@ namespace MySystem
                                         }
                                         decimal CheckMoney = 1000;
                                         int CheckDays = 30;
-                                        if (pos.BrandId == 6)
-                                        {
-                                            CheckMoney = 5000;
-                                        }
                                         //联动
                                         if(BankCardType == 1 && trade.TradeType == "M015" && (pos.BrandId == 10 || pos.BrandId == 11))
                                         {
@@ -438,30 +434,15 @@ namespace MySystem
                                                 ActStatus = ActStatus,
                                             });
                                         }
+                                        // 立刷30天内刷满5000,无服务费机具,返50
+                                        if (pos.BrandId == 6 && decimal.Parse(function.CheckNum(pos.SeoKeyword)) == 0 && pos.CreditTrade >= 5000 && pos.ActivationState == 1 && pos.BindingTime > DateTime.Now.AddDays(-30))
+                                        {                                            
+                                            LiShuaActPrize(db, pos, 50);
+                                        }
                                         // 立刷60天内刷满10000,再返40
                                         if (pos.BrandId == 6 && decimal.Parse(function.CheckNum(pos.SeoKeyword)) > 0 && pos.ActivationState == 1 && pos.CreditTrade >= 10000 && pos.BindingTime > DateTime.Now.AddDays(-60))
                                         {
-                                            // PxcModels.PosMerchantInfo merchant = db.PosMerchantInfo.FirstOrDefault(m => m.Id == pos.BindMerchantId && m.Sort == 1);
-                                            PxcModels.PosMerchantInfo merchant = db.PosMerchantInfo.FirstOrDefault(m => m.Id == pos.BindMerchantId);
-                                            if(merchant != null)
-                                            {
-                                                PxcModels.Users getUser = db.Users.FirstOrDefault(m => m.Id == pos.BuyUserId) ?? new PxcModels.Users();
-                                                int BuyTopUserId = 0;
-                                                string ParentNav = getUser.ParentNav;
-                                                if (!string.IsNullOrEmpty(ParentNav))
-                                                {
-                                                    string[] ParentNavList = ParentNav.Trim(',').Replace(",,", ",").Split(',');
-                                                    if (ParentNavList.Length > 1)
-                                                    {
-                                                        BuyTopUserId = int.Parse(ParentNavList[1]);
-                                                    }
-                                                    else if (ParentNavList.Length == 1)
-                                                    {
-                                                        BuyTopUserId = int.Parse(ParentNavList[0]);
-                                                    }
-                                                }
-                                                StatService.Instance.doActiveReward(db, merchant, pos, getUser.Id, getUser.ParentNav, BuyTopUserId, 40, 12);
-                                            }
+                                            LiShuaActPrize(db, pos, 40);
                                         }
                                         db.SpOrderNos.Add(new PxcModels.SpOrderNos()
                                         {
@@ -497,6 +478,38 @@ namespace MySystem
             }
         }
 
+        //立刷格外奖励
+        private void LiShuaActPrize(PxcModels.WebCMSEntities db, PxcModels.PosMachinesTwo pos, int prize)
+        {
+            PxcModels.PosMerchantInfo merchant = db.PosMerchantInfo.FirstOrDefault(m => m.Id == pos.BindMerchantId);
+            if(merchant != null)
+            {
+                PxcModels.Users getUser = db.Users.FirstOrDefault(m => m.Id == pos.BuyUserId) ?? new PxcModels.Users();
+                int BuyTopUserId = 0;
+                string ParentNav = getUser.ParentNav;
+                if (!string.IsNullOrEmpty(ParentNav))
+                {
+                    string[] ParentNavList = ParentNav.Trim(',').Replace(",,", ",").Split(',');
+                    if (ParentNavList.Length > 1)
+                    {
+                        BuyTopUserId = int.Parse(ParentNavList[1]);
+                    }
+                    else if (ParentNavList.Length == 1)
+                    {
+                        BuyTopUserId = int.Parse(ParentNavList[0]);
+                    }
+                }
+                if(prize == 50)
+                {
+                    StatService.Instance.doActiveReward(db, merchant, pos, getUser.Id, getUser.ParentNav, BuyTopUserId, 50);
+                }
+                if(prize == 40)
+                {
+                    StatService.Instance.doActiveReward(db, merchant, pos, getUser.Id, getUser.ParentNav, BuyTopUserId, 40, 12);
+                }
+            }
+        }
+
         private int GetLeShuaHaiKe(int UserId, int BrandId)
         {
             if(DateTime.Now >= DateTime.Parse("2023-08-01 00:00:00"))

+ 1 - 1
Startup.cs

@@ -189,7 +189,7 @@ namespace MySystem
 
             StatService.Instance.StartActiveReward(); //实时处理激活奖励
             StatService.Instance.StartActiveReward1(); //实时处理0押激活奖励
-            // StatService.Instance.StartActiveReward2(); //实时处理盒易付0押激活奖励
+            StatService.Instance.StartActiveReward2(); //实时处理盒易付0押激活奖励
             StatService.Instance.StartOpenReward(); //实时获取开机奖励
             StatService.Instance.ListenFluxRecord(); //实时获取流量费分佣
             LeaderPrizeService.Instance.Start(); //大盟主奖励发奖