Files
Friendship-and-chat-api/sql/mysql/system/system_menu_subaccount_gender.sql
T
Codex 04bac15e59 Snapshot friend_back worktree for local merge
Source HEAD: 9d7e220f14
Includes uncommitted project changes and new project files.
Align shared text line endings and executable flags with Friendship-and-chat-api.
Normalize new text to LF; exclude .workbuddy local assistant memory.
Original friend_back checkout is unchanged.
2026-10-29 16:30:16 +08:00

18 lines
1.2 KiB
SQL

-- 后台菜单与授权:子账号管理 + 会员管理拆分(男号/女号)
-- 执行库:chat_v1
-- 1) 新增菜单(幂等:先删后插)
DELETE FROM system_menu WHERE id IN (5810, 5820, 5821);
INSERT INTO system_menu (id, name, permission, type, sort, parent_id, path, icon, component, component_name, status, visible, keep_alive, always_show, creator, updater, deleted)
VALUES
(5810, '子账号管理', 'system:sub-account:manage', 2, 20, 0, '/sub-account', 'ep:user', 'system/subaccount/index', 'SystemSubAccount', 0, b'1', b'1', b'1', '1', '1', b'0'),
(5820, '男号管理', 'member:user:query', 2, 1, 2262, 'male-user', 'ep:male', 'member/user/male', 'MemberUserMale', 0, b'1', b'1', b'1', '1', '1', b'0'),
(5821, '女号管理', 'member:user:query', 2, 2, 2262, 'female-user', 'ep:female', 'member/user/female', 'MemberUserFemale', 0, b'1', b'1', b'1', '1', '1', b'0');
-- 2) 授权给「APP管理员」角色(AppHolder 当前使用的角色)
DELETE FROM system_role_menu WHERE role_id = 158 AND menu_id IN (5810, 5820, 5821);
INSERT INTO system_role_menu (role_id, menu_id, creator, updater, deleted, tenant_id)
VALUES
(158, 5810, '1', '1', b'0', 1),
(158, 5820, '1', '1', b'0', 1),
(158, 5821, '1', '1', b'0', 1);