切换主体

This commit is contained in:
ziming 2026-03-25 14:22:35 +08:00
parent 813dfe5ef0
commit ba4c95c7a6
2 changed files with 3 additions and 3 deletions

View File

@ -41,10 +41,10 @@ func NewHTTPServer(
// 启星(启星-蓝色兄弟立减金代配) /voucher/qixing/v1/notify // 启星(启星-蓝色兄弟立减金代配) /voucher/qixing/v1/notify
srv.Route("/voucher/").POST("qixing/v1/notify", tripartiteService.QiXingNotify) srv.Route("/voucher/").POST("qixing/v1/notify", tripartiteService.QiXingNotify)
// 通知url必须为公网可访问的URL必须为HTTPS不能携带参数 // 通知url必须为公网可访问的URL必须为HTTPS不能携带参数
// https://域名.cn/voucher/v1/notify/123456 123456为微信主体商户号 // https://域名.cn/voucher/v1/notify/123456 123456为微信主体商户号 /voucher/v1/notify/1100040695
// https://gateway.dev.cdlsxd.cn/voucher/v1/notify/123456 123456为微信主体商户号 测试环境 // https://gateway.dev.cdlsxd.cn/voucher/v1/notify/123456 123456为微信主体商户号 测试环境
// https://voucher.86698.cn/voucher/v1/notify/123456 123456为微信主体商户号 正式环境 // https://voucher.86698.cn/voucher/v1/notify/123456 123456为微信主体商户号 正式环境
srv.Route("/voucher/").POST("/notify/v1/{mch_id}", notifyService.Notify) srv.Route("/voucher/").POST("/v1/notify/{mch_id}", notifyService.Notify)
// 订单通知重试 -- 不健全 // 订单通知重试 -- 不健全
srv.Route("/voucher/").POST("orderNotifyRetry", cmb.OrderNotifyRetry) srv.Route("/voucher/").POST("orderNotifyRetry", cmb.OrderNotifyRetry)

View File

@ -46,7 +46,7 @@ func (srv *NotifyService) Notify(ctx http.Context) error {
return fmt.Errorf("读取响应体失败: %w", err) return fmt.Errorf("读取响应体失败: %w", err)
} }
if bodyBytes == nil { if len(bodyBytes) == 0 {
log.Errorf("微信回调通知[%s],响应体不能为空", mchId) log.Errorf("微信回调通知[%s],响应体不能为空", mchId)
return ctx.JSON(http2.StatusNetworkAuthenticationRequired, map[string]string{ return ctx.JSON(http2.StatusNetworkAuthenticationRequired, map[string]string{
"code": "FAIL", "code": "FAIL",