package controller import ( "context" walletDto "shop-user-trade/model/dto/wallet" walletService "shop-user-trade/service/wallet" ) var Wallet = new(walletController) type walletController struct{} // GetByUserId 根据用户ID获取钱包 func (c *walletController) GetByUserId(ctx context.Context, req *walletDto.GetWalletByUserIdReq) (res *walletDto.GetWalletByUserIdResp, err error) { return walletService.Wallet.GetByUserId(ctx, req) } // Create 创建钱包 func (c *walletController) Create(ctx context.Context, req *walletDto.CreateWalletReq) (res *walletDto.CreateWalletResp, err error) { return walletService.Wallet.Create(ctx, req) } // UpdateBalance 更新余额 func (c *walletController) UpdateBalance(ctx context.Context, req *walletDto.UpdateBalanceReq) (res *walletDto.UpdateBalanceResp, err error) { return walletService.Wallet.UpdateBalance(ctx, req) } // GetWalletLogs 获取钱包日志 func (c *walletController) GetWalletLogs(ctx context.Context, req *walletDto.GetWalletLogsReq) (res *walletDto.GetWalletLogsResp, err error) { return walletService.Wallet.GetWalletLogs(ctx, req) }