Merge branch 'develop' of gitee.com:fusenpack/fusenapi into develop

This commit is contained in:
laodaming 2023-06-19 10:34:25 +08:00
commit 56a3c05eae
7 changed files with 13 additions and 8 deletions

View File

@ -1,7 +1,7 @@
Name: {{.serviceName}}
Host: {{.host}}
Port: {{.port}}
SourceMysql: ""
DataSource: ""
Auth:
AccessSecret: fusen2023
AccessExpire: 604800

View File

@ -5,6 +5,7 @@ import (
"fusenapi/server/home-user-auth/internal/config"
"fusenapi/server/home-user-auth/internal/handler"
"fusenapi/server/home-user-auth/internal/svc"
"log"
"testing"
"github.com/474420502/requests"
@ -17,6 +18,7 @@ var cnf config.Config
var gserver *rest.Server
func init() {
log.SetFlags(log.Llongfile)
gserver = GetTestServer()
}

View File

@ -1,7 +1,7 @@
Name: product
Host: 0.0.0.0
Port: 8889
DataSource: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest
SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest
Auth:
AccessSecret: fusen2023
AccessExpire: 60

View File

@ -5,9 +5,10 @@ import (
"fmt"
"fusenapi/initalize"
"fusenapi/server/product/internal/config"
"net/http"
"github.com/golang-jwt/jwt"
"gorm.io/gorm"
"net/http"
)
type ServiceContext struct {

View File

@ -1,7 +1,7 @@
Name: shopping-cart-confirmation
Host: 0.0.0.0
Port: 8892
DataSource: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest
SourceMysql: fusentest:XErSYmLELKMnf3Dh@tcp(110.41.19.98:3306)/fusentest
Auth:
AccessSecret: fusen2023
AccessExpire: 604800

View File

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

View File

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