微信红包
This commit is contained in:
parent
43d02b09b2
commit
cd6a66bdf3
|
|
@ -82,20 +82,6 @@ func (p *WeChatRedPackService) Query(ctx context.Context, request *proto.QueryRe
|
|||
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) {
|
||||
|
||||
defer func() {
|
||||
|
|
@ -126,3 +112,17 @@ func (p *WeChatRedPackService) Notify(ctx context.Context, request *proto.Notify
|
|||
|
||||
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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue