Jelajahi Sumber

支付宝开户意愿channel_id判断

lichunlei 1 tahun lalu
induk
melakukan
c36af966a6
1 mengubah file dengan 4 tambahan dan 1 penghapusan
  1. 4 1
      Util/HaoDa/WeChatFunctionForHD.cs

+ 4 - 1
Util/HaoDa/WeChatFunctionForHD.cs

@@ -40,7 +40,10 @@ namespace MySystem
         {
             Dictionary<string, object> result = new Dictionary<string, object>();
             string business_code = DateTime.Now.ToString("yyyyMMddHHmmssfff") + function.get_Random(8);
-            result.Add("channel_id", info.WeChatMerchantId); //渠道商户号
+            if(!string.IsNullOrEmpty(info.WeChatMerchantId))
+            {
+                result.Add("channel_id", info.WeChatMerchantId); //渠道商户号
+            }
             result.Add("business_code", business_code); //业务申请编号
 
             WebCMSEntities dbpxc = new WebCMSEntities();