...
|
...
|
@@ -29,11 +29,29 @@ func (usersService *UsersService) CompanyUserGet(companyUserGetQuery *query.Comp |
|
|
if err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
|
creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{})
|
|
|
resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{})
|
|
|
if err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
|
var (
|
|
|
usersOrg []dto.UserOrg
|
|
|
userRole []dto.UserRole
|
|
|
userMenu []dto.UserMenu
|
|
|
)
|
|
|
|
|
|
for _, v := range resultMenu.Menus {
|
|
|
userMenu = append(userMenu, dto.UserMenu{
|
|
|
Category: v.Category,
|
|
|
Code: v.Code,
|
|
|
Icon: v.Icon,
|
|
|
MenuName: v.MenuName,
|
|
|
MenuID: strconv.Itoa(v.MenuID),
|
|
|
MenuType: v.MenuType,
|
|
|
ParentID: strconv.Itoa(v.ParentID),
|
|
|
Remark: v.Remark,
|
|
|
Sort: v.Sort,
|
|
|
})
|
|
|
}
|
|
|
for _, v := range resultUser.UserOrg {
|
|
|
usersOrg = append(usersOrg, dto.UserOrg{
|
|
|
OrgID: strconv.Itoa(v.OrgID),
|
...
|
...
|
@@ -65,6 +83,7 @@ func (usersService *UsersService) CompanyUserGet(companyUserGetQuery *query.Comp |
|
|
|
|
|
datas := map[string]interface{}{
|
|
|
"user": user,
|
|
|
"userMenu": userMenu,
|
|
|
}
|
|
|
return datas, err
|
|
|
}
|
...
|
...
|
|