From 60a9eba32191a58770e8e9ce3eea8b5379eb6d9c Mon Sep 17 00:00:00 2001 From: lwl0608 Date: Sat, 15 Jun 2024 13:19:10 +0800 Subject: [PATCH] fix --- api/proto/vas/proto/op.go | 1 + app/mix/service/vasservice.go | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/api/proto/vas/proto/op.go b/api/proto/vas/proto/op.go index 7d0a0542..ede2cb14 100644 --- a/api/proto/vas/proto/op.go +++ b/api/proto/vas/proto/op.go @@ -113,6 +113,7 @@ type OpOrderVO struct { Ct int64 `json:"ct"` ProductName string `json:"product_name"` RefundType string `json:"refund_type"` + PayType string `json:"pay_type"` } type OpOrderListData struct { diff --git a/app/mix/service/vasservice.go b/app/mix/service/vasservice.go index 584a2ef6..7bb57017 100644 --- a/app/mix/service/vasservice.go +++ b/app/mix/service/vasservice.go @@ -324,7 +324,7 @@ func (s *Service) chListCharge(ctx *gin.Context, chList []*dbstruct.ConsumeHisto if len(item.Change) > 0 { newChange += oldChange[:1] } - newChange += fmt.Sprintf("%d金币", chDB.GetChange()) + newChange += fmt.Sprintf("%d金币", util.AbsInt64(chDB.GetChange())) item.Change = newChange } @@ -750,6 +750,11 @@ func (s *Service) OpOrderList(ctx *gin.Context, req *vasproto.OpOrderListReq) (l Ct: o.GetCt(), ProductName: dbstruct.ProductIdDescMap[o.GetProductId()], RefundType: "退现金", + PayType: o.GetPayType(), + } + if o.GetPayType() == vasproto.PayTypeCoin { + item.Coins = o.GetPayAmount() + item.Money = 0 } list = append(list, item) }