From 5db2885f73160d80e5d7c2f05f09ae95fed5cb14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=9D=BE?= <8605635+zhang3064194730@user.noreply.gitee.com> Date: Tue, 7 Jan 2025 18:55:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E5=90=8D=E6=A0=A1=E9=AA=8C=E9=BB=91?= =?UTF-8?q?=E5=90=8D=E5=8D=95=E7=94=A8=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/controller/app/AppController.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/java/com/sqx/modules/app/controller/app/AppController.java b/src/main/java/com/sqx/modules/app/controller/app/AppController.java index 28f32d34..cd1fedd3 100644 --- a/src/main/java/com/sqx/modules/app/controller/app/AppController.java +++ b/src/main/java/com/sqx/modules/app/controller/app/AppController.java @@ -14,8 +14,10 @@ import com.sqx.common.utils.DataLimitUtil; import com.sqx.common.utils.Result; import com.sqx.modules.app.annotation.Login; import com.sqx.modules.app.annotation.LoginUser; +import com.sqx.modules.app.entity.TbUserBlacklist; import com.sqx.modules.app.entity.UserEntity; import com.sqx.modules.app.entity.UserInfo; +import com.sqx.modules.app.mapper.TbUserBlacklistMapper; import com.sqx.modules.app.service.AliService; import com.sqx.modules.app.service.AppService; import com.sqx.modules.app.service.UserInfoService; @@ -23,6 +25,7 @@ import com.sqx.modules.app.service.UserService; import com.sqx.modules.common.service.CommonInfoService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.codec.digest.DigestUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -37,6 +40,7 @@ import java.util.Map; @RestController @RequestMapping("/app/user") @Api(value = "APP管理", tags = {"APP管理"}) +@Slf4j public class AppController { @Autowired @@ -47,6 +51,8 @@ public class AppController { private CommonInfoService commonRepository; private final UserInfoService userInfoService; private final AliService aliService; + @Autowired + private TbUserBlacklistMapper tbUserBlacklistMapper; public AppController(UserInfoService userInfoService, AliService aliService) { this.userInfoService = userInfoService; @@ -156,6 +162,16 @@ public class AppController { } try { + // 校验实名信息是否在黑名单里面 + Integer count = tbUserBlacklistMapper.selectCount(new LambdaQueryWrapper().eq(TbUserBlacklist::getRealName, certName) + .eq(TbUserBlacklist::getIdCardNo, certNum)); + if (count > 0) { + userEntity.setStatus(0); + userService.update(userEntity, new LambdaQueryWrapper().eq(UserEntity::getUserId, userId)); + log.warn("异常行为用户:实名信息异常: {}", userId); + return Result.error("异常行为: 您的实名信息存在异常行为"); + } + aliService.authCertNo(certName, certNum); userInfo.setCertName(certName); userInfo.setCertNo(certNum);