Просмотр исходного кода

修复盟主提现成功后重复扣余额

lichunlei 3 лет назад
Родитель
Сommit
40737a51a2
2 измененных файлов с 3 добавлено и 4 удалено
  1. 1 2
      AppStart/ExcelHelper.cs
  2. 2 2
      Startup.cs

+ 1 - 2
AppStart/ExcelHelper.cs

@@ -1026,7 +1026,6 @@ namespace MySystem
                                                     if (account != null)
                                                     if (account != null)
                                                     {
                                                     {
                                                         decimal TradeAmount = edit.TradeAmount;
                                                         decimal TradeAmount = edit.TradeAmount;
-                                                        account.LeaderBalanceAmount -= TradeAmount;
                                                         db.LeaderAccountRecord.Add(new LeaderAccountRecord()
                                                         db.LeaderAccountRecord.Add(new LeaderAccountRecord()
                                                         {
                                                         {
                                                             CreateDate = DateTime.Now,
                                                             CreateDate = DateTime.Now,
@@ -1034,7 +1033,7 @@ namespace MySystem
                                                             ChangeType = 3, //变动类型
                                                             ChangeType = 3, //变动类型
                                                             ProductType = 99, //产品类型
                                                             ProductType = 99, //产品类型
                                                             ChangeAmount = TradeAmount, //变更金额
                                                             ChangeAmount = TradeAmount, //变更金额
-                                                            BeforeBalanceAmount = account.LeaderBalanceAmount + TradeAmount, //变更前余额
+                                                            BeforeBalanceAmount = account.LeaderBalanceAmount, //变更前余额
                                                             AfterBalanceAmount = account.LeaderBalanceAmount, //变更后余额
                                                             AfterBalanceAmount = account.LeaderBalanceAmount, //变更后余额
                                                         });
                                                         });
                                                         db.SaveChanges();
                                                         db.SaveChanges();

+ 2 - 2
Startup.cs

@@ -152,11 +152,11 @@ namespace MySystem
         {
         {
             Dictionary<string, Dictionary<string, string>> tables = new Dictionary<string, Dictionary<string, string>>();
             Dictionary<string, Dictionary<string, string>> tables = new Dictionary<string, Dictionary<string, string>>();
             Library.OtherMySqlConn.connstr = Configuration["Setting:SqlConnStr"];
             Library.OtherMySqlConn.connstr = Configuration["Setting:SqlConnStr"];
-            System.Data.DataTable tablecollection = Library.OtherMySqlConn.dtable("select DISTINCT TABLE_NAME from information_schema.columns where table_schema = 'KxsMainServer2'");
+            System.Data.DataTable tablecollection = Library.OtherMySqlConn.dtable("select DISTINCT TABLE_NAME from information_schema.columns where table_schema = 'KxsMainServer'");
             foreach (System.Data.DataRow subtable in tablecollection.Rows)
             foreach (System.Data.DataRow subtable in tablecollection.Rows)
             {
             {
                 Dictionary<string, string> Columns = new Dictionary<string, string>();
                 Dictionary<string, string> Columns = new Dictionary<string, string>();
-                System.Data.DataTable columncollection = Library.OtherMySqlConn.dtable("select COLUMN_NAME,DATA_TYPE from information_schema.columns where table_schema = 'KxsMainServer2' and TABLE_NAME='" + subtable["TABLE_NAME"].ToString() + "'");
+                System.Data.DataTable columncollection = Library.OtherMySqlConn.dtable("select COLUMN_NAME,DATA_TYPE from information_schema.columns where table_schema = 'KxsMainServer' and TABLE_NAME='" + subtable["TABLE_NAME"].ToString() + "'");
                 foreach (System.Data.DataRow column in columncollection.Rows)
                 foreach (System.Data.DataRow column in columncollection.Rows)
                 {
                 {
                     string datatype = column["DATA_TYPE"].ToString();
                     string datatype = column["DATA_TYPE"].ToString();