huangjiajun vor 11 Monaten
Ursprung
Commit
d366bff5d3
2 geänderte Dateien mit 9 neuen und 4 gelöschten Zeilen
  1. +5
    -0
      md/appreciation.go
  2. +4
    -4
      rule/appreciation.go

+ 5
- 0
md/appreciation.go Datei anzeigen

@@ -14,3 +14,8 @@ type DealWithdrawalAndDestroyResp struct {
DestroyValue float64 `json:"destroy_value"`
RefluxValue float64 `json:"reflux_value"`
}
type DealWithdrawalFeeResp struct {
WithdrawalCommissionFee float64 `json:"withdrawal_commission_fee"` //提现手续费
WithdrawalDestroyFee float64 `json:"withdrawal_destroy_fee"` //提现销毁增值积分比例
WithdrawalRefluxFee float64 `json:"withdrawal_reflux_fee"` //提现回流增值积分比例
}

+ 4
- 4
rule/appreciation.go Datei anzeigen

@@ -54,10 +54,10 @@ func DealTransferIn(session *xorm.Session, amount float64) (err error, value flo
}

// DealWithdrawalAndDestroy 处理给用户提现
func DealWithdrawalAndDestroy(session *xorm.Session, transferOut float64) (err error, resp md.DealWithdrawalAndDestroyResp) {
transferOutValue := decimal.NewFromFloat(transferOut).Mul(md.WithdrawalCommissionFee)
destroyValue := decimal.NewFromFloat(transferOut).Mul(md.WithdrawalDestroyFee)
refluxValue := decimal.NewFromFloat(transferOut).Mul(md.WithdrawalRefluxFee)
func DealWithdrawalAndDestroy(session *xorm.Session, feeMap md.DealWithdrawalFeeResp, transferOut float64) (err error, resp md.DealWithdrawalAndDestroyResp) {
transferOutValue := decimal.NewFromFloat(transferOut).Mul(decimal.NewFromFloat(feeMap.WithdrawalCommissionFee))
destroyValue := decimal.NewFromFloat(transferOut).Mul(decimal.NewFromFloat(feeMap.WithdrawalDestroyFee))
refluxValue := decimal.NewFromFloat(transferOut).Mul(decimal.NewFromFloat(feeMap.WithdrawalRefluxFee))
err, nowValue := CalcAppreciationValue(session)
if err != nil {
return


Laden…
Abbrechen
Speichern