查询markdown内容或者content内容
(docId interface{}, field string)
| 66 | |
| 67 | //查询markdown内容或者content内容 |
| 68 | func (this *DocumentStore) GetFiledById(docId interface{}, field string) string { |
| 69 | var ds = DocumentStore{} |
| 70 | if field != "markdown" { |
| 71 | field = "content" |
| 72 | } |
| 73 | orm.NewOrm().QueryTable(TableDocumentStore).Filter("document_id", docId).One(&ds, field) |
| 74 | if field == "content" { |
| 75 | return ds.Content |
| 76 | } |
| 77 | return ds.Markdown |
| 78 | } |
| 79 | |
| 80 | //查询markdown内容或者content内容 |
| 81 | func (this *DocumentStore) DeleteById(docId ...interface{}) { |
no outgoing calls
no test coverage detected