(opt)(headless)Support querying metrics by dataSetId.
Some checks failed
supersonic CentOS CI / build (21) (push) Has been cancelled
supersonic mac CI / build (21) (push) Has been cancelled
supersonic ubuntu CI / build (21) (push) Has been cancelled
supersonic windows CI / build (21) (push) Has been cancelled

This commit is contained in:
jerryjzhang
2026-02-21 17:00:29 +08:00
parent 0876f5eae8
commit 77d8d63df7
2 changed files with 10 additions and 1 deletions

View File

@@ -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;

View File

@@ -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 =