|
|
|
@ -624,10 +624,13 @@ public class UserServiceImpl implements IUserService { |
|
|
|
int insertNum = 0; |
|
|
|
int updateNum = 0; |
|
|
|
for (int i = 0; i < dataArr.size(); i++) { |
|
|
|
try { |
|
|
|
JSONObject jsonObject = dataArr.getJSONObject(i); |
|
|
|
// 通过登录名判断用户是否存在
|
|
|
|
// checkLoginNameUnique(jsonObject.getString("username"));
|
|
|
|
if (StringUtils.isEmpty(jsonObject.getString("username"))) { continue; } |
|
|
|
if (StringUtils.isEmpty(jsonObject.getString("username"))) { |
|
|
|
continue; |
|
|
|
} |
|
|
|
|
|
|
|
try { |
|
|
|
// 返回每条拉取的成功情况
|
|
|
|
@ -656,8 +659,12 @@ public class UserServiceImpl implements IUserService { |
|
|
|
user.setUpdateAt(jsonObject.getString("updateAt")); |
|
|
|
user.setGuid(jsonObject.getString("guid")); |
|
|
|
//手机号加密
|
|
|
|
String mobileNumber = |
|
|
|
IdCardCryptoUtil.symmetricEncryptIdCard(secretKey, jsonObject.getString("mobileNumber")); |
|
|
|
String mobileNumber = ""; |
|
|
|
try { |
|
|
|
mobileNumber = IdCardCryptoUtil.symmetricEncryptIdCard(secretKey, jsonObject.getString("mobileNumber")); |
|
|
|
} catch (Exception e) { |
|
|
|
mobileNumber = ""; |
|
|
|
} |
|
|
|
user.setMobileNumber(mobileNumber); |
|
|
|
|
|
|
|
user.setPhonenumber(mobileNumber); |
|
|
|
@ -665,13 +672,21 @@ public class UserServiceImpl implements IUserService { |
|
|
|
user.setCertificateTypeId(jsonObject.getString("certificateTypeId")); |
|
|
|
user.setCertificateTypeIdCode(jsonObject.getString("certificateTypeIdCode")); |
|
|
|
//证件号加密
|
|
|
|
String certificateNumber = |
|
|
|
IdCardCryptoUtil.symmetricEncryptIdCard(secretKey, jsonObject.getString("certificateNumber")); |
|
|
|
String certificateNumber = ""; |
|
|
|
try { |
|
|
|
certificateNumber = IdCardCryptoUtil.symmetricEncryptIdCard(secretKey, jsonObject.getString("certificateNumber")); |
|
|
|
} catch (Exception e) { |
|
|
|
certificateNumber = ""; |
|
|
|
} |
|
|
|
user.setCertificateNumber(certificateNumber); |
|
|
|
user.setIsMappingPerson(jsonObject.getString("isMappingPerson")); |
|
|
|
//证件号加密
|
|
|
|
String units = |
|
|
|
IdCardCryptoUtil.symmetricEncryptIdCard(secretKey, jsonObject.getString("units")); |
|
|
|
String units = ""; |
|
|
|
try { |
|
|
|
units = IdCardCryptoUtil.symmetricEncryptIdCard(secretKey, jsonObject.getString("units")); |
|
|
|
} catch (Exception e) { |
|
|
|
units = ""; |
|
|
|
} |
|
|
|
user.setUnits(units); |
|
|
|
|
|
|
|
user.randomSalt(); |
|
|
|
@ -689,6 +704,9 @@ public class UserServiceImpl implements IUserService { |
|
|
|
int rowNum = userMapper.insertUser(user); |
|
|
|
insertNum += rowNum; |
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
Map<String, Integer> resMap = new HashedMap(); |
|
|
|
resMap.put("insertNum", insertNum); |
|
|
|
|