mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-17 23:00:24 +08:00
refactor: 新增base.Repo与base.App,重构repo与app层代码
This commit is contained in:
@@ -2,24 +2,18 @@ package repository
|
||||
|
||||
import (
|
||||
"mayfly-go/internal/sys/domain/entity"
|
||||
"mayfly-go/pkg/base"
|
||||
)
|
||||
|
||||
type Resource interface {
|
||||
// 获取资源列表
|
||||
GetResourceList(condition *entity.Resource, toEntity any, orderBy ...string)
|
||||
|
||||
GetById(id uint64, cols ...string) *entity.Resource
|
||||
|
||||
Delete(id uint64)
|
||||
|
||||
GetByCondition(condition *entity.Resource, cols ...string) error
|
||||
base.Repo[*entity.Resource]
|
||||
|
||||
// 获取账号资源列表
|
||||
GetAccountResources(accountId uint64, toEntity any)
|
||||
GetAccountResources(accountId uint64, toEntity any) error
|
||||
|
||||
// 获取所有子节点id
|
||||
GetChildren(uiPath string) []entity.Resource
|
||||
|
||||
// 根据uiPath右匹配更新所有相关类资源
|
||||
UpdateByUiPathLike(resource *entity.Resource)
|
||||
UpdateByUiPathLike(resource *entity.Resource) error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user