diff --git a/base/res_relation.go b/base/res_relation.go index e01ad85..c2f9faa 100644 --- a/base/res_relation.go +++ b/base/res_relation.go @@ -23,7 +23,7 @@ type GetResRelations func(categoryUuid string) []ResRelation type GetOrmJoinsByResRelations func(root string, items []ResRelation) []contracts.Join // 获取被关联对象的资源 -type GetResRelationResource func(r ResRelation) contracts.Resource +type GetResRelationResource func(r ResRelation) (contracts.Resource, bool) // 资源关联依赖 func GetJoinResDependencies(root string, items []ResRelation) (dependencies []string) { diff --git a/base/resource.go b/base/resource.go index ea27b8f..954c677 100644 --- a/base/resource.go +++ b/base/resource.go @@ -2,7 +2,6 @@ package base import ( "database/sql" - "fmt" "log" "reflect" "unicode" @@ -144,7 +143,7 @@ func (this Resource) GetDBDriver() string { } func (this Resource) GetAuthDBTable(u contracts.User, params ...any) *db.Builder { - fmt.Println(this.GetRolesCondition(u).ToSql()) + // fmt.Println(this.GetRolesCondition(u).ToSql()) return this.GetDBTable(append(params, u)...) }