feat: 增加后端权限控制

This commit is contained in:
meilin.huang
2021-06-09 16:58:57 +08:00
parent 9074e7637e
commit 3ebc3ee14d
39 changed files with 4463 additions and 3913 deletions

View File

@@ -29,7 +29,7 @@ func GormMysql() *gorm.DB {
SingularTable: true,
}, Logger: logger.Default.LogMode(logger.Silent)}
if db, err := gorm.Open(mysql.New(mysqlConfig), ormConfig); err != nil {
global.Log.Panic("连接mysql失败! [%s]")
global.Log.Panicf("连接mysql失败! [%s]", err.Error())
return nil
} else {
sqlDB, _ := db.DB()