Ejemplo n.º 1
0
        public async Task <MessageModel <string> > Put([FromBody] Permission permission)
        {
            var data = new MessageModel <string>();

            if (permission != null && permission.Id > 0)
            {
                data.success = await _permissionServices.Update(permission);

                await _roleModulePermissionServices.UpdateModuleId(permission.Id, permission.Mid);

                if (data.success)
                {
                    data.msg      = "更新成功";
                    data.response = permission?.Id.ObjToString();
                }
            }

            return(data);
        }