1、增加钱包余额

This commit is contained in:
2024-10-15 23:58:36 +08:00
parent 8609f8566d
commit fdfdbb5ff6
10 changed files with 313 additions and 285 deletions

View File

@@ -25,7 +25,12 @@ func NewGetWalletLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetWall
// 查询钱包信息
func (l *GetWalletLogic) GetWallet(in *user.GetWalletRequest) (*user.GetWalletResponse, error) {
// todo: add your logic here and delete this line
return &user.GetWalletResponse{}, nil
wallet, err := l.svcCtx.WalletsModel.FindOne(l.ctx, in.Id)
if err != nil {
return nil, err
}
return &user.GetWalletResponse{
UserId: wallet.UserId,
Balance: wallet.Balance,
}, nil
}