Merge pull request 'fix(notify): 临时修复 multi 回调时核销金额为空导致的推送下游问题' (#1) from fix/fzy/notify into pro

Reviewed-on: #1
This commit is contained in:
fuzhongyun 2026-04-27 18:49:04 +08:00
commit b5b07a4d79
1 changed files with 8 additions and 2 deletions

View File

@ -5,8 +5,6 @@ import (
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
"github.com/go-kratos/kratos/v2/log"
"gorm.io/gorm"
v1 "voucher/api/v1" v1 "voucher/api/v1"
"voucher/internal/biz/bo" "voucher/internal/biz/bo"
"voucher/internal/biz/cmb" "voucher/internal/biz/cmb"
@ -16,6 +14,9 @@ import (
"voucher/internal/conf" "voucher/internal/conf"
"voucher/internal/data" "voucher/internal/data"
"voucher/internal/pkg/lock" "voucher/internal/pkg/lock"
"github.com/go-kratos/kratos/v2/log"
"gorm.io/gorm"
) )
type MultiBiz struct { 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 { 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) nl, request, err := biz.nlCreate(ctx, req, mnd, order)
if err != nil { if err != nil {