feat:新增值联动和扩展覆盖属性
This commit is contained in:
parent
0aed9c613b
commit
1b8d5e165c
@ -1,5 +1,6 @@
|
||||
package com.flyfish.framework.beans.meta;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
@ -9,5 +10,6 @@ import java.lang.annotation.*;
|
||||
@Target({ElementType.FIELD})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
@Valid
|
||||
public @interface SubBean {
|
||||
}
|
||||
|
@ -300,9 +300,11 @@ public class BaseServiceImpl<T extends Domain> implements BaseService<T> {
|
||||
// 带有id的集合
|
||||
List<String> ids = entities.stream()
|
||||
.filter(Objects::nonNull)
|
||||
.map(Domain::getId).collect(Collectors.toList());
|
||||
.map(Domain::getId)
|
||||
.filter(Objects::nonNull)
|
||||
.collect(Collectors.toList());
|
||||
// 过滤不存在的记录
|
||||
Map<String, T> savedMap = CollectionUtils.isEmpty(ids) ? ((List<T>) repository.findAllById(ids)).stream()
|
||||
Map<String, T> savedMap = CollectionUtils.isNotEmpty(ids) ? ((List<T>) repository.findAllById(ids)).stream()
|
||||
.collect(Collectors.toMap(Domain::getId, t -> t)) : Collections.emptyMap();
|
||||
List<T> updating = entities.stream()
|
||||
.map(t -> {
|
||||
|
Loading…
Reference in New Issue
Block a user