mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-12-19 19:57:09 +08:00
feat:1、增加文档和文章的危险标签和属性过滤
2、移除文档的客户端缓存
This commit is contained in:
@@ -25,14 +25,14 @@ type DocumentSelected struct {
|
||||
}
|
||||
|
||||
//获取项目的文档树状结构
|
||||
func (m *Document) FindDocumentTree(bookId int) ([]*DocumentTree, error) {
|
||||
func (item *Document) FindDocumentTree(bookId int) ([]*DocumentTree, error) {
|
||||
o := orm.NewOrm()
|
||||
|
||||
trees := make([]*DocumentTree, 0)
|
||||
|
||||
var docs []*Document
|
||||
|
||||
count, err := o.QueryTable(m).Filter("book_id", bookId).OrderBy("order_sort", "document_id").Limit(math.MaxInt32).All(&docs, "document_id", "version", "document_name", "parent_id", "identify","is_open")
|
||||
count, err := o.QueryTable(item).Filter("book_id", bookId).OrderBy("order_sort", "document_id").Limit(math.MaxInt32).All(&docs, "document_id", "version", "document_name", "parent_id", "identify","is_open")
|
||||
|
||||
if err != nil {
|
||||
return trees, err
|
||||
@@ -68,8 +68,8 @@ func (m *Document) FindDocumentTree(bookId int) ([]*DocumentTree, error) {
|
||||
return trees, nil
|
||||
}
|
||||
|
||||
func (m *Document) CreateDocumentTreeForHtml(bookId, selectedId int) (string, error) {
|
||||
trees, err := m.FindDocumentTree(bookId)
|
||||
func (item *Document) CreateDocumentTreeForHtml(bookId, selectedId int) (string, error) {
|
||||
trees, err := item.FindDocumentTree(bookId)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user