Procházet zdrojové kódy

黄金合伙人拦截60后,不再往上走

lcl před 10 měsíci
rodič
revize
7fd8594123

+ 7 - 1
AppStart/Helper/LeaderApplyCouponsHelper.cs

@@ -139,6 +139,7 @@ namespace MySystem
                 Array.Reverse(ParentNavList);
                 int index = 0;
                 bool BigLeaderFlag = false; //大盟主标记
+                bool BuyPrizeFlag = false; //购机奖励发放标识
                 decimal BuyPrize = 0; //购机奖励
                 foreach(string ParentId in ParentNavList)
                 {
@@ -199,7 +200,12 @@ namespace MySystem
                             {
                                 Kind = 101;
                             }
-                            if(GetPrize > 0) PosCouponPrizeService.Instance.OpAccount(db, Id, parentUser.Id, GetPrize, groupCount, 128, Kind);
+                            if(GetPrize > 0 && !BuyPrizeFlag)
+                            {
+                                PosCouponPrizeService.Instance.OpAccount(db, Id, parentUser.Id, GetPrize, groupCount, 128, Kind);
+                                BuyPrizeFlag = true;
+                            }
+                            if(parentUser.OperateLevel == 2 && CurBuyPrize == 100) BuyPrizeFlag = true;
                             BuyPrize = CurBuyPrize;
                         }
                     }

+ 7 - 2
AppStart/Helper/PosCouponPrize/PosCouponPrizeService.cs

@@ -97,6 +97,7 @@ namespace MySystem
                     Array.Reverse(ParentNavList);
                     int index = 0;
                     bool DirectPrizeFlag = false; //推荐奖励发放标识
+                    bool BuyPrizeFlag = false; //购机奖励发放标识
                     bool BackAccountFlag = false; //备用金返余额标识
                     bool BigLeaderFlag = false; //大盟主标记
                     decimal BuyPrize = 0; //购机奖励
@@ -143,7 +144,7 @@ namespace MySystem
                                 decimal CurBuyPrize = GetBuyPrize(parentUser, order.UserId);
                                 decimal GetPrize = CurBuyPrize - BuyPrize;
                                 Utils.Instance.PrizeRecord(2, order.OrderNo, "发放金额:" + GetPrize);
-                                if(GetPrize > 0) 
+                                if(GetPrize > 0 && !BuyPrizeFlag)
                                 {
                                     bool PrizeFlag = true;
                                     int ChangeType = 118;
@@ -162,9 +163,11 @@ namespace MySystem
                                     if(PrizeFlag)
                                     {
                                         OpAccount(db, order.Id, parentUser.Id, CurBuyPrize - BuyPrize, order.BuyCount, ChangeType);
+                                        BuyPrizeFlag = true;
                                     }
                                     BuyPrize = CurBuyPrize;
                                 }
+                                if(parentUser.OperateLevel == 2 && CurBuyPrize == 100) BuyPrizeFlag = true;
                             }
 
                             if(!BackAccountFlag)
@@ -200,7 +203,7 @@ namespace MySystem
                                 }
                             }
                         }
-                        else if(parentUser.OperateLevel > 0 && CheckOpReserve(opdb, order.BuyCount, parentUser.Id))
+                        else if(parentUser.OperateLevel > 0 && CheckOpReserve(opdb, order.BuyCount, parentUser.Id) && !BuyPrizeFlag)
                         {
                             Utils.Instance.PrizeRecord(2, order.OrderNo, "满足条件,发放购机奖");
                             //购机奖
@@ -216,7 +219,9 @@ namespace MySystem
                                 }
                                 OpAccount(db, order.Id, parentUser.Id, GetPrize, order.BuyCount, ChangeType);
                                 BuyPrize = CurBuyPrize;
+                                BuyPrizeFlag = true;
                             }
+                            if(parentUser.OperateLevel == 2 && CurBuyPrize == 100) BuyPrizeFlag = true; 
 
                             if(!BackAccountFlag)
                             {