feat: tag refactor & other

This commit is contained in:
meilin.huang
2024-11-26 17:32:44 +08:00
parent 2b712cd548
commit 6cc15ebeda
57 changed files with 538 additions and 314 deletions

View File

@@ -3,6 +3,7 @@ package api
import (
"mayfly-go/internal/machine/application"
tagapp "mayfly-go/internal/tag/application"
"mayfly-go/internal/tag/domain/entity"
tagentity "mayfly-go/internal/tag/domain/entity"
"mayfly-go/pkg/req"
"mayfly-go/pkg/utils/collx"
@@ -16,7 +17,7 @@ type Dashbord struct {
func (m *Dashbord) Dashbord(rc *req.Ctx) {
accountId := rc.GetLoginAccount().Id
tagCodePaths := m.TagTreeApp.GetAccountTags(accountId, &tagentity.TagTreeQuery{Types: collx.AsArray(tagentity.TagTypeMachineAuthCert)}).GetCodePaths()
tagCodePaths := m.TagTreeApp.GetAccountTags(accountId, &tagentity.TagTreeQuery{TypePaths: collx.AsArray(entity.NewTypePaths(tagentity.TagTypeMachine, tagentity.TagTypeAuthCert))}).GetCodePaths()
machineCodes := tagentity.GetCodesByCodePaths(tagentity.TagTypeMachine, tagCodePaths...)
rc.ResData = collx.M{