From a62f496227cca8ca915635489b5562824258c139 Mon Sep 17 00:00:00 2001 From: zhouyl <583641232@qq.com> Date: Mon, 2 Sep 2024 17:10:18 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=20=20ip=E9=BB=91=E5=90=8D?= =?UTF-8?q?=E5=8D=95=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/controller/system/SysProfileController.java | 2 +- .../framework/interceptor/IpAccessInterceptor.java | 5 ++--- .../functional/service/impl/IpFilterServiceImpl.java | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tp-admin/src/main/java/com/inscloudtech/web/controller/system/SysProfileController.java b/tp-admin/src/main/java/com/inscloudtech/web/controller/system/SysProfileController.java index 35536a7..024aa13 100644 --- a/tp-admin/src/main/java/com/inscloudtech/web/controller/system/SysProfileController.java +++ b/tp-admin/src/main/java/com/inscloudtech/web/controller/system/SysProfileController.java @@ -79,7 +79,7 @@ public class SysProfileController extends BaseController { * 重置密码 * */ - @ApiEncrypt + @ApiEncrypt(response = true) @Log(title = "个人信息", businessType = BusinessType.UPDATE) @PutMapping("/updatePwd") public R updatePwd(@RequestBody SysUserPasswordBo bo) { diff --git a/tp-framework/src/main/java/com/inscloudtech/framework/interceptor/IpAccessInterceptor.java b/tp-framework/src/main/java/com/inscloudtech/framework/interceptor/IpAccessInterceptor.java index 0342329..c4ab00a 100644 --- a/tp-framework/src/main/java/com/inscloudtech/framework/interceptor/IpAccessInterceptor.java +++ b/tp-framework/src/main/java/com/inscloudtech/framework/interceptor/IpAccessInterceptor.java @@ -23,10 +23,7 @@ public class IpAccessInterceptor implements HandlerInterceptor { String ip = ServletUtils.getClientIP(); Set cacheSet = RedisUtils.getCacheSet(Constants.BLACK_IP_LIST); if (cacheSet.contains(ip)) { - // 在黑名单中直接拒绝访问 -// log.info("ip:{} 在黑名单中拒绝访问.....", ip); throw new RuntimeException(ip+"黑名单中拒绝访问"); -// return false; } // 验证通过 @@ -34,3 +31,5 @@ public class IpAccessInterceptor implements HandlerInterceptor { } } + + diff --git a/tp-functional/src/main/java/com/inscloudtech/functional/service/impl/IpFilterServiceImpl.java b/tp-functional/src/main/java/com/inscloudtech/functional/service/impl/IpFilterServiceImpl.java index faab5ac..fd8301b 100644 --- a/tp-functional/src/main/java/com/inscloudtech/functional/service/impl/IpFilterServiceImpl.java +++ b/tp-functional/src/main/java/com/inscloudtech/functional/service/impl/IpFilterServiceImpl.java @@ -38,6 +38,6 @@ public class IpFilterServiceImpl extends ServiceImpl i @Override public void updateBlackIpList(){ - this.list(); + this.init(); } }