mirror of
https://gitee.com/freshday/radar.git
synced 2026-03-22 12:47:16 +08:00
opts: code opts.
feihu wang
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -33,7 +33,7 @@
|
||||
<mysql.version>8.0.16</mysql.version>
|
||||
<springboot.version>2.2.5.RELEASE</springboot.version>
|
||||
<tensorflow.version>1.12.0</tensorflow.version>
|
||||
<es.version>7.6.1</es.version>
|
||||
<es.version>7.11.2</es.version>
|
||||
<mapstruct.version>1.4.1.Final</mapstruct.version>
|
||||
</properties>
|
||||
|
||||
|
||||
@@ -29,18 +29,16 @@ public class ALLINONE implements PluginServiceV2 {
|
||||
@Override
|
||||
public Object handle(PreItemVO item, Map<String, Object> jsonInfo,
|
||||
String[] sourceField) {
|
||||
List<Object> fields = new ArrayList<>();
|
||||
for (String field : sourceField) {
|
||||
fields.add(jsonInfo.get(field));
|
||||
if (sourceField == null || sourceField.length == 0) {
|
||||
return "";
|
||||
}
|
||||
StringBuilder builder = new StringBuilder();
|
||||
for (int i = 0; i < fields.size(); i++) {
|
||||
Object f = fields.get(i);
|
||||
for (String field : sourceField) {
|
||||
Object f = jsonInfo.get(field);
|
||||
builder.append(f == null ? "" : f.toString());
|
||||
if (i < fields.size() - 1) {
|
||||
builder.append("_");
|
||||
}
|
||||
builder.append("_");
|
||||
}
|
||||
builder.deleteCharAt(builder.length() - 1);
|
||||
return builder.toString();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user