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

31 lines
734 B
Go
Raw Normal View History

2024-06-18 16:34:14 +08:00
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 ZltxRsMiXueLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewZltxRsMiXueLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ZltxRsMiXueLogic {
return &ZltxRsMiXueLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *ZltxRsMiXueLogic) ZltxRsMiXue(in *transfer.RsCouponGrantReq) (*transfer.RsCouponGrantRes, error) {
res, err := l.svcCtx.ZltxOrder.SetData(l.ctx, common.StructToMap(in), &l.svcCtx.Config.Mq).RsMiXueCouponGrant()
return res, err
}