Merge branch 'dev-lwl/iap' into test

This commit is contained in:
lwl0608 2024-06-15 13:19:24 +08:00
commit f27c0b2de9
2 changed files with 7 additions and 1 deletions

View File

@ -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 {

View File

@ -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)
}