diff --git a/src/bean/entity/system_menu.go b/src/bean/entity/system_menu.go index a22664c9ee35f4ba1cb4490d9748f578b78fd963..076c2c90fafe65d65ff30d72170bc140b7e0c244 100644 --- a/src/bean/entity/system_menu.go +++ b/src/bean/entity/system_menu.go @@ -22,4 +22,5 @@ type SystemMenu struct { Source string `json:"source"` NewWindow int `json:"new_window"` Remark string `json:"remark"` + SystemType string `json:"system_type"` //系统类型 } diff --git a/src/bean/vo/request/system_menu.go b/src/bean/vo/request/system_menu.go index 9dd4de564a4bfa45c3df1f804c4afacea421cbf6..27f6cccb4b1125a5dce279b5ca2399b393215786 100644 --- a/src/bean/vo/request/system_menu.go +++ b/src/bean/vo/request/system_menu.go @@ -13,6 +13,7 @@ type SystemMenuReq struct { Source string `json:"source"` NewWindow int `json:"new_window"` Remark string `json:"remark"` + SystemType string `json:"system_type"` //系统类型 } // 组织排序参数 diff --git a/src/bean/vo/response/system_menu.go b/src/bean/vo/response/system_menu.go index 1bacca226ce870f3e4c66c50d73c8ac7da8789be..750f4103eea924212a33a540ae150a4cd621df63 100644 --- a/src/bean/vo/response/system_menu.go +++ b/src/bean/vo/response/system_menu.go @@ -22,6 +22,7 @@ type SystemMenuTree struct { MenuId string `json:"menu_id" xorm:"menu_id"` //菜单id PMenuId string `json:"p_menu_id" xorm:"p_menu_id"` //上级菜单id Source string `json:"source" xorm:"source"` //源 + SystemType string `json:"system_type"` //系统类型 Child []SystemMenuTree `xorm:"-"` } @@ -38,5 +39,6 @@ type SystemMenuTreePer struct { Icon string `json:"icon" xorm:"menu_logo"` //菜单图标 MenuId string `json:"menu_id" xorm:"menu_id"` //菜单id PMenuId string `json:"p_menu_id" xorm:"p_menu_id"` //上级菜单id + SystemType string `json:"system_type"` //系统类型 Children []SystemMenuTreePer `json:"children" xorm:"-"` } diff --git a/src/service/system_menu.go b/src/service/system_menu.go index f8ce2f613aa3a78c75f2351c3799bd7c386a3e4d..29fe1e8a4db03a4a32a6015ea3ebd63190c9082e 100644 --- a/src/service/system_menu.go +++ b/src/service/system_menu.go @@ -235,7 +235,7 @@ func (s *SystemMenu) UpdateMenu(id int64, input request.SystemMenuReq) error { if !has { return resp.DbSelectError.ErrorDetail(errors.New("该菜单不存在")) } - if _, err := db.Table("system_menu").Cols("menu_name, dict_group_id, state, menu_url, menu_logo, updated_by, updated_time", "source", "new_window", "remark"). + if _, err := db.Table("system_menu").Cols("menu_name, dict_group_id, state, menu_url, menu_logo, updated_by, updated_time", "source", "new_window", "remark", "system_type"). Where("id = ?", id).Update(&entity.SystemMenu{ MenuName: input.MenuName, DictGroupId: input.DictGroupId, @@ -247,6 +247,7 @@ func (s *SystemMenu) UpdateMenu(id int64, input request.SystemMenuReq) error { Source: input.Source, NewWindow: input.NewWindow, Remark: input.Remark, + SystemType: input.SystemType, }); err != nil { conf.Logger.Error("更新菜单失败", zap.Error(err)) return resp.DbUpdateError.ErrorDetail(err) @@ -348,6 +349,7 @@ func (s *SystemMenu) GetInputToEntityMenu(input request.SystemMenuReq) (res enti Source: input.Source, NewWindow: input.NewWindow, Remark: input.Remark, + SystemType: input.SystemType, } return res }