作者 yangfu

feat: 附件

@@ -99,6 +99,9 @@ func (bk *ArticleBackup) CheckChangeField(oldBackup *ArticleBackup) bool { @@ -99,6 +99,9 @@ func (bk *ArticleBackup) CheckChangeField(oldBackup *ArticleBackup) bool {
99 if !reflect.DeepEqual(oldBackup.WhoReview, bk.WhoReview) { 99 if !reflect.DeepEqual(oldBackup.WhoReview, bk.WhoReview) {
100 bk.ChangeField = append(bk.ChangeField, "WhoReview") 100 bk.ChangeField = append(bk.ChangeField, "WhoReview")
101 } 101 }
  102 + if !reflect.DeepEqual(oldBackup.Attachments, bk.Attachments) {
  103 + bk.ChangeField = append(bk.ChangeField, "Attachments")
  104 + }
102 } 105 }
103 //比较段落内容+图片+视频 是否发生变更 106 //比较段落内容+图片+视频 是否发生变更
104 { 107 {
@@ -181,6 +184,7 @@ func (bk *ArticleBackup) MakeBackup(operator UserSimple, article *Article, secti @@ -181,6 +184,7 @@ func (bk *ArticleBackup) MakeBackup(operator UserSimple, article *Article, secti
181 Section: sectionBackup, 184 Section: sectionBackup,
182 Images: make([]Image, len(article.Images)), 185 Images: make([]Image, len(article.Images)),
183 Videos: make([]Video, len(article.Videos)), 186 Videos: make([]Video, len(article.Videos)),
  187 + Attachments: article.Attachments,
184 Action: action, 188 Action: action,
185 TargetUser: article.TargetUser, 189 TargetUser: article.TargetUser,
186 WhoRead: article.WhoRead, 190 WhoRead: article.WhoRead,