数据库操作优化,优化系统管理后台代码生成逻辑

This commit is contained in:
hoteas
2022-08-17 16:02:36 +08:00
parent 4097a44e58
commit e8b391b0a2
2 changed files with 4 additions and 8 deletions
+2 -1
View File
@@ -13,6 +13,7 @@ import (
"reflect"
"sort"
"strings"
"time"
)
type HoTimeDB struct {
@@ -314,7 +315,7 @@ func (that *HoTimeDB) InitDb(err ...*Error) *Error {
e := that.SlaveDB.Ping()
that.LastErr.SetError(e)
}
that.DB.SetConnMaxLifetime(time.Second)
return that.LastErr
}