mirror of
https://gitee.com/freshday/radar.git
synced 2026-03-22 04:37:16 +08:00
@@ -6,6 +6,7 @@ import org.springframework.stereotype.Component;
|
|||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Optional;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -35,8 +36,8 @@ public class ALLINONE implements PluginServiceV2 {
|
|||||||
if (sourceField == null || sourceField.length == 0) {
|
if (sourceField == null || sourceField.length == 0) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
String str = Arrays.asList(sourceField).stream()
|
String str = Arrays.stream(sourceField)
|
||||||
.map(f -> jsonInfo.get(f) == null ? "" : f.toString())
|
.map(f -> Optional.ofNullable(jsonInfo.get(f)).map(Object::toString).orElse(""))
|
||||||
.collect(Collectors.joining("_"));
|
.collect(Collectors.joining("_"));
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user