/// <summary> /// 创建售后服务单 /// 需要该配送单已经妥投。 /// 需要先调用10.3接口校验订单中某商品是否可以提交售后服务 /// 需要先调用10.4接口查询支持的服务类型 /// 需要先调用10.5接口查询支持的商品返回京东方式 /// </summary> /// <returns></returns> public JDBoolOut AS_CreateAfterSaleOrder(JDAfterSaleIn afterOrder) { afterOrder.NullCheck("afterOrder"); afterOrder.Check(); var result = new JDBoolOut(); var token = GetJdToken(afterOrder.PaymentCompanyId); token.NullCheck("token"); string _params = JsonConvert.SerializeObject(afterOrder); string str = CallApi("https://bizapi.jd.com/api/afterSale/createAfsApply", $"token={token.Access_Token}¶m={_params}"); JDStringlResult json = JsonConvert.DeserializeObject <JDStringlResult>(str); if (json != null) { result.Success = json.success; result.ResultCode = json.resultCode; result.ResultMessage = json.resultMessage; //success为服务单保存状态 result.Data = json.success; } else { _log.InsertLog(LogLevel.Error, "京东-创建服务单异常", str); } return(result); }
public ActionResult AS_CreateAfterSaleOrder(JDAfterSaleIn afterOrder) { return(Content(JsonConvert.SerializeObject(_jdService.AS_CreateAfterSaleOrder(afterOrder)))); }