diff --git a/controller/topup.go b/controller/topup.go index 37f6c883..e938a150 100644 --- a/controller/topup.go +++ b/controller/topup.go @@ -205,13 +205,13 @@ func EpayNotify(c *gin.Context) { } //user, _ := model.GetUserById(topUp.UserId, false) //user.Quota += topUp.Amount * 500000 - err = model.IncreaseUserQuota(topUp.UserId, topUp.Amount*500000) + err = model.IncreaseUserQuota(topUp.UserId, topUp.Amount*int(common.QuotaPerUnit)) if err != nil { log.Printf("易支付回调更新用户失败: %v", topUp) return } log.Printf("易支付回调更新用户成功 %v", topUp) - model.RecordLog(topUp.UserId, model.LogTypeTopup, fmt.Sprintf("使用在线充值成功,充值金额: %v,支付金额:%f", common.LogQuota(topUp.Amount*500000), topUp.Money)) + model.RecordLog(topUp.UserId, model.LogTypeTopup, fmt.Sprintf("使用在线充值成功,充值金额: %v,支付金额:%f", common.LogQuota(topUp.Amount*int(common.QuotaPerUnit)), topUp.Money)) } } else { log.Printf("易支付异常回调: %v", verifyInfo)