四要素认证暂时关闭

This commit is contained in:
GYJ
2025-01-08 22:27:15 +08:00
parent 625a2aeb9b
commit 09b6469cc5

View File

@@ -157,46 +157,47 @@ public class AppController {
@RequestParam String accountNo, @RequestParam String accountNo,
@RequestParam String mobile @RequestParam String mobile
) { ) {
if (StrUtil.isAllBlank(certName, certNum, accountNo, mobile)) { return Result.error("系统优化中,请稍后再试");
return Result.error("真实姓名、身份证号码、银行卡号、银行预留手机号缺一不可"); // if (StrUtil.isAllBlank(certName, certNum, accountNo, mobile)) {
} // return Result.error("真实姓名、身份证号码、银行卡号、银行预留手机号缺一不可");
if(certNum.contains("*") || accountNo.contains("*") || mobile.contains("*")){ // }
return Result.success(); // if(certNum.contains("*") || accountNo.contains("*") || mobile.contains("*")){
} // return Result.success();
int count = userInfoService.count(new LambdaQueryWrapper<UserInfo>().eq(UserInfo::getUserId, userId).eq(UserInfo::getCertName, certName).eq(UserInfo::getCertNo, certNum).isNotNull(UserInfo::getAccountNo).isNotNull(UserInfo::getMobile)); // }
if (count > 0) { // int count = userInfoService.count(new LambdaQueryWrapper<UserInfo>().eq(UserInfo::getUserId, userId).eq(UserInfo::getCertName, certName).eq(UserInfo::getCertNo, certNum).isNotNull(UserInfo::getAccountNo).isNotNull(UserInfo::getMobile));
return Result.error("已完成实名认证,无需重复操作"); // if (count > 0) {
} // return Result.error("已完成实名认证,无需重复操作");
count = userInfoService.count(new LambdaQueryWrapper<UserInfo>().ne(UserInfo::getUserId, userId).eq(UserInfo::getCertName, certName).eq(UserInfo::getCertNo, certNum).isNotNull(UserInfo::getAccountNo).isNotNull(UserInfo::getMobile)); // }
if (count > 0) { // count = userInfoService.count(new LambdaQueryWrapper<UserInfo>().ne(UserInfo::getUserId, userId).eq(UserInfo::getCertName, certName).eq(UserInfo::getCertNo, certNum).isNotNull(UserInfo::getAccountNo).isNotNull(UserInfo::getMobile));
return Result.error("实名认证失败: 此身份证信息已被其他账号绑定"); // if (count > 0) {
} // return Result.error("实名认证失败: 此身份证信息已被其他账号绑定");
if (!ApiAccessLimitUtil.getCertAuthIsAccessAllowed(String.valueOf(userId), "updateAuthCertInfo", 5)) { // }
return Result.error("实名修改失败: 每月可修改次数已用完,请联系管理员"); // if (!ApiAccessLimitUtil.getCertAuthIsAccessAllowed(String.valueOf(userId), "updateAuthCertInfo", 5)) {
} // return Result.error("实名修改失败: 每月可修改次数已用完,请联系管理员");
String respJson = aliService.auth(certName, certNum, accountNo, mobile); // }
UserInfo userInfo = userInfoService.getByUserId(userId); // String respJson = aliService.auth(certName, certNum, accountNo, mobile);
userInfo.setCertName(certName); // UserInfo userInfo = userInfoService.getByUserId(userId);
userInfo.setCertNo(certNum); // userInfo.setCertName(certName);
userInfo.setAccountNo(accountNo); // userInfo.setCertNo(certNum);
userInfo.setMobile(mobile); // userInfo.setAccountNo(accountNo);
userInfo.setRespJson(respJson); // userInfo.setMobile(mobile);
userInfo.setUpdateTime(DateUtil.date()); // userInfo.setRespJson(respJson);
boolean update = userInfoService.update(userInfo, new LambdaQueryWrapper<UserInfo>().eq(UserInfo::getUserId, userId).eq(UserInfo::getId, userInfo.getId())); // userInfo.setUpdateTime(DateUtil.date());
if (!update) { // boolean update = userInfoService.update(userInfo, new LambdaQueryWrapper<UserInfo>().eq(UserInfo::getUserId, userId).eq(UserInfo::getId, userInfo.getId()));
return Result.error("实名修改失败: 请稍后重试"); // if (!update) {
} // return Result.error("实名修改失败: 请稍后重试");
ApiAccessLimitUtil.setCertAuthIsAccessAllowed(String.valueOf(userId), "updateAuthCertInfo", 1, "month"); // }
// 校验实名信息是否在黑名单里面 // ApiAccessLimitUtil.setCertAuthIsAccessAllowed(String.valueOf(userId), "updateAuthCertInfo", 1, "month");
count = tbUserBlacklistMapper.selectCount(new LambdaQueryWrapper<TbUserBlacklist>().eq(TbUserBlacklist::getIdCardNo, certNum)); // // 校验实名信息是否在黑名单里面
if (count > 0) { // count = tbUserBlacklistMapper.selectCount(new LambdaQueryWrapper<TbUserBlacklist>().eq(TbUserBlacklist::getIdCardNo, certNum));
UserEntity userEntity = userService.getById(userId); // if (count > 0) {
userEntity.setStatus(0); // UserEntity userEntity = userService.getById(userId);
userService.update(userEntity, new LambdaQueryWrapper<UserEntity>().eq(UserEntity::getUserId, userId)); // userEntity.setStatus(0);
log.warn("异常行为用户:实名信息异常: {}", userId); // userService.update(userEntity, new LambdaQueryWrapper<UserEntity>().eq(UserEntity::getUserId, userId));
return Result.error("异常行为: 您的实名信息存在异常行为"); // log.warn("异常行为用户:实名信息异常: {}", userId);
} // return Result.error("异常行为: 您的实名信息存在异常行为");
return Result.success(); // }
// return Result.success();
} }