Merge branch 'dev' of http://gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss into dev
正在显示
28 个修改的文件
包含
31 行增加
和
1 行删除
@@ -521,6 +521,7 @@ type ( | @@ -521,6 +521,7 @@ type ( | ||
521 | ArticleId int64 `json:"articleId"` | 521 | ArticleId int64 `json:"articleId"` |
522 | Title string `json:"title"` | 522 | Title string `json:"title"` |
523 | Author string `json:"author"` // 发布人 | 523 | Author string `json:"author"` // 发布人 |
524 | + Avatar string `json:"avatar"`// 发布人的头像 | ||
524 | Images []string `json:"images"` | 525 | Images []string `json:"images"` |
525 | CreatedAt int64 `json:"createdAt"` | 526 | CreatedAt int64 `json:"createdAt"` |
526 | MeReadFlag int `json:"meReadFlag"` //已读标识 [0:未读] [1:已读] | 527 | MeReadFlag int `json:"meReadFlag"` //已读标识 [0:未读] [1:已读] |
@@ -11,6 +11,7 @@ import ( | @@ -11,6 +11,7 @@ import ( | ||
11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" | 11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" |
12 | ) | 12 | ) |
13 | 13 | ||
14 | +// 获取所有的标签 | ||
14 | func MiniAllArticleTagHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { | 15 | func MiniAllArticleTagHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { |
15 | return func(w http.ResponseWriter, r *http.Request) { | 16 | return func(w http.ResponseWriter, r *http.Request) { |
16 | var req types.MiniAllArticleTagRequest | 17 | var req types.MiniAllArticleTagRequest |
@@ -11,6 +11,7 @@ import ( | @@ -11,6 +11,7 @@ import ( | ||
11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" | 11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" |
12 | ) | 12 | ) |
13 | 13 | ||
14 | +// 获取文章的编辑记录 | ||
14 | func MiniArticleBackupSearchHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { | 15 | func MiniArticleBackupSearchHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { |
15 | return func(w http.ResponseWriter, r *http.Request) { | 16 | return func(w http.ResponseWriter, r *http.Request) { |
16 | var req types.MiniArticleBackupSearchRequest | 17 | var req types.MiniArticleBackupSearchRequest |
@@ -11,6 +11,7 @@ import ( | @@ -11,6 +11,7 @@ import ( | ||
11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/api/internal/types" | 11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/api/internal/types" |
12 | ) | 12 | ) |
13 | 13 | ||
14 | +// 获取我的文章浏览记录 | ||
14 | func MiniArticleMarkListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { | 15 | func MiniArticleMarkListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { |
15 | return func(w http.ResponseWriter, r *http.Request) { | 16 | return func(w http.ResponseWriter, r *http.Request) { |
16 | var req types.MiniArticleMarkListRequest | 17 | var req types.MiniArticleMarkListRequest |
@@ -11,6 +11,7 @@ import ( | @@ -11,6 +11,7 @@ import ( | ||
11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" | 11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" |
12 | ) | 12 | ) |
13 | 13 | ||
14 | +// 获取我发布的文章 | ||
14 | func MiniArticleSearchMeHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { | 15 | func MiniArticleSearchMeHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { |
15 | return func(w http.ResponseWriter, r *http.Request) { | 16 | return func(w http.ResponseWriter, r *http.Request) { |
16 | var req types.MiniArticleSearchMeRequest | 17 | var req types.MiniArticleSearchMeRequest |
@@ -11,6 +11,7 @@ import ( | @@ -11,6 +11,7 @@ import ( | ||
11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" | 11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" |
12 | ) | 12 | ) |
13 | 13 | ||
14 | +// 设置文章的定性标签 | ||
14 | func MiniArticleSetTagHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { | 15 | func MiniArticleSetTagHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { |
15 | return func(w http.ResponseWriter, r *http.Request) { | 16 | return func(w http.ResponseWriter, r *http.Request) { |
16 | var req types.MiniArticleSetTagRequest | 17 | var req types.MiniArticleSetTagRequest |
@@ -11,6 +11,7 @@ import ( | @@ -11,6 +11,7 @@ import ( | ||
11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" | 11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" |
12 | ) | 12 | ) |
13 | 13 | ||
14 | +// 保存文章进草稿箱 | ||
14 | func MiniCreateArticleDraftHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { | 15 | func MiniCreateArticleDraftHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { |
15 | return func(w http.ResponseWriter, r *http.Request) { | 16 | return func(w http.ResponseWriter, r *http.Request) { |
16 | var req types.MiniArticleDraftCreateRequest | 17 | var req types.MiniArticleDraftCreateRequest |
@@ -11,6 +11,7 @@ import ( | @@ -11,6 +11,7 @@ import ( | ||
11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" | 11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" |
12 | ) | 12 | ) |
13 | 13 | ||
14 | +// 发布新的文章 | ||
14 | func MiniCreateArticleHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { | 15 | func MiniCreateArticleHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { |
15 | return func(w http.ResponseWriter, r *http.Request) { | 16 | return func(w http.ResponseWriter, r *http.Request) { |
16 | var req types.MiniArticleCreateRequest | 17 | var req types.MiniArticleCreateRequest |
@@ -11,6 +11,7 @@ import ( | @@ -11,6 +11,7 @@ import ( | ||
11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" | 11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" |
12 | ) | 12 | ) |
13 | 13 | ||
14 | +// 删除文章的草稿箱 | ||
14 | func MiniDeleteArticleDraftMeHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { | 15 | func MiniDeleteArticleDraftMeHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { |
15 | return func(w http.ResponseWriter, r *http.Request) { | 16 | return func(w http.ResponseWriter, r *http.Request) { |
16 | var req types.MiniArticleDraftDeleteMeRequest | 17 | var req types.MiniArticleDraftDeleteMeRequest |
@@ -11,6 +11,7 @@ import ( | @@ -11,6 +11,7 @@ import ( | ||
11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" | 11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" |
12 | ) | 12 | ) |
13 | 13 | ||
14 | +// 获取我的文章草稿内容 | ||
14 | func MiniGetArticleDraftMeHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { | 15 | func MiniGetArticleDraftMeHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { |
15 | return func(w http.ResponseWriter, r *http.Request) { | 16 | return func(w http.ResponseWriter, r *http.Request) { |
16 | var req types.MiniArticleDraftGetMeRequest | 17 | var req types.MiniArticleDraftGetMeRequest |
@@ -11,6 +11,7 @@ import ( | @@ -11,6 +11,7 @@ import ( | ||
11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" | 11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" |
12 | ) | 12 | ) |
13 | 13 | ||
14 | +// 小程序端展示文章内容 | ||
14 | func MiniGetArticleHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { | 15 | func MiniGetArticleHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { |
15 | return func(w http.ResponseWriter, r *http.Request) { | 16 | return func(w http.ResponseWriter, r *http.Request) { |
16 | var req types.MiniArticleGetRequest | 17 | var req types.MiniArticleGetRequest |
@@ -11,6 +11,7 @@ import ( | @@ -11,6 +11,7 @@ import ( | ||
11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" | 11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" |
12 | ) | 12 | ) |
13 | 13 | ||
14 | +// 查询我的草稿箱内容列表 | ||
14 | func MiniSearchArticleDraftMeHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { | 15 | func MiniSearchArticleDraftMeHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { |
15 | return func(w http.ResponseWriter, r *http.Request) { | 16 | return func(w http.ResponseWriter, r *http.Request) { |
16 | var req types.MiniArticleDraftSearchMeRequest | 17 | var req types.MiniArticleDraftSearchMeRequest |
@@ -11,6 +11,7 @@ import ( | @@ -11,6 +11,7 @@ import ( | ||
11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" | 11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" |
12 | ) | 12 | ) |
13 | 13 | ||
14 | +// 设置文章\评论的点赞操作 | ||
14 | func MiniSetUserLikeHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { | 15 | func MiniSetUserLikeHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { |
15 | return func(w http.ResponseWriter, r *http.Request) { | 16 | return func(w http.ResponseWriter, r *http.Request) { |
16 | var req types.MiniSetUserLikeRequset | 17 | var req types.MiniSetUserLikeRequset |
@@ -11,6 +11,7 @@ import ( | @@ -11,6 +11,7 @@ import ( | ||
11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" | 11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" |
12 | ) | 12 | ) |
13 | 13 | ||
14 | +// 更新文章草稿箱的内容 | ||
14 | func MiniUpdateArticleDraftHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { | 15 | func MiniUpdateArticleDraftHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { |
15 | return func(w http.ResponseWriter, r *http.Request) { | 16 | return func(w http.ResponseWriter, r *http.Request) { |
16 | var req types.MiniArticleDraftUpdateRequest | 17 | var req types.MiniArticleDraftUpdateRequest |
@@ -11,6 +11,7 @@ import ( | @@ -11,6 +11,7 @@ import ( | ||
11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" | 11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" |
12 | ) | 12 | ) |
13 | 13 | ||
14 | +// 获取点赞文章的的人员列表 | ||
14 | func MiniUserLikeArticleHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { | 15 | func MiniUserLikeArticleHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { |
15 | return func(w http.ResponseWriter, r *http.Request) { | 16 | return func(w http.ResponseWriter, r *http.Request) { |
16 | var req types.MiniUserLikeArticleRequest | 17 | var req types.MiniUserLikeArticleRequest |
@@ -11,6 +11,7 @@ import ( | @@ -11,6 +11,7 @@ import ( | ||
11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" | 11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" |
12 | ) | 12 | ) |
13 | 13 | ||
14 | +// 填写评估时@谁 的可选择者列表 | ||
14 | func MiniArticleCommentAtWhoHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { | 15 | func MiniArticleCommentAtWhoHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { |
15 | return func(w http.ResponseWriter, r *http.Request) { | 16 | return func(w http.ResponseWriter, r *http.Request) { |
16 | var req types.MiniArticleCommentAtWhoRequest | 17 | var req types.MiniArticleCommentAtWhoRequest |
@@ -11,6 +11,7 @@ import ( | @@ -11,6 +11,7 @@ import ( | ||
11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" | 11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" |
12 | ) | 12 | ) |
13 | 13 | ||
14 | +// 填写评论 | ||
14 | func MiniCreateArticleCommentHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { | 15 | func MiniCreateArticleCommentHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { |
15 | return func(w http.ResponseWriter, r *http.Request) { | 16 | return func(w http.ResponseWriter, r *http.Request) { |
16 | var req types.MiniCreateArticleCommentRequest | 17 | var req types.MiniCreateArticleCommentRequest |
@@ -11,6 +11,7 @@ import ( | @@ -11,6 +11,7 @@ import ( | ||
11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" | 11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" |
12 | ) | 12 | ) |
13 | 13 | ||
14 | +// 小程序端人员删除评论 | ||
14 | func MiniDeleteArticleCommentHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { | 15 | func MiniDeleteArticleCommentHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { |
15 | return func(w http.ResponseWriter, r *http.Request) { | 16 | return func(w http.ResponseWriter, r *http.Request) { |
16 | var req types.MiniDeleteArticleCommentRequest | 17 | var req types.MiniDeleteArticleCommentRequest |
@@ -11,6 +11,7 @@ import ( | @@ -11,6 +11,7 @@ import ( | ||
11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" | 11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" |
12 | ) | 12 | ) |
13 | 13 | ||
14 | +// 获取单条评论详情 | ||
14 | func MiniGetArticleCommentHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { | 15 | func MiniGetArticleCommentHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { |
15 | return func(w http.ResponseWriter, r *http.Request) { | 16 | return func(w http.ResponseWriter, r *http.Request) { |
16 | var req types.MiniGetArticleCommentRequest | 17 | var req types.MiniGetArticleCommentRequest |
@@ -11,6 +11,7 @@ import ( | @@ -11,6 +11,7 @@ import ( | ||
11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" | 11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" |
12 | ) | 12 | ) |
13 | 13 | ||
14 | +// 小程序端获取 根据文章id 获取评论列表 | ||
14 | func MiniListArticleCommentHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { | 15 | func MiniListArticleCommentHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { |
15 | return func(w http.ResponseWriter, r *http.Request) { | 16 | return func(w http.ResponseWriter, r *http.Request) { |
16 | var req types.MiniListArticleCommentRequest | 17 | var req types.MiniListArticleCommentRequest |
@@ -11,6 +11,7 @@ import ( | @@ -11,6 +11,7 @@ import ( | ||
11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" | 11 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/result" |
12 | ) | 12 | ) |
13 | 13 | ||
14 | +// 获取前5的评论 | ||
14 | func MiniTop5ArticleCommentHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { | 15 | func MiniTop5ArticleCommentHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { |
15 | return func(w http.ResponseWriter, r *http.Request) { | 16 | return func(w http.ResponseWriter, r *http.Request) { |
16 | var req types.MiniTop5ArticleCommentRequest | 17 | var req types.MiniTop5ArticleCommentRequest |
@@ -25,6 +25,7 @@ func NewMiniSearchArticleDraftMeLogic(ctx context.Context, svcCtx *svc.ServiceCo | @@ -25,6 +25,7 @@ func NewMiniSearchArticleDraftMeLogic(ctx context.Context, svcCtx *svc.ServiceCo | ||
25 | } | 25 | } |
26 | } | 26 | } |
27 | 27 | ||
28 | +// 查询我的草稿箱内容列表 | ||
28 | func (l *MiniSearchArticleDraftMeLogic) MiniSearchArticleDraftMe(req *types.MiniArticleDraftSearchMeRequest) (resp *types.MiniArticleDraftSearchMeResponse, err error) { | 29 | func (l *MiniSearchArticleDraftMeLogic) MiniSearchArticleDraftMe(req *types.MiniArticleDraftSearchMeRequest) (resp *types.MiniArticleDraftSearchMeResponse, err error) { |
29 | var conn = l.svcCtx.DefaultDBConn() | 30 | var conn = l.svcCtx.DefaultDBConn() |
30 | 31 |
@@ -61,15 +61,16 @@ func (l *MiniSearchArticlePageLogic) MiniSearchArticlePage(req *types.MiniSearch | @@ -61,15 +61,16 @@ func (l *MiniSearchArticlePageLogic) MiniSearchArticlePage(req *types.MiniSearch | ||
61 | } | 61 | } |
62 | 62 | ||
63 | for i, val := range articleList { | 63 | for i, val := range articleList { |
64 | - | ||
65 | item := types.MiniSearchArticleItem{ | 64 | item := types.MiniSearchArticleItem{ |
66 | ArticleId: val.Id, | 65 | ArticleId: val.Id, |
67 | Title: val.Title, | 66 | Title: val.Title, |
68 | Author: val.Author.Name, | 67 | Author: val.Author.Name, |
68 | + Avatar: val.Author.Avatar, | ||
69 | Images: []string{}, | 69 | Images: []string{}, |
70 | CreatedAt: val.CreatedAt, | 70 | CreatedAt: val.CreatedAt, |
71 | MeReadFlag: 0, | 71 | MeReadFlag: 0, |
72 | } | 72 | } |
73 | + | ||
73 | if _, ok := readFlag[val.Id]; ok { | 74 | if _, ok := readFlag[val.Id]; ok { |
74 | item.MeReadFlag = 1 | 75 | item.MeReadFlag = 1 |
75 | } | 76 | } |
@@ -26,6 +26,7 @@ func NewMiniUpdateArticleDraftLogic(ctx context.Context, svcCtx *svc.ServiceCont | @@ -26,6 +26,7 @@ func NewMiniUpdateArticleDraftLogic(ctx context.Context, svcCtx *svc.ServiceCont | ||
26 | } | 26 | } |
27 | } | 27 | } |
28 | 28 | ||
29 | +// 更新文章草稿箱的内容 | ||
29 | func (l *MiniUpdateArticleDraftLogic) MiniUpdateArticleDraft(req *types.MiniArticleDraftUpdateRequest) (resp *types.MiniArticleDraftUpdateResponse, err error) { | 30 | func (l *MiniUpdateArticleDraftLogic) MiniUpdateArticleDraft(req *types.MiniArticleDraftUpdateRequest) (resp *types.MiniArticleDraftUpdateResponse, err error) { |
30 | var conn = l.svcCtx.DefaultDBConn() | 31 | var conn = l.svcCtx.DefaultDBConn() |
31 | 32 |
@@ -2,6 +2,7 @@ package article | @@ -2,6 +2,7 @@ package article | ||
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | "context" | 4 | "context" |
5 | + | ||
5 | "github.com/samber/lo" | 6 | "github.com/samber/lo" |
6 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/interanl/pkg/domain" | 7 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/interanl/pkg/domain" |
7 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/xerr" | 8 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/xerr" |
@@ -26,6 +27,7 @@ func NewSystemArticleGetHistoryLogic(ctx context.Context, svcCtx *svc.ServiceCon | @@ -26,6 +27,7 @@ func NewSystemArticleGetHistoryLogic(ctx context.Context, svcCtx *svc.ServiceCon | ||
26 | } | 27 | } |
27 | } | 28 | } |
28 | 29 | ||
30 | +// 获取文章的编辑历史记录详情 | ||
29 | func (l *SystemArticleGetHistoryLogic) SystemArticleGetHistory(req *types.SystemArticleGetHistoryRequest) (resp *types.SystemArticleGetHistoryResponse, err error) { | 31 | func (l *SystemArticleGetHistoryLogic) SystemArticleGetHistory(req *types.SystemArticleGetHistoryRequest) (resp *types.SystemArticleGetHistoryResponse, err error) { |
30 | var conn = l.svcCtx.DefaultDBConn() | 32 | var conn = l.svcCtx.DefaultDBConn() |
31 | backup, err := l.svcCtx.ArticleBackupRepository.FindOne(l.ctx, conn, req.Id) | 33 | backup, err := l.svcCtx.ArticleBackupRepository.FindOne(l.ctx, conn, req.Id) |
@@ -2,6 +2,7 @@ package comment | @@ -2,6 +2,7 @@ package comment | ||
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | "context" | 4 | "context" |
5 | + | ||
5 | "github.com/samber/lo" | 6 | "github.com/samber/lo" |
6 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/interanl/pkg/domain" | 7 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/interanl/pkg/domain" |
7 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/xerr" | 8 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/pkg/xerr" |
@@ -26,6 +27,7 @@ func NewSystemArticleCommentSearchLogic(ctx context.Context, svcCtx *svc.Service | @@ -26,6 +27,7 @@ func NewSystemArticleCommentSearchLogic(ctx context.Context, svcCtx *svc.Service | ||
26 | } | 27 | } |
27 | } | 28 | } |
28 | 29 | ||
30 | +// 搜索文章的评论 | ||
29 | func (l *SystemArticleCommentSearchLogic) SystemArticleCommentSearch(req *types.SystemArticleCommentSearchRequest) (resp *types.SystemArticleCommentSearchResponse, err error) { | 31 | func (l *SystemArticleCommentSearchLogic) SystemArticleCommentSearch(req *types.SystemArticleCommentSearchRequest) (resp *types.SystemArticleCommentSearchResponse, err error) { |
30 | var conn = l.svcCtx.DefaultDBConn() | 32 | var conn = l.svcCtx.DefaultDBConn() |
31 | queryOptions := domain.NewQueryOptions(). | 33 | queryOptions := domain.NewQueryOptions(). |
@@ -24,6 +24,7 @@ func NewSystemGetAticleCommentLogic(ctx context.Context, svcCtx *svc.ServiceCont | @@ -24,6 +24,7 @@ func NewSystemGetAticleCommentLogic(ctx context.Context, svcCtx *svc.ServiceCont | ||
24 | } | 24 | } |
25 | } | 25 | } |
26 | 26 | ||
27 | +// 后台获取文章的评论详情 | ||
27 | func (l *SystemGetAticleCommentLogic) SystemGetAticleComment(req *types.SystemGetCommentRequest) (resp *types.SystemGetCommentResponse, err error) { | 28 | func (l *SystemGetAticleCommentLogic) SystemGetAticleComment(req *types.SystemGetCommentRequest) (resp *types.SystemGetCommentResponse, err error) { |
28 | var conn = l.svcCtx.DefaultDBConn() | 29 | var conn = l.svcCtx.DefaultDBConn() |
29 | 30 |
@@ -1223,6 +1223,7 @@ type MiniSearchArticleItem struct { | @@ -1223,6 +1223,7 @@ type MiniSearchArticleItem struct { | ||
1223 | ArticleId int64 `json:"articleId"` | 1223 | ArticleId int64 `json:"articleId"` |
1224 | Title string `json:"title"` | 1224 | Title string `json:"title"` |
1225 | Author string `json:"author"` // 发布人 | 1225 | Author string `json:"author"` // 发布人 |
1226 | + Avatar string `json:"avatar"` | ||
1226 | Images []string `json:"images"` | 1227 | Images []string `json:"images"` |
1227 | CreatedAt int64 `json:"createdAt"` | 1228 | CreatedAt int64 `json:"createdAt"` |
1228 | MeReadFlag int `json:"meReadFlag"` //已读标识 [0:未读] [1:已读] | 1229 | MeReadFlag int `json:"meReadFlag"` //已读标识 [0:未读] [1:已读] |
-
请 注册 或 登录 后发表评论