Browse Source

Merge branch 'feature-dgy-进件区分银联品牌' into feature-dgy-功能测试

DuGuYang 6 months ago
parent
commit
4ec549a3ff

+ 5 - 1
Util/HaoDa/CheckWeChatSignService.cs

@@ -71,8 +71,12 @@ namespace MySystem
                 var mId = int.Parse(query.MerchantId);
                 WebCMSEntities db = new WebCMSEntities();
                 MerchantAddInfo merchantadd = db.MerchantAddInfo.FirstOrDefault(m => m.Id == mId);
+
+                var BrhCode = HaodaUnionParam.BrhCode;
+                if (merchantadd.BrandId == 1) BrhCode = HaodaParam.BrhCode;
+
                 //查询商户审核状态
-                var returnInfo = HaoDaHelper.Instance.QueryMerchantStatus(HaoDaHelper.BrhCode, query.MerchantNo, merchantadd.BrandId);
+                var returnInfo = HaoDaHelper.Instance.QueryMerchantStatus(BrhCode, query.MerchantNo, merchantadd.BrandId);
                 JsonData dic = JsonMapper.ToObject(returnInfo);
                 //审核成功(1- 待审核 2 -审核中 3 -审核被拒绝 4 -审核通过 6 -待复核)
                 if (dic["data"]["code"].ToString() == "4" && !string.IsNullOrEmpty(dic["data"]["storeNo"].ToString()) && !string.IsNullOrEmpty(dic["data"]["outMchtNo"].ToString()))

+ 3 - 1
Util/HaoDa/GetStoreNoHelper.cs

@@ -55,9 +55,11 @@ namespace MySystem
                 MerchantInfo merInfo = db.MerchantInfo.FirstOrDefault(m => m.Id == Id) ?? new MerchantInfo();
                 if (string.IsNullOrEmpty(AddInfo.StoreNo) && string.IsNullOrEmpty(AddInfo.OutMchtNo))
                 {
+                    var BrhCode = HaodaUnionParam.BrhCode;
+                    if (AddInfo.BrandId == 1) BrhCode = HaodaParam.BrhCode;
 
                     //查询商户审核状态
-                    var returnInfo = HaoDaHelper.Instance.QueryMerchantStatus(HaoDaHelper.BrhCode, AddInfo.MchtNo, AddInfo.BrandId);
+                    var returnInfo = HaoDaHelper.Instance.QueryMerchantStatus(BrhCode, AddInfo.MchtNo, AddInfo.BrandId);
                     var check = false;
                     JsonData jsonObj = JsonMapper.ToObject(returnInfo);
                     if (jsonObj["resultCode"].ToString() == "1")

+ 11 - 6
Util/HaoDa/HaoDaHelper.cs

@@ -32,11 +32,11 @@ namespace MySystem
         // string BrhCode = "001040";
 
         //生产环境
-        string BoxRequestUrl = "https://openapi.iboxpay.com";
-        string BoxAppId = "AP7175619323825451008";
-        string BoxAppSecret = "hUfR53gdjyfiZTBR5bILanMqRD1dXD7y";
-        string BoxPublicKey = "";
-        public static string BrhCode = "030145";
+        // string BoxRequestUrl = "https://openapi.iboxpay.com";
+        // string BoxAppId = "AP7175619323825451008";
+        // string BoxAppSecret = "hUfR53gdjyfiZTBR5bILanMqRD1dXD7y";
+        // string BoxPublicKey = "";
+        // public static string BrhCode = "030145";
 
         // string BoxRequestUrl = "https://openapi.iboxpay.com";
         // string BoxAppId = "AP8322645764893728768";
@@ -672,7 +672,12 @@ namespace MySystem
         public Dictionary<string, string> GetHeader(string req, int BrandId = 0)
         {
             var BoxAppId = HaodaUnionParam.BoxAppId;
-            if (BrandId == 1) BoxAppId = HaodaParam.BoxAppId;
+            var BoxAppSecret = HaodaUnionParam.BoxAppSecret;
+            if (BrandId == 1)
+            {
+                BoxAppId = HaodaParam.BoxAppId;
+                BoxAppSecret = HaodaParam.BoxAppSecret;
+            }
 
             Dictionary<string, string> headdic = new Dictionary<string, string>();
             string timestamp = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");

+ 4 - 1
Util/HaoDa/TestHaoDaService.cs

@@ -211,7 +211,10 @@ namespace MySystem
         {
             WebCMSEntities db = new WebCMSEntities();
             MerchantAddInfo AddInfo = db.MerchantAddInfo.FirstOrDefault(m => m.Id == MerchantId);
-            var returnInfo = HaoDaHelper.Instance.QueryMerchantStatus(HaoDaHelper.BrhCode, AddInfo.MchtNo);
+
+            var BrhCode = HaodaUnionParam.BrhCode;
+            if (AddInfo.BrandId == 1) BrhCode = HaodaParam.BrhCode;
+            var returnInfo = HaoDaHelper.Instance.QueryMerchantStatus(BrhCode, AddInfo.MchtNo);
             // string result = HaoDaHelper.Instance.AddNewMerchant(AddNewMerchantSetUtil.SetValue(AddInfo));
             db.Dispose();
         }