作者 Administrator

合并分支 'test' 到 'master'

Test



查看合并请求 !3
@@ -86,13 +86,23 @@ func (l *MiniArticleBackupSearchLogic) MiniArticleBackupSearch(req *types.MiniAr @@ -86,13 +86,23 @@ func (l *MiniArticleBackupSearchLogic) MiniArticleBackupSearch(req *types.MiniAr
86 case "WhoReview": 86 case "WhoReview":
87 changeFiled = append(changeFiled, "修改了评论范围") 87 changeFiled = append(changeFiled, "修改了评论范围")
88 case "Section": 88 case "Section":
89 - item.Title = backupList[i].Title  
90 - item.Content = content.String()  
91 - item.Images = images  
92 - item.Videos = videos 89 + {
  90 + item.Title = backupList[i].Title
  91 + item.Content = content.String()
  92 + item.Images = images
  93 + item.Videos = videos
  94 + }
  95 +
93 } 96 }
94 } 97 }
95 - item.ChangeField = changeFiled 98 + if len(changeFiled) > 0 {
  99 + item.ChangeField = changeFiled
  100 + } else {
  101 + item.Title = backupList[i].Title
  102 + item.Content = content.String()
  103 + item.Images = images
  104 + item.Videos = videos
  105 + }
96 resp.List[i] = item 106 resp.List[i] = item
97 107
98 } 108 }
@@ -134,7 +134,7 @@ func (repository *ArticleRepository) Find(ctx context.Context, conn transaction. @@ -134,7 +134,7 @@ func (repository *ArticleRepository) Find(ctx context.Context, conn transaction.
134 case "countLove descending": 134 case "countLove descending":
135 tx = tx.Order("count_love desc") 135 tx = tx.Order("count_love desc")
136 default: 136 default:
137 - tx = tx.Order("id desc") 137 + tx = tx.Order("created_at desc")
138 } 138 }
139 } 139 }
140 if v, ok := queryOptions["ids"]; ok { 140 if v, ok := queryOptions["ids"]; ok {