Kaynağa Gözat

update

tags/v3.9.4
DengBiao 1 yıl önce
ebeveyn
işleme
2c7b125f0b
2 değiştirilmiş dosya ile 11 ekleme ve 1 silme
  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 Dosyayı Görüntüle

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


+ 10
- 0
rule/integral_release_settlement.go Dosyayı Görüntüle

@@ -282,9 +282,19 @@ func DealIntegralReleaseInterpositionUserAmount(session *xorm.Session, req md.De
"key": "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 {
return err
}

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))


Yükleniyor…
İptal
Kaydet