Przeglądaj źródła

新进件的商户才指定通道参数

lcl 8 miesięcy temu
rodzic
commit
de71e6a221

+ 11 - 6
Areas/Api/Controllers/Main/MerchantAddInfoController.cs

@@ -247,6 +247,7 @@ namespace MySystem.Areas.Api.Controllers.v1
             Dictionary<string, object> Obj = new Dictionary<string, object>();
             Dictionary<string, object> Fields = new Dictionary<string, object>();
             bool OldFlag = false;
+            bool IsAdd = false;
             if (MerchantAddInfoId == 0)
             {
                 if (SubjectType == "SUBJECT_TYPE_SMALL")
@@ -280,6 +281,7 @@ namespace MySystem.Areas.Api.Controllers.v1
                         return new AppResultJson() { Status = "-1", Info = "该商户已进件", Data = Obj };
                     }
                 }
+                IsAdd = true;
             }
             else
             {
@@ -410,13 +412,16 @@ namespace MySystem.Areas.Api.Controllers.v1
             Fields.Add("BrandId", BrandId); // 品牌(0 银联 1 好哒)
             Fields.Add("CybMakerCode", CybMakerCode); //创业帮创客编号
             Fields.Add("FeeRate", SettleFee); //费率
-            if(OldFlag)
+            if(IsAdd)
             {
-                Fields.Add("AgentName", "1"); //机构类型
-            }
-            else
-            {
-                Fields.Add("AgentName", function.CheckNull(RedisDbconn.Instance.Get<string>("PublicAgentName"))); //机构类型
+                if(OldFlag)
+                {
+                    Fields.Add("AgentName", "1"); //机构类型
+                }
+                else
+                {
+                    Fields.Add("AgentName", function.CheckNull(RedisDbconn.Instance.Get<string>("PublicAgentName"))); //机构类型
+                }
             }
             
             MerchantAddInfoId = (int)MerchantInfoUtil.EditMerchantInfo(MerchantAddInfoId, UserId, CertMerchantName, MobilePhone, BizAddressCode, BizStoreAddress, BindStatus, BrandId, CybMakerCode).Data;