实际支付金额fix

This commit is contained in:
wolter 2024-08-09 17:51:44 +08:00
parent a54212d38c
commit 413f312ef6
3 changed files with 3 additions and 0 deletions

View File

@ -5,6 +5,7 @@ type OrdersResp struct {
OrderType int `json:"order_type"` OrderType int `json:"order_type"`
OutTradeNo string `json:"out_trade_no"` OutTradeNo string `json:"out_trade_no"`
Amount int `json:"amount"` Amount int `json:"amount"`
PayerTotal int `json:"payer_total"`
Desc string `json:"desc"` Desc string `json:"desc"`
Status int `json:"status"` Status int `json:"status"`

View File

@ -27,6 +27,7 @@ func NewOrdersResp(db *ordersmodel.Orders) *api.OrdersResp {
Status: db.Status, Status: db.Status,
OrderType: db.OrderType, OrderType: db.OrderType,
Amount: db.Amount, Amount: db.Amount,
PayerTotal: db.PayerTotal,
Desc: db.Desc, Desc: db.Desc,
CreateTime: db.CreateTime.Format("2006-01-02 15:04:05"), CreateTime: db.CreateTime.Format("2006-01-02 15:04:05"),
} }

View File

@ -151,6 +151,7 @@ func (o *OrderNotify) updateOrder() {
return return
} }
o.order.Status = o.Status o.order.Status = o.Status
o.order.PayerTotal = o.ActualAmount
o.Code = services.OrderUpdate(o.order, "status") o.Code = services.OrderUpdate(o.order, "status")
return return
} }