32 lines
703 B
Go
32 lines
703 B
Go
package logic
|
|
|
|
import (
|
|
"context"
|
|
"trasfer_middleware/pkg/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) {
|
|
res, err := l.svcCtx.Market.SetData(common.StructToMap(in)).KeySend()
|
|
|
|
return res, err
|
|
}
|