fix zql multiple fields
@@ -81,10 +81,14 @@ public class ZQL {
vos.forEach(it -> {
try {
Object inv = astResult.inventoryMetadata.selfInventoryClass.getConstructor().newInstance();
+ if (it instanceof Object[]) {
Object[] fieldValues = (Object[]) it;
for (int i = 0; i < fieldValues.length; i++) {
BeanUtils.setProperty(inv, astResult.targetFieldNames.get(i), fieldValues[i]);
}
+ } else {
+ BeanUtils.setProperty(inv, astResult.targetFieldNames.get(0), it);
+ }
ret.add(inv);
} catch (Exception e) {
throw new CloudRuntimeException(e);
