Browse Source

开启联客宝费率和服务费设置

lcl 1 year ago
parent
commit
0fed8b6f87
3 changed files with 46 additions and 10 deletions
  1. 23 2
      AppStart/Helper/ChangePosFeeUtil.cs
  2. 18 3
      AppStart/Helper/SetDepositPostService.cs
  3. 5 5
      Startup.cs

+ 23 - 2
AppStart/Helper/ChangePosFeeUtil.cs

@@ -507,7 +507,28 @@ namespace MySystem
         #region POSP-设置押金
         public static string SetPosPDeposit(string SnIds, string DepositId)
         {
-            // string DepositId = "299";
+            string policy_code = "";
+            string policy_name = "";
+            if(DepositId == "0")
+            {
+                policy_code = "LKB_000";
+                policy_name = "联客宝";
+            }
+            else if(DepositId == "99")
+            {
+                policy_code = "LKB_99";
+                policy_name = "联客宝";
+            }
+            else if(DepositId == "199")
+            {
+                policy_code = "LKB_199";
+                policy_name = "联客宝";
+            }
+            else if(DepositId == "299")
+            {
+                policy_code = "LKB_299";
+                policy_name = "联客宝299押金";
+            }
             string check = RedisDbconn.Instance.Get<string>("SetPosPDepositWait:" + SnIds);
             if (!string.IsNullOrEmpty(check))
             {
@@ -528,7 +549,7 @@ namespace MySystem
                 function.WriteLog(DateTime.Now.ToString() + ":请求参数," + pos.PosSn + ":" + DepositId, "POSP-设置押金-返回报文");
                 List<string> PosList = new List<string>();
                 PosList.Add(pos.PosSn);
-                string content = PublicImportDataService.Instance.PospServiceFee(PosList, DepositId, "");
+                string content = PublicImportDataService.Instance.PospServiceFee(PosList, policy_code, policy_name);
                 function.WriteLog(DateTime.Now.ToString() + "\n" + content, "POSP-设置押金-返回报文");
                 if (content == "fail")
                 {

+ 18 - 3
AppStart/Helper/SetDepositPostService.cs

@@ -352,9 +352,24 @@ namespace MySystem
                                     {
                                         List<string> merno = new List<string>();
                                         merno.Add(merchant.KqMerNo);
-                                        string plan_id = "";
-                                        string plan_name = "";
-                                        string content = PublicImportDataService.Instance.PospFee(merno, plan_id, plan_name);
+                                        string policy_code = "";
+                                        string policy_name = "";
+                                        if(Kind == 1)
+                                        {
+                                            policy_code = "LKB_0.63+3";
+                                            policy_name = "联客宝";
+                                        }
+                                        else if(Kind == 2)
+                                        {
+                                            policy_code = "LKB_0.63+0";
+                                            policy_name = "联客宝0.63+0";
+                                        }
+                                        else if(Kind == 3)
+                                        {
+                                            policy_code = "LKB_0.6+0";
+                                            policy_name = "联客宝0.6+0";
+                                        }
+                                        string content = PublicImportDataService.Instance.PospFee(merno, policy_code, policy_name);
                                         JsonData obj = JsonMapper.ToObject(content);
                                         if(obj["code"].ToString() == "200")
                                         {

+ 5 - 5
Startup.cs

@@ -147,11 +147,11 @@ namespace MySystem
             }
             if(Library.ConfigurationManager.EnvironmentFlag == 2)
             {
-                // SetFeeFlagService.Instance.Start(); //85天提前通知创客费率调升消息
-                // SetDepositService.Instance.Start(); //调整费率(通知、标记)
-                // SetDepositPostService.Instance.Start(); //提交支付公司设置费率接口
-                // SetDepositPostService.Instance.StartKdb(); //监控开店宝费率设置结果
-                // ChangePosFeeQueue.Instance.StartEverTime(); //设置服务费
+                SetFeeFlagService.Instance.Start(); //85天提前通知创客费率调升消息
+                SetDepositService.Instance.Start(); //调整费率(通知、标记)
+                SetDepositPostService.Instance.Start(); //提交支付公司设置费率接口
+                SetDepositPostService.Instance.StartKdb(); //监控开店宝费率设置结果
+                ChangePosFeeQueue.Instance.StartEverTime(); //设置服务费
             }
         }