mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-10 11:07:06 +00:00
(improvement)(chat) Parse info compatible with front-end (#704)
* (improvement)(headless) Modify view demo data * (improvement)(chat) Parse info compatible with front-end --------- Co-authored-by: jolunoluo
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.tencent.supersonic.chat.api.pojo;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.collect.Lists;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
@@ -51,4 +52,7 @@ public class SchemaElement implements Serializable {
|
||||
return Objects.hashCode(view, id, name, bizName, type);
|
||||
}
|
||||
|
||||
public List<String> getModelNames() {
|
||||
return Lists.newArrayList(name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,4 +78,8 @@ public class SemanticParseInfo {
|
||||
return view.getView();
|
||||
}
|
||||
|
||||
public SchemaElement getModel() {
|
||||
return view;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ public class ViewResp extends SchemaItem {
|
||||
}
|
||||
|
||||
public List<Long> getAllDimensions() {
|
||||
return getViewModelConfigs().stream().map(ViewModelConfig::getMetrics)
|
||||
return getViewModelConfigs().stream().map(ViewModelConfig::getDimensions)
|
||||
.flatMap(Collection::stream).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user