mirror of
https://github.com/tencentmusic/supersonic.git
synced 2026-04-15 12:04:20 +08:00
(opt)(headless)Support querying metrics by dataSetId.
This commit is contained in:
@@ -15,6 +15,7 @@ public class PageSchemaItemReq extends PageBaseReq {
|
||||
private String createdBy;
|
||||
private List<Long> domainIds = Lists.newArrayList();
|
||||
private List<Long> modelIds = Lists.newArrayList();
|
||||
private Long dataSetId;
|
||||
private Integer sensitiveLevel;
|
||||
private Integer status;
|
||||
private String key;
|
||||
|
||||
@@ -374,7 +374,15 @@ public class MetricServiceImpl extends ServiceImpl<MetricDOMapper, MetricDO>
|
||||
MetricFilter metricFilter = new MetricFilter();
|
||||
metricFilter.setUserName(user.getName());
|
||||
BeanUtils.copyProperties(pageMetricReq, metricFilter);
|
||||
if (!CollectionUtils.isEmpty(pageMetricReq.getDomainIds())) {
|
||||
|
||||
// If dataSetId is provided, get models directly from the dataset
|
||||
if (pageMetricReq.getDataSetId() != null) {
|
||||
DataSetResp dataSetResp = dataSetService.getDataSet(pageMetricReq.getDataSetId());
|
||||
if (dataSetResp != null) {
|
||||
pageMetricReq.getModelIds().addAll(dataSetResp.getAllModels());
|
||||
}
|
||||
} else if (!CollectionUtils.isEmpty(pageMetricReq.getDomainIds())) {
|
||||
// Only check domainIds when dataSetId is not provided
|
||||
List<ModelResp> modelResps =
|
||||
modelService.getAllModelByDomainIds(pageMetricReq.getDomainIds());
|
||||
List<Long> modelIds =
|
||||
|
||||
Reference in New Issue
Block a user