Эх сурвалжийг харах

打开盟主开机奖励队列
激活奖励入库增加激活类别判断,否则金额相同,不会发放,比如199的激活奖励,返两个100

lcl 1 жил өмнө
parent
commit
f0ab6ced9a

+ 7 - 7
AppStart/Helper/StatService.cs

@@ -708,8 +708,8 @@ namespace MySystem
 
         public void doActiveReward(WebCMSEntities db, PosMerchantInfo merchant, PosMachinesTwo pos, int GetUserId, string ParentNav, int TopUserId, decimal ActPrize, int ChangeType = 0, int ActType = 0)
         {
-            bool check = db.ActiveReward.Any(m => m.KqMerNo == merchant.KqMerNo && m.RewardAmount == ActPrize);
-            bool check1 = db.ActiveReward.Any(m => m.KqSnNo == pos.PosSn && m.RewardAmount == ActPrize);
+            bool check = db.ActiveReward.Any(m => m.KqMerNo == merchant.KqMerNo && m.RewardAmount == ActPrize && m.ActType == ActType);
+            bool check1 = db.ActiveReward.Any(m => m.KqSnNo == pos.PosSn && m.RewardAmount == ActPrize && m.ActType == ActType);
             if (!check && !check1)
             {
                 function.WriteLog(DateTime.Now.ToString() + ":" + pos.PosSn, "实时处理激活奖励");
@@ -1171,7 +1171,7 @@ namespace MySystem
                                             string ParentNav = function.CheckNull(user.ParentNav) + "," + user.Id + ",";
                                             if (!string.IsNullOrEmpty(ParentNav))
                                             {
-                                                decimal Prize = 20;
+                                                decimal Prize = 0;
                                                 if(pos.BrandId == 14)
                                                 {
                                                     Prize = 19 * 0.3M;
@@ -1250,16 +1250,16 @@ namespace MySystem
                         int PosId = int.Parse(content);
                         Thread.Sleep(1000);
                         WebCMSEntities db = new 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 >= 10000);
                         if (pos != null)
                         {
                             function.WriteLog("sn:" + pos.PosSn, "盟主开机奖励发放日志");
                             bool IsGet = db.OpenRewardDetail.Any(m => m.SnNo == pos.PosSn);
-                            if (pos.BindingTime > DateTime.Now.AddDays(-30) && !IsGet)
+                            if (!IsGet)
                             {
                                 decimal ActPrize = decimal.Parse(function.CheckNum(pos.SeoKeyword));
                                 function.WriteLog("押金:" + pos.SeoKeyword, "盟主开机奖励发放日志");
-                                if (ActPrize > 0 || pos.BrandId == 14)
+                                if (ActPrize > 0)
                                 {
                                     PosMerchantInfo merchant = db.PosMerchantInfo.FirstOrDefault(m => m.Id == pos.BindMerchantId);
                                     if (merchant != null)
@@ -3095,7 +3095,7 @@ namespace MySystem
                     {
                         TopUserId = int.Parse(ParentNav.Trim(',').Replace(",,", ",").Split(',')[0]);
                     }
-                    doActiveReward(db, merchant, pos, GetUserId, user.ParentNav, TopUserId, ActPrize);
+                    doActiveReward(db, merchant, pos, GetUserId, user.ParentNav, TopUserId, ActPrize, 0, 1);
                 }
             }
         }

+ 1 - 0
Startup.cs

@@ -183,6 +183,7 @@ namespace MySystem
                 StatService.Instance.StartActiveReward15(); //实时处理来客吧0押激活奖励
                 StatService.Instance.StartSimActive(); //实时广电卡激活奖励
                 StatService.Instance.StartOpenReward(); //实时获取开机奖励
+                StatService.Instance.StartLeaderReward(); //盟主开机奖励发放
                 StatService.Instance.ListenFluxRecord(); //同步流量费
                 LeaderPrizeService.Instance.Start(); //大盟主奖励发奖
                 OperatePrizeService.Instance.Start(); //运营中心奖励发奖