Commit Graph
4 Commits
Author SHA1 Message Date
郭庆泰andClaude 76dd4d7306 feat(sponsor/people): 主账号同步建 biz_person (admin/总负责人), 列表可见 + 操作列对本人隐藏 + 新建下拉不包含 admin
后端:
- BizAuthController.registerSponsor step 6: 为主账号同步建 biz_person
  (走 BizPersonMapper 直插, 绕过 BizPersonServiceImpl 创 SUB 子账号的逻辑;
   SnowflakeId 注入 personId; department=管理部, position=总负责人, role=admin,
   unit_type=sponsor, user_id=主账号自己)
- BizPersonMapper.java + xml 新增 countAdminByOrgId: 校验某 org 下是否已有 admin
  (注册场景下天然返回 0, 是给未来 bug 兜底, registerSponsor 暂不调用)
- BizPersonMapper.xml selectSponsorList: WHERE 加 OR u.user_id=#{sponsorOwnerUid},
  让主账号自己的 biz_person (parent_user_id=NULL) 也能被自身 list 看到

前端:
- utils/roleMap.js: PERSON_ROLE_LABEL 加 admin:'管理员'
- sponsor/SponsorPeople.vue: 角色列改用 translatePersonRole, tag type 按 role 动态
  (admin=warning, supervisor=primary); 操作列本人隐藏 禁用/恢复 + 删除
  (v-if=row.userId !== store.user?.userId, 防主账号把自己禁用/误删)
- sponsor/NewPerson.vue: 编辑模式 role=admin 显示静态 el-tag, 新建下拉仍只含 supervisor
- sponsor/PersonDetail.vue: 角色展示同步用 translatePersonRole
- auth/Login.vue + portal/Home.vue: 文案 监察员 → 管理员 (注册即管理员, 可建监察员子账号)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-18 20:46:42 +08:00
郭庆泰 b41cf77cac feat(publicity): 公示页支持/执行意向 (匿名提交 + 管理审核)
- 新增 biz_publicity_support_intent / biz_publicity_execution_intent 两张独立表
  (与已登录视角的 biz_support_intent / biz_execution_intent 解耦, 避免匿名数据污染强绑表)
- 后端 BizPublicityIntentController: 公开提交 + 公开查重 (按 project_id+phone+source) + 管理 CRUD
  已登录直接取 user_id, 未登录但 phone 命中 sys_user 仍自动关联 user_id (不回强制登录)
- /business/publicity/** 加 Spring Security permitAll
- 前端 PublicityDetail.vue: 右侧 2 个意向按钮 (已登录/匿名都弹 dialog 填 5 字段),
  已提交状态用 hasPublicityIntent 按 phonenumber 持久化查回
- 重写 manager/SupportIntent.vue + manager/ExecIntent.vue: 列表/筛选/CSV导出/状态变更/批量删除
2026-08-17 01:15:16 +08:00
郭庆泰 ccfd03a6eb 批量推送 2026-08-16 21:24:53 +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