Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
houseme committed Aug 24, 2023
1 parent 9aa46be commit 4e7fec4
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 101 deletions.
60 changes: 15 additions & 45 deletions miniprogram/minidrama/minidrama.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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
}

Expand All @@ -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
}

Expand All @@ -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
}

Expand Down Expand Up @@ -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
}

Expand All @@ -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
}

Expand All @@ -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
}

Expand All @@ -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
}

Expand All @@ -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
}

Expand All @@ -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
}

Expand All @@ -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
}

Expand All @@ -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
}

Expand All @@ -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
}

Expand All @@ -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
}

Expand All @@ -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
}

Expand Down
70 changes: 14 additions & 56 deletions miniprogram/virtualpayment/virtualpayment.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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
}

Expand Down Expand Up @@ -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
}

Expand Down Expand Up @@ -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
}

Expand Down Expand Up @@ -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
}

Expand Down Expand Up @@ -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
}

Expand Down Expand Up @@ -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
}

Expand Down Expand Up @@ -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
}

Expand Down Expand Up @@ -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
}

Expand Down Expand Up @@ -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
}

Expand Down Expand Up @@ -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
}

Expand Down Expand Up @@ -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
}

Expand Down Expand Up @@ -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
}

Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit 4e7fec4

Please sign in to comment.