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

Method IsContinuousSign

models/sign.go:86–92  ·  view source on GitHub ↗

是否未断签

(uid int)

Source from the content-addressed store, hash-verified

84
85// 是否未断签
86func (m *Sign) IsContinuousSign(uid int) bool {
87 s := &Sign{}
88 now := time.Now()
89 yesterday := now.Add(-24 * time.Hour).Format(signDayLayout)
90 orm.NewOrm().QueryTable(m).Filter("uid", uid).Filter("day", yesterday).One(s)
91 return s.Id > 0
92}
93
94// 执行签到。使用事务
95func (m *Sign) Sign(uid int, fromApp bool) (reward int, err error) {

Callers 1

SignMethod · 0.95

Calls 1

AddMethod · 0.45

Tested by

no test coverage detected