Selaa lähdekoodia

update

tags/v3.9.4
DengBiao 2 vuotta sitten
vanhempi
commit
2c7b125f0b
2 muutettua tiedostoa jossa 11 lisäystä ja 1 poistoa
  1. +1
    -1
      db/db_integral_release_interposition_user_amount.go
  2. +10
    -0
      rule/integral_release_settlement.go

+ 1
- 1
db/db_integral_release_interposition_user_amount.go Näytä tiedosto

@@ -83,7 +83,7 @@ func IntegralReleaseInterpositionUserAmountGetOneByParams(session *xorm.Session,
return nil, zhios_order_relate_logx.Error(err) return nil, zhios_order_relate_logx.Error(err)
} }
if has == false { if has == false {
return nil, errors.New("未查询到相应的 integral_release_interposition_user_amount 记录")
return nil, errors.New("not found")
} }
return &m, nil return &m, nil
} }


+ 10
- 0
rule/integral_release_settlement.go Näytä tiedosto

@@ -282,9 +282,19 @@ func DealIntegralReleaseInterpositionUserAmount(session *xorm.Session, req md.De
"key": "uid", "key": "uid",
"value": req.Uid, "value": req.Uid,
}) })
if err != nil && err.Error() == "not found" {
userAmount = &model.IntegralReleaseInterpositionUserAmount{
Uid: req.Uid,
CoinId: req.CoinId,
CreateAt: now,
UpdateAt: now,
}
_, err = db.IntegralReleaseInterpositionUserAmountInsert(session, userAmount)
}
if err != nil { if err != nil {
return err return err
} }

totalAmountValue := decimal.NewFromFloat(zhios_order_relate_utils.StrToFloat64(userAmount.TotalAmount)) totalAmountValue := decimal.NewFromFloat(zhios_order_relate_utils.StrToFloat64(userAmount.TotalAmount))
waiteAmountValue := decimal.NewFromFloat(zhios_order_relate_utils.StrToFloat64(userAmount.WaiteAmount)) waiteAmountValue := decimal.NewFromFloat(zhios_order_relate_utils.StrToFloat64(userAmount.WaiteAmount))
alreadyAmountValue := decimal.NewFromFloat(zhios_order_relate_utils.StrToFloat64(userAmount.AlreadyAmount)) alreadyAmountValue := decimal.NewFromFloat(zhios_order_relate_utils.StrToFloat64(userAmount.AlreadyAmount))


Ladataan…
Peruuta
Tallenna