From 4e7fec4a3cc0b9213caaeb5b2c031cef46e9139e Mon Sep 17 00:00:00 2001 From: houseme Date: Thu, 24 Aug 2023 12:25:11 +0800 Subject: [PATCH] fix --- miniprogram/minidrama/minidrama.go | 60 +++++------------ miniprogram/virtualpayment/virtualpayment.go | 70 ++++---------------- 2 files changed, 29 insertions(+), 101 deletions(-) diff --git a/miniprogram/minidrama/minidrama.go b/miniprogram/minidrama/minidrama.go index 96ef04353..aaadf50dc 100644 --- a/miniprogram/minidrama/minidrama.go +++ b/miniprogram/minidrama/minidrama.go @@ -76,9 +76,7 @@ func (s *MiniDrama) SingleFileUpload(ctx context.Context, in *SingleFileUploadRe return } // 使用通用方法返回错误 - if err = util.DecodeWithError(response, out, "SingleFileUpload"); err != nil { - return - } + err = util.DecodeWithError(response, out, "SingleFileUpload") return } @@ -94,9 +92,7 @@ func (s *MiniDrama) PullUpload(ctx context.Context, in *PullUploadRequest) (out } // 使用通用方法返回错误 - if err = util.DecodeWithError(response, out, "PullUpload"); err != nil { - return - } + err = util.DecodeWithError(response, out, "PullUpload") return } @@ -113,9 +109,7 @@ func (s *MiniDrama) GetTask(ctx context.Context, in *GetTaskRequest) (out *GetTa } // 使用通用方法返回错误 - if err = util.DecodeWithError(response, out, "GetTask"); err != nil { - return - } + err = util.DecodeWithError(response, out, "GetTask") return } @@ -132,9 +126,7 @@ func (s *MiniDrama) ApplyUpload(ctx context.Context, in *ApplyUploadRequest) (ou } // 使用通用方法返回错误 - if err = util.DecodeWithError(response, out, "ApplyUpload"); err != nil { - return - } + err = util.DecodeWithError(response, out, "ApplyUpload") return } @@ -173,9 +165,7 @@ func (s *MiniDrama) UploadPart(ctx context.Context, in *UploadPartRequest) (out } // 使用通用方法返回错误 - if err = util.DecodeWithError(response, out, "UploadPart"); err != nil { - return - } + err = util.DecodeWithError(response, out, "UploadPart") return } @@ -192,9 +182,7 @@ func (s *MiniDrama) CommitUpload(ctx context.Context, in *CommitUploadRequest) ( } // 使用通用方法返回错误 - if err = util.DecodeWithError(response, out, "CommitUpload"); err != nil { - return - } + err = util.DecodeWithError(response, out, "CommitUpload") return } @@ -211,9 +199,7 @@ func (s *MiniDrama) ListMedia(ctx context.Context, in *ListMediaRequest) (out *L } // 使用通用方法返回错误 - if err = util.DecodeWithError(response, out, "ListMedia"); err != nil { - return - } + err = util.DecodeWithError(response, out, "ListMedia") return } @@ -230,9 +216,7 @@ func (s *MiniDrama) GetMedia(ctx context.Context, in *GetMediaRequest) (out *Get } // 使用通用方法返回错误 - if err = util.DecodeWithError(response, out, "GetMedia"); err != nil { - return - } + err = util.DecodeWithError(response, out, "GetMedia") return } @@ -249,9 +233,7 @@ func (s *MiniDrama) GetMediaLink(ctx context.Context, in *GetMediaLinkRequest) ( } // 使用通用方法返回错误 - if err = util.DecodeWithError(response, out, "GetMediaLink"); err != nil { - return - } + err = util.DecodeWithError(response, out, "GetMediaLink") return } @@ -268,9 +250,7 @@ func (s *MiniDrama) DeleteMedia(ctx context.Context, in *DeleteMediaRequest) (ou } // 使用通用方法返回错误 - if err = util.DecodeWithError(response, out, "DeleteMedia"); err != nil { - return - } + err = util.DecodeWithError(response, out, "DeleteMedia") return } @@ -287,9 +267,7 @@ func (s *MiniDrama) AuditDrama(ctx context.Context, in *AuditDramaRequest) (out } // 使用通用方法返回错误 - if err = util.DecodeWithError(response, out, "AuditDrama"); err != nil { - return - } + err = util.DecodeWithError(response, out, "AuditDrama") return } @@ -306,9 +284,7 @@ func (s *MiniDrama) ListDramas(ctx context.Context, in *ListDramasRequest) (out } // 使用通用方法返回错误 - if err = util.DecodeWithError(response, out, "ListDramas"); err != nil { - return - } + err = util.DecodeWithError(response, out, "ListDramas") return } @@ -324,9 +300,7 @@ func (s *MiniDrama) GetDrama(ctx context.Context, in *GetDramaRequest) (out *Get return } // 使用通用方法返回错误 - if err = util.DecodeWithError(response, out, "GetDrama"); err != nil { - return - } + err = util.DecodeWithError(response, out, "GetDrama") return } @@ -342,9 +316,7 @@ func (s *MiniDrama) GetCdnUsageData(ctx context.Context, in *GetCdnUsageDataRequ return } // 使用通用方法返回错误 - if err = util.DecodeWithError(response, out, "GetCdnUsageData"); err != nil { - return - } + err = util.DecodeWithError(response, out, "GetCdnUsageData") return } @@ -360,9 +332,7 @@ func (s *MiniDrama) GetCdnLogs(ctx context.Context, in *GetCdnLogsRequest) (out return } // 使用通用方法返回错误 - if err = util.DecodeWithError(response, out, "GetCdnLogs"); err != nil { - return - } + err = util.DecodeWithError(response, out, "GetCdnLogs") return } diff --git a/miniprogram/virtualpayment/virtualpayment.go b/miniprogram/virtualpayment/virtualpayment.go index 2e1c55755..b3386dabb 100644 --- a/miniprogram/virtualpayment/virtualpayment.go +++ b/miniprogram/virtualpayment/virtualpayment.go @@ -60,10 +60,7 @@ func (s *VirtualPayment) QueryUserBalance(ctx context.Context, in *QueryUserBala } // 使用通用方法返回错误 - if err = util.DecodeWithError(response, out, "QueryUserBalance"); err != nil { - return - } - + err = util.DecodeWithError(response, out, "QueryUserBalance") return } @@ -91,10 +88,7 @@ func (s *VirtualPayment) CurrencyPay(ctx context.Context, in *CurrencyPayRequest } // 使用通用方法返回错误 - if err = util.DecodeWithError(response, out, "CurrencyPay"); err != nil { - return - } - + err = util.DecodeWithError(response, out, "CurrencyPay") return } @@ -122,10 +116,7 @@ func (s *VirtualPayment) QueryOrder(ctx context.Context, in *QueryOrderRequest) } // 使用通用方法返回错误 - if err = util.DecodeWithError(response, out, "QueryOrder"); err != nil { - return - } - + err = util.DecodeWithError(response, out, "QueryOrder") return } @@ -153,10 +144,7 @@ func (s *VirtualPayment) CancelCurrencyPay(ctx context.Context, in *CancelCurren } // 使用通用方法返回错误 - if err = util.DecodeWithError(response, out, "CancelCurrencyPay"); err != nil { - return - } - + err = util.DecodeWithError(response, out, "CancelCurrencyPay") return } @@ -186,10 +174,7 @@ func (s *VirtualPayment) NotifyProvideGoods(ctx context.Context, in *NotifyProvi } // 使用通用方法返回错误 - if err = util.DecodeWithError(response, out, "NotifyProvideGoods"); err != nil { - return - } - + err = util.DecodeWithError(response, out, "NotifyProvideGoods") return } @@ -218,10 +203,7 @@ func (s *VirtualPayment) PresentCurrency(ctx context.Context, in *PresentCurrenc } // 使用通用方法返回错误 - if err = util.DecodeWithError(response, out, "PresentCurrency"); err != nil { - return - } - + err = util.DecodeWithError(response, out, "PresentCurrency") return } @@ -250,10 +232,7 @@ func (s *VirtualPayment) DownloadBill(ctx context.Context, in *DownloadBillReque } // 使用通用方法返回错误 - if err = util.DecodeWithError(response, out, "DownloadBill"); err != nil { - return - } - + err = util.DecodeWithError(response, out, "DownloadBill") return } @@ -282,10 +261,7 @@ func (s *VirtualPayment) RefundOrder(ctx context.Context, in *RefundOrderRequest } // 使用通用方法返回错误 - if err = util.DecodeWithError(response, out, "RefundOrder"); err != nil { - return - } - + err = util.DecodeWithError(response, out, "RefundOrder") return } @@ -314,10 +290,7 @@ func (s *VirtualPayment) CreateWithdrawOrder(ctx context.Context, in *CreateWith } // 使用通用方法返回错误 - if err = util.DecodeWithError(response, out, "CreateWithdrawOrder"); err != nil { - return - } - + err = util.DecodeWithError(response, out, "CreateWithdrawOrder") return } @@ -346,10 +319,7 @@ func (s *VirtualPayment) QueryWithdrawOrder(ctx context.Context, in *QueryWithdr } // 使用通用方法返回错误 - if err = util.DecodeWithError(response, out, "QueryWithdrawOrder"); err != nil { - return - } - + err = util.DecodeWithError(response, out, "QueryWithdrawOrder") return } @@ -378,10 +348,7 @@ func (s *VirtualPayment) StartUploadGoods(ctx context.Context, in *StartUploadGo } // 使用通用方法返回错误 - if err = util.DecodeWithError(response, out, "StartUploadGoods"); err != nil { - return - } - + err = util.DecodeWithError(response, out, "StartUploadGoods") return } @@ -410,10 +377,7 @@ func (s *VirtualPayment) QueryUploadGoods(ctx context.Context, in *QueryUploadGo } // 使用通用方法返回错误 - if err = util.DecodeWithError(response, out, "QueryUploadGoods"); err != nil { - return - } - + err = util.DecodeWithError(response, out, "QueryUploadGoods") return } @@ -442,10 +406,7 @@ func (s *VirtualPayment) StartPublishGoods(ctx context.Context, in *StartPublish } // 使用通用方法返回错误 - if err = util.DecodeWithError(response, out, "StartPublishGoods"); err != nil { - return - } - + err = util.DecodeWithError(response, out, "StartPublishGoods") return } @@ -474,10 +435,7 @@ func (s *VirtualPayment) QueryPublishGoods(ctx context.Context, in *QueryPublish } // 使用通用方法返回错误 - if err = util.DecodeWithError(response, out, "QueryPublishGoods"); err != nil { - return - } - + err = util.DecodeWithError(response, out, "QueryPublishGoods") return }