|
|
@@ -366,7 +366,7 @@ func DealUserCoinForIntegralRelease(session *xorm.Session, req md.DealUserCoinRe |
|
|
|
return err |
|
|
|
} |
|
|
|
coinAmountValue := decimal.NewFromFloat(zhios_order_relate_utils.StrToFloat64(coinAmount)) |
|
|
|
amountValue := decimal.NewFromFloat(req.Amount).RoundFloor(4) |
|
|
|
amountValue := decimal.NewFromFloat(req.Amount).RoundFloor(8) |
|
|
|
|
|
|
|
var userVirtualCoinFlow model.UserVirtualCoinFlow |
|
|
|
userVirtualCoinFlow.CoinId = req.CoinId |
|
|
@@ -380,10 +380,10 @@ func DealUserCoinForIntegralRelease(session *xorm.Session, req md.DealUserCoinRe |
|
|
|
userVirtualCoinFlow.CreateTime = now |
|
|
|
if req.Kind == "add" { |
|
|
|
userVirtualCoinFlow.Direction = 1 |
|
|
|
userVirtualCoinFlow.AfterAmout = coinAmountValue.Add(amountValue).RoundFloor(4).String() |
|
|
|
userVirtualCoinFlow.AfterAmout = coinAmountValue.Add(amountValue).RoundFloor(8).String() |
|
|
|
} else if req.Kind == "sub" { |
|
|
|
userVirtualCoinFlow.Direction = 2 |
|
|
|
userVirtualCoinFlow.AfterAmout = coinAmountValue.Sub(amountValue).RoundFloor(4).String() |
|
|
|
userVirtualCoinFlow.AfterAmout = coinAmountValue.Sub(amountValue).RoundFloor(8).String() |
|
|
|
} else { |
|
|
|
err = errors.New("错误的kind类型") |
|
|
|
return err |
|
|
@@ -447,7 +447,7 @@ func DealIntegralReleaseInterpositionUserAmount(session *xorm.Session, req md.De |
|
|
|
totalAmountValue := decimal.NewFromFloat(zhios_order_relate_utils.StrToFloat64(userAmount.TotalAmount)) |
|
|
|
waiteAmountValue := decimal.NewFromFloat(zhios_order_relate_utils.StrToFloat64(userAmount.WaiteAmount)) |
|
|
|
alreadyAmountValue := decimal.NewFromFloat(zhios_order_relate_utils.StrToFloat64(userAmount.AlreadyAmount)) |
|
|
|
amountValue := decimal.NewFromFloat(req.Amount).RoundFloor(4) |
|
|
|
amountValue := decimal.NewFromFloat(req.Amount).RoundFloor(8) |
|
|
|
|
|
|
|
var integralReleaseInterpositionUserFlow = model.IntegralReleaseInterpositionUserFlow{ |
|
|
|
Uid: req.Uid, |
|
|
|