public IActionResult Authorize(int id, AuthorizeRoleViewModel model) { model = new AuthorizeRoleViewModel() { Id = id }; return(View("_Authorize", model)); }
public IActionResult Authorize(AuthorizeRoleViewModel model) { _roleAppService.SetPermissions(model.Id, model.PermissionCodes); return(Json(new JsonResultEntity() { Message = "设置权限成功!", JsonObject = Json(new RoleViewModel() { Id = model.Id, LastModificationTime = DateTime.Now.ToStandardDateOfChina() }) })); }