refactor: 重构奖励发放逻辑并支持签到默认奖励
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed

This commit is contained in:
xinian
2026-04-06 03:42:48 +08:00
committed by cnb
parent 40ec827342
commit 99748ba41e
7 changed files with 250 additions and 137 deletions

View File

@@ -12,6 +12,7 @@ import (
)
var signStageDays = map[uint32]struct{}{
0: {},
1: {},
3: {},
7: {},
@@ -50,7 +51,7 @@ func (s *SignInService) ModifyBefore(ctx context.Context, method string, param g
stageDays := gconv.Uint32(param["stage_days"])
if _, ok := signStageDays[stageDays]; !ok {
return fmt.Errorf("签到阶段仅支持1、3、7、14、30天")
return fmt.Errorf("签到阶段仅支持0、1、3、7、14、30天")
}
cdkID := gconv.Uint32(param["cdk_id"])