Commit Graph
3 Commits
Author SHA1 Message Date
郭庆泰andClaude 0f1d130397 fix(expert): 编辑保存失败 Updates:0 + 错误 toast 弹两次
两个根因:

1. 后端 Updates: 0
   - ExpertNew.vue (admin+manager) onSave 编辑分支里 delete payload.expertId
   - 后端 BizExpertMapper.updateByPrimaryKey 是 where expert_id = #{expertId}
   - 没有 expertId → WHERE 不匹配 → 0 updates → 抛 "操作失败" 500
   - 修复: 不再 delete expertId (后端 insert/update 都依赖该字段)

2. 前端操作失败弹两次
   - request.js 响应拦截器在 code != 200 时自动 ElMessage.error
   - onSave 的 catch 又 ElMessage.error 一次
   - 修复: 加 __silentError 请求配置项, 拦截器遇此 flag 不自动 toast
   - api/public.js bizAdd/bizUpdate 加第 3 参数 opts 透传给 request
   - ExpertNew.vue onSave 调用时传 __silentError: true, 由 catch 块按业务语义
     决定 黄警 (手机号重复) 还是 红错 (其它)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-17 00:43:40 +08:00
郭庆泰 0c093076a4 批量推送 2026-08-16 13:42:26 +08:00
郭庆泰 cf5790229a refactor: 合并 biz_support_unit/biz_execution_unit/biz_service_org 为 biz_org, 删除 2 张孤儿表, 改 biz_person.work_unit → org_id FK
主要改动:
- SQL: biz_support_unit → biz_org, 加 org_type, 加 business_nature; 删 biz_execution_unit, biz_service_org
- SQL: biz_project.support_unit_id/name + service_org_id/name → org_id/name/type
- SQL: biz_meeting.support_unit_name → org_name
- SQL: biz_person.work_unit → org_id (FK)
- 后端: 新 BizOrg entity/mapper/service/controller
- 后端: BizProject/BizMeeting 字段重命名
- 后端: 删 12 个 BizSupportUnit/BizExecutionUnit/BizServiceOrg Java 文件
- 后端: BizPersonImportVO.workUnit → orgName (导入时查 biz_org 取 org_id)
- 后端: BizAuthController.registerExecutor 完整实现 (原 registerSupplier stub)
- 前端: 新 admin/Orgs.vue + manager/Orgs.vue (原 SupportUnits)
- 前端: RegisterExecutor.vue (原 RegisterSupplier, 单页 2 步)
- 前端: sponsor/executor/manager 多个文件 workUnit → orgId/orgName 重命名
- 前端: 统一 supplier → executor, 业务命名 sponsor(赞助方) / executor(执行方=供应商)
- 前端: 全工程 execution → executor (company type / role / person unit_type)
2026-08-15 12:41:10 +08:00