直接换货流程
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 8m28s

This commit is contained in:
Break
2026-06-03 16:55:32 +08:00
parent 46ede81aef
commit 5f57429fb0
13 changed files with 718 additions and 167 deletions

View File

@@ -5,6 +5,7 @@ import (
"github.com/break/junhong_cmp_fiber/internal/model/dto"
"github.com/break/junhong_cmp_fiber/internal/store/postgres"
"github.com/break/junhong_cmp_fiber/pkg/constants"
"github.com/break/junhong_cmp_fiber/pkg/errors"
"gorm.io/gorm"
)
@@ -145,12 +146,14 @@ func walletStatusText(status int) string {
// transactionTypeText 翻译交易类型文本
func transactionTypeText(transactionType string) string {
switch transactionType {
case "recharge":
case constants.AssetTransactionTypeRecharge:
return "充值"
case "deduct":
case constants.AssetTransactionTypeDeduct:
return "扣款"
case "refund":
case constants.AssetTransactionTypeRefund:
return "退款"
case constants.AssetTransactionTypeExchange:
return "换货迁移"
default:
return transactionType
}