feat(#4): 抽奖中奖用户文案调整
- 免费时长: 用户消息改为「稍后您的 N 天免费时长将会自动添加至您的账户。 如果超过24小时未添加成功,请联系人工客服处理。」(N=中奖天数动态) ledger.payload.message 仍保留descriptive内部文案供后台对账 - 人工发放(crypto/manual): 消息改为「请凭此截图直接联系人工客服兑换奖励。」 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -422,12 +422,12 @@ func (s *Service) dispatchOrEnqueueClaim(ctx context.Context, tx *gorm.DB, req R
|
||||
return lottery.DispatchResult{State: lottery.DispatchStateAutoClaimed, Message: "谢谢参与"}, pendingClaimInfo{}, nil
|
||||
}
|
||||
if s.deps.Registry == nil {
|
||||
return lottery.DispatchResult{State: lottery.DispatchStatePendingClaim, Message: "等待人工发放"}, pendingClaimInfo{}, nil
|
||||
return lottery.DispatchResult{State: lottery.DispatchStatePendingClaim, Message: "请凭此截图直接联系人工客服兑换奖励。"}, pendingClaimInfo{}, nil
|
||||
}
|
||||
prizeHandler, err := s.deps.Registry.MustGet(prize.Type)
|
||||
if err != nil {
|
||||
if errors.Is(err, lottery.ErrHandlerNotRegistered) {
|
||||
return lottery.DispatchResult{State: lottery.DispatchStatePendingClaim, Message: "等待人工发放"}, pendingClaimInfo{}, nil
|
||||
return lottery.DispatchResult{State: lottery.DispatchStatePendingClaim, Message: "请凭此截图直接联系人工客服兑换奖励。"}, pendingClaimInfo{}, nil
|
||||
}
|
||||
return lottery.DispatchResult{}, pendingClaimInfo{}, wrapInternal(err)
|
||||
}
|
||||
@@ -472,7 +472,7 @@ func (s *Service) dispatchOrEnqueueClaim(ctx context.Context, tx *gorm.DB, req R
|
||||
}
|
||||
return lottery.DispatchResult{
|
||||
State: lottery.DispatchStatePendingClaim,
|
||||
Message: "等待填写领奖信息",
|
||||
Message: "请凭此截图直接联系人工客服兑换奖励。",
|
||||
}, pendingClaimInfo{
|
||||
ExpiresAt: expiresAt,
|
||||
ClaimFormSchema: schema,
|
||||
|
||||
@@ -1008,7 +1008,7 @@ func TestDraw_E2E_VPNDurationAutoCreatesSubscription(t *testing.T) {
|
||||
if !res.Claim.AutoClaimed {
|
||||
t.Fatalf("expected AutoClaimed=true, got %+v", res.Claim)
|
||||
}
|
||||
if res.Message != "已新建订阅并加 5 天" {
|
||||
if !strings.Contains(res.Message, "免费时长将会自动添加") {
|
||||
t.Fatalf("expected auto-create message, got %q", res.Message)
|
||||
}
|
||||
if res.Prize == nil || res.Prize.Type != lottery.PrizeTypeVPNDuration {
|
||||
@@ -1072,7 +1072,7 @@ func TestDraw_E2E_VPNDurationNoPlanSkipsGrant(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("Draw: %v", err)
|
||||
}
|
||||
if !strings.Contains(res.Message, "跳过") {
|
||||
if !strings.Contains(res.Message, "免费时长将会自动添加") {
|
||||
t.Fatalf("expected skip message, got %q", res.Message)
|
||||
}
|
||||
if err := mock.ExpectationsWereMet(); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user