作者 tangxuhui

更新用户模块

{"D:\\workspaceGo\\src\\allied-creation-gateway\\pkg\\port\\beego":1627544330050447000}
\ No newline at end of file
{"D:\\workspaceGo\\src\\allied-creation-gateway\\pkg\\port\\beego":1627550783476629200}
\ No newline at end of file
... ...
... ... @@ -42,11 +42,10 @@ type UserMenu struct {
Category string `json:"category"`
Code string `json:"code"`
Icon string `json:"icon"`
MenuAlias string `json:"menuAlias"`
MenuID int `json:"menuId"`
MenuID string `json:"menuId"`
MenuName string `json:"menuName"`
MenuType string `json:"menuType"`
ParentID int `json:"parentId"`
ParentID string `json:"parentId"`
Remark string `json:"remark"`
Sort int `json:"sort"`
}
... ...
... ... @@ -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
}
... ...
... ... @@ -282,5 +282,20 @@ type (
UserId int `json:"userId"`
}
DataUserAccessMenus struct {
Menus []struct {
AccessCode string `json:"accessCode"`
Category string `json:"category"`
Code string `json:"code"`
EnableStatus int `json:"enableStatus"`
Icon string `json:"icon"`
IsPublish int `json:"isPublish"`
MenuID int `json:"menuId"`
MenuName string `json:"menuName"`
MenuType string `json:"menuType"`
ParentID int `json:"parentId"`
ParentPath string `json:"parentPath"`
Remark string `json:"remark"`
Sort int `json:"sort"`
} `json:"menus"`
}
)
... ...