综合服务-拜访人手机号脱敏
This commit is contained in:
1 parent
1987999f85
commit
d0d3befb82
1 file changed
+10
+10
@@ -328,6 +328,16 @@ public class AppVisitorController {
|
||||
@Operation(summary = "查询拜访人的信息" , description = "根据拜访人的手机号或者姓名精确查询" )
|
||||
public R getBFInfo(@RequestParam("keyword") String keyword) {
|
||||
R<List<UserDeptSimpleInfo>> userByNameOrMobile = remoteUserService.getUserByNameOrMobile(keyword);
|
||||
// 对手机号进行脱敏处理
|
||||
if (userByNameOrMobile != null && userByNameOrMobile.getData() != null) {
|
||||
userByNameOrMobile.getData().forEach(user -> {
|
||||
if (user.getMobile() != null && user.getMobile().length() == 11) {
|
||||
String mobile = user.getMobile();
|
||||
String maskedMobile = mobile.substring(0, 3) + "****" + mobile.substring(7);
|
||||
user.setMobile(maskedMobile);
|
||||
}
|
||||
});
|
||||
}
|
||||
return userByNameOrMobile;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user