查询单个分类
(id int)
| 110 | |
| 111 | //查询单个分类 |
| 112 | func (this *Category) Find(id int) (cate Category) { |
| 113 | cate.Id = id |
| 114 | orm.NewOrm().Read(&cate) |
| 115 | return cate |
| 116 | } |
| 117 | |
| 118 | // 用户收藏了的书籍的分类 |
| 119 | func (m *Category) CategoryOfUserCollection(uid int, forAPI ...bool) (cates []Category) { |