diff --git a/internal/service/notify.go b/internal/service/notify.go index c8f7429..18347db 100644 --- a/internal/service/notify.go +++ b/internal/service/notify.go @@ -68,11 +68,14 @@ func (srv *NotifyService) Notify(ctx http.Context) error { }) } + headerJson, _ := json.Marshal(headers) + + log.Warnf("微信回调通知[%s],consumer处理失败:%s\nheaders:%s\nbody:%s\n解析数据:%+v", mchId, err.Error(), headerJson, string(bodyBytes), bizData) + ip := helper.GetClientIP(ctx) if err = srv.VoucherBiz.WechatNotifyConsumer(ctx, ip, bizData); err != nil { - headerJson, _ := json.Marshal(headers) log.Errorf("微信回调通知[%s],consumer处理失败:%s\nheaders:%s\nbody:%s\n解析数据:%+v", mchId, err.Error(), headerJson, string(bodyBytes), bizData) if errors.Is(err, gorm.ErrRecordNotFound) {