修复(#4): 抽奖 8 宫格默认值 + 100500 msg 脱敏

Closes part of HIF-4 (Stage 2 前端集成反馈 F8 + F10)

F8 (P1): Activity.GridSize 默认值 9 → 8
- migration 02160 ALTER DEFAULT 8(幂等)
- 02156 up.sql 注释同步更新
- admin/lottery.go 兜底值 9 → 8
- 布局 A:3x3 挖中心,中心是抽奖按钮不是奖品

F10 (P1): wrapInternal msg 脱敏
- 内部错误 err.Error() 只写日志,不外传
- 用户端 msg 只带通用文案 (xerr.MapErrMsg lookup)
- 回归护栏:TestWrapInternal_ScrubsErrorDetailsFromMsg + TestWrapInternal_PreservesCodeErrors

CI 全绿;无 API 契约变更;F9 独立在 PR #45 处理
This commit is contained in:
2026-07-12 19:55:25 -07:00
committed by GitHub
parent 980e5adb90
commit cce147108c
7 changed files with 82 additions and 5 deletions
+1 -1
View File
@@ -77,7 +77,7 @@ type Activity struct {
StartAt time.Time `gorm:"not null;comment:开始时间"`
EndAt time.Time `gorm:"not null;comment:结束时间"`
Status string `gorm:"type:varchar(16);not null;default:'draft';comment:状态"`
GridSize int `gorm:"type:tinyint;not null;default:9;comment:九宫格数量"`
GridSize int `gorm:"type:tinyint;not null;default:8;comment:九宫格数量HIF-4 F8:布局 A 3×3 挖中心 → 8 个奖品格)"`
Eligibility string `gorm:"type:json;not null;comment:参与门槛(AND/OR 嵌套规则)"`
ChanceSources string `gorm:"type:json;not null;comment:次数来源列表"`
UnmetAction string `gorm:"type:varchar(32);not null;default:'block';comment:未达门槛策略"`