فهرست منبع

盟主推荐奖励888问题修复

lcl 1 سال پیش
والد
کامیت
4253318e9b
1فایلهای تغییر یافته به همراه3 افزوده شده و 6 حذف شده
  1. 3 6
      AppStart/Helper/AlipayPayBack2Service.cs

+ 3 - 6
AppStart/Helper/AlipayPayBack2Service.cs

@@ -859,21 +859,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;