feat: rbac迁移完成,并已部署至dev服务器
This commit is contained in:
@@ -3,10 +3,11 @@ package logic
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
sysModel "sundynix-micro-go/app/system/model"
|
||||
"sundynix-micro-go/app/system/rpc/internal/svc"
|
||||
"sundynix-micro-go/app/system/rpc/system"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type GetMenuListLogic struct {
|
||||
@@ -22,9 +23,11 @@ func NewGetMenuListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetMe
|
||||
func (l *GetMenuListLogic) GetMenuList(in *system.IdReq) (*system.MenuListResp, error) {
|
||||
var menus []sysModel.SundynixMenu
|
||||
if err := l.svcCtx.DB.Order("sort ASC").Find(&menus).Error; err != nil {
|
||||
l.Errorf("[GetMenuList] ❌ 查询菜单失败: %v", err)
|
||||
return nil, fmt.Errorf("查询菜单列表失败")
|
||||
}
|
||||
tree := buildMenuTree(menus, "")
|
||||
l.Infof("[GetMenuList] 查询到菜单数量: %d", len(menus))
|
||||
tree := buildMenuTree(menus, "0")
|
||||
return &system.MenuListResp{Menus: tree}, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user