ListLong dataIds = pubDataListTableMapperselectListqueryWrapperstreammapPubDataListTablegetDataIdcollectCollectorstoList;代码含义
这段代码的含义是:
- 通过使用
pubDataListTableMapper对象调用selectList(queryWrapper)方法,从数据库中查询数据并返回一个列表。 - 使用
stream()方法将列表转换为流。 - 使用
map()方法将每个PubDataListTable对象转换为其对应的dataId属性值。 - 使用
collect()方法将转换后的dataId值收集到一个新的List<Long>对象中。 - 最后,将收集到的
dataIds列表返回。
原文地址: https://www.cveoy.top/t/topic/iruF 著作权归作者所有。请勿转载和采集!