41 lines
1.0 KiB
Go
41 lines
1.0 KiB
Go
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
|
||
}
|