v1.1
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user