tianyuan-api-server/apps/gateway/internal/logic/userProduct/deleteuserproductlogic.go

41 lines
1.0 KiB
Go
Raw Normal View History

2024-10-02 00:57:17 +08:00
package userProduct
import (
"context"
"errors"
"tianyuan-api/apps/gateway/internal/svc"
"tianyuan-api/apps/gateway/internal/types"
"github.com/zeromicro/go-zero/core/logx"
)
type DeleteUserProductLogic struct {
logx.Logger
ctx context.Context
svcCtx *svc.ServiceContext
}
func NewDeleteUserProductLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeleteUserProductLogic {
return &DeleteUserProductLogic{
Logger: logx.WithContext(ctx),
ctx: ctx,
svcCtx: svcCtx,
}
}
func (l *DeleteUserProductLogic) DeleteUserProduct(req *types.DeleteUserProductReq) error {
return errors.New("not implements")
// 未完善应加上判断是否该用户订阅后删除id也不是这个id暂不开放开放也没用
//_, ok := l.ctx.Value("userId").(int64)
//if !ok {
// return errors.New("无法获取 userId")
//}
//_, err := l.svcCtx.UserProductRpc.DeleteUserProduct(l.ctx, &userproduct.DeleteUserProductRequest{
// Id: req.Id,
//})
//if err != nil {
// return err
//}
//return nil
}