优化发货接口对接流程

This commit is contained in:
yml2213
2026-07-30 23:44:50 +08:00
parent a16e518b6c
commit ee956e2e01
14 changed files with 428 additions and 141 deletions
+3 -2
View File
@@ -49,9 +49,10 @@ func Setup(h *Handlers) *gin.Engine {
api.POST("/auth/login", h.Auth.Login)
api.POST("/auth/register", h.Auth.Register)
// 原上游发货接口:路径、鉴权和字段保持不变
// 源头侧接口:上游发货平台查询订单并回传发货结果
sourceOpen := api.Group("/open/v1")
sourceOpen.Use(middleware.SourceOpenAuth(middleware.SourceOpenAuthConfig{
DB: h.OpenDB,
APIKey: h.OpenAPIKey,
APISecret: h.OpenAPISecret,
SkewSeconds: h.OpenSignSkew,
@@ -62,7 +63,7 @@ func Setup(h *Handlers) *gin.Engine {
sourceOpen.POST("/orders/ship-notify", h.SourceOpen.ShipNotify)
}
// 户侧通用开放接口:独立 API 客户端 + HMAC 签名。
// 户侧接口:每个商户独立 API 客户端 + HMAC 签名。
clientOpen := api.Group("/client/v1")
clientOpen.Use(middleware.OpenAuth(middleware.OpenAuthConfig{
DB: h.OpenDB,