temp
This commit is contained in:
85
apps/user/client/apirequestservice/apirequestservice.go
Normal file
85
apps/user/client/apirequestservice/apirequestservice.go
Normal file
@@ -0,0 +1,85 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
// goctl 1.7.2
|
||||
// Source: user.proto
|
||||
|
||||
package apirequestservice
|
||||
|
||||
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
|
||||
|
||||
ApiRequestService interface {
|
||||
// 添加API请求记录
|
||||
AddApiRequest(ctx context.Context, in *AddApiRequestRequest, opts ...grpc.CallOption) (*AddApiRequestResponse, error)
|
||||
// 查询API请求记录
|
||||
GetApiRequests(ctx context.Context, in *GetApiRequestsRequest, opts ...grpc.CallOption) (*GetApiRequestsResponse, error)
|
||||
// 查询API请求记录ByTransactionId
|
||||
GetApiRequestByTransactionId(ctx context.Context, in *GetApiRequestByTransactionIdRequest, opts ...grpc.CallOption) (*GetApiRequestByTransactionIdResponse, error)
|
||||
}
|
||||
|
||||
defaultApiRequestService struct {
|
||||
cli zrpc.Client
|
||||
}
|
||||
)
|
||||
|
||||
func NewApiRequestService(cli zrpc.Client) ApiRequestService {
|
||||
return &defaultApiRequestService{
|
||||
cli: cli,
|
||||
}
|
||||
}
|
||||
|
||||
// 添加API请求记录
|
||||
func (m *defaultApiRequestService) AddApiRequest(ctx context.Context, in *AddApiRequestRequest, opts ...grpc.CallOption) (*AddApiRequestResponse, error) {
|
||||
client := user.NewApiRequestServiceClient(m.cli.Conn())
|
||||
return client.AddApiRequest(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 查询API请求记录
|
||||
func (m *defaultApiRequestService) GetApiRequests(ctx context.Context, in *GetApiRequestsRequest, opts ...grpc.CallOption) (*GetApiRequestsResponse, error) {
|
||||
client := user.NewApiRequestServiceClient(m.cli.Conn())
|
||||
return client.GetApiRequests(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 查询API请求记录ByTransactionId
|
||||
func (m *defaultApiRequestService) GetApiRequestByTransactionId(ctx context.Context, in *GetApiRequestByTransactionIdRequest, opts ...grpc.CallOption) (*GetApiRequestByTransactionIdResponse, error) {
|
||||
client := user.NewApiRequestServiceClient(m.cli.Conn())
|
||||
return client.GetApiRequestByTransactionId(ctx, in, opts...)
|
||||
}
|
||||
@@ -14,20 +14,37 @@ import (
|
||||
)
|
||||
|
||||
type (
|
||||
EmptyResponse = user.EmptyResponse
|
||||
EnterpriseAuthReq = user.EnterpriseAuthReq
|
||||
EnterpriseItem = user.EnterpriseItem
|
||||
GetEnterpriseAuthStatusReq = user.GetEnterpriseAuthStatusReq
|
||||
GetEnterpriseAuthStatusResp = user.GetEnterpriseAuthStatusResp
|
||||
GetPendingEnterpriseReq = user.GetPendingEnterpriseReq
|
||||
GetPendingEnterpriseResp = user.GetPendingEnterpriseResp
|
||||
LoginReq = user.LoginReq
|
||||
LoginResp = user.LoginResp
|
||||
PhoneLoginReq = user.PhoneLoginReq
|
||||
RegisterReq = user.RegisterReq
|
||||
ReviewEnterpriseReq = user.ReviewEnterpriseReq
|
||||
UserInfoReq = user.UserInfoReq
|
||||
UserInfoResp = user.UserInfoResp
|
||||
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
|
||||
|
||||
Auth interface {
|
||||
// 注册接口
|
||||
|
||||
@@ -14,20 +14,37 @@ import (
|
||||
)
|
||||
|
||||
type (
|
||||
EmptyResponse = user.EmptyResponse
|
||||
EnterpriseAuthReq = user.EnterpriseAuthReq
|
||||
EnterpriseItem = user.EnterpriseItem
|
||||
GetEnterpriseAuthStatusReq = user.GetEnterpriseAuthStatusReq
|
||||
GetEnterpriseAuthStatusResp = user.GetEnterpriseAuthStatusResp
|
||||
GetPendingEnterpriseReq = user.GetPendingEnterpriseReq
|
||||
GetPendingEnterpriseResp = user.GetPendingEnterpriseResp
|
||||
LoginReq = user.LoginReq
|
||||
LoginResp = user.LoginResp
|
||||
PhoneLoginReq = user.PhoneLoginReq
|
||||
RegisterReq = user.RegisterReq
|
||||
ReviewEnterpriseReq = user.ReviewEnterpriseReq
|
||||
UserInfoReq = user.UserInfoReq
|
||||
UserInfoResp = user.UserInfoResp
|
||||
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
|
||||
|
||||
Enterprise interface {
|
||||
// 获取待审核企业列表
|
||||
|
||||
@@ -14,24 +14,42 @@ import (
|
||||
)
|
||||
|
||||
type (
|
||||
EmptyResponse = user.EmptyResponse
|
||||
EnterpriseAuthReq = user.EnterpriseAuthReq
|
||||
EnterpriseItem = user.EnterpriseItem
|
||||
GetEnterpriseAuthStatusReq = user.GetEnterpriseAuthStatusReq
|
||||
GetEnterpriseAuthStatusResp = user.GetEnterpriseAuthStatusResp
|
||||
GetPendingEnterpriseReq = user.GetPendingEnterpriseReq
|
||||
GetPendingEnterpriseResp = user.GetPendingEnterpriseResp
|
||||
LoginReq = user.LoginReq
|
||||
LoginResp = user.LoginResp
|
||||
PhoneLoginReq = user.PhoneLoginReq
|
||||
RegisterReq = user.RegisterReq
|
||||
ReviewEnterpriseReq = user.ReviewEnterpriseReq
|
||||
UserInfoReq = user.UserInfoReq
|
||||
UserInfoResp = user.UserInfoResp
|
||||
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
|
||||
|
||||
User interface {
|
||||
// 获取用户信息
|
||||
UserInfo(ctx context.Context, in *UserInfoReq, opts ...grpc.CallOption) (*UserInfoResp, error)
|
||||
GetUserInfo(ctx context.Context, in *UserInfoReq, opts ...grpc.CallOption) (*GetUserInfoResp, error)
|
||||
GetEnterpriseAuthStatus(ctx context.Context, in *GetEnterpriseAuthStatusReq, opts ...grpc.CallOption) (*GetEnterpriseAuthStatusResp, error)
|
||||
}
|
||||
|
||||
@@ -52,6 +70,11 @@ func (m *defaultUser) UserInfo(ctx context.Context, in *UserInfoReq, opts ...grp
|
||||
return client.UserInfo(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultUser) GetUserInfo(ctx context.Context, in *UserInfoReq, opts ...grpc.CallOption) (*GetUserInfoResp, error) {
|
||||
client := user.NewUserClient(m.cli.Conn())
|
||||
return client.GetUserInfo(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultUser) GetEnterpriseAuthStatus(ctx context.Context, in *GetEnterpriseAuthStatusReq, opts ...grpc.CallOption) (*GetEnterpriseAuthStatusResp, error) {
|
||||
client := user.NewUserClient(m.cli.Conn())
|
||||
return client.GetEnterpriseAuthStatus(ctx, in, opts...)
|
||||
|
||||
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