public IActionResult Post(RowsMode.Request request) { try { SiteService.RowsService service = new SiteService.RowsService(); // Request验证 if (request == null) { throw new Exception("Request无效!"); } // 指向具体执行的方法 switch (request.Function.Name.ToLower()) { default: if (string.IsNullOrEmpty(request.Function.Name) || request.Function.Name.ToLower().Equals("bykeyword")) { return(base.ResponseOk( request.ToResponse( service.ByKeyWord(request.Function.Args[0] ?? "", ToParams(request.Function.Args, 1)) ) )); } else { throw new Exception("未发现对应函数方法!"); } } } catch (Exception ex) { throw ex; } }
public IActionResult Post(RowsMode.Request request) { try { StatusService.RowsService service = new StatusService.RowsService(); // Request验证 if (request == null) { throw new Exception("Request无效!"); } // 指向具体执行的方法 switch (request.Function.Name.ToLower()) { case "bypid": return(base.ResponseOk( request.ToResponse( service.ByPid(ParseInt(request.Function.Args[0] ?? "")) ) )); case "bypath": return(base.ResponseOk( request.ToResponse( service.ByPath(request.Function.Args[0] ?? "") ) )); default: if (string.IsNullOrEmpty(request.Function.Name)) { return(base.ResponseOk( request.ToResponse( service.ByKeyWord(request.Function.Args[0] ?? "") ) )); } else { throw new Exception("未发现对应函数方法!"); } } } catch (Exception ex) { throw ex; } }
public IActionResult Post(RowsMode.Request request) { try { UserPowerService.RowsService service = new UserPowerService.RowsService(); // Request验证 if (request == null) { throw new Exception("Request无效!"); } // 指向具体执行的方法 switch (request.Function.Name.ToLower()) { case "byregistryid": return(base.ResponseOk( request.ToResponse( service.ByRegistryId(ParseInt(request.Function.Args[0] ?? ""), ToParams(request.Function.Args, 1)) ) )); default: if (string.IsNullOrEmpty(request.Function.Name) || request.Function.Name.ToLower().Equals("byuserid")) { return(base.ResponseOk( request.ToResponse( service.ByUserId(ParseInt(request.Function.Args[0] ?? ""), ToParams(request.Function.Args, 1)) ) )); } else { throw new Exception("未发现对应函数方法!"); } } } catch (Exception ex) { throw ex; } }
public IActionResult Post(RowsMode.Request request) { try { TaskService.RowsService service = new TaskService.RowsService(); // Request验证 if (request == null) { throw new Exception("Request无效!"); } // 指向具体执行的方法 switch (request.Function.Name.ToLower()) { case "bytypeid": return(base.ResponseOk( request.ToResponse( service.ByTypeId(ParseInt(request.Function.Args[0] ?? ""), ToParams(request.Function.Args, 1)) ) )); case "bycustomerid": return(base.ResponseOk( request.ToResponse( service.ByCustomerId(ParseInt(request.Function.Args[0] ?? ""), ToParams(request.Function.Args, 1)) ) )); case "byreceptionid": return(base.ResponseOk( request.ToResponse( service.ByReceptionId(ParseInt(request.Function.Args[0] ?? ""), ToParams(request.Function.Args, 1)) ) )); case "bysiteid": return(base.ResponseOk( request.ToResponse( service.BySiteId(ParseInt(request.Function.Args[0] ?? ""), ToParams(request.Function.Args, 1)) ) )); case "byvenueid": return(base.ResponseOk( request.ToResponse( service.ByVenueId(ParseInt(request.Function.Args[0] ?? ""), ToParams(request.Function.Args, 1)) ) )); default: if (string.IsNullOrEmpty(request.Function.Name) || request.Function.Name.ToLower().Equals("bykeyword")) { return(base.ResponseOk( request.ToResponse( service.ByKeyWord(request.Function.Args[0] ?? "", ToParams(request.Function.Args, 1)) ) )); } else { throw new Exception("未发现对应函数方法!"); } } } catch (Exception ex) { throw ex; } }