fix version 1

This commit is contained in:
2026-09-22 21:15:34 +08:00
parent 9f86366638
commit d63d7e8b3a
277 changed files with 9959 additions and 1514 deletions

View File

@@ -10,7 +10,8 @@ import (
"bsm/full/module/ec/market/internal/password"
pb "bsm/full/module/ec/market/pb"
"git.apinb.com/bsm-sdk/core/crypto/encipher"
"git.apinb.com/bsm-sdk/core/crypto/token"
"git.apinb.com/bsm-sdk/core/env"
"git.apinb.com/bsm-sdk/core/errcode"
"gorm.io/gorm"
)
@@ -50,7 +51,8 @@ func Login(ctx context.Context, in *pb.LoginRequest) (reply *pb.LoginReply, err
Market_Identity: marketData.Identity,
}
token, err := encipher.GenerateTokenAes(marketData.ID, marketData.Identity, "", "", market, map[string]string{})
// 与接口侧 ParseMetaCtx 的 JWT 校验保持一致,使用 SDK 的签发函数
tokenStr, err := token.New(env.Runtime.JwtSecretKey).GenerateJwt(marketData.ID, marketData.Identity, "", "", market, map[string]string{})
if err != nil {
return nil, err
}
@@ -63,7 +65,7 @@ func Login(ctx context.Context, in *pb.LoginRequest) (reply *pb.LoginReply, err
}
return &pb.LoginReply{
Token: token,
Token: tokenStr,
Identity: marketData.Identity,
Name: marketData.Name,
Account: marketData.Account,