微信红包

This commit is contained in:
ziming 2025-11-26 10:37:33 +08:00
parent 43d02b09b2
commit cd6a66bdf3
1 changed files with 14 additions and 14 deletions

View File

@ -82,20 +82,6 @@ func (p *WeChatRedPackService) Query(ctx context.Context, request *proto.QueryRe
return queryResp(request, resp) return queryResp(request, resp)
} }
func (p *WeChatRedPackService) err(err error) error {
if e, ok := err.(*utils.ApiException); ok {
apiErr, err3 := transfer.BuildTransferErr(e.Body())
if err3 != nil {
return err3
}
return fmt.Errorf("请求微信API错误: %s", apiErr.Message)
}
return proto.ErrorRequestFail("请求微信返回错误:%v", err)
}
func (p *WeChatRedPackService) Notify(ctx context.Context, request *proto.NotifyRequest) (resp2 *proto.NotifyResponse, respErr error) { func (p *WeChatRedPackService) Notify(ctx context.Context, request *proto.NotifyRequest) (resp2 *proto.NotifyResponse, respErr error) {
defer func() { defer func() {
@ -126,3 +112,17 @@ func (p *WeChatRedPackService) Notify(ctx context.Context, request *proto.Notify
return notifyResp(resp), nil return notifyResp(resp), nil
} }
func (p *WeChatRedPackService) err(err error) error {
if e, ok := err.(*utils.ApiException); ok {
apiErr, err3 := transfer.BuildTransferErr(e.Body())
if err3 != nil {
return err3
}
return fmt.Errorf("请求微信API错误: %s", apiErr.Message)
}
return proto.ErrorRequestFail("请求微信返回错误:%v", err)
}