repository

package
v0.0.61 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ButtonRepository

type ButtonRepository struct {
	*gorm.DB `inject:"database"`
}

func (*ButtonRepository) DeleteData

func (b *ButtonRepository) DeleteData(id int64) error

删除

func (*ButtonRepository) GetByComponent

func (b *ButtonRepository) GetByComponent(component string) ([]*domain.Button, error)

func (*ButtonRepository) GetByFid

func (b *ButtonRepository) GetByFid(fid int64) ([]*domain.Button, error)

func (*ButtonRepository) GetById

func (b *ButtonRepository) GetById(id int64) (*domain.Button, error)

func (*ButtonRepository) InsertData

func (b *ButtonRepository) InsertData(data *domain.Button) (bool, error)

新增

func (*ButtonRepository) List

func (a *ButtonRepository) List(name string, pageable query.Pageable) (counts int64, data []domain.Button)

func (*ButtonRepository) Show

func (b *ButtonRepository) Show(keyWords string, pageable query.Pageable) (totalCounts int64, temp []domain.Button)

查询(根据关键词模糊查询)

func (*ButtonRepository) UpdateData

func (b *ButtonRepository) UpdateData(data *domain.Button) (bool, error)

更新

type MenuRepository struct {
	*gorm.DB `inject:"database"`
}
func (a *MenuRepository) CreateMenu(data *domain.Menu) (bool, error)

新增

func (a *MenuRepository) DeleteData(id int64) (bool, error)

删除数据

func (a *MenuRepository) DeleteDataHook(menuId int64)

菜单主表数据删除,菜单关联的业务数据表同步删除

func (a *MenuRepository) GetByFid(fid int64) (data []*domain.Menu, err error)

通过fid查询子节点数据

func (a *MenuRepository) GetById(id int64) (data *domain.Menu, err error)

通过fid查询子节点数据

func (a *MenuRepository) GetByIds(ids []int64) (result []*domain.Menu)

根据IDS获取菜单信息

func (a *MenuRepository) GetMenuLevel(fid int64) (level int64)

获取菜单fid的节点深度

func (a *MenuRepository) GetSubNodeCount(id int64) (count int64)

根据id查询是否有子节点数据

func (a *MenuRepository) List(fid int64, title string, pageable query.Pageable) (counts int64, data []*domain.Menu)

查询

func (a *MenuRepository) ListWithButtons(fid int64, title string, pageable query.Pageable) (counts int64, data []*domain.Menu)

查询

func (a *MenuRepository) UpdateMenu(data *domain.Menu) (bool, error)

更新

type ModuleRepository

type ModuleRepository struct {
	*gorm.DB `inject:"database"`
}

func (*ModuleRepository) CreateModule

func (a *ModuleRepository) CreateModule(data *domain.Module) (bool, error)

新增

func (*ModuleRepository) DeleteData

func (a *ModuleRepository) DeleteData(id int64) (bool, error)

删除数据

func (*ModuleRepository) DeleteTenantModules

func (a *ModuleRepository) DeleteTenantModules(tenantId string)

func (*ModuleRepository) GetByFid

func (a *ModuleRepository) GetByFid(fid int64) (data []*domain.Module, err error)

通过fid查询子节点数据

func (*ModuleRepository) GetById

func (a *ModuleRepository) GetById(id int64) (data *domain.Module, err error)

通过fid查询子节点数据

func (*ModuleRepository) GetByIds

func (a *ModuleRepository) GetByIds(ids []int64) (result []*domain.Module, err error)

根据IDS获取菜单信息

func (*ModuleRepository) GetTenantModule

func (a *ModuleRepository) GetTenantModule(module, tenantId string) (*domain.Module, error)

func (*ModuleRepository) GetTenantModules

func (a *ModuleRepository) GetTenantModules(tenantId string) ([]*domain.Module, error)

func (*ModuleRepository) List

func (a *ModuleRepository) List(fid int64, title string, tenantId string, pageable query.Pageable) (counts int64, data []*domain.Module)

查询

func (*ModuleRepository) SetTenantModules

func (a *ModuleRepository) SetTenantModules(tenantId string, data []*domain.Module)

给角色分配系统菜单、按钮

func (*ModuleRepository) UpdateModule

func (a *ModuleRepository) UpdateModule(data *domain.Module) (bool, error)

更新

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL