PayrollManagementSystem/backend/app
liuwenxin 91fc6f6293 fix(product): 删除引用保护/单价小数位校验,IntegrityError 全局兜底转 400
- delete_product 补 count_refs 引用检查(业务明细+发货明细 RESTRICT
  外键)与并发窗口 IntegrityError→400 兜底(customer 先例同构),
  docstring 与两个 api 层过时注释同步更新
- 产品 schema 复用 schemas/business._check_amount:sale_price 走
  (PRICE_MAX, scale=4)、stock_quantity 走 AMOUNT_MAX——此前私写
  _parse_non_negative 不查小数位与容量,5 位小数被 Numeric(14,4)
  静默截断(舍入即算错钱);新增 6 个秒级 schema 单测锁定口径
- 全局注册 IntegrityError handler:漏补引用保护的删除类操作收敛为
  400 通用文案(e2e 撞见一个补一个的模式无法保证全覆盖),完整
  异常记日志;rating/customer 的「非 1062 按 500」注释同步更正

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-14 18:48:32 +08:00
..
api fix(product): 删除引用保护/单价小数位校验,IntegrityError 全局兜底转 400 2026-10-14 18:48:32 +08:00
core fix(product): 删除引用保护/单价小数位校验,IntegrityError 全局兜底转 400 2026-10-14 18:48:32 +08:00
models feat(business): 新增业务数据七表及 V5 迁移(业务/明细/状态留痕/发货/回款/评级配置) 2026-10-13 11:22:34 +08:00
repositories fix(product): 删除引用保护/单价小数位校验,IntegrityError 全局兜底转 400 2026-10-14 18:48:32 +08:00
schemas fix(product): 删除引用保护/单价小数位校验,IntegrityError 全局兜底转 400 2026-10-14 18:48:32 +08:00
services fix(product): 删除引用保护/单价小数位校验,IntegrityError 全局兜底转 400 2026-10-14 18:48:32 +08:00
__init__.py chore: 初始化项目结构与登录鉴权模块 2026-10-09 18:46:36 +08:00
cli.py chore: 初始化项目结构与登录鉴权模块 2026-10-09 18:46:36 +08:00
main.py chore: 初始化项目结构与登录鉴权模块 2026-10-09 18:46:36 +08:00