作者 tangxvhui

添加注释

正在显示 25 个修改的文件 包含 27 行增加0 行删除
@@ -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
@@ -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