Browse Source

推荐王向上减49只减1次

lcl 11 months ago
parent
commit
257403dd5a
1 changed files with 3 additions and 1 deletions
  1. 3 1
      AppStart/Helper/RecommandKingHelper.cs

+ 3 - 1
AppStart/Helper/RecommandKingHelper.cs

@@ -42,6 +42,7 @@ namespace MySystem
                 return;
             }
             function.WritePage("/RecommandKing/", today + ".txt", DateTime.Now.ToString());
+            List<int> ReduceUserId = new List<int>();
             List<RecommendDirectUser> list = new List<RecommendDirectUser>();
             List<int> Historys = new List<int>();
             Historys.Add(565);
@@ -107,7 +108,7 @@ namespace MySystem
                             foreach(string UserIdString in ParentNavList)
                             {
                                 int UserId = int.Parse(UserIdString);
-                                if(UpLevelClear)
+                                if(UpLevelClear && !ReduceUserId.Contains(UserId))
                                 {
                                     RecommendDirectUser item = list.FirstOrDefault(m => m.UserId == UserId && m.TradeMonth == TradeMonth);
                                     if(item == null)
@@ -120,6 +121,7 @@ namespace MySystem
                                         list.Add(item);
                                     }
                                     item.QueryCount -= 49;
+                                    ReduceUserId.Add(UserId);
                                 }
                                 //判断是否历史达标创客
                                 if(PassFlag)