修复初始化时跳出的两个bug提示(不影响使用)

This commit is contained in:
qimiao
2021-09-03 10:26:29 +08:00
parent ff9ab4b0b6
commit c94c6c49a8
11 changed files with 89 additions and 86 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ type authorityMenu struct{}
//@author: [SliverHorn](https://github.com/SliverHorn)
//@description: authority_menu 视图数据初始化
func (a *authorityMenu) Init() error {
if global.GVA_DB.Find(&[]system.SysMenu{}).RowsAffected > 0 {
if global.GVA_DB.Migrator().HasTable("authority_menu") && global.GVA_DB.Find(&[]system.SysMenu{}).RowsAffected > 0 {
color.Danger.Println("\n[Mysql] --> authority_menu 视图已存在!")
return nil
}