This commit is contained in:
李子铭 2025-03-14 11:43:31 +08:00
parent 2ca8e988e7
commit a8ccd564c7
1 changed files with 11 additions and 1 deletions

View File

@ -2,6 +2,8 @@ package service
import (
"context"
"github.com/go-kratos/kratos/v2/log"
"time"
"voucher/internal/biz"
"voucher/internal/biz/mixrepos"
"voucher/internal/biz/wechatrepo"
@ -31,5 +33,13 @@ func NewVoucherService(
func (s *VoucherService) OrderNotice(ctx context.Context) error {
return s.VoucherBiz.OrderNotice(ctx)
start := time.Now()
err := s.VoucherBiz.OrderNotice(ctx)
end := time.Now()
elapsed := end.Sub(start)
log.Warnf("订单定时通知,开始执行时间%s,执行结束时间%s,代码块执行耗时: %s", start.Format(time.DateTime), end.Format(time.DateTime), elapsed)
return err
}