优化充值产品定价逻辑,确保手机端和PC端显示的价格一致

This commit is contained in:
RockYang
2024-10-17 18:15:25 +08:00
parent 43c507c597
commit d5eeeea764
11 changed files with 40 additions and 593 deletions

View File

@@ -17,7 +17,6 @@ import (
"geekai/store/model"
"geekai/utils"
"geekai/utils/resp"
"github.com/shopspring/decimal"
"net/http"
"sync"
"time"
@@ -105,7 +104,7 @@ func (h *PaymentHandler) Pay(c *gin.Context) {
return
}
amount, _ := decimal.NewFromFloat(product.Price).Sub(decimal.NewFromFloat(product.Discount)).Float64()
amount := product.Discount
var payURL, returnURL, notifyURL string
switch data.PayWay {
case "alipay":