36 lines
878 B
Go
36 lines
878 B
Go
|
|
package share
|
||
|
|
|
||
|
|
import (
|
||
|
|
"context"
|
||
|
|
|
||
|
|
"muyu-apiserver/gateway/internal/svc"
|
||
|
|
"muyu-apiserver/gateway/internal/types"
|
||
|
|
"muyu-apiserver/pkg/ctxdata"
|
||
|
|
"muyu-apiserver/rpc/production/productionservice"
|
||
|
|
|
||
|
|
"github.com/zeromicro/go-zero/core/logx"
|
||
|
|
)
|
||
|
|
|
||
|
|
type ConfirmShareLinkLogic struct {
|
||
|
|
logx.Logger
|
||
|
|
ctx context.Context
|
||
|
|
svcCtx *svc.ServiceContext
|
||
|
|
}
|
||
|
|
|
||
|
|
func NewConfirmShareLinkLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ConfirmShareLinkLogic {
|
||
|
|
return &ConfirmShareLinkLogic{
|
||
|
|
Logger: logx.WithContext(ctx),
|
||
|
|
ctx: ctx,
|
||
|
|
svcCtx: svcCtx,
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
func (l *ConfirmShareLinkLogic) ConfirmShareLink(req *types.GatewayConfirmShareLinkReq) error {
|
||
|
|
_, err := l.svcCtx.ProductionRpc.ConfirmShareLink(l.ctx, &productionservice.ConfirmShareLinkReq{
|
||
|
|
ShortCode: req.ShortCode,
|
||
|
|
Token: req.Token,
|
||
|
|
FactoryTenantId: ctxdata.GetTenantId(l.ctx),
|
||
|
|
})
|
||
|
|
return err
|
||
|
|
}
|