判断为空的问题
This commit is contained in:
@@ -331,10 +331,13 @@ public class QuickValidUtils {
|
||||
*/
|
||||
public static void savePhoneSm4(AppUser appUser) {
|
||||
try {
|
||||
//判断为空的不处理
|
||||
if(StringUtils.isNotBlank(appUser.getPhone())){
|
||||
String phoneSm4 = sm4Encrypt(appUser.getPhone());
|
||||
String phoneSm3 = sm3Hash(appUser.getPhone());
|
||||
appUser.setPhoneEncrypt(phoneSm4);
|
||||
appUser.setPhoneCipher(phoneSm3);
|
||||
}
|
||||
} catch (CryptoClient.CryptoException e) {
|
||||
log.error("App用户手机号加密失败", e);
|
||||
throw new RuntimeException("手机号加密失败", e);
|
||||
@@ -477,10 +480,12 @@ public class QuickValidUtils {
|
||||
*/
|
||||
public static void saveCompanyContactPhoneSm4(CompanyContact contact) {
|
||||
try {
|
||||
if(StringUtils.isNotBlank(contact.getContactPersonPhone())){
|
||||
String phoneSm4 = sm4Encrypt(contact.getContactPersonPhone());
|
||||
String phoneSm3 = sm3Hash(contact.getContactPersonPhone());
|
||||
contact.setContactPersonPhoneEncrypt(phoneSm4);
|
||||
contact.setContactPersonPhoneCipher(phoneSm3);
|
||||
}
|
||||
} catch (CryptoClient.CryptoException e) {
|
||||
log.error("企业联系人手机号加密失败", e);
|
||||
throw new RuntimeException("手机号加密失败", e);
|
||||
|
||||
Reference in New Issue
Block a user