fixed: idCard数据Mask兼容性错误

This commit is contained in:
none
2023-06-09 10:18:37 +08:00
parent 1831c7e25c
commit 5005e76b81
3 changed files with 13 additions and 9 deletions

View File

@@ -67,13 +67,15 @@ public class BackendBus {
}
public static String valueHidden(String permissionSlug, String type, String value) {
if (BCtx.isNull()) { // 非后管环境返回原值
if (BCtx.isNull() || value == null) { // 非后管环境直接返回 || 值为null不需要处理
return value;
}
HashMap<String, Boolean> permissions = BCtx.getAdminPer();
if (permissions.get(permissionSlug) != null) {
return value;
}
if (BackendConstant.PRIVACY_FIELD_TYPE_EMAIL.equals(type)) {
return PrivacyUtil.hideEmail(value);
} else if (BackendConstant.PRIVACY_FIELD_TYPE_PHONE.equals(type)) {