是否收藏了文档
(uid, bid interface{})
| 73 | |
| 74 | //是否收藏了文档 |
| 75 | func (this *Star) DoesStar(uid, bid interface{}) bool { |
| 76 | var star Star |
| 77 | star.Uid, _ = strconv.Atoi(fmt.Sprintf("%v", uid)) |
| 78 | star.Bid, _ = strconv.Atoi(fmt.Sprintf("%v", bid)) |
| 79 | orm.NewOrm().Read(&star, "Uid", "Bid") |
| 80 | if star.Id > 0 { |
| 81 | return true |
| 82 | } |
| 83 | return false |
| 84 | } |
| 85 | |
| 86 | //获取收藏列表,查询书籍信息 |
| 87 | func (this *Star) List(uid, p, listRows int, cid int, order ...string) (cnt int64, books []StarResult, err error) { |