public ActionResult ConfigureResource(int resourceId) { if(resourceId<=0) { ViewBag.Message = "落地资源编号不正确"; return View("Error"); } ResourceConfigModel model = new ResourceConfigModel() { Id=0,ResoucedId=resourceId}; resourceMgt = new ResourceManagement(User.Identity.GetUserId<int>()); if(!resourceMgt.CurrentLoginUser.Permission.CONFIGURE_RESOURCE) { ViewBag.Message = "没有权限配置落地资源接口信息"; return View("Error"); } try { KMBit.DAL.Resrouce_interface api = resourceMgt.GetResrouceInterface(resourceId); if (api != null) { model.Id = api.Id; model.InterfaceName = api.Interface_classname; model.Password = KMAes.DecryptStringAES(api.Userpassword); model.UserName = api.Username; model.ResoucedId = api.Resource_id; model.ApiUrl = api.APIURL; model.CallBack = api.CallBackUrl; model.ProductFetchUrl = api.ProductApiUrl; model.AppSecret = api.AppSecret; model.AppKey = api.AppKey; model.GetTokenURL = api.GetTokenUrl; model.QueryStatusURL = api.QueryStatusUrl; model.InterfaceAssemblyName = api.Interface_assemblyname; } } catch (KMBitException ex) { ViewBag.Message = ex.Message; return View("Error"); } return View(model); }