实现单页文章功能

This commit is contained in:
lifei6671
2018-07-13 19:04:51 +08:00
parent 3f6555ac82
commit 96ba414dd8
13 changed files with 642 additions and 4 deletions

View File

@@ -220,3 +220,9 @@ func (m *Document) FindListByBookId(bookId int) (docs []*Document, err error) {
return
}
//判断文章是否存在
func (m *Document) IsExist(documentId int) bool {
o := orm.NewOrm()
return o.QueryTable(m.TableNameWithPrefix()).Filter("document_id",documentId).Exist()
}