util
This commit is contained in:
parent
d9850db280
commit
23b671d75d
|
|
@ -70,8 +70,8 @@ public class SM4EncryptUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
System.out.println(sm4Encrypt("18715460609"));
|
System.out.println(sm4Encrypt("0609"));
|
||||||
System.out.println(sm4Decrypt("PCAGz8j5ByU2AzoT6vtlLA=="));
|
System.out.println(sm4Decrypt("SJyggraT/x3K3OXX9eP56JnKJafTi/8NaI7cqCpNLHw=##encrypted"));
|
||||||
//
|
//
|
||||||
// System.out.println(sm4Encrypt("13866134935"));
|
// System.out.println(sm4Encrypt("13866134935"));
|
||||||
// System.out.println(sm4Decrypt("29G1AUHDmLvPe1tt0t12Dw==##encrypted"));
|
// System.out.println(sm4Decrypt("29G1AUHDmLvPe1tt0t12Dw==##encrypted"));
|
||||||
|
|
|
||||||
|
|
@ -341,9 +341,6 @@ public class CustInfoServiceImpl extends ServiceImpl<CustInfoMapper, CustInfo> i
|
||||||
custInfo.setCustNameLike(custInfo.getCustName());
|
custInfo.setCustNameLike(custInfo.getCustName());
|
||||||
}
|
}
|
||||||
BCryptPasswordEncoder bCrypt = new BCryptPasswordEncoder();
|
BCryptPasswordEncoder bCrypt = new BCryptPasswordEncoder();
|
||||||
custInfo.setMobile(SM4EncryptUtils.sm4Encryptbyconfig(custInfo.getMobile()));
|
|
||||||
custInfo.setMobileSuffix(SM4EncryptUtils.sm4Encryptbyconfig(custInfo.getMobileSuffix()));
|
|
||||||
custInfo.setIdCard(SM4EncryptUtils.sm4Encryptbyconfig(custInfo.getIdCard()));
|
|
||||||
custInfo.setPwd(bCrypt.encode(custInfo.getPwd()));
|
custInfo.setPwd(bCrypt.encode(custInfo.getPwd()));
|
||||||
|
|
||||||
custInfo.setPsnType(custInfo.getPsnType()).setBirthday(custInfo.getBirthday()).setAge(custInfo.getAge()).setPlaceId(custInfo.getPlaceId() == null ? CustConstant.DATA_DEFAULT_LONG : custInfo.getPlaceId()).setSex((Integer)Optional.ofNullable(infoModel.getSex()).orElse(3));
|
custInfo.setPsnType(custInfo.getPsnType()).setBirthday(custInfo.getBirthday()).setAge(custInfo.getAge()).setPlaceId(custInfo.getPlaceId() == null ? CustConstant.DATA_DEFAULT_LONG : custInfo.getPlaceId()).setSex((Integer)Optional.ofNullable(infoModel.getSex()).orElse(3));
|
||||||
|
|
|
||||||
Reference in New Issue