正在显示
4 个修改的文件
包含
38 行增加
和
5 行删除
@@ -42,11 +42,10 @@ type UserMenu struct { | @@ -42,11 +42,10 @@ type UserMenu struct { | ||
42 | Category string `json:"category"` | 42 | Category string `json:"category"` |
43 | Code string `json:"code"` | 43 | Code string `json:"code"` |
44 | Icon string `json:"icon"` | 44 | Icon string `json:"icon"` |
45 | - MenuAlias string `json:"menuAlias"` | ||
46 | - MenuID int `json:"menuId"` | 45 | + MenuID string `json:"menuId"` |
47 | MenuName string `json:"menuName"` | 46 | MenuName string `json:"menuName"` |
48 | MenuType string `json:"menuType"` | 47 | MenuType string `json:"menuType"` |
49 | - ParentID int `json:"parentId"` | 48 | + ParentID string `json:"parentId"` |
50 | Remark string `json:"remark"` | 49 | Remark string `json:"remark"` |
51 | Sort int `json:"sort"` | 50 | Sort int `json:"sort"` |
52 | } | 51 | } |
@@ -29,11 +29,29 @@ func (usersService *UsersService) CompanyUserGet(companyUserGetQuery *query.Comp | @@ -29,11 +29,29 @@ func (usersService *UsersService) CompanyUserGet(companyUserGetQuery *query.Comp | ||
29 | if err != nil { | 29 | if err != nil { |
30 | return nil, err | 30 | return nil, err |
31 | } | 31 | } |
32 | - creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{}) | 32 | + resultMenu, err := creationUserGateway.UserAccessMenus(allied_creation_user.ReqUserAccessMenus{}) |
33 | + if err != nil { | ||
34 | + return nil, err | ||
35 | + } | ||
33 | var ( | 36 | var ( |
34 | usersOrg []dto.UserOrg | 37 | usersOrg []dto.UserOrg |
35 | userRole []dto.UserRole | 38 | userRole []dto.UserRole |
39 | + userMenu []dto.UserMenu | ||
36 | ) | 40 | ) |
41 | + | ||
42 | + for _, v := range resultMenu.Menus { | ||
43 | + userMenu = append(userMenu, dto.UserMenu{ | ||
44 | + Category: v.Category, | ||
45 | + Code: v.Code, | ||
46 | + Icon: v.Icon, | ||
47 | + MenuName: v.MenuName, | ||
48 | + MenuID: strconv.Itoa(v.MenuID), | ||
49 | + MenuType: v.MenuType, | ||
50 | + ParentID: strconv.Itoa(v.ParentID), | ||
51 | + Remark: v.Remark, | ||
52 | + Sort: v.Sort, | ||
53 | + }) | ||
54 | + } | ||
37 | for _, v := range resultUser.UserOrg { | 55 | for _, v := range resultUser.UserOrg { |
38 | usersOrg = append(usersOrg, dto.UserOrg{ | 56 | usersOrg = append(usersOrg, dto.UserOrg{ |
39 | OrgID: strconv.Itoa(v.OrgID), | 57 | OrgID: strconv.Itoa(v.OrgID), |
@@ -65,6 +83,7 @@ func (usersService *UsersService) CompanyUserGet(companyUserGetQuery *query.Comp | @@ -65,6 +83,7 @@ func (usersService *UsersService) CompanyUserGet(companyUserGetQuery *query.Comp | ||
65 | 83 | ||
66 | datas := map[string]interface{}{ | 84 | datas := map[string]interface{}{ |
67 | "user": user, | 85 | "user": user, |
86 | + "userMenu": userMenu, | ||
68 | } | 87 | } |
69 | return datas, err | 88 | return datas, err |
70 | } | 89 | } |
@@ -282,5 +282,20 @@ type ( | @@ -282,5 +282,20 @@ type ( | ||
282 | UserId int `json:"userId"` | 282 | UserId int `json:"userId"` |
283 | } | 283 | } |
284 | DataUserAccessMenus struct { | 284 | DataUserAccessMenus struct { |
285 | + Menus []struct { | ||
286 | + AccessCode string `json:"accessCode"` | ||
287 | + Category string `json:"category"` | ||
288 | + Code string `json:"code"` | ||
289 | + EnableStatus int `json:"enableStatus"` | ||
290 | + Icon string `json:"icon"` | ||
291 | + IsPublish int `json:"isPublish"` | ||
292 | + MenuID int `json:"menuId"` | ||
293 | + MenuName string `json:"menuName"` | ||
294 | + MenuType string `json:"menuType"` | ||
295 | + ParentID int `json:"parentId"` | ||
296 | + ParentPath string `json:"parentPath"` | ||
297 | + Remark string `json:"remark"` | ||
298 | + Sort int `json:"sort"` | ||
299 | + } `json:"menus"` | ||
285 | } | 300 | } |
286 | ) | 301 | ) |
-
请 注册 或 登录 后发表评论