Explorar o código

0押金机具1000激活,5000发奖

lcl hai 1 ano
pai
achega
cb2ae82873
Modificáronse 1 ficheiros con 21 adicións e 2 borrados
  1. 21 2
      AppStart/Helper/SycnSpServer/SycnSpTradeService.cs

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

@@ -530,6 +530,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)
@@ -827,13 +845,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);