正在显示
6 个修改的文件
包含
13 行增加
和
2 行删除
| @@ -26,6 +26,8 @@ type CreateMenuCommand struct { | @@ -26,6 +26,8 @@ type CreateMenuCommand struct { | ||
| 26 | IsPublish int `json:"isPublish" valid:"Required"` | 26 | IsPublish int `json:"isPublish" valid:"Required"` |
| 27 | // 启用状态(启用:1 禁用:2),默认启用 | 27 | // 启用状态(启用:1 禁用:2),默认启用 |
| 28 | EnableStatus int `json:"enableStatus" ` | 28 | EnableStatus int `json:"enableStatus" ` |
| 29 | + // 外链接(需要菜单跳转的时候使用) | ||
| 30 | + Link string `json:"link"` | ||
| 29 | } | 31 | } |
| 30 | 32 | ||
| 31 | func (createMenuCommand *CreateMenuCommand) Valid(validation *validation.Validation) { | 33 | func (createMenuCommand *CreateMenuCommand) Valid(validation *validation.Validation) { |
| @@ -29,6 +29,8 @@ type UpdateMenuCommand struct { | @@ -29,6 +29,8 @@ type UpdateMenuCommand struct { | ||
| 29 | IsPublish int `json:"isPublish,omitempty"` | 29 | IsPublish int `json:"isPublish,omitempty"` |
| 30 | // 启用状态(启用:1 禁用:2),默认启用 | 30 | // 启用状态(启用:1 禁用:2),默认启用 |
| 31 | EnableStatus int `json:"enableStatus"` | 31 | EnableStatus int `json:"enableStatus"` |
| 32 | + // 外链接(需要菜单跳转的时候使用) | ||
| 33 | + Link string `json:"link"` | ||
| 32 | } | 34 | } |
| 33 | 35 | ||
| 34 | func (updateMenuCommand *UpdateMenuCommand) Valid(validation *validation.Validation) { | 36 | func (updateMenuCommand *UpdateMenuCommand) Valid(validation *validation.Validation) { |
| @@ -34,6 +34,8 @@ type Menu struct { | @@ -34,6 +34,8 @@ type Menu struct { | ||
| 34 | //IsPublish int `json:"isPublish,omitempty"` | 34 | //IsPublish int `json:"isPublish,omitempty"` |
| 35 | // 启用状态(启用:1 禁用:2),默认启用 | 35 | // 启用状态(启用:1 禁用:2),默认启用 |
| 36 | EnableStatus int `json:"enableStatus,omitempty"` | 36 | EnableStatus int `json:"enableStatus,omitempty"` |
| 37 | + // 外链接(需要菜单跳转的时候使用) | ||
| 38 | + Link string `json:"link"` | ||
| 37 | } | 39 | } |
| 38 | 40 | ||
| 39 | func (dto *UserAccessMenuDto) LoadDto(menus []*domain.Menu) error { | 41 | func (dto *UserAccessMenuDto) LoadDto(menus []*domain.Menu) error { |
| @@ -49,6 +51,7 @@ func (dto *UserAccessMenuDto) LoadDto(menus []*domain.Menu) error { | @@ -49,6 +51,7 @@ func (dto *UserAccessMenuDto) LoadDto(menus []*domain.Menu) error { | ||
| 49 | Sort: v.Sort, | 51 | Sort: v.Sort, |
| 50 | EnableStatus: v.EnableStatus, | 52 | EnableStatus: v.EnableStatus, |
| 51 | ParentPath: v.ParentPath, | 53 | ParentPath: v.ParentPath, |
| 54 | + Link: v.Link, | ||
| 52 | }) | 55 | }) |
| 53 | } | 56 | } |
| 54 | 57 |
| @@ -66,11 +66,12 @@ type Menu struct { | @@ -66,11 +66,12 @@ type Menu struct { | ||
| 66 | Category string `json:"category,omitempty"` | 66 | Category string `json:"category,omitempty"` |
| 67 | // 路径节点路径("0,11,12,") | 67 | // 路径节点路径("0,11,12,") |
| 68 | ParentPath string `json:"parentPath,omitempty"` | 68 | ParentPath string `json:"parentPath,omitempty"` |
| 69 | - // 菜单是否公开状态,[1:显示],[2:隐藏],默认显示 | 69 | + // 菜单是否公开状态,[1:显示],[2:隐藏],默认显示 (移除不使用) |
| 70 | IsPublish int `json:"isPublish,omitempty"` | 70 | IsPublish int `json:"isPublish,omitempty"` |
| 71 | // 启用状态(启用:1 禁用:2),默认启用 | 71 | // 启用状态(启用:1 禁用:2),默认启用 |
| 72 | EnableStatus int `json:"enableStatus,omitempty"` | 72 | EnableStatus int `json:"enableStatus,omitempty"` |
| 73 | - | 73 | + // 外链接(需要菜单跳转的时候使用) |
| 74 | + Link string `json:"link"` | ||
| 74 | // 父级菜单名称 | 75 | // 父级菜单名称 |
| 75 | ParentMenuName string `json:"parentMenuName,omitempty"` | 76 | ParentMenuName string `json:"parentMenuName,omitempty"` |
| 76 | } | 77 | } |
| @@ -28,6 +28,8 @@ type Menu struct { | @@ -28,6 +28,8 @@ type Menu struct { | ||
| 28 | IsPublish int `comment:"菜单是否公开状态,[2:隐藏],[1:显示],默认显示"` | 28 | IsPublish int `comment:"菜单是否公开状态,[2:隐藏],[1:显示],默认显示"` |
| 29 | // 启用状态(启用:1 禁用:2),默认启用 | 29 | // 启用状态(启用:1 禁用:2),默认启用 |
| 30 | EnableStatus int `comment:"启用状态(启用:1 禁用:2),默认启用"` | 30 | EnableStatus int `comment:"启用状态(启用:1 禁用:2),默认启用"` |
| 31 | + // 外链接(需要菜单跳转的时候使用) | ||
| 32 | + Link string `json:"link"` | ||
| 31 | // 删除时间 | 33 | // 删除时间 |
| 32 | //DeletedAt time.Time `comment:"删除时间"` | 34 | //DeletedAt time.Time `comment:"删除时间"` |
| 33 | } | 35 | } |
| @@ -21,5 +21,6 @@ func TransformToMenuDomainModelFromPgModels(menuModel *models.Menu) (*domain.Men | @@ -21,5 +21,6 @@ func TransformToMenuDomainModelFromPgModels(menuModel *models.Menu) (*domain.Men | ||
| 21 | ParentPath: menuModel.ParentPath, | 21 | ParentPath: menuModel.ParentPath, |
| 22 | IsPublish: menuModel.IsPublish, | 22 | IsPublish: menuModel.IsPublish, |
| 23 | EnableStatus: menuModel.EnableStatus, | 23 | EnableStatus: menuModel.EnableStatus, |
| 24 | + Link: menuModel.Link, | ||
| 24 | }, nil | 25 | }, nil |
| 25 | } | 26 | } |
-
请 注册 或 登录 后发表评论