temp
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
// goctl 1.7.2
|
||||
// Source: user.proto
|
||||
|
||||
package server
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"tianyuan-api/apps/user/internal/logic/apirequestservice"
|
||||
"tianyuan-api/apps/user/internal/svc"
|
||||
"tianyuan-api/apps/user/user"
|
||||
)
|
||||
|
||||
type ApiRequestServiceServer struct {
|
||||
svcCtx *svc.ServiceContext
|
||||
user.UnimplementedApiRequestServiceServer
|
||||
}
|
||||
|
||||
func NewApiRequestServiceServer(svcCtx *svc.ServiceContext) *ApiRequestServiceServer {
|
||||
return &ApiRequestServiceServer{
|
||||
svcCtx: svcCtx,
|
||||
}
|
||||
}
|
||||
|
||||
// 添加API请求记录
|
||||
func (s *ApiRequestServiceServer) AddApiRequest(ctx context.Context, in *user.AddApiRequestRequest) (*user.AddApiRequestResponse, error) {
|
||||
l := apirequestservicelogic.NewAddApiRequestLogic(ctx, s.svcCtx)
|
||||
return l.AddApiRequest(in)
|
||||
}
|
||||
|
||||
// 查询API请求记录
|
||||
func (s *ApiRequestServiceServer) GetApiRequests(ctx context.Context, in *user.GetApiRequestsRequest) (*user.GetApiRequestsResponse, error) {
|
||||
l := apirequestservicelogic.NewGetApiRequestsLogic(ctx, s.svcCtx)
|
||||
return l.GetApiRequests(in)
|
||||
}
|
||||
|
||||
// 查询API请求记录ByTransactionId
|
||||
func (s *ApiRequestServiceServer) GetApiRequestByTransactionId(ctx context.Context, in *user.GetApiRequestByTransactionIdRequest) (*user.GetApiRequestByTransactionIdResponse, error) {
|
||||
l := apirequestservicelogic.NewGetApiRequestByTransactionIdLogic(ctx, s.svcCtx)
|
||||
return l.GetApiRequestByTransactionId(in)
|
||||
}
|
||||
@@ -29,6 +29,11 @@ func (s *UserServer) UserInfo(ctx context.Context, in *user.UserInfoReq) (*user.
|
||||
return l.UserInfo(in)
|
||||
}
|
||||
|
||||
func (s *UserServer) GetUserInfo(ctx context.Context, in *user.UserInfoReq) (*user.GetUserInfoResp, error) {
|
||||
l := userlogic.NewGetUserInfoLogic(ctx, s.svcCtx)
|
||||
return l.GetUserInfo(in)
|
||||
}
|
||||
|
||||
func (s *UserServer) GetEnterpriseAuthStatus(ctx context.Context, in *user.GetEnterpriseAuthStatusReq) (*user.GetEnterpriseAuthStatusResp, error) {
|
||||
l := userlogic.NewGetEnterpriseAuthStatusLogic(ctx, s.svcCtx)
|
||||
return l.GetEnterpriseAuthStatus(in)
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
// Code generated by goctl. DO NOT EDIT.
|
||||
// goctl 1.7.2
|
||||
// Source: user.proto
|
||||
|
||||
package server
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"tianyuan-api/apps/user/internal/logic/walletservice"
|
||||
"tianyuan-api/apps/user/internal/svc"
|
||||
"tianyuan-api/apps/user/user"
|
||||
)
|
||||
|
||||
type WalletServiceServer struct {
|
||||
svcCtx *svc.ServiceContext
|
||||
user.UnimplementedWalletServiceServer
|
||||
}
|
||||
|
||||
func NewWalletServiceServer(svcCtx *svc.ServiceContext) *WalletServiceServer {
|
||||
return &WalletServiceServer{
|
||||
svcCtx: svcCtx,
|
||||
}
|
||||
}
|
||||
|
||||
// 修改钱包余额
|
||||
func (s *WalletServiceServer) UpdateWallet(ctx context.Context, in *user.UpdateWalletRequest) (*user.UpdateWalletResponse, error) {
|
||||
l := walletservicelogic.NewUpdateWalletLogic(ctx, s.svcCtx)
|
||||
return l.UpdateWallet(in)
|
||||
}
|
||||
|
||||
// 查询钱包信息
|
||||
func (s *WalletServiceServer) GetWallet(ctx context.Context, in *user.GetWalletRequest) (*user.GetWalletResponse, error) {
|
||||
l := walletservicelogic.NewGetWalletLogic(ctx, s.svcCtx)
|
||||
return l.GetWallet(in)
|
||||
}
|
||||
|
||||
// 查询扣款记录
|
||||
func (s *WalletServiceServer) GetDeductions(ctx context.Context, in *user.GetDeductionsRequest) (*user.GetDeductionsResponse, error) {
|
||||
l := walletservicelogic.NewGetDeductionsLogic(ctx, s.svcCtx)
|
||||
return l.GetDeductions(in)
|
||||
}
|
||||
|
||||
func (s *WalletServiceServer) GetDeductionByTransactionId(ctx context.Context, in *user.GetDeductionByTransactionIdRequest) (*user.GetDeductionByTransactionIdResponse, error) {
|
||||
l := walletservicelogic.NewGetDeductionByTransactionIdLogic(ctx, s.svcCtx)
|
||||
return l.GetDeductionByTransactionId(in)
|
||||
}
|
||||
Reference in New Issue
Block a user