Kaynağa Gözat

后台解绑,金控暂时不填商户号

lichunlei 3 yıl önce
ebeveyn
işleme
c38d9cc464

+ 10 - 10
Areas/Admin/Controllers/MainServer/SysToolsController.cs

@@ -1488,30 +1488,30 @@ namespace MySystem.Areas.Admin.Controllers
             {
                 return "请输入创客编号";
             }
-            if (string.IsNullOrEmpty(MerNo))
-            {
-                return "请输入商户编号";
-            }
             MachineForSnNo forSnNo = db.MachineForSnNo.FirstOrDefault(m => m.SnNo == PosSn);
             if (forSnNo == null)
             {
                 return "机具SN不存在";
             }
+            PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == forSnNo.SnId);
+            if (pos == null)
+            {
+                return "机具SN不存在";
+            }
+            if (string.IsNullOrEmpty(MerNo) && pos.BrandId != 1 && pos.BrandId != 3)
+            {
+                return "请输入商户编号";
+            }
             UserForMakerCode forMakerCode = db.UserForMakerCode.FirstOrDefault(m => m.MakerCode == MakerCode);
             if (forMakerCode == null)
             {
                 return "创客不存在";
             }
             MachineForMerNo forMerNo = db.MachineForMerNo.FirstOrDefault(m => m.MerNo == MerNo);
-            if (forMerNo == null)
+            if (forMerNo == null && pos.BrandId != 1 && pos.BrandId != 3)
             {
                 return "商户编号不存在";
             }
-            PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == forSnNo.SnId && m.Id == forMerNo.SnId);
-            if (pos == null)
-            {
-                return "机具SN不存在";
-            }
             if (pos.BuyUserId != forMakerCode.UserId)
             {
                 return "机具SN和创客不匹配";

+ 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 = '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)
             {
                 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)
                 {
                     string datatype = column["DATA_TYPE"].ToString();

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


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


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


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