报价单接近完成
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"fmt"
|
||||
"fusenapi/server/backend/internal/config"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"fusenapi/initalize"
|
||||
"fusenapi/model/gmodel"
|
||||
@@ -21,11 +22,11 @@ type ServiceContext struct {
|
||||
}
|
||||
|
||||
func NewServiceContext(c config.Config) *ServiceContext {
|
||||
|
||||
db := initalize.InitMysql(c.SourceMysql).Set("gorm:slow_query_time", time.Second*15)
|
||||
return &ServiceContext{
|
||||
Config: c,
|
||||
MysqlConn: initalize.InitMysql(c.SourceMysql),
|
||||
AllModels: gmodel.NewAllModels(initalize.InitMysql(c.SourceMysql)),
|
||||
AllModels: gmodel.NewAllModels(db),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user