lcl há 11 meses atrás
pai
commit
ed1dcb9e51
1 ficheiros alterados com 13 adições e 1 exclusões
  1. 13 1
      AppStart/Helper/RecommandKingHelper.cs

+ 13 - 1
AppStart/Helper/RecommandKingHelper.cs

@@ -180,7 +180,19 @@ namespace MySystem
                         string subUserIdStr = "," + sub.UserId + ",";
                         if(sub.ChkActCount >= 50 || sub.UserLevel >= 5 || Historys.Contains(sub.UserId))
                         {
-                            user.ActCount -= sub.ChkActCount;
+                            // user.ActCount -= sub.ChkActCount;
+                            List<RecommandKingItem> mysubs = users.Where(m => m.ParentNav.Contains(subUserIdStr) && (m.ChkActCount >= 50)).ToList();
+                            foreach(RecommandKingItem mysub in mysubs)
+                            {
+                                List<RecommandKingItem> mysubChildren = users.Where(m => m.ParentUserId == mysub.UserId).ToList();
+                                foreach(RecommandKingItem mysubChild in mysubChildren)
+                                {
+                                    if(mysubChild.ChkActCount >= 50)
+                                    {
+                                        user.ActCount -= mysubChild.ChkActCount;
+                                    }
+                                }
+                            }
                             function.WriteLog("减去" + sub.ChkActCount, "推荐王最终的达标创客数量分析");
                         }
                         else if(users.Any(m => m.ParentNav.Contains(subUserIdStr) && (m.ChkActCount >= 50 || m.UserLevel >= 5 || Historys.Contains(sub.UserId))))