作者 tangxvhui

调整检查文章的查看权限

@@ -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{