Browse Source

Merge branch 'feat-lcl-修复问题' of kxs-end/main-server into release-mainserver

lichunlei 1 year ago
parent
commit
41d690c0bf
1 changed files with 3 additions and 6 deletions
  1. 3 6
      AppStart/Helper/AlipayPayBack2Service.cs

+ 3 - 6
AppStart/Helper/AlipayPayBack2Service.cs

@@ -863,21 +863,18 @@ namespace MySystem
 
         public void LeaderRecommendPrize(WebCMSEntities db, Orders order, int UserId, decimal Money, int ChangeType)
         {
-            int level = 0;
             Users orderuser = db.Users.FirstOrDefault(m => m.Id == UserId) ?? new Users();
-            string ParentNav = orderuser.ParentNav + "," + UserId + ",";
-            if(!string.IsNullOrEmpty(ParentNav))
+            if(!string.IsNullOrEmpty(orderuser.ParentNav))
             {
-                string[] ParentNavList = ParentNav.Replace(",,", ",").TrimEnd(',').Split(',');
+                string[] ParentNavList = orderuser.ParentNav.Replace(",,", ",").TrimEnd(',').Split(',');
                 Array.Reverse(ParentNavList);
                 foreach(string ParentUserId in ParentNavList)
                 {
-                    level += 1;
                     int UserIdNum = int.Parse(function.CheckInt(ParentUserId));
                     UserRankItem user = PosCouponPrizeService.Instance.GetUserLevel(UserIdNum) ?? new UserRankItem();
                     if(user.Id > 0)
                     {
-                        if((user.UserType >= 1 || user.LeaderLevel > 0) && level > 1 && Money > 0)
+                        if((user.UserType >= 1 || user.LeaderLevel > 0) && Money > 0)
                         {
                             ChangeAccount(db, order, user.Id, Money, ChangeType);
                             Money = 0;