Browse Source

所有奖励取消首台限制

lcl 1 năm trước cách đây
mục cha
commit
65f50067a5

+ 3 - 3
AppStart/Helper/AddActService.cs

@@ -60,18 +60,18 @@ namespace MySystem
 
                                     //发放开机奖励
                                     function.WriteLog("首台" + pos.IsFirst, "开机奖励在激活中监控");
-                                    if(pos.IsFirst == 1 && pos.BindingTime > DateTime.Now.AddDays(-CheckDays))
+                                    if(pos.BindingTime > DateTime.Now.AddDays(-CheckDays))
                                     {
                                         RedisDbconn.Instance.AddList("OpenRewardQueue", pos.Id.ToString());
                                     }
                                 }
                                 //发放大盟主奖励
-                                if(pos.LeaderUserId > 0 && pos.IsFirst == 1 && db.Leaders.Any(m => m.Id == pos.LeaderUserId && m.ExpiredDate > now) && pos.BindingTime > DateTime.Now.AddDays(-CheckDays))
+                                if(pos.LeaderUserId > 0 && db.Leaders.Any(m => m.Id == pos.LeaderUserId && m.ExpiredDate > now) && pos.BindingTime > DateTime.Now.AddDays(-CheckDays))
                                 {
                                     RedisDbconn.Instance.AddList("LeaderPrizeQueue", pos.Id);
                                 }
                                 //发放运营中心奖励
-                                if(pos.IsFirst == 1 && pos.BindingTime > DateTime.Now.AddDays(-CheckDays))
+                                if(pos.BindingTime > DateTime.Now.AddDays(-CheckDays))
                                 {
                                     RedisDbconn.Instance.AddList("OperatePrizeQueue", pos.Id);
                                 }

+ 3 - 3
AppStart/Helper/StatService.cs

@@ -474,7 +474,7 @@ namespace MySystem
                         {
                             TopUserId = int.Parse(ParentNav.Trim(',').Replace(",,", ",").Split(',')[0]);
                         }
-                        if((pos.BrandId == 10 || pos.BrandId == 11) && DateTime.Now < DateTime.Parse("2023-05-01 00:00:00") && pos.IsFirst == 1) //首台无押金机返50
+                        if((pos.BrandId == 10 || pos.BrandId == 11) && DateTime.Now < DateTime.Parse("2023-05-01 00:00:00")) //首台无押金机返50
                         {
                             doActiveReward(db, merchant, pos, GetUserId, ParentNav, TopUserId, 50);
                         }
@@ -634,7 +634,7 @@ namespace MySystem
             DateTime yesterday = DateTime.Now.AddDays(-30);
             DateTime today = DateTime.Now.AddMinutes(-5);
             DateTime checkTime = DateTime.Parse("2023-08-01 00:00:00");
-            IQueryable<PosMachinesTwo> posList = db.PosMachinesTwo.Where(m => m.ActivationState == 1 && m.IsFirst == 0 && m.CreditTrade >= 1000 && m.ActivationTime < checkTime && string.IsNullOrEmpty(m.SeoKeyword) && (m.BrandId == 12 || m.BrandId == 13) && m.Detail != "1");
+            IQueryable<PosMachinesTwo> posList = db.PosMachinesTwo.Where(m => m.ActivationState == 1 && m.CreditTrade >= 1000 && m.ActivationTime < checkTime && string.IsNullOrEmpty(m.SeoKeyword) && (m.BrandId == 12 || m.BrandId == 13) && m.Detail != "1");
             if (posid > 0)
             {
                 posList = posList.Where(m => m.Id == posid);
@@ -671,7 +671,7 @@ namespace MySystem
                         PosMerchantInfo other = db.PosMerchantInfo.FirstOrDefault(m => m.MerIdcardNo.StartsWith(IdCardStart) && m.MerIdcardNo.EndsWith(IdCardEnd) && m.MerchantName.Contains(MerName) && BrandIds.Contains(m.BrandId));
                         if(other != null)
                         {
-                            PosMachinesTwo checkpos = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == other.KqSnNo && m.IsFirst == 1);
+                            PosMachinesTwo checkpos = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == other.KqSnNo);
                             if(checkpos != null)
                             {
                                 doActiveReward(db, merchant, pos, GetUserId, ParentNav, TopUserId, 50);

+ 5 - 5
AppStart/Helper/SycnSpServer/SycnSpTradeService.cs

@@ -824,26 +824,26 @@ namespace MySystem
 
                     //发放开机奖励
                     function.WriteLog("首台" + pos.IsFirst, "开机奖励在激活中监控");
-                    if(pos.IsFirst == 1 && pos.BindingTime > now.AddDays(-CheckDays) && pos.CardType < 100 && PrizeFlag)
+                    if(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) && pos.CardType < 100 && PrizeFlag)
+                else if(pos.BrandId == 14 && 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) && pos.CardType < 100 && PrizeFlag)
+                if (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.IsFirst == 1 && pos.BindingTime > now.AddDays(-CheckDays) && pos.CardType < 100 && PrizeFlag)
+                if (pos.BindingTime > now.AddDays(-CheckDays) && pos.CardType < 100 && PrizeFlag)
                 {
                     function.WriteLog("运营中心奖发放", "开机奖励在激活中监控");
                     RedisDbconn.Instance.AddList("OperatePrizeQueue", pos.Id);
@@ -901,7 +901,7 @@ namespace MySystem
                 // }
                 // function.WriteLog("\n\n", "检查服务费推送过来的激活奖励是否发放");
             }
-            if(pos.IsFirst == 1 && pos.ActivationState == 1 && pos.BindingTime.Value.AddDays(30) <= DateTime.Now && pos.BindingTime.Value.AddDays(60) > DateTime.Now && pos.CreditTrade >= 10000 && pos.CardType < 100)
+            if(pos.ActivationState == 1 && pos.BindingTime.Value.AddDays(30) <= DateTime.Now && pos.BindingTime.Value.AddDays(60) > DateTime.Now && pos.CreditTrade >= 10000 && pos.CardType < 100)
             {
                 RedisDbconn.Instance.AddList("LeaderRewardQueue", pos.Id.ToString());
                 // PxcModels.Users user = db.Users.FirstOrDefault(m => m.Id == pos.BuyUserId);