修复序列化代码
This commit is contained in:
@@ -3,22 +3,23 @@ package svc
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"fusenapi/initalize"
|
||||
"fusenapi/server/home-user-auth/internal/config"
|
||||
"net/http"
|
||||
|
||||
"github.com/golang-jwt/jwt"
|
||||
"github.com/zeromicro/go-zero/core/stores/sqlx"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type ServiceContext struct {
|
||||
Config config.Config
|
||||
MysqlConn sqlx.SqlConn
|
||||
MysqlConn *gorm.DB
|
||||
}
|
||||
|
||||
func NewServiceContext(c config.Config) *ServiceContext {
|
||||
return &ServiceContext{
|
||||
Config: c,
|
||||
MysqlConn: sqlx.NewMysql(c.SourceMysql),
|
||||
MysqlConn: initalize.InitMysql(c.SourceMysql),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user