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 069c2f5..cd6941c 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 @@ -6,7 +6,8 @@ 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, + mobile as phonenumber,pwd as password,sex-1 as sex,psn_type,psn_type_name,'1' as is_customer, + crby as create_by,crtime as create_time, upby as update_by,uptime as update_time from cust_info where cust_state=1 and cust_id > 0; diff --git a/sql/bns_houqin_202502_patch/20250216_mgr_user_move_to_sys_user.sql b/sql/bns_houqin_202502_patch/20250216_mgr_user_move_to_sys_user.sql index 8b075f9..e2c0228 100644 --- a/sql/bns_houqin_202502_patch/20250216_mgr_user_move_to_sys_user.sql +++ b/sql/bns_houqin_202502_patch/20250216_mgr_user_move_to_sys_user.sql @@ -1,28 +1,25 @@ --- 管理员已随着 cust_info 转移至 sys_user表,唯一缺少的就是 area_id 代表他们是区域管理员 --- update sys_user set area_id = 378916886416461824, user_id = 379189599139794944 where cust_id = 379489785460297728; --- update sys_user set area_id = 378916886416461824, user_id = 379189931303505920 where cust_id = 379185426889445376; --- update sys_user set area_id = 378916807488049152, user_id = 379258529644548096 where cust_id = 379497946028183552; --- update sys_user set area_id = 378916849707913216, user_id = 379452675235778560 where cust_id = 379163461193568256; --- update sys_user set area_id = 378916886416461824, user_id = 379479475219337216 where cust_id = 379185188929802240; --- update sys_user set area_id = 378916807488049152, user_id = 380246658740391936 where cust_id = 379498051389100032; --- update sys_user set area_id = 378916807488049152, user_id = 380261841554640896 where cust_id = 379497835516661760; --- update sys_user set area_id = 378916849707913216, user_id = 380510419623612416 where cust_id = 379162910842163200; --- update sys_user set area_id = 378916849707913216, user_id = 380539768947085312 where cust_id = 379441288094683136; --- update sys_user set area_id = 378916849707913216, user_id = 380539944529039360 where cust_id = 379163162596872192; --- update sys_user set area_id = 378915229716713472, user_id = 391436598056587264 where cust_id = 379823749551099904; +-- 管理员已随着 cust_info 转移至 sys_user表,缺少 area_id 代表他们是区域管理员, user_id 是用来在框架中匹配角色的,is_customer 为null可以登录后台 +update sys_user set area_id = 378916886416461824, user_id = 379189599139794944, is_customer = null where cust_id = 379489785460297728; +update sys_user set area_id = 378916886416461824, user_id = 379189931303505920, is_customer = null where cust_id = 379185426889445376; +update sys_user set area_id = 378916807488049152, user_id = 379258529644548096, is_customer = null where cust_id = 379497946028183552; +update sys_user set area_id = 378916849707913216, user_id = 379452675235778560, is_customer = null where cust_id = 379163461193568256; +update sys_user set area_id = 378916886416461824, user_id = 379479475219337216, is_customer = null where cust_id = 379185188929802240; +update sys_user set area_id = 378916807488049152, user_id = 380246658740391936, is_customer = null where cust_id = 379498051389100032; +update sys_user set area_id = 378916807488049152, user_id = 380261841554640896, is_customer = null where cust_id = 379497835516661760; +update sys_user set area_id = 378916849707913216, user_id = 380510419623612416, is_customer = null where cust_id = 379162910842163200; +update sys_user set area_id = 378916849707913216, user_id = 380539768947085312, is_customer = null where cust_id = 379441288094683136; +update sys_user set area_id = 378916849707913216, user_id = 380539944529039360, is_customer = null where cust_id = 379163162596872192; +update sys_user set area_id = 378915229716713472, user_id = 391436598056587264, is_customer = null where cust_id = 379823749551099904; -select user_id, username as user_name,password,real_name as nick_name, - phone as phonenumber,avatar,cust_id,area_id,0 as is_customer, - crby as create_by,crtime as create_time,upby as update_by,uptime as update_time -from mgr_user -where del_flag=2 and cust_id > 0; +-- select user_id, username as user_name,password,real_name as nick_name, +-- phone as phonenumber,avatar,cust_id,area_id, +-- crby as create_by,crtime as create_time,upby as update_by,uptime as update_time +-- from mgr_user +-- where del_flag=2 and cust_id > 0; -update sys_user set dept_id = 378915985597403136 where area_id is not null; --- --- -- INSERT INTO sys_user (user_id, dept_id, cust_id, cust_num, user_name, nick_name, nick_name_like, user_type, email, phonenumber, sex, avatar, psn_type, psn_type_name, area_id, password, status, del_flag, login_ip, login_date, create_by, create_time, update_by, update_time, remark, login_type, approval_status, is_permanent, is_built_in) VALUES (379189599139794944, 378915985597403136, 379489785460297728, '', 'xuyanfei_9939', '徐燕菲', 'xuyanfei', '00', '', '519f377014eeff4c1a735e26b8af0c9a', '0', null, null, null, 378916886416461824, '$2a$10$vrcmG0TyvgH5tS9g8ptaVOK2K3pYWVAa13SWEK7pQBGRtNAPlGV7O', '0', '0', '', '2025-02-17 13:23:15', '', '2024-11-09 17:46:05', '19805657725', '2025-02-17 13:23:15', null, null, null, '1', '1'); -- INSERT INTO sys_user (user_id, dept_id, cust_id, cust_num, user_name, nick_name, nick_name_like, user_type, email, phonenumber, sex, avatar, psn_type, psn_type_name, area_id, password, status, del_flag, login_ip, login_date, create_by, create_time, update_by, update_time, remark, login_type, approval_status, is_permanent, is_built_in) VALUES (379189931303505920, 378915985597403136, 379185426889445376, '', 'zhumei_1073', '朱梅', 'zhumei', '00', '', '16f859d9384320438a0bc35d3f276d19', '0', '/lnyst/378915229716713472/evaluate/135e12f0a83a45ecb53249524568e40d.jpeg', null, null, 378916886416461824, '$2a$10$vrcmG0TyvgH5tS9g8ptaVOK2K3pYWVAa13SWEK7pQBGRtNAPlGV7O', '0', '0', '', '2025-02-17 13:23:04', '', '2024-11-09 17:47:24', '19805657725', '2025-02-17 13:23:03', null, null, null, '1', '1'); -- INSERT INTO sys_user (user_id, dept_id, cust_id, cust_num, user_name, nick_name, nick_name_like, user_type, email, phonenumber, sex, avatar, psn_type, psn_type_name, area_id, password, status, del_flag, login_ip, login_date, create_by, create_time, update_by, update_time, remark, login_type, approval_status, is_permanent, is_built_in) VALUES (379258529644548096, 378915985597403136, 379497946028183552, '', 'yandong_1107', '严冬', 'yandong', '00', '', 'ee8177cdd0301e41ef53f350dc42227d', '0', '/lnyst/378915229716713472/evaluate/973da106c223429e897315f177bd8abe.jpeg', null, null, 378916807488049152, '$2a$10$vrcmG0TyvgH5tS9g8ptaVOK2K3pYWVAa13SWEK7pQBGRtNAPlGV7O', '0', '0', '', null, '', '2024-11-09 22:19:59', '19805657725', '2025-02-13 10:25:27', null, null, null, '1', '1');