Browse Source

超级apibug

2024年12月19日14:14:26
thing_master
lishuai 1 year ago
parent
commit
b249543723
  1. 18
      modules/thing/src/main/java/com/thing/thing/api/dto/ApiEntityAttrDTO.java

18
modules/thing/src/main/java/com/thing/thing/api/dto/ApiEntityAttrDTO.java

@ -90,10 +90,20 @@ public class ApiEntityAttrDTO implements Serializable {
JSONArray keys1 = jsonObject.getJSONArray("keys");
JSONArray entitys = jsonObject.getJSONArray("entitys");
if(!entitys.isEmpty() && !keys1.isEmpty()){
entityAttrMap.put(entitys.getLong(0),keys1.stream()
.map(Object::toString)
.map(Long::parseLong)
.toList());
if(entityAttrMap.containsKey(entitys.getLong(0))){
List<Long> longs = entityAttrMap.get(entitys.getLong(0));
List<Long> list1 = new java.util.ArrayList<>(keys1.stream()
.map(Object::toString)
.map(Long::parseLong)
.toList());
list1.addAll(longs);
entityAttrMap.put(entitys.getLong(0),list1);
}else{
entityAttrMap.put(entitys.getLong(0),keys1.stream()
.map(Object::toString)
.map(Long::parseLong)
.toList());
}
}
}
}

Loading…
Cancel
Save