From 573ad1b147131cf9b90f13032291f6b5b7ed407b Mon Sep 17 00:00:00 2001 From: zhoujunyao Date: Wed, 4 Feb 2026 10:21:41 +0800 Subject: [PATCH] fix: antomReq.OutTradeNo = uuidV4.String() --- pkg/service/bundle/pay.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkg/service/bundle/pay.go b/pkg/service/bundle/pay.go index ba16b4c..d46e64e 100644 --- a/pkg/service/bundle/pay.go +++ b/pkg/service/bundle/pay.go @@ -15,6 +15,7 @@ import ( "fonchain-fiee/pkg/service" "fonchain-fiee/pkg/service/bundle/common" bundleModel "fonchain-fiee/pkg/service/bundle/model" + uuid "github.com/satori/go.uuid" "io" "math" "net/http" @@ -448,7 +449,14 @@ func CreateAntomPay(c *gin.Context) { antomReq.Domain = "fiee" antomReq.Amount = req.ProductAllPrice antomReq.Currency = req.ProductPriceCurrency - antomReq.OutTradeNo = req.OutTradeNo + //antomReq.OutTradeNo = req.OutTradeNo + uuidV4, err := uuid.NewV4() + if err != nil { + fmt.Println("生成错误", err) + service.Error(c, errors.New("订单编号生成失败")) + return + } + antomReq.OutTradeNo = uuidV4.String() antomReq.ReturnUrl = req.SuccessUrl //调用微服务获取支付地址