Quellcode durchsuchen

购机奖励类型设置问题

lcl vor 1 Jahr
Ursprung
Commit
24b4b1a3bb
1 geänderte Dateien mit 3 neuen und 12 gelöschten Zeilen
  1. 3 12
      AppStart/Helper/PosCouponPrize/PosCouponPrizeService.cs

+ 3 - 12
AppStart/Helper/PosCouponPrize/PosCouponPrizeService.cs

@@ -111,7 +111,7 @@ namespace MySystem
                         {
                             //购机奖
                             decimal CurBuyPrize = GetBuyPrize(parentUser);
-                            OpAccount(db, order.Id, parentUser.Id, CurBuyPrize - BuyPrize, order.BuyCount);
+                            OpAccount(db, order.Id, parentUser.Id, CurBuyPrize - BuyPrize, order.BuyCount, 120);
                             BuyPrizeFlag = true;
                             BuyPrize = CurBuyPrize;
 
@@ -124,7 +124,7 @@ namespace MySystem
                         {
                             //购机奖
                             decimal CurBuyPrize = GetBuyPrize(parentUser);
-                            OpAccount(db, order.Id, parentUser.Id, CurBuyPrize - BuyPrize, order.BuyCount);
+                            OpAccount(db, order.Id, parentUser.Id, CurBuyPrize - BuyPrize, order.BuyCount, 118);
                             BuyPrizeFlag = true;
                             BuyPrize = CurBuyPrize;
 
@@ -372,7 +372,7 @@ namespace MySystem
         /// <param name="UserId"></param>
         /// <param name="Money"></param>
         /// <param name="Count"></param>
-        public void OpAccount(WebCMSEntities db, int OrderId, int UserId, decimal Money, int Count = 1)
+        public void OpAccount(WebCMSEntities db, int OrderId, int UserId, decimal Money, int Count = 1, int ChangeType = 0)
         {
             UserAccount account = db.UserAccount.FirstOrDefault(m => m.Id == UserId);
             if (account == null)
@@ -384,15 +384,6 @@ namespace MySystem
                 }).Entity;
                 db.SaveChanges();
             }
-            int ChangeType = 0;
-            if(Money == 600)
-            {
-                ChangeType = 117;
-            }
-            else if(Money == 100)
-            {
-                ChangeType = 118;
-            }
             decimal BeforeTotalAmount = account.TotalAmount; //变更前总金额
             decimal BeforeFreezeAmount = account.FreezeAmount; //变更前冻结金额
             decimal BeforeBalanceAmount = account.BalanceAmount; //变更前余额