更新签到奖励规则
()
| 321 | |
| 322 | // 更新签到奖励规则 |
| 323 | func (*ReadRecord) UpdateReadingRule() { |
| 324 | ops := []string{"READING_MIN_INTERVAL", "READING_MAX_INTERVAL", "READING_INTERVAL_MAX_REWARD", "READING_INVALID_INTERVAL"} |
| 325 | for _, op := range ops { |
| 326 | num, _ := strconv.Atoi(GetOptionValue(op, "")) |
| 327 | switch op { |
| 328 | case "READING_MIN_INTERVAL": |
| 329 | _readingRule.Min = num |
| 330 | case "READING_MAX_INTERVAL": |
| 331 | _readingRule.Max = num |
| 332 | case "READING_INTERVAL_MAX_REWARD": |
| 333 | _readingRule.MaxReward = num |
| 334 | case "READING_INVALID_INTERVAL": |
| 335 | _readingRule.Invalid = num |
| 336 | } |
| 337 | } |
| 338 | } |
| 339 | |
| 340 | // 获取阅读计时规则 |
| 341 | func (*ReadRecord) GetReadingRule() (r *ReadingRule) { |
no test coverage detected