Browse Source

排序

pull/2425/head
ychao_1983 2 years ago
parent
commit
487d1aef53
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      models/attachment.go

+ 2
- 1
models/attachment.go View File

@@ -587,8 +587,9 @@ func AttachmentsByDatasetOption(datasets []int64, opts *SearchDatasetOptions) ([
) )
} }



attachments := make([]*Attachment, 0) attachments := make([]*Attachment, 0)
if err := sess.Table(&Attachment{}).Where(cond).
if err := sess.Table(&Attachment{}).Where(cond).Desc("id").
Find(&attachments); err != nil { Find(&attachments); err != nil {
return nil, fmt.Errorf("Find: %v", err) return nil, fmt.Errorf("Find: %v", err)
} }


Loading…
Cancel
Save