|
@@ -322,10 +322,25 @@ namespace MySystem
|
|
|
OpReserve(db, order, order.UserId, order.TotalPrice, 0, 0, "商城购机(储备金支付)");
|
|
|
}
|
|
|
}
|
|
|
- if(acccount.LeaderReserve >= 400 * pro.ProductCount)
|
|
|
+ string parentString = user.ParentNav + "," + order.UserId + ",";
|
|
|
+ string[] puids = parentString.Replace(",,", ",").Trim(',').Split(',');
|
|
|
+ Array.Reverse(puids);
|
|
|
+ bool getFlag = true;
|
|
|
+ foreach(string puid in puids)
|
|
|
{
|
|
|
- //获得100元奖励
|
|
|
- OpAccount(db, order, order.UserId, 100, pro.ProductCount);
|
|
|
+ int puidNum = int.Parse(function.CheckInt(puid));
|
|
|
+ Users puser = db.Users.FirstOrDefault(m => m.Id == puidNum) ?? new Users();
|
|
|
+ if(puser.LeaderLevel > 0 && getFlag)
|
|
|
+ {
|
|
|
+ UserAccount pacccount = db.UserAccount.FirstOrDefault(m => m.Id == puidNum) ?? new UserAccount();
|
|
|
+ if(pacccount.LeaderReserve >= 400 * pro.ProductCount)
|
|
|
+ {
|
|
|
+ //获得100元奖励
|
|
|
+ OpAccount(db, order, puidNum, 100, pro.ProductCount);
|
|
|
+ getFlag = false;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
else if(user.UserType == 1)
|