Files
platforms/docs/操作日志_配送点用户名重复提示_20260831.md
2026-08-31 20:49:51 +08:00

30 lines
933 B
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
操作类型:修改
影响模块:配送点用户管理—新建用户
## 操作前状态
重复用户名直接向页面返回 PostgreSQL 唯一约束错误及 SQLSTATE。
## 具体操作
1. 识别用户名约束 `idx_user_account_username``23505` 冲突。
2. 将该冲突转换为“用户名已存在,请更换用户名”。
3. 其他数据库错误保持原有处理,避免扩大本次变更范围。
## 操作后状态
重复创建同名用户时页面显示明确中文提示,不再显示该约束的数据库英文错误。
## 验证结果
- `go test ./api/internal/logic/delivery`:通过。
- 已覆盖包装后的 PostgreSQL `23505` 用户名约束冲突。
- 已验证其他错误保持原样。
## 风险评估
仅改变一个已知唯一约束冲突的提示文本,不影响成功创建路径与其他错误类型。