优化订单支付

This commit is contained in:
yml
2026-06-08 23:56:25 +08:00
parent 870ea72996
commit a2a0489158
20 changed files with 884 additions and 5 deletions
@@ -3,11 +3,11 @@ package wallet
import (
"crypto/rand"
"fmt"
"math"
"time"
"hfb_sys/backend/internal/model"
"hfb_sys/backend/internal/timeutil"
"hfb_sys/backend/pkg/money"
"gorm.io/gorm"
"gorm.io/gorm/clause"
@@ -260,7 +260,7 @@ func applyEntry(account *model.WalletAccount, entry Entry) (float64, error) {
}
func roundWalletMoney(value float64) float64 {
return math.Round(value)
return money.Round(value)
}
func toAccountDTO(account model.WalletAccount) *AccountDTO {