fix: 按实际纯币结算金额计算保险费用

This commit is contained in:
yml2213
2026-11-05 19:19:12 +08:00
parent 53574236ef
commit b884d01855
14 changed files with 184 additions and 25 deletions
+1 -1
View File
@@ -406,7 +406,7 @@ func calculateCheckoutSettlement(order model.RentalOrder, consumableAmountCent i
// 可完结时租客实际承担的租金向金额;有 shortfall 时仍展示完整应付便于协商
actualRentAmountCent := actualBuyerRentCent
ownerRentIncomeCent := actualOwnerRentCent
insuranceFeeCent := calculateInsuranceFeeCent(ownerRentIncomeCent, order.InsuranceFeeBps)
insuranceFeeCent := calculateInsuranceFeeCent(usedOwnerCoinPriceCent, order.InsuranceFeeBps)
ownerRentIncomeCent = maxCent(ownerRentIncomeCent-insuranceFeeCent, 0)
platformFeeCent := maxCent(actualRentAmountCent-ownerRentIncomeCent, 0)
depositCompensationCent := damageAppliedCent