Browse Source

Merge pull request #576 from flipped-aurora/gva_gormv2_dev

修复了closeTab不生效的bug
main v2.4.3
奇淼(piexlmax 3 years ago
committed by GitHub
parent
commit
5232830c87
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      server/service/sys_base_menu.go
  2. 2
      server/source/authority_menu.go

1
server/service/sys_base_menu.go

@ -40,6 +40,7 @@ func UpdateBaseMenu(menu model.SysBaseMenu) (err error) {
var oldMenu model.SysBaseMenu var oldMenu model.SysBaseMenu
upDateMap := make(map[string]interface{}) upDateMap := make(map[string]interface{})
upDateMap["keep_alive"] = menu.KeepAlive upDateMap["keep_alive"] = menu.KeepAlive
upDateMap["close_tab"] = menu.CloseTab
upDateMap["default_menu"] = menu.DefaultMenu upDateMap["default_menu"] = menu.DefaultMenu
upDateMap["parent_id"] = menu.ParentId upDateMap["parent_id"] = menu.ParentId
upDateMap["path"] = menu.Path upDateMap["path"] = menu.Path

2
server/source/authority_menu.go

@ -17,7 +17,7 @@ func (a *authorityMenu) Init() error {
color.Danger.Println("\n[Mysql] --> authority_menu 视图已存在!") color.Danger.Println("\n[Mysql] --> authority_menu 视图已存在!")
return nil return nil
} }
if err := global.GVA_DB.Exec("CREATE ALGORITHM = UNDEFINED SQL SECURITY DEFINER VIEW `authority_menu` AS select `sys_base_menus`.`id` AS `id`,`sys_base_menus`.`created_at` AS `created_at`, `sys_base_menus`.`updated_at` AS `updated_at`, `sys_base_menus`.`deleted_at` AS `deleted_at`, `sys_base_menus`.`menu_level` AS `menu_level`,`sys_base_menus`.`parent_id` AS `parent_id`,`sys_base_menus`.`path` AS `path`,`sys_base_menus`.`name` AS `name`,`sys_base_menus`.`hidden` AS `hidden`,`sys_base_menus`.`component` AS `component`, `sys_base_menus`.`title` AS `title`,`sys_base_menus`.`icon` AS `icon`,`sys_base_menus`.`sort` AS `sort`,`sys_authority_menus`.`sys_authority_authority_id` AS `authority_id`,`sys_authority_menus`.`sys_base_menu_id` AS `menu_id`,`sys_base_menus`.`keep_alive` AS `keep_alive`,`sys_base_menus`.`default_menu` AS `default_menu` from (`sys_authority_menus` join `sys_base_menus` on ((`sys_authority_menus`.`sys_base_menu_id` = `sys_base_menus`.`id`)))").Error; err != nil {
if err := global.GVA_DB.Exec("CREATE ALGORITHM = UNDEFINED SQL SECURITY DEFINER VIEW `authority_menu` AS select `sys_base_menus`.`id` AS `id`,`sys_base_menus`.`created_at` AS `created_at`, `sys_base_menus`.`updated_at` AS `updated_at`, `sys_base_menus`.`deleted_at` AS `deleted_at`, `sys_base_menus`.`menu_level` AS `menu_level`,`sys_base_menus`.`parent_id` AS `parent_id`,`sys_base_menus`.`path` AS `path`,`sys_base_menus`.`name` AS `name`,`sys_base_menus`.`hidden` AS `hidden`,`sys_base_menus`.`component` AS `component`, `sys_base_menus`.`title` AS `title`,`sys_base_menus`.`icon` AS `icon`,`sys_base_menus`.`sort` AS `sort`,`sys_authority_menus`.`sys_authority_authority_id` AS `authority_id`,`sys_authority_menus`.`sys_base_menu_id` AS `menu_id`,`sys_base_menus`.`keep_alive` AS `keep_alive`,`sys_base_menus`.`close_tab` AS `close_tab`,`sys_base_menus`.`default_menu` AS `default_menu` from (`sys_authority_menus` join `sys_base_menus` on ((`sys_authority_menus`.`sys_base_menu_id` = `sys_base_menus`.`id`)))").Error; err != nil {
return err return err
} }
color.Info.Println("\n[Mysql] --> authority_menu 视图创建成功!") color.Info.Println("\n[Mysql] --> authority_menu 视图创建成功!")

Loading…
Cancel
Save