|
@@ -2,6 +2,7 @@ package logic
|
|
|
|
|
|
import (
|
|
|
"context"
|
|
|
+ "net/http"
|
|
|
|
|
|
"jyBXSubscribe/api/internal/svc"
|
|
|
"jyBXSubscribe/api/internal/types"
|
|
@@ -13,13 +14,15 @@ type SubscribeInfoLogic struct {
|
|
|
logx.Logger
|
|
|
ctx context.Context
|
|
|
svcCtx *svc.ServiceContext
|
|
|
+ r *http.Request
|
|
|
}
|
|
|
|
|
|
-func NewSubscribeInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) SubscribeInfoLogic {
|
|
|
+func NewSubscribeInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext, r *http.Request) SubscribeInfoLogic {
|
|
|
return SubscribeInfoLogic{
|
|
|
Logger: logx.WithContext(ctx),
|
|
|
ctx: ctx,
|
|
|
svcCtx: svcCtx,
|
|
|
+ r: r,
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -28,7 +31,7 @@ func (l *SubscribeInfoLogic) SubscribeInfo(req types.SubscribeRequest) (*types.C
|
|
|
|
|
|
return &types.CommonRes{
|
|
|
Err_code: 1002,
|
|
|
- Err_msg: "----",
|
|
|
+ Err_msg: l.r.Header.Get("userId"),
|
|
|
Data: map[string]interface{}{},
|
|
|
}, nil
|
|
|
}
|