refactor: 移除 Rock 发货处理中状态,新增异常派生筛选标记

- 新增迁移 028:历史 redeeming 回退为 bound,重建 pending 部分索引
- pending 语义改为 bound + redeem_requested_at 标记,不再写状态与状态日志
- 新增 anomaly 虚拟筛选项:基于状态日志派生异常标记,不改状态、不落库
- 状态列追加「⚠️ 异常」标签,统计新增 anomaly_stock
- 清理前后端 redeeming 相关分支与文案
This commit is contained in:
2026-11-14 15:40:19 +08:00
parent f0dea6a583
commit a9473990be
25 changed files with 620 additions and 219 deletions
-2
View File
@@ -45,7 +45,6 @@ func (s *RockService) AssignTokenForOrder(ctx context.Context, orderNo, expected
Where("assigned_order_no = ? AND status IN ?", orderNo, []string{
model.RockStatusUsing,
model.RockStatusBound,
model.RockStatusRedeeming,
model.RockStatusMismatch,
model.RockStatusRedeemed,
model.RockStatusAbnormal,
@@ -61,7 +60,6 @@ func (s *RockService) AssignTokenForOrder(ctx context.Context, orderNo, expected
switch token.Status {
case model.RockStatusAbnormal:
return nil, nil, errors.New(rockOrderTokenLockedMessage)
case model.RockStatusRedeeming:
return nil, nil, errors.New("该订单已提交发货,上游官方处理中,不能再次领取提货号")
case model.RockStatusRedeemed:
return nil, nil, errors.New("该订单已发货,不能再次领取提货号")