作者 yangfu

Merge branch 'dev' into test

@@ -80,10 +80,10 @@ type ( @@ -80,10 +80,10 @@ type (
80 } 80 }
81 ArticleSection { 81 ArticleSection {
82 Id int64 `json:"id"` //段落id 82 Id int64 `json:"id"` //段落id
83 - Content string `json:"content"` // 文本内容 83 + Content string `json:"content,optional"` // 文本内容
84 SortBy int `json:"sortBy"` // 排序 84 SortBy int `json:"sortBy"` // 排序
85 TotalComment int `json:"totalComment"` // 评论的数量 85 TotalComment int `json:"totalComment"` // 评论的数量
86 - Images []string `json:"images"` // 照片列表 86 + Images []string `json:"images,optional"` // 照片列表
87 ParagraphType int `json:"paragraphType"` // 段落类型 0:无样式 1:模板文本 2:模板图片 87 ParagraphType int `json:"paragraphType"` // 段落类型 0:无样式 1:模板文本 2:模板图片
88 ParagraphTemplate Paragraph `json:"paragraphTemplate"` // 段落模板 88 ParagraphTemplate Paragraph `json:"paragraphTemplate"` // 段落模板
89 } 89 }
@@ -494,7 +494,7 @@ type ( @@ -494,7 +494,7 @@ type (
494 Template int `json:"template,optional"` // 使用哪个模板进行编辑 0、无 1、演绎式 2、归纳式 494 Template int `json:"template,optional"` // 使用哪个模板进行编辑 0、无 1、演绎式 2、归纳式
495 Section []ArticleSection `json:"section,optional"` // 填写的内容 495 Section []ArticleSection `json:"section,optional"` // 填写的内容
496 Title string `json:"title"` // 标题 496 Title string `json:"title"` // 标题
497 - Images []string `json:"images"` // 图片 497 + Images []string `json:"images,optional"` // 图片
498 Videos []Video `json:"video"` // 视频 498 Videos []Video `json:"video"` // 视频
499 WhoRead []int64 `json:"whoRead"` // 谁可以看 499 WhoRead []int64 `json:"whoRead"` // 谁可以看
500 WhoReview []int64 `json:"whoReview"` // 评论人 500 WhoReview []int64 `json:"whoReview"` // 评论人
@@ -2,6 +2,7 @@ package article @@ -2,6 +2,7 @@ package article
2 2
3 import ( 3 import (
4 "context" 4 "context"
  5 + "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/api/internal/logic/core"
5 6
6 "github.com/samber/lo" 7 "github.com/samber/lo"
7 "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/interanl/pkg/domain" 8 "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/interanl/pkg/domain"
@@ -58,10 +59,13 @@ func (l *SystemArticleGetHistoryLogic) SystemArticleGetHistory(req *types.System @@ -58,10 +59,13 @@ func (l *SystemArticleGetHistoryLogic) SystemArticleGetHistory(req *types.System
58 //文章段落内容 59 //文章段落内容
59 lo.ForEach(backup.Section, func(item domain.ArticleSection, index int) { 60 lo.ForEach(backup.Section, func(item domain.ArticleSection, index int) {
60 resp.Section = append(resp.Section, types.ArticleSection{ 61 resp.Section = append(resp.Section, types.ArticleSection{
61 - Id: item.Id,  
62 - Content: item.Content,  
63 - SortBy: item.SortBy,  
64 - TotalComment: item.TotalComment, 62 + Id: item.Id,
  63 + Content: item.Content,
  64 + SortBy: item.SortBy,
  65 + TotalComment: item.TotalComment,
  66 + Images: item.Images,
  67 + ParagraphTemplate: core.NewTypesParagraph(item.ParagraphTemplate),
  68 + ParagraphType: item.ParagraphType,
65 }) 69 })
66 }) 70 })
67 //图片 71 //图片
@@ -1004,10 +1004,10 @@ type MiniArticleGetResponse struct { @@ -1004,10 +1004,10 @@ type MiniArticleGetResponse struct {
1004 1004
1005 type ArticleSection struct { 1005 type ArticleSection struct {
1006 Id int64 `json:"id"` //段落id 1006 Id int64 `json:"id"` //段落id
1007 - Content string `json:"content"` // 文本内容 1007 + Content string `json:"content,optional"` // 文本内容
1008 SortBy int `json:"sortBy"` // 排序 1008 SortBy int `json:"sortBy"` // 排序
1009 TotalComment int `json:"totalComment"` // 评论的数量 1009 TotalComment int `json:"totalComment"` // 评论的数量
1010 - Images []string `json:"images"` // 照片列表 1010 + Images []string `json:"images,optional"` // 照片列表
1011 ParagraphType int `json:"paragraphType"` // 段落类型 0:无样式 1:模板文本 2:模板图片 1011 ParagraphType int `json:"paragraphType"` // 段落类型 0:无样式 1:模板文本 2:模板图片
1012 ParagraphTemplate Paragraph `json:"paragraphTemplate"` // 段落模板 1012 ParagraphTemplate Paragraph `json:"paragraphTemplate"` // 段落模板
1013 } 1013 }
@@ -1373,7 +1373,7 @@ type SystemArticleUpdateRequest struct { @@ -1373,7 +1373,7 @@ type SystemArticleUpdateRequest struct {
1373 Template int `json:"template,optional"` // 使用哪个模板进行编辑 0、无 1、演绎式 2、归纳式 1373 Template int `json:"template,optional"` // 使用哪个模板进行编辑 0、无 1、演绎式 2、归纳式
1374 Section []ArticleSection `json:"section,optional"` // 填写的内容 1374 Section []ArticleSection `json:"section,optional"` // 填写的内容
1375 Title string `json:"title"` // 标题 1375 Title string `json:"title"` // 标题
1376 - Images []string `json:"images"` // 图片 1376 + Images []string `json:"images,optional"` // 图片
1377 Videos []Video `json:"video"` // 视频 1377 Videos []Video `json:"video"` // 视频
1378 WhoRead []int64 `json:"whoRead"` // 谁可以看 1378 WhoRead []int64 `json:"whoRead"` // 谁可以看
1379 WhoReview []int64 `json:"whoReview"` // 评论人 1379 WhoReview []int64 `json:"whoReview"` // 评论人