作者 tangxvhui

Merge branch 'dev' into test

@@ -41,7 +41,7 @@ func (l *MiniGetArticleLogic) MiniGetArticle(req *types.MiniArticleGetRequest) ( @@ -41,7 +41,7 @@ func (l *MiniGetArticleLogic) MiniGetArticle(req *types.MiniArticleGetRequest) (
41 if articleInfo.CompanyId != req.CompanyId { 41 if articleInfo.CompanyId != req.CompanyId {
42 return nil, xerr.NewErrMsg("没有查看权限") 42 return nil, xerr.NewErrMsg("没有查看权限")
43 } 43 }
44 - 44 + if articleInfo.AuthorId != int64(req.UserId) {
45 if len(articleInfo.WhoRead) > 0 { 45 if len(articleInfo.WhoRead) > 0 {
46 inWhoRead := false 46 inWhoRead := false
47 for _, val := range articleInfo.WhoRead { 47 for _, val := range articleInfo.WhoRead {
@@ -59,7 +59,7 @@ func (l *MiniGetArticleLogic) MiniGetArticle(req *types.MiniArticleGetRequest) ( @@ -59,7 +59,7 @@ func (l *MiniGetArticleLogic) MiniGetArticle(req *types.MiniArticleGetRequest) (
59 return resp, nil 59 return resp, nil
60 } 60 }
61 } 61 }
62 - 62 + }
63 if articleInfo.Show == domain.ArticleShowDisable { 63 if articleInfo.Show == domain.ArticleShowDisable {
64 // 文章内容不显示 64 // 文章内容不显示
65 resp = &types.MiniArticleGetResponse{ 65 resp = &types.MiniArticleGetResponse{
@@ -24,6 +24,7 @@ func NewMiniSearchArticlePageLogic(ctx context.Context, svcCtx *svc.ServiceConte @@ -24,6 +24,7 @@ func NewMiniSearchArticlePageLogic(ctx context.Context, svcCtx *svc.ServiceConte
24 Logger: logx.WithContext(ctx), 24 Logger: logx.WithContext(ctx),
25 ctx: ctx, 25 ctx: ctx,
26 svcCtx: svcCtx, 26 svcCtx: svcCtx,
  27 + userCache: make(map[int64]*domain.User),
27 } 28 }
28 } 29 }
29 30