函数式接口在实际的应用

141 阅读1分钟

image.png

image.png

remoteProductInfoAgentService::getProductInfoAgentListByProdectNoList

image.png

remoteProductInfoService::getProductInfoListByProdectNoList

image.png

是传入相同类型的参数 返回相同类型的对象 这样使用

List<ProductResponseVo> list = productFunc.apply(productBaseVoList).getData();

就完成了可以传入不同的接口 进行 处理,不然每个接口都要写一个方法获取返回值在进行处理或者 用一个类型参数进行区分。