Browse Source

update

master
dengbiao 3 weeks ago
parent
commit
5562d8e023
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      rule/user_wallet.go

+ 2
- 2
rule/user_wallet.go View File

@@ -48,10 +48,10 @@ func DealUserWallet(session *xorm.Session, req md.DealUserWalletReq) (err error)

if req.Direction == "add" {
userWalletFlow.Direction = 1
userWalletFlow.AfterAmount = beforeAmountValue.Add(amountValue).RoundFloor(8).String()
userWalletFlow.AfterAmount = beforeAmountValue.Add(amountValue).RoundFloor(2).String()
} else if req.Direction == "sub" {
userWalletFlow.Direction = 2
userWalletFlow.AfterAmount = beforeAmountValue.Sub(amountValue).RoundFloor(8).String()
userWalletFlow.AfterAmount = beforeAmountValue.Sub(amountValue).RoundFloor(2).String()
if zhios_order_relate_utils.StrToFloat64(userWalletFlow.AfterAmount) < 0 {
return errors.New("用户钱包余额不足")
}


Loading…
Cancel
Save