切换主体

This commit is contained in:
ziming 2026-03-26 13:46:36 +08:00
parent 3f3bcbab8e
commit 886d140ceb
1 changed files with 3 additions and 3 deletions

View File

@ -57,7 +57,7 @@ func (srv *NotifyService) Notify(ctx http.Context) error {
})
}
response, err := srv.WechatBiz.CallBack(ctx, mchId, &headers, bodyBytes)
bizData, err := srv.WechatBiz.CallBack(ctx, mchId, &headers, bodyBytes)
if err != nil {
headerJson, _ := json.Marshal(headers)
log.Errorf("微信回调通知[%s],CallBack处理失败,headers:%s,body:%s,err:%s", mchId, headerJson, string(bodyBytes), err.Error())
@ -70,10 +70,10 @@ func (srv *NotifyService) Notify(ctx http.Context) error {
ip := helper.GetClientIP(ctx)
if err = srv.VoucherBiz.WechatNotifyConsumer(ctx, ip, response); err != nil {
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), response)
log.Errorf("微信回调通知[%s],consumer处理失败:%s\nheaders:%s\nbody:%s\n解析数据:%+v", mchId, err.Error(), headerJson, string(bodyBytes), bizData)
if errors.Is(err, gorm.ErrRecordNotFound) {
return ctx.JSON(http2.StatusOK, nil)