From e7a5e1947200adff299d0058716647bee36d5c40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A1=80=E5=B0=BC=E9=BE=9F?= <365252428@qq.com> Date: Thu, 3 Jul 2025 14:02:25 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=89=8B=E7=BB=AD?= =?UTF-8?q?=E8=B4=B9=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/dao/orderRecordsDao.go | 1 + internal/model/bundle_order_records.go | 1 + pb/bundle.proto | 2 +- pb/bundle/bundle.pb.go | 8 ++++---- pb/bundle/bundle.validator.pb.go | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/internal/dao/orderRecordsDao.go b/internal/dao/orderRecordsDao.go index 1d18b49..9cd462b 100644 --- a/internal/dao/orderRecordsDao.go +++ b/internal/dao/orderRecordsDao.go @@ -477,6 +477,7 @@ func OrderRecordsListV2(req *bundle.OrderRecordsRequestV2) (res *bundle.OrderRec OrderAddNo: orderAddNo, Amount: amount, CurrencyType: int32(sub.CurrencyType), + HandlingFee: sub.HandlingFee, OrderAddCreateAt: sub.CreatedAt.Format("2006-01-02 15:04:05"), AddPayStatus: int32(sub.PaymentStatus), Contract: sub.SignContract, diff --git a/internal/model/bundle_order_records.go b/internal/model/bundle_order_records.go index 4729346..f1c86e3 100644 --- a/internal/model/bundle_order_records.go +++ b/internal/model/bundle_order_records.go @@ -65,6 +65,7 @@ type BundleOrderValueAdd struct { Snapshot string `gorm:"column:snapshot;comment:快照" json:"snapshot"` //订单快照 CheckoutSessionId string `json:"checkoutSessionId" gorm:"column:checkout_session_id;type:varchar(1024);default:null;comment:checkoutSessionId"` CheckoutSessionUrl string `json:"checkoutSessionUrl" gorm:"column:checkout_session_url;type:varchar(1024);default:null;comment:checkoutSessionUrl"` + HandlingFee string `gorm:"column:handling_fee;comment:手续费" json:"handlingFee"` } // 财务确认状态 diff --git a/pb/bundle.proto b/pb/bundle.proto index 7f023c4..053162b 100644 --- a/pb/bundle.proto +++ b/pb/bundle.proto @@ -197,7 +197,7 @@ message OrderAddBundleRecordInfo{ float amount = 2; float settlementAmount = 3; int32 currencyType = 4; - float handlingFee = 5; + string handlingFee = 5; float exchangeRate = 6; string orderAddCreateAt = 7; int32 addPayStatus = 8; diff --git a/pb/bundle/bundle.pb.go b/pb/bundle/bundle.pb.go index 59ee8f7..02fd4ec 100644 --- a/pb/bundle/bundle.pb.go +++ b/pb/bundle/bundle.pb.go @@ -1284,7 +1284,7 @@ type OrderAddBundleRecordInfo struct { Amount float32 `protobuf:"fixed32,2,opt,name=amount,proto3" json:"amount"` SettlementAmount float32 `protobuf:"fixed32,3,opt,name=settlementAmount,proto3" json:"settlementAmount"` CurrencyType int32 `protobuf:"varint,4,opt,name=currencyType,proto3" json:"currencyType"` - HandlingFee float32 `protobuf:"fixed32,5,opt,name=handlingFee,proto3" json:"handlingFee"` + HandlingFee string `protobuf:"bytes,5,opt,name=handlingFee,proto3" json:"handlingFee"` ExchangeRate float32 `protobuf:"fixed32,6,opt,name=exchangeRate,proto3" json:"exchangeRate"` OrderAddCreateAt string `protobuf:"bytes,7,opt,name=orderAddCreateAt,proto3" json:"orderAddCreateAt"` AddPayStatus int32 `protobuf:"varint,8,opt,name=addPayStatus,proto3" json:"addPayStatus"` @@ -1354,11 +1354,11 @@ func (x *OrderAddBundleRecordInfo) GetCurrencyType() int32 { return 0 } -func (x *OrderAddBundleRecordInfo) GetHandlingFee() float32 { +func (x *OrderAddBundleRecordInfo) GetHandlingFee() string { if x != nil { return x.HandlingFee } - return 0 + return "" } func (x *OrderAddBundleRecordInfo) GetExchangeRate() float32 { @@ -6812,7 +6812,7 @@ var file_pb_bundle_proto_rawDesc = []byte{ 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x68, 0x61, - 0x6e, 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x46, 0x65, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, 0x52, + 0x6e, 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x46, 0x65, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x46, 0x65, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0c, 0x65, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x61, 0x74, 0x65, diff --git a/pb/bundle/bundle.validator.pb.go b/pb/bundle/bundle.validator.pb.go index 26c2ade..e429c89 100644 --- a/pb/bundle/bundle.validator.pb.go +++ b/pb/bundle/bundle.validator.pb.go @@ -7,8 +7,8 @@ import ( fmt "fmt" math "math" proto "github.com/golang/protobuf/proto" - _ "google.golang.org/protobuf/types/descriptorpb" _ "github.com/mwitkow/go-proto-validators" + _ "google.golang.org/protobuf/types/descriptorpb" github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators" ) From e9f12cd0eb7c7c056f129686416836deab1f198c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A1=80=E5=B0=BC=E9=BE=9F?= <365252428@qq.com> Date: Thu, 3 Jul 2025 14:28:09 +0800 Subject: [PATCH 2/2] 111 --- internal/dao/orderRecordsDao.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/dao/orderRecordsDao.go b/internal/dao/orderRecordsDao.go index 9cd462b..46b6ace 100644 --- a/internal/dao/orderRecordsDao.go +++ b/internal/dao/orderRecordsDao.go @@ -477,7 +477,7 @@ func OrderRecordsListV2(req *bundle.OrderRecordsRequestV2) (res *bundle.OrderRec OrderAddNo: orderAddNo, Amount: amount, CurrencyType: int32(sub.CurrencyType), - HandlingFee: sub.HandlingFee, + HandlingFee: sub.HandlingFee, //手续费 OrderAddCreateAt: sub.CreatedAt.Format("2006-01-02 15:04:05"), AddPayStatus: int32(sub.PaymentStatus), Contract: sub.SignContract,