fix(notify): 临时修复 multi 回调时核销金额为空导致的推送下游问题
This commit is contained in:
parent
5e6d810773
commit
2e3dd99115
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue