解决冲突
This commit is contained in:
parent
d635811b5f
commit
42a965ab39
5
go.mod
5
go.mod
|
@ -8,11 +8,8 @@ require (
|
|||
github.com/bwmarrin/snowflake v0.3.0
|
||||
github.com/golang-jwt/jwt v3.2.2+incompatible
|
||||
github.com/google/uuid v1.3.0
|
||||
<<<<<<< HEAD
|
||||
github.com/hashicorp/raft v1.5.0
|
||||
=======
|
||||
github.com/gorilla/websocket v1.5.0
|
||||
>>>>>>> d843fff73d7ba5d4e14a5d86281d5166f04cb303
|
||||
github.com/hashicorp/raft v1.5.0
|
||||
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
|
||||
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e
|
||||
github.com/stripe/stripe-go/v74 v74.26.0
|
||||
|
|
|
@ -15,7 +15,7 @@ func UserOrderDeleteHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
var req types.UserOrderDeleteReq
|
||||
userinfo, err := basic.RequestParse(w, r, svcCtx, &req)
|
||||
userinfo, err := basic.RequestParse(w, r, svcCtx.SharedState, &req)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ func OrderPaymentIntentHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
var req types.OrderPaymentIntentReq
|
||||
userinfo, err := basic.RequestParse(w, r, svcCtx, &req)
|
||||
userinfo, err := basic.RequestParse(w, r, svcCtx.SharedState, &req)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
|
|
@ -3,7 +3,9 @@ package svc
|
|||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"fusenapi/fsm"
|
||||
"fusenapi/server/pay/internal/config"
|
||||
"fusenapi/utils/autoconfig"
|
||||
"net/http"
|
||||
|
||||
"fusenapi/initalize"
|
||||
|
@ -14,18 +16,22 @@ import (
|
|||
)
|
||||
|
||||
type ServiceContext struct {
|
||||
Config config.Config
|
||||
Config config.Config
|
||||
SharedState *fsm.StateCluster
|
||||
|
||||
MysqlConn *gorm.DB
|
||||
AllModels *gmodel.AllModelsGen
|
||||
}
|
||||
|
||||
func NewServiceContext(c config.Config) *ServiceContext {
|
||||
conn := initalize.InitMysql(c.SourceMysql)
|
||||
StateServer := fsm.StartNode(c.Name, fmt.Sprintf("%s:%d", c.Host, c.Port-2000), autoconfig.AutoGetAllServerConfig(), conn)
|
||||
|
||||
return &ServiceContext{
|
||||
Config: c,
|
||||
MysqlConn: initalize.InitMysql(c.SourceMysql),
|
||||
AllModels: gmodel.NewAllModels(initalize.InitMysql(c.SourceMysql)),
|
||||
Config: c,
|
||||
MysqlConn: conn,
|
||||
SharedState: StateServer,
|
||||
AllModels: gmodel.NewAllModels(initalize.InitMysql(c.SourceMysql)),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ func GetProductTemplateTagsHandler(svcCtx *svc.ServiceContext) http.HandlerFunc
|
|||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
var req types.GetProductTemplateTagsReq
|
||||
userinfo, err := basic.RequestParse(w, r, svcCtx, &req)
|
||||
userinfo, err := basic.RequestParse(w, r, svcCtx.SharedState, &req)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
|
|
@ -3,7 +3,9 @@ package svc
|
|||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"fusenapi/fsm"
|
||||
"fusenapi/server/product-template-tag/internal/config"
|
||||
"fusenapi/utils/autoconfig"
|
||||
"net/http"
|
||||
|
||||
"fusenapi/initalize"
|
||||
|
@ -14,18 +16,22 @@ import (
|
|||
)
|
||||
|
||||
type ServiceContext struct {
|
||||
Config config.Config
|
||||
Config config.Config
|
||||
SharedState *fsm.StateCluster
|
||||
|
||||
MysqlConn *gorm.DB
|
||||
AllModels *gmodel.AllModelsGen
|
||||
}
|
||||
|
||||
func NewServiceContext(c config.Config) *ServiceContext {
|
||||
conn := initalize.InitMysql(c.SourceMysql)
|
||||
StateServer := fsm.StartNode(c.Name, fmt.Sprintf("%s:%d", c.Host, c.Port-2000), autoconfig.AutoGetAllServerConfig(), conn)
|
||||
|
||||
return &ServiceContext{
|
||||
Config: c,
|
||||
MysqlConn: initalize.InitMysql(c.SourceMysql),
|
||||
AllModels: gmodel.NewAllModels(initalize.InitMysql(c.SourceMysql)),
|
||||
Config: c,
|
||||
MysqlConn: conn,
|
||||
SharedState: StateServer,
|
||||
AllModels: gmodel.NewAllModels(initalize.InitMysql(c.SourceMysql)),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
func RenderNotifyHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
var req types.RenderNotifyReq
|
||||
_, err := basic.RequestParse(w, r, svcCtx, &req)
|
||||
_, err := basic.RequestParse(w, r, svcCtx.SharedState, &req)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
|
|
@ -3,7 +3,9 @@ package svc
|
|||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"fusenapi/fsm"
|
||||
"fusenapi/server/websocket/internal/config"
|
||||
"fusenapi/utils/autoconfig"
|
||||
"net/http"
|
||||
|
||||
"fusenapi/initalize"
|
||||
|
@ -14,21 +16,24 @@ import (
|
|||
)
|
||||
|
||||
type ServiceContext struct {
|
||||
Config config.Config
|
||||
Config config.Config
|
||||
SharedState *fsm.StateCluster
|
||||
|
||||
MysqlConn *gorm.DB
|
||||
AllModels *gmodel.AllModelsGen
|
||||
}
|
||||
|
||||
func NewServiceContext(c config.Config) *ServiceContext {
|
||||
conn := initalize.InitMysql(c.SourceMysql)
|
||||
StateServer := fsm.StartNode(c.Name, fmt.Sprintf("%s:%d", c.Host, c.Port-2000), autoconfig.AutoGetAllServerConfig(), conn)
|
||||
|
||||
return &ServiceContext{
|
||||
Config: c,
|
||||
MysqlConn: initalize.InitMysql(c.SourceMysql),
|
||||
AllModels: gmodel.NewAllModels(initalize.InitMysql(c.SourceMysql)),
|
||||
Config: c,
|
||||
MysqlConn: conn,
|
||||
SharedState: StateServer,
|
||||
AllModels: gmodel.NewAllModels(initalize.InitMysql(c.SourceMysql)),
|
||||
}
|
||||
}
|
||||
|
||||
func (svcCtx *ServiceContext) ParseJwtToken(r *http.Request) (jwt.MapClaims, error) {
|
||||
AuthKey := r.Header.Get("Authorization")
|
||||
if AuthKey == "" {
|
||||
|
|
|
@ -13,17 +13,7 @@ service home-user-auth {
|
|||
|
||||
// @handler UserRegisterHandler
|
||||
// post /api/user/register(RequestUserRegister) returns (response);
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
|
||||
@handler UserLoginHandler
|
||||
post /api/user/login(RequestUserLogin) returns (response);
|
||||
|
||||
@handler AcceptCookieHandler
|
||||
post /api/user/accept-cookie(request) returns (response);
|
||||
|
||||
>>>>>>> d843fff73d7ba5d4e14a5d86281d5166f04cb303
|
||||
@handler UserFontsHandler
|
||||
get /api/user/fonts(request) returns (response);
|
||||
|
||||
|
@ -53,17 +43,7 @@ service home-user-auth {
|
|||
|
||||
@handler UserOderDeleteHandler
|
||||
post /api/user/order-delete(RequestOrderId) returns (response);
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
|
||||
@handler UserGoogleLoginHandler
|
||||
get /api/user/oauth2/login/google(RequestGoogleLogin) returns (response);
|
||||
|
||||
@handler UserEmailRegisterHandler
|
||||
get /api/user/oauth2/login/register(RequestEmailRegister) returns (response);
|
||||
|
||||
>>>>>>> d843fff73d7ba5d4e14a5d86281d5166f04cb303
|
||||
//订单列表
|
||||
@handler UserOrderListHandler
|
||||
get /api/user/order-list (UserOrderListReq) returns (response);
|
||||
|
|
Loading…
Reference in New Issue
Block a user