fix: 优化关卡排序
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
2. **单关进度上报**:`POST /api/v1/share/progress` 接口,用于上报用户单关通关状态和时间
|
||||
3. **进度查询**:`reportLevelProgress` 返回是否在时间限制内通过
|
||||
4. **我创建的挑战列表**:`GET /api/v1/share/created` 接口,用于查询当前用户创建过的分享挑战、参与人数和本人排名
|
||||
5. **关卡排序**:关卡全局顺序按 `levels.sort_key` 的应用层字节序计算,接口中的 `sortOrder` 为排序后的 0-based 连续序号
|
||||
|
||||
---
|
||||
|
||||
@@ -273,6 +274,7 @@ Content-Type: application/json
|
||||
**特殊逻辑**:
|
||||
|
||||
- 如果 `userId` 与分享创建者相同,不会创建 `ShareParticipant` 记录
|
||||
- `levels` 数组顺序保持分享创建时传入的 `levelIds` 顺序;每个关卡的 `sortOrder` 字段为按 `levels.sort_key` 全局排序后回填的 0-based 连续序号
|
||||
- 返回的关卡列表按 `levelIds` 创建时的顺序排列
|
||||
|
||||
**客户端调用场景**:
|
||||
|
||||
Reference in New Issue
Block a user