ソースを参照

Merge branch 'feat-银训' into develop

lcl 1 年間 前
コミット
7a328dc5bb
2 ファイル変更14 行追加8 行削除
  1. BIN
      .DS_Store
  2. 14 8
      AppStart/Helper/SycnSpServer/SycnSpTradeService.cs

BIN
.DS_Store


+ 14 - 8
AppStart/Helper/SycnSpServer/SycnSpTradeService.cs

@@ -793,6 +793,10 @@ namespace MySystem
             {
                 pos.ActivationState = 1;
                 pos.ActivationTime = now;
+                if(pos.CardType == 101)
+                {
+                    pos.IsPurchase = 1;
+                }
                 function.WriteLog("机具" + pos.PosSn, "开机奖励在激活中监控");
                 function.WriteLog("PrizeFlag:" + PrizeFlag, "开机奖励在激活中监控");
                 PxcModels.PosMerchantInfo merchant = db.PosMerchantInfo.FirstOrDefault(m => m.Id == pos.BindMerchantId);
@@ -807,34 +811,36 @@ namespace MySystem
 
                     //发放开机奖励
                     function.WriteLog("首台" + pos.IsFirst, "开机奖励在激活中监控");
-                    if(pos.IsFirst == 1 && pos.BindingTime > now.AddDays(-CheckDays) && PrizeFlag)
+                    if(pos.IsFirst == 1 && pos.BindingTime > now.AddDays(-CheckDays) && pos.CardType < 100 && PrizeFlag)
                     {
                         function.WriteLog("开机奖发放", "开机奖励在激活中监控");
                         RedisDbconn.Instance.AddList("OpenRewardQueue", pos.Id.ToString());
                     }
                 }
-                else if(pos.BrandId == 14 && pos.IsFirst == 1 && pos.BindingTime > now.AddDays(-CheckDays) && PrizeFlag)
+                else if(pos.BrandId == 14 && pos.IsFirst == 1 && pos.BindingTime > now.AddDays(-CheckDays) && pos.CardType < 100 && PrizeFlag)
                 {
                     function.WriteLog("开机奖发放", "开机奖励在激活中监控");
                     RedisDbconn.Instance.AddList("OpenRewardQueue", pos.Id.ToString());
                 }
                 //发放大盟主奖励
                 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 && pos.IsFirst == 1 && db.Leaders.Any(m => m.Id == pos.LeaderUserId && m.ExpiredDate > now) && pos.BindingTime > now.AddDays(-CheckDays) && PrizeFlag)
+                if (pos.LeaderUserId > 0 && pos.IsFirst == 1 && 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.IsFirst == 1 && pos.BindingTime > now.AddDays(-CheckDays) && PrizeFlag)
+                if (pos.IsFirst == 1 && pos.BindingTime > now.AddDays(-CheckDays) && pos.CardType < 100 && PrizeFlag)
                 {
                     function.WriteLog("运营中心奖发放", "开机奖励在激活中监控");
                     RedisDbconn.Instance.AddList("OperatePrizeQueue", pos.Id);
                 }
-                AlipayPayBack2Service.Instance.ActReserveBack(pos.OpId, pos.OpReserve1, pos.OpReserve2, pos.OpReserve3);
-
-                //统计激活数
-                RedisDbconn.Instance.AddList("StatActQueue", "{\"TradeDate\":\"" + now.ToString("yyyyMMdd") + "\",\"UserId\":\"" + pos.BuyUserId + "\",\"BrandId\":\"" + pos.BrandId + "\"}");
+                if(pos.CardType < 100)
+                {
+                    AlipayPayBack2Service.Instance.ActReserveBack(pos.OpId, pos.OpReserve1, pos.OpReserve2, pos.OpReserve3);
+                    //统计激活数
+                    RedisDbconn.Instance.AddList("StatActQueue", "{\"TradeDate\":\"" + now.ToString("yyyyMMdd") + "\",\"UserId\":\"" + pos.BuyUserId + "\",\"BrandId\":\"" + pos.BrandId + "\"}");
+                }
             }
         }