(docId int)
| 74 | } |
| 75 | |
| 76 | func (m *Attachment) FindListByDocumentId(docId int) (attaches []*Attachment, err error) { |
| 77 | o := orm.NewOrm() |
| 78 | _, err = o.QueryTable(m.TableNameWithPrefix()).Filter("document_id", docId).OrderBy("-attachment_id").All(&attaches) |
| 79 | return |
| 80 | } |
| 81 | |
| 82 | //分页查询附件 |
| 83 | func (m *Attachment) FindToPager(pageIndex, pageSize int) (attachList []*AttachmentResult, totalCount int64, err error) { |
no test coverage detected