Esempio n. 1
0
        public async Task ModifyRolePermission(ModifyPermission model)
        {
            _memoryCache.Remove("permissions");
            var command = _mapper.Map <ModifyPermissionCommand>(model);
            await _bus.SendCommandAsync(command);

            _memoryCache.Set("permissions", await _permissionRepository.GetAllListAsync());
        }
        public async Task <IActionResult> ModifyPermissionByRoleId([FromBody] ModifyPermission model)
        {
            await _permissionService.ModifyRolePermission(model);

            return(AppResponse(null, "操作成功"));
        }