Explorar el Código

批量设置金控费率

lcl hace 8 meses
padre
commit
f166e7f707
Se han modificado 2 ficheros con 26 adiciones y 15 borrados
  1. 23 14
      AppStart/Helper/TmpService.cs
  2. 3 1
      Controllers/HomeController.cs

+ 23 - 14
AppStart/Helper/TmpService.cs

@@ -91,6 +91,15 @@ namespace MySystem
                 List<int> merids = new List<int>();
                 List<string> mernos = new List<string>();
 
+                //金控
+                poslist = function.ReadInstance("tmpdata/jk.txt").Replace("\r", "").Split('\n').ToList();
+                foreach(string pos in poslist)
+                {
+                    string result = PublicImportDataService.Instance.LkbSetFee(pos, 2.99M, 300);
+                    function.WriteLog(pos + "\n" + result + "\n\n", "tmp金控临时费率");
+                    Thread.Sleep(500);
+                }
+
                 // //盛付通
                 // poslist = function.ReadInstance("tmpdata/1.txt").Replace("\r", "").Split('\n').ToList();
                 // List<string> without1 = function.ReadInstance("tmpdata/sft1.txt").Replace("\r", "").Split('\n').ToList();
@@ -186,20 +195,20 @@ namespace MySystem
                 // }
 
                 //立刷微电签
-                poslist = function.ReadInstance("tmpdata/lswdq.txt").Split('\n').ToList();
-                var poses = db.KxsMachine.Where(m => poslist.Contains(m.PosSn) && m.BrandId == 22 && m.MerchantId > 0).ToList();
-                merids = poses.Select(m => m.MerchantId).ToList();
-                var mers = db.KxsMerchant.Where(m => merids.Contains(m.Id)).ToList();
-                foreach(var pos in poses)
-                {
-                    var mer = mers.FirstOrDefault(m => m.Id == pos.MerchantId);
-                    if(mer != null)
-                    {
-                        string result = PublicImportDataService.Instance.SetLiSWeFee(pos.PosSn, mer.MerchantNo, "0.63", "300");
-                        function.WriteLog(pos.PosSn + "\n" + mer.MerchantNo + "\n" + result + "\n\n", "tmp立刷微电签临时费率");
-                        Thread.Sleep(500);
-                    }
-                }
+                // poslist = function.ReadInstance("tmpdata/lswdq.txt").Split('\n').ToList();
+                // var poses = db.KxsMachine.Where(m => poslist.Contains(m.PosSn) && m.BrandId == 22 && m.MerchantId > 0).ToList();
+                // merids = poses.Select(m => m.MerchantId).ToList();
+                // var mers = db.KxsMerchant.Where(m => merids.Contains(m.Id)).ToList();
+                // foreach(var pos in poses)
+                // {
+                //     var mer = mers.FirstOrDefault(m => m.Id == pos.MerchantId);
+                //     if(mer != null)
+                //     {
+                //         string result = PublicImportDataService.Instance.SetLiSWeFee(pos.PosSn, mer.MerchantNo, "0.63", "300");
+                //         function.WriteLog(pos.PosSn + "\n" + mer.MerchantNo + "\n" + result + "\n\n", "tmp立刷微电签临时费率");
+                //         Thread.Sleep(500);
+                //     }
+                // }
             }
             catch(Exception ex)
             {

+ 3 - 1
Controllers/HomeController.cs

@@ -66,7 +66,9 @@ namespace MySystem.Controllers
             // data = PublicImportDataService.Instance.LkbDecrypt(data);
             // return s + "\n<br>" + data;
 
-            string content = PublicImportDataService.Instance.PospQueryFee();
+            string content = PublicImportDataService.Instance.LkbSetFee("00003102722201179804033", 2.53M, 300);
+            // string content = "F4K6EBy2nJBmRtSsdG36f/o2+6Bt/1DU9nKgw93qexqmj83gNmTNOw5TIaiA5aIE+yFV6WDQpFkgWZ/s3E6R15w6W1lr6OVg1f9soFqvSe7JWmUBSc1scb5i8qrm5JHEmA8jsQGOVOb+QH3XvmgSxX2rQvv6WEe1F2UqiabEuM4=";
+            // content = PublicImportDataService.Instance.LkbDecrypt(content);
             
             return content;
         }