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

30 lines
677 B
Go
Raw Permalink Normal View History

2024-06-18 16:34:14 +08:00
package logic
import (
"context"
"trasfer_middleware/cmd/rpc/internal/svc"
"trasfer_middleware/cmd/rpc/pb/transfer"
"github.com/zeromicro/go-zero/core/logx"
)
type RsCouponGrantLogic struct {
ctx context.Context
svcCtx *svc.ServiceContext
logx.Logger
}
func NewRsCouponGrantLogic(ctx context.Context, svcCtx *svc.ServiceContext) *RsCouponGrantLogic {
return &RsCouponGrantLogic{
ctx: ctx,
svcCtx: svcCtx,
Logger: logx.WithContext(ctx),
}
}
func (l *RsCouponGrantLogic) RsCouponGrant(in *transfer.RsCouponGrantReq) (*transfer.RsCouponGrantRes, error) {
2024-07-09 17:07:22 +08:00
res, err := l.svcCtx.RS.SetData(l.ctx, in, &l.svcCtx.Config.Mq).CouponGrant()
2024-06-18 16:34:14 +08:00
return res, err
}