Explorar o código

助力增加的1%取整

lichunlei %!s(int64=3) %!d(string=hai) anos
pai
achega
fcaa1a80f6
Modificáronse 1 ficheiros con 10 adicións e 1 borrados
  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);