feat: 主机别名.
This commit is contained in:
@@ -34,6 +34,7 @@ public class DataAliasUpdateDTO implements Serializable {
|
||||
@Schema(description = "数据id")
|
||||
private Long relId;
|
||||
|
||||
@NotNull
|
||||
@Size(max = 32)
|
||||
@Schema(description = "别名")
|
||||
private String alias;
|
||||
|
||||
@@ -17,6 +17,7 @@ import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -83,6 +84,7 @@ public class DataAliasServiceImpl implements DataAliasService {
|
||||
.eq(DataAliasDO::getType, type)
|
||||
.then()
|
||||
.stream()
|
||||
.filter(s -> Objects.nonNull(s.getAlias()))
|
||||
.collect(Collectors.toMap(
|
||||
s -> String.valueOf(s.getRelId()),
|
||||
DataAliasDO::getAlias,
|
||||
|
||||
Reference in New Issue
Block a user