|
@@ -897,23 +897,35 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
|
|
|
// if(Validator.isEmpty(bo.getIdCard())){
|
|
|
// throw new CustomException("用户身份证号码缺失");
|
|
|
// }
|
|
|
+ if (StringUtils.isNotBlank(bo.getIdCard())){
|
|
|
+ User user2 = getOne(new LambdaQueryWrapper<User>()
|
|
|
+ .eq(User::getIdCard,EncryptHandler.encrypt(bo.getIdCard())).last("limit 1"));
|
|
|
+ if (ObjectUtil.isNotNull(user2)){
|
|
|
+ UserIdCardBatchVo userv = BeanUtil.toBean(bo, UserIdCardBatchVo.class);
|
|
|
+ userv.setUserId(user2.getUserId());
|
|
|
+ userv.setIdCard(EncryptHandler.decrypt(bo.getIdCard()));
|
|
|
+ list1.add(userv);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ }
|
|
|
User user1 = getOne(new LambdaQueryWrapper<User>()
|
|
|
.eq(User::getTelphone,EncryptHandler.encrypt(bo.getTelphone())).last("limit 1"));
|
|
|
//手机号码存在
|
|
|
if(Validator.isNotEmpty(user1)){
|
|
|
UserIdCardBatchVo user = BeanUtil.toBean(bo, UserIdCardBatchVo.class);
|
|
|
- if(Validator.isNotEmpty(bo.getIdCard())&&Validator.isNotEmpty(user1.getIdCard())&&!user1.getIdCard().equals(bo.getIdCard())){
|
|
|
- throw new CustomException(bo.getRealname()+"身份证号码不一致");
|
|
|
- }
|
|
|
- if(Validator.isEmpty(user1.getIdCard())){
|
|
|
- //更新身份证和姓名
|
|
|
- if (ObjectUtil.isNotNull(bo.getIdCard())){
|
|
|
- user1.setIdCard(bo.getIdCard());
|
|
|
- }
|
|
|
- user1.setRealname(bo.getRealname());
|
|
|
- updateById(user1);
|
|
|
- }
|
|
|
+// if(Validator.isNotEmpty(bo.getIdCard())&&Validator.isNotEmpty(user1.getIdCard())&&!user1.getIdCard().equals(bo.getIdCard())){
|
|
|
+// throw new CustomException(bo.getRealname()+"身份证号码不一致");
|
|
|
+// }
|
|
|
+// if(Validator.isEmpty(user1.getIdCard())){
|
|
|
+// //更新身份证和姓名
|
|
|
+// if (ObjectUtil.isNotNull(bo.getIdCard())){
|
|
|
+// user1.setIdCard(bo.getIdCard());
|
|
|
+// }
|
|
|
+// user1.setRealname(bo.getRealname());
|
|
|
+// updateById(user1);
|
|
|
+// }
|
|
|
user.setUserId(user1.getUserId());
|
|
|
+ user.setTelphone(EncryptHandler.decrypt(user1.getTelphone()));
|
|
|
list1.add(user);
|
|
|
continue;
|
|
|
}else{
|