public class DataHandleHelper { public static String encryptConsignee(Object consignee){ String con = ""; if(StringUtil.isNotBlank(String.valueOf(consignee))){ con = String.valueOf(consignee).substring(0,1) + "**"; }else{ con = String.valueOf(consignee); } return con; } public static String encryptConsigneeMobile(Object consigneeMobile){ String conMob = ""; if(StringUtil.isNotBlank(String.valueOf(consigneeMobile)) && String.valueOf(consigneeMobile).length() == 11){ conMob = String.valueOf(consigneeMobile).substring(0,3) + "****" + String.valueOf(consigneeMobile).substring(7); }else{ conMob = String.valueOf(consigneeMobile); } return conMob; } }