浏览代码

Merge branch 'test-mainserver' into develop

lcl 1 年之前
父节点
当前提交
890bf8e4c7
共有 2 个文件被更改,包括 26 次插入7 次删除
  1. 5 5
      AppStart/Helper/StatService.cs
  2. 21 2
      AppStart/Helper/SycnSpServer/SycnSpTradeService.cs

+ 5 - 5
AppStart/Helper/StatService.cs

@@ -1263,10 +1263,10 @@ namespace MySystem
                             bool IsGet = db.OpenRewardDetail.Any(m => m.SnNo == pos.PosSn);
                             if (!IsGet)
                             {
-                                decimal ActPrize = decimal.Parse(function.CheckNum(pos.SeoKeyword));
-                                function.WriteLog("押金:" + pos.SeoKeyword, "盟主开机奖励发放日志");
-                                if (ActPrize > 0)
-                                {
+                                // decimal ActPrize = decimal.Parse(function.CheckNum(pos.SeoKeyword));
+                                // function.WriteLog("押金:" + pos.SeoKeyword, "盟主开机奖励发放日志");
+                                // if (ActPrize > 0)
+                                // {
                                     PosMerchantInfo merchant = db.PosMerchantInfo.FirstOrDefault(m => m.Id == pos.BindMerchantId);
                                     if (merchant != null)
                                     {
@@ -1317,7 +1317,7 @@ namespace MySystem
                                         }
                                         // }
                                     }
-                                }
+                                // }
                             }
                         }
                         db.Dispose();

+ 21 - 2
AppStart/Helper/SycnSpServer/SycnSpTradeService.cs

@@ -534,6 +534,24 @@ namespace MySystem
                                             OrderNo = trade.TradeSerialNo
                                         });
                                         db.SaveChanges();
+                                        
+                                        //0押金机具返盟主奖励、运营中心奖励
+                                        if(pos.ActivationState == 1 && function.CheckNum(pos.SeoKeyword) == "0" && pos.CreditTrade >= 5000)
+                                        {
+                                            DateTime now = pos.ActivationTime.Value;
+                                            //盟主奖励
+                                            if (pos.LeaderUserId > 0 && db.Leaders.Any(m => m.Id == pos.LeaderUserId && m.ExpiredDate > now) && pos.BindingTime > now.AddDays(-CheckDays) && pos.CardType < 100)
+                                            {
+                                                function.WriteLog("大盟主奖发放", "开机奖励在激活中监控");
+                                                RedisDbconn.Instance.AddList("LeaderPrizeQueue", pos.Id);
+                                            }
+                                            //运营中心奖励
+                                            if (pos.BindingTime > now.AddDays(-CheckDays) && pos.CardType < 100)
+                                            {
+                                                function.WriteLog("运营中心奖发放", "开机奖励在激活中监控");
+                                                RedisDbconn.Instance.AddList("OperatePrizeQueue", pos.Id);
+                                            }
+                                        }
 
                                         // 推荐王逻辑(交易)
                                         // if(TradeAmount > 0)
@@ -831,13 +849,14 @@ namespace MySystem
                 }
                 //发放大盟主奖励
                 function.WriteLog("大盟主---PrizeFlag:" + PrizeFlag + ";LeaderUserId:" + pos.LeaderUserId + ";pos.IsFirst:" + pos.IsFirst + ";pos.BindingTime:" + pos.BindingTime + ";now.AddDays(-CheckDays):" + now.AddDays(-CheckDays) + ";", "开机奖励在激活中监控");
-                if (pos.LeaderUserId > 0 && db.Leaders.Any(m => m.Id == pos.LeaderUserId && m.ExpiredDate > now) && pos.BindingTime > now.AddDays(-CheckDays) && pos.CardType < 100 && PrizeFlag)
+                decimal Deposit = decimal.Parse(function.CheckNum(pos.SeoKeyword));
+                if (Deposit > 0 && pos.LeaderUserId > 0 && db.Leaders.Any(m => m.Id == pos.LeaderUserId && m.ExpiredDate > now) && pos.BindingTime > now.AddDays(-CheckDays) && pos.CardType < 100 && PrizeFlag)
                 {
                     function.WriteLog("大盟主奖发放", "开机奖励在激活中监控");
                     RedisDbconn.Instance.AddList("LeaderPrizeQueue", pos.Id);
                 }
                 //发放运营中心奖励
-                if (pos.BindingTime > now.AddDays(-CheckDays) && pos.CardType < 100 && PrizeFlag)
+                if (Deposit > 0 && pos.BindingTime > now.AddDays(-CheckDays) && pos.CardType < 100 && PrizeFlag)
                 {
                     function.WriteLog("运营中心奖发放", "开机奖励在激活中监控");
                     RedisDbconn.Instance.AddList("OperatePrizeQueue", pos.Id);