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

Method UpdateSignRule

models/sign.go:187–202  ·  view source on GitHub ↗

更新签到奖励规则

()

Source from the content-addressed store, hash-verified

185
186// 更新签到奖励规则
187func (m *Sign) UpdateSignRule() {
188 ops := []string{"SIGN_BASIC_REWARD", "SIGN_APP_REWARD", "SIGN_CONTINUOUS_REWARD", "SIGN_CONTINUOUS_MAX_REWARD"}
189 for _, op := range ops {
190 num, _ := strconv.Atoi(GetOptionValue(op, ""))
191 switch op {
192 case "SIGN_BASIC_REWARD":
193 _rule.BasicReward = num
194 case "SIGN_APP_REWARD":
195 _rule.AppReward = num
196 case "SIGN_CONTINUOUS_REWARD":
197 _rule.ContinuousReward = num
198 case "SIGN_CONTINUOUS_MAX_REWARD":
199 _rule.MaxContinuousReward = num
200 }
201 }
202}
203
204func (m *Sign) Sorted(limit int, orderField string, withCache ...bool) (members []Member) {
205 var b []byte

Callers 2

SettingMethod · 0.80
InitFunction · 0.80

Calls 1

GetOptionValueFunction · 0.85

Tested by

no test coverage detected