Beispiel #1
0
        /// <summary>
        /// 角色绑定多个用户
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public async Task <IActionResult> OnPostBindUser([FromBody] RoleBindUsersInputDto input)
        {
            var success = await this._userRoleService.CreateRoleUsersAsync(input.RoleId, input.UserIds);

            return(new JsonResult(new { success, message = success ? "绑定成功" : "绑定失败" }));
        }
Beispiel #2
0
        public async Task <IActionResult> BindUserAsync([FromBody] RoleBindUsersInputDto input)
        {
            var success = await this._userRoleService.CreateRoleUsersAsync(input.RoleId, input.UserIds);

            return(Json(success, null, success ? "绑定成功" : "绑定失败"));
        }