[improvement][project] supersonic 0.7.2 version backend update (#28)

Co-authored-by: jipengli <jipengli@tencent.com>
This commit is contained in:
jipeli
2023-08-15 08:56:18 +08:00
committed by GitHub
parent 27283001a8
commit b1952d64ab
461 changed files with 18548 additions and 11939 deletions

View File

@@ -12,11 +12,11 @@
<artifactId>semantic-api</artifactId>
<dependencies>
<!-- <dependency>-->
<!-- <groupId>ru.yandex.clickhouse</groupId>-->
<!-- <artifactId>clickhouse-jdbc</artifactId>-->
<!-- <version>${clickhouse.jdbc.version}</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>ru.yandex.clickhouse</groupId>-->
<!-- <artifactId>clickhouse-jdbc</artifactId>-->
<!-- <version>${clickhouse.jdbc.version}</version>-->
<!-- </dependency>-->
<dependency>
<groupId>com.clickhouse</groupId>
<artifactId>clickhouse-jdbc</artifactId>

View File

@@ -1,9 +1,8 @@
package com.tencent.supersonic.semantic.api.model.pojo;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
/**
* @author: kanedai

View File

@@ -1,12 +1,11 @@
package com.tencent.supersonic.semantic.api.model.pojo;
import java.util.List;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import java.util.List;
@Data
@ToString
@AllArgsConstructor

View File

@@ -1,7 +1,7 @@
package com.tencent.supersonic.semantic.api.model.pojo;
import java.util.List;
import com.google.common.collect.Lists;
import java.util.List;
import lombok.Data;
@Data

View File

@@ -13,7 +13,7 @@ public class QueryStat {
private Long id;
private String traceId;
private Long domainId;
private Long modelId;
private String user;
private String createdAt;
/**
@@ -79,8 +79,8 @@ public class QueryStat {
return this;
}
public QueryStat setClassId(Long domainId) {
this.domainId = domainId;
public QueryStat setClassId(Long modelId) {
this.modelId = modelId;
return this;
}

View File

@@ -8,8 +8,8 @@ public class DatasourceRelaReq {
private Long id;
@NotNull(message = "class id cat not be null")
private Long domainId;
@NotNull(message = "model id cat not be null")
private Long modelId;
@NotNull(message = "datasource id cat not be null")
private Long datasourceFrom;

View File

@@ -6,7 +6,6 @@ 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 lombok.Data;
@@ -21,7 +20,7 @@ public class DatasourceReq extends SchemaItem {
private String tableQuery;
private Long domainId;
private Long modelId;
private List<Identify> identifiers;

View File

@@ -2,17 +2,14 @@ package com.tencent.supersonic.semantic.api.model.request;
import com.tencent.supersonic.semantic.api.model.pojo.DimValueMap;
import com.tencent.supersonic.semantic.api.model.pojo.SchemaItem;
import javax.validation.constraints.NotNull;
import lombok.Data;
import java.util.List;
import javax.validation.constraints.NotNull;
import lombok.Data;
@Data
public class DimensionReq extends SchemaItem {
private Long domainId;
private Long modelId;
private String type;

View File

@@ -1,12 +1,9 @@
package com.tencent.supersonic.semantic.api.model.request;
import com.tencent.supersonic.semantic.api.model.pojo.Entity;
import com.tencent.supersonic.semantic.api.model.pojo.SchemaItem;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
@@ -24,6 +21,4 @@ public class DomainReq extends SchemaItem {
private List<String> admins = new ArrayList<>();
private List<String> adminOrgs = new ArrayList<>();
private Entity entity;
}

View File

@@ -1,15 +1,15 @@
package com.tencent.supersonic.semantic.api.model.request;
import com.tencent.supersonic.semantic.api.model.pojo.SchemaItem;
import com.tencent.supersonic.common.pojo.DataFormat;
import com.tencent.supersonic.semantic.api.model.pojo.SchemaItem;
import lombok.Data;
@Data
public class MetricBaseReq extends SchemaItem {
private Long domainId;
private Long modelId;
private String alias;

View File

@@ -4,8 +4,8 @@ package com.tencent.supersonic.semantic.api.model.request;
import com.tencent.supersonic.semantic.api.model.enums.MetricTypeEnum;
import com.tencent.supersonic.semantic.api.model.pojo.Measure;
import com.tencent.supersonic.semantic.api.model.pojo.MetricTypeParams;
import lombok.Data;
import java.util.List;
import lombok.Data;
@Data
public class MetricReq extends MetricBaseReq {

View File

@@ -0,0 +1,27 @@
package com.tencent.supersonic.semantic.api.model.request;
import com.tencent.supersonic.semantic.api.model.pojo.Entity;
import com.tencent.supersonic.semantic.api.model.pojo.SchemaItem;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
@Data
public class ModelReq extends SchemaItem {
private Long domainId = 0L;
private Integer isOpen = 0;
private List<String> viewers = new ArrayList<>();
private List<String> viewOrgs = new ArrayList<>();
private List<String> admins = new ArrayList<>();
private List<String> adminOrgs = new ArrayList<>();
private Entity entity;
}

View File

@@ -4,10 +4,10 @@ import java.util.List;
import lombok.Data;
@Data
public class DomainSchemaFilterReq {
public class ModelSchemaFilterReq {
/**
* if domainIds is empty, get all domain info
*/
private List<Long> domainIds;
private List<Long> modelIds;
}

View File

@@ -9,4 +9,6 @@ public class PageMetricReq extends PageSchemaItemReq {
private String type;
private String key;
}

View File

@@ -1,8 +1,9 @@
package com.tencent.supersonic.semantic.api.model.request;
import com.google.common.collect.Lists;
import com.tencent.supersonic.common.pojo.PageBaseReq;
import lombok.Data;
import java.util.List;
import lombok.Data;
@Data
public class PageSchemaItemReq extends PageBaseReq {
@@ -11,7 +12,8 @@ public class PageSchemaItemReq extends PageBaseReq {
private String name;
private String bizName;
private String createdBy;
private List<Long> domainIds;
private List<Long> domainIds = Lists.newArrayList();
private List<Long> modelIds = Lists.newArrayList();
private Integer sensitiveLevel;
private Integer status;
}

View File

@@ -7,10 +7,11 @@ import lombok.Data;
@Data
public class SqlExecuteReq {
public static final String LIMIT_WRAPPER = " select * from ( %s ) a limit 1000 ";
@NotNull(message = "domainId can not be null")
private Long domainId;
@NotNull(message = "modelId can not be null")
private Long modelId;
@NotBlank(message = "sql can not be blank")
private String sql;

View File

@@ -7,7 +7,7 @@ import lombok.Data;
@Data
public class DatasourceResp extends SchemaItem {
private Long domainId;
private Long modelId;
private Long databaseId;

View File

@@ -3,9 +3,7 @@ package com.tencent.supersonic.semantic.api.model.response;
import com.tencent.supersonic.semantic.api.model.pojo.DimValueMap;
import com.tencent.supersonic.semantic.api.model.pojo.SchemaItem;
import java.util.List;
import lombok.Data;
import lombok.ToString;
@@ -14,7 +12,7 @@ import lombok.ToString;
@ToString(callSuper = true)
public class DimensionResp extends SchemaItem {
private Long domainId;
private Long modelId;
private String type;

View File

@@ -2,9 +2,7 @@ package com.tencent.supersonic.semantic.api.model.response;
import com.tencent.supersonic.semantic.api.model.pojo.Entity;
import com.tencent.supersonic.semantic.api.model.pojo.SchemaItem;
import java.util.List;
import lombok.Data;
import lombok.ToString;

View File

@@ -12,17 +12,15 @@ import lombok.ToString;
@ToString(callSuper = true)
public class MetricResp extends SchemaItem {
private Long domainId;
private Long modelId;
private String domainName;
private String modelName;
//ATOMIC DERIVED
private String type;
private MetricTypeParams typeParams;
private String fullPath;
private String dataFormatType;
private DataFormat dataFormat;

View File

@@ -0,0 +1,37 @@
package com.tencent.supersonic.semantic.api.model.response;
import com.tencent.supersonic.semantic.api.model.pojo.Entity;
import com.tencent.supersonic.semantic.api.model.pojo.SchemaItem;
import java.util.List;
import lombok.Data;
import lombok.ToString;
@Data
@ToString
public class ModelResp extends SchemaItem {
private Long domainId;
private List<String> viewers;
private List<String> viewOrgs;
private List<String> admins;
private List<String> adminOrgs;
private Integer isOpen = 0;
private Integer dimensionCnt;
private Integer metricCnt;
private Entity entity;
private String fullPath;
public boolean openToAll() {
return isOpen != null && isOpen == 1;
}
}

View File

@@ -4,7 +4,7 @@ import java.util.List;
import lombok.Data;
@Data
public class DomainSchemaRelaResp {
public class ModelSchemaRelaResp {
private Long domainId;

View File

@@ -1,7 +1,6 @@
package com.tencent.supersonic.semantic.api.model.response;
import java.util.List;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@@ -9,7 +8,7 @@ import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DomainSchemaResp extends DomainResp {
public class ModelSchemaResp extends ModelResp {
private List<MetricSchemaResp> metrics;
private List<DimSchemaResp> dimensions;

View File

@@ -6,7 +6,6 @@ import com.tencent.supersonic.common.pojo.QueryColumn;
import com.tencent.supersonic.semantic.api.model.pojo.QueryResult;
import java.util.List;
import java.util.Map;
import lombok.Data;
import lombok.ToString;

View File

@@ -1,10 +1,8 @@
package com.tencent.supersonic.semantic.api.query.pojo;
import com.tencent.supersonic.semantic.api.query.enums.FilterOperatorEnum;
import java.util.Arrays;
import java.util.List;
import lombok.Data;
@Data

View File

@@ -1,9 +1,7 @@
package com.tencent.supersonic.semantic.api.query.pojo;
import com.tencent.supersonic.semantic.api.query.enums.FilterOperatorEnum;
import java.util.List;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

View File

@@ -1,7 +1,6 @@
package com.tencent.supersonic.semantic.api.query.pojo;
import javax.validation.constraints.NotBlank;
import lombok.Data;
@Data

View File

@@ -10,12 +10,12 @@ import lombok.ToString;
public class ItemUseReq {
private String startTime;
private Long domainId;
private Long modelId;
private Boolean cacheEnable = true;
private String metric;
public ItemUseReq(String startTime, Long domainId) {
public ItemUseReq(String startTime, Long modelId) {
this.startTime = startTime;
this.domainId = domainId;
this.modelId = modelId;
}
}

View File

@@ -8,7 +8,7 @@ import lombok.ToString;
@ToString
public class QueryDslReq {
private Long domainId;
private Long modelId;
private String sql;

View File

@@ -1,17 +1,15 @@
package com.tencent.supersonic.semantic.api.query.request;
import com.google.common.collect.Lists;
import com.tencent.supersonic.semantic.api.query.pojo.Cache;
import com.tencent.supersonic.semantic.api.query.pojo.Filter;
import com.tencent.supersonic.semantic.api.query.pojo.Param;
import com.tencent.supersonic.common.pojo.Aggregator;
import com.tencent.supersonic.common.pojo.DateConf;
import com.tencent.supersonic.common.pojo.Order;
import com.tencent.supersonic.semantic.api.query.pojo.Cache;
import com.tencent.supersonic.semantic.api.query.pojo.Filter;
import com.tencent.supersonic.semantic.api.query.pojo.Param;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import lombok.Data;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.logging.log4j.util.Strings;
@@ -21,7 +19,7 @@ import org.springframework.util.CollectionUtils;
@Data
public class QueryStructReq {
private Long domainId;
private Long modelId;
private List<String> groups = new ArrayList<>();
private List<Aggregator> aggregators = new ArrayList<>();
@@ -70,8 +68,8 @@ public class QueryStructReq {
public String toCustomizedString() {
StringBuilder stringBuilder = new StringBuilder("{");
stringBuilder.append("\"domainId\":")
.append(domainId);
stringBuilder.append("\"modelId\":")
.append(modelId);
stringBuilder.append(",\"groups\":")
.append(groups);
stringBuilder.append(",\"aggregators\":")
@@ -104,8 +102,8 @@ public class QueryStructReq {
@Override
public String toString() {
final StringBuilder sb = new StringBuilder("{");
sb.append("\"domainId\":")
.append(domainId);
sb.append("\"modelId\":")
.append(modelId);
sb.append(",\"groups\":")
.append(groups);
sb.append(",\"aggregators\":")

View File

@@ -17,7 +17,6 @@
</properties>
<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
@@ -75,7 +74,6 @@
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>

View File

@@ -1,19 +1,20 @@
package com.tencent.supersonic.semantic.model.application;
import com.tencent.supersonic.semantic.api.model.pojo.ItemDateFilter;
import com.tencent.supersonic.semantic.api.model.yaml.DatasourceYamlTpl;
import com.tencent.supersonic.semantic.api.model.yaml.DimensionYamlTpl;
import com.tencent.supersonic.semantic.api.model.yaml.MetricYamlTpl;
import com.tencent.supersonic.semantic.api.model.response.DatabaseResp;
import com.tencent.supersonic.semantic.api.model.response.DatasourceResp;
import com.tencent.supersonic.semantic.api.model.response.DimensionResp;
import com.tencent.supersonic.semantic.api.model.response.ItemDateResp;
import com.tencent.supersonic.semantic.api.model.response.MetricResp;
import com.tencent.supersonic.semantic.api.model.response.ModelResp;
import com.tencent.supersonic.semantic.api.model.yaml.DatasourceYamlTpl;
import com.tencent.supersonic.semantic.api.model.yaml.DimensionYamlTpl;
import com.tencent.supersonic.semantic.api.model.yaml.MetricYamlTpl;
import com.tencent.supersonic.semantic.model.domain.Catalog;
import com.tencent.supersonic.semantic.model.domain.DatasourceService;
import com.tencent.supersonic.semantic.model.domain.DimensionService;
import com.tencent.supersonic.semantic.model.domain.DomainService;
import com.tencent.supersonic.semantic.model.domain.MetricService;
import com.tencent.supersonic.semantic.model.domain.ModelService;
import com.tencent.supersonic.semantic.model.domain.dataobject.DatabaseDO;
import com.tencent.supersonic.semantic.model.domain.repository.DatabaseRepository;
import com.tencent.supersonic.semantic.model.domain.utils.DatabaseConverter;
@@ -29,17 +30,17 @@ import org.springframework.stereotype.Component;
public class CatalogImpl implements Catalog {
private final DatabaseRepository databaseRepository;
private final DomainService domainService;
private final ModelService modelService;
private final DimensionService dimensionService;
private final DatasourceService datasourceService;
private final MetricService metricService;
public CatalogImpl(DatabaseRepository databaseRepository,
DomainService domainService, DimensionService dimensionService,
ModelService modelService, DimensionService dimensionService,
DatasourceService datasourceService,
MetricService metricService) {
this.databaseRepository = databaseRepository;
this.domainService = domainService;
this.modelService = modelService;
this.dimensionService = dimensionService;
this.datasourceService = datasourceService;
this.metricService = metricService;
@@ -50,47 +51,51 @@ public class CatalogImpl implements Catalog {
return DatabaseConverter.convert(databaseDO);
}
public DatabaseResp getDatabaseByDomainId(Long domainId) {
List<DatabaseDO> databaseDOS = databaseRepository.getDatabaseByDomainId(domainId);
public DatabaseResp getDatabaseByModelId(Long modelId) {
List<DatabaseDO> databaseDOS = databaseRepository.getDatabaseByDomainId(modelId);
Optional<DatabaseDO> databaseDO = databaseDOS.stream().findFirst();
return databaseDO.map(DatabaseConverter::convert).orElse(null);
}
@Override
public String getDomainFullPath(Long domainId) {
return domainService.getDomainFullPath(domainId);
public String getModelFullPath(Long modelId) {
ModelResp modelResp = modelService.getModelMap().get(modelId);
if (modelResp != null) {
return modelResp.getFullPath();
}
return "";
}
@Override
public Map<Long, String> getDomainFullPath() {
return domainService.getDomainFullPath();
public Map<Long, String> getModelFullPath() {
return modelService.getModelFullPathMap();
}
@Override
public DimensionResp getDimension(String bizName, Long domainId) {
return dimensionService.getDimension(bizName, domainId);
public DimensionResp getDimension(String bizName, Long modelId) {
return dimensionService.getDimension(bizName, modelId);
}
@Override
public void getModelYamlTplByDomainIds(Set<Long> domainIds, Map<String, List<DimensionYamlTpl>> dimensionYamlMap,
public void getModelYamlTplByMoldelIds(Set<Long> modelIds, Map<String, List<DimensionYamlTpl>> dimensionYamlMap,
List<DatasourceYamlTpl> datasourceYamlTplList, List<MetricYamlTpl> metricYamlTplList) {
datasourceService.getModelYamlTplByDomainIds(domainIds, dimensionYamlMap, datasourceYamlTplList,
datasourceService.getModelYamlTplByModelIds(modelIds, dimensionYamlMap, datasourceYamlTplList,
metricYamlTplList);
}
@Override
public List<DimensionResp> getDimensions(Long domainId) {
return dimensionService.getDimensions(domainId);
public List<DimensionResp> getDimensions(Long modelId) {
return dimensionService.getDimensions(modelId);
}
@Override
public List<DatasourceResp> getDatasourceList(Long domainId) {
return datasourceService.getDatasourceList(domainId);
public List<DatasourceResp> getDatasourceList(Long modelId) {
return datasourceService.getDatasourceList(modelId);
}
@Override
public List<MetricResp> getMetrics(Long domainId) {
return metricService.getMetrics(domainId);
public List<MetricResp> getMetrics(Long modelId) {
return metricService.getMetrics(modelId);
}
@Override

View File

@@ -3,19 +3,23 @@ package com.tencent.supersonic.semantic.model.application;
import com.tencent.supersonic.auth.api.authentication.pojo.User;
import com.tencent.supersonic.semantic.api.model.request.DatabaseReq;
import com.tencent.supersonic.semantic.api.model.response.DatabaseResp;
import com.tencent.supersonic.semantic.api.model.response.DomainResp;
import com.tencent.supersonic.semantic.api.model.response.ModelResp;
import com.tencent.supersonic.semantic.api.model.response.QueryResultWithSchemaResp;
import com.tencent.supersonic.semantic.api.model.response.SqlParserResp;
import com.tencent.supersonic.semantic.model.domain.DatabaseService;
import com.tencent.supersonic.semantic.model.domain.DomainService;
import com.tencent.supersonic.semantic.model.domain.ModelService;
import com.tencent.supersonic.semantic.model.domain.adaptor.engineadapter.EngineAdaptor;
import com.tencent.supersonic.semantic.model.domain.adaptor.engineadapter.EngineAdaptorFactory;
import com.tencent.supersonic.semantic.model.domain.dataobject.DatabaseDO;
import com.tencent.supersonic.semantic.model.domain.pojo.Database;
import com.tencent.supersonic.semantic.model.domain.repository.DatabaseRepository;
import com.tencent.supersonic.semantic.model.domain.utils.DatabaseConverter;
import com.tencent.supersonic.semantic.model.domain.utils.JdbcDataSourceUtils;
import com.tencent.supersonic.semantic.model.domain.utils.SqlUtils;
import com.tencent.supersonic.semantic.model.domain.DatabaseService;
import com.tencent.supersonic.semantic.model.domain.pojo.Database;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import lombok.extern.slf4j.Slf4j;
import org.apache.logging.log4j.util.Strings;
@@ -29,9 +33,18 @@ public class DatabaseServiceImpl implements DatabaseService {
private final SqlUtils sqlUtils;
private DatabaseRepository databaseRepository;
public DatabaseServiceImpl(DatabaseRepository databaseRepository, SqlUtils sqlUtils) {
private DomainService domainService;
private ModelService modelService;
public DatabaseServiceImpl(DatabaseRepository databaseRepository,
SqlUtils sqlUtils,
DomainService domainService,
ModelService modelService) {
this.databaseRepository = databaseRepository;
this.sqlUtils = sqlUtils;
this.modelService = modelService;
this.domainService = domainService;
}
@Override
@@ -61,16 +74,36 @@ public class DatabaseServiceImpl implements DatabaseService {
return DatabaseConverter.convert(databaseDO);
}
@Override
// one domain only has one database
@Override
public DatabaseResp getDatabaseByDomainId(Long domainId) {
Optional<DatabaseDO> databaseDO = getDatabaseDO(domainId);
return databaseDO.map(DatabaseConverter::convert).orElse(null);
}
@Override
public QueryResultWithSchemaResp executeSql(String sql, Long domainId) {
DatabaseResp databaseResp = getDatabaseByDomainId(domainId);
public DatabaseResp getDatabaseByModelId(Long modelId) {
ModelResp modelResp = modelService.getModel(modelId);
Map<Long, DomainResp> domainRespMap = domainService.getDomainMap();
Long domainId = modelResp.getDomainId();
Optional<DatabaseDO> databaseDO = getDatabaseDO(domainId);
while (!databaseDO.isPresent()) {
DomainResp domainResp = domainRespMap.get(domainId);
if (domainResp == null) {
return null;
}
domainId = domainResp.getParentId();
databaseDO = getDatabaseDO(domainId);
}
return databaseDO.map(DatabaseConverter::convert).orElse(null);
}
@Override
public QueryResultWithSchemaResp executeSql(String sql, Long modelId) {
DatabaseResp databaseResp = getDatabaseByModelId(modelId);
if (databaseResp == null) {
return new QueryResultWithSchemaResp();
}
return executeSql(sql, databaseResp);
}

View File

@@ -8,9 +8,6 @@ import com.tencent.supersonic.semantic.api.model.pojo.DatasourceDetail;
import com.tencent.supersonic.semantic.api.model.pojo.Dim;
import com.tencent.supersonic.semantic.api.model.pojo.ItemDateFilter;
import com.tencent.supersonic.semantic.api.model.pojo.Measure;
import com.tencent.supersonic.semantic.api.model.yaml.DatasourceYamlTpl;
import com.tencent.supersonic.semantic.api.model.yaml.DimensionYamlTpl;
import com.tencent.supersonic.semantic.api.model.yaml.MetricYamlTpl;
import com.tencent.supersonic.semantic.api.model.request.DatasourceRelaReq;
import com.tencent.supersonic.semantic.api.model.request.DatasourceReq;
import com.tencent.supersonic.semantic.api.model.request.DateInfoReq;
@@ -23,6 +20,9 @@ import com.tencent.supersonic.semantic.api.model.response.DimensionResp;
import com.tencent.supersonic.semantic.api.model.response.ItemDateResp;
import com.tencent.supersonic.semantic.api.model.response.MeasureResp;
import com.tencent.supersonic.semantic.api.model.response.MetricResp;
import com.tencent.supersonic.semantic.api.model.yaml.DatasourceYamlTpl;
import com.tencent.supersonic.semantic.api.model.yaml.DimensionYamlTpl;
import com.tencent.supersonic.semantic.api.model.yaml.MetricYamlTpl;
import com.tencent.supersonic.semantic.model.domain.DatabaseService;
import com.tencent.supersonic.semantic.model.domain.DatasourceService;
import com.tencent.supersonic.semantic.model.domain.DimensionService;
@@ -88,7 +88,7 @@ public class DatasourceServiceImpl implements DatasourceService {
Datasource datasource = DatasourceConverter.convert(datasourceReq);
log.info("[create datasource] object:{}", JSONObject.toJSONString(datasource));
saveDatasource(datasource, user);
Optional<DatasourceResp> datasourceDescOptional = getDatasource(datasourceReq.getDomainId(),
Optional<DatasourceResp> datasourceDescOptional = getDatasource(datasourceReq.getModelId(),
datasourceReq.getBizName());
if (!datasourceDescOptional.isPresent()) {
throw new RuntimeException("create datasource failed");
@@ -122,24 +122,8 @@ public class DatasourceServiceImpl implements DatasourceService {
}
@Override
public String getSourceBizNameById(Long id) {
DatasourceDO datasourceDO = getDatasourceById(id);
if (datasourceDO == null) {
String message = String.format("datasource with id:%s not exsit", id);
throw new RuntimeException(message);
}
return datasourceDO.getBizName();
}
private DatasourceDO getDatasourceById(Long id) {
return datasourceRepository.getDatasourceById(id);
}
@Override
public List<MeasureResp> getMeasureListOfDomain(Long domainId) {
List<DatasourceResp> datasourceDescs = getDatasourceList(domainId);
public List<MeasureResp> getMeasureListOfModel(Long modelId) {
List<DatasourceResp> datasourceDescs = getDatasourceList(modelId);
List<MeasureResp> measureDescs = Lists.newArrayList();
if (!CollectionUtils.isEmpty(datasourceDescs)) {
for (DatasourceResp datasourceDesc : datasourceDescs) {
@@ -167,8 +151,8 @@ public class DatasourceServiceImpl implements DatasourceService {
}
private Optional<DatasourceResp> getDatasource(Long domainId, String bizName) {
List<DatasourceResp> datasourceDescs = getDatasourceList(domainId);
private Optional<DatasourceResp> getDatasource(Long modelId, String bizName) {
List<DatasourceResp> datasourceDescs = getDatasourceList(modelId);
if (CollectionUtils.isEmpty(datasourceDescs)) {
return Optional.empty();
}
@@ -197,8 +181,8 @@ public class DatasourceServiceImpl implements DatasourceService {
}
@Override
public List<DatasourceResp> getDatasourceList(Long domainId) {
return DatasourceConverter.convertList(datasourceRepository.getDatasourceList(domainId));
public List<DatasourceResp> getDatasourceList(Long modelId) {
return DatasourceConverter.convertList(datasourceRepository.getDatasourceList(modelId));
}
@Override
@@ -207,8 +191,8 @@ public class DatasourceServiceImpl implements DatasourceService {
}
@Override
public List<DatasourceResp> getDatasourceListNoMeasurePrefix(Long domainId) {
List<DatasourceResp> datasourceResps = getDatasourceList(domainId);
public List<DatasourceResp> getDatasourceListNoMeasurePrefix(Long modelId) {
List<DatasourceResp> datasourceResps = getDatasourceList(modelId);
for (DatasourceResp datasourceResp : datasourceResps) {
if (!CollectionUtils.isEmpty(datasourceResp.getDatasourceDetail().getMeasures())) {
for (Measure measure : datasourceResp.getDatasourceDetail().getMeasures()) {
@@ -237,17 +221,17 @@ public class DatasourceServiceImpl implements DatasourceService {
@Override
public void deleteDatasource(Long id) throws Exception {
public void deleteDatasource(Long id) {
DatasourceDO datasourceDO = datasourceRepository.getDatasourceById(id);
if (datasourceDO == null) {
return;
}
checkDelete(datasourceDO.getDomainId(), id);
checkDelete(datasourceDO.getModelId(), id);
datasourceRepository.deleteDatasource(id);
}
private void checkDelete(Long domainId, Long datasourceId) {
List<MetricResp> metricResps = metricService.getMetrics(domainId, datasourceId);
private void checkDelete(Long modelId, Long datasourceId) {
List<MetricResp> metricResps = metricService.getMetrics(modelId, datasourceId);
List<DimensionResp> dimensionResps = dimensionService.getDimensionsByDatasource(datasourceId);
if (!CollectionUtils.isEmpty(metricResps) || !CollectionUtils.isEmpty(dimensionResps)) {
throw new RuntimeException("exist dimension or metric on this datasource, please check");
@@ -261,8 +245,6 @@ public class DatasourceServiceImpl implements DatasourceService {
return datasourceRelaResps;
}
return datasourceRelaDOS.stream().map(DatasourceConverter::convert).collect(Collectors.toList());
}
@@ -289,8 +271,8 @@ public class DatasourceServiceImpl implements DatasourceService {
}
@Override
public List<DatasourceRelaResp> getDatasourceRelaList(Long domainId) {
return convertDatasourceRelaList(datasourceRepository.getDatasourceRelaList(domainId));
public List<DatasourceRelaResp> getDatasourceRelaList(Long modelId) {
return convertDatasourceRelaList(datasourceRepository.getDatasourceRelaList(modelId));
}
@@ -358,14 +340,14 @@ public class DatasourceServiceImpl implements DatasourceService {
}
@Override
public void getModelYamlTplByDomainIds(Set<Long> domainIds, Map<String, List<DimensionYamlTpl>> dimensionYamlMap,
public void getModelYamlTplByModelIds(Set<Long> modelIds, Map<String, List<DimensionYamlTpl>> dimensionYamlMap,
List<DatasourceYamlTpl> datasourceYamlTplList, List<MetricYamlTpl> metricYamlTplList) {
for (Long domainId : domainIds) {
List<DatasourceResp> datasourceResps = getDatasourceList(domainId);
List<MetricResp> metricResps = metricService.getMetrics(domainId);
for (Long modelId : modelIds) {
List<DatasourceResp> datasourceResps = getDatasourceList(modelId);
List<MetricResp> metricResps = metricService.getMetrics(modelId);
metricYamlTplList.addAll(MetricYamlManager.convert2YamlObj(MetricConverter.metricInfo2Metric(metricResps)));
DatabaseResp databaseResp = databaseService.getDatabaseByDomainId(domainId);
List<DimensionResp> dimensionResps = dimensionService.getDimensions(domainId);
DatabaseResp databaseResp = databaseService.getDatabaseByModelId(modelId);
List<DimensionResp> dimensionResps = dimensionService.getDimensions(modelId);
for (DatasourceResp datasourceResp : datasourceResps) {
datasourceYamlTplList.add(DatasourceYamlManager.convert2YamlObj(
DatasourceConverter.datasourceInfo2Datasource(datasourceResp), databaseResp));

View File

@@ -5,19 +5,19 @@ import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.google.common.collect.Lists;
import com.tencent.supersonic.auth.api.authentication.pojo.User;
import com.tencent.supersonic.common.pojo.enums.SensitiveLevelEnum;
import com.tencent.supersonic.semantic.api.model.request.DimensionReq;
import com.tencent.supersonic.semantic.api.model.request.PageDimensionReq;
import com.tencent.supersonic.semantic.api.model.response.DatasourceResp;
import com.tencent.supersonic.semantic.api.model.response.DimensionResp;
import com.tencent.supersonic.common.pojo.enums.SensitiveLevelEnum;
import com.tencent.supersonic.semantic.model.domain.dataobject.DimensionDO;
import com.tencent.supersonic.semantic.model.domain.repository.DimensionRepository;
import com.tencent.supersonic.semantic.model.domain.utils.DimensionConverter;
import com.tencent.supersonic.semantic.model.domain.DatasourceService;
import com.tencent.supersonic.semantic.model.domain.DimensionService;
import com.tencent.supersonic.semantic.model.domain.DomainService;
import com.tencent.supersonic.semantic.model.domain.dataobject.DimensionDO;
import com.tencent.supersonic.semantic.model.domain.pojo.Dimension;
import com.tencent.supersonic.semantic.model.domain.pojo.DimensionFilter;
import com.tencent.supersonic.semantic.model.domain.repository.DimensionRepository;
import com.tencent.supersonic.semantic.model.domain.utils.DimensionConverter;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -63,8 +63,8 @@ public class DimensionServiceImpl implements DimensionService {
if (CollectionUtils.isEmpty(dimensionReqs)) {
return;
}
Long domainId = dimensionReqs.get(0).getDomainId();
List<DimensionResp> dimensionResps = getDimensions(domainId);
Long modelId = dimensionReqs.get(0).getModelId();
List<DimensionResp> dimensionResps = getDimensions(modelId);
Map<String, DimensionResp> dimensionRespMap = dimensionResps.stream()
.collect(Collectors.toMap(DimensionResp::getBizName, a -> a, (k1, k2) -> k1));
List<Dimension> dimensions = dimensionReqs.stream().map(DimensionConverter::convert)
@@ -92,8 +92,8 @@ public class DimensionServiceImpl implements DimensionService {
@Override
public DimensionResp getDimension(String bizName, Long domainId) {
List<DimensionResp> dimensionResps = getDimensions(domainId);
public DimensionResp getDimension(String bizName, Long modelId) {
List<DimensionResp> dimensionResps = getDimensions(modelId);
if (CollectionUtils.isEmpty(dimensionResps)) {
return null;
}
@@ -109,7 +109,7 @@ public class DimensionServiceImpl implements DimensionService {
public PageInfo<DimensionResp> queryDimension(PageDimensionReq pageDimensionReq) {
DimensionFilter dimensionFilter = new DimensionFilter();
BeanUtils.copyProperties(pageDimensionReq, dimensionFilter);
dimensionFilter.setDomainIds(pageDimensionReq.getDomainIds());
dimensionFilter.setModelIds(pageDimensionReq.getModelIds());
PageInfo<DimensionDO> dimensionDOPageInfo = PageHelper.startPage(pageDimensionReq.getCurrent(),
pageDimensionReq.getPageSize())
.doSelectPageInfo(() -> queryDimension(dimensionFilter));
@@ -139,8 +139,8 @@ public class DimensionServiceImpl implements DimensionService {
}
@Override
public List<DimensionResp> getDimensions(Long domainId) {
return convertList(getDimensionDOS(domainId), datasourceService.getDatasourceMap());
public List<DimensionResp> getDimensions(Long modelId) {
return convertList(getDimensionDOS(modelId), datasourceService.getDatasourceMap());
}
@Override
@@ -176,8 +176,8 @@ public class DimensionServiceImpl implements DimensionService {
@Override
public List<DimensionResp> getHighSensitiveDimension(Long domainId) {
List<DimensionResp> dimensionResps = getDimensions(domainId);
public List<DimensionResp> getHighSensitiveDimension(Long modelId) {
List<DimensionResp> dimensionResps = getDimensions(modelId);
if (CollectionUtils.isEmpty(dimensionResps)) {
return dimensionResps;
}
@@ -187,8 +187,8 @@ public class DimensionServiceImpl implements DimensionService {
}
protected List<DimensionDO> getDimensionDOS(Long domainId) {
return dimensionRepository.getDimensionListOfDomain(domainId);
protected List<DimensionDO> getDimensionDOS(Long modelId) {
return dimensionRepository.getDimensionListOfDomain(modelId);
}
protected List<DimensionDO> getDimensionDOS() {
@@ -240,8 +240,8 @@ public class DimensionServiceImpl implements DimensionService {
private void checkExist(List<DimensionReq> dimensionReqs) {
Long domainId = dimensionReqs.get(0).getDomainId();
List<DimensionResp> dimensionResps = getDimensions(domainId);
Long modelId = dimensionReqs.get(0).getModelId();
List<DimensionResp> dimensionResps = getDimensions(modelId);
for (DimensionReq dimensionReq : dimensionReqs) {
for (DimensionResp dimensionResp : dimensionResps) {
if (dimensionResp.getName().equalsIgnoreCase(dimensionReq.getBizName())) {

View File

@@ -2,35 +2,33 @@ package com.tencent.supersonic.semantic.model.application;
import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import com.tencent.supersonic.auth.api.authentication.pojo.User;
import com.tencent.supersonic.auth.api.authentication.service.UserService;
import com.tencent.supersonic.common.pojo.enums.AuthType;
import com.tencent.supersonic.common.util.BeanMapper;
import com.tencent.supersonic.common.util.JsonUtil;
import com.tencent.supersonic.semantic.api.model.request.DomainReq;
import com.tencent.supersonic.semantic.api.model.request.DomainSchemaFilterReq;
import com.tencent.supersonic.semantic.api.model.request.DomainUpdateReq;
import com.tencent.supersonic.semantic.api.model.response.DatasourceResp;
import com.tencent.supersonic.semantic.api.model.response.DimSchemaResp;
import com.tencent.supersonic.semantic.api.model.response.DimensionResp;
import com.tencent.supersonic.semantic.api.model.response.DomainResp;
import com.tencent.supersonic.semantic.api.model.response.DomainSchemaResp;
import com.tencent.supersonic.semantic.api.model.response.MetricResp;
import com.tencent.supersonic.semantic.api.model.response.MetricSchemaResp;
import com.tencent.supersonic.semantic.model.domain.DatasourceService;
import com.tencent.supersonic.semantic.model.domain.DimensionService;
import com.tencent.supersonic.semantic.api.model.response.ModelResp;
import com.tencent.supersonic.semantic.model.domain.DomainService;
import com.tencent.supersonic.semantic.model.domain.MetricService;
import com.tencent.supersonic.semantic.model.domain.ModelService;
import com.tencent.supersonic.semantic.model.domain.dataobject.DomainDO;
import com.tencent.supersonic.semantic.model.domain.pojo.Domain;
import com.tencent.supersonic.semantic.model.domain.repository.DomainRepository;
import com.tencent.supersonic.semantic.model.domain.utils.DomainConvert;
import java.util.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Queue;
import java.util.Set;
import java.util.stream.Collectors;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.assertj.core.util.Sets;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
@@ -41,33 +39,26 @@ import org.springframework.util.CollectionUtils;
public class DomainServiceImpl implements DomainService {
private final DomainRepository domainRepository;
private final MetricService metricService;
private final DimensionService dimensionService;
private final DatasourceService datasourceService;
private final ModelService modelService;
private final UserService userService;
public DomainServiceImpl(DomainRepository domainRepository, @Lazy MetricService metricService,
@Lazy DimensionService dimensionService, @Lazy DatasourceService datasourceService,
UserService userService) {
public DomainServiceImpl(DomainRepository domainRepository,
@Lazy ModelService modelService,
UserService userService) {
this.domainRepository = domainRepository;
this.metricService = metricService;
this.dimensionService = dimensionService;
this.datasourceService = datasourceService;
this.modelService = modelService;
this.userService = userService;
}
@Override
public void createDomain(DomainReq domainReq, User user) {
log.info("[create domain] cmd : {}", JSONObject.toJSONString(domainReq));
Domain domain = DomainConvert.convert(domainReq);
log.info("[create domain] object:{}", JSONObject.toJSONString(domainReq));
saveDomain(domain, user);
}
@Override
public void updateDomain(DomainUpdateReq domainUpdateReq, User user) {
DomainDO domainDO = getDomainDO(domainUpdateReq.getId());
@@ -78,48 +69,19 @@ public class DomainServiceImpl implements DomainService {
domainDO.setAdminOrg(String.join(",", domainUpdateReq.getAdminOrgs()));
domainDO.setViewer(String.join(",", domainUpdateReq.getViewers()));
domainDO.setViewOrg(String.join(",", domainUpdateReq.getViewOrgs()));
domainDO.setEntity(JsonUtil.toString(domainUpdateReq.getEntity()));
domainRepository.updateDomain(domainDO);
}
@Override
public void deleteDomain(Long id) {
checkDelete(id);
domainRepository.deleteDomain(id);
}
private void checkDelete(Long id) {
List<MetricResp> metricResps = metricService.getMetrics(id);
List<DimensionResp> dimensionResps = dimensionService.getDimensions(id);
List<DatasourceResp> datasourceResps = datasourceService.getDatasourceList(id);
if (!CollectionUtils.isEmpty(metricResps) || !CollectionUtils.isEmpty(datasourceResps)
|| !CollectionUtils.isEmpty(dimensionResps)) {
throw new RuntimeException("exist datasource, dimension or metric in this domain, please check");
}
}
@Override
public String getDomainBizName(Long id) {
if (id == null) {
return "";
}
DomainDO domainDO = getDomainDO(id);
if (domainDO == null) {
String message = String.format("domain with id:%s not exist", id);
throw new RuntimeException(message);
}
return domainDO.getBizName();
}
@Override
public List<DomainResp> getDomainList() {
return convertList(domainRepository.getDomainList(), new HashMap<>(), new HashMap<>());
return convertList(domainRepository.getDomainList());
}
@Override
public List<DomainResp> getDomainList(List<Long> domainIds) {
return getDomainList().stream()
@@ -128,27 +90,55 @@ public class DomainServiceImpl implements DomainService {
}
@Override
public List<DomainResp> getDomainListForAdmin(String userName) {
List<DomainDO> domainDOS = domainRepository.getDomainList();
Set<String> orgIds = Sets.newHashSet();
log.info("orgIds:{},userName:{}", orgIds, userName);
Map<Long, List<MetricResp>> metricDomainMap = metricService.getMetrics().stream()
.collect(Collectors.groupingBy(MetricResp::getDomainId));
Map<Long, List<DimensionResp>> dimensionDomainMap = dimensionService.getDimensions().stream()
.collect(Collectors.groupingBy(DimensionResp::getDomainId));
return convertList(domainDOS, metricDomainMap, dimensionDomainMap).stream()
.filter(domainDesc -> checkAdminPermission(orgIds, userName, domainDesc))
.collect(Collectors.toList());
public List<DomainResp> getDomainListWithAdminAuth(User user) {
Set<DomainResp> domainWithAuthAll = getDomainAuthSet(user.getName(), AuthType.VISIBLE);
if (!CollectionUtils.isEmpty(domainWithAuthAll)) {
List<Long> domainIds = domainWithAuthAll.stream().map(DomainResp::getId).collect(Collectors.toList());
domainWithAuthAll.addAll(getParentDomain(domainIds));
}
List<ModelResp> modelResps = modelService.getModelAuthList(user.getName(), AuthType.VISIBLE);
if (!CollectionUtils.isEmpty(modelResps)) {
List<Long> domainIds = modelResps.stream().map(ModelResp::getDomainId).collect(Collectors.toList());
domainWithAuthAll.addAll(getParentDomain(domainIds));
}
return new ArrayList<>(domainWithAuthAll);
}
@Override
public List<DomainResp> getDomainListForViewer(String userName) {
List<DomainDO> domainDOS = domainRepository.getDomainList();
Set<String> orgIds = Sets.newHashSet();
log.info("orgIds:{},userName:{}", orgIds, userName);
return convertList(domainDOS, new HashMap<>(), new HashMap<>()).stream()
.filter(domainDesc -> checkViewerPermission(orgIds, userName, domainDesc))
public Set<DomainResp> getDomainAuthSet(String userName, AuthType authTypeEnum) {
List<DomainResp> domainResps = getDomainList();
Set<String> orgIds = userService.getUserAllOrgId(userName);
List<DomainResp> domainWithAuth = Lists.newArrayList();
if (authTypeEnum.equals(AuthType.ADMIN)) {
domainWithAuth = domainResps.stream()
.filter(domainResp -> checkAdminPermission(orgIds, userName, domainResp))
.collect(Collectors.toList());
}
if (authTypeEnum.equals(AuthType.VISIBLE)) {
domainWithAuth = domainResps.stream()
.filter(domainResp -> checkViewerPermission(orgIds, userName, domainResp))
.collect(Collectors.toList());
}
List<Long> domainIds = domainWithAuth.stream().map(DomainResp::getId)
.collect(Collectors.toList());
//get all child domain
return getDomainChildren(domainIds);
}
private Set<DomainResp> getParentDomain(List<Long> ids) {
Set<DomainResp> domainSet = new HashSet<>();
if (CollectionUtils.isEmpty(ids)) {
return Sets.newHashSet(domainSet);
}
Map<Long, DomainResp> domainRespMap = getDomainMap();
for (Long domainId : ids) {
DomainResp domainResp = domainRespMap.get(domainId);
while (domainResp != null) {
domainSet.add(domainResp);
domainResp = domainRespMap.get(domainResp.getParentId());
}
}
return domainSet;
}
@@ -158,16 +148,6 @@ public class DomainServiceImpl implements DomainService {
return DomainConvert.convert(getDomainDO(id), fullDomainPathMap);
}
@Override
public String getDomainFullPath(Long domainId) {
if (domainId == null) {
return "";
}
Map<Long, String> map = getDomainFullPathMap();
return map.getOrDefault(domainId, "");
}
@Override
public Map<Long, String> getDomainFullPath() {
return getDomainFullPathMap();
@@ -180,22 +160,17 @@ public class DomainServiceImpl implements DomainService {
domain.setId(domainDO.getId());
}
private List<DomainResp> convertList(List<DomainDO> domainDOS, Map<Long, List<MetricResp>> metricDomainMap,
Map<Long, List<DimensionResp>> dimensionDomainMap) {
private List<DomainResp> convertList(List<DomainDO> domainDOS) {
List<DomainResp> domainDescs = Lists.newArrayList();
if (CollectionUtils.isEmpty(domainDOS)) {
return domainDescs;
}
Map<Long, String> fullDomainPathMap = getDomainFullPath();
return domainDOS.stream()
.map(domainDO -> DomainConvert.convert(domainDO, fullDomainPathMap, dimensionDomainMap,
metricDomainMap))
.map(domainDO -> DomainConvert.convert(domainDO, fullDomainPathMap))
.collect(Collectors.toList());
}
@Override
public Map<Long, DomainResp> getDomainMap() {
return getDomainList().stream().collect(Collectors.toMap(DomainResp::getId, a -> a, (k1, k2) -> k1));
@@ -251,72 +226,17 @@ public class DomainServiceImpl implements DomainService {
return domainFullPathMap;
}
public List<DomainSchemaResp> fetchDomainSchema(DomainSchemaFilterReq filter, User user) {
List<DomainSchemaResp> domainSchemaDescList = new ArrayList<>();
List<Long> domainIdsReq = generateDomainIdsReq(filter);
List<DomainResp> getDomainListByIds = getDomainList(domainIdsReq);
getDomainListByIds.stream().forEach(domainDesc -> {
domainSchemaDescList.add(fetchSingleDomainSchema(domainDesc));
});
return domainSchemaDescList;
}
protected DomainDO getDomainDO(Long id) {
return domainRepository.getDomainById(id);
}
private DomainSchemaResp fetchSingleDomainSchema(DomainResp domainDesc) {
Long domainId = domainDesc.getId();
DomainSchemaResp domainSchemaDesc = new DomainSchemaResp();
BeanUtils.copyProperties(domainDesc, domainSchemaDesc);
private boolean checkAdminPermission(Set<String> orgIds, String userName, DomainResp domainResp) {
domainSchemaDesc.setDimensions(generateDimSchema(domainId));
domainSchemaDesc.setMetrics(generateMetricSchema(domainId));
return domainSchemaDesc;
}
private List<MetricSchemaResp> generateMetricSchema(Long domainId) {
List<MetricSchemaResp> metricSchemaDescList = new ArrayList<>();
List<MetricResp> metricDescList = metricService.getMetrics(domainId);
metricDescList.stream().forEach(metricDesc -> {
MetricSchemaResp metricSchemaDesc = new MetricSchemaResp();
BeanUtils.copyProperties(metricDesc, metricSchemaDesc);
metricSchemaDesc.setUseCnt(0L);
metricSchemaDescList.add(metricSchemaDesc);
}
);
return metricSchemaDescList;
}
private List<DimSchemaResp> generateDimSchema(Long domainId) {
List<DimSchemaResp> dimSchemaDescList = new ArrayList<>();
List<DimensionResp> dimDescList = dimensionService.getDimensions(domainId);
dimDescList.stream().forEach(dimDesc -> {
DimSchemaResp dimSchemaDesc = new DimSchemaResp();
BeanUtils.copyProperties(dimDesc, dimSchemaDesc);
dimSchemaDesc.setUseCnt(0L);
dimSchemaDescList.add(dimSchemaDesc);
}
);
return dimSchemaDescList;
}
private List<Long> generateDomainIdsReq(DomainSchemaFilterReq filter) {
if (Objects.nonNull(filter) && !CollectionUtils.isEmpty(filter.getDomainIds())) {
return filter.getDomainIds();
}
return new ArrayList<>(getDomainMap().keySet());
}
private boolean checkAdminPermission(Set<String> orgIds, String userName, DomainResp domainDesc) {
List<String> admins = domainDesc.getAdmins();
List<String> adminOrgs = domainDesc.getAdminOrgs();
if (admins.contains(userName) || domainDesc.getCreatedBy().equals(userName)) {
List<String> admins = domainResp.getAdmins();
List<String> adminOrgs = domainResp.getAdminOrgs();
if (admins.contains(userName) || domainResp.getCreatedBy().equals(userName)) {
return true;
}
if (CollectionUtils.isEmpty(adminOrgs)) {
@@ -331,9 +251,6 @@ public class DomainServiceImpl implements DomainService {
}
private boolean checkViewerPermission(Set<String> orgIds, String userName, DomainResp domainDesc) {
if (domainDesc.getIsOpen() == 1) {
return true;
}
List<String> admins = domainDesc.getAdmins();
List<String> viewers = domainDesc.getViewers();
List<String> adminOrgs = domainDesc.getAdminOrgs();

View File

@@ -5,21 +5,22 @@ import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.google.common.collect.Lists;
import com.tencent.supersonic.auth.api.authentication.pojo.User;
import com.tencent.supersonic.common.pojo.enums.SensitiveLevelEnum;
import com.tencent.supersonic.semantic.api.model.pojo.Measure;
import com.tencent.supersonic.semantic.api.model.pojo.MetricTypeParams;
import com.tencent.supersonic.semantic.api.model.request.MetricReq;
import com.tencent.supersonic.semantic.api.model.request.PageMetricReq;
import com.tencent.supersonic.semantic.api.model.response.DomainResp;
import com.tencent.supersonic.semantic.api.model.response.MetricResp;
import com.tencent.supersonic.common.pojo.enums.SensitiveLevelEnum;
import com.tencent.supersonic.semantic.api.model.response.ModelResp;
import com.tencent.supersonic.semantic.model.domain.DomainService;
import com.tencent.supersonic.semantic.model.domain.MetricService;
import com.tencent.supersonic.semantic.model.domain.ModelService;
import com.tencent.supersonic.semantic.model.domain.dataobject.MetricDO;
import com.tencent.supersonic.semantic.model.domain.pojo.Metric;
import com.tencent.supersonic.semantic.model.domain.pojo.MetricFilter;
import com.tencent.supersonic.semantic.model.domain.repository.MetricRepository;
import com.tencent.supersonic.semantic.model.domain.utils.MetricConverter;
import com.tencent.supersonic.semantic.model.domain.DomainService;
import com.tencent.supersonic.semantic.model.domain.MetricService;
import com.tencent.supersonic.semantic.model.domain.pojo.Metric;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@@ -35,16 +36,18 @@ import org.springframework.util.CollectionUtils;
@Slf4j
public class MetricServiceImpl implements MetricService {
private MetricRepository metricRepository;
private ModelService modelService;
private DomainService domainService;
public MetricServiceImpl(MetricRepository metricRepository,
ModelService modelService,
DomainService domainService) {
this.domainService = domainService;
this.metricRepository = metricRepository;
this.modelService = modelService;
}
@Override
@@ -62,8 +65,8 @@ public class MetricServiceImpl implements MetricService {
return;
}
List<Metric> metrics = metricReqs.stream().map(MetricConverter::convert).collect(Collectors.toList());
Long domainId = metricReqs.get(0).getDomainId();
List<MetricResp> metricDescs = getMetricByDomainId(domainId);
Long modelId = metricReqs.get(0).getModelId();
List<MetricResp> metricDescs = getMetricByModelId(modelId);
Map<String, MetricResp> metricDescMap = metricDescs.stream()
.collect(Collectors.toMap(MetricResp::getBizName, a -> a, (k1, k2) -> k1));
List<Metric> metricToInsert = metrics.stream()
@@ -72,10 +75,9 @@ public class MetricServiceImpl implements MetricService {
saveMetricBatch(metricToInsert, user);
}
@Override
public List<MetricResp> getMetrics(Long domainId) {
return convertList(metricRepository.getMetricList(domainId));
public List<MetricResp> getMetrics(Long modelId) {
return convertList(metricRepository.getMetricList(modelId));
}
@Override
@@ -84,8 +86,8 @@ public class MetricServiceImpl implements MetricService {
}
@Override
public List<MetricResp> getMetrics(Long domainId, Long datasourceId) {
List<MetricResp> metricResps = convertList(metricRepository.getMetricList(domainId));
public List<MetricResp> getMetrics(Long modelId, Long datasourceId) {
List<MetricResp> metricResps = convertList(metricRepository.getMetricList(modelId));
return metricResps.stream().filter(metricResp -> {
Set<Long> datasourceIdSet = metricResp.getTypeParams().getMeasures().stream()
.map(Measure::getDatasourceId)
@@ -104,7 +106,10 @@ public class MetricServiceImpl implements MetricService {
BeanUtils.copyProperties(pageMetricReq, metricFilter);
Set<DomainResp> domainResps = domainService.getDomainChildren(pageMetricReq.getDomainIds());
List<Long> domainIds = domainResps.stream().map(DomainResp::getId).collect(Collectors.toList());
metricFilter.setDomainIds(domainIds);
List<ModelResp> modelResps = modelService.getModelByDomainIds(domainIds);
List<Long> modelIds = modelResps.stream().map(ModelResp::getId).collect(Collectors.toList());
pageMetricReq.getModelIds().addAll(modelIds);
metricFilter.setModelIds(pageMetricReq.getModelIds());
PageInfo<MetricDO> metricDOPageInfo = PageHelper.startPage(pageMetricReq.getCurrent(),
pageMetricReq.getPageSize())
.doSelectPageInfo(() -> queryMetric(metricFilter));
@@ -118,10 +123,9 @@ public class MetricServiceImpl implements MetricService {
return metricRepository.getMetric(metricFilter);
}
@Override
public MetricResp getMetric(Long domainId, String bizName) {
List<MetricResp> metricDescs = getMetricByDomainId(domainId);
public MetricResp getMetric(Long modelId, String bizName) {
List<MetricResp> metricDescs = getMetricByModelId(modelId);
MetricResp metricDesc = null;
if (CollectionUtils.isEmpty(metricDescs)) {
return metricDesc;
@@ -143,7 +147,6 @@ public class MetricServiceImpl implements MetricService {
updateMetric(metric);
}
public void saveMetric(Metric metric) {
MetricDO metricDO = MetricConverter.convert2MetricDO(metric);
log.info("[save metric] metricDO:{}", JSONObject.toJSONString(metricDO));
@@ -156,21 +159,19 @@ public class MetricServiceImpl implements MetricService {
metricRepository.updateMetric(MetricConverter.convert(metricDO, metric));
}
public List<MetricResp> getMetricByDomainId(Long domainId) {
return convertList(getMetricDOByDomainId(domainId));
public List<MetricResp> getMetricByModelId(Long modelId) {
return convertList(getMetricDOByModelId(modelId));
}
protected List<MetricDO> getMetricDOByDomainId(Long domainId) {
protected List<MetricDO> getMetricDOByModelId(Long modelId) {
List<MetricDO> metricDOS = metricRepository.getAllMetricList();
return metricDOS.stream().filter(metricDO -> Objects.equals(metricDO.getDomainId(), domainId))
return metricDOS.stream().filter(metricDO -> Objects.equals(metricDO.getModelId(), modelId))
.collect(Collectors.toList());
}
@Override
public List<MetricResp> getHighSensitiveMetric(Long domainId) {
List<MetricResp> metricDescs = getMetricByDomainId(domainId);
public List<MetricResp> getHighSensitiveMetric(Long modelId) {
List<MetricResp> metricDescs = getMetricByModelId(modelId);
if (CollectionUtils.isEmpty(metricDescs)) {
return metricDescs;
}
@@ -223,8 +224,8 @@ public class MetricServiceImpl implements MetricService {
}
private void checkExist(List<MetricReq> exprMetricReqList) {
Long domainId = exprMetricReqList.get(0).getDomainId();
List<MetricResp> metricDescs = getMetrics(domainId);
Long modelId = exprMetricReqList.get(0).getModelId();
List<MetricResp> metricDescs = getMetrics(modelId);
for (MetricReq exprMetricReq : exprMetricReqList) {
for (MetricResp metricDesc : metricDescs) {
if (metricDesc.getName().equalsIgnoreCase(exprMetricReq.getName())) {
@@ -238,13 +239,12 @@ public class MetricServiceImpl implements MetricService {
}
}
private List<MetricResp> convertList(List<MetricDO> metricDOS) {
List<MetricResp> metricDescs = Lists.newArrayList();
Map<Long, DomainResp> domainMap = domainService.getDomainMap();
Map<Long, ModelResp> modelMap = modelService.getModelMap();
if (!CollectionUtils.isEmpty(metricDOS)) {
metricDescs = metricDOS.stream()
.map(metricDO -> MetricConverter.convert2MetricDesc(metricDO, domainMap))
.map(metricDO -> MetricConverter.convert2MetricDesc(metricDO, modelMap))
.collect(Collectors.toList());
}
return metricDescs;

View File

@@ -0,0 +1,334 @@
package com.tencent.supersonic.semantic.model.application;
import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Lists;
import com.tencent.supersonic.auth.api.authentication.pojo.User;
import com.tencent.supersonic.auth.api.authentication.service.UserService;
import com.tencent.supersonic.common.pojo.enums.AuthType;
import com.tencent.supersonic.common.util.BeanMapper;
import com.tencent.supersonic.common.util.JsonUtil;
import com.tencent.supersonic.semantic.api.model.request.ModelReq;
import com.tencent.supersonic.semantic.api.model.request.ModelSchemaFilterReq;
import com.tencent.supersonic.semantic.api.model.response.DatasourceResp;
import com.tencent.supersonic.semantic.api.model.response.DimSchemaResp;
import com.tencent.supersonic.semantic.api.model.response.DimensionResp;
import com.tencent.supersonic.semantic.api.model.response.DomainResp;
import com.tencent.supersonic.semantic.api.model.response.MetricResp;
import com.tencent.supersonic.semantic.api.model.response.MetricSchemaResp;
import com.tencent.supersonic.semantic.api.model.response.ModelResp;
import com.tencent.supersonic.semantic.api.model.response.ModelSchemaResp;
import com.tencent.supersonic.semantic.model.domain.DatasourceService;
import com.tencent.supersonic.semantic.model.domain.DimensionService;
import com.tencent.supersonic.semantic.model.domain.DomainService;
import com.tencent.supersonic.semantic.model.domain.MetricService;
import com.tencent.supersonic.semantic.model.domain.ModelService;
import com.tencent.supersonic.semantic.model.domain.dataobject.ModelDO;
import com.tencent.supersonic.semantic.model.domain.pojo.Model;
import com.tencent.supersonic.semantic.model.domain.repository.ModelRepository;
import com.tencent.supersonic.semantic.model.domain.utils.ModelConvert;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.stream.Collectors;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
@Slf4j
@Service
public class ModelServiceImpl implements ModelService {
private final ModelRepository modelRepository;
private final MetricService metricService;
private final DimensionService dimensionService;
private final DatasourceService datasourceService;
private final DomainService domainService;
private final UserService userService;
public ModelServiceImpl(ModelRepository modelRepository, @Lazy MetricService metricService,
@Lazy DimensionService dimensionService, @Lazy DatasourceService datasourceService,
@Lazy DomainService domainService, UserService userService) {
this.modelRepository = modelRepository;
this.metricService = metricService;
this.dimensionService = dimensionService;
this.datasourceService = datasourceService;
this.domainService = domainService;
this.userService = userService;
}
@Override
public void createModel(ModelReq modelReq, User user) {
log.info("[create model] cmd : {}", JSONObject.toJSONString(modelReq));
Model model = ModelConvert.convert(modelReq);
log.info("[create model] object:{}", JSONObject.toJSONString(modelReq));
saveModel(model, user);
}
@Override
public void updateModel(ModelReq modelReq, User user) {
ModelDO modelDO = getModelDO(modelReq.getId());
modelDO.setUpdatedAt(new Date());
modelDO.setUpdatedBy(user.getName());
BeanMapper.mapper(modelReq, modelDO);
modelDO.setAdmin(String.join(",", modelReq.getAdmins()));
modelDO.setAdminOrg(String.join(",", modelReq.getAdminOrgs()));
modelDO.setViewer(String.join(",", modelReq.getViewers()));
modelDO.setViewOrg(String.join(",", modelReq.getViewOrgs()));
modelDO.setEntity(JsonUtil.toString(modelReq.getEntity()));
modelRepository.updateModel(modelDO);
}
@Override
public void deleteModel(Long id) {
checkDelete(id);
modelRepository.deleteModel(id);
}
@Override
public List<ModelResp> getModelListWithAuth(String userName, Long domainId, AuthType authType) {
List<ModelResp> modelResps = getModelAuthList(userName, authType);
Set<ModelResp> modelRespSet = new HashSet<>(modelResps);
List<ModelResp> modelRespsAuthInheritDomain = getModelRespAuthInheritDomain(userName, authType);
modelRespSet.addAll(modelRespsAuthInheritDomain);
if (domainId != null && domainId > 0) {
modelRespSet = modelRespSet.stream().filter(modelResp ->
modelResp.getDomainId().equals(domainId)).collect(Collectors.toSet());
}
return fillMetricInfo(new ArrayList<>(modelRespSet));
}
public List<ModelResp> getModelRespAuthInheritDomain(String userName, AuthType authType) {
Set<DomainResp> domainResps = domainService.getDomainAuthSet(userName, authType);
if (CollectionUtils.isEmpty(domainResps)) {
return Lists.newArrayList();
}
List<ModelResp> allModelList = getModelList();
Set<Long> domainIds = domainResps.stream().map(DomainResp::getId).collect(Collectors.toSet());
return allModelList.stream().filter(modelResp ->
domainIds.contains(modelResp.getDomainId())).collect(Collectors.toList());
}
@Override
public List<ModelResp> getModelAuthList(String userName, AuthType authTypeEnum) {
List<ModelResp> modelResps = getModelList();
Set<String> orgIds = userService.getUserAllOrgId(userName);
List<ModelResp> modelWithAuth = Lists.newArrayList();
if (authTypeEnum.equals(AuthType.ADMIN)) {
modelWithAuth = modelResps.stream()
.filter(modelResp -> checkAdminPermission(orgIds, userName, modelResp))
.collect(Collectors.toList());
}
if (authTypeEnum.equals(AuthType.VISIBLE)) {
modelWithAuth = modelResps.stream()
.filter(domainResp -> checkViewerPermission(orgIds, userName, domainResp))
.collect(Collectors.toList());
}
return modelWithAuth;
}
@Override
public List<ModelResp> getModelByDomainIds(List<Long> domainIds) {
if (CollectionUtils.isEmpty(domainIds)) {
return Lists.newArrayList();
}
List<ModelResp> modelResps = getModelList();
if (CollectionUtils.isEmpty(modelResps)) {
return modelResps;
}
return modelResps.stream().filter(modelResp ->
domainIds.contains(modelResp.getDomainId())).collect(Collectors.toList());
}
@Override
public List<ModelResp> getModelList(List<Long> modelIds) {
return getModelList().stream()
.filter(modelDO -> modelIds.contains(modelDO.getId()))
.collect(Collectors.toList());
}
@Override
public List<ModelResp> getModelList() {
return convertList(modelRepository.getModelList());
}
@Override
public ModelResp getModel(Long id) {
Map<Long, DomainResp> domainRespMap = domainService.getDomainList().stream()
.collect(Collectors.toMap(DomainResp::getId, d -> d));
return ModelConvert.convert(getModelDO(id), domainRespMap);
}
private void checkDelete(Long id) {
List<MetricResp> metricResps = metricService.getMetrics(id);
List<DimensionResp> dimensionResps = dimensionService.getDimensions(id);
List<DatasourceResp> datasourceResps = datasourceService.getDatasourceList(id);
if (!CollectionUtils.isEmpty(metricResps) || !CollectionUtils.isEmpty(datasourceResps)
|| !CollectionUtils.isEmpty(dimensionResps)) {
throw new RuntimeException("exist datasource, dimension or metric in this model, please check");
}
}
private void saveModel(Model model, User user) {
ModelDO modelDO = ModelConvert.convert(model, user);
modelRepository.createModel(modelDO);
model.setId(modelDO.getId());
}
private List<ModelResp> convertList(List<ModelDO> modelDOS) {
List<ModelResp> modelResps = Lists.newArrayList();
if (CollectionUtils.isEmpty(modelDOS)) {
return modelResps;
}
Map<Long, DomainResp> domainRespMap = domainService.getDomainList().stream()
.collect(Collectors.toMap(DomainResp::getId, d -> d));
return modelDOS.stream()
.map(modelDO -> ModelConvert.convert(modelDO, domainRespMap))
.collect(Collectors.toList());
}
private List<ModelResp> fillMetricInfo(List<ModelResp> modelResps) {
if (CollectionUtils.isEmpty(modelResps)) {
return modelResps;
}
Map<Long, List<MetricResp>> metricMap = metricService.getMetrics().stream()
.collect(Collectors.groupingBy(MetricResp::getModelId));
Map<Long, List<DimensionResp>> dimensionMap = dimensionService.getDimensions().stream()
.collect(Collectors.groupingBy(DimensionResp::getModelId));
modelResps.forEach(modelResp -> {
modelResp.setDimensionCnt(dimensionMap.getOrDefault(modelResp.getId(), Lists.newArrayList()).size());
modelResp.setMetricCnt(metricMap.getOrDefault(modelResp.getId(), Lists.newArrayList()).size());
});
return modelResps;
}
@Override
public Map<Long, ModelResp> getModelMap() {
return getModelList().stream().collect(Collectors.toMap(ModelResp::getId, a -> a, (k1, k2) -> k1));
}
@Override
public Map<Long, String> getModelFullPathMap() {
return getModelList().stream()
.collect(Collectors.toMap(ModelResp::getId, ModelResp::getFullPath, (k1, k2) -> k1));
}
protected ModelDO getModelDO(Long id) {
return modelRepository.getModelById(id);
}
private ModelSchemaResp fetchSingleModelSchema(ModelResp modelResp) {
Long modelId = modelResp.getId();
ModelSchemaResp modelSchemaResp = new ModelSchemaResp();
BeanUtils.copyProperties(modelResp, modelSchemaResp);
modelSchemaResp.setDimensions(generateDimSchema(modelId));
modelSchemaResp.setMetrics(generateMetricSchema(modelId));
return modelSchemaResp;
}
@Override
public ModelSchemaResp fetchSingleModelSchema(Long modelId) {
ModelResp model = getModel(modelId);
return fetchSingleModelSchema(model);
}
@Override
public List<ModelSchemaResp> fetchModelSchema(ModelSchemaFilterReq modelSchemaFilterReq) {
List<ModelSchemaResp> modelSchemaRespList = new ArrayList<>();
List<Long> modelIds = modelSchemaFilterReq.getModelIds();
if (CollectionUtils.isEmpty(modelIds)) {
modelIds = generateModelIdsReq(modelSchemaFilterReq);
}
modelIds.stream().forEach(modelId -> {
ModelSchemaResp modelSchemaResp = fetchSingleModelSchema(modelId);
if (Objects.nonNull(modelSchemaResp)) {
modelSchemaRespList.add(modelSchemaResp);
}
});
return modelSchemaRespList;
}
private List<MetricSchemaResp> generateMetricSchema(Long modelId) {
List<MetricSchemaResp> metricSchemaDescList = new ArrayList<>();
List<MetricResp> metricDescList = metricService.getMetrics(modelId);
metricDescList.stream().forEach(metricDesc -> {
MetricSchemaResp metricSchemaDesc = new MetricSchemaResp();
BeanUtils.copyProperties(metricDesc, metricSchemaDesc);
metricSchemaDesc.setUseCnt(0L);
metricSchemaDescList.add(metricSchemaDesc);
}
);
return metricSchemaDescList;
}
private List<DimSchemaResp> generateDimSchema(Long modelId) {
List<DimSchemaResp> dimSchemaDescList = new ArrayList<>();
List<DimensionResp> dimDescList = dimensionService.getDimensions(modelId);
dimDescList.stream().forEach(dimDesc -> {
DimSchemaResp dimSchemaDesc = new DimSchemaResp();
BeanUtils.copyProperties(dimDesc, dimSchemaDesc);
dimSchemaDesc.setUseCnt(0L);
dimSchemaDescList.add(dimSchemaDesc);
}
);
return dimSchemaDescList;
}
private List<Long> generateModelIdsReq(ModelSchemaFilterReq filter) {
if (Objects.nonNull(filter) && !CollectionUtils.isEmpty(filter.getModelIds())) {
return filter.getModelIds();
}
return new ArrayList<>(getModelMap().keySet());
}
public static boolean checkAdminPermission(Set<String> orgIds, String userName, ModelResp modelResp) {
List<String> admins = modelResp.getAdmins();
List<String> adminOrgs = modelResp.getAdminOrgs();
if (admins.contains(userName) || modelResp.getCreatedBy().equals(userName)) {
return true;
}
if (CollectionUtils.isEmpty(adminOrgs)) {
return false;
}
for (String orgId : orgIds) {
if (adminOrgs.contains(orgId)) {
return true;
}
}
return false;
}
public static boolean checkViewerPermission(Set<String> orgIds, String userName, ModelResp modelResp) {
List<String> admins = modelResp.getAdmins();
List<String> viewers = modelResp.getViewers();
List<String> adminOrgs = modelResp.getAdminOrgs();
List<String> viewOrgs = modelResp.getViewOrgs();
if (modelResp.openToAll()) {
return true;
}
if (admins.contains(userName) || viewers.contains(userName) || modelResp.getCreatedBy().equals(userName)) {
return true;
}
if (CollectionUtils.isEmpty(adminOrgs) && CollectionUtils.isEmpty(viewOrgs)) {
return false;
}
for (String orgId : orgIds) {
if (adminOrgs.contains(orgId)) {
return true;
}
}
for (String orgId : orgIds) {
if (viewOrgs.contains(orgId)) {
return true;
}
}
return false;
}
}

View File

@@ -5,14 +5,13 @@ import com.tencent.supersonic.auth.api.authentication.pojo.User;
import com.tencent.supersonic.semantic.api.model.request.ViewInfoReq;
import com.tencent.supersonic.semantic.api.model.response.DatasourceResp;
import com.tencent.supersonic.semantic.api.model.response.DimensionResp;
import com.tencent.supersonic.semantic.api.model.response.DomainSchemaRelaResp;
import com.tencent.supersonic.semantic.api.model.response.MetricResp;
import com.tencent.supersonic.semantic.model.domain.dataobject.ViewInfoDO;
import com.tencent.supersonic.semantic.model.domain.repository.ViewInfoRepository;
import com.tencent.supersonic.semantic.api.model.response.ModelSchemaRelaResp;
import com.tencent.supersonic.semantic.model.domain.DatasourceService;
import com.tencent.supersonic.semantic.model.domain.DimensionService;
import com.tencent.supersonic.semantic.model.domain.MetricService;
import com.tencent.supersonic.semantic.model.domain.dataobject.ViewInfoDO;
import com.tencent.supersonic.semantic.model.domain.repository.ViewInfoRepository;
import java.util.Date;
import java.util.List;
import org.assertj.core.util.Lists;
@@ -38,22 +37,22 @@ public class ViewInfoServiceImpl {
this.datasourceService = datasourceService;
}
public List<ViewInfoDO> getViewInfoList(Long domainId) {
return viewInfoRepository.getViewInfoList(domainId);
public List<ViewInfoDO> getViewInfoList(Long modelId) {
return viewInfoRepository.getViewInfoList(modelId);
}
public List<DomainSchemaRelaResp> getDomainSchema(Long domainId) {
List<DomainSchemaRelaResp> domainSchemaRelaResps = Lists.newArrayList();
List<DatasourceResp> datasourceResps = datasourceService.getDatasourceList(domainId);
public List<ModelSchemaRelaResp> getDomainSchema(Long modelId) {
List<ModelSchemaRelaResp> domainSchemaRelaResps = Lists.newArrayList();
List<DatasourceResp> datasourceResps = datasourceService.getDatasourceList(modelId);
for (DatasourceResp datasourceResp : datasourceResps) {
DomainSchemaRelaResp domainSchemaRelaResp = new DomainSchemaRelaResp();
ModelSchemaRelaResp domainSchemaRelaResp = new ModelSchemaRelaResp();
Long datasourceId = datasourceResp.getId();
List<MetricResp> metricResps = metricService.getMetrics(domainId, datasourceId);
List<MetricResp> metricResps = metricService.getMetrics(modelId, datasourceId);
List<DimensionResp> dimensionResps = dimensionService.getDimensionsByDatasource(datasourceId);
domainSchemaRelaResp.setDatasource(datasourceResp);
domainSchemaRelaResp.setDimensions(dimensionResps);
domainSchemaRelaResp.setMetrics(metricResps);
domainSchemaRelaResp.setDomainId(domainId);
domainSchemaRelaResp.setDomainId(modelId);
domainSchemaRelaResps.add(domainSchemaRelaResp);
}
return domainSchemaRelaResps;

View File

@@ -1,14 +1,14 @@
package com.tencent.supersonic.semantic.model.domain;
import com.tencent.supersonic.semantic.api.model.pojo.ItemDateFilter;
import com.tencent.supersonic.semantic.api.model.yaml.DatasourceYamlTpl;
import com.tencent.supersonic.semantic.api.model.yaml.DimensionYamlTpl;
import com.tencent.supersonic.semantic.api.model.yaml.MetricYamlTpl;
import com.tencent.supersonic.semantic.api.model.response.DatabaseResp;
import com.tencent.supersonic.semantic.api.model.response.DatasourceResp;
import com.tencent.supersonic.semantic.api.model.response.DimensionResp;
import com.tencent.supersonic.semantic.api.model.response.ItemDateResp;
import com.tencent.supersonic.semantic.api.model.response.MetricResp;
import com.tencent.supersonic.semantic.api.model.yaml.DatasourceYamlTpl;
import com.tencent.supersonic.semantic.api.model.yaml.DimensionYamlTpl;
import com.tencent.supersonic.semantic.api.model.yaml.MetricYamlTpl;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -16,21 +16,22 @@ import java.util.Set;
public interface Catalog {
DatabaseResp getDatabase(Long id);
DatabaseResp getDatabaseByDomainId(Long domainId);
List<DatasourceResp> getDatasourceList(Long domainId);
DatabaseResp getDatabaseByModelId(Long modelId);
String getDomainFullPath(Long domainId);
List<DatasourceResp> getDatasourceList(Long modelId);
Map<Long, String> getDomainFullPath();
String getModelFullPath(Long modelId);
DimensionResp getDimension(String bizName, Long domainId);
Map<Long, String> getModelFullPath();
List<DimensionResp> getDimensions(Long domainId);
DimensionResp getDimension(String bizName, Long modelId);
List<MetricResp> getMetrics(Long domainId);
List<DimensionResp> getDimensions(Long modelId);
void getModelYamlTplByDomainIds(Set<Long> domainIds, Map<String, List<DimensionYamlTpl>> dimensionYamlMap,
List<MetricResp> getMetrics(Long modelId);
void getModelYamlTplByMoldelIds(Set<Long> modelIds, Map<String, List<DimensionYamlTpl>> dimensionYamlMap,
List<DatasourceYamlTpl> datasourceYamlTplList, List<MetricYamlTpl> metricYamlTplList);

View File

@@ -11,6 +11,8 @@ public interface DatabaseService {
QueryResultWithSchemaResp executeSql(String sql, DatabaseResp databaseResp);
DatabaseResp getDatabaseByModelId(Long modelId);
QueryResultWithSchemaResp executeSql(String sql, Long domainId);
boolean testConnect(DatabaseReq databaseReq, User user);

View File

@@ -3,15 +3,15 @@ package com.tencent.supersonic.semantic.model.domain;
import com.tencent.supersonic.auth.api.authentication.pojo.User;
import com.tencent.supersonic.semantic.api.model.pojo.ItemDateFilter;
import com.tencent.supersonic.semantic.api.model.yaml.DatasourceYamlTpl;
import com.tencent.supersonic.semantic.api.model.yaml.DimensionYamlTpl;
import com.tencent.supersonic.semantic.api.model.yaml.MetricYamlTpl;
import com.tencent.supersonic.semantic.api.model.request.DatasourceRelaReq;
import com.tencent.supersonic.semantic.api.model.request.DatasourceReq;
import com.tencent.supersonic.semantic.api.model.response.DatasourceRelaResp;
import com.tencent.supersonic.semantic.api.model.response.DatasourceResp;
import com.tencent.supersonic.semantic.api.model.response.ItemDateResp;
import com.tencent.supersonic.semantic.api.model.response.MeasureResp;
import com.tencent.supersonic.semantic.api.model.yaml.DatasourceYamlTpl;
import com.tencent.supersonic.semantic.api.model.yaml.DimensionYamlTpl;
import com.tencent.supersonic.semantic.api.model.yaml.MetricYamlTpl;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -22,8 +22,6 @@ public interface DatasourceService {
DatasourceResp updateDatasource(DatasourceReq datasourceReq, User user) throws Exception;
String getSourceBizNameById(Long id);
List<DatasourceResp> getDatasourceListNoMeasurePrefix(Long domainId);
List<DatasourceResp> getDatasourceList();
@@ -42,10 +40,9 @@ public interface DatasourceService {
ItemDateResp getItemDate(ItemDateFilter dimension, ItemDateFilter metric);
List<MeasureResp> getMeasureListOfDomain(Long domainId);
List<MeasureResp> getMeasureListOfModel(Long modelId);
void getModelYamlTplByDomainIds(Set<Long> domainIds, Map<String, List<DimensionYamlTpl>> dimensionYamlMap,
void getModelYamlTplByModelIds(Set<Long> modelIds, Map<String, List<DimensionYamlTpl>> dimensionYamlMap,
List<DatasourceYamlTpl> datasourceYamlTplList, List<MetricYamlTpl> metricYamlTplList);
}

View File

@@ -1,22 +1,18 @@
package com.tencent.supersonic.semantic.model.domain;
import com.tencent.supersonic.auth.api.authentication.pojo.User;
import com.tencent.supersonic.common.pojo.enums.AuthType;
import com.tencent.supersonic.semantic.api.model.request.DomainReq;
import com.tencent.supersonic.semantic.api.model.request.DomainSchemaFilterReq;
import com.tencent.supersonic.semantic.api.model.request.DomainUpdateReq;
import com.tencent.supersonic.semantic.api.model.response.DomainResp;
import com.tencent.supersonic.semantic.api.model.response.DomainSchemaResp;
import java.util.List;
import java.util.Map;
import java.util.Set;
public interface DomainService {
DomainResp getDomain(Long id);
String getDomainFullPath(Long domainId);
Map<Long, String> getDomainFullPath();
void createDomain(DomainReq domainReq, User user);
@@ -25,20 +21,16 @@ public interface DomainService {
void deleteDomain(Long id);
String getDomainBizName(Long domainId);
List<DomainResp> getDomainList();
List<DomainResp> getDomainList(List<Long> domainIds);
Map<Long, DomainResp> getDomainMap();
List<DomainResp> getDomainListForAdmin(String userName);
List<DomainResp> getDomainListWithAdminAuth(User user);
List<DomainResp> getDomainListForViewer(String userName);
Set<DomainResp> getDomainAuthSet(String userName, AuthType authTypeEnum);
Set<DomainResp> getDomainChildren(List<Long> domainId);
List<DomainSchemaResp> fetchDomainSchema(DomainSchemaFilterReq filter, User user);
}

View File

@@ -11,11 +11,11 @@ public interface MetricService {
List<MetricResp> getMetrics(List<Long> ids);
List<MetricResp> getMetrics(Long domainId);
List<MetricResp> getMetrics(Long modelId);
List<MetricResp> getMetrics();
List<MetricResp> getMetrics(Long domainId, Long datasourceId);
List<MetricResp> getMetrics(Long modelId, Long datasourceId);
void creatExprMetric(MetricReq metricReq, User user) throws Exception;
@@ -23,9 +23,9 @@ public interface MetricService {
PageInfo<MetricResp> queryMetric(PageMetricReq pageMetrricReq);
MetricResp getMetric(Long domainId, String bizName);
MetricResp getMetric(Long modelId, String bizName);
List<MetricResp> getHighSensitiveMetric(Long domainId);
List<MetricResp> getHighSensitiveMetric(Long modelId);
void updateExprMetric(MetricReq metricReq, User user) throws Exception;

View File

@@ -0,0 +1,39 @@
package com.tencent.supersonic.semantic.model.domain;
import com.tencent.supersonic.auth.api.authentication.pojo.User;
import com.tencent.supersonic.common.pojo.enums.AuthType;
import com.tencent.supersonic.semantic.api.model.request.ModelReq;
import com.tencent.supersonic.semantic.api.model.request.ModelSchemaFilterReq;
import com.tencent.supersonic.semantic.api.model.response.ModelResp;
import com.tencent.supersonic.semantic.api.model.response.ModelSchemaResp;
import java.util.List;
import java.util.Map;
public interface ModelService {
List<ModelResp> getModelListWithAuth(String userName, Long domainId, AuthType authType);
List<ModelResp> getModelAuthList(String userName, AuthType authTypeEnum);
List<ModelResp> getModelByDomainIds(List<Long> domainIds);
List<ModelResp> getModelList();
List<ModelResp> getModelList(List<Long> modelIds);
ModelResp getModel(Long id);
void updateModel(ModelReq modelReq, User user);
void createModel(ModelReq modelReq, User user);
void deleteModel(Long model);
Map<Long, ModelResp> getModelMap();
Map<Long, String> getModelFullPathMap();
ModelSchemaResp fetchSingleModelSchema(Long modelId);
List<ModelSchemaResp> fetchModelSchema(ModelSchemaFilterReq modelSchemaFilterReq);
}

View File

@@ -1,7 +1,7 @@
package com.tencent.supersonic.semantic.model.domain.adaptor.engineadapter;
import com.tencent.supersonic.semantic.api.model.enums.TimeDimensionEnum;
import com.tencent.supersonic.common.pojo.Constants;
import com.tencent.supersonic.semantic.api.model.enums.TimeDimensionEnum;
public class ClickHouseAdaptor extends EngineAdaptor {

View File

@@ -1,7 +1,7 @@
package com.tencent.supersonic.semantic.model.domain.adaptor.engineadapter;
import com.tencent.supersonic.semantic.api.model.enums.TimeDimensionEnum;
import com.tencent.supersonic.common.pojo.Constants;
import com.tencent.supersonic.semantic.api.model.enums.TimeDimensionEnum;
public class MysqlAdaptor extends EngineAdaptor {

View File

@@ -25,7 +25,7 @@ public class DatabaseDO {
private String description;
/**
* 版本
*
*/
private String version;
@@ -127,6 +127,20 @@ public class DatabaseDO {
this.description = description == null ? null : description.trim();
}
/**
* @return version
*/
public String getVersion() {
return version;
}
/**
* @param version
*/
public void setVersion(String version) {
this.version = version == null ? null : version.trim();
}
/**
* 类型 mysql,clickhouse,tdw
*
@@ -234,16 +248,4 @@ public class DatabaseDO {
public void setConfig(String config) {
this.config = config == null ? null : config.trim();
}
/**
* 版本信息
*
*/
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
}

View File

@@ -38,13 +38,6 @@ public class DatabaseDOExample {
oredCriteria = new ArrayList<Criteria>();
}
/**
* @mbg.generated
*/
public String getOrderByClause() {
return orderByClause;
}
/**
* @mbg.generated
*/
@@ -55,8 +48,8 @@ public class DatabaseDOExample {
/**
* @mbg.generated
*/
public boolean isDistinct() {
return distinct;
public String getOrderByClause() {
return orderByClause;
}
/**
@@ -66,6 +59,13 @@ public class DatabaseDOExample {
this.distinct = distinct;
}
/**
* @mbg.generated
*/
public boolean isDistinct() {
return distinct;
}
/**
* @mbg.generated
*/
@@ -117,13 +117,6 @@ public class DatabaseDOExample {
distinct = false;
}
/**
* @mbg.generated
*/
public Integer getLimitStart() {
return limitStart;
}
/**
* @mbg.generated
*/
@@ -134,8 +127,8 @@ public class DatabaseDOExample {
/**
* @mbg.generated
*/
public Integer getLimitEnd() {
return limitEnd;
public Integer getLimitStart() {
return limitStart;
}
/**
@@ -145,6 +138,13 @@ public class DatabaseDOExample {
this.limitEnd = limitEnd;
}
/**
* @mbg.generated
*/
public Integer getLimitEnd() {
return limitEnd;
}
/**
* s2_database null
*/
@@ -450,6 +450,76 @@ public class DatabaseDOExample {
return (Criteria) this;
}
public Criteria andVersionIsNull() {
addCriterion("version is null");
return (Criteria) this;
}
public Criteria andVersionIsNotNull() {
addCriterion("version is not null");
return (Criteria) this;
}
public Criteria andVersionEqualTo(String value) {
addCriterion("version =", value, "version");
return (Criteria) this;
}
public Criteria andVersionNotEqualTo(String value) {
addCriterion("version <>", value, "version");
return (Criteria) this;
}
public Criteria andVersionGreaterThan(String value) {
addCriterion("version >", value, "version");
return (Criteria) this;
}
public Criteria andVersionGreaterThanOrEqualTo(String value) {
addCriterion("version >=", value, "version");
return (Criteria) this;
}
public Criteria andVersionLessThan(String value) {
addCriterion("version <", value, "version");
return (Criteria) this;
}
public Criteria andVersionLessThanOrEqualTo(String value) {
addCriterion("version <=", value, "version");
return (Criteria) this;
}
public Criteria andVersionLike(String value) {
addCriterion("version like", value, "version");
return (Criteria) this;
}
public Criteria andVersionNotLike(String value) {
addCriterion("version not like", value, "version");
return (Criteria) this;
}
public Criteria andVersionIn(List<String> values) {
addCriterion("version in", values, "version");
return (Criteria) this;
}
public Criteria andVersionNotIn(List<String> values) {
addCriterion("version not in", values, "version");
return (Criteria) this;
}
public Criteria andVersionBetween(String value1, String value2) {
addCriterion("version between", value1, value2, "version");
return (Criteria) this;
}
public Criteria andVersionNotBetween(String value1, String value2) {
addCriterion("version not between", value1, value2, "version");
return (Criteria) this;
}
public Criteria andTypeIsNull() {
addCriterion("type is null");
return (Criteria) this;
@@ -812,6 +882,38 @@ public class DatabaseDOExample {
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
@@ -847,37 +949,5 @@ public class DatabaseDOExample {
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
}
}

View File

@@ -12,7 +12,7 @@ public class DatasourceDO {
/**
* 主题域ID
*/
private Long domainId;
private Long modelId;
/**
* 数据源名称
@@ -76,19 +76,19 @@ public class DatasourceDO {
/**
* 主题域ID
*
* @return domain_id 主题域ID
* @return model_id 主题域ID
*/
public Long getDomainId() {
return domainId;
public Long getModelId() {
return modelId;
}
/**
* 主题域ID
*
* @param domainId 主题域ID
* @param modelId 主题域ID
*/
public void setDomainId(Long domainId) {
this.domainId = domainId;
public void setModelId(Long modelId) {
this.modelId = modelId;
}
/**

View File

@@ -38,13 +38,6 @@ public class DatasourceDOExample {
oredCriteria = new ArrayList<Criteria>();
}
/**
* @mbg.generated
*/
public String getOrderByClause() {
return orderByClause;
}
/**
* @mbg.generated
*/
@@ -55,8 +48,8 @@ public class DatasourceDOExample {
/**
* @mbg.generated
*/
public boolean isDistinct() {
return distinct;
public String getOrderByClause() {
return orderByClause;
}
/**
@@ -66,6 +59,13 @@ public class DatasourceDOExample {
this.distinct = distinct;
}
/**
* @mbg.generated
*/
public boolean isDistinct() {
return distinct;
}
/**
* @mbg.generated
*/
@@ -117,13 +117,6 @@ public class DatasourceDOExample {
distinct = false;
}
/**
* @mbg.generated
*/
public Integer getLimitStart() {
return limitStart;
}
/**
* @mbg.generated
*/
@@ -134,8 +127,8 @@ public class DatasourceDOExample {
/**
* @mbg.generated
*/
public Integer getLimitEnd() {
return limitEnd;
public Integer getLimitStart() {
return limitStart;
}
/**
@@ -145,6 +138,13 @@ public class DatasourceDOExample {
this.limitEnd = limitEnd;
}
/**
* @mbg.generated
*/
public Integer getLimitEnd() {
return limitEnd;
}
/**
* s2_datasource null
*/
@@ -250,63 +250,63 @@ public class DatasourceDOExample {
return (Criteria) this;
}
public Criteria andDomainIdIsNull() {
addCriterion("domain_id is null");
public Criteria andModelIdIsNull() {
addCriterion("model_id is null");
return (Criteria) this;
}
public Criteria andDomainIdIsNotNull() {
addCriterion("domain_id is not null");
public Criteria andModelIdIsNotNull() {
addCriterion("model_id is not null");
return (Criteria) this;
}
public Criteria andDomainIdEqualTo(Long value) {
addCriterion("domain_id =", value, "domainId");
public Criteria andModelIdEqualTo(Long value) {
addCriterion("model_id =", value, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdNotEqualTo(Long value) {
addCriterion("domain_id <>", value, "domainId");
public Criteria andModelIdNotEqualTo(Long value) {
addCriterion("model_id <>", value, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdGreaterThan(Long value) {
addCriterion("domain_id >", value, "domainId");
public Criteria andModelIdGreaterThan(Long value) {
addCriterion("model_id >", value, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdGreaterThanOrEqualTo(Long value) {
addCriterion("domain_id >=", value, "domainId");
public Criteria andModelIdGreaterThanOrEqualTo(Long value) {
addCriterion("model_id >=", value, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdLessThan(Long value) {
addCriterion("domain_id <", value, "domainId");
public Criteria andModelIdLessThan(Long value) {
addCriterion("model_id <", value, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdLessThanOrEqualTo(Long value) {
addCriterion("domain_id <=", value, "domainId");
public Criteria andModelIdLessThanOrEqualTo(Long value) {
addCriterion("model_id <=", value, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdIn(List<Long> values) {
addCriterion("domain_id in", values, "domainId");
public Criteria andModelIdIn(List<Long> values) {
addCriterion("model_id in", values, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdNotIn(List<Long> values) {
addCriterion("domain_id not in", values, "domainId");
public Criteria andModelIdNotIn(List<Long> values) {
addCriterion("model_id not in", values, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdBetween(Long value1, Long value2) {
addCriterion("domain_id between", value1, value2, "domainId");
public Criteria andModelIdBetween(Long value1, Long value2) {
addCriterion("model_id between", value1, value2, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdNotBetween(Long value1, Long value2) {
addCriterion("domain_id not between", value1, value2, "domainId");
public Criteria andModelIdNotBetween(Long value1, Long value2) {
addCriterion("model_id not between", value1, value2, "modelId");
return (Criteria) this;
}
@@ -872,6 +872,38 @@ public class DatasourceDOExample {
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
@@ -907,37 +939,5 @@ public class DatasourceDOExample {
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
}
}

View File

@@ -12,7 +12,7 @@ public class DatasourceRelaDO {
/**
*
*/
private Long domainId;
private Long modelId;
/**
*
@@ -64,17 +64,17 @@ public class DatasourceRelaDO {
}
/**
* @return domain_id
* @return model_id
*/
public Long getDomainId() {
return domainId;
public Long getModelId() {
return modelId;
}
/**
* @param domainId
* @param modelId
*/
public void setDomainId(Long domainId) {
this.domainId = domainId;
public void setModelId(Long modelId) {
this.modelId = modelId;
}
/**

View File

@@ -38,13 +38,6 @@ public class DatasourceRelaDOExample {
oredCriteria = new ArrayList<Criteria>();
}
/**
* @mbg.generated
*/
public String getOrderByClause() {
return orderByClause;
}
/**
* @mbg.generated
*/
@@ -55,8 +48,8 @@ public class DatasourceRelaDOExample {
/**
* @mbg.generated
*/
public boolean isDistinct() {
return distinct;
public String getOrderByClause() {
return orderByClause;
}
/**
@@ -66,6 +59,13 @@ public class DatasourceRelaDOExample {
this.distinct = distinct;
}
/**
* @mbg.generated
*/
public boolean isDistinct() {
return distinct;
}
/**
* @mbg.generated
*/
@@ -117,13 +117,6 @@ public class DatasourceRelaDOExample {
distinct = false;
}
/**
* @mbg.generated
*/
public Integer getLimitStart() {
return limitStart;
}
/**
* @mbg.generated
*/
@@ -134,8 +127,8 @@ public class DatasourceRelaDOExample {
/**
* @mbg.generated
*/
public Integer getLimitEnd() {
return limitEnd;
public Integer getLimitStart() {
return limitStart;
}
/**
@@ -145,6 +138,13 @@ public class DatasourceRelaDOExample {
this.limitEnd = limitEnd;
}
/**
* @mbg.generated
*/
public Integer getLimitEnd() {
return limitEnd;
}
/**
* s2_datasource_rela null
*/
@@ -250,63 +250,63 @@ public class DatasourceRelaDOExample {
return (Criteria) this;
}
public Criteria andDomainIdIsNull() {
addCriterion("domain_id is null");
public Criteria andModelIdIsNull() {
addCriterion("model_id is null");
return (Criteria) this;
}
public Criteria andDomainIdIsNotNull() {
addCriterion("domain_id is not null");
public Criteria andModelIdIsNotNull() {
addCriterion("model_id is not null");
return (Criteria) this;
}
public Criteria andDomainIdEqualTo(Long value) {
addCriterion("domain_id =", value, "domainId");
public Criteria andModelIdEqualTo(Long value) {
addCriterion("model_id =", value, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdNotEqualTo(Long value) {
addCriterion("domain_id <>", value, "domainId");
public Criteria andModelIdNotEqualTo(Long value) {
addCriterion("model_id <>", value, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdGreaterThan(Long value) {
addCriterion("domain_id >", value, "domainId");
public Criteria andModelIdGreaterThan(Long value) {
addCriterion("model_id >", value, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdGreaterThanOrEqualTo(Long value) {
addCriterion("domain_id >=", value, "domainId");
public Criteria andModelIdGreaterThanOrEqualTo(Long value) {
addCriterion("model_id >=", value, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdLessThan(Long value) {
addCriterion("domain_id <", value, "domainId");
public Criteria andModelIdLessThan(Long value) {
addCriterion("model_id <", value, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdLessThanOrEqualTo(Long value) {
addCriterion("domain_id <=", value, "domainId");
public Criteria andModelIdLessThanOrEqualTo(Long value) {
addCriterion("model_id <=", value, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdIn(List<Long> values) {
addCriterion("domain_id in", values, "domainId");
public Criteria andModelIdIn(List<Long> values) {
addCriterion("model_id in", values, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdNotIn(List<Long> values) {
addCriterion("domain_id not in", values, "domainId");
public Criteria andModelIdNotIn(List<Long> values) {
addCriterion("model_id not in", values, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdBetween(Long value1, Long value2) {
addCriterion("domain_id between", value1, value2, "domainId");
public Criteria andModelIdBetween(Long value1, Long value2) {
addCriterion("model_id between", value1, value2, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdNotBetween(Long value1, Long value2) {
addCriterion("domain_id not between", value1, value2, "domainId");
public Criteria andModelIdNotBetween(Long value1, Long value2) {
addCriterion("model_id not between", value1, value2, "modelId");
return (Criteria) this;
}
@@ -335,6 +335,11 @@ public class DatasourceRelaDOExample {
return (Criteria) this;
}
public Criteria andDatasourceFromGreaterThanOrEqualTo(Long value) {
addCriterion("datasource_from >=", value, "datasourceFrom");
return (Criteria) this;
}
public Criteria andDatasourceFromLessThan(Long value) {
addCriterion("datasource_from <", value, "datasourceFrom");
return (Criteria) this;
@@ -787,6 +792,38 @@ public class DatasourceRelaDOExample {
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
@@ -822,37 +859,5 @@ public class DatasourceRelaDOExample {
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
}
}

View File

@@ -1,278 +0,0 @@
package com.tencent.supersonic.semantic.model.domain.dataobject;
import java.util.Date;
public class DictionaryDO {
/**
*
*/
private Long id;
/**
* 对应维度id、指标id等
*/
private Long itemId;
/**
* 对应维度、指标等
*/
private String type;
/**
* 1-开启写入字典0-不开启
*/
private Boolean isDictInfo;
/**
* 创建时间
*/
private Date createdAt;
/**
* 更新时间
*/
private Date updatedAt;
/**
* 创建人
*/
private String createdBy;
/**
* 更新人
*/
private String updatedBy;
/**
* 1-删除,0-可用
*/
private Boolean isDeleted;
/**
* 字典黑名单
*/
private String blackList;
/**
* 字典白名单
*/
private String whiteList;
/**
* 字典规则
*/
private String ruleList;
/**
* @return id
*/
public Long getId() {
return id;
}
/**
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* 对应维度id、指标id等
*
* @return item_id 对应维度id、指标id等
*/
public Long getItemId() {
return itemId;
}
/**
* 对应维度id、指标id等
*
* @param itemId 对应维度id、指标id等
*/
public void setItemId(Long itemId) {
this.itemId = itemId;
}
/**
* 对应维度、指标等
*
* @return type 对应维度、指标等
*/
public String getType() {
return type;
}
/**
* 对应维度、指标等
*
* @param type 对应维度、指标等
*/
public void setType(String type) {
this.type = type == null ? null : type.trim();
}
/**
* 1-开启写入字典0-不开启
*
* @return is_dict_Info 1-开启写入字典0-不开启
*/
public Boolean getIsDictInfo() {
return isDictInfo;
}
/**
* 1-开启写入字典0-不开启
*
* @param isDictInfo 1-开启写入字典0-不开启
*/
public void setIsDictInfo(Boolean isDictInfo) {
this.isDictInfo = isDictInfo;
}
/**
* 创建时间
*
* @return created_at 创建时间
*/
public Date getCreatedAt() {
return createdAt;
}
/**
* 创建时间
*
* @param createdAt 创建时间
*/
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
/**
* 更新时间
*
* @return updated_at 更新时间
*/
public Date getUpdatedAt() {
return updatedAt;
}
/**
* 更新时间
*
* @param updatedAt 更新时间
*/
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
/**
* 创建人
*
* @return created_by 创建人
*/
public String getCreatedBy() {
return createdBy;
}
/**
* 创建人
*
* @param createdBy 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy == null ? null : createdBy.trim();
}
/**
* 更新人
*
* @return updated_by 更新人
*/
public String getUpdatedBy() {
return updatedBy;
}
/**
* 更新人
*
* @param updatedBy 更新人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy == null ? null : updatedBy.trim();
}
/**
* 1-删除,0-可用
*
* @return is_deleted 1-删除,0-可用
*/
public Boolean getIsDeleted() {
return isDeleted;
}
/**
* 1-删除,0-可用
*
* @param isDeleted 1-删除,0-可用
*/
public void setIsDeleted(Boolean isDeleted) {
this.isDeleted = isDeleted;
}
/**
* 字典黑名单
*
* @return black_list 字典黑名单
*/
public String getBlackList() {
return blackList;
}
/**
* 字典黑名单
*
* @param blackList 字典黑名单
*/
public void setBlackList(String blackList) {
this.blackList = blackList == null ? null : blackList.trim();
}
/**
* 字典白名单
*
* @return white_list 字典白名单
*/
public String getWhiteList() {
return whiteList;
}
/**
* 字典白名单
*
* @param whiteList 字典白名单
*/
public void setWhiteList(String whiteList) {
this.whiteList = whiteList == null ? null : whiteList.trim();
}
/**
* 字典规则
*
* @return rule_list 字典规则
*/
public String getRuleList() {
return ruleList;
}
/**
* 字典规则
*
* @param ruleList 字典规则
*/
public void setRuleList(String ruleList) {
this.ruleList = ruleList == null ? null : ruleList.trim();
}
}

View File

@@ -1,863 +0,0 @@
package com.tencent.supersonic.semantic.model.domain.dataobject;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class DictionaryDOExample {
/**
* s2_dictionary
*/
protected String orderByClause;
/**
* s2_dictionary
*/
protected boolean distinct;
/**
* s2_dictionary
*/
protected List<Criteria> oredCriteria;
/**
* s2_dictionary
*/
protected Integer limitStart;
/**
* s2_dictionary
*/
protected Integer limitEnd;
/**
* @mbg.generated
*/
public DictionaryDOExample() {
oredCriteria = new ArrayList<Criteria>();
}
/**
* @mbg.generated
*/
public String getOrderByClause() {
return orderByClause;
}
/**
* @mbg.generated
*/
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
/**
* @mbg.generated
*/
public boolean isDistinct() {
return distinct;
}
/**
* @mbg.generated
*/
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
/**
* @mbg.generated
*/
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
/**
* @mbg.generated
*/
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
/**
* @mbg.generated
*/
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
/**
* @mbg.generated
*/
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
/**
* @mbg.generated
*/
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
/**
* @mbg.generated
*/
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
/**
* @mbg.generated
*/
public Integer getLimitStart() {
return limitStart;
}
/**
* @mbg.generated
*/
public void setLimitStart(Integer limitStart) {
this.limitStart = limitStart;
}
/**
* @mbg.generated
*/
public Integer getLimitEnd() {
return limitEnd;
}
/**
* @mbg.generated
*/
public void setLimitEnd(Integer limitEnd) {
this.limitEnd = limitEnd;
}
/**
* s2_dictionary null
*/
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andItemIdIsNull() {
addCriterion("item_id is null");
return (Criteria) this;
}
public Criteria andItemIdIsNotNull() {
addCriterion("item_id is not null");
return (Criteria) this;
}
public Criteria andItemIdEqualTo(Long value) {
addCriterion("item_id =", value, "itemId");
return (Criteria) this;
}
public Criteria andItemIdNotEqualTo(Long value) {
addCriterion("item_id <>", value, "itemId");
return (Criteria) this;
}
public Criteria andItemIdGreaterThan(Long value) {
addCriterion("item_id >", value, "itemId");
return (Criteria) this;
}
public Criteria andItemIdGreaterThanOrEqualTo(Long value) {
addCriterion("item_id >=", value, "itemId");
return (Criteria) this;
}
public Criteria andItemIdLessThan(Long value) {
addCriterion("item_id <", value, "itemId");
return (Criteria) this;
}
public Criteria andItemIdLessThanOrEqualTo(Long value) {
addCriterion("item_id <=", value, "itemId");
return (Criteria) this;
}
public Criteria andItemIdIn(List<Long> values) {
addCriterion("item_id in", values, "itemId");
return (Criteria) this;
}
public Criteria andItemIdNotIn(List<Long> values) {
addCriterion("item_id not in", values, "itemId");
return (Criteria) this;
}
public Criteria andItemIdBetween(Long value1, Long value2) {
addCriterion("item_id between", value1, value2, "itemId");
return (Criteria) this;
}
public Criteria andItemIdNotBetween(Long value1, Long value2) {
addCriterion("item_id not between", value1, value2, "itemId");
return (Criteria) this;
}
public Criteria andTypeIsNull() {
addCriterion("type is null");
return (Criteria) this;
}
public Criteria andTypeIsNotNull() {
addCriterion("type is not null");
return (Criteria) this;
}
public Criteria andTypeEqualTo(String value) {
addCriterion("type =", value, "type");
return (Criteria) this;
}
public Criteria andTypeNotEqualTo(String value) {
addCriterion("type <>", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThan(String value) {
addCriterion("type >", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThanOrEqualTo(String value) {
addCriterion("type >=", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThan(String value) {
addCriterion("type <", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThanOrEqualTo(String value) {
addCriterion("type <=", value, "type");
return (Criteria) this;
}
public Criteria andTypeLike(String value) {
addCriterion("type like", value, "type");
return (Criteria) this;
}
public Criteria andTypeNotLike(String value) {
addCriterion("type not like", value, "type");
return (Criteria) this;
}
public Criteria andTypeIn(List<String> values) {
addCriterion("type in", values, "type");
return (Criteria) this;
}
public Criteria andTypeNotIn(List<String> values) {
addCriterion("type not in", values, "type");
return (Criteria) this;
}
public Criteria andTypeBetween(String value1, String value2) {
addCriterion("type between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andTypeNotBetween(String value1, String value2) {
addCriterion("type not between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andIsDictInfoIsNull() {
addCriterion("is_dict_Info is null");
return (Criteria) this;
}
public Criteria andIsDictInfoIsNotNull() {
addCriterion("is_dict_Info is not null");
return (Criteria) this;
}
public Criteria andIsDictInfoEqualTo(Boolean value) {
addCriterion("is_dict_Info =", value, "isDictInfo");
return (Criteria) this;
}
public Criteria andIsDictInfoNotEqualTo(Boolean value) {
addCriterion("is_dict_Info <>", value, "isDictInfo");
return (Criteria) this;
}
public Criteria andIsDictInfoGreaterThan(Boolean value) {
addCriterion("is_dict_Info >", value, "isDictInfo");
return (Criteria) this;
}
public Criteria andIsDictInfoGreaterThanOrEqualTo(Boolean value) {
addCriterion("is_dict_Info >=", value, "isDictInfo");
return (Criteria) this;
}
public Criteria andIsDictInfoLessThan(Boolean value) {
addCriterion("is_dict_Info <", value, "isDictInfo");
return (Criteria) this;
}
public Criteria andIsDictInfoLessThanOrEqualTo(Boolean value) {
addCriterion("is_dict_Info <=", value, "isDictInfo");
return (Criteria) this;
}
public Criteria andIsDictInfoIn(List<Boolean> values) {
addCriterion("is_dict_Info in", values, "isDictInfo");
return (Criteria) this;
}
public Criteria andIsDictInfoNotIn(List<Boolean> values) {
addCriterion("is_dict_Info not in", values, "isDictInfo");
return (Criteria) this;
}
public Criteria andIsDictInfoBetween(Boolean value1, Boolean value2) {
addCriterion("is_dict_Info between", value1, value2, "isDictInfo");
return (Criteria) this;
}
public Criteria andIsDictInfoNotBetween(Boolean value1, Boolean value2) {
addCriterion("is_dict_Info not between", value1, value2, "isDictInfo");
return (Criteria) this;
}
public Criteria andCreatedAtIsNull() {
addCriterion("created_at is null");
return (Criteria) this;
}
public Criteria andCreatedAtIsNotNull() {
addCriterion("created_at is not null");
return (Criteria) this;
}
public Criteria andCreatedAtEqualTo(Date value) {
addCriterion("created_at =", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotEqualTo(Date value) {
addCriterion("created_at <>", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThan(Date value) {
addCriterion("created_at >", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("created_at >=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThan(Date value) {
addCriterion("created_at <", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThanOrEqualTo(Date value) {
addCriterion("created_at <=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtIn(List<Date> values) {
addCriterion("created_at in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotIn(List<Date> values) {
addCriterion("created_at not in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtBetween(Date value1, Date value2) {
addCriterion("created_at between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotBetween(Date value1, Date value2) {
addCriterion("created_at not between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNull() {
addCriterion("updated_at is null");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNotNull() {
addCriterion("updated_at is not null");
return (Criteria) this;
}
public Criteria andUpdatedAtEqualTo(Date value) {
addCriterion("updated_at =", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotEqualTo(Date value) {
addCriterion("updated_at <>", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThan(Date value) {
addCriterion("updated_at >", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("updated_at >=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThan(Date value) {
addCriterion("updated_at <", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) {
addCriterion("updated_at <=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIn(List<Date> values) {
addCriterion("updated_at in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotIn(List<Date> values) {
addCriterion("updated_at not in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtBetween(Date value1, Date value2) {
addCriterion("updated_at between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) {
addCriterion("updated_at not between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andCreatedByIsNull() {
addCriterion("created_by is null");
return (Criteria) this;
}
public Criteria andCreatedByIsNotNull() {
addCriterion("created_by is not null");
return (Criteria) this;
}
public Criteria andCreatedByEqualTo(String value) {
addCriterion("created_by =", value, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByNotEqualTo(String value) {
addCriterion("created_by <>", value, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByGreaterThan(String value) {
addCriterion("created_by >", value, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByGreaterThanOrEqualTo(String value) {
addCriterion("created_by >=", value, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByLessThan(String value) {
addCriterion("created_by <", value, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByLessThanOrEqualTo(String value) {
addCriterion("created_by <=", value, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByLike(String value) {
addCriterion("created_by like", value, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByNotLike(String value) {
addCriterion("created_by not like", value, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByIn(List<String> values) {
addCriterion("created_by in", values, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByNotIn(List<String> values) {
addCriterion("created_by not in", values, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByBetween(String value1, String value2) {
addCriterion("created_by between", value1, value2, "createdBy");
return (Criteria) this;
}
public Criteria andCreatedByNotBetween(String value1, String value2) {
addCriterion("created_by not between", value1, value2, "createdBy");
return (Criteria) this;
}
public Criteria andUpdatedByIsNull() {
addCriterion("updated_by is null");
return (Criteria) this;
}
public Criteria andUpdatedByIsNotNull() {
addCriterion("updated_by is not null");
return (Criteria) this;
}
public Criteria andUpdatedByEqualTo(String value) {
addCriterion("updated_by =", value, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByNotEqualTo(String value) {
addCriterion("updated_by <>", value, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByGreaterThan(String value) {
addCriterion("updated_by >", value, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByGreaterThanOrEqualTo(String value) {
addCriterion("updated_by >=", value, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByLessThan(String value) {
addCriterion("updated_by <", value, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByLessThanOrEqualTo(String value) {
addCriterion("updated_by <=", value, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByLike(String value) {
addCriterion("updated_by like", value, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByNotLike(String value) {
addCriterion("updated_by not like", value, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByIn(List<String> values) {
addCriterion("updated_by in", values, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByNotIn(List<String> values) {
addCriterion("updated_by not in", values, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByBetween(String value1, String value2) {
addCriterion("updated_by between", value1, value2, "updatedBy");
return (Criteria) this;
}
public Criteria andUpdatedByNotBetween(String value1, String value2) {
addCriterion("updated_by not between", value1, value2, "updatedBy");
return (Criteria) this;
}
public Criteria andIsDeletedIsNull() {
addCriterion("is_deleted is null");
return (Criteria) this;
}
public Criteria andIsDeletedIsNotNull() {
addCriterion("is_deleted is not null");
return (Criteria) this;
}
public Criteria andIsDeletedEqualTo(Boolean value) {
addCriterion("is_deleted =", value, "isDeleted");
return (Criteria) this;
}
public Criteria andIsDeletedNotEqualTo(Boolean value) {
addCriterion("is_deleted <>", value, "isDeleted");
return (Criteria) this;
}
public Criteria andIsDeletedGreaterThan(Boolean value) {
addCriterion("is_deleted >", value, "isDeleted");
return (Criteria) this;
}
public Criteria andIsDeletedGreaterThanOrEqualTo(Boolean value) {
addCriterion("is_deleted >=", value, "isDeleted");
return (Criteria) this;
}
public Criteria andIsDeletedLessThan(Boolean value) {
addCriterion("is_deleted <", value, "isDeleted");
return (Criteria) this;
}
public Criteria andIsDeletedLessThanOrEqualTo(Boolean value) {
addCriterion("is_deleted <=", value, "isDeleted");
return (Criteria) this;
}
public Criteria andIsDeletedIn(List<Boolean> values) {
addCriterion("is_deleted in", values, "isDeleted");
return (Criteria) this;
}
public Criteria andIsDeletedNotIn(List<Boolean> values) {
addCriterion("is_deleted not in", values, "isDeleted");
return (Criteria) this;
}
public Criteria andIsDeletedBetween(Boolean value1, Boolean value2) {
addCriterion("is_deleted between", value1, value2, "isDeleted");
return (Criteria) this;
}
public Criteria andIsDeletedNotBetween(Boolean value1, Boolean value2) {
addCriterion("is_deleted not between", value1, value2, "isDeleted");
return (Criteria) this;
}
}
/**
* s2_dictionary
*/
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
/**
* s2_dictionary null
*/
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
}
}

View File

@@ -1,207 +0,0 @@
package com.tencent.supersonic.semantic.model.domain.dataobject;
public class DictionaryTaskDO {
/**
*
*/
private Long id;
/**
* 主体域ID
*/
private Long domainId;
/**
* 任务最终运行状态
*/
private Integer status;
/**
* 任务耗时
*/
private Long elapsedMs;
/**
* 查询涉及的维度
*/
private String dimensions;
/**
* 查询涉及的指标
*/
private String metrics;
/**
* 查询的过滤信息
*/
private String filters;
/**
* 查询的排序信息
*/
private String orderBy;
/**
* 查询涉及的日期信息
*/
private String dateInfo;
/**
* @return id
*/
public Long getId() {
return id;
}
/**
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* 主体域ID
*
* @return domain_id 主体域ID
*/
public Long getDomainId() {
return domainId;
}
/**
* 主体域ID
*
* @param domainId 主体域ID
*/
public void setDomainId(Long domainId) {
this.domainId = domainId;
}
/**
* 任务最终运行状态
*
* @return status 任务最终运行状态
*/
public Integer getStatus() {
return status;
}
/**
* 任务最终运行状态
*
* @param status 任务最终运行状态
*/
public void setStatus(Integer status) {
this.status = status;
}
/**
* 任务耗时
*
* @return elapsed_ms 任务耗时
*/
public Long getElapsedMs() {
return elapsedMs;
}
/**
* 任务耗时
*
* @param elapsedMs 任务耗时
*/
public void setElapsedMs(Long elapsedMs) {
this.elapsedMs = elapsedMs;
}
/**
* 查询涉及的维度
*
* @return dimensions 查询涉及的维度
*/
public String getDimensions() {
return dimensions;
}
/**
* 查询涉及的维度
*
* @param dimensions 查询涉及的维度
*/
public void setDimensions(String dimensions) {
this.dimensions = dimensions == null ? null : dimensions.trim();
}
/**
* 查询涉及的指标
*
* @return metrics 查询涉及的指标
*/
public String getMetrics() {
return metrics;
}
/**
* 查询涉及的指标
*
* @param metrics 查询涉及的指标
*/
public void setMetrics(String metrics) {
this.metrics = metrics == null ? null : metrics.trim();
}
/**
* 查询的过滤信息
*
* @return filters 查询的过滤信息
*/
public String getFilters() {
return filters;
}
/**
* 查询的过滤信息
*
* @param filters 查询的过滤信息
*/
public void setFilters(String filters) {
this.filters = filters == null ? null : filters.trim();
}
/**
* 查询的排序信息
*
* @return order_by 查询的排序信息
*/
public String getOrderBy() {
return orderBy;
}
/**
* 查询的排序信息
*
* @param orderBy 查询的排序信息
*/
public void setOrderBy(String orderBy) {
this.orderBy = orderBy == null ? null : orderBy.trim();
}
/**
* 查询涉及的日期信息
*
* @return date_info 查询涉及的日期信息
*/
public String getDateInfo() {
return dateInfo;
}
/**
* 查询涉及的日期信息
*
* @param dateInfo 查询涉及的日期信息
*/
public void setDateInfo(String dateInfo) {
this.dateInfo = dateInfo == null ? null : dateInfo.trim();
}
}

View File

@@ -1,532 +0,0 @@
package com.tencent.supersonic.semantic.model.domain.dataobject;
import java.util.ArrayList;
import java.util.List;
public class DictionaryTaskDOExample {
/**
* s2_dictionary_task
*/
protected String orderByClause;
/**
* s2_dictionary_task
*/
protected boolean distinct;
/**
* s2_dictionary_task
*/
protected List<Criteria> oredCriteria;
/**
* s2_dictionary_task
*/
protected Integer limitStart;
/**
* s2_dictionary_task
*/
protected Integer limitEnd;
/**
* @mbg.generated
*/
public DictionaryTaskDOExample() {
oredCriteria = new ArrayList<Criteria>();
}
/**
* @mbg.generated
*/
public String getOrderByClause() {
return orderByClause;
}
/**
* @mbg.generated
*/
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
/**
* @mbg.generated
*/
public boolean isDistinct() {
return distinct;
}
/**
* @mbg.generated
*/
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
/**
* @mbg.generated
*/
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
/**
* @mbg.generated
*/
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
/**
* @mbg.generated
*/
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
/**
* @mbg.generated
*/
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
/**
* @mbg.generated
*/
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
/**
* @mbg.generated
*/
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
/**
* @mbg.generated
*/
public Integer getLimitStart() {
return limitStart;
}
/**
* @mbg.generated
*/
public void setLimitStart(Integer limitStart) {
this.limitStart = limitStart;
}
/**
* @mbg.generated
*/
public Integer getLimitEnd() {
return limitEnd;
}
/**
* @mbg.generated
*/
public void setLimitEnd(Integer limitEnd) {
this.limitEnd = limitEnd;
}
/**
* s2_dictionary_task null
*/
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andDomainIdIsNull() {
addCriterion("domain_id is null");
return (Criteria) this;
}
public Criteria andDomainIdIsNotNull() {
addCriterion("domain_id is not null");
return (Criteria) this;
}
public Criteria andDomainIdEqualTo(Long value) {
addCriterion("domain_id =", value, "domainId");
return (Criteria) this;
}
public Criteria andDomainIdNotEqualTo(Long value) {
addCriterion("domain_id <>", value, "domainId");
return (Criteria) this;
}
public Criteria andDomainIdGreaterThan(Long value) {
addCriterion("domain_id >", value, "domainId");
return (Criteria) this;
}
public Criteria andDomainIdGreaterThanOrEqualTo(Long value) {
addCriterion("domain_id >=", value, "domainId");
return (Criteria) this;
}
public Criteria andDomainIdLessThan(Long value) {
addCriterion("domain_id <", value, "domainId");
return (Criteria) this;
}
public Criteria andDomainIdLessThanOrEqualTo(Long value) {
addCriterion("domain_id <=", value, "domainId");
return (Criteria) this;
}
public Criteria andDomainIdIn(List<Long> values) {
addCriterion("domain_id in", values, "domainId");
return (Criteria) this;
}
public Criteria andDomainIdNotIn(List<Long> values) {
addCriterion("domain_id not in", values, "domainId");
return (Criteria) this;
}
public Criteria andDomainIdBetween(Long value1, Long value2) {
addCriterion("domain_id between", value1, value2, "domainId");
return (Criteria) this;
}
public Criteria andDomainIdNotBetween(Long value1, Long value2) {
addCriterion("domain_id not between", value1, value2, "domainId");
return (Criteria) this;
}
public Criteria andStatusIsNull() {
addCriterion("status is null");
return (Criteria) this;
}
public Criteria andStatusIsNotNull() {
addCriterion("status is not null");
return (Criteria) this;
}
public Criteria andStatusEqualTo(Integer value) {
addCriterion("status =", value, "status");
return (Criteria) this;
}
public Criteria andStatusNotEqualTo(Integer value) {
addCriterion("status <>", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThan(Integer value) {
addCriterion("status >", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
addCriterion("status >=", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThan(Integer value) {
addCriterion("status <", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThanOrEqualTo(Integer value) {
addCriterion("status <=", value, "status");
return (Criteria) this;
}
public Criteria andStatusIn(List<Integer> values) {
addCriterion("status in", values, "status");
return (Criteria) this;
}
public Criteria andStatusNotIn(List<Integer> values) {
addCriterion("status not in", values, "status");
return (Criteria) this;
}
public Criteria andStatusBetween(Integer value1, Integer value2) {
addCriterion("status between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andStatusNotBetween(Integer value1, Integer value2) {
addCriterion("status not between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andElapsedMsIsNull() {
addCriterion("elapsed_ms is null");
return (Criteria) this;
}
public Criteria andElapsedMsIsNotNull() {
addCriterion("elapsed_ms is not null");
return (Criteria) this;
}
public Criteria andElapsedMsEqualTo(Long value) {
addCriterion("elapsed_ms =", value, "elapsedMs");
return (Criteria) this;
}
public Criteria andElapsedMsNotEqualTo(Long value) {
addCriterion("elapsed_ms <>", value, "elapsedMs");
return (Criteria) this;
}
public Criteria andElapsedMsGreaterThan(Long value) {
addCriterion("elapsed_ms >", value, "elapsedMs");
return (Criteria) this;
}
public Criteria andElapsedMsGreaterThanOrEqualTo(Long value) {
addCriterion("elapsed_ms >=", value, "elapsedMs");
return (Criteria) this;
}
public Criteria andElapsedMsLessThan(Long value) {
addCriterion("elapsed_ms <", value, "elapsedMs");
return (Criteria) this;
}
public Criteria andElapsedMsLessThanOrEqualTo(Long value) {
addCriterion("elapsed_ms <=", value, "elapsedMs");
return (Criteria) this;
}
public Criteria andElapsedMsIn(List<Long> values) {
addCriterion("elapsed_ms in", values, "elapsedMs");
return (Criteria) this;
}
public Criteria andElapsedMsNotIn(List<Long> values) {
addCriterion("elapsed_ms not in", values, "elapsedMs");
return (Criteria) this;
}
public Criteria andElapsedMsBetween(Long value1, Long value2) {
addCriterion("elapsed_ms between", value1, value2, "elapsedMs");
return (Criteria) this;
}
public Criteria andElapsedMsNotBetween(Long value1, Long value2) {
addCriterion("elapsed_ms not between", value1, value2, "elapsedMs");
return (Criteria) this;
}
}
/**
* s2_dictionary_task
*/
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
/**
* s2_dictionary_task null
*/
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
}
}

View File

@@ -12,7 +12,7 @@ public class DimensionDO {
/**
* 主题域id
*/
private Long domainId;
private Long modelId;
/**
* 所属数据源id
@@ -84,6 +84,11 @@ public class DimensionDO {
*/
private String defaultValues;
/**
*
*/
private String dimValueMaps;
/**
* 类型参数
*/
@@ -94,11 +99,6 @@ public class DimensionDO {
*/
private String expr;
/**
* dimension value map info
*/
private String dimValueMaps;
/**
* 维度ID
*
@@ -120,19 +120,19 @@ public class DimensionDO {
/**
* 主题域id
*
* @return domain_id 主题域id
* @return model_id 主题域id
*/
public Long getDomainId() {
return domainId;
public Long getModelId() {
return modelId;
}
/**
* 主题域id
*
* @param domainId 主题域id
* @param modelId 主题域id
*/
public void setDomainId(Long domainId) {
this.domainId = domainId;
public void setModelId(Long modelId) {
this.modelId = modelId;
}
/**
@@ -383,6 +383,20 @@ public class DimensionDO {
this.defaultValues = defaultValues == null ? null : defaultValues.trim();
}
/**
* @return dim_value_maps
*/
public String getDimValueMaps() {
return dimValueMaps;
}
/**
* @param dimValueMaps
*/
public void setDimValueMaps(String dimValueMaps) {
this.dimValueMaps = dimValueMaps == null ? null : dimValueMaps.trim();
}
/**
* 类型参数
*
@@ -418,12 +432,4 @@ public class DimensionDO {
public void setExpr(String expr) {
this.expr = expr == null ? null : expr.trim();
}
public String getDimValueMaps() {
return dimValueMaps;
}
public void setDimValueMaps(String dimValueMaps) {
this.dimValueMaps = dimValueMaps;
}
}

View File

@@ -38,13 +38,6 @@ public class DimensionDOExample {
oredCriteria = new ArrayList<Criteria>();
}
/**
* @mbg.generated
*/
public String getOrderByClause() {
return orderByClause;
}
/**
* @mbg.generated
*/
@@ -55,8 +48,8 @@ public class DimensionDOExample {
/**
* @mbg.generated
*/
public boolean isDistinct() {
return distinct;
public String getOrderByClause() {
return orderByClause;
}
/**
@@ -66,6 +59,13 @@ public class DimensionDOExample {
this.distinct = distinct;
}
/**
* @mbg.generated
*/
public boolean isDistinct() {
return distinct;
}
/**
* @mbg.generated
*/
@@ -117,13 +117,6 @@ public class DimensionDOExample {
distinct = false;
}
/**
* @mbg.generated
*/
public Integer getLimitStart() {
return limitStart;
}
/**
* @mbg.generated
*/
@@ -134,8 +127,8 @@ public class DimensionDOExample {
/**
* @mbg.generated
*/
public Integer getLimitEnd() {
return limitEnd;
public Integer getLimitStart() {
return limitStart;
}
/**
@@ -145,6 +138,13 @@ public class DimensionDOExample {
this.limitEnd = limitEnd;
}
/**
* @mbg.generated
*/
public Integer getLimitEnd() {
return limitEnd;
}
/**
* s2_dimension null
*/
@@ -250,63 +250,63 @@ public class DimensionDOExample {
return (Criteria) this;
}
public Criteria andDomainIdIsNull() {
addCriterion("domain_id is null");
public Criteria andModelIdIsNull() {
addCriterion("model_id is null");
return (Criteria) this;
}
public Criteria andDomainIdIsNotNull() {
addCriterion("domain_id is not null");
public Criteria andModelIdIsNotNull() {
addCriterion("model_id is not null");
return (Criteria) this;
}
public Criteria andDomainIdEqualTo(Long value) {
addCriterion("domain_id =", value, "domainId");
public Criteria andModelIdEqualTo(Long value) {
addCriterion("model_id =", value, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdNotEqualTo(Long value) {
addCriterion("domain_id <>", value, "domainId");
public Criteria andModelIdNotEqualTo(Long value) {
addCriterion("model_id <>", value, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdGreaterThan(Long value) {
addCriterion("domain_id >", value, "domainId");
public Criteria andModelIdGreaterThan(Long value) {
addCriterion("model_id >", value, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdGreaterThanOrEqualTo(Long value) {
addCriterion("domain_id >=", value, "domainId");
public Criteria andModelIdGreaterThanOrEqualTo(Long value) {
addCriterion("model_id >=", value, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdLessThan(Long value) {
addCriterion("domain_id <", value, "domainId");
public Criteria andModelIdLessThan(Long value) {
addCriterion("model_id <", value, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdLessThanOrEqualTo(Long value) {
addCriterion("domain_id <=", value, "domainId");
public Criteria andModelIdLessThanOrEqualTo(Long value) {
addCriterion("model_id <=", value, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdIn(List<Long> values) {
addCriterion("domain_id in", values, "domainId");
public Criteria andModelIdIn(List<Long> values) {
addCriterion("model_id in", values, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdNotIn(List<Long> values) {
addCriterion("domain_id not in", values, "domainId");
public Criteria andModelIdNotIn(List<Long> values) {
addCriterion("model_id not in", values, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdBetween(Long value1, Long value2) {
addCriterion("domain_id between", value1, value2, "domainId");
public Criteria andModelIdBetween(Long value1, Long value2) {
addCriterion("model_id between", value1, value2, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdNotBetween(Long value1, Long value2) {
addCriterion("domain_id not between", value1, value2, "domainId");
public Criteria andModelIdNotBetween(Long value1, Long value2) {
addCriterion("model_id not between", value1, value2, "modelId");
return (Criteria) this;
}
@@ -1239,6 +1239,76 @@ public class DimensionDOExample {
addCriterion("default_values not between", value1, value2, "defaultValues");
return (Criteria) this;
}
public Criteria andDimValueMapsIsNull() {
addCriterion("dim_value_maps is null");
return (Criteria) this;
}
public Criteria andDimValueMapsIsNotNull() {
addCriterion("dim_value_maps is not null");
return (Criteria) this;
}
public Criteria andDimValueMapsEqualTo(String value) {
addCriterion("dim_value_maps =", value, "dimValueMaps");
return (Criteria) this;
}
public Criteria andDimValueMapsNotEqualTo(String value) {
addCriterion("dim_value_maps <>", value, "dimValueMaps");
return (Criteria) this;
}
public Criteria andDimValueMapsGreaterThan(String value) {
addCriterion("dim_value_maps >", value, "dimValueMaps");
return (Criteria) this;
}
public Criteria andDimValueMapsGreaterThanOrEqualTo(String value) {
addCriterion("dim_value_maps >=", value, "dimValueMaps");
return (Criteria) this;
}
public Criteria andDimValueMapsLessThan(String value) {
addCriterion("dim_value_maps <", value, "dimValueMaps");
return (Criteria) this;
}
public Criteria andDimValueMapsLessThanOrEqualTo(String value) {
addCriterion("dim_value_maps <=", value, "dimValueMaps");
return (Criteria) this;
}
public Criteria andDimValueMapsLike(String value) {
addCriterion("dim_value_maps like", value, "dimValueMaps");
return (Criteria) this;
}
public Criteria andDimValueMapsNotLike(String value) {
addCriterion("dim_value_maps not like", value, "dimValueMaps");
return (Criteria) this;
}
public Criteria andDimValueMapsIn(List<String> values) {
addCriterion("dim_value_maps in", values, "dimValueMaps");
return (Criteria) this;
}
public Criteria andDimValueMapsNotIn(List<String> values) {
addCriterion("dim_value_maps not in", values, "dimValueMaps");
return (Criteria) this;
}
public Criteria andDimValueMapsBetween(String value1, String value2) {
addCriterion("dim_value_maps between", value1, value2, "dimValueMaps");
return (Criteria) this;
}
public Criteria andDimValueMapsNotBetween(String value1, String value2) {
addCriterion("dim_value_maps not between", value1, value2, "dimValueMaps");
return (Criteria) this;
}
}
/**
@@ -1272,6 +1342,38 @@ public class DimensionDOExample {
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
@@ -1307,37 +1409,5 @@ public class DimensionDOExample {
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
}
}

View File

@@ -1,13 +0,0 @@
package com.tencent.supersonic.semantic.model.domain.dataobject;
import lombok.Data;
@Data
public class DimensionDOWithDictInfo extends DimensionDO {
private boolean isDictInfo;
}

View File

@@ -74,12 +74,6 @@ public class DomainDO {
*/
private String viewOrg;
/**
* 主题域实体信息
*/
private String entity;
/**
* 自增ID
*
@@ -331,12 +325,4 @@ public class DomainDO {
public void setViewOrg(String viewOrg) {
this.viewOrg = viewOrg == null ? null : viewOrg.trim();
}
public String getEntity() {
return entity;
}
public void setEntity(String entity) {
this.entity = entity;
}
}

View File

@@ -38,13 +38,6 @@ public class DomainDOExample {
oredCriteria = new ArrayList<Criteria>();
}
/**
* @mbg.generated
*/
public String getOrderByClause() {
return orderByClause;
}
/**
* @mbg.generated
*/
@@ -55,8 +48,8 @@ public class DomainDOExample {
/**
* @mbg.generated
*/
public boolean isDistinct() {
return distinct;
public String getOrderByClause() {
return orderByClause;
}
/**
@@ -66,6 +59,13 @@ public class DomainDOExample {
this.distinct = distinct;
}
/**
* @mbg.generated
*/
public boolean isDistinct() {
return distinct;
}
/**
* @mbg.generated
*/
@@ -117,13 +117,6 @@ public class DomainDOExample {
distinct = false;
}
/**
* @mbg.generated
*/
public Integer getLimitStart() {
return limitStart;
}
/**
* @mbg.generated
*/
@@ -134,8 +127,8 @@ public class DomainDOExample {
/**
* @mbg.generated
*/
public Integer getLimitEnd() {
return limitEnd;
public Integer getLimitStart() {
return limitStart;
}
/**
@@ -145,6 +138,13 @@ public class DomainDOExample {
this.limitEnd = limitEnd;
}
/**
* @mbg.generated
*/
public Integer getLimitEnd() {
return limitEnd;
}
/**
* s2_domain null
*/
@@ -1142,6 +1142,38 @@ public class DomainDOExample {
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
@@ -1177,37 +1209,5 @@ public class DomainDOExample {
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
}
}

View File

@@ -1,255 +0,0 @@
package com.tencent.supersonic.semantic.model.domain.dataobject;
import java.util.Date;
public class DomainExtendDO {
/**
*
*/
private Long id;
/**
* 主题域id
*/
private Long domainId;
/**
* 默认指标
*/
private String defaultMetrics;
/**
* 创建时间
*/
private Date createdAt;
/**
* 更新时间
*/
private Date updatedAt;
/**
* 创建人
*/
private String createdBy;
/**
* 更新人
*/
private String updatedBy;
/**
* 主题域扩展信息状态, 0-删除1-生效
*/
private Integer status;
/**
* 不可见指标信息
*/
private String metricsInvisible;
/**
* 不可见维度信息
*/
private String dimensionsInvisible;
/**
* 实体信息
*/
private String entityInfo;
/**
* @return id
*/
public Long getId() {
return id;
}
/**
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* 主题域id
*
* @return domain_id 主题域id
*/
public Long getDomainId() {
return domainId;
}
/**
* 主题域id
*
* @param domainId 主题域id
*/
public void setDomainId(Long domainId) {
this.domainId = domainId;
}
/**
* 默认指标
*
* @return default_metrics 默认指标
*/
public String getDefaultMetrics() {
return defaultMetrics;
}
/**
* 默认指标
*
* @param defaultMetrics 默认指标
*/
public void setDefaultMetrics(String defaultMetrics) {
this.defaultMetrics = defaultMetrics == null ? null : defaultMetrics.trim();
}
/**
* 创建时间
*
* @return created_at 创建时间
*/
public Date getCreatedAt() {
return createdAt;
}
/**
* 创建时间
*
* @param createdAt 创建时间
*/
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
/**
* 更新时间
*
* @return updated_at 更新时间
*/
public Date getUpdatedAt() {
return updatedAt;
}
/**
* 更新时间
*
* @param updatedAt 更新时间
*/
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
/**
* 创建人
*
* @return created_by 创建人
*/
public String getCreatedBy() {
return createdBy;
}
/**
* 创建人
*
* @param createdBy 创建人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy == null ? null : createdBy.trim();
}
/**
* 更新人
*
* @return updated_by 更新人
*/
public String getUpdatedBy() {
return updatedBy;
}
/**
* 更新人
*
* @param updatedBy 更新人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy == null ? null : updatedBy.trim();
}
/**
* 主题域扩展信息状态, 0-删除1-生效
*
* @return status 主题域扩展信息状态, 0-删除1-生效
*/
public Integer getStatus() {
return status;
}
/**
* 主题域扩展信息状态, 0-删除1-生效
*
* @param status 主题域扩展信息状态, 0-删除1-生效
*/
public void setStatus(Integer status) {
this.status = status;
}
/**
* 不可见指标信息
*
* @return metrics_invisible 不可见指标信息
*/
public String getMetricsInvisible() {
return metricsInvisible;
}
/**
* 不可见指标信息
*
* @param metricsInvisible 不可见指标信息
*/
public void setMetricsInvisible(String metricsInvisible) {
this.metricsInvisible = metricsInvisible == null ? null : metricsInvisible.trim();
}
/**
* 不可见维度信息
*
* @return dimensions_invisible 不可见维度信息
*/
public String getDimensionsInvisible() {
return dimensionsInvisible;
}
/**
* 不可见维度信息
*
* @param dimensionsInvisible 不可见维度信息
*/
public void setDimensionsInvisible(String dimensionsInvisible) {
this.dimensionsInvisible = dimensionsInvisible == null ? null : dimensionsInvisible.trim();
}
/**
* 实体信息
*
* @return entity_info 实体信息
*/
public String getEntityInfo() {
return entityInfo;
}
/**
* 实体信息
*
* @param entityInfo 实体信息
*/
public void setEntityInfo(String entityInfo) {
this.entityInfo = entityInfo == null ? null : entityInfo.trim();
}
}

View File

@@ -12,7 +12,7 @@ public class MetricDO {
/**
* 主体域ID
*/
private Long domainId;
private Long modelId;
/**
* 指标名称
@@ -101,19 +101,19 @@ public class MetricDO {
/**
* 主体域ID
*
* @return domain_id 主体域ID
* @return model_id 主体域ID
*/
public Long getDomainId() {
return domainId;
public Long getModelId() {
return modelId;
}
/**
* 主体域ID
*
* @param domainId 主体域ID
* @param modelId 主体域ID
*/
public void setDomainId(Long domainId) {
this.domainId = domainId;
public void setModelId(Long modelId) {
this.modelId = modelId;
}
/**

View File

@@ -38,13 +38,6 @@ public class MetricDOExample {
oredCriteria = new ArrayList<Criteria>();
}
/**
* @mbg.generated
*/
public String getOrderByClause() {
return orderByClause;
}
/**
* @mbg.generated
*/
@@ -55,8 +48,8 @@ public class MetricDOExample {
/**
* @mbg.generated
*/
public boolean isDistinct() {
return distinct;
public String getOrderByClause() {
return orderByClause;
}
/**
@@ -66,6 +59,13 @@ public class MetricDOExample {
this.distinct = distinct;
}
/**
* @mbg.generated
*/
public boolean isDistinct() {
return distinct;
}
/**
* @mbg.generated
*/
@@ -117,13 +117,6 @@ public class MetricDOExample {
distinct = false;
}
/**
* @mbg.generated
*/
public Integer getLimitStart() {
return limitStart;
}
/**
* @mbg.generated
*/
@@ -134,8 +127,8 @@ public class MetricDOExample {
/**
* @mbg.generated
*/
public Integer getLimitEnd() {
return limitEnd;
public Integer getLimitStart() {
return limitStart;
}
/**
@@ -145,6 +138,13 @@ public class MetricDOExample {
this.limitEnd = limitEnd;
}
/**
* @mbg.generated
*/
public Integer getLimitEnd() {
return limitEnd;
}
/**
* s2_metric null
*/
@@ -250,63 +250,63 @@ public class MetricDOExample {
return (Criteria) this;
}
public Criteria andDomainIdIsNull() {
addCriterion("domain_id is null");
public Criteria andModelIdIsNull() {
addCriterion("model_id is null");
return (Criteria) this;
}
public Criteria andDomainIdIsNotNull() {
addCriterion("domain_id is not null");
public Criteria andModelIdIsNotNull() {
addCriterion("model_id is not null");
return (Criteria) this;
}
public Criteria andDomainIdEqualTo(Long value) {
addCriterion("domain_id =", value, "domainId");
public Criteria andModelIdEqualTo(Long value) {
addCriterion("model_id =", value, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdNotEqualTo(Long value) {
addCriterion("domain_id <>", value, "domainId");
public Criteria andModelIdNotEqualTo(Long value) {
addCriterion("model_id <>", value, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdGreaterThan(Long value) {
addCriterion("domain_id >", value, "domainId");
public Criteria andModelIdGreaterThan(Long value) {
addCriterion("model_id >", value, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdGreaterThanOrEqualTo(Long value) {
addCriterion("domain_id >=", value, "domainId");
public Criteria andModelIdGreaterThanOrEqualTo(Long value) {
addCriterion("model_id >=", value, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdLessThan(Long value) {
addCriterion("domain_id <", value, "domainId");
public Criteria andModelIdLessThan(Long value) {
addCriterion("model_id <", value, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdLessThanOrEqualTo(Long value) {
addCriterion("domain_id <=", value, "domainId");
public Criteria andModelIdLessThanOrEqualTo(Long value) {
addCriterion("model_id <=", value, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdIn(List<Long> values) {
addCriterion("domain_id in", values, "domainId");
public Criteria andModelIdIn(List<Long> values) {
addCriterion("model_id in", values, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdNotIn(List<Long> values) {
addCriterion("domain_id not in", values, "domainId");
public Criteria andModelIdNotIn(List<Long> values) {
addCriterion("model_id not in", values, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdBetween(Long value1, Long value2) {
addCriterion("domain_id between", value1, value2, "domainId");
public Criteria andModelIdBetween(Long value1, Long value2) {
addCriterion("model_id between", value1, value2, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdNotBetween(Long value1, Long value2) {
addCriterion("domain_id not between", value1, value2, "domainId");
public Criteria andModelIdNotBetween(Long value1, Long value2) {
addCriterion("model_id not between", value1, value2, "modelId");
return (Criteria) this;
}
@@ -1212,6 +1212,38 @@ public class MetricDOExample {
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
@@ -1247,37 +1279,5 @@ public class MetricDOExample {
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
}
}

View File

@@ -0,0 +1,272 @@
package com.tencent.supersonic.semantic.model.domain.dataobject;
import java.util.Date;
public class ModelDO {
/**
*
*/
private Long id;
/**
*
*/
private String name;
/**
*
*/
private String bizName;
/**
*
*/
private Long domainId;
/**
*
*/
private String viewer;
/**
*
*/
private String viewOrg;
/**
*
*/
private String admin;
/**
*
*/
private String adminOrg;
/**
*
*/
private Integer isOpen;
/**
*
*/
private String createdBy;
/**
*
*/
private Date createdAt;
/**
*
*/
private String updatedBy;
/**
*
*/
private Date updatedAt;
/**
*
*/
private String entity;
/**
* @return id
*/
public Long getId() {
return id;
}
/**
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* @return name
*/
public String getName() {
return name;
}
/**
* @param name
*/
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
/**
* @return biz_name
*/
public String getBizName() {
return bizName;
}
/**
* @param bizName
*/
public void setBizName(String bizName) {
this.bizName = bizName == null ? null : bizName.trim();
}
/**
* @return domain_id
*/
public Long getDomainId() {
return domainId;
}
/**
* @param domainId
*/
public void setDomainId(Long domainId) {
this.domainId = domainId;
}
/**
* @return viewer
*/
public String getViewer() {
return viewer;
}
/**
* @param viewer
*/
public void setViewer(String viewer) {
this.viewer = viewer == null ? null : viewer.trim();
}
/**
* @return view_org
*/
public String getViewOrg() {
return viewOrg;
}
/**
* @param viewOrg
*/
public void setViewOrg(String viewOrg) {
this.viewOrg = viewOrg == null ? null : viewOrg.trim();
}
/**
* @return admin
*/
public String getAdmin() {
return admin;
}
/**
* @param admin
*/
public void setAdmin(String admin) {
this.admin = admin == null ? null : admin.trim();
}
/**
* @return admin_org
*/
public String getAdminOrg() {
return adminOrg;
}
/**
* @param adminOrg
*/
public void setAdminOrg(String adminOrg) {
this.adminOrg = adminOrg == null ? null : adminOrg.trim();
}
/**
* @return is_open
*/
public Integer getIsOpen() {
return isOpen;
}
/**
* @param isOpen
*/
public void setIsOpen(Integer isOpen) {
this.isOpen = isOpen;
}
/**
* @return created_by
*/
public String getCreatedBy() {
return createdBy;
}
/**
* @param createdBy
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy == null ? null : createdBy.trim();
}
/**
* @return created_at
*/
public Date getCreatedAt() {
return createdAt;
}
/**
* @param createdAt
*/
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
/**
* @return updated_by
*/
public String getUpdatedBy() {
return updatedBy;
}
/**
* @param updatedBy
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy == null ? null : updatedBy.trim();
}
/**
* @return updated_at
*/
public Date getUpdatedAt() {
return updatedAt;
}
/**
* @param updatedAt
*/
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
/**
* @return entity
*/
public String getEntity() {
return entity;
}
/**
* @param entity
*/
public void setEntity(String entity) {
this.entity = entity == null ? null : entity.trim();
}
}

View File

@@ -4,47 +4,40 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class DomainExtendDOExample {
public class ModelDOExample {
/**
* s2_domain_extend
* s2_model
*/
protected String orderByClause;
/**
* s2_domain_extend
* s2_model
*/
protected boolean distinct;
/**
* s2_domain_extend
* s2_model
*/
protected List<Criteria> oredCriteria;
/**
* s2_domain_extend
* s2_model
*/
protected Integer limitStart;
/**
* s2_domain_extend
* s2_model
*/
protected Integer limitEnd;
/**
* @mbg.generated
*/
public DomainExtendDOExample() {
public ModelDOExample() {
oredCriteria = new ArrayList<Criteria>();
}
/**
* @mbg.generated
*/
public String getOrderByClause() {
return orderByClause;
}
/**
* @mbg.generated
*/
@@ -55,8 +48,8 @@ public class DomainExtendDOExample {
/**
* @mbg.generated
*/
public boolean isDistinct() {
return distinct;
public String getOrderByClause() {
return orderByClause;
}
/**
@@ -66,6 +59,13 @@ public class DomainExtendDOExample {
this.distinct = distinct;
}
/**
* @mbg.generated
*/
public boolean isDistinct() {
return distinct;
}
/**
* @mbg.generated
*/
@@ -117,13 +117,6 @@ public class DomainExtendDOExample {
distinct = false;
}
/**
* @mbg.generated
*/
public Integer getLimitStart() {
return limitStart;
}
/**
* @mbg.generated
*/
@@ -134,8 +127,8 @@ public class DomainExtendDOExample {
/**
* @mbg.generated
*/
public Integer getLimitEnd() {
return limitEnd;
public Integer getLimitStart() {
return limitStart;
}
/**
@@ -146,7 +139,14 @@ public class DomainExtendDOExample {
}
/**
* s2_domain_extend null
* @mbg.generated
*/
public Integer getLimitEnd() {
return limitEnd;
}
/**
* s2_model null
*/
protected abstract static class GeneratedCriteria {
@@ -250,6 +250,146 @@ public class DomainExtendDOExample {
return (Criteria) this;
}
public Criteria andNameIsNull() {
addCriterion("name is null");
return (Criteria) this;
}
public Criteria andNameIsNotNull() {
addCriterion("name is not null");
return (Criteria) this;
}
public Criteria andNameEqualTo(String value) {
addCriterion("name =", value, "name");
return (Criteria) this;
}
public Criteria andNameNotEqualTo(String value) {
addCriterion("name <>", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThan(String value) {
addCriterion("name >", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThanOrEqualTo(String value) {
addCriterion("name >=", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThan(String value) {
addCriterion("name <", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThanOrEqualTo(String value) {
addCriterion("name <=", value, "name");
return (Criteria) this;
}
public Criteria andNameLike(String value) {
addCriterion("name like", value, "name");
return (Criteria) this;
}
public Criteria andNameNotLike(String value) {
addCriterion("name not like", value, "name");
return (Criteria) this;
}
public Criteria andNameIn(List<String> values) {
addCriterion("name in", values, "name");
return (Criteria) this;
}
public Criteria andNameNotIn(List<String> values) {
addCriterion("name not in", values, "name");
return (Criteria) this;
}
public Criteria andNameBetween(String value1, String value2) {
addCriterion("name between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andNameNotBetween(String value1, String value2) {
addCriterion("name not between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andBizNameIsNull() {
addCriterion("biz_name is null");
return (Criteria) this;
}
public Criteria andBizNameIsNotNull() {
addCriterion("biz_name is not null");
return (Criteria) this;
}
public Criteria andBizNameEqualTo(String value) {
addCriterion("biz_name =", value, "bizName");
return (Criteria) this;
}
public Criteria andBizNameNotEqualTo(String value) {
addCriterion("biz_name <>", value, "bizName");
return (Criteria) this;
}
public Criteria andBizNameGreaterThan(String value) {
addCriterion("biz_name >", value, "bizName");
return (Criteria) this;
}
public Criteria andBizNameGreaterThanOrEqualTo(String value) {
addCriterion("biz_name >=", value, "bizName");
return (Criteria) this;
}
public Criteria andBizNameLessThan(String value) {
addCriterion("biz_name <", value, "bizName");
return (Criteria) this;
}
public Criteria andBizNameLessThanOrEqualTo(String value) {
addCriterion("biz_name <=", value, "bizName");
return (Criteria) this;
}
public Criteria andBizNameLike(String value) {
addCriterion("biz_name like", value, "bizName");
return (Criteria) this;
}
public Criteria andBizNameNotLike(String value) {
addCriterion("biz_name not like", value, "bizName");
return (Criteria) this;
}
public Criteria andBizNameIn(List<String> values) {
addCriterion("biz_name in", values, "bizName");
return (Criteria) this;
}
public Criteria andBizNameNotIn(List<String> values) {
addCriterion("biz_name not in", values, "bizName");
return (Criteria) this;
}
public Criteria andBizNameBetween(String value1, String value2) {
addCriterion("biz_name between", value1, value2, "bizName");
return (Criteria) this;
}
public Criteria andBizNameNotBetween(String value1, String value2) {
addCriterion("biz_name not between", value1, value2, "bizName");
return (Criteria) this;
}
public Criteria andDomainIdIsNull() {
addCriterion("domain_id is null");
return (Criteria) this;
@@ -310,188 +450,343 @@ public class DomainExtendDOExample {
return (Criteria) this;
}
public Criteria andDefaultMetricsIsNull() {
addCriterion("default_metrics is null");
public Criteria andViewerIsNull() {
addCriterion("viewer is null");
return (Criteria) this;
}
public Criteria andDefaultMetricsIsNotNull() {
addCriterion("default_metrics is not null");
public Criteria andViewerIsNotNull() {
addCriterion("viewer is not null");
return (Criteria) this;
}
public Criteria andDefaultMetricsEqualTo(String value) {
addCriterion("default_metrics =", value, "defaultMetrics");
public Criteria andViewerEqualTo(String value) {
addCriterion("viewer =", value, "viewer");
return (Criteria) this;
}
public Criteria andDefaultMetricsNotEqualTo(String value) {
addCriterion("default_metrics <>", value, "defaultMetrics");
public Criteria andViewerNotEqualTo(String value) {
addCriterion("viewer <>", value, "viewer");
return (Criteria) this;
}
public Criteria andDefaultMetricsGreaterThan(String value) {
addCriterion("default_metrics >", value, "defaultMetrics");
public Criteria andViewerGreaterThan(String value) {
addCriterion("viewer >", value, "viewer");
return (Criteria) this;
}
public Criteria andDefaultMetricsLessThan(String value) {
addCriterion("default_metrics <", value, "defaultMetrics");
public Criteria andViewerGreaterThanOrEqualTo(String value) {
addCriterion("viewer >=", value, "viewer");
return (Criteria) this;
}
public Criteria andDefaultMetricsLessThanOrEqualTo(String value) {
addCriterion("default_metrics <=", value, "defaultMetrics");
public Criteria andViewerLessThan(String value) {
addCriterion("viewer <", value, "viewer");
return (Criteria) this;
}
public Criteria andDefaultMetricsLike(String value) {
addCriterion("default_metrics like", value, "defaultMetrics");
public Criteria andViewerLessThanOrEqualTo(String value) {
addCriterion("viewer <=", value, "viewer");
return (Criteria) this;
}
public Criteria andDefaultMetricsNotLike(String value) {
addCriterion("default_metrics not like", value, "defaultMetrics");
public Criteria andViewerLike(String value) {
addCriterion("viewer like", value, "viewer");
return (Criteria) this;
}
public Criteria andDefaultMetricsIn(List<String> values) {
addCriterion("default_metrics in", values, "defaultMetrics");
public Criteria andViewerNotLike(String value) {
addCriterion("viewer not like", value, "viewer");
return (Criteria) this;
}
public Criteria andDefaultMetricsNotIn(List<String> values) {
addCriterion("default_metrics not in", values, "defaultMetrics");
public Criteria andViewerIn(List<String> values) {
addCriterion("viewer in", values, "viewer");
return (Criteria) this;
}
public Criteria andDefaultMetricsBetween(String value1, String value2) {
addCriterion("default_metrics between", value1, value2, "defaultMetrics");
public Criteria andViewerNotIn(List<String> values) {
addCriterion("viewer not in", values, "viewer");
return (Criteria) this;
}
public Criteria andDefaultMetricsNotBetween(String value1, String value2) {
addCriterion("default_metrics not between", value1, value2, "defaultMetrics");
public Criteria andViewerBetween(String value1, String value2) {
addCriterion("viewer between", value1, value2, "viewer");
return (Criteria) this;
}
public Criteria andCreatedAtIsNull() {
addCriterion("created_at is null");
public Criteria andViewerNotBetween(String value1, String value2) {
addCriterion("viewer not between", value1, value2, "viewer");
return (Criteria) this;
}
public Criteria andCreatedAtIsNotNull() {
addCriterion("created_at is not null");
public Criteria andViewOrgIsNull() {
addCriterion("view_org is null");
return (Criteria) this;
}
public Criteria andCreatedAtEqualTo(Date value) {
addCriterion("created_at =", value, "createdAt");
public Criteria andViewOrgIsNotNull() {
addCriterion("view_org is not null");
return (Criteria) this;
}
public Criteria andCreatedAtNotEqualTo(Date value) {
addCriterion("created_at <>", value, "createdAt");
public Criteria andViewOrgEqualTo(String value) {
addCriterion("view_org =", value, "viewOrg");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThan(Date value) {
addCriterion("created_at >", value, "createdAt");
public Criteria andViewOrgNotEqualTo(String value) {
addCriterion("view_org <>", value, "viewOrg");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("created_at >=", value, "createdAt");
public Criteria andViewOrgGreaterThan(String value) {
addCriterion("view_org >", value, "viewOrg");
return (Criteria) this;
}
public Criteria andCreatedAtLessThan(Date value) {
addCriterion("created_at <", value, "createdAt");
public Criteria andViewOrgGreaterThanOrEqualTo(String value) {
addCriterion("view_org >=", value, "viewOrg");
return (Criteria) this;
}
public Criteria andCreatedAtLessThanOrEqualTo(Date value) {
addCriterion("created_at <=", value, "createdAt");
public Criteria andViewOrgLessThan(String value) {
addCriterion("view_org <", value, "viewOrg");
return (Criteria) this;
}
public Criteria andCreatedAtIn(List<Date> values) {
addCriterion("created_at in", values, "createdAt");
public Criteria andViewOrgLessThanOrEqualTo(String value) {
addCriterion("view_org <=", value, "viewOrg");
return (Criteria) this;
}
public Criteria andCreatedAtNotIn(List<Date> values) {
addCriterion("created_at not in", values, "createdAt");
public Criteria andViewOrgLike(String value) {
addCriterion("view_org like", value, "viewOrg");
return (Criteria) this;
}
public Criteria andCreatedAtBetween(Date value1, Date value2) {
addCriterion("created_at between", value1, value2, "createdAt");
public Criteria andViewOrgNotLike(String value) {
addCriterion("view_org not like", value, "viewOrg");
return (Criteria) this;
}
public Criteria andCreatedAtNotBetween(Date value1, Date value2) {
addCriterion("created_at not between", value1, value2, "createdAt");
public Criteria andViewOrgIn(List<String> values) {
addCriterion("view_org in", values, "viewOrg");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNull() {
addCriterion("updated_at is null");
public Criteria andViewOrgNotIn(List<String> values) {
addCriterion("view_org not in", values, "viewOrg");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNotNull() {
addCriterion("updated_at is not null");
public Criteria andViewOrgBetween(String value1, String value2) {
addCriterion("view_org between", value1, value2, "viewOrg");
return (Criteria) this;
}
public Criteria andUpdatedAtEqualTo(Date value) {
addCriterion("updated_at =", value, "updatedAt");
public Criteria andViewOrgNotBetween(String value1, String value2) {
addCriterion("view_org not between", value1, value2, "viewOrg");
return (Criteria) this;
}
public Criteria andUpdatedAtNotEqualTo(Date value) {
addCriterion("updated_at <>", value, "updatedAt");
public Criteria andAdminIsNull() {
addCriterion("admin is null");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThan(Date value) {
addCriterion("updated_at >", value, "updatedAt");
public Criteria andAdminIsNotNull() {
addCriterion("admin is not null");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("updated_at >=", value, "updatedAt");
public Criteria andAdminEqualTo(String value) {
addCriterion("admin =", value, "admin");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThan(Date value) {
addCriterion("updated_at <", value, "updatedAt");
public Criteria andAdminNotEqualTo(String value) {
addCriterion("admin <>", value, "admin");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) {
addCriterion("updated_at <=", value, "updatedAt");
public Criteria andAdminGreaterThan(String value) {
addCriterion("admin >", value, "admin");
return (Criteria) this;
}
public Criteria andUpdatedAtIn(List<Date> values) {
addCriterion("updated_at in", values, "updatedAt");
public Criteria andAdminGreaterThanOrEqualTo(String value) {
addCriterion("admin >=", value, "admin");
return (Criteria) this;
}
public Criteria andUpdatedAtNotIn(List<Date> values) {
addCriterion("updated_at not in", values, "updatedAt");
public Criteria andAdminLessThan(String value) {
addCriterion("admin <", value, "admin");
return (Criteria) this;
}
public Criteria andUpdatedAtBetween(Date value1, Date value2) {
addCriterion("updated_at between", value1, value2, "updatedAt");
public Criteria andAdminLessThanOrEqualTo(String value) {
addCriterion("admin <=", value, "admin");
return (Criteria) this;
}
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) {
addCriterion("updated_at not between", value1, value2, "updatedAt");
public Criteria andAdminLike(String value) {
addCriterion("admin like", value, "admin");
return (Criteria) this;
}
public Criteria andAdminNotLike(String value) {
addCriterion("admin not like", value, "admin");
return (Criteria) this;
}
public Criteria andAdminIn(List<String> values) {
addCriterion("admin in", values, "admin");
return (Criteria) this;
}
public Criteria andAdminNotIn(List<String> values) {
addCriterion("admin not in", values, "admin");
return (Criteria) this;
}
public Criteria andAdminBetween(String value1, String value2) {
addCriterion("admin between", value1, value2, "admin");
return (Criteria) this;
}
public Criteria andAdminNotBetween(String value1, String value2) {
addCriterion("admin not between", value1, value2, "admin");
return (Criteria) this;
}
public Criteria andAdminOrgIsNull() {
addCriterion("admin_org is null");
return (Criteria) this;
}
public Criteria andAdminOrgIsNotNull() {
addCriterion("admin_org is not null");
return (Criteria) this;
}
public Criteria andAdminOrgEqualTo(String value) {
addCriterion("admin_org =", value, "adminOrg");
return (Criteria) this;
}
public Criteria andAdminOrgNotEqualTo(String value) {
addCriterion("admin_org <>", value, "adminOrg");
return (Criteria) this;
}
public Criteria andAdminOrgGreaterThan(String value) {
addCriterion("admin_org >", value, "adminOrg");
return (Criteria) this;
}
public Criteria andAdminOrgGreaterThanOrEqualTo(String value) {
addCriterion("admin_org >=", value, "adminOrg");
return (Criteria) this;
}
public Criteria andAdminOrgLessThan(String value) {
addCriterion("admin_org <", value, "adminOrg");
return (Criteria) this;
}
public Criteria andAdminOrgLessThanOrEqualTo(String value) {
addCriterion("admin_org <=", value, "adminOrg");
return (Criteria) this;
}
public Criteria andAdminOrgLike(String value) {
addCriterion("admin_org like", value, "adminOrg");
return (Criteria) this;
}
public Criteria andAdminOrgNotLike(String value) {
addCriterion("admin_org not like", value, "adminOrg");
return (Criteria) this;
}
public Criteria andAdminOrgIn(List<String> values) {
addCriterion("admin_org in", values, "adminOrg");
return (Criteria) this;
}
public Criteria andAdminOrgNotIn(List<String> values) {
addCriterion("admin_org not in", values, "adminOrg");
return (Criteria) this;
}
public Criteria andAdminOrgBetween(String value1, String value2) {
addCriterion("admin_org between", value1, value2, "adminOrg");
return (Criteria) this;
}
public Criteria andAdminOrgNotBetween(String value1, String value2) {
addCriterion("admin_org not between", value1, value2, "adminOrg");
return (Criteria) this;
}
public Criteria andIsOpenIsNull() {
addCriterion("is_open is null");
return (Criteria) this;
}
public Criteria andIsOpenIsNotNull() {
addCriterion("is_open is not null");
return (Criteria) this;
}
public Criteria andIsOpenEqualTo(Integer value) {
addCriterion("is_open =", value, "isOpen");
return (Criteria) this;
}
public Criteria andIsOpenNotEqualTo(Integer value) {
addCriterion("is_open <>", value, "isOpen");
return (Criteria) this;
}
public Criteria andIsOpenGreaterThan(Integer value) {
addCriterion("is_open >", value, "isOpen");
return (Criteria) this;
}
public Criteria andIsOpenGreaterThanOrEqualTo(Integer value) {
addCriterion("is_open >=", value, "isOpen");
return (Criteria) this;
}
public Criteria andIsOpenLessThan(Integer value) {
addCriterion("is_open <", value, "isOpen");
return (Criteria) this;
}
public Criteria andIsOpenLessThanOrEqualTo(Integer value) {
addCriterion("is_open <=", value, "isOpen");
return (Criteria) this;
}
public Criteria andIsOpenIn(List<Integer> values) {
addCriterion("is_open in", values, "isOpen");
return (Criteria) this;
}
public Criteria andIsOpenNotIn(List<Integer> values) {
addCriterion("is_open not in", values, "isOpen");
return (Criteria) this;
}
public Criteria andIsOpenBetween(Integer value1, Integer value2) {
addCriterion("is_open between", value1, value2, "isOpen");
return (Criteria) this;
}
public Criteria andIsOpenNotBetween(Integer value1, Integer value2) {
addCriterion("is_open not between", value1, value2, "isOpen");
return (Criteria) this;
}
@@ -565,6 +860,66 @@ public class DomainExtendDOExample {
return (Criteria) this;
}
public Criteria andCreatedAtIsNull() {
addCriterion("created_at is null");
return (Criteria) this;
}
public Criteria andCreatedAtIsNotNull() {
addCriterion("created_at is not null");
return (Criteria) this;
}
public Criteria andCreatedAtEqualTo(Date value) {
addCriterion("created_at =", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotEqualTo(Date value) {
addCriterion("created_at <>", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThan(Date value) {
addCriterion("created_at >", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("created_at >=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThan(Date value) {
addCriterion("created_at <", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThanOrEqualTo(Date value) {
addCriterion("created_at <=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtIn(List<Date> values) {
addCriterion("created_at in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotIn(List<Date> values) {
addCriterion("created_at not in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtBetween(Date value1, Date value2) {
addCriterion("created_at between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotBetween(Date value1, Date value2) {
addCriterion("created_at not between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andUpdatedByIsNull() {
addCriterion("updated_by is null");
return (Criteria) this;
@@ -635,69 +990,69 @@ public class DomainExtendDOExample {
return (Criteria) this;
}
public Criteria andStatusIsNull() {
addCriterion("status is null");
public Criteria andUpdatedAtIsNull() {
addCriterion("updated_at is null");
return (Criteria) this;
}
public Criteria andStatusIsNotNull() {
addCriterion("status is not null");
public Criteria andUpdatedAtIsNotNull() {
addCriterion("updated_at is not null");
return (Criteria) this;
}
public Criteria andStatusEqualTo(Integer value) {
addCriterion("status =", value, "status");
public Criteria andUpdatedAtEqualTo(Date value) {
addCriterion("updated_at =", value, "updatedAt");
return (Criteria) this;
}
public Criteria andStatusNotEqualTo(Integer value) {
addCriterion("status <>", value, "status");
public Criteria andUpdatedAtNotEqualTo(Date value) {
addCriterion("updated_at <>", value, "updatedAt");
return (Criteria) this;
}
public Criteria andStatusGreaterThan(Integer value) {
addCriterion("status >", value, "status");
public Criteria andUpdatedAtGreaterThan(Date value) {
addCriterion("updated_at >", value, "updatedAt");
return (Criteria) this;
}
public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
addCriterion("status >=", value, "status");
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("updated_at >=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andStatusLessThan(Integer value) {
addCriterion("status <", value, "status");
public Criteria andUpdatedAtLessThan(Date value) {
addCriterion("updated_at <", value, "updatedAt");
return (Criteria) this;
}
public Criteria andStatusLessThanOrEqualTo(Integer value) {
addCriterion("status <=", value, "status");
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) {
addCriterion("updated_at <=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andStatusIn(List<Integer> values) {
addCriterion("status in", values, "status");
public Criteria andUpdatedAtIn(List<Date> values) {
addCriterion("updated_at in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andStatusNotIn(List<Integer> values) {
addCriterion("status not in", values, "status");
public Criteria andUpdatedAtNotIn(List<Date> values) {
addCriterion("updated_at not in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andStatusBetween(Integer value1, Integer value2) {
addCriterion("status between", value1, value2, "status");
public Criteria andUpdatedAtBetween(Date value1, Date value2) {
addCriterion("updated_at between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andStatusNotBetween(Integer value1, Integer value2) {
addCriterion("status not between", value1, value2, "status");
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) {
addCriterion("updated_at not between", value1, value2, "updatedAt");
return (Criteria) this;
}
}
/**
* s2_domain_extend
* s2_model
*/
public static class Criteria extends GeneratedCriteria {
@@ -707,7 +1062,7 @@ public class DomainExtendDOExample {
}
/**
* s2_domain_extend null
* s2_model null
*/
public static class Criterion {
@@ -727,6 +1082,38 @@ public class DomainExtendDOExample {
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
@@ -762,37 +1149,5 @@ public class DomainExtendDOExample {
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
}
}

View File

@@ -1,16 +0,0 @@
package com.tencent.supersonic.semantic.model.domain.dataobject;
import java.util.ArrayList;
import java.util.List;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UpdateDimValueDictBatchDO {
private List<Long> itemIdList = new ArrayList<>();
private String rules;
}

View File

@@ -12,7 +12,7 @@ public class ViewInfoDO {
/**
*
*/
private Long domainId;
private Long modelId;
/**
* datasource、dimension、metric
@@ -59,17 +59,17 @@ public class ViewInfoDO {
}
/**
* @return domain_id
* @return model_id
*/
public Long getDomainId() {
return domainId;
public Long getModelId() {
return modelId;
}
/**
* @param domainId
* @param modelId
*/
public void setDomainId(Long domainId) {
this.domainId = domainId;
public void setModelId(Long modelId) {
this.modelId = modelId;
}
/**

View File

@@ -38,13 +38,6 @@ public class ViewInfoDOExample {
oredCriteria = new ArrayList<Criteria>();
}
/**
* @mbg.generated
*/
public String getOrderByClause() {
return orderByClause;
}
/**
* @mbg.generated
*/
@@ -55,8 +48,8 @@ public class ViewInfoDOExample {
/**
* @mbg.generated
*/
public boolean isDistinct() {
return distinct;
public String getOrderByClause() {
return orderByClause;
}
/**
@@ -66,6 +59,13 @@ public class ViewInfoDOExample {
this.distinct = distinct;
}
/**
* @mbg.generated
*/
public boolean isDistinct() {
return distinct;
}
/**
* @mbg.generated
*/
@@ -117,13 +117,6 @@ public class ViewInfoDOExample {
distinct = false;
}
/**
* @mbg.generated
*/
public Integer getLimitStart() {
return limitStart;
}
/**
* @mbg.generated
*/
@@ -134,8 +127,8 @@ public class ViewInfoDOExample {
/**
* @mbg.generated
*/
public Integer getLimitEnd() {
return limitEnd;
public Integer getLimitStart() {
return limitStart;
}
/**
@@ -145,6 +138,13 @@ public class ViewInfoDOExample {
this.limitEnd = limitEnd;
}
/**
* @mbg.generated
*/
public Integer getLimitEnd() {
return limitEnd;
}
/**
* s2_view_info null
*/
@@ -250,63 +250,63 @@ public class ViewInfoDOExample {
return (Criteria) this;
}
public Criteria andDomainIdIsNull() {
addCriterion("domain_id is null");
public Criteria andModelIdIsNull() {
addCriterion("model_id is null");
return (Criteria) this;
}
public Criteria andDomainIdIsNotNull() {
addCriterion("domain_id is not null");
public Criteria andModelIdIsNotNull() {
addCriterion("model_id is not null");
return (Criteria) this;
}
public Criteria andDomainIdEqualTo(Long value) {
addCriterion("domain_id =", value, "domainId");
public Criteria andModelIdEqualTo(Long value) {
addCriterion("model_id =", value, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdNotEqualTo(Long value) {
addCriterion("domain_id <>", value, "domainId");
public Criteria andModelIdNotEqualTo(Long value) {
addCriterion("model_id <>", value, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdGreaterThan(Long value) {
addCriterion("domain_id >", value, "domainId");
public Criteria andModelIdGreaterThan(Long value) {
addCriterion("model_id >", value, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdGreaterThanOrEqualTo(Long value) {
addCriterion("domain_id >=", value, "domainId");
public Criteria andModelIdGreaterThanOrEqualTo(Long value) {
addCriterion("model_id >=", value, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdLessThan(Long value) {
addCriterion("domain_id <", value, "domainId");
public Criteria andModelIdLessThan(Long value) {
addCriterion("model_id <", value, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdLessThanOrEqualTo(Long value) {
addCriterion("domain_id <=", value, "domainId");
public Criteria andModelIdLessThanOrEqualTo(Long value) {
addCriterion("model_id <=", value, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdIn(List<Long> values) {
addCriterion("domain_id in", values, "domainId");
public Criteria andModelIdIn(List<Long> values) {
addCriterion("model_id in", values, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdNotIn(List<Long> values) {
addCriterion("domain_id not in", values, "domainId");
public Criteria andModelIdNotIn(List<Long> values) {
addCriterion("model_id not in", values, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdBetween(Long value1, Long value2) {
addCriterion("domain_id between", value1, value2, "domainId");
public Criteria andModelIdBetween(Long value1, Long value2) {
addCriterion("model_id between", value1, value2, "modelId");
return (Criteria) this;
}
public Criteria andDomainIdNotBetween(Long value1, Long value2) {
addCriterion("domain_id not between", value1, value2, "domainId");
public Criteria andModelIdNotBetween(Long value1, Long value2) {
addCriterion("model_id not between", value1, value2, "modelId");
return (Criteria) this;
}
@@ -672,6 +672,38 @@ public class ViewInfoDOExample {
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
@@ -707,37 +739,5 @@ public class ViewInfoDOExample {
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
}
}

View File

@@ -4,17 +4,17 @@ import com.tencent.supersonic.semantic.api.model.pojo.DatasourceDetail;
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.response.DatabaseResp;
import com.tencent.supersonic.semantic.api.model.yaml.DatasourceYamlTpl;
import com.tencent.supersonic.semantic.api.model.yaml.DimensionTimeTypeParamsTpl;
import com.tencent.supersonic.semantic.api.model.yaml.DimensionYamlTpl;
import com.tencent.supersonic.semantic.api.model.yaml.IdentifyYamlTpl;
import com.tencent.supersonic.semantic.api.model.yaml.MeasureYamlTpl;
import com.tencent.supersonic.semantic.api.model.response.DatabaseResp;
import com.tencent.supersonic.semantic.model.domain.utils.SysTimeDimensionBuilder;
import com.tencent.supersonic.semantic.model.domain.adaptor.engineadapter.EngineAdaptor;
import com.tencent.supersonic.semantic.model.domain.adaptor.engineadapter.EngineAdaptorFactory;
import com.tencent.supersonic.semantic.model.domain.pojo.Datasource;
import com.tencent.supersonic.semantic.model.domain.pojo.DatasourceQueryEnum;
import com.tencent.supersonic.semantic.model.domain.utils.SysTimeDimensionBuilder;
import java.util.stream.Collectors;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;

View File

@@ -9,7 +9,7 @@ import lombok.Data;
@Data
public class Datasource extends SchemaItem {
private Long domainId;
private Long modelId;
private Long databaseId;

View File

@@ -3,8 +3,8 @@ package com.tencent.supersonic.semantic.model.domain.pojo;
import com.tencent.supersonic.semantic.api.model.pojo.DimValueMap;
import com.tencent.supersonic.semantic.api.model.pojo.SchemaItem;
import lombok.Data;
import java.util.List;
import lombok.Data;
@Data
public class Dimension extends SchemaItem {
@@ -14,7 +14,7 @@ public class Dimension extends SchemaItem {
private String expr;
private Long domainId;
private Long modelId;
private Long datasourceId;

View File

@@ -1,10 +1,10 @@
package com.tencent.supersonic.semantic.model.domain.pojo;
import com.tencent.supersonic.semantic.api.model.pojo.Entity;
import com.tencent.supersonic.semantic.api.model.request.DomainReq;
import com.tencent.supersonic.common.pojo.enums.StatusEnum;
import com.tencent.supersonic.semantic.api.model.pojo.Entity;
import com.tencent.supersonic.semantic.api.model.pojo.SchemaItem;
import com.tencent.supersonic.semantic.api.model.request.DomainReq;
import java.util.List;
import lombok.Data;
import org.springframework.beans.BeanUtils;

View File

@@ -9,7 +9,6 @@ import com.alibaba.druid.wall.WallFilter;
import com.tencent.supersonic.semantic.api.model.enums.DataTypeEnum;
import com.tencent.supersonic.semantic.api.model.response.DatabaseResp;
import com.tencent.supersonic.semantic.model.domain.utils.JdbcDataSourceUtils;
import java.util.Arrays;
import java.util.Map;
import java.util.Properties;

View File

@@ -1,7 +1,7 @@
package com.tencent.supersonic.semantic.model.domain.pojo;
import lombok.Data;
import java.util.List;
import lombok.Data;
@Data
@@ -15,7 +15,7 @@ public class MetaFilter {
private String createdBy;
private List<Long> domainIds;
private List<Long> modelIds;
private Integer sensitiveLevel;

View File

@@ -10,7 +10,7 @@ import lombok.Data;
public class Metric extends SchemaItem {
private Long domainId;
private Long modelId;
//measure_proxy ratio expr cumulative derived
private String type;

View File

@@ -7,4 +7,6 @@ public class MetricFilter extends MetaFilter {
private String type;
private String key;
}

View File

@@ -0,0 +1,38 @@
package com.tencent.supersonic.semantic.model.domain.pojo;
import com.tencent.supersonic.common.pojo.enums.StatusEnum;
import com.tencent.supersonic.semantic.api.model.pojo.Entity;
import com.tencent.supersonic.semantic.api.model.pojo.SchemaItem;
import com.tencent.supersonic.semantic.api.model.request.ModelReq;
import java.util.List;
import lombok.Data;
import org.springframework.beans.BeanUtils;
@Data
public class Model extends SchemaItem {
private Long domainId;
private Integer isOpen;
private List<String> viewers;
private List<String> viewOrgs;
private List<String> admins;
private List<String> adminOrgs;
private Entity entity;
public static Model create(ModelReq modelReq) {
Model model = new Model();
BeanUtils.copyProperties(modelReq, model);
model.setStatus(StatusEnum.ONLINE.getCode());
return model;
}
}

View File

@@ -3,10 +3,8 @@ package com.tencent.supersonic.semantic.model.domain.repository;
import com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceDO;
import com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceRelaDO;
import java.util.List;
public interface DatasourceRepository {
void createDatasource(DatasourceDO datasourceDO);
@@ -15,7 +13,7 @@ public interface DatasourceRepository {
List<DatasourceDO> getDatasourceList();
List<DatasourceDO> getDatasourceList(Long domainId);
List<DatasourceDO> getDatasourceList(Long modelId);
DatasourceDO getDatasourceById(Long id);
@@ -27,7 +25,7 @@ public interface DatasourceRepository {
DatasourceRelaDO getDatasourceRelaById(Long id);
List<DatasourceRelaDO> getDatasourceRelaList(Long domainId);
List<DatasourceRelaDO> getDatasourceRelaList(Long modelId);
void deleteDatasourceRela(Long id);
}

View File

@@ -4,7 +4,6 @@ package com.tencent.supersonic.semantic.model.domain.repository;
import com.tencent.supersonic.semantic.api.model.pojo.ItemDateFilter;
import com.tencent.supersonic.semantic.api.model.request.DateInfoReq;
import com.tencent.supersonic.semantic.model.domain.dataobject.DateInfoDO;
import java.util.List;
public interface DateInfoRepository {

View File

@@ -4,7 +4,6 @@ import com.tencent.supersonic.semantic.model.domain.dataobject.DimensionDO;
import com.tencent.supersonic.semantic.model.domain.pojo.DimensionFilter;
import java.util.List;
public interface DimensionRepository {

View File

@@ -2,7 +2,6 @@ package com.tencent.supersonic.semantic.model.domain.repository;
import com.tencent.supersonic.semantic.model.domain.dataobject.DomainDO;
import java.util.List;

View File

@@ -1,9 +1,8 @@
package com.tencent.supersonic.semantic.model.domain.repository;
import com.tencent.supersonic.semantic.model.domain.pojo.MetricFilter;
import com.tencent.supersonic.semantic.model.domain.dataobject.MetricDO;
import com.tencent.supersonic.semantic.model.domain.pojo.MetricFilter;
import java.util.List;

View File

@@ -0,0 +1,18 @@
package com.tencent.supersonic.semantic.model.domain.repository;
import com.tencent.supersonic.semantic.model.domain.dataobject.ModelDO;
import java.util.List;
public interface ModelRepository {
void createModel(ModelDO modelDO);
void updateModel(ModelDO modelDO);
void deleteModel(Long id);
List<ModelDO> getModelList();
ModelDO getModelById(Long id);
}

View File

@@ -3,6 +3,8 @@ package com.tencent.supersonic.semantic.model.domain.utils;
import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Lists;
import com.tencent.supersonic.auth.api.authentication.pojo.User;
import com.tencent.supersonic.common.pojo.enums.StatusEnum;
import com.tencent.supersonic.common.util.BeanMapper;
import com.tencent.supersonic.semantic.api.model.enums.MetricTypeEnum;
import com.tencent.supersonic.semantic.api.model.pojo.DatasourceDetail;
import com.tencent.supersonic.semantic.api.model.pojo.Dim;
@@ -15,8 +17,6 @@ import com.tencent.supersonic.semantic.api.model.request.MetricReq;
import com.tencent.supersonic.semantic.api.model.response.DatasourceRelaResp;
import com.tencent.supersonic.semantic.api.model.response.DatasourceResp;
import com.tencent.supersonic.semantic.api.model.response.MeasureResp;
import com.tencent.supersonic.common.pojo.enums.StatusEnum;
import com.tencent.supersonic.common.util.BeanMapper;
import com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceDO;
import com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceRelaDO;
import com.tencent.supersonic.semantic.model.domain.pojo.Datasource;
@@ -104,7 +104,7 @@ public class DatasourceConverter {
dimensionReq.setDescription(dim.getName());
dimensionReq.setSemanticType("CATEGORY");
dimensionReq.setDatasourceId(datasource.getId());
dimensionReq.setDomainId(datasource.getDomainId());
dimensionReq.setModelId(datasource.getModelId());
dimensionReq.setExpr(dim.getBizName());
dimensionReq.setType("categorical");
return dimensionReq;
@@ -114,9 +114,9 @@ public class DatasourceConverter {
measure.setDatasourceId(datasource.getId());
MetricReq metricReq = new MetricReq();
metricReq.setName(measure.getName());
metricReq.setBizName(measure.getBizName().replace(datasource.getBizName() + "_", ""));
metricReq.setBizName(measure.getBizName().replaceFirst(datasource.getBizName() + "_", ""));
metricReq.setDescription(measure.getName());
metricReq.setDomainId(datasource.getDomainId());
metricReq.setModelId(datasource.getModelId());
metricReq.setMetricType(MetricTypeEnum.ATOMIC);
MetricTypeParams exprTypeParams = new MetricTypeParams();
exprTypeParams.setExpr(measure.getBizName());
@@ -132,7 +132,7 @@ public class DatasourceConverter {
dimensionReq.setDescription(identify.getName());
dimensionReq.setSemanticType("CATEGORY");
dimensionReq.setDatasourceId(datasource.getId());
dimensionReq.setDomainId(datasource.getDomainId());
dimensionReq.setModelId(datasource.getModelId());
dimensionReq.setExpr(identify.getBizName());
dimensionReq.setType(identify.getType());
return dimensionReq;

View File

@@ -1,20 +1,18 @@
package com.tencent.supersonic.semantic.model.domain.utils;
import com.alibaba.fastjson.JSONObject;
import com.tencent.supersonic.common.util.BeanMapper;
import com.tencent.supersonic.common.util.JsonUtil;
import com.tencent.supersonic.semantic.api.model.pojo.DimValueMap;
import com.tencent.supersonic.semantic.api.model.yaml.DimensionYamlTpl;
import com.tencent.supersonic.semantic.api.model.request.DimensionReq;
import com.tencent.supersonic.semantic.api.model.response.DatasourceResp;
import com.tencent.supersonic.semantic.api.model.response.DimensionResp;
import com.tencent.supersonic.common.util.BeanMapper;
import com.tencent.supersonic.semantic.api.model.yaml.DimensionYamlTpl;
import com.tencent.supersonic.semantic.model.domain.dataobject.DimensionDO;
import com.tencent.supersonic.semantic.model.domain.pojo.Dimension;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.apache.logging.log4j.util.Strings;
import org.springframework.beans.BeanUtils;
import org.springframework.util.CollectionUtils;
@@ -46,11 +44,11 @@ public class DimensionConverter {
public static DimensionResp convert2DimensionResp(DimensionDO dimensionDO,
Map<Long, String> fullPathMap,
Map<Long, DatasourceResp> datasourceRespMap) {
Map<Long, String> fullPathMap,
Map<Long, DatasourceResp> datasourceRespMap) {
DimensionResp dimensionResp = new DimensionResp();
BeanUtils.copyProperties(dimensionDO, dimensionResp);
dimensionResp.setFullPath(fullPathMap.get(dimensionDO.getDomainId()) + dimensionDO.getBizName());
dimensionResp.setFullPath(fullPathMap.get(dimensionDO.getModelId()) + dimensionDO.getBizName());
dimensionResp.setDatasourceId(
datasourceRespMap.getOrDefault(dimensionResp.getDatasourceId(), new DatasourceResp()).getId());
dimensionResp.setDatasourceName(

View File

@@ -3,21 +3,17 @@ package com.tencent.supersonic.semantic.model.domain.utils;
import com.google.common.collect.Lists;
import com.tencent.supersonic.auth.api.authentication.pojo.User;
import com.tencent.supersonic.common.util.JsonUtil;
import com.tencent.supersonic.semantic.api.model.pojo.Entity;
import com.tencent.supersonic.common.pojo.enums.StatusEnum;
import com.tencent.supersonic.semantic.api.model.request.DomainReq;
import com.tencent.supersonic.semantic.api.model.response.DimensionResp;
import com.tencent.supersonic.semantic.api.model.response.DomainResp;
import com.tencent.supersonic.common.pojo.enums.StatusEnum;
import com.tencent.supersonic.semantic.api.model.response.MetricResp;
import com.tencent.supersonic.semantic.model.domain.dataobject.DomainDO;
import com.tencent.supersonic.semantic.model.domain.pojo.Domain;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
@@ -41,7 +37,6 @@ public class DomainConvert {
domainDO.setAdminOrg(String.join(",", domain.getAdminOrgs()));
domainDO.setViewer(String.join(",", domain.getViewers()));
domainDO.setViewOrg(String.join(",", domain.getViewOrgs()));
domainDO.setEntity(JsonUtil.toString(domain.getEntity()));
return domainDO;
}
@@ -57,12 +52,11 @@ public class DomainConvert {
? Lists.newArrayList() : Arrays.asList(domainDO.getViewer().split(",")));
domainResp.setViewOrgs(StringUtils.isBlank(domainDO.getViewOrg())
? Lists.newArrayList() : Arrays.asList(domainDO.getViewOrg().split(",")));
domainResp.setEntity(JsonUtil.toObject(domainDO.getEntity(), Entity.class));
return domainResp;
}
public static DomainResp convert(DomainDO domainDO, Map<Long, String> domainFullPathMap,
Map<Long, List<DimensionResp>> dimensionMap, Map<Long, List<MetricResp>> metricMap) {
Map<Long, List<DimensionResp>> dimensionMap, Map<Long, List<MetricResp>> metricMap) {
DomainResp domainResp = convert(domainDO, domainFullPathMap);
domainResp.setDimensionCnt(dimensionMap.getOrDefault(domainResp.getId(), Lists.newArrayList()).size());
domainResp.setMetricCnt(metricMap.getOrDefault(domainResp.getId(), Lists.newArrayList()).size());

View File

@@ -10,9 +10,9 @@ import static com.tencent.supersonic.common.pojo.Constants.PATTERN_JDBC_TYPE;
import static com.tencent.supersonic.common.pojo.Constants.SPACE;
import com.alibaba.druid.util.StringUtils;
import com.tencent.supersonic.common.util.MD5Util;
import com.tencent.supersonic.semantic.api.model.enums.DataTypeEnum;
import com.tencent.supersonic.semantic.api.model.response.DatabaseResp;
import com.tencent.supersonic.common.util.MD5Util;
import com.tencent.supersonic.semantic.model.domain.pojo.Database;
import com.tencent.supersonic.semantic.model.domain.pojo.JdbcDataSource;
import java.sql.Connection;

View File

@@ -3,15 +3,15 @@ package com.tencent.supersonic.semantic.model.domain.utils;
import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Lists;
import com.tencent.supersonic.common.pojo.DataFormat;
import com.tencent.supersonic.common.util.BeanMapper;
import com.tencent.supersonic.semantic.api.model.pojo.Measure;
import com.tencent.supersonic.semantic.api.model.pojo.MetricTypeParams;
import com.tencent.supersonic.semantic.api.model.request.MetricReq;
import com.tencent.supersonic.semantic.api.model.response.MetricResp;
import com.tencent.supersonic.semantic.api.model.response.ModelResp;
import com.tencent.supersonic.semantic.api.model.yaml.MeasureYamlTpl;
import com.tencent.supersonic.semantic.api.model.yaml.MetricTypeParamsYamlTpl;
import com.tencent.supersonic.semantic.api.model.yaml.MetricYamlTpl;
import com.tencent.supersonic.semantic.api.model.request.MetricReq;
import com.tencent.supersonic.semantic.api.model.response.DomainResp;
import com.tencent.supersonic.semantic.api.model.response.MetricResp;
import com.tencent.supersonic.common.util.BeanMapper;
import com.tencent.supersonic.semantic.model.domain.dataobject.MetricDO;
import com.tencent.supersonic.semantic.model.domain.pojo.Metric;
import java.util.ArrayList;
@@ -54,15 +54,14 @@ public class MetricConverter {
}
public static MetricResp convert2MetricDesc(MetricDO metricDO, Map<Long, DomainResp> domainMap) {
public static MetricResp convert2MetricDesc(MetricDO metricDO, Map<Long, ModelResp> modelMap) {
MetricResp metricDesc = new MetricResp();
BeanUtils.copyProperties(metricDO, metricDesc);
metricDesc.setTypeParams(JSONObject.parseObject(metricDO.getTypeParams(), MetricTypeParams.class));
metricDesc.setDataFormat(JSONObject.parseObject(metricDO.getDataFormat(), DataFormat.class));
DomainResp domainResp = domainMap.get(metricDO.getDomainId());
if (domainResp != null) {
metricDesc.setFullPath(domainMap.get(metricDO.getDomainId()).getFullPath() + metricDO.getBizName());
metricDesc.setDomainName(domainMap.get(metricDO.getDomainId()).getName());
ModelResp modelResp = modelMap.get(metricDO.getModelId());
if (modelResp != null) {
metricDesc.setModelName(modelResp.getName());
}
return metricDesc;
}

View File

@@ -0,0 +1,71 @@
package com.tencent.supersonic.semantic.model.domain.utils;
import com.google.common.collect.Lists;
import com.tencent.supersonic.auth.api.authentication.pojo.User;
import com.tencent.supersonic.common.pojo.enums.StatusEnum;
import com.tencent.supersonic.common.util.JsonUtil;
import com.tencent.supersonic.semantic.api.model.pojo.Entity;
import com.tencent.supersonic.semantic.api.model.request.ModelReq;
import com.tencent.supersonic.semantic.api.model.response.DomainResp;
import com.tencent.supersonic.semantic.api.model.response.ModelResp;
import com.tencent.supersonic.semantic.model.domain.dataobject.ModelDO;
import com.tencent.supersonic.semantic.model.domain.pojo.Model;
import java.util.Arrays;
import java.util.Date;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
public class ModelConvert {
public static Model convert(ModelReq modelReq) {
Model model = new Model();
BeanUtils.copyProperties(modelReq, model);
model.setStatus(StatusEnum.ONLINE.getCode());
return model;
}
public static ModelDO convert(Model model, User user) {
ModelDO modelDO = new ModelDO();
BeanUtils.copyProperties(model, modelDO);
modelDO.setCreatedBy(user.getName());
modelDO.setUpdatedBy(user.getName());
modelDO.setCreatedAt(new Date());
modelDO.setUpdatedAt(new Date());
modelDO.setAdmin(String.join(",", model.getAdmins()));
modelDO.setAdminOrg(String.join(",", model.getAdminOrgs()));
modelDO.setViewer(String.join(",", model.getViewers()));
modelDO.setViewOrg(String.join(",", model.getViewOrgs()));
modelDO.setEntity(JsonUtil.toString(model.getEntity()));
return modelDO;
}
public static ModelResp convert(ModelDO modelDO) {
ModelResp modelResp = new ModelResp();
BeanUtils.copyProperties(modelDO, modelResp);
modelResp.setAdmins(StringUtils.isBlank(modelDO.getAdmin())
? Lists.newArrayList() : Arrays.asList(modelDO.getAdmin().split(",")));
modelResp.setAdminOrgs(StringUtils.isBlank(modelDO.getAdminOrg())
? Lists.newArrayList() : Arrays.asList(modelDO.getAdminOrg().split(",")));
modelResp.setViewers(StringUtils.isBlank(modelDO.getViewer())
? Lists.newArrayList() : Arrays.asList(modelDO.getViewer().split(",")));
modelResp.setViewOrgs(StringUtils.isBlank(modelDO.getViewOrg())
? Lists.newArrayList() : Arrays.asList(modelDO.getViewOrg().split(",")));
modelResp.setEntity(JsonUtil.toObject(modelDO.getEntity(), Entity.class));
return modelResp;
}
public static ModelResp convert(ModelDO modelDO,
Map<Long, DomainResp> domainRespMap) {
ModelResp modelResp = convert(modelDO);
DomainResp domainResp = domainRespMap.get(modelResp.getDomainId());
if (domainResp != null) {
String fullBizNamePath = domainResp.getFullPath() + modelResp.getBizName();
modelResp.setFullPath(fullBizNamePath);
}
return modelResp;
}
}

View File

@@ -2,8 +2,8 @@ package com.tencent.supersonic.semantic.model.domain.utils;
import static com.tencent.supersonic.common.pojo.Constants.AT_SYMBOL;
import com.tencent.supersonic.semantic.api.model.enums.DataTypeEnum;
import com.tencent.supersonic.common.pojo.QueryColumn;
import com.tencent.supersonic.semantic.api.model.enums.DataTypeEnum;
import com.tencent.supersonic.semantic.api.model.response.DatabaseResp;
import com.tencent.supersonic.semantic.api.model.response.QueryResultWithSchemaResp;
import com.tencent.supersonic.semantic.model.domain.pojo.JdbcDataSource;

View File

@@ -2,7 +2,6 @@ package com.tencent.supersonic.semantic.model.infrastructure.mapper;
import com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceRelaDO;
import com.tencent.supersonic.semantic.model.domain.dataobject.DatasourceRelaDOExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;

View File

@@ -3,7 +3,6 @@ package com.tencent.supersonic.semantic.model.infrastructure.mapper;
import com.tencent.supersonic.semantic.api.model.pojo.ItemDateFilter;
import com.tencent.supersonic.semantic.model.domain.dataobject.DateInfoDO;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;

View File

@@ -2,7 +2,6 @@ package com.tencent.supersonic.semantic.model.infrastructure.mapper;
import com.tencent.supersonic.semantic.model.domain.dataobject.DimensionDO;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;

View File

@@ -1,11 +1,9 @@
package com.tencent.supersonic.semantic.model.infrastructure.mapper;
import com.tencent.supersonic.semantic.model.domain.dataobject.DimensionDO;
import com.tencent.supersonic.semantic.model.domain.dataobject.DimensionDOExample;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface DimensionDOMapper {

View File

@@ -2,7 +2,6 @@ package com.tencent.supersonic.semantic.model.infrastructure.mapper;
import com.tencent.supersonic.semantic.model.domain.dataobject.DomainDO;
import com.tencent.supersonic.semantic.model.domain.dataobject.DomainDOExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
@@ -48,4 +47,4 @@ public interface DomainDOMapper {
* @mbg.generated
*/
int updateByPrimaryKey(DomainDO record);
}
}

View File

@@ -1,13 +1,10 @@
package com.tencent.supersonic.semantic.model.infrastructure.mapper;
import com.tencent.supersonic.semantic.model.domain.dataobject.MetricDO;
import java.util.List;
import com.tencent.supersonic.semantic.model.domain.pojo.MetricFilter;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface MetricDOCustomMapper {

View File

@@ -2,7 +2,6 @@ package com.tencent.supersonic.semantic.model.infrastructure.mapper;
import com.tencent.supersonic.semantic.model.domain.dataobject.MetricDO;
import com.tencent.supersonic.semantic.model.domain.dataobject.MetricDOExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
@@ -58,4 +57,4 @@ public interface MetricDOMapper {
* @mbg.generated
*/
int updateByPrimaryKey(MetricDO record);
}
}

View File

@@ -0,0 +1,76 @@
package com.tencent.supersonic.semantic.model.infrastructure.mapper;
import com.tencent.supersonic.semantic.model.domain.dataobject.ModelDO;
import com.tencent.supersonic.semantic.model.domain.dataobject.ModelDOExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface ModelDOMapper {
/**
* @mbg.generated
*/
long countByExample(ModelDOExample example);
/**
* @mbg.generated
*/
int deleteByPrimaryKey(Long id);
/**
* @mbg.generated
*/
int insert(ModelDO record);
/**
* @mbg.generated
*/
int insertSelective(ModelDO record);
/**
* @mbg.generated
*/
List<ModelDO> selectByExampleWithBLOBs(ModelDOExample example);
/**
* @mbg.generated
*/
List<ModelDO> selectByExample(ModelDOExample example);
/**
* @mbg.generated
*/
ModelDO selectByPrimaryKey(Long id);
/**
* @mbg.generated
*/
int updateByExampleSelective(@Param("record") ModelDO record, @Param("example") ModelDOExample example);
/**
* @mbg.generated
*/
int updateByExampleWithBLOBs(@Param("record") ModelDO record, @Param("example") ModelDOExample example);
/**
* @mbg.generated
*/
int updateByExample(@Param("record") ModelDO record, @Param("example") ModelDOExample example);
/**
* @mbg.generated
*/
int updateByPrimaryKeySelective(ModelDO record);
/**
* @mbg.generated
*/
int updateByPrimaryKeyWithBLOBs(ModelDO record);
/**
* @mbg.generated
*/
int updateByPrimaryKey(ModelDO record);
}

Some files were not shown because too many files have changed in this diff Show More