fix(clothes): 保护失败原因并可靠回退额度

仅属主可查看失败原因,分享只读场景置空;额度回退改用独立
ctx,避免客户端断开导致回退失败;新增 ImageProcessStatus 与
FailReason 响应字段,并抽取 detachedCtx 复用后台任务上下文。
This commit is contained in:
2026-09-16 02:01:19 +08:00
parent b2e5eef3c8
commit e9b9754b57
5 changed files with 299 additions and 22 deletions
+4
View File
@@ -401,6 +401,10 @@ Authorization: Bearer <access_token>
| name | string | 名称 |
| remark | string | 备注 |
| processed_image | string | 抠图后的图片完整 URL(可直接展示) |
| image_process_status | int | 处理状态:`1`=抠图中 `2`=分类中 `3`=排队中 `4`=成功 `5`=失败 |
| fail_reason | string | 处理失败原因;**仅属主可见**,非属主(穿搭分享 / 衣柜分享只读)场景为空串 |
> 衣物**列表与详情**响应均带 `image_process_status`:前端应据此区分「处理中(1/2/3)」与「处理失败(5)」,不要用属性/图片是否为空来推断。`fail_reason` 仅在属主场景返回。
### 4.3 穿搭对象 `OutfitItem`