temp
This commit is contained in:
91
apps/user/client/walletservice/walletservice.go
Normal file
91
apps/user/client/walletservice/walletservice.go
Normal file
@@ -0,0 +1,91 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
// goctl 1.7.2
|
||||
// Source: user.proto
|
||||
|
||||
package walletservice
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"tianyuan-api/apps/user/user"
|
||||
|
||||
"github.com/zeromicro/go-zero/zrpc"
|
||||
"google.golang.org/grpc"
|
||||
)
|
||||
|
||||
type (
|
||||
AddApiRequestRequest = user.AddApiRequestRequest
|
||||
AddApiRequestResponse = user.AddApiRequestResponse
|
||||
ApiRequest = user.ApiRequest
|
||||
Deduction = user.Deduction
|
||||
EmptyResponse = user.EmptyResponse
|
||||
EnterpriseAuthReq = user.EnterpriseAuthReq
|
||||
EnterpriseItem = user.EnterpriseItem
|
||||
GetApiRequestByTransactionIdRequest = user.GetApiRequestByTransactionIdRequest
|
||||
GetApiRequestByTransactionIdResponse = user.GetApiRequestByTransactionIdResponse
|
||||
GetApiRequestsRequest = user.GetApiRequestsRequest
|
||||
GetApiRequestsResponse = user.GetApiRequestsResponse
|
||||
GetDeductionByTransactionIdRequest = user.GetDeductionByTransactionIdRequest
|
||||
GetDeductionByTransactionIdResponse = user.GetDeductionByTransactionIdResponse
|
||||
GetDeductionsRequest = user.GetDeductionsRequest
|
||||
GetDeductionsResponse = user.GetDeductionsResponse
|
||||
GetEnterpriseAuthStatusReq = user.GetEnterpriseAuthStatusReq
|
||||
GetEnterpriseAuthStatusResp = user.GetEnterpriseAuthStatusResp
|
||||
GetPendingEnterpriseReq = user.GetPendingEnterpriseReq
|
||||
GetPendingEnterpriseResp = user.GetPendingEnterpriseResp
|
||||
GetUserInfoResp = user.GetUserInfoResp
|
||||
GetWalletRequest = user.GetWalletRequest
|
||||
GetWalletResponse = user.GetWalletResponse
|
||||
LoginReq = user.LoginReq
|
||||
LoginResp = user.LoginResp
|
||||
PhoneLoginReq = user.PhoneLoginReq
|
||||
RegisterReq = user.RegisterReq
|
||||
ReviewEnterpriseReq = user.ReviewEnterpriseReq
|
||||
UpdateWalletRequest = user.UpdateWalletRequest
|
||||
UpdateWalletResponse = user.UpdateWalletResponse
|
||||
UserInfoReq = user.UserInfoReq
|
||||
UserInfoResp = user.UserInfoResp
|
||||
|
||||
WalletService interface {
|
||||
// 修改钱包余额
|
||||
UpdateWallet(ctx context.Context, in *UpdateWalletRequest, opts ...grpc.CallOption) (*UpdateWalletResponse, error)
|
||||
// 查询钱包信息
|
||||
GetWallet(ctx context.Context, in *GetWalletRequest, opts ...grpc.CallOption) (*GetWalletResponse, error)
|
||||
// 查询扣款记录
|
||||
GetDeductions(ctx context.Context, in *GetDeductionsRequest, opts ...grpc.CallOption) (*GetDeductionsResponse, error)
|
||||
GetDeductionByTransactionId(ctx context.Context, in *GetDeductionByTransactionIdRequest, opts ...grpc.CallOption) (*GetDeductionByTransactionIdResponse, error)
|
||||
}
|
||||
|
||||
defaultWalletService struct {
|
||||
cli zrpc.Client
|
||||
}
|
||||
)
|
||||
|
||||
func NewWalletService(cli zrpc.Client) WalletService {
|
||||
return &defaultWalletService{
|
||||
cli: cli,
|
||||
}
|
||||
}
|
||||
|
||||
// 修改钱包余额
|
||||
func (m *defaultWalletService) UpdateWallet(ctx context.Context, in *UpdateWalletRequest, opts ...grpc.CallOption) (*UpdateWalletResponse, error) {
|
||||
client := user.NewWalletServiceClient(m.cli.Conn())
|
||||
return client.UpdateWallet(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 查询钱包信息
|
||||
func (m *defaultWalletService) GetWallet(ctx context.Context, in *GetWalletRequest, opts ...grpc.CallOption) (*GetWalletResponse, error) {
|
||||
client := user.NewWalletServiceClient(m.cli.Conn())
|
||||
return client.GetWallet(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 查询扣款记录
|
||||
func (m *defaultWalletService) GetDeductions(ctx context.Context, in *GetDeductionsRequest, opts ...grpc.CallOption) (*GetDeductionsResponse, error) {
|
||||
client := user.NewWalletServiceClient(m.cli.Conn())
|
||||
return client.GetDeductions(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultWalletService) GetDeductionByTransactionId(ctx context.Context, in *GetDeductionByTransactionIdRequest, opts ...grpc.CallOption) (*GetDeductionByTransactionIdResponse, error) {
|
||||
client := user.NewWalletServiceClient(m.cli.Conn())
|
||||
return client.GetDeductionByTransactionId(ctx, in, opts...)
|
||||
}
|
||||
Reference in New Issue
Block a user