This commit is contained in:
2025-12-09 18:55:28 +08:00
parent 8d00d67540
commit c23ab8338b
209 changed files with 5445 additions and 3963 deletions

View File

@@ -32,7 +32,7 @@ func NewGetRoleDetailLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Get
func (l *GetRoleDetailLogic) GetRoleDetail(req *types.GetRoleDetailReq) (resp *types.GetRoleDetailResp, err error) {
// 使用MapReduceVoid并发获取角色信息和菜单ID
var role *model.AdminRole
var menuIds []int64
var menuIds []string
var mutex sync.Mutex
var wg sync.WaitGroup
@@ -62,7 +62,7 @@ func (l *GetRoleDetailLogic) GetRoleDetail(req *types.GetRoleDetailReq) (resp *t
return
}
mutex.Lock()
menuIds = lo.Map(menus, func(item *model.AdminRoleMenu, _ int) int64 {
menuIds = lo.Map(menus, func(item *model.AdminRoleMenu, _ int) string {
return item.MenuId
})
mutex.Unlock()