feat: 钱包兼容非货币形式显示额度

This commit is contained in:
CaIon 2024-04-04 18:20:38 +08:00
parent bc9cfa5da0
commit 3db64afc7f

View File

@ -111,9 +111,13 @@ func RequestEpay(c *gin.Context) {
c.JSON(200, gin.H{"message": "error", "data": "拉起支付失败"})
return
}
amount := req.Amount
if !common.DisplayInCurrencyEnabled {
amount = amount / int(common.QuotaPerUnit)
}
topUp := &model.TopUp{
UserId: id,
Amount: req.Amount,
Amount: amount,
Money: payMoney,
TradeNo: "A" + tradeNo,
CreateTime: time.Now().Unix(),