public IHttpActionResult UpdateStock(string userId, string shopNo, int takeType, [FromBody] JArray data) { try { if (takeType == 0) { MtFoodApiService service = new MtFoodApiService(userId, shopNo); var res = service.SkuStock(data); return(Json(res)); } else { EleFoodService service = new EleFoodService(); var res = service.SkuStock(userId, shopNo, data); return(Json(res)); } } catch (Exception e) { _log.DebugFormat("【系统错误】UpdateStock 信息{0}", e.Message); _log.DebugFormat("【系统错误】UpdateStock 信息{0}", e.GetOriginalException().Message); return(Json(Tools.ResultErr(e.Message))); } }
public IHttpActionResult GetFood(string userId, string shopNo, int takeType) { try { if (takeType == 0) { MtFoodApiService service = new MtFoodApiService(userId, shopNo); var res = service.List(); return(Json(res)); } else { EleFoodService service = new EleFoodService(); var res = service.List(userId, shopNo); return(Json(res)); } } catch (Exception e) { _log.DebugFormat("【系统错误】类型:GetFood 信息{0}", e.Message); _log.DebugFormat("【系统错误】类型:GetFood 信息{0}", e.GetOriginalException().Message); return(Json(Tools.ResultErr(e.Message))); } }