|
|
@@ -46,15 +46,16 @@ public class HaoDaAuthQueryHelper
|
|
|
var Id = int.Parse(MerchantId);
|
|
|
WebCMSEntities db = new WebCMSEntities();
|
|
|
MerchantAddInfo info = db.MerchantAddInfo.FirstOrDefault(m => m.Id == Id) ?? new MerchantAddInfo();
|
|
|
- var jsonObj = JsonMapper.ToObject(HaoDaHelper.Instance.QueryAuthStatus(MchtNo, StoreNo, info.BrandId));
|
|
|
+ string result = HaoDaHelper.Instance.QueryAuthStatus(MchtNo, StoreNo, info.BrandId);
|
|
|
+ var jsonObj = JsonMapper.ToObject(result);
|
|
|
//成功(已认证)
|
|
|
if (jsonObj["resultCode"].ToString() == "1")
|
|
|
{
|
|
|
// MerchantInfo merchant = db.MerchantInfo.FirstOrDefault(m => m.Id == Id) ?? new MerchantInfo();
|
|
|
- var wxcheck = jsonObj["wechatVerifyState"].ToString();
|
|
|
- var alicheck = jsonObj["aliVerifyState"].ToString();
|
|
|
- info.WeChatMerchantId = jsonObj["wechatMerchantId"].ToString();
|
|
|
- info.AliMerchantId = jsonObj["aliMerchantId"].ToString();
|
|
|
+ // var wxcheck = jsonObj["wechatVerifyState"].ToString();
|
|
|
+ // var alicheck = jsonObj["aliVerifyState"].ToString();
|
|
|
+ if(result.Contains("\"wechatMerchantId\"")) info.WeChatMerchantId = jsonObj["wechatMerchantId"].ToString();
|
|
|
+ if(result.Contains("\"aliMerchantId\"")) info.AliMerchantId = jsonObj["aliMerchantId"].ToString();
|
|
|
// if (wxcheck == "1")
|
|
|
// {
|
|
|
// info.Status = 2;
|