From 18043a308f919128c25a5c8315c6ab248d3787aa Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Mon, 17 Feb 2025 14:57:24 +0800 Subject: [PATCH] sql --- ...20250216_alloc_area_move_to_alloc_area.sql | 4 +++ .../20250216_cust_info_move_to_sys_user.sql | 6 ++++ .../20250216_mgr_role_move_to_sys_role.sql | 29 +++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 sql/bns_houqin_202502_patch/20250216_alloc_area_move_to_alloc_area.sql create mode 100644 sql/bns_houqin_202502_patch/20250216_mgr_role_move_to_sys_role.sql diff --git a/sql/bns_houqin_202502_patch/20250216_alloc_area_move_to_alloc_area.sql b/sql/bns_houqin_202502_patch/20250216_alloc_area_move_to_alloc_area.sql new file mode 100644 index 0000000..6839d25 --- /dev/null +++ b/sql/bns_houqin_202502_patch/20250216_alloc_area_move_to_alloc_area.sql @@ -0,0 +1,4 @@ +-- 将顶级的 area 的父节点,设为公司 id +update alloc_area set super_id = 378915985597403136 +where area_id = 378916722880548864; + diff --git a/sql/bns_houqin_202502_patch/20250216_cust_info_move_to_sys_user.sql b/sql/bns_houqin_202502_patch/20250216_cust_info_move_to_sys_user.sql index 138af5a..069c2f5 100644 --- a/sql/bns_houqin_202502_patch/20250216_cust_info_move_to_sys_user.sql +++ b/sql/bns_houqin_202502_patch/20250216_cust_info_move_to_sys_user.sql @@ -1,3 +1,9 @@ +alter table sys_user add `cust_id` bigint(20) NOT NULL COMMENT '人员id'; +alter table sys_user add `cust_num` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '人员编号'; +alter table sys_user add `psn_type` int(11) DEFAULT NULL COMMENT '人员类别'; +alter table sys_user add `psn_type_name` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '人员类别名称'; +alter table sys_user add `area_id` bigint(20) DEFAULT NULL COMMENT '区域id'; + select cust_id as user_id, cust_id as user_name, cust_id,cust_num,org_id as dept_id,cust_name as nick_name, cust_photo_url as avatar, mobile as phonenumber,pwd as password,sex-1 as sex,psn_type,psn_type_name,crby as create_by,crtime as create_time, diff --git a/sql/bns_houqin_202502_patch/20250216_mgr_role_move_to_sys_role.sql b/sql/bns_houqin_202502_patch/20250216_mgr_role_move_to_sys_role.sql new file mode 100644 index 0000000..770590b --- /dev/null +++ b/sql/bns_houqin_202502_patch/20250216_mgr_role_move_to_sys_role.sql @@ -0,0 +1,29 @@ +alter table sys_role add `role_type` int(11) DEFAULT NULL COMMENT '角色类型'; +alter table sys_role add `area_id` bigint(20) DEFAULT NULL COMMENT '区域id'; + +SELECT role_id,role_name,role_code as role_key,role_type,area_id,99 as role_sort,0 as status, + crby as create_by,crtime as create_time,upby as update_by,uptime as update_time +FROM mgr_role +where del_flag=2 and id != 1; + + +INSERT INTO SYS_ROLE(role_id, role_name, role_key, role_type, area_id, role_sort, status, create_by, create_time, update_by, update_time) VALUES (379181814666760192, '宏源工业园食堂组织', 'ROLE_ORG&&379181814666760192', 2, 378916849707913216, 99, 0, '19805657725', '2024-11-09 17:15:09', '19805657725', '2024-12-26 08:52:53'); +INSERT INTO SYS_ROLE(role_id, role_name, role_key, role_type, area_id, role_sort, status, create_by, create_time, update_by, update_time) VALUES (379182932578799616, '程珺', 'ROLE_MERCHANT&&379182932578799616', 3, 378916807488049152, 99, 0, '19805657725', '2024-11-09 17:19:36', '19805657725', '2024-12-25 21:06:32'); +INSERT INTO SYS_ROLE(role_id, role_name, role_key, role_type, area_id, role_sort, status, create_by, create_time, update_by, update_time) VALUES (379184733143175168, '宏源大厦食堂', 'ROLE_MERCHANT&&379184733143175168', 3, 378916886416461824, 99, 0, '19805657725', '2024-11-09 17:26:45', '19805657725', '2024-12-25 21:21:57'); +INSERT INTO SYS_ROLE(role_id, role_name, role_key, role_type, area_id, role_sort, status, create_by, create_time, update_by, update_time) VALUES (379185171468914688, '宏源大厦食堂组织', 'ROLE_ORG&&379185171468914688', 2, 378916886416461824, 99, 0, '19805657725', '2024-11-09 17:28:29', '19805657725', '2024-12-25 21:22:53'); +INSERT INTO SYS_ROLE(role_id, role_name, role_key, role_type, area_id, role_sort, status, create_by, create_time, update_by, update_time) VALUES (379185399521611776, '严冬', 'ROLE_ORG&&379185399521611776', 2, 378916807488049152, 99, 0, '19805657725', '2024-11-09 17:29:24', '19805657725', '2024-12-25 21:23:06'); +INSERT INTO SYS_ROLE(role_id, role_name, role_key, role_type, area_id, role_sort, status, create_by, create_time, update_by, update_time) VALUES (379452240479391744, '宏源工业园超市管理员', 'ROLE_MERCHANT&&379452240479391744', 3, 378916849707913216, 99, 0, '19805657725', '2024-11-10 11:09:44', '19805657725', '2024-12-02 14:42:08'); +INSERT INTO SYS_ROLE(role_id, role_name, role_key, role_type, area_id, role_sort, status, create_by, create_time, update_by, update_time) VALUES (379790239129931776, '宏源大厦数据权限', 'ROLE_ORG&&379790239129931776', 2, 378916886416461824, 99, 0, '19805657725', '2024-11-11 09:32:49', '19805657725', '2024-12-25 21:22:41'); +INSERT INTO SYS_ROLE(role_id, role_name, role_key, role_type, area_id, role_sort, status, create_by, create_time, update_by, update_time) VALUES (380196444893614080, '宏源大厦出入库管理员', 'ROLE_MERCHANT&&380196444893614080', 3, 378916886416461824, 99, 0, '19805657725', '2024-11-12 12:26:56', '19805657725', '2024-11-29 13:44:55'); +INSERT INTO SYS_ROLE(role_id, role_name, role_key, role_type, area_id, role_sort, status, create_by, create_time, update_by, update_time) VALUES (380510277189242880, '宏源工业园', 'ROLE_ADMIN&&380510277189242880', 1, 378916849707913216, 99, 0, '19805657725', '2024-11-13 09:13:59', '19805657725', '2025-02-10 13:22:44'); +INSERT INTO SYS_ROLE(role_id, role_name, role_key, role_type, area_id, role_sort, status, create_by, create_time, update_by, update_time) VALUES (380539602458382336, '菜品订单权限', 'ROLE_ORG&&380539602458382336', 2, 378916849707913216, 99, 0, '19805657725', '2024-11-13 11:10:31', '19805657725', '2024-12-26 08:15:09'); +INSERT INTO SYS_ROLE(role_id, role_name, role_key, role_type, area_id, role_sort, status, create_by, create_time, update_by, update_time) VALUES (380657128215416832, '董海燕', 'ROLE_MERCHANT&&380657128215416832', 3, 378916807488049152, 99, 0, '19805657725', '2024-11-13 18:57:31', '19805657725', '2024-12-25 21:07:34'); +INSERT INTO SYS_ROLE(role_id, role_name, role_key, role_type, area_id, role_sort, status, create_by, create_time, update_by, update_time) VALUES (383066643296686080, '宏源工业园仓库角色2024', 'ROLE_MERCHANT&&383066643296686080', 3, 378916849707913216, 99, 0, '19805657725', '2024-11-20 10:32:04', '19805657725', '2024-12-25 21:13:07'); +INSERT INTO SYS_ROLE(role_id, role_name, role_key, role_type, area_id, role_sort, status, create_by, create_time, update_by, update_time) VALUES (383066920754089984, '宏源工业园组织角色2024', 'ROLE_ORG&&383066920754089984', 2, 378916849707913216, 99, 0, '19805657725', '2024-11-20 10:33:10', '19805657725', '2024-12-26 08:52:42'); +INSERT INTO SYS_ROLE(role_id, role_name, role_key, role_type, area_id, role_sort, status, create_by, create_time, update_by, update_time) VALUES (383116772808593408, '宏源大厦组织2024', 'ROLE_ORG&&383116772808593408', 2, 378916886416461824, 99, 0, '19805657725', '2024-11-20 13:51:16', '19805657725', '2024-12-25 21:23:17'); +INSERT INTO SYS_ROLE(role_id, role_name, role_key, role_type, area_id, role_sort, status, create_by, create_time, update_by, update_time) VALUES (383116918359330816, '宏源大厦仓库角色2024', 'ROLE_MERCHANT&&383116918359330816', 3, 378916886416461824, 99, 0, '19805657725', '2024-11-20 13:51:51', '19805657725', '2024-12-25 21:12:25'); +INSERT INTO SYS_ROLE(role_id, role_name, role_key, role_type, area_id, role_sort, status, create_by, create_time, update_by, update_time) VALUES (383477531031900160, '送变电工业园组织类2024', 'ROLE_ORG&&383477531031900160', 2, 378916807488049152, 99, 0, '19805657725', '2024-11-21 13:44:48', '19805657725', '2024-12-25 21:23:31'); +INSERT INTO SYS_ROLE(role_id, role_name, role_key, role_type, area_id, role_sort, status, create_by, create_time, update_by, update_time) VALUES (383477651244847104, '送变电工业园仓库管理2024', 'ROLE_MERCHANT&&383477651244847104', 3, 378916807488049152, 99, 0, '19805657725', '2024-11-21 13:45:16', '19805657725', '2024-12-25 21:12:57'); +INSERT INTO SYS_ROLE(role_id, role_name, role_key, role_type, area_id, role_sort, status, create_by, create_time, update_by, update_time) VALUES (391435841123127296, '综服中心', 'ROLE_ADMIN&&391435841123127296', 1, 378916722880548864, 99, 0, '19805657725', '2024-12-13 12:48:17', '', '2024-12-13 12:48:17'); + +