35 lines
770 B
Go
35 lines
770 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 ZltxOrderCardLogic struct {
|
|
ctx context.Context
|
|
svcCtx *svc.ServiceContext
|
|
logx.Logger
|
|
}
|
|
|
|
func NewZltxOrderCardLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ZltxOrderCardLogic {
|
|
return &ZltxOrderCardLogic{
|
|
ctx: ctx,
|
|
svcCtx: svcCtx,
|
|
Logger: logx.WithContext(ctx),
|
|
}
|
|
}
|
|
|
|
func (l *ZltxOrderCardLogic) ZltxOrderCard(in *transfer.ZltxOrderCardReq) (*transfer.DefaultRes, error) {
|
|
res, err := l.svcCtx.ZltxOrder.SetData(common.StructToMap(in)).CardOrder()
|
|
return &transfer.DefaultRes{
|
|
Code: res.Code,
|
|
Message: res.Message,
|
|
}, err
|
|
|
|
}
|