mirror of
https://github.com/mindoc-org/mindoc.git
synced 2026-02-27 17:03:57 +08:00
1、优化文档缓存逻辑
2、新增标签管理功能 3、优化部分页面显示效果
This commit is contained in:
@@ -72,6 +72,16 @@ func (m *Label) InsertOrUpdateMulti(labels string) {
|
||||
}
|
||||
}
|
||||
}
|
||||
//删除标签
|
||||
func (m *Label) Delete() error {
|
||||
o := orm.NewOrm()
|
||||
_,err := o.Raw("DELETE FROM " + m.TableNameWithPrefix() + " WHERE label_id= ?",m.LabelId).Exec()
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
//分页查找标签.
|
||||
func (m *Label) FindToPager(pageIndex, pageSize int) (labels []*Label, totalCount int, err error) {
|
||||
@@ -90,3 +100,7 @@ func (m *Label) FindToPager(pageIndex, pageSize int) (labels []*Label, totalCoun
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user