演示环境脱密语句
2022-01-18 15:38:18
36次阅读
0个评论
-- 数据脱密

CREATE FUNCTION getRandName() RETURNS varchar(40)
BEGIN
  DECLARE rand_name VARCHAR(40);
    #Routine body goes here...
    select  concat(substring('赵钱孙李周吴郑王冯陈诸卫蒋沈韩杨朱秦尤许何吕施张孔曹严华金魏陶姜戚谢邹喻柏水窦章云苏潘葛奚范彭郎鲁韦昌马苗凤花方俞任袁柳酆鲍史唐费廉岑薛雷贺倪汤滕殷罗毕郝邬安常乐于时傅皮齐康伍余元卜顾孟平黄和穆萧尹姚邵堪汪祁毛禹狄米贝明臧计伏成戴谈宋茅庞熊纪舒屈项祝董粱杜阮蓝闵席季麻强贾路娄危江童颜郭梅盛林刁钟徐邱骆高夏蔡田樊胡凌霍虞万支柯咎管卢莫经房裘干解应宗丁宣贲邓郁单杭洪包诸左石崔吉钮龚',floor(1+190*rand()),1),substring('明国华建文平志伟东海强晓生光林小民永杰军金健一忠洪江福祥中正振勇耀春大宁亮宇兴宝少剑云学仁涛瑞飞鹏安亚泽世汉达卫利胜敏群波成荣新峰刚家龙德庆斌辉良玉俊立浩天宏子松克清长嘉红山贤阳乐锋智青跃元武广思雄锦威启昌铭维义宗英凯鸿森超坚旭政传康继翔栋仲权奇礼楠炜友年震鑫雷兵万星骏伦绍麟雨行才希彦兆贵源有景升惠臣慧开章润高佳虎根远力进泉茂毅富博霖顺信凡豪树和恩向道川彬柏磊敬书鸣芳培全炳基冠晖京欣廷哲保秋君劲轩帆若连勋祖锡吉崇钧田石奕发洲彪钢运伯满庭申湘皓承梓雪孟其潮冰怀鲁裕翰征谦航士尧标洁城寿枫革纯风化逸腾岳银鹤琳显焕来心凤睿勤延凌昊西羽百捷定琦圣佩麒虹如靖日咏会久昕黎桂玮燕可越彤雁孝宪萌颖艺夏桐月瑜沛诚夫声冬奎扬双坤镇楚水铁喜之迪泰方同滨邦先聪朝善非恒晋汝丹为晨乃秀岩辰洋然厚灿卓杨钰兰怡灵淇美琪亦晶舒菁真涵爽雅爱依静棋宜男蔚芝菲露娜珊雯淑曼萍珠诗璇琴素梅玲蕾艳紫珍丽仪梦倩伊茜妍碧芬儿岚婷菊妮媛莲娟一',floor(1+400*rand()),1),substring('明国华建文平志伟东海强晓生光林小民永杰军金健一忠洪江福祥中正振勇耀春大宁亮宇兴宝少剑云学仁涛瑞飞鹏安亚泽世汉达卫利胜敏群波成荣新峰刚家龙德庆斌辉良玉俊立浩天宏子松克清长嘉红山贤阳乐锋智青跃元武广思雄锦威启昌铭维义宗英凯鸿森超坚旭政传康继翔栋仲权奇礼楠炜友年震鑫雷兵万星骏伦绍麟雨行才希彦兆贵源有景升惠臣慧开章润高佳虎根远力进泉茂毅富博霖顺信凡豪树和恩向道川彬柏磊敬书鸣芳培全炳基冠晖京欣廷哲保秋君劲轩帆若连勋祖锡吉崇钧田石奕发洲彪钢运伯满庭申湘皓承梓雪孟其潮冰怀鲁裕翰征谦航士尧标洁城寿枫革纯风化逸腾岳银鹤琳显焕来心凤睿勤延凌昊西羽百捷定琦圣佩麒虹如靖日咏会久昕黎桂玮燕可越彤雁孝宪萌颖艺夏桐月瑜沛诚夫声冬奎扬双坤镇楚水铁喜之迪泰方同滨邦先聪朝善非恒晋汝丹为晨乃秀岩辰洋然厚灿卓杨钰兰怡灵淇美琪亦晶舒菁真涵爽雅爱依静棋宜男蔚芝菲露娜珊雯淑曼萍珠诗璇琴素梅玲蕾艳紫珍丽仪梦倩伊茜妍碧芬儿岚婷菊妮媛莲娟一',floor(1+400*rand()),1)) into rand_name
    from dual;
    RETURN rand_name;
END;




-- 管理组织
-- select * from sys_organization so ;
-- where LEVELS = 2;

UPDATE sys_organization so
set so.ORG_FULL_NAME = concat('***', substr(ORG_FULL_NAME,4)),
 so.ORG_NAME = concat('***', substr(ORG_NAME,4));
 
 -- 人员表
 
 -- select * from sys_person ;
 
 
 update sys_person
 set name =  getRandName(),
 REMARK ='某某单位/科处室';
 
 
 update sys_person
 set spell =  F_PINYIN(name) ;
 
    
 -- 用户表
 
 -- select * from sys_user;
 update sys_user t1 set name = (select name from sys_person t2 where t2.PERSON_ID = t1.PERSON_ID)
 where name <> 'administrator'
 ;
 update sys_user set LOGIN_NAME = concat(name, round(RAND() * 100))
 where name <> 'administrator'
 ;
 update sys_users t1 set name = (select name from sys_person t2 where t2.PERSON_ID = t1.PERSON_ID)
 where name <> 'administrator'
 ;
 update sys_users set LOGIN_NAME = concat(name, round(RAND() * 100))
 where name <> 'administrator'
 ;
 
 
 -- 外批
 
-- select * from b

-- 外部预算

UPDATE budget_financial_budget t set t.FINANCIAL_BUDGET_NAME = concat('***', substr(FINANCIAL_BUDGET_NAME,3));


 -- 内批
 
-- select * from budget_inner_budget  ;
UPDATE budget_inner_budget t set t.inner_budget_name = concat('***', substr(inner_budget_name,3));
 
 
 -- 项目
 
 -- select * from FIN_BUDG_PROJECT ;
 UPDATE FIN_BUDG_PROJECT t set t.project_name = concat('***', substr(project_name,3));
 
 -- 合同
 
-- select * from cont_contract;
 
UPDATE cont_contract t
set t.CONTRACT_NAME = concat(CONTRACT_CODE, substr(CONTRACT_NAME,-4,4)) ,
t.ORG_ID_PAYER = getRandName(),
t.PARTY_A = concat('某某', substr(PARTY_A,-6,6)) ,
t.PARTY_B = concat('某某', substr(PARTY_B,-6,6)) ,
t.PARTY_A_SIGNATORY = getRandName(),
t.PARTY_B_SIGNATORY = getRandName(),
t.BANK_ACCOUNT = concat(substr(BANK_ACCOUNT,4,4),'*****',substr(BANK_ACCOUNT,-4,4)),
t.ACCOUNTER = (case when t.ACCOUNTER is not null then getRandName() end )
;


 -- 采购
 
 -- select * from purch_purchase_manage;
 
 update purch_purchase_manage t
 set t.PURCHASE_NAME = concat(t.PURCHASE_CODE,substr(PURCHASE_NAME,-4,4))
 ;
 
 
 -- 申请表
 
 -- select * from payout_applicationform limit 500;
 
 update payout_applicationform t
 set t.title = concat('*****',substr(title,-6,6)),
 t.content=  concat('*****',substr(content,-6,6))
 ;
 
 
 
 -- 报销
 
 -- select * from payout_payment limit 500 ;
 
 update payout_payment t
 set t.REASON = concat('****',substr(REASON,-8,8))
 ;
 
 -- 结算明细
 
 -- select * from PAYOUT_ACCOUNT_DETAIL limit 500;
 
 update PAYOUT_ACCOUNT_DETAIL t
 set t.ACCOUNT_NAME = getRandName(),
 t.CARD_NUMBER = concat(substr(CARD_NUMBER,4,4),'*****',substr(CARD_NUMBER,-4,4))
 ;
 
 -- 借款
 
 -- select * from payout_loan ;
 
 update payout_loan t
 set t.REASON = concat('**',substr(REASON,-6,6))
 ;
 
 
 -- 常用信息
 
-- select * from SYS_COMMON_MESSAGE limit 500;

update SYS_COMMON_MESSAGE t
set t.CONTENT = concat(substr(CONTENT,4,4),'*****',substr(CONTENT,-4,4)),
t.ACCOUNT_NAME = getRandName()
where MESSAGE_TYPE  = '3'
;


-- 审核日志

-- select * from SYS_AUDIT_LOG limit 500;

update SYS_AUDIT_LOG t
set OPERATOR = '***'
;



-- 文件附件名
-- select * from sys_notice;
-- 通知公告
update sys_notice t set notice_title = '***';
update sys_notice t set notice_content = '***';
-- 附件
update system_attach_detail t set FILE_NAME = '***';


-- 收入账户
UPDATE INCOME_PROJECT_ITEM t set t.project_account_name = concat('***', substr(project_account_name,4));


-- 银行账户
update INCOME_UNIT_ACCOUNT set ACCOUNT_TITLE = concat('****', substr(ACCOUNT_TITLE,6));
update INCOME_UNIT_ACCOUNT set ACCOUNT_NAME = concat('****', substr(ACCOUNT_NAME,6));
update INCOME_UNIT_ACCOUNT set ACCOUNT_NUMBER = '888888888888888';

-- 系统名称
UPDATE SYS_CODE SET BUSINESS_VALUE = '行政事务单位内部控制系统——演示'
WHERE CODE_CATEGORY_CODE = 'SYS_SYSTEM_OTHER'  
AND CODE_VALUE IN ('SYS_APP_NAME','SYS_MANAGER');
 




收藏 0 0

登录 后评论。没有帐号? 注册 一个。

杜方雄

运维人员
  • 0 回答
  • 0 粉丝
  • 0 关注