Files
BMS/bms-back/sql/price/billing_refund_menu.sql
2026-10-13 17:12:32 +08:00

21 lines
952 B
SQL
Raw Permalink 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.
-- billing list refund button (billType=REFUND)
SET NAMES utf8mb4;
INSERT INTO sys_menu (menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, remark)
SELECT 2330, N'退费', m.menu_id, 20, '', NULL, 1, 0, 'F', '0', '0', 'price:billing:refund', '#', 'admin', sysdate(), N'计费列表单笔退费(billType=REFUND)'
FROM (
SELECT menu_id FROM sys_menu
WHERE perms = 'price:billing:bill' AND menu_type = 'C'
UNION ALL
SELECT menu_id FROM sys_menu
WHERE component = 'price/billing/bill' AND menu_type = 'C'
) m
WHERE NOT EXISTS (SELECT 1 FROM sys_menu x WHERE x.menu_id = 2330 OR x.perms = 'price:billing:refund')
LIMIT 1;
INSERT INTO sys_role_menu (role_id, menu_id)
SELECT 1, 2330
FROM DUAL
WHERE EXISTS (SELECT 1 FROM sys_menu WHERE menu_id = 2330)
AND NOT EXISTS (SELECT 1 FROM sys_role_menu rm WHERE rm.role_id = 1 AND rm.menu_id = 2330);