一个身份证号可以认证三个账号
This commit is contained in:
@@ -164,24 +164,20 @@ public class AppController {
|
|||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
int count = userInfoService.count(Wrappers.<UserInfo>lambdaQuery()
|
int count = userInfoService.count(Wrappers.<UserInfo>lambdaQuery()
|
||||||
.eq(UserInfo::getUserId, userId).eq(UserInfo::getCertName, certName)
|
.eq(UserInfo::getUserId, userId)
|
||||||
|
.eq(UserInfo::getCertName, certName)
|
||||||
.eq(UserInfo::getCertNo, certNum)
|
.eq(UserInfo::getCertNo, certNum)
|
||||||
.isNotNull(UserInfo::getAccountNo)
|
|
||||||
.isNotNull(UserInfo::getMobile)
|
|
||||||
.isNotNull(UserInfo::getBankName)
|
|
||||||
);
|
);
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
return Result.error("已完成实名认证,无需重复操作");
|
return Result.error("已完成实名认证,无需重复操作");
|
||||||
}
|
}
|
||||||
|
// 查询现在库里面姓名+身份证号认证过的用户数量
|
||||||
count = userInfoService.count(Wrappers.<UserInfo>lambdaQuery()
|
count = userInfoService.count(Wrappers.<UserInfo>lambdaQuery()
|
||||||
.ne(UserInfo::getUserId, userId)
|
|
||||||
.eq(UserInfo::getCertName, certName)
|
.eq(UserInfo::getCertName, certName)
|
||||||
.eq(UserInfo::getCertNo, certNum)
|
.eq(UserInfo::getCertNo, certNum)
|
||||||
.isNotNull(UserInfo::getAccountNo)
|
|
||||||
.isNotNull(UserInfo::getMobile)
|
|
||||||
);
|
);
|
||||||
if (count > 0) {
|
if (count >= 3) {
|
||||||
return Result.error("实名认证失败: 此身份证信息已被其他账号绑定");
|
return Result.error("实名认证失败: 1个身份证号码最多绑定3个账号");
|
||||||
}
|
}
|
||||||
if (!ApiAccessLimitUtil.getCertAuthIsAccessAllowed(String.valueOf(userId), "updateAuthCertInfo", 5)) {
|
if (!ApiAccessLimitUtil.getCertAuthIsAccessAllowed(String.valueOf(userId), "updateAuthCertInfo", 5)) {
|
||||||
return Result.error("实名修改失败: 每月可修改次数已用完,请联系管理员");
|
return Result.error("实名修改失败: 每月可修改次数已用完,请联系管理员");
|
||||||
|
|||||||
Reference in New Issue
Block a user