改配置名字
This commit is contained in:
@@ -2,11 +2,12 @@ package config
|
||||
|
||||
import (
|
||||
"fusenapi/server/shopping-cart-confirmation/internal/types"
|
||||
|
||||
"github.com/zeromicro/go-zero/rest"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
rest.RestConf
|
||||
DataSource string
|
||||
Auth types.Auth
|
||||
SourceMysql string
|
||||
Auth types.Auth
|
||||
}
|
||||
|
||||
@@ -5,9 +5,10 @@ import (
|
||||
"fmt"
|
||||
"fusenapi/initalize"
|
||||
"fusenapi/server/shopping-cart-confirmation/internal/config"
|
||||
"net/http"
|
||||
|
||||
"github.com/golang-jwt/jwt"
|
||||
"gorm.io/gorm"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
type ServiceContext struct {
|
||||
@@ -20,7 +21,7 @@ func NewServiceContext(c config.Config) *ServiceContext {
|
||||
|
||||
return &ServiceContext{
|
||||
Config: c,
|
||||
MysqlConn: initalize.InitMysql(c.DataSource),
|
||||
MysqlConn: initalize.InitMysql(c.SourceMysql),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user