作者 tangxvhui

Merge branch 'dev' into test

@@ -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 }