|
@@ -238,9 +238,48 @@ namespace MySystem.Controllers
|
|
|
// }
|
|
|
// }
|
|
|
// }
|
|
|
- // db.Dispose();
|
|
|
|
|
|
- StatService.Instance.StatUserLevelStartNew();
|
|
|
+ // Orders order = db.Orders.FirstOrDefault(m => m.Id == 357754);
|
|
|
+ // if(order != null)
|
|
|
+ // {
|
|
|
+ // Users user = db.Users.FirstOrDefault(m => m.Id == order.UserId) ?? new Users();
|
|
|
+ // int ParentUserId = user.ParentUserId;
|
|
|
+ // bool buyPrize = false;
|
|
|
+ // bool OncePrizeFlag4 = true;
|
|
|
+ // int leaderFlag = 0;
|
|
|
+ // while (ParentUserId > 0)
|
|
|
+ // {
|
|
|
+ // Users puser = db.Users.FirstOrDefault(m => m.Id == ParentUserId) ?? new Users();
|
|
|
+ // if (puser.LeaderLevel > 0)
|
|
|
+ // {
|
|
|
+ // UserAccount acccount = db.UserAccount.FirstOrDefault(m => m.Id == puser.Id) ?? new UserAccount();
|
|
|
+ // if (acccount.LeaderReserve >= 400 * 1 && !buyPrize)
|
|
|
+ // {
|
|
|
+ // //购机奖励
|
|
|
+ // AlipayPayBack2Service.Instance.OpAccount(db, order, puser.Id, 100, 1);
|
|
|
+ // buyPrize = true;
|
|
|
+ // }
|
|
|
+
|
|
|
+ // if (acccount.LeaderReserve >= 400 * 1 && puser.LeaderLevel > leaderFlag && leaderFlag < 2 && OncePrizeFlag4)
|
|
|
+ // {
|
|
|
+ // //扣减备用金
|
|
|
+ // AlipayPayBack2Service.Instance.OpReserve(db, order, puser.Id, 400 * 1, 2, order.UserId, "购机奖励");
|
|
|
+ // //返回到余额
|
|
|
+ // AlipayPayBack2Service.Instance.OpLeaderAccount(db, order, puser.Id, 400, 1);
|
|
|
+ // leaderFlag = puser.LeaderLevel;
|
|
|
+ // OncePrizeFlag4 = false;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // ParentUserId = puser.ParentUserId;
|
|
|
+ // }
|
|
|
+
|
|
|
+ // decimal Prize = decimal.Parse(function.CheckNum(PublicFunction.GetPublicParam(db, "BigLeaderPrize")));
|
|
|
+ // if(Prize > 0)
|
|
|
+ // {
|
|
|
+ // AlipayPayBack2Service.Instance.LeaderRecommendPrize(db, order, 565, Prize, 122);
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // db.Dispose();
|
|
|
|
|
|
return result;
|
|
|
}
|