public OkObjectResult Put(string id, string sName, string sMoudleid, string sLinkurl, string sController, string sAction) { if (string.IsNullOrEmpty(id)) { return(JsonRes.Fail("id无效")); } VsSysApiModule pExist = _apiModuleService.QueryByID(id); if (pExist == null) { return(JsonRes.Fail("接口不存在")); } pExist.SName = sName; pExist.SModuleid = sMoudleid; pExist.SLinkurl = sLinkurl; pExist.SController = sController; pExist.SAction = sAction; string error = ""; int res = _apiModuleService.TryUpdate(out error, pExist); if (res == 0) { return(JsonRes.Fail(pExist, error)); } return(JsonRes.Success(pExist)); }