public async Task <IActionResult> DeleteDepartment(Guid id) { try { if (!await _manager.DeleteDepartment(id)) { return(Ok(new JsonMessageResult("创建失败!", 0, null))); } return(NoContent()); } catch (Exception e) { _logger.LogError(e, e.Message); return(Ok(new JsonMessageResult(e.Message, 0, null))); } }