当前位置:网站首页>Desensitize data
Desensitize data
2022-07-23 13:10:00 【Withered maple leaf】
Data desensitization tool
First step : First introduced hutool Tool coordinates
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>4.5.0</version>
</dependency>
The second step : Desensitization with tools
if (!CollectionUtils.isEmpty(winningVOList)) {
for (WinningVO winningVO : winningVOList) {
// name
String userName = winningVO.getName();
winningVO.setName(StringUtils.isEmpty(userName) ? "" : ((userName.length() > 2) ? StrUtil.hide(userName, 1, userName.length() - 1) : StrUtil.hide(userName, 1, userName.length())));
// ID number
String licenseNumber = winningVO.getIdCard();
winningVO.setIdCard(StringUtils.isEmpty(licenseNumber) ? "" : StrUtil.hide(licenseNumber, 3, 14));
// cell-phone number
String userPhone = winningVO.getPhone();
winningVO.setPhone(StringUtils.isEmpty(userPhone) ? "" : StrUtil.hide(userPhone, 3, 7));
}
}
边栏推荐
- 雷达导论专栏总目录
- 0 backtracking / dynamic programming medium leetcode526. Beautiful arrangement
- 信号完整性(SI)电源完整性(PI)学习笔记(三十一)电源分配网路(三)
- Frame relay network configuration example learning record
- JVM内存模型简介
- ACL——net
- Install LNMP service deployment using yum
- tar、sftp、fin的、history命令,变量、别名
- HCIA----06 OSPF
- In the Internet era, how to refine user operations?
猜你喜欢

静态路由的搭建

使用vscode进行远程编辑和调试

In the Internet era, how to refine user operations?

User and group management, file permissions

HCIA----01互联网的初认识

快速解决:Xshell拖不進去文件夾或者軟件包的問題

Eth trunk configuration instance learning record

雷达导论PART VII.1 雷达与分辨率

Confused, work without motivation? Career development hopeless? It's enough to read this article

TI单芯片毫米波雷达xWR1642硬件架构研究
随机推荐
HCIA----02
C output Fibonacci sequence
力扣 729. 我的日程安排表 I
2020-09-22
Intégrité du signal (si) intégrité de l'alimentation électrique (PI) notes d'apprentissage (32) Réseau de distribution d'énergie (4)
雷达导论PART VII.4 SAR系统设计
linx的链接、一级目录、重定向、cp与mv
PostgreSQL k8s deployment template
信号完整性(SI)电源完整性(PI)学习笔记(三十二)电源分配网路(四)
ZABBIX monitoring detailed installation to deployment
【离线语音专题④】安信可VC离线语音开发板二次开发语音控制LED灯
RHCSA--文件內容瀏覽、cut、uniq、sort、.tr命令使用
App compilation and packaging deployment manual
SFTP deployment configuration
Static routing principle and configuration
Solution rapide: xshell ne peut pas glisser dans un dossier ou un paquet
tar、sftp、fin的、history命令,变量、别名
Simple use of psutil monitoring
DHCP configuration instance learning record
0 array leetcode605. Flower planting problem