forked from free-lancers/electricity_bill_calc_service
fix(charge):改进用户充值部分的查询错误。
This commit is contained in:
@@ -8,7 +8,6 @@ import (
|
||||
"electricity_bill_calc/types"
|
||||
"fmt"
|
||||
|
||||
"github.com/shopspring/decimal"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
@@ -21,13 +20,13 @@ var ChargeService = &_ChargeService{
|
||||
}
|
||||
|
||||
// 创建一条新的用户充值记录,同时更新用户的服务期限
|
||||
func (cs _ChargeService) RecordUserCharge(uid string, fee, discount, amount *decimal.Decimal, chargeTo types.Date, extendExpriationIgnoringSettle bool) (bool, error) {
|
||||
func (cs _ChargeService) RecordUserCharge(uid string, fee, discount, amount *float64, chargeTo types.Date, extendExpriationIgnoringSettle bool) (bool, error) {
|
||||
cs.log.Info(
|
||||
"创建一条新的用户充值记录。",
|
||||
zap.String("uid", uid),
|
||||
logger.DecimalFieldp("fee", fee),
|
||||
logger.DecimalFieldp("discount", discount),
|
||||
logger.DecimalFieldp("amount", amount),
|
||||
zap.Float64p("fee", fee),
|
||||
zap.Float64p("discount", discount),
|
||||
zap.Float64p("amount", amount),
|
||||
logger.DateField("chargeTo", chargeTo),
|
||||
zap.Bool("extendExpriationIgnoringSettle", extendExpriationIgnoringSettle),
|
||||
)
|
||||
|
Reference in New Issue
Block a user