MCPcopy Index your code
hub / github.com/TruthHun/BookStack / DoesStar

Method DoesStar

models/star.go:75–84  ·  view source on GitHub ↗

是否收藏了文档

(uid, bid interface{})

Source from the content-addressed store, hash-verified

73
74//是否收藏了文档
75func (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//获取收藏列表,查询书籍信息
87func (this *Star) List(uid, p, listRows int, cid int, order ...string) (cnt int64, books []StarResult, err error) {

Callers 1

BookInfoMethod · 0.80

Calls 1

ReadMethod · 0.45

Tested by

no test coverage detected