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

Method GetList

models/friendlink.go:44–51  ·  view source on GitHub ↗

查询友链列表 all表示是否查询全部,当为false时,只查询启用状态的友链,否则查询全部

(all bool)

Source from the content-addressed store, hash-verified

42//查询友链列表
43//all表示是否查询全部,当为false时,只查询启用状态的友链,否则查询全部
44func (this *FriendLink) GetList(all bool) (links []FriendLink) {
45 qs := orm.NewOrm().QueryTable("md_friend_link")
46 if !all {
47 qs = qs.Filter("status", 1)
48 }
49 qs.OrderBy("-status").OrderBy("sort").All(&links)
50 return
51}

Callers 2

ListMethod · 0.80
FriendLinkMethod · 0.80

Calls 1

AllMethod · 0.45

Tested by

no test coverage detected