transfer_middleware/cmd/rpc/internal/logic/newMarketOrderLogic.go

30 lines
655 B
Go
Raw Normal View History

2024-10-15 18:35:45 +08:00
package logic
import (
"context"
"trasfer_middleware/cmd/rpc/internal/svc"
"trasfer_middleware/cmd/rpc/pb/transfer"
"github.com/zeromicro/go-zero/core/logx"
)
type NewMarketOrderLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewNewMarketOrderLogic(ctx context.Context, svcCtx *svc.ServiceContext) *NewMarketOrderLogic {
return &NewMarketOrderLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *NewMarketOrderLogic) NewMarketOrder(in *transfer.NewMarketOrderReq) (*transfer.NewMarketOrderRes, error) {
res, err := l.svcCtx.NewMarket.Order(l.ctx, in)
return res, err
}