2024-06-07 11:51:19 +08:00
|
|
|
package logic
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
2024-06-07 14:28:29 +08:00
|
|
|
"trasfer_middleware/pkg/common"
|
2024-06-07 11:51:19 +08:00
|
|
|
|
|
|
|
"trasfer_middleware/cmd/rpc/internal/svc"
|
|
|
|
"trasfer_middleware/cmd/rpc/pb/transfer"
|
|
|
|
|
|
|
|
"github.com/zeromicro/go-zero/core/logx"
|
|
|
|
)
|
|
|
|
|
|
|
|
type MarketQueryLogic struct {
|
|
|
|
ctx context.Context
|
|
|
|
svcCtx *svc.ServiceContext
|
|
|
|
logx.Logger
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewMarketQueryLogic(ctx context.Context, svcCtx *svc.ServiceContext) *MarketQueryLogic {
|
|
|
|
return &MarketQueryLogic{
|
|
|
|
ctx: ctx,
|
|
|
|
svcCtx: svcCtx,
|
|
|
|
Logger: logx.WithContext(ctx),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (l *MarketQueryLogic) MarketQuery(in *transfer.MarketQueryReq) (*transfer.MarketQueryRes, error) {
|
2024-06-07 14:28:29 +08:00
|
|
|
res, err := l.svcCtx.Market.SetData(common.StructToMap(in)).Query()
|
|
|
|
return res, err
|
2024-06-07 11:51:19 +08:00
|
|
|
}
|