opt: 调整import注入和回滚带别名无法识别的bug

This commit is contained in:
pixelMax(奇淼
2024-07-24 16:48:35 +08:00
parent 1494bc9db3
commit e593ec604e
2 changed files with 2 additions and 4 deletions

View File

@@ -15,7 +15,6 @@ func RegisterApis(apis ...system.SysApi) {
}
global.GVA_DB.Find(&[]system.SysApi{}, "path in (?)", apiPaths).Count(&count)
if count > 0 {
fmt.Println("插件已安装或存在同名路由")
return
}
err := global.GVA_DB.Create(&apis).Error
@@ -34,7 +33,6 @@ func RegisterMenus(menus ...system.SysBaseMenu) {
}
global.GVA_DB.Find(&[]system.SysBaseMenu{}, "name in (?)", menuNames).Count(&count)
if count > 0 {
fmt.Println("插件已安装或存在同名菜单")
return
}
err := global.GVA_DB.Create(&parentMenu).Error