mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-09-22 20:23:35 +08:00
实现单页文章功能
This commit is contained in:
@@ -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()
|
||||
}
|
Reference in New Issue
Block a user