|
|
@ -495,42 +495,29 @@ public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implem |
|
|
|
@Override |
|
|
|
public Result verifyUserRegisterData(EpdcUserRegistFormDTO formDto) { |
|
|
|
// 手机号查重
|
|
|
|
// String mobile = formDto.getMobile();
|
|
|
|
// if (StringUtils.isNotBlank(mobile)) {
|
|
|
|
// QueryWrapper<UserEntity> wrapper = new QueryWrapper<>();
|
|
|
|
// wrapper.eq(FieldConstant.MOBILE, mobile);
|
|
|
|
// wrapper.ne(formDto.getUserId()!=null,FieldConstant.ID,formDto.getUserId());
|
|
|
|
// Integer count = this.baseDao.selectCount(wrapper);
|
|
|
|
// if (count > NumConstant.ZERO) {
|
|
|
|
// return new Result().error("手机号已被注册");
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
// 身份证号查重
|
|
|
|
String identityNo = formDto.getIdentityNo(); |
|
|
|
if (StringUtils.isNotBlank(identityNo)) { |
|
|
|
String mobile = formDto.getMobile(); |
|
|
|
if (StringUtils.isNotBlank(mobile)) { |
|
|
|
QueryWrapper<UserEntity> wrapper = new QueryWrapper<>(); |
|
|
|
wrapper.eq(UserFieldConsant.IDENTITY_NO, identityNo); |
|
|
|
wrapper.eq(FieldConstant.MOBILE, mobile); |
|
|
|
wrapper.ne(formDto.getUserId()!=null,FieldConstant.ID,formDto.getUserId()); |
|
|
|
Integer count = this.baseDao.selectCount(wrapper); |
|
|
|
if (count > NumConstant.ZERO) { |
|
|
|
return new Result().error("身份证号已被注册"); |
|
|
|
return new Result().error("手机号已被注册"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public Result mpmVerifyRegisterData(EpdcUserRegistFormDTO formDto) { |
|
|
|
// 身份证号查重
|
|
|
|
String identityNo = formDto.getIdentityNo(); |
|
|
|
if (StringUtils.isNotBlank(identityNo)) { |
|
|
|
Integer count = baseDao.selectCountByIdentityNo(identityNo); |
|
|
|
QueryWrapper<UserEntity> wrapper = new QueryWrapper<>(); |
|
|
|
wrapper.eq(UserFieldConsant.IDENTITY_NO, identityNo); |
|
|
|
wrapper.ne(formDto.getUserId() != null, FieldConstant.ID, formDto.getUserId()); |
|
|
|
Integer count = this.baseDao.selectCount(wrapper); |
|
|
|
if (count > NumConstant.ZERO) { |
|
|
|
return new Result().error("身份证号已被注册"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return new Result(); |
|
|
|
} |
|
|
|
|
|
|
|