作者 庄敏学

文章排序

... ... @@ -136,6 +136,8 @@ func (repository *ArticleRepository) Find(ctx context.Context, conn transaction.
default:
tx = tx.Order("created_at desc")
}
} else {
tx = tx.Order("created_at desc")
}
if v, ok := queryOptions["ids"]; ok {
tx = tx.Where("id in (?)", v)
... ...