/// <summary> /// 校验修改操作 /// </summary> /// <param name="entity">实体</param> private async Task ValidateUpdateAsync(Operation entity) { entity.CheckNull(nameof(entity)); if (!await OperationRepository.CanUpdateAsync(entity)) { ThrowUriRepeatException(entity); } if (!await ModuleRepository.ExistsAsync(entity.ModuleId)) { throw new Warning("模块不存在"); } }