32 lines
760 B
Go
32 lines
760 B
Go
package logic
|
|
|
|
import (
|
|
"context"
|
|
"trasfer_middleware/until/common"
|
|
|
|
"trasfer_middleware/cmd/rpc/internal/svc"
|
|
"trasfer_middleware/cmd/rpc/pb/transfer"
|
|
|
|
"github.com/zeromicro/go-zero/core/logx"
|
|
)
|
|
|
|
type MarketKeyDiscardLogic struct {
|
|
ctx context.Context
|
|
svcCtx *svc.ServiceContext
|
|
logx.Logger
|
|
}
|
|
|
|
func NewMarketKeyDiscardLogic(ctx context.Context, svcCtx *svc.ServiceContext) *MarketKeyDiscardLogic {
|
|
return &MarketKeyDiscardLogic{
|
|
ctx: ctx,
|
|
svcCtx: svcCtx,
|
|
Logger: logx.WithContext(ctx),
|
|
}
|
|
}
|
|
|
|
func (l *MarketKeyDiscardLogic) MarketKeyDiscard(in *transfer.MarketKeyDiscardReq) (*transfer.MarketKeyDiscardRes, error) {
|
|
res, err := l.svcCtx.Market.SetData(l.ctx, common.StructToMap(in), &l.svcCtx.Config.Mq).KeyDiscard()
|
|
|
|
return res, err
|
|
}
|