This commit is contained in:
2026-08-11 11:19:04 +08:00
parent 87db98dd71
commit 12b0eb24e7
26 changed files with 733 additions and 144 deletions
+12
View File
@@ -23,3 +23,15 @@ func (c *kgEntity) List(ctx context.Context, req *dto.ListKgEntityReq) (*dto.Lis
PageSize: req.PageSize,
}, nil
}
func (c *kgEntity) Sources(ctx context.Context, req *dto.SourcesKgEntityReq) (*dto.SourcesKgEntityRes, error) {
list, err := service.KgEntityService.Sources(ctx, req.DatasetId)
if err != nil {
return nil, err
}
out := make([]*dto.KgEntitySourceItem, 0, len(list))
for _, s := range list {
out = append(out, &dto.KgEntitySourceItem{Name: s.Name, Files: s.Files})
}
return &dto.SourcesKgEntityRes{List: out}, nil
}