正在显示
1 个修改的文件
包含
2 行增加
和
0 行删除
@@ -136,6 +136,8 @@ func (repository *ArticleRepository) Find(ctx context.Context, conn transaction. | @@ -136,6 +136,8 @@ func (repository *ArticleRepository) Find(ctx context.Context, conn transaction. | ||
136 | default: | 136 | default: |
137 | tx = tx.Order("created_at desc") | 137 | tx = tx.Order("created_at desc") |
138 | } | 138 | } |
139 | + } else { | ||
140 | + tx = tx.Order("created_at desc") | ||
139 | } | 141 | } |
140 | if v, ok := queryOptions["ids"]; ok { | 142 | if v, ok := queryOptions["ids"]; ok { |
141 | tx = tx.Where("id in (?)", v) | 143 | tx = tx.Where("id in (?)", v) |
-
请 注册 或 登录 后发表评论