tianyuan-api-server/apps/user/internal/server/walletservice/walletserviceserver.go
2024-10-12 20:41:55 +08:00

48 lines
1.5 KiB
Go

// 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)
}