mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-06 17:36:47 +08:00
@@ -8,6 +8,7 @@ import java.util.Map;
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import cn.hutool.core.util.DesensitizedUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -179,7 +180,7 @@ public class UserApi extends ApiBaseController {
|
||||
BeanUtils.copyProperties(u, user);
|
||||
user.setMobileNo(DesensitizedUtil.mobilePhone(user.getMobileNo()));
|
||||
user.setIdNumber("");//去掉返回的用户身份证号信息
|
||||
account.setEmail(DesensitizedUtil.email(account.getEmail()));
|
||||
account.setEmail(email(account.getEmail()));
|
||||
account.setMobile(DesensitizedUtil.mobilePhone(account.getMobile()));
|
||||
user.setAccount(account);
|
||||
user.setSign(u.getSign());
|
||||
@@ -194,7 +195,14 @@ public class UserApi extends ApiBaseController {
|
||||
}
|
||||
return success(user);
|
||||
}
|
||||
|
||||
public static String email(String email) {
|
||||
if (StrUtil.isBlank(email)) {
|
||||
return "";
|
||||
} else {
|
||||
int index = StrUtil.indexOf(email, '@');
|
||||
return index <= 1 ? email : StrUtil.hide(email, index-3, index);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过用户名查询用户信息(该接口限定使用场景为先查本地库后查旧系统)
|
||||
|
||||
Reference in New Issue
Block a user