切换主体

This commit is contained in:
ziming 2026-03-26 10:57:16 +08:00
parent 6a06e1fed4
commit 5051e2e744
1 changed files with 6 additions and 4 deletions

View File

@ -55,11 +55,11 @@ func (srv *NotifyService) Notify(ctx http.Context) error {
})
}
headerJson, _ := json.Marshal(headers)
log.Warnf("微信回调通知[%s],数据,headers:%s,body:%s", mchId, string(headerJson), string(bodyBytes))
response, 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())
return ctx.JSON(http2.StatusNetworkAuthenticationRequired, map[string]string{
"code": "FAIL",
"message": err.Error(),
@ -72,7 +72,9 @@ func (srv *NotifyService) Notify(ctx http.Context) error {
if err = srv.VoucherBiz.WechatNotifyConsumer(ctx, ip, response); err != nil {
log.Errorf("微信回调通知[%s],处理失败,headers:%s,body:%s,err:%s", mchId, headerJson, string(bodyBytes), err.Error())
headerJson, _ := json.Marshal(headers)
log.Errorf("微信回调通知[%s],Consumer处理失败,headers:%s,body:%s,err:%s", mchId, headerJson, string(bodyBytes), err.Error())
return ctx.JSON(http2.StatusBadRequest, map[string]string{
"code": "FAIL",
"message": err.Error(),