/// <summary> /// 抓取消息推送消息 /// </summary> /// <returns></returns> public ActionResult FetchJDMessage(int?paymentCompanyId, string type) { JDMessageOut json = null; if (paymentCompanyId > 0) { json = _jdService.FetchJDMessage(paymentCompanyId.Value, type); } else { json = _jdService.FetchJDMessage(type); } return(Content(JsonConvert.SerializeObject(json))); }
private JDMessageOut FetchJDMessageByToken(string token, string type) { var result = new JDMessageOut(); string typeStr = string.Empty; if (!string.IsNullOrEmpty(type)) { typeStr = $"&type={type}"; } string str = CallApi("https://bizapi.jd.com/api/message/get", $"token={token}{typeStr}"); result.Json = str; return(result); }