优化流程

This commit is contained in:
2019-11-10 18:10:26 +08:00
parent 048c457303
commit 9070bd2fe7
2 changed files with 15 additions and 11 deletions
+3 -2
View File
@@ -163,8 +163,9 @@ func (this *Application) SetSession(short CacheIns, Long CacheIns) {
//默认配置缓存和session实现
func (this *Application) SetDefault(connect func(err ...*Error) *sql.DB) {
this.SetConfig()
this.connectDbFunc = connect
if this.connectDbFunc != nil {
if connect != nil {
this.connectDbFunc = connect
this.Db.SetConnect(this.connectDbFunc)
}