Browse Source

助力增加的1%取整

lichunlei 3 years ago
parent
commit
fcaa1a80f6
1 changed files with 10 additions and 1 deletions
  1. 10 1
      AppStart/Helper/StatHelpProfitService.cs

+ 10 - 1
AppStart/Helper/StatHelpProfitService.cs

@@ -82,7 +82,16 @@ namespace MySystem
                                     }).Entity;
                                     db.SaveChanges();
                                 }
-                                selfStat.TradeAmount += TradeAmount * 1.01M;
+                                decimal MoreAmount = TradeAmount * 0.01M;
+                                if(MoreAmount > 1)
+                                {
+                                    MoreAmount = decimal.Parse(function.CheckInt(MoreAmount.ToString().Split(".")[0]));
+                                }
+                                else
+                                {
+                                    MoreAmount = 0;
+                                }
+                                selfStat.TradeAmount += TradeAmount + MoreAmount;
                             }
                             OtherMySqlConn.op("update TradeRecord set QueryCount=3 where Id in (" + ids.TrimEnd(',') + ")");
                             function.WritePage("/TradeRecord/", "Id3.txt", startId);