Files
zyt/server/sql/1.9.20260516/add_prescription_patch_patient_contact_menu.sql
2026-05-18 09:42:11 +08:00

25 lines
887 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.
-- 消费者处方列表:修正处方笺姓名 / 手机号(接口 tcm.prescription/patchPatient
-- 执行前确认表前缀为 zyt_;若已有相同 perms 则跳过。
SET @cf_rx_menu_id := (
SELECT id FROM zyt_system_menu
WHERE type = 'C'
AND (
component = 'consumer/prescription/index'
OR component LIKE '%consumer/prescription/index%'
)
LIMIT 1
);
INSERT INTO zyt_system_menu (
pid, type, name, icon, sort, perms, paths, component,
selected, params, is_cache, is_show, is_disable, create_time, update_time
)
SELECT
@cf_rx_menu_id, 'A', '修正处方患者姓名手机', '', 53,
'tcm.prescription/patchPatient', '', '',
'', '', 0, 1, 0, UNIX_TIMESTAMP(), UNIX_TIMESTAMP()
FROM DUAL
WHERE @cf_rx_menu_id IS NOT NULL
AND NOT EXISTS (SELECT 1 FROM zyt_system_menu WHERE perms = 'tcm.prescription/patchPatient');