JoinedStreams.Where.EqualTo equalTo = paymentInfo.join(orderInfo) .where(new KeySelector<PaymentInfo, Long>() { @Override public Long getKey(PaymentInfo paymentInfo) throws Exception { return paymentInfo.getId(); } }).equalTo(new KeySelector<OrderInfo, Long>() { @Override public Long getKey(OrderInfo orderInfo) throws Exception { return orderInfo.getId(); } });

    equalTo.print();
Java 使用 JoinedStreams 实现 PaymentInfo 和 OrderInfo 的 ID 匹配

原文地址: https://www.cveoy.top/t/topic/otim 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录