示例#1
0
文件: payment.go 项目: yonglehou/go2o
// 应用余额支付
func (this *paymentOrderImpl) getBalanceDiscountFee(acc member.IAccount) float32 {
	if this._value.FinalFee <= 0 {
		return 0
	}
	acv := acc.GetValue()
	if acv.Balance >= this._value.FinalFee {
		return this._value.FinalFee
	} else {
		return acv.Balance
	}
	return 0
}
示例#2
0
文件: order.go 项目: yonglehou/go2o
// 应用余额支付
func (o *orderImpl) getBalanceDiscountFee(acc member.IAccount) float32 {
	if o._value.FinalAmount <= 0 {
		return 0
	}
	acv := acc.GetValue()
	if acv.Balance >= o._value.FinalAmount {
		return o._value.FinalAmount
	} else {
		return acv.Balance
	}
	return 0
}