Răsfoiți Sursa

修复新建仓库默认增加20000额度

lichunlei 3 ani în urmă
părinte
comite
ec4c7fb042

+ 3 - 1
Areas/Admin/Controllers/MainServer/StoreHouseController.cs

@@ -241,10 +241,12 @@ namespace MySystem.Areas.Admin.Controllers
                         }).Entity;
                         db.SaveChanges();
                     }
-                    if (account.FixedAmount == 0)
+                    if (account.FixedAmount == 0 && account.ValidAmount == 0)
                     {
                         account.FixedAmount = 20000;
+                        account.ValidAmount = 20000;
                     }
+                    
                     RedisDbconn.Instance.Set("StoreForName:" + data.StoreName, Id);
                     AddSysLog(data.Id.ToString(), "StoreHouse", "add");
                     db.SaveChanges();

+ 2 - 2
Startup.cs

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

BIN
bin/Debug/netcoreapp3.0/MySystem.dll


BIN
bin/Debug/netcoreapp3.0/MySystem.pdb


BIN
bin/release/netcoreapp3.0/MySystem.dll


BIN
bin/release/netcoreapp3.0/MySystem.pdb


BIN
obj/Debug/netcoreapp3.0/MySystem.csprojAssemblyReference.cache


BIN
obj/Debug/netcoreapp3.0/MySystem.dll


BIN
obj/Debug/netcoreapp3.0/MySystem.pdb


BIN
obj/release/netcoreapp3.0/MySystem.dll


BIN
obj/release/netcoreapp3.0/MySystem.pdb