作者 庄敏学

帖子草稿增加公司字段查询

1 package article 1 package article
2 2
3 import ( 3 import (
  4 + "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/contextdata"
4 "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" 5 "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result"
5 "net/http" 6 "net/http"
6 7
@@ -17,7 +18,8 @@ func SystemSearchArticleDraftHandler(svcCtx *svc.ServiceContext) http.HandlerFun @@ -17,7 +18,8 @@ func SystemSearchArticleDraftHandler(svcCtx *svc.ServiceContext) http.HandlerFun
17 httpx.ErrorCtx(r.Context(), w, err) 18 httpx.ErrorCtx(r.Context(), w, err)
18 return 19 return
19 } 20 }
20 - 21 + userToken := contextdata.GetUserTokenFromCtx(r.Context())
  22 + req.CompanyId = userToken.CompanyId
21 l := article.NewSystemSearchArticleDraftLogic(r.Context(), svcCtx) 23 l := article.NewSystemSearchArticleDraftLogic(r.Context(), svcCtx)
22 resp, err := l.SystemSearchArticleDraft(&req) 24 resp, err := l.SystemSearchArticleDraft(&req)
23 result.HttpResult(r, w, resp, err) 25 result.HttpResult(r, w, resp, err)