1、增加钱包余额
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user