Browse Source

进件的oprInvitedCode区分

lcl 3 months ago
parent
commit
2ae8c63e01
2 changed files with 19 additions and 7 deletions
  1. 4 4
      Entity/HaoDa/HaodaParam.cs
  2. 15 3
      Util/HaoDa/HaoDaHelper.cs

+ 4 - 4
Entity/HaoDa/HaodaParam.cs

@@ -10,14 +10,14 @@ namespace MySystem
     public static class HaodaParam
     {
         public static string BoxRequestUrl = "https://openapi.iboxpay.com";
-        // public static string BoxAppId = "AP8322645764893728768";
-        // public static string BoxAppSecret = "je1TElprp3jzWETsG3FcWqtmpreEHqZS";
+        public static string BoxAppId = "AP8322645764893728768";
+        public static string BoxAppSecret = "je1TElprp3jzWETsG3FcWqtmpreEHqZS";
         public static string BoxPublicKey = "";
         public static string BrhCode = "015001";
 
         //应用名称:好哒-卢爱香
-        public static string BoxAppId = "AP5855193046968590336";
-        public static string BoxAppSecret = "m6V23Bss6JX2xeM12TUnls8HGuh4kpzT";
+        // public static string BoxAppId = "AP5855193046968590336";
+        // public static string BoxAppSecret = "m6V23Bss6JX2xeM12TUnls8HGuh4kpzT";
 
         public static void GetBoxInfo()
         {

+ 15 - 3
Util/HaoDa/HaoDaHelper.cs

@@ -56,7 +56,19 @@ namespace MySystem
             if (BrandId == 1)
             {
                 BoxRequestUrl = HaodaParam.BoxRequestUrl;
-                request.oprInvitedCode = "T1715836";
+                string oprInvitedCode = "";
+                if (BrandId == 1)
+                {
+                    if(string.IsNullOrEmpty(RedisDbconn.Instance.Get<string>("AgentInvitedCode:" + AgentTag)))
+                    {
+                        oprInvitedCode = RedisDbconn.Instance.Get<string>("AgentInvitedCode:1");
+                    }
+                    else
+                    {
+                        oprInvitedCode = RedisDbconn.Instance.Get<string>("AgentInvitedCode:" + AgentTag);
+                    }
+                }
+                request.oprInvitedCode = oprInvitedCode;
             }
 
             // request.brh = BrhCode;
@@ -741,8 +753,8 @@ namespace MySystem
             {
                 if(string.IsNullOrEmpty(RedisDbconn.Instance.Get<string>("AgentAppId:" + Agent)))
                 {
-                    BoxAppId = HaodaParam.BoxAppId;
-                    BoxAppSecret = HaodaParam.BoxAppSecret;
+                    BoxAppId = RedisDbconn.Instance.Get<string>("AgentAppId:1");
+                    BoxAppSecret = RedisDbconn.Instance.Get<string>("AgentAppSecret:1");
                 }
                 else
                 {