mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-13 21:17:08 +00:00
[release](project)update version 0.7.4 backend (#66)
This commit is contained in:
@@ -48,10 +48,6 @@
|
||||
<artifactId>spring-core</artifactId>
|
||||
<version>${spring.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
@@ -78,4 +74,4 @@
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
</project>
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.tencent.supersonic.semantic.api.model.request;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.tencent.supersonic.semantic.api.model.enums.DataTypeEnum;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -37,7 +36,7 @@ public class DatabaseReq {
|
||||
private List<String> viewers = Lists.newArrayList();
|
||||
|
||||
public String getUrl() {
|
||||
if (StringUtils.isNotBlank(url)) {
|
||||
if (type.equalsIgnoreCase(DataTypeEnum.H2.getFeature())) {
|
||||
return url;
|
||||
}
|
||||
if (type.equalsIgnoreCase(DataTypeEnum.MYSQL.getFeature())) {
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
package com.tencent.supersonic.semantic.api.model.request;
|
||||
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.tencent.supersonic.semantic.api.model.enums.DimensionTypeEnum;
|
||||
import com.tencent.supersonic.semantic.api.model.pojo.Dim;
|
||||
import com.tencent.supersonic.semantic.api.model.pojo.Identify;
|
||||
import com.tencent.supersonic.semantic.api.model.pojo.Measure;
|
||||
import com.tencent.supersonic.semantic.api.model.pojo.SchemaItem;
|
||||
import java.util.List;
|
||||
|
||||
import java.util.stream.Collectors;
|
||||
import lombok.Data;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
|
||||
@Data
|
||||
@@ -30,4 +33,14 @@ public class DatasourceReq extends SchemaItem {
|
||||
private List<Measure> measures;
|
||||
|
||||
|
||||
|
||||
public List<Dim> getTimeDimension() {
|
||||
if (CollectionUtils.isEmpty(dimensions)) {
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
return dimensions.stream()
|
||||
.filter(dim -> DimensionTypeEnum.time.name().equalsIgnoreCase(dim.getType()))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -16,6 +16,8 @@ public class ModelReq extends SchemaItem {
|
||||
|
||||
private Integer isOpen = 0;
|
||||
|
||||
private String alias;
|
||||
|
||||
private List<String> viewers = new ArrayList<>();
|
||||
|
||||
private List<String> viewOrgs = new ArrayList<>();
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.util.List;
|
||||
@Data
|
||||
public class PageSchemaItemReq extends PageBaseReq {
|
||||
|
||||
private Long id;
|
||||
private String id;
|
||||
private String name;
|
||||
private String bizName;
|
||||
private String createdBy;
|
||||
|
||||
@@ -14,4 +14,5 @@ public class DatasourceResp extends SchemaItem {
|
||||
private DatasourceDetail datasourceDetail;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.tencent.supersonic.semantic.api.model.pojo.Entity;
|
||||
import com.tencent.supersonic.semantic.api.model.pojo.SchemaItem;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
@@ -32,4 +33,25 @@ public class DomainResp extends SchemaItem {
|
||||
|
||||
private Entity entity;
|
||||
|
||||
private boolean hasEditPermission = false;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
DomainResp that = (DomainResp) o;
|
||||
if (getId() == null || that.getId() == null) {
|
||||
return false;
|
||||
}
|
||||
return Objects.equals(getId().intValue(), that.getId().intValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
if (getId() == null) {
|
||||
return 0;
|
||||
}
|
||||
return getId().hashCode();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,8 @@ public class ModelResp extends SchemaItem {
|
||||
|
||||
private Long domainId;
|
||||
|
||||
private String alias;
|
||||
|
||||
private List<String> viewers;
|
||||
|
||||
private List<String> viewOrgs;
|
||||
|
||||
@@ -22,4 +22,5 @@ public class DatasourceYamlTpl {
|
||||
private List<MeasureYamlTpl> measures;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user