zizi c74aa7dab6 refactor(rename): yudao 命名空间整体改名 com.wanxiang.huijing(公司 Wanxiang / 项目 Huijing)
- 包根 cn.iocoder.yudao → com.wanxiang.huijing;业务 cn.wanxiang.game → com.wanxiang.huijing.game(统一单一命名空间)
- groupId cn.iocoder.cloud → com.wanxiang;artifactId + 模块目录 yudao-* → huijing-*(含 huijing-server/framework/gateway/dependencies)
- 类名 Yudao* → Huijing*(44 个);配置前缀 yudao.* → huijing.*(Tier A 标识符 + Tier B 配置)
- 排除不动:Flyway 迁移脚本(不可变历史,保 checksum)、上游归属 URL/LICENSE、DB 表名(真表 system_*/game_*,无 yudao_ 业务表)
- 范围:game-cloud + game-admin。范围外 contracts/docs/.agents 的 yudao 引用=文档漂移,后续单独清(Opus H4 判不阻断)

评审:Opus 对抗复审(逮 Flyway checksum Blocker→已修排除迁移);Codex 未同步交回。
本地验证:apply 幂等✓;范围内真代码残留 0(16 处 \bYudao 均在已排除迁移注释内)。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 13:05:48 +00:00

43 lines
3.7 KiB
SQL
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.

-- =============================================================================
-- biz 模块 admin 权限点登记 SQL(执行版 §7.4 必做缺口)| owner:WS5
-- 文件:game-cloud/game-module-biz/sql/biz_menu.sql
-- 设计依据:docs/agent-specs/2026-06-11-Wave4-community-biz-execution.md §7.4 / §4.5(admin 端点权限点)。
--
-- ⚠️ 为什么不进 Flyway V13:
-- 1) V13.0.0__create_game_biz.sql 两副本(contracts/db-schemas/ + huijing-server/.../db/migration/)必须字节一致(md5 全等),
-- 把权限 seed 塞进 V13 会破坏副本字节一致、触发 flyway validate 崩(执行版 §0/§7.4 红线);
-- 2) 黄金模块 project 的 project:review:query 权限点本就未经任何 Flyway 迁移登记(仓内零 system_menu 迁移),
-- huijing 菜单 seed 一贯走独立 SQL(sql/mysql/ruoyi-vue-pro.sql 同范式),权限点不属 Flyway 业务表迁移范畴。
-- 故 biz 权限点照 §7.4「单独菜单初始化 SQL」方式登记,与 V13 解耦、不破副本一致性。
--
-- 执行方式(mini-desktop staging,幂等可重复执行):
-- mysql --default-character-set=utf8mb4 -h<host> -u<user> -p<pwd> <db> < game-cloud/game-module-biz/sql/biz_menu.sql
-- (含中文,务必 --default-character-set=utf8mb4 防乱码,记忆铁律。)
--
-- 放行说明:
-- huijing 超级管理员角色(system_role.code='super_admin',type=1)对 @ss.hasPermission 全量放行(*:*:*),
-- 登记菜单行后超管即可调用 7 个 admin 端点;分配给普通角色由运营在 game-admin「角色管理」按需勾选(运营动作,不在本 SQL)。
-- id 取 7100~7107(实查 huijing base seed system_menu 最大 id≈6734,7100+ 区间未占用,避免碰撞)。
-- =============================================================================
-- 父菜单:定制业务管理(type=2 菜单,parent_id=0 顶级;前端路由/组件由 WS4 前端按需补,本 SQL 仅登记后端鉴权所需节点)
INSERT IGNORE INTO `system_menu`
(`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`,
`status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`)
VALUES
(7100, '定制业务管理', '', 2, 100, 0, 'biz-lead', 'ep:suitcase', 'biz/lead/index', 'BizLead',
0, b'1', b'1', b'1', '1', NOW(), '1', NOW(), b'0');
-- 7 个按钮权限点(type=3 按钮,parent_id=7100,对齐 §4.5 admin 端点 @PreAuthorize)
INSERT IGNORE INTO `system_menu`
(`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`,
`status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`)
VALUES
(7101, '询单查询', 'biz:lead:query', 3, 1, 7100, '', '', NULL, NULL, 0, b'1', b'1', b'1', '1', NOW(), '1', NOW(), b'0'),
(7102, '代客发起', 'biz:lead:create', 3, 2, 7100, '', '', NULL, NULL, 0, b'1', b'1', b'1', '1', NOW(), '1', NOW(), b'0'),
(7103, '指派负责人', 'biz:lead:assign', 3, 3, 7100, '', '', NULL, NULL, 0, b'1', b'1', b'1', '1', NOW(), '1', NOW(), b'0'),
(7104, '推进状态机', 'biz:lead:advance', 3, 4, 7100, '', '', NULL, NULL, 0, b'1', b'1', b'1', '1', NOW(), '1', NOW(), b'0'),
(7105, '报价创建', 'biz:quote:create', 3, 5, 7100, '', '', NULL, NULL, 0, b'1', b'1', b'1', '1', NOW(), '1', NOW(), b'0'),
(7106, '报价查询', 'biz:quote:query', 3, 6, 7100, '', '', NULL, NULL, 0, b'1', b'1', b'1', '1', NOW(), '1', NOW(), b'0'),
(7107, '线下签署', 'biz:acceptance:sign', 3, 7, 7100, '', '', NULL, NULL, 0, b'1', b'1', b'1', '1', NOW(), '1', NOW(), b'0');