This commit is contained in:
邹宗楠
2024-09-09 17:35:43 +08:00
parent 4e7cb8491f
commit 9495f29043

View File

@@ -126,9 +126,9 @@ func (c *PurchaseHandler) onAfsOrderMsg(msg *ebaiapi.CallbackMsg) (retVal *ebaia
var earningPrice int64 = 0 var earningPrice int64 = 0
for _, v := range goodsOrder.Skus { for _, v := range goodsOrder.Skus {
if goodsOrder.EarningType == model.EarningTypeQuote { if goodsOrder.EarningType == model.EarningTypeQuote {
earningPrice += v.ShopPrice earningPrice += v.ShopPrice * int64(v.Count)
} else { } else {
earningPrice += v.SalePrice earningPrice += v.SalePrice * int64(v.Count)
} }
} }
goodsOrder.EarningPrice = earningPrice goodsOrder.EarningPrice = earningPrice