1、优化文档缓存逻辑

2、新增标签管理功能
3、优化部分页面显示效果
This commit is contained in:
Minho
2018-02-28 15:47:00 +08:00
parent 849058ff8a
commit b93052cc09
25 changed files with 365 additions and 111 deletions

View File

@@ -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
}