35 lines
955 B
Go
35 lines
955 B
Go
package logic
|
|
|
|
import (
|
|
"context"
|
|
"trasfer_middleware/cmd/rpc/internal/svc"
|
|
"trasfer_middleware/cmd/rpc/pb/transfer"
|
|
"trasfer_middleware/until/common"
|
|
|
|
"github.com/zeromicro/go-zero/core/logx"
|
|
)
|
|
|
|
type ZltxOrderRechargeQueryLogic struct {
|
|
ctx context.Context
|
|
svcCtx *svc.ServiceContext
|
|
logx.Logger
|
|
}
|
|
|
|
func NewZltxOrderRechargeQueryLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ZltxOrderRechargeQueryLogic {
|
|
return &ZltxOrderRechargeQueryLogic{
|
|
ctx: ctx,
|
|
svcCtx: svcCtx,
|
|
Logger: logx.WithContext(ctx),
|
|
}
|
|
}
|
|
|
|
func (l *ZltxOrderRechargeQueryLogic) ZltxOrderRechargeQuery(in *transfer.ZltxOrderRechargeQueryReq) (*transfer.ZltxOrderRechargeQueryRes, error) {
|
|
res, err := l.svcCtx.ZltxOrder.SetData(l.ctx, common.StructToMap(in), &l.svcCtx.Config.Mq).RechargeQuery()
|
|
return &transfer.ZltxOrderRechargeQueryRes{
|
|
Code: res.Code,
|
|
Message: res.Message,
|
|
Status: res.Status,
|
|
OutTradeNo: res.OutTradeNo,
|
|
}, err
|
|
}
|