30 lines
673 B
Go
30 lines
673 B
Go
|
package logic
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
|
||
|
"trasfer_middleware/cmd/rpc/internal/svc"
|
||
|
"trasfer_middleware/cmd/rpc/pb/transfer"
|
||
|
|
||
|
"github.com/zeromicro/go-zero/core/logx"
|
||
|
)
|
||
|
|
||
|
type NewMarketDiscardLogic struct {
|
||
|
ctx context.Context
|
||
|
svcCtx *svc.ServiceContext
|
||
|
logx.Logger
|
||
|
}
|
||
|
|
||
|
func NewNewMarketDiscardLogic(ctx context.Context, svcCtx *svc.ServiceContext) *NewMarketDiscardLogic {
|
||
|
return &NewMarketDiscardLogic{
|
||
|
ctx: ctx,
|
||
|
svcCtx: svcCtx,
|
||
|
Logger: logx.WithContext(ctx),
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func (l *NewMarketDiscardLogic) NewMarketDiscard(in *transfer.NewMarketDiscardReq) (*transfer.NewMarketDiscardRes, error) {
|
||
|
res, err := l.svcCtx.NewMarket.Discard(l.ctx, in)
|
||
|
return res, err
|
||
|
}
|