12 lines
596 B
SQL
12 lines
596 B
SQL
-- Add product batch-delete button permission (idempotent)
|
|
SET @menuId := (
|
|
SELECT menu_id FROM sys_menu
|
|
WHERE perms = 'price:product:list' OR component LIKE '%price/basic/product%'
|
|
ORDER BY menu_id ASC LIMIT 1
|
|
);
|
|
|
|
INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time)
|
|
SELECT '产品删除', @menuId, 6, '', '', 1, 0, 'F', '0', '0', 'price:product:remove', '#', 'admin', sysdate()
|
|
WHERE @menuId IS NOT NULL
|
|
AND NOT EXISTS (SELECT 1 FROM sys_menu WHERE perms = 'price:product:remove');
|