update 优化代码

Signed-off-by: 秋辞未寒 <545073804@qq.com>
This commit is contained in:
秋辞未寒 2025-01-06 03:39:38 +00:00 committed by Gitee
parent bab860e1a0
commit bd9e581e01
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 4 additions and 4 deletions

View File

@ -40,7 +40,7 @@ public interface BaseCycleAvoidingMapper<S, T> extends BaseMapper<S, T> {
// 如果 beanConsumer 本来就为 null则不再调用带 Consumer 参数的 convert 方法避免在循环中进行不必要的非空判断
if (Objects.nonNull(beanConsumer)) {
return sourceList.stream()
.map(source -> convert(source, beanConsumer))
.map(source -> convert(source, context, beanConsumer))
.collect(Collectors.toList());
}
return sourceList.stream()