去掉重复校验
This commit is contained in:
parent
4d1cfa397c
commit
209eb48bb7
|
|
@ -162,17 +162,17 @@ public class TUsersappController {
|
|||
String mobileAbstr = DigestUtils.md5DigestAsHex(mobile.getBytes(StandardCharsets.UTF_8));
|
||||
|
||||
// 查询是否存在相同的身份证号或手机号(排除当前用户)
|
||||
LambdaQueryWrapper<UserSupInfo> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.and(w -> w
|
||||
.eq(UserSupInfo::getIdcardAbstr, identityNoAbstr)
|
||||
.or()
|
||||
.eq(UserSupInfo::getMobileAbstr, mobileAbstr)
|
||||
).ne(UserSupInfo::getUserid, userId);
|
||||
|
||||
long count = userSupInfoService.count(wrapper);
|
||||
if (count > 0) {
|
||||
throw new BusinessException("身份证号或手机号已被其他用户占用");
|
||||
}
|
||||
// LambdaQueryWrapper<UserSupInfo> wrapper = new LambdaQueryWrapper<>();
|
||||
// wrapper.and(w -> w
|
||||
// .eq(UserSupInfo::getIdcardAbstr, identityNoAbstr)
|
||||
// .or()
|
||||
// .eq(UserSupInfo::getMobileAbstr, mobileAbstr)
|
||||
// ).ne(UserSupInfo::getUserid, userId);
|
||||
//
|
||||
// long count = userSupInfoService.count(wrapper);
|
||||
// if (count > 0) {
|
||||
// throw new BusinessException("身份证号或手机号已被其他用户占用");
|
||||
// }
|
||||
|
||||
// 使用SM4加密后存储到数据库
|
||||
String identityNoEnc = SM4Utils.encrypt(identityNo, sm4Key);
|
||||
|
|
|
|||
Loading…
Reference in New Issue