refactor(types):将日期时间类型提取到公共的类型定义包中。

This commit is contained in:
徐涛
2023-06-05 21:53:05 +08:00
parent c22e7e7dc0
commit 85f4d04a7f
11 changed files with 285 additions and 126 deletions

View File

@@ -4,8 +4,8 @@ import (
"electricity_bill_calc/cache"
"electricity_bill_calc/global"
"electricity_bill_calc/logger"
"electricity_bill_calc/model"
"electricity_bill_calc/repository"
"electricity_bill_calc/types"
"fmt"
"github.com/shopspring/decimal"
@@ -21,7 +21,7 @@ var ChargeService = &_ChargeService{
}
// 创建一条新的用户充值记录,同时更新用户的服务期限
func (cs _ChargeService) RecordUserCharge(uid string, fee, discount, amount *decimal.Decimal, chargeTo model.Date, extendExpriationIgnoringSettle bool) (bool, error) {
func (cs _ChargeService) RecordUserCharge(uid string, fee, discount, amount *decimal.Decimal, chargeTo types.Date, extendExpriationIgnoringSettle bool) (bool, error) {
cs.log.Info(
"创建一条新的用户充值记录。",
zap.String("uid", uid),