直接换货流程
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 8m28s

This commit is contained in:
Break
2026-06-03 16:55:32 +08:00
parent 46ede81aef
commit 5f57429fb0
13 changed files with 718 additions and 167 deletions

View File

@@ -7,6 +7,7 @@ import (
"github.com/break/junhong_cmp_fiber/pkg/auth"
"github.com/break/junhong_cmp_fiber/pkg/constants"
"github.com/break/junhong_cmp_fiber/pkg/errors"
pkgmiddleware "github.com/break/junhong_cmp_fiber/pkg/middleware"
"github.com/gofiber/fiber/v2"
"github.com/redis/go-redis/v9"
"go.uber.org/zap"
@@ -97,6 +98,9 @@ func (m *PersonalAuthMiddleware) Authenticate() fiber.Handler {
c.Locals("customer_asset_type", claims.AssetType)
c.Locals("customer_asset_id", claims.AssetID)
c.Locals("skip_owner_filter", true)
c.SetUserContext(pkgmiddleware.SetUserContext(c.UserContext(), &pkgmiddleware.UserContextInfo{
CustomerID: claims.CustomerID,
}))
m.logger.Debug("个人客户认证成功",
zap.Uint("customer_id", claims.CustomerID),