diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 6e9c776..eedd6eb 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,12 +1,7 @@ - - - - - - + @@ -132,6 +134,7 @@ - \ No newline at end of file diff --git a/application.go b/application.go index c0d0480..604cfe6 100644 --- a/application.go +++ b/application.go @@ -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) }