diff --git a/rule/integral_release_settlement.go b/rule/integral_release_settlement.go index d0854d3..c0cee63 100644 --- a/rule/integral_release_settlement.go +++ b/rule/integral_release_settlement.go @@ -468,6 +468,10 @@ func DealIntegralReleaseInterpositionUserAmount(session *xorm.Session, req md.De integralReleaseInterpositionUserFlow.BeforeAlreadyAmount = alreadyAmountValue.String() integralReleaseInterpositionUserFlow.AfterAlreadyAmount = alreadyAmountValue.String() } else if req.Kind == "sub" { + if zhios_order_relate_utils.StrToFloat64(waiteAmountValue.Sub(amountValue).String()) < 0 { //不够扣就把剩余的扣了 + amountValue = waiteAmountValue + req.Amount = zhios_order_relate_utils.StrToFloat64(waiteAmountValue.String()) + } integralReleaseInterpositionUserFlow.Kind = 2 integralReleaseInterpositionUserFlow.BeforeTotalAmount = totalAmountValue.String() integralReleaseInterpositionUserFlow.AfterTotalAmount = totalAmountValue.String()