Files
platforms/docs/操作日志_配送点订单合同空列表修复_20260831.md
2026-08-31 20:49:51 +08:00

31 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 操作日志:配送点订单合同空列表修复
操作时间2026-08-31
操作类型:修改
影响模块:配送点订单创建、配送合同候选列表
## 操作前状态
没有可履约合同时,合同查询结果为 nil 切片,公开响应序列化成 `null`,随后被列表结构校验拒绝。
## 具体操作
1. 将合同查询接收容器初始化为空切片。
2. 增加零条合同的回归测试,要求返回非 nil 空数组。
3. 保持接口路径、筛选条件和响应字段不变。
## 操作后状态
无可用合同时接口正常返回 `total: 0``list: []`,页面只显示无可用合同提示。
## 验证结果
- `go test ./api/internal/logic/delivery`:通过。
- 新增空合同列表用例,确认公开响应为非 nil 空数组。
- 后端已重新构建并重启12426 端口监听正常。
- 浏览器会话的原登录令牌已失效并跳转登录页,登录后页面验证待执行。
## 风险评估
变更仅影响零条记录的序列化形式;有数据列表和合同筛选逻辑不变,兼容风险低。