瀏覽代碼

联动批量调粉绿

lcl 2 年之前
父節點
當前提交
71b099abbc
共有 3 個文件被更改,包括 32 次插入7 次删除
  1. 19 1
      AppStart/Timer/TestHelper.cs
  2. 11 6
      Controllers/HomeController.cs
  3. 2 0
      Startup.cs

+ 19 - 1
AppStart/Timer/TestHelper.cs

@@ -16,7 +16,7 @@ public class TestHelper
     
     public void Start()
     {
-        Thread th = new Thread(StartEverDay);
+        Thread th = new Thread(setLdFee);
         th.IsBackground = true;
         th.Start();
     }
@@ -72,4 +72,22 @@ public class TestHelper
         function.WriteLog(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff") + "\n\n", "执行商户交易额日志");
     }
 
+    private void setLdFee()
+    {
+        DataTable dt = CustomerSqlConn.dtable("select KqMerNo,BrandId from PosMerchantInfo where Id in (select BindMerchantId from PosMachinesTwo where BrandId in (10,11) and DownFeeFlag=1 and BindingTime<'2023-08-06 00:00:00')", "server=rm-2vcs4j67tla603c9d5o.mysql.cn-chengdu.rds.aliyuncs.com;port=3306;user=KxsProfitServer;password=FrW8ZfxlcaVdm1r0;database=KxsProfitServer;charset=utf8;");
+        foreach(DataRow dr in dt.Rows)
+        {
+            function.WriteLog(dr["KqMerNo"].ToString(), "临时设置联动费率日志");
+            string result = SetDepositPostService.Instance.LDFeeRate(dr["KqMerNo"].ToString(), "0.0063", int.Parse(dr["BrandId"].ToString()), 0);
+            function.WriteLog(result + "\n\n", "临时设置联动费率日志");
+        }
+        dt = CustomerSqlConn.dtable("select KqMerNo,BrandId from PosMerchantInfo where Id in (select BindMerchantId from PosMachinesTwo where BrandId in (10,11) and DownFeeFlag=0 and BindingTime<'2023-08-06 00:00:00')", "server=rm-2vcs4j67tla603c9d5o.mysql.cn-chengdu.rds.aliyuncs.com;port=3306;user=KxsProfitServer;password=FrW8ZfxlcaVdm1r0;database=KxsProfitServer;charset=utf8;");
+        foreach(DataRow dr in dt.Rows)
+        {
+            function.WriteLog(dr["KqMerNo"].ToString(), "临时设置联动费率日志");
+            string result = SetDepositPostService.Instance.LDFeeRate(dr["KqMerNo"].ToString(), "0.0063", int.Parse(dr["BrandId"].ToString()), 3);
+            function.WriteLog(result + "\n\n", "临时设置联动费率日志");
+        }
+    }
+
 }

+ 11 - 6
Controllers/HomeController.cs

@@ -189,14 +189,19 @@ namespace MySystem.Controllers
 
             // result += SetDepositPostService.Instance.ModifyFee("00005002681889119293", 0.0063M, "3") + "\n\n";
             // result += SetDepositPostService.Instance.SetFeeForSft("39103661", "0.6300", "3") + "\n\n";
-            // result += SetDepositPostService.Instance.LDFeeRate("110000004032435", "0.0063", 10, 3) + "\n\n";
-            // result += SetDepositPostService.Instance.LDFeeRate("110000004008674", "0.0063", 11, 3) + "\n\n";
 
-            string str = "{\"password\":\"admin\",\"phone\":\"1300000000\"}";
-            string resultJson = Encrypt(str, "CBTU1dD4Kd5pyiGWTsI10jRQ3SvKusSV", "DYgjCEIMVrj2W9xN");
-            string ApiResponse = function.GetWebRequest("?value=" + System.Web.HttpUtility.UrlEncode(resultJson));
+            // Dictionary<string, string> headers = new Dictionary<string, string>();
+            // string token = "eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImQyN2E2OGY0NzY0MjRiMzJiNjhhM2JlMTc1ZjQ4OGE3In0.xjKmh1Pu9_DvwI-zpML8Z3oqKs99PQW-9aBg-ru2i-xQZYC3yKEtJ_H1_bcw2byGNnMNXMPRlBoDegLpSebXDA";
+            // headers.Add("Authorization", "Bearer " + token);
+            // string str = "{\"feedback_type\":\"1\",\"content\":\"电饭锅电饭锅大范甘迪\"}";
+            // string resultJson = Encrypt(str, "CBTU1dD4Kd5pyiGWTsI10jRQ3SvKusSV", "DYgjCEIMVrj2W9xN");
+            // string ApiResponse = function.PostWebRequest("http://47.108.118.29:8080/v1/cybmain/feedback/feedSave", resultJson, headers, "application/json");
+            // string ApiResponse = function.GetWebRequest("http://47.108.118.29:8080/v1/cybmain/app/authorization");
+            //{"status":1,"messge":null,"data":{"userId":1,"token":"eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImQyN2E2OGY0NzY0MjRiMzJiNjhhM2JlMTc1ZjQ4OGE3In0.xjKmh1Pu9_DvwI-zpML8Z3oqKs99PQW-9aBg-ru2i-xQZYC3yKEtJ_H1_bcw2byGNnMNXMPRlBoDegLpSebXDA","loginTime":1699331586502,"expireTime":1699417986502,"ipaddr":null,"loginLocation":null,"browser":null,"os":null,"user":null},"other":null,"code":"1","timestamp":null}
 
-            return ApiResponse;
+
+
+            return result;
         }
 
         public string Encrypt(string plainText, string keyString, string ivString)

+ 2 - 0
Startup.cs

@@ -228,6 +228,8 @@ namespace MySystem
                 LeaderApplyCouponsHelper.Instance.Start(); //盟主储蓄金申请机具券打标记
                 DepositReturnService.Instance.Start(); //退押金到支付宝余额
                 StoreApplyHelper.Instance.ResetStoreReserve(); //重置分仓额度
+
+                TestHelper.Instance.Start();
             }