Browse Source

盛付通扣交易押金要保证扣第一条

lcl 1 year ago
parent
commit
ef04ad1d89
1 changed files with 9 additions and 1 deletions
  1. 9 1
      AppStart/Helper/SycnSpServer/SycnSpTradeService.cs

+ 9 - 1
AppStart/Helper/SycnSpServer/SycnSpTradeService.cs

@@ -360,7 +360,15 @@ namespace MySystem
                                             decimal deposit = decimal.Parse(function.CheckNum(pos.SeoKeyword));
                                             if (deposit > 0)
                                             {
-                                                TradeAmount -= deposit;
+                                                PxcModels.TradeRecord chk = db.TradeRecord.FirstOrDefault(m => m.SnNo == pos.PosSn);
+                                                if(chk == null)
+                                                {
+                                                    TradeAmount -= deposit;
+                                                }
+                                                else
+                                                {
+                                                    chk.TradeAmount -= deposit;
+                                                }
                                                 pos.Sort = 1;
                                             }
                                         }