-1
public Flux<PortCall> updateByFindById(String gsisKey, PortCall portCall) {
    return portCallRepository.findAllByVesselCode(portCall.getVesselCode())
            .collectList().flatMap(list->{
                return portCallRepository.saveAll(Flux.fromIterable(list));
            });
                    
}

在这里,我试图调用 SimpleReactiveMongoRepository 的 saveAll() 即 public Flux saveAll(Iterable entity)

4

1 回答 1

0

你不想:

public Flux<PortCall> updateByFindById(String gsisKey, PortCall portCall) {
    return portCallRepository.saveAll(
         portCallRepository.findAllByVesselCode(portCall.getVesselCode())
    );
}
于 2021-01-31T16:04:58.037 回答