报价单接近完成

This commit is contained in:
eson
2023-06-27 18:09:56 +08:00
parent 116171dddd
commit 13c5a45a5e
15 changed files with 1274 additions and 39 deletions

View File

@@ -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),
}
}