complete make role tree

This commit is contained in:
yanghao05
2023-02-05 14:23:57 +08:00
parent ee631b9714
commit afeffe2ed6
7 changed files with 68 additions and 2 deletions

View File

@@ -12,6 +12,7 @@ import (
type RoleController interface {
GetByFilter(*gin.Context, dto.RoleRequestFilter, request.PageFilter) (*response.PageResponse[*models.SysRole], error)
Tree(*gin.Context) ([]*dto.RoleTree, error)
Create(*gin.Context, dto.RoleRequestForm) error
Delete(*gin.Context, int) error
UpdateByID(*gin.Context, int, dto.RoleRequestForm) error
@@ -36,6 +37,9 @@ func (c *roleControllerImpl) GetByFilter(
) (*response.PageResponse[*models.SysRole], error) {
return c.roleSvc.GetByFilter(ctx, filter, page)
}
func (c *roleControllerImpl) Tree(ctx *gin.Context) ([]*dto.RoleTree, error) {
return c.roleSvc.Tree(ctx)
}
func (c *roleControllerImpl) Create(ctx *gin.Context, req dto.RoleRequestForm) error {
_, err := c.roleSvc.Create(ctx, req)