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

31 lines
732 B
Go
Raw Permalink Normal View History

package logic
import (
"context"
2024-06-12 13:46:14 +08:00
"trasfer_middleware/until/common"
"trasfer_middleware/cmd/rpc/internal/svc"
"trasfer_middleware/cmd/rpc/pb/transfer"
"github.com/zeromicro/go-zero/core/logx"
)
type MarketKeySendLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewMarketKeySendLogic(ctx context.Context, svcCtx *svc.ServiceContext) *MarketKeySendLogic {
return &MarketKeySendLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *MarketKeySendLogic) MarketKeySend(in *transfer.MarketKeySendReq) (*transfer.MarketKeySendRes, error) {
2024-06-18 16:34:14 +08:00
res, err := l.svcCtx.Market.SetData(l.ctx, common.StructToMap(in), &l.svcCtx.Config.Mq).KeySend()
return res, err
}