正在显示
1 个修改的文件
包含
4 行增加
和
0 行删除
@@ -120,6 +120,10 @@ func (repository *ArticleDraftRepository) Find(ctx context.Context, conn transac | @@ -120,6 +120,10 @@ func (repository *ArticleDraftRepository) Find(ctx context.Context, conn transac | ||
120 | ) | 120 | ) |
121 | queryFunc := func() (interface{}, error) { | 121 | queryFunc := func() (interface{}, error) { |
122 | tx = tx.Model(&ms).Order("id desc") | 122 | tx = tx.Model(&ms).Order("id desc") |
123 | + if v, ok := queryOptions["authorId"]; ok { | ||
124 | + tx = tx.Where("author_id", v) | ||
125 | + } | ||
126 | + | ||
123 | if total, tx = transaction.PaginationAndCount(ctx, tx, queryOptions, &ms); tx.Error != nil { | 127 | if total, tx = transaction.PaginationAndCount(ctx, tx, queryOptions, &ms); tx.Error != nil { |
124 | return dms, tx.Error | 128 | return dms, tx.Error |
125 | } | 129 | } |
-
请 注册 或 登录 后发表评论