瀏覽代碼

助力增加的1%取整

lichunlei 3 年之前
父節點
當前提交
fcaa1a80f6
共有 1 個文件被更改,包括 10 次插入1 次删除
  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);