From 2e3dd99115161df037fba705fb1ba8eb28e66853 Mon Sep 17 00:00:00 2001 From: fuzhongyun <15339891972@163.com> Date: Mon, 27 Apr 2026 18:23:09 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=88notify=EF=BC=89:=20=E4=B8=B4?= =?UTF-8?q?=E6=97=B6=E4=BF=AE=E5=A4=8D=20multi=20=E5=9B=9E=E8=B0=83?= =?UTF-8?q?=E6=97=B6=E6=A0=B8=E9=94=80=E9=87=91=E9=A2=9D=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E7=9A=84=E6=8E=A8=E9=80=81=E4=B8=8B=E6=B8=B8?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/biz/multi.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/internal/biz/multi.go b/internal/biz/multi.go index 1bef7ab..a6f4983 100644 --- a/internal/biz/multi.go +++ b/internal/biz/multi.go @@ -5,8 +5,6 @@ import ( "encoding/json" "errors" "fmt" - "github.com/go-kratos/kratos/v2/log" - "gorm.io/gorm" v1 "voucher/api/v1" "voucher/internal/biz/bo" "voucher/internal/biz/cmb" @@ -16,6 +14,9 @@ import ( "voucher/internal/conf" "voucher/internal/data" "voucher/internal/pkg/lock" + + "github.com/go-kratos/kratos/v2/log" + "gorm.io/gorm" ) type MultiBiz struct { @@ -149,6 +150,11 @@ func (biz *MultiBiz) RetryRunByMultiNotifyDataId(ctx context.Context, multiNotif } func (biz *MultiBiz) run(ctx context.Context, req *bo.WechatVoucherNotifyBo, mnd *bo.MultiNotifyDataBo, order *bo.OrderBo) error { + // 如果核销金额为空,不再推送下游 + if mnd.ConsumeAmount == 0 { + log.Warnf("[%s] multi notify log consume amount is 0,req:%+v", mnd.NotifyID, req) + return nil + } nl, request, err := biz.nlCreate(ctx, req, mnd, order) if err != nil {