admin/sql/seed_order_lab_rbac_menu.sql
zzh 7ab6b6fb51 refactor(order): 移除链路演练功能
删除模拟签收 API 与 RBAC 菜单/权限种子,E2E 测试回退至待上网状态。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 12:41:59 +08:00

55 lines
1.6 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.

-- 订单批量任务 RBAC 菜单(Fake.Rbac menu 表)
-- 执行库:RBAC 库(与 seed_xhs_rbac_menu.sql 相同)
-- 幂等:可重复执行
SET @ADMIN_USER_ID = (
SELECT `Id` FROM `user`
WHERE `Account` = 'admin' AND (`IsDeleted` = 0 OR `IsDeleted` IS NULL)
LIMIT 1
);
SET @ADMIN_USER_ID = IFNULL(
@ADMIN_USER_ID,
'08de4226-3fd4-4a5c-83e5-70e164b15f2f'
);
SET @ORDER_PID = (
SELECT `Id` FROM `menu`
WHERE `Route` = '/order' AND `IsDeleted` = 0
ORDER BY `Order`
LIMIT 1
);
SET @ORDER_PID = IFNULL(@ORDER_PID, '00000000-0000-0000-0000-000000000000');
INSERT INTO `menu` (
`Id`, `PId`, `Name`, `PermissionCode`, `Type`, `Icon`, `Route`, `Component`, `Order`,
`IsHidden`, `IsCached`, `Description`, `IsDeleted`,
`ConcurrencyStamp`, `CreateUserId`, `CreateTime`, `UpdateUserId`, `UpdateTime`
) VALUES (
'b1b2c3d4-e5f6-7890-abcd-ef1234567901',
@ORDER_PID,
'批量任务',
'Order.BatchJobs',
1,
NULL,
'/order/batchJobs',
'views/order/batchJobs/index',
4,
0, 1, '订单 RabbitMQ 批量任务治理', 0,
UUID(), @ADMIN_USER_ID, NOW(), @ADMIN_USER_ID, NOW()
)
ON DUPLICATE KEY UPDATE
`Name` = VALUES(`Name`),
`PId` = VALUES(`PId`),
`PermissionCode` = VALUES(`PermissionCode`),
`Route` = VALUES(`Route`),
`Component` = VALUES(`Component`),
`Order` = VALUES(`Order`),
`Description` = VALUES(`Description`),
`CreateUserId` = VALUES(`CreateUserId`),
`UpdateUserId` = VALUES(`UpdateUserId`);
-- 清理已废弃的链路演练菜单
UPDATE `menu`
SET `IsDeleted` = 1, `UpdateTime` = NOW(), `UpdateUserId` = @ADMIN_USER_ID
WHERE `Route` = '/order/lifecycleLab' AND `IsDeleted` = 0;