From e94b2f1d632609d2112fb95391b3be74cde044a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B7=E5=86=B7?= <2270033969@qq.com> Date: Mon, 8 Jul 2024 09:16:06 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20Introducing=20new=20features.=20?= =?UTF-8?q?=E3=80=90=E7=B3=BB=E7=BB=9F=E7=AE=A1=E7=90=86=E3=80=91=E6=95=8F?= =?UTF-8?q?=E6=84=9F=E8=AF=8D=E7=BB=B4=E6=8A=A4=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 85fbc6de0d50a9dc8869ed54c55155583fdc0709) --- db/0pigxx_boot.sql | 29 ++- db/2pigxx.sql | 27 +++ pigx-common/pigx-common-bom/pom.xml | 7 + .../common/core/constant/CacheConstants.java | 177 +++++++++--------- pigx-common/pigx-common-sensitive/pom.xml | 21 ++- .../sensitive/SensitiveAutoConfiguration.java | 94 +++++++++- .../sensitive/core/SensitiveSerialize.java | 4 +- .../util/RemoteSensitiveService.java | 22 +++ .../util/SensitiveWordsProperties.java | 88 +++++++++ .../word/SensitiveWordCustomizer.java | 44 +++++ ...mework.cloud.openfeign.FeignClient.imports | 1 + .../api/entity/SysSensitiveWordEntity.java | 91 +++++++++ .../SysSensitiveWordController.java | 172 +++++++++++++++++ .../admin/mapper/SysSensitiveWordMapper.java | 11 ++ .../service/SysSensitiveWordService.java | 23 +++ .../impl/SysSensitiveWordServiceImpl.java | 65 +++++++ .../src/main/resources/file/qa.xlsx | Bin 0 -> 10415 bytes .../mapper/SysSensitiveWordMapper.xml | 18 ++ 18 files changed, 787 insertions(+), 107 deletions(-) create mode 100644 pigx-common/pigx-common-sensitive/src/main/java/com/pig4cloud/pigx/common/sensitive/util/RemoteSensitiveService.java create mode 100644 pigx-common/pigx-common-sensitive/src/main/java/com/pig4cloud/pigx/common/sensitive/util/SensitiveWordsProperties.java create mode 100644 pigx-common/pigx-common-sensitive/src/main/java/com/pig4cloud/pigx/common/sensitive/word/SensitiveWordCustomizer.java create mode 100644 pigx-common/pigx-common-sensitive/src/main/resources/META-INF/spring/org.springframework.cloud.openfeign.FeignClient.imports create mode 100644 pigx-upms/pigx-upms-api/src/main/java/com/pig4cloud/pigx/admin/api/entity/SysSensitiveWordEntity.java create mode 100644 pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/controller/SysSensitiveWordController.java create mode 100644 pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/mapper/SysSensitiveWordMapper.java create mode 100644 pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/service/SysSensitiveWordService.java create mode 100644 pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/service/impl/SysSensitiveWordServiceImpl.java create mode 100644 pigx-upms/pigx-upms-biz/src/main/resources/file/qa.xlsx create mode 100644 pigx-upms/pigx-upms-biz/src/main/resources/mapper/SysSensitiveWordMapper.xml diff --git a/db/0pigxx_boot.sql b/db/0pigxx_boot.sql index 67648e3d9..682572160 100644 --- a/db/0pigxx_boot.sql +++ b/db/0pigxx_boot.sql @@ -465,8 +465,21 @@ CREATE TABLE `sys_log` ( -- ---------------------------- -- Records of sys_log -- ---------------------------- -BEGIN; -COMMIT; +DROP TABLE IF EXISTS `sys_sensitive_word`; +CREATE TABLE `sys_sensitive_word` ( + `sensitive_id` bigint NOT NULL COMMENT '主键', + `sensitive_word` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '敏感词', + `sensitive_type` char(1) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '类型', + `remark` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注', + `create_by` varchar(64) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建人', + `create_time` datetime DEFAULT NULL COMMENT '创建时间', + `update_by` varchar(64) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '修改人', + `update_time` datetime DEFAULT NULL COMMENT '修改时间', + `del_flag` char(1) COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '删除标记', + `tenant_id` bigint DEFAULT NULL COMMENT '租户ID', + PRIMARY KEY (`sensitive_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='敏感词'; + -- ---------------------------- -- Table structure for sys_menu @@ -585,6 +598,12 @@ INSERT INTO `sys_menu` (`menu_id`, `name`, `permission`, `path`, `component`, `p INSERT INTO `sys_menu` (`menu_id`, `name`, `permission`, `path`, `component`, `parent_id`, `icon`, `visible`, `sort_order`, `keep_alive`, `embedded`, `menu_type`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `tenant_id`) VALUES (2913, '行政区划表删除', 'sys_sysArea_del', NULL, NULL, 2910, '1', '1', 3, '0', NULL, '1', ' ', NULL, ' ', '2024-02-17 14:31:21', '0', 1); INSERT INTO `sys_menu` (`menu_id`, `name`, `permission`, `path`, `component`, `parent_id`, `icon`, `visible`, `sort_order`, `keep_alive`, `embedded`, `menu_type`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `tenant_id`) VALUES (2914, '导入导出', 'sys_sysArea_export', NULL, NULL, 2910, '1', '1', 3, '0', NULL, '1', ' ', NULL, ' ', '2024-02-17 14:31:26', '0', 1); INSERT INTO `sys_menu` (`menu_id`, `name`, `permission`, `path`, `component`, `parent_id`, `icon`, `visible`, `sort_order`, `keep_alive`, `embedded`, `menu_type`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `tenant_id`) VALUES (2915, '行政区划表修改', 'sys_sysArea_edit', NULL, NULL, 2910, '1', '1', 2, '0', NULL, '1', ' ', NULL, ' ', '2024-02-17 14:31:31', '0', 1); +INSERT INTO `sys_menu` (`menu_id`, `name`, `permission`, `path`, `component`, `parent_id`, `icon`, `visible`, `sort_order`, `keep_alive`, `embedded`, `menu_type`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `tenant_id`) VALUES (2920, '敏感词管理', '', '/admin/sensitive/index', NULL, 2000, 'iconfont icon-wenducanshu-05', '1', 12, '0', NULL, '0', '', NULL, 'admin', '2024-07-07 15:09:27', '0', 1); +INSERT INTO `sys_menu` (`menu_id`, `name`, `permission`, `path`, `component`, `parent_id`, `icon`, `visible`, `sort_order`, `keep_alive`, `embedded`, `menu_type`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `tenant_id`) VALUES (2921, '敏感词查看', 'admin_sysSensitiveWord_view', NULL, NULL, 2920, '1', '1', 0, '0', NULL, '1', ' ', NULL, ' ', NULL, '0', 1); +INSERT INTO `sys_menu` (`menu_id`, `name`, `permission`, `path`, `component`, `parent_id`, `icon`, `visible`, `sort_order`, `keep_alive`, `embedded`, `menu_type`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `tenant_id`) VALUES (2922, '敏感词新增', 'admin_sysSensitiveWord_add', NULL, NULL, 2920, '1', '1', 1, '0', NULL, '1', ' ', NULL, ' ', NULL, '0', 1); +INSERT INTO `sys_menu` (`menu_id`, `name`, `permission`, `path`, `component`, `parent_id`, `icon`, `visible`, `sort_order`, `keep_alive`, `embedded`, `menu_type`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `tenant_id`) VALUES (2923, '敏感词修改', 'admin_sysSensitiveWord_edit', NULL, NULL, 2920, '1', '1', 2, '0', NULL, '1', ' ', NULL, ' ', NULL, '0', 1); +INSERT INTO `sys_menu` (`menu_id`, `name`, `permission`, `path`, `component`, `parent_id`, `icon`, `visible`, `sort_order`, `keep_alive`, `embedded`, `menu_type`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `tenant_id`) VALUES (2924, '敏感词删除', 'admin_sysSensitiveWord_del', NULL, NULL, 2920, '1', '1', 3, '0', NULL, '1', ' ', NULL, ' ', NULL, '0', 1); +INSERT INTO `sys_menu` (`menu_id`, `name`, `permission`, `path`, `component`, `parent_id`, `icon`, `visible`, `sort_order`, `keep_alive`, `embedded`, `menu_type`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `tenant_id`) VALUES (2925, '导入导出', 'admin_sysSensitiveWord_export', NULL, NULL, 2920, '1', '1', 3, '0', NULL, '1', ' ', NULL, ' ', NULL, '0', 1); INSERT INTO `sys_menu` (`menu_id`, `name`, `permission`, `path`, `component`, `parent_id`, `icon`, `visible`, `sort_order`, `keep_alive`, `embedded`, `menu_type`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `tenant_id`) VALUES (3000, '公众号平台', NULL, '/mp', NULL, 9900, 'iconfont icon-putong', '1', 3, '0', '0', '0', 'admin', '2023-02-24 10:40:44', 'admin', '2023-11-27 14:52:28', '0', 1); INSERT INTO `sys_menu` (`menu_id`, `name`, `permission`, `path`, `component`, `parent_id`, `icon`, `visible`, `sort_order`, `keep_alive`, `embedded`, `menu_type`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `tenant_id`) VALUES (3001, '账号管理', NULL, '/biz/mp/wx-account/index', NULL, 3000, 'iconfont icon-putong', '1', 0, '0', '0', '0', 'admin', '2023-02-24 10:43:03', ' ', '2023-11-01 17:28:07', '0', 1); INSERT INTO `sys_menu` (`menu_id`, `name`, `permission`, `path`, `component`, `parent_id`, `icon`, `visible`, `sort_order`, `keep_alive`, `embedded`, `menu_type`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `tenant_id`) VALUES (3002, '菜单设置', NULL, '/biz/mp/wx-menu/index', NULL, 3000, 'iconfont icon--chaifenlie', '1', 1, '0', '0', '0', 'admin', '2023-02-24 11:16:32', 'admin', '2023-11-01 17:28:11', '0', 1); @@ -955,6 +974,12 @@ INSERT INTO `sys_role_menu` VALUES (1, 2912); INSERT INTO `sys_role_menu` VALUES (1, 2913); INSERT INTO `sys_role_menu` VALUES (1, 2914); INSERT INTO `sys_role_menu` VALUES (1, 2915); +INSERT INTO `sys_role_menu` VALUES (1, 2920); +INSERT INTO `sys_role_menu` VALUES (1, 2921); +INSERT INTO `sys_role_menu` VALUES (1, 2922); +INSERT INTO `sys_role_menu` VALUES (1, 2923); +INSERT INTO `sys_role_menu` VALUES (1, 2924); +INSERT INTO `sys_role_menu` VALUES (1, 2925); INSERT INTO `sys_role_menu` VALUES (1, 3000); INSERT INTO `sys_role_menu` VALUES (1, 3001); INSERT INTO `sys_role_menu` VALUES (1, 3002); diff --git a/db/2pigxx.sql b/db/2pigxx.sql index 259d797fc..7d8dd4ef8 100644 --- a/db/2pigxx.sql +++ b/db/2pigxx.sql @@ -335,6 +335,21 @@ CREATE TABLE `sys_file_group` ( PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='文件分类表'; +DROP TABLE IF EXISTS `sys_sensitive_word`; +CREATE TABLE `sys_sensitive_word` ( + `sensitive_id` bigint NOT NULL COMMENT '主键', + `sensitive_word` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '敏感词', + `sensitive_type` char(1) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '类型', + `remark` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注', + `create_by` varchar(64) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建人', + `create_time` datetime DEFAULT NULL COMMENT '创建时间', + `update_by` varchar(64) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '修改人', + `update_time` datetime DEFAULT NULL COMMENT '修改时间', + `del_flag` char(1) COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '删除标记', + `tenant_id` bigint DEFAULT NULL COMMENT '租户ID', + PRIMARY KEY (`sensitive_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='敏感词'; + -- ---------------------------- -- Table structure for sys_i18n -- ---------------------------- @@ -582,6 +597,12 @@ INSERT INTO `sys_menu` (`menu_id`, `name`, `permission`, `path`, `component`, `p INSERT INTO `sys_menu` (`menu_id`, `name`, `permission`, `path`, `component`, `parent_id`, `icon`, `visible`, `sort_order`, `keep_alive`, `embedded`, `menu_type`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `tenant_id`) VALUES (2913, '行政区划表删除', 'sys_sysArea_del', NULL, NULL, 2910, '1', '1', 3, '0', NULL, '1', ' ', NULL, ' ', '2024-02-17 14:31:21', '0', 1); INSERT INTO `sys_menu` (`menu_id`, `name`, `permission`, `path`, `component`, `parent_id`, `icon`, `visible`, `sort_order`, `keep_alive`, `embedded`, `menu_type`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `tenant_id`) VALUES (2914, '导入导出', 'sys_sysArea_export', NULL, NULL, 2910, '1', '1', 3, '0', NULL, '1', ' ', NULL, ' ', '2024-02-17 14:31:26', '0', 1); INSERT INTO `sys_menu` (`menu_id`, `name`, `permission`, `path`, `component`, `parent_id`, `icon`, `visible`, `sort_order`, `keep_alive`, `embedded`, `menu_type`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `tenant_id`) VALUES (2915, '行政区划表修改', 'sys_sysArea_edit', NULL, NULL, 2910, '1', '1', 2, '0', NULL, '1', ' ', NULL, ' ', '2024-02-17 14:31:31', '0', 1); +INSERT INTO `sys_menu` (`menu_id`, `name`, `permission`, `path`, `component`, `parent_id`, `icon`, `visible`, `sort_order`, `keep_alive`, `embedded`, `menu_type`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `tenant_id`) VALUES (2920, '敏感词管理', '', '/admin/sensitive/index', NULL, 2000, 'iconfont icon-wenducanshu-05', '1', 12, '0', NULL, '0', '', NULL, 'admin', '2024-07-07 15:09:27', '0', 1); +INSERT INTO `sys_menu` (`menu_id`, `name`, `permission`, `path`, `component`, `parent_id`, `icon`, `visible`, `sort_order`, `keep_alive`, `embedded`, `menu_type`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `tenant_id`) VALUES (2921, '敏感词查看', 'admin_sysSensitiveWord_view', NULL, NULL, 2920, '1', '1', 0, '0', NULL, '1', ' ', NULL, ' ', NULL, '0', 1); +INSERT INTO `sys_menu` (`menu_id`, `name`, `permission`, `path`, `component`, `parent_id`, `icon`, `visible`, `sort_order`, `keep_alive`, `embedded`, `menu_type`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `tenant_id`) VALUES (2922, '敏感词新增', 'admin_sysSensitiveWord_add', NULL, NULL, 2920, '1', '1', 1, '0', NULL, '1', ' ', NULL, ' ', NULL, '0', 1); +INSERT INTO `sys_menu` (`menu_id`, `name`, `permission`, `path`, `component`, `parent_id`, `icon`, `visible`, `sort_order`, `keep_alive`, `embedded`, `menu_type`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `tenant_id`) VALUES (2923, '敏感词修改', 'admin_sysSensitiveWord_edit', NULL, NULL, 2920, '1', '1', 2, '0', NULL, '1', ' ', NULL, ' ', NULL, '0', 1); +INSERT INTO `sys_menu` (`menu_id`, `name`, `permission`, `path`, `component`, `parent_id`, `icon`, `visible`, `sort_order`, `keep_alive`, `embedded`, `menu_type`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `tenant_id`) VALUES (2924, '敏感词删除', 'admin_sysSensitiveWord_del', NULL, NULL, 2920, '1', '1', 3, '0', NULL, '1', ' ', NULL, ' ', NULL, '0', 1); +INSERT INTO `sys_menu` (`menu_id`, `name`, `permission`, `path`, `component`, `parent_id`, `icon`, `visible`, `sort_order`, `keep_alive`, `embedded`, `menu_type`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `tenant_id`) VALUES (2925, '导入导出', 'admin_sysSensitiveWord_export', NULL, NULL, 2920, '1', '1', 3, '0', NULL, '1', ' ', NULL, ' ', NULL, '0', 1); INSERT INTO `sys_menu` (`menu_id`, `name`, `permission`, `path`, `component`, `parent_id`, `icon`, `visible`, `sort_order`, `keep_alive`, `embedded`, `menu_type`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `tenant_id`) VALUES (3000, '公众号平台', NULL, '/mp', NULL, 9900, 'iconfont icon-putong', '1', 3, '0', '0', '0', 'admin', '2023-02-24 10:40:44', 'admin', '2023-11-27 14:52:28', '0', 1); INSERT INTO `sys_menu` (`menu_id`, `name`, `permission`, `path`, `component`, `parent_id`, `icon`, `visible`, `sort_order`, `keep_alive`, `embedded`, `menu_type`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `tenant_id`) VALUES (3001, '账号管理', NULL, '/biz/mp/wx-account/index', NULL, 3000, 'iconfont icon-putong', '1', 0, '0', '0', '0', 'admin', '2023-02-24 10:43:03', ' ', '2023-11-01 17:28:07', '0', 1); INSERT INTO `sys_menu` (`menu_id`, `name`, `permission`, `path`, `component`, `parent_id`, `icon`, `visible`, `sort_order`, `keep_alive`, `embedded`, `menu_type`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `tenant_id`) VALUES (3002, '菜单设置', NULL, '/biz/mp/wx-menu/index', NULL, 3000, 'iconfont icon--chaifenlie', '1', 1, '0', '0', '0', 'admin', '2023-02-24 11:16:32', 'admin', '2023-11-01 17:28:11', '0', 1); @@ -951,6 +972,12 @@ INSERT INTO `sys_role_menu` VALUES (1, 2912); INSERT INTO `sys_role_menu` VALUES (1, 2913); INSERT INTO `sys_role_menu` VALUES (1, 2914); INSERT INTO `sys_role_menu` VALUES (1, 2915); +INSERT INTO `sys_role_menu` VALUES (1, 2920); +INSERT INTO `sys_role_menu` VALUES (1, 2921); +INSERT INTO `sys_role_menu` VALUES (1, 2922); +INSERT INTO `sys_role_menu` VALUES (1, 2923); +INSERT INTO `sys_role_menu` VALUES (1, 2924); +INSERT INTO `sys_role_menu` VALUES (1, 2925); INSERT INTO `sys_role_menu` VALUES (1, 3000); INSERT INTO `sys_role_menu` VALUES (1, 3001); INSERT INTO `sys_role_menu` VALUES (1, 3002); diff --git a/pigx-common/pigx-common-bom/pom.xml b/pigx-common/pigx-common-bom/pom.xml index a469507c9..f4058a431 100644 --- a/pigx-common/pigx-common-bom/pom.xml +++ b/pigx-common/pigx-common-bom/pom.xml @@ -46,6 +46,7 @@ 7.3.3 1.7.0 7.1 + 0.17.0 2.17.1 0.33.0 1.0.0 @@ -195,6 +196,12 @@ asm ${asm.version} + + + com.github.houbb + sensitive-word + ${sensitive.word.version} + com.baomidou diff --git a/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/constant/CacheConstants.java b/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/constant/CacheConstants.java index 2765acf4f..a6edc56ef 100644 --- a/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/constant/CacheConstants.java +++ b/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/constant/CacheConstants.java @@ -8,111 +8,116 @@ package com.pig4cloud.pigx.common.core.constant; */ public interface CacheConstants { - /** - * 全局缓存,在缓存名称上加上该前缀表示该缓存不区分租户,比如: - *

- * {@code @Cacheable(value = CacheConstants.GLOBALLY+CacheConstants.MENU_DETAILS, key = "#roleId + '_menu'", unless = "#result == null")} - */ - String GLOBALLY = "gl:"; + /** + * 全局缓存,在缓存名称上加上该前缀表示该缓存不区分租户,比如: + *

+ * {@code @Cacheable(value = CacheConstants.GLOBALLY+CacheConstants.MENU_DETAILS, key = "#roleId + '_menu'", unless = "#result == null")} + */ + String GLOBALLY = "gl:"; - /** - * 验证码前缀 - */ - String DEFAULT_CODE_KEY = "DEFAULT_CODE_KEY:"; + /** + * 验证码前缀 + */ + String DEFAULT_CODE_KEY = "DEFAULT_CODE_KEY:"; - /** - * 菜单信息缓存 - */ - String MENU_DETAILS = "menu_details"; + /** + * 菜单信息缓存 + */ + String MENU_DETAILS = "menu_details"; - /** - * 用户信息缓存 - */ - String USER_DETAILS = "user_details"; + /** + * 用户信息缓存 + */ + String USER_DETAILS = "user_details"; - /** - * 移动端用户信息缓存 - */ - String USER_DETAILS_MINI = "user_details_mini"; + /** + * 移动端用户信息缓存 + */ + String USER_DETAILS_MINI = "user_details_mini"; - /** - * 角色信息缓存 - */ - String ROLE_DETAILS = "role_details"; + /** + * 角色信息缓存 + */ + String ROLE_DETAILS = "role_details"; - /** - * 字典信息缓存 - */ - String DICT_DETAILS = "dict_details"; + /** + * 字典信息缓存 + */ + String DICT_DETAILS = "dict_details"; - /** - * oauth 客户端信息 - */ - String CLIENT_DETAILS_KEY = "pigx_oauth:client:details"; + /** + * oauth 客户端信息 + */ + String CLIENT_DETAILS_KEY = "pigx_oauth:client:details"; - /** - * spring boot admin 事件key - */ - String EVENT_KEY = GLOBALLY + "event_key"; + /** + * spring boot admin 事件key + */ + String EVENT_KEY = GLOBALLY + "event_key"; - /** - * 路由存放 - */ - String ROUTE_KEY = GLOBALLY + "gateway_route_key"; + /** + * 路由存放 + */ + String ROUTE_KEY = GLOBALLY + "gateway_route_key"; - /** - * 内存reload 时间 - */ - String ROUTE_JVM_RELOAD_TOPIC = "gateway_jvm_route_reload_topic"; + /** + * 内存reload 时间 + */ + String ROUTE_JVM_RELOAD_TOPIC = "gateway_jvm_route_reload_topic"; - /** - * redis 重新加载 路由信息 - */ - String ROUTE_REDIS_RELOAD_TOPIC = "upms_redis_route_reload_topic"; + /** + * redis 重新加载 路由信息 + */ + String ROUTE_REDIS_RELOAD_TOPIC = "upms_redis_route_reload_topic"; - /** - * redis 重新加载客户端信息 - */ - String CLIENT_REDIS_RELOAD_TOPIC = "upms_redis_client_reload_topic"; + /** + * redis 重新加载客户端信息 + */ + String CLIENT_REDIS_RELOAD_TOPIC = "upms_redis_client_reload_topic"; - /** - * 公众号 reload - */ - String MP_REDIS_RELOAD_TOPIC = "mp_redis_reload_topic"; + /** + * 敏感词重新加载 + */ + String SENSITIVE_REDIS_RELOAD_TOPIC = "sensitive_client_reload_topic"; - /** - * 支付 reload 事件 - */ - String PAY_REDIS_RELOAD_TOPIC = "pay_redis_reload_topic"; + /** + * 公众号 reload + */ + String MP_REDIS_RELOAD_TOPIC = "mp_redis_reload_topic"; - /** - * 参数缓存 - */ - String PARAMS_DETAILS = "params_details"; + /** + * 支付 reload 事件 + */ + String PAY_REDIS_RELOAD_TOPIC = "pay_redis_reload_topic"; - /** - * 租户缓存 (不区分租户) - */ - String TENANT_DETAILS = GLOBALLY + "tenant_details"; + /** + * 参数缓存 + */ + String PARAMS_DETAILS = "params_details"; - /** - * i18n缓存 (不区分租户) - */ - String I18N_DETAILS = GLOBALLY + "i18n_details"; + /** + * 租户缓存 (不区分租户) + */ + String TENANT_DETAILS = GLOBALLY + "tenant_details"; - /** - * 客户端配置缓存 - */ - String CLIENT_FLAG = "client_config_flag"; + /** + * i18n缓存 (不区分租户) + */ + String I18N_DETAILS = GLOBALLY + "i18n_details"; - /** - * 登录错误次数 - */ - String LOGIN_ERROR_TIMES = "login_error_times"; + /** + * 客户端配置缓存 + */ + String CLIENT_FLAG = "client_config_flag"; - /** - * oauth 缓存前缀 - */ - String PROJECT_OAUTH_ACCESS = "token::access_token"; + /** + * 登录错误次数 + */ + String LOGIN_ERROR_TIMES = "login_error_times"; + + /** + * oauth 缓存前缀 + */ + String PROJECT_OAUTH_ACCESS = "token::access_token"; } diff --git a/pigx-common/pigx-common-sensitive/pom.xml b/pigx-common/pigx-common-sensitive/pom.xml index cab910896..9c9822db4 100644 --- a/pigx-common/pigx-common-sensitive/pom.xml +++ b/pigx-common/pigx-common-sensitive/pom.xml @@ -40,25 +40,26 @@ spring-webmvc provided + - cn.hutool - hutool-core + com.github.houbb + sensitive-word - cn.hutool - hutool-extra + com.pig4cloud + pigx-common-core - com.fasterxml.jackson.core - jackson-core - - - com.fasterxml.jackson.core - jackson-databind + com.pig4cloud + pigx-common-feign org.springframework.security spring-security-core + + org.springframework.data + spring-data-redis + diff --git a/pigx-common/pigx-common-sensitive/src/main/java/com/pig4cloud/pigx/common/sensitive/SensitiveAutoConfiguration.java b/pigx-common/pigx-common-sensitive/src/main/java/com/pig4cloud/pigx/common/sensitive/SensitiveAutoConfiguration.java index 5f7665087..c932e72d3 100644 --- a/pigx-common/pigx-common-sensitive/src/main/java/com/pig4cloud/pigx/common/sensitive/SensitiveAutoConfiguration.java +++ b/pigx-common/pigx-common-sensitive/src/main/java/com/pig4cloud/pigx/common/sensitive/SensitiveAutoConfiguration.java @@ -1,10 +1,23 @@ package com.pig4cloud.pigx.common.sensitive; +import com.github.houbb.sensitive.word.bs.SensitiveWordBs; +import com.github.houbb.sensitive.word.support.deny.WordDenys; +import com.pig4cloud.pigx.common.core.constant.CacheConstants; +import com.pig4cloud.pigx.common.core.util.SpringContextHolder; import com.pig4cloud.pigx.common.sensitive.core.SensitiveService; +import com.pig4cloud.pigx.common.sensitive.util.RemoteSensitiveService; +import com.pig4cloud.pigx.common.sensitive.util.SensitiveWordsProperties; +import com.pig4cloud.pigx.common.sensitive.word.SensitiveWordCustomizer; +import lombok.extern.slf4j.Slf4j; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Lazy; +import org.springframework.data.redis.connection.RedisConnectionFactory; +import org.springframework.data.redis.listener.ChannelTopic; +import org.springframework.data.redis.listener.RedisMessageListenerContainer; import org.springframework.security.core.Authentication; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.context.SecurityContextHolder; @@ -17,14 +30,11 @@ import java.util.Objects; * @author lengleng * @date 2024/6/27 */ +@Slf4j @AutoConfiguration @Configuration(proxyBeanMethods = false) +@EnableConfigurationProperties(SensitiveWordsProperties.class) public class SensitiveAutoConfiguration { - /** - * 不脱敏的权限 - */ - public static String NO_MASK = "no_mask"; - /** * 注入默认的脱敏权限判断 @@ -33,7 +43,7 @@ public class SensitiveAutoConfiguration { */ @Bean @ConditionalOnMissingBean - public SensitiveService sensitiveService() { + public SensitiveService sensitiveService(SensitiveWordsProperties sensitiveWordsProperties) { return sensitive -> { Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); if (Objects.isNull(authentication)) { @@ -42,7 +52,77 @@ public class SensitiveAutoConfiguration { // 判断角色是否包含 no_mask 的权限 return authentication.getAuthorities().stream().map(GrantedAuthority::getAuthority) - .noneMatch(s -> s.equals(NO_MASK)); + .noneMatch(s -> s.equals(sensitiveWordsProperties.getMask())); }; } + + /** + * 初始化敏感词定制 + * + * @return SensitiveWordCustomizer + */ + @Bean + @Lazy + public SensitiveWordCustomizer sensitiveWordCustomizer(RemoteSensitiveService remoteSensitiveService) { + return new SensitiveWordCustomizer(remoteSensitiveService); + } + + /** + * 懒加载初始化引导类 + * + * @return 初始化引导类 + */ + @Bean + @Lazy + public SensitiveWordBs sensitiveWordBs(@Lazy SensitiveWordCustomizer sensitiveWordCustomizer + , SensitiveWordsProperties sensitiveWordsProperties) { + + + return SensitiveWordBs.newInstance() + // 加载白名单数据 + .wordAllow(sensitiveWordCustomizer) + // 加载黑名单数据 + .wordDeny(WordDenys.chains(WordDenys.defaults(), sensitiveWordCustomizer)) + // 忽略大小写 + .ignoreCase(sensitiveWordsProperties.isIgnoreCase()) + // 忽略半角圆角 + .ignoreWidth(sensitiveWordsProperties.isIgnoreWidth()) + // 忽略数字的写法 + .ignoreNumStyle(sensitiveWordsProperties.isIgnoreNumStyle()) + // 忽略中文的书写格式:简繁体 + .ignoreChineseStyle(sensitiveWordsProperties.isIgnoreChineseStyle()) + // 忽略英文的书写格式 + .ignoreEnglishStyle(sensitiveWordsProperties.isIgnoreEnglishStyle()) + // 忽略重复词 + .ignoreRepeat(sensitiveWordsProperties.isIgnoreRepeat()) + // 是否启用数字检测 + .enableNumCheck(sensitiveWordsProperties.isEnableNumCheck()) + // 是否启用邮箱检测 + .enableEmailCheck(sensitiveWordsProperties.isEnableEmailCheck()) + // 是否启用链接检测 + .enableUrlCheck(sensitiveWordsProperties.isEnableUrlCheck()) + // 数字检测,自定义指定长度 + .numCheckLen(sensitiveWordsProperties.getNumCheckLen()) + .init(); + } + + /** + * redis 监听配置 + * + * @param redisConnectionFactory redis 配置 + * @return + */ + @Bean + public RedisMessageListenerContainer redisContainer(RedisConnectionFactory redisConnectionFactory) { + RedisMessageListenerContainer container = new RedisMessageListenerContainer(); + container.setConnectionFactory(redisConnectionFactory); + container.addMessageListener((message, bytes) -> { + log.info("开始重新加载敏感词库"); + SpringContextHolder.getBean(SensitiveWordBs.class).init(); + log.info("敏感词库加载完成"); + }, + new ChannelTopic(CacheConstants.SENSITIVE_REDIS_RELOAD_TOPIC)); + return container; + } + } diff --git a/pigx-common/pigx-common-sensitive/src/main/java/com/pig4cloud/pigx/common/sensitive/core/SensitiveSerialize.java b/pigx-common/pigx-common-sensitive/src/main/java/com/pig4cloud/pigx/common/sensitive/core/SensitiveSerialize.java index a5649d665..8d74d1865 100644 --- a/pigx-common/pigx-common-sensitive/src/main/java/com/pig4cloud/pigx/common/sensitive/core/SensitiveSerialize.java +++ b/pigx-common/pigx-common-sensitive/src/main/java/com/pig4cloud/pigx/common/sensitive/core/SensitiveSerialize.java @@ -18,13 +18,13 @@ package com.pig4cloud.pigx.common.sensitive.core; import cn.hutool.core.util.StrUtil; -import cn.hutool.extra.spring.SpringUtil; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.BeanProperty; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.SerializerProvider; import com.fasterxml.jackson.databind.ser.ContextualSerializer; +import com.pig4cloud.pigx.common.core.util.SpringContextHolder; import com.pig4cloud.pigx.common.sensitive.annotation.Sensitive; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -56,7 +56,7 @@ public class SensitiveSerialize extends JsonSerializer implements Contex } // 判断是否有可以查看原文 - SensitiveService sensitiveService = SpringUtil.getBean(SensitiveService.class); + SensitiveService sensitiveService = SpringContextHolder.getBean(SensitiveService.class); if (!sensitiveService.isSensitive(sensitive)) { jsonGenerator.writeString(origin); return; diff --git a/pigx-common/pigx-common-sensitive/src/main/java/com/pig4cloud/pigx/common/sensitive/util/RemoteSensitiveService.java b/pigx-common/pigx-common-sensitive/src/main/java/com/pig4cloud/pigx/common/sensitive/util/RemoteSensitiveService.java new file mode 100644 index 000000000..fea51e9da --- /dev/null +++ b/pigx-common/pigx-common-sensitive/src/main/java/com/pig4cloud/pigx/common/sensitive/util/RemoteSensitiveService.java @@ -0,0 +1,22 @@ +package com.pig4cloud.pigx.common.sensitive.util; + +import com.pig4cloud.pigx.common.core.constant.ServiceNameConstants; +import com.pig4cloud.pigx.common.core.util.R; +import com.pig4cloud.pigx.common.feign.annotation.NoToken; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; + +import java.util.List; + +/** + * @author lengleng + * @date 2024/7/7 + */ +@FeignClient(contextId = "remoteSensitiveService", value = ServiceNameConstants.UPMS_SERVICE) +public interface RemoteSensitiveService { + + @NoToken + @GetMapping("/sysSensitiveWord/remote/list/{type}") + R> list(@PathVariable String type); +} diff --git a/pigx-common/pigx-common-sensitive/src/main/java/com/pig4cloud/pigx/common/sensitive/util/SensitiveWordsProperties.java b/pigx-common/pigx-common-sensitive/src/main/java/com/pig4cloud/pigx/common/sensitive/util/SensitiveWordsProperties.java new file mode 100644 index 000000000..fe71341ed --- /dev/null +++ b/pigx-common/pigx-common-sensitive/src/main/java/com/pig4cloud/pigx/common/sensitive/util/SensitiveWordsProperties.java @@ -0,0 +1,88 @@ +package com.pig4cloud.pigx.common.sensitive.util; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * 敏感词配置类 + * + * @author lengleng + * @date 2024/3/26 + *

+ */ +@Data +@ConfigurationProperties(SensitiveWordsProperties.PREFIX) +public class SensitiveWordsProperties { + + public static final String PREFIX = "pigx.sensitive.word"; + + /** + * The sensitive words to detect. + */ + private String mask = "*"; + + /** + * Whether the sensitive words detection is enabled. + */ + private boolean enabled = true; + + /** + * Whether to ignore case when detecting sensitive words. + */ + private boolean ignoreCase = true; + + /** + * Whether to ignore width (full-width and half-width characters) when detecting + * sensitive words. + */ + private boolean ignoreWidth = true; + + /** + * Whether to ignore number style (Arabic numerals, Roman numerals, etc.) when + * detecting sensitive words. + */ + private boolean ignoreNumStyle = true; + + /** + * Whether to ignore Chinese style (simplified and traditional) when detecting + * sensitive words. + */ + private boolean ignoreChineseStyle = true; + + /** + * Whether to ignore English style (US and UK spelling) when detecting sensitive + * words. + */ + private boolean ignoreEnglishStyle = true; + + /** + * Whether to ignore repeated words when detecting sensitive words. + */ + private boolean ignoreRepeat = true; + + /** + * Whether to enable number check when detecting sensitive words. + */ + private boolean enableNumCheck = true; + + /** + * Whether to enable email check when detecting sensitive words. + */ + private boolean enableEmailCheck = true; + + /** + * Whether to enable URL check when detecting sensitive words. + */ + private boolean enableUrlCheck = true; + + /** + * The length of numbers to check when detecting sensitive words. + */ + private int numCheckLen = 8; + + /** + * The error message to return when sensitive words are detected. + */ + private String errorMsg = "您的输入包含敏感词,请重新输入"; + +} diff --git a/pigx-common/pigx-common-sensitive/src/main/java/com/pig4cloud/pigx/common/sensitive/word/SensitiveWordCustomizer.java b/pigx-common/pigx-common-sensitive/src/main/java/com/pig4cloud/pigx/common/sensitive/word/SensitiveWordCustomizer.java new file mode 100644 index 000000000..54dd162c6 --- /dev/null +++ b/pigx-common/pigx-common-sensitive/src/main/java/com/pig4cloud/pigx/common/sensitive/word/SensitiveWordCustomizer.java @@ -0,0 +1,44 @@ +package com.pig4cloud.pigx.common.sensitive.word; + +import com.github.houbb.sensitive.word.api.IWordAllow; +import com.github.houbb.sensitive.word.api.IWordDeny; +import com.pig4cloud.pigx.common.core.constant.enums.YesNoEnum; +import com.pig4cloud.pigx.common.core.util.RetOps; +import com.pig4cloud.pigx.common.sensitive.util.RemoteSensitiveService; +import lombok.RequiredArgsConstructor; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author lengleng + * @date 2024/7/6 + *

+ * 敏感词定制 + */ +@RequiredArgsConstructor +public class SensitiveWordCustomizer implements IWordAllow, IWordDeny { + + private final RemoteSensitiveService remoteSensitiveService; + + /** + * 白名单列表 + * + * @return List + */ + @Override + public List allow() { + return RetOps.of(remoteSensitiveService.list(YesNoEnum.YES.getCode())).getData().orElseGet(ArrayList::new); + } + + /** + * 黑名单列表 + * + * @return List + */ + @Override + public List deny() { + return RetOps.of(remoteSensitiveService.list(YesNoEnum.NO.getCode())).getData().orElseGet(ArrayList::new); + + } +} diff --git a/pigx-common/pigx-common-sensitive/src/main/resources/META-INF/spring/org.springframework.cloud.openfeign.FeignClient.imports b/pigx-common/pigx-common-sensitive/src/main/resources/META-INF/spring/org.springframework.cloud.openfeign.FeignClient.imports new file mode 100644 index 000000000..0d7c25b46 --- /dev/null +++ b/pigx-common/pigx-common-sensitive/src/main/resources/META-INF/spring/org.springframework.cloud.openfeign.FeignClient.imports @@ -0,0 +1 @@ +com.pig4cloud.pigx.common.sensitive.util.RemoteSensitiveService diff --git a/pigx-upms/pigx-upms-api/src/main/java/com/pig4cloud/pigx/admin/api/entity/SysSensitiveWordEntity.java b/pigx-upms/pigx-upms-api/src/main/java/com/pig4cloud/pigx/admin/api/entity/SysSensitiveWordEntity.java new file mode 100644 index 000000000..d1834ffac --- /dev/null +++ b/pigx-upms/pigx-upms-api/src/main/java/com/pig4cloud/pigx/admin/api/entity/SysSensitiveWordEntity.java @@ -0,0 +1,91 @@ +package com.pig4cloud.pigx.admin.api.entity; + +import com.baomidou.mybatisplus.annotation.*; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import com.pig4cloud.pigx.common.core.util.TenantTable; +import java.time.LocalDateTime; + +/** + * 敏感词 + * + * @author pig + * @date 2024-07-06 15:54:43 + */ +@Data +@TenantTable +@TableName("sys_sensitive_word") +@EqualsAndHashCode(callSuper = true) +@Schema(description = "敏感词") +public class SysSensitiveWordEntity extends Model { + + + /** + * 主键 + */ + @TableId(type = IdType.ASSIGN_ID) + @Schema(description="主键") + private Long sensitiveId; + + /** + * 敏感词 + */ + @Schema(description="敏感词") + private String sensitiveWord; + + /** + * 类型 + */ + @Schema(description="类型") + private String sensitiveType; + + /** + * 备注 + */ + @Schema(description="备注") + private String remark; + + /** + * 创建人 + */ + @TableField(fill = FieldFill.INSERT) + @Schema(description="创建人") + private String createBy; + + /** + * 创建时间 + */ + @TableField(fill = FieldFill.INSERT) + @Schema(description="创建时间") + private LocalDateTime createTime; + + /** + * 修改人 + */ + @TableField(fill = FieldFill.INSERT_UPDATE) + @Schema(description="修改人") + private String updateBy; + + /** + * 修改时间 + */ + @TableField(fill = FieldFill.INSERT_UPDATE) + @Schema(description="修改时间") + private LocalDateTime updateTime; + + /** + * 删除标记 + */ + @TableLogic + @TableField(fill = FieldFill.INSERT) + @Schema(description="删除标记") + private String delFlag; + + /** + * 租户ID + */ + @Schema(description="租户ID") + private Long tenantId; +} diff --git a/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/controller/SysSensitiveWordController.java b/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/controller/SysSensitiveWordController.java new file mode 100644 index 000000000..679cc1294 --- /dev/null +++ b/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/controller/SysSensitiveWordController.java @@ -0,0 +1,172 @@ +package com.pig4cloud.pigx.admin.controller; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.ArrayUtil; +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.pig4cloud.pigx.admin.api.entity.SysSensitiveWordEntity; +import com.pig4cloud.pigx.admin.service.SysSensitiveWordService; +import com.pig4cloud.pigx.common.core.constant.CacheConstants; +import com.pig4cloud.pigx.common.core.util.R; +import com.pig4cloud.pigx.common.excel.annotation.ResponseExcel; +import com.pig4cloud.pigx.common.log.annotation.SysLog; +import com.pig4cloud.pigx.common.security.annotation.Inner; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import lombok.RequiredArgsConstructor; +import org.springdoc.core.annotations.ParameterObject; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.http.HttpHeaders; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.stream.Collectors; + +/** + * 敏感词 + * + * @author pig + * @date 2024-07-06 15:54:43 + */ +@RestController +@RequiredArgsConstructor +@RequestMapping("/sysSensitiveWord") +@Tag(description = "sysSensitiveWord", name = "敏感词管理") +@SecurityRequirement(name = HttpHeaders.AUTHORIZATION) +public class SysSensitiveWordController { + + private final SysSensitiveWordService sysSensitiveWordService; + + private final RedisTemplate redisTemplate; + + /** + * 分页查询 + * + * @param page 分页对象 + * @param sysSensitiveWord 敏感词 + * @return + */ + @Operation(summary = "分页查询", description = "分页查询") + @GetMapping("/page") + @PreAuthorize("@pms.hasPermission('admin_sysSensitiveWord_view')") + public R getSysSensitiveWordPage(@ParameterObject Page page, @ParameterObject SysSensitiveWordEntity sysSensitiveWord) { + LambdaQueryWrapper wrapper = Wrappers.lambdaQuery(); + wrapper.like(StrUtil.isNotBlank(sysSensitiveWord.getSensitiveWord()) + , SysSensitiveWordEntity::getSensitiveWord, sysSensitiveWord.getSensitiveWord()); + wrapper.eq(StrUtil.isNotBlank(sysSensitiveWord.getSensitiveType()) + , SysSensitiveWordEntity::getSensitiveType, sysSensitiveWord.getSensitiveType()); + return R.ok(sysSensitiveWordService.page(page, wrapper)); + } + + @Inner + @Operation(summary = "查询所有敏感词", description = "查询所有敏感词") + @GetMapping("/remote/list/{type}") + public R list(@PathVariable String type) { + return R.ok(sysSensitiveWordService.list(Wrappers.lambdaQuery() + .eq(SysSensitiveWordEntity::getSensitiveType, type)).stream().map(SysSensitiveWordEntity::getSensitiveWord).collect(Collectors.toList())); + } + + /** + * 通过id查询敏感词 + * + * @return R + */ + @Operation(summary = "通过id查询", description = "通过id查询") + @GetMapping("/details") + @PreAuthorize("@pms.hasPermission('admin_sysSensitiveWord_view')") + public R getById(@ParameterObject SysSensitiveWordEntity sysSensitiveWord) { + return R.ok(sysSensitiveWordService.getOne(Wrappers.lambdaQuery(sysSensitiveWord), false)); + } + + /** + * 新增敏感词 + * + * @param sysSensitiveWord 敏感词 + * @return R + */ + @Operation(summary = "新增敏感词", description = "新增敏感词") + @SysLog("新增敏感词") + @PostMapping + @PreAuthorize("@pms.hasPermission('admin_sysSensitiveWord_add')") + public R save(@RequestBody SysSensitiveWordEntity sysSensitiveWord) { + return R.ok(sysSensitiveWordService.saveSensitive(sysSensitiveWord)); + } + + /** + * 修改敏感词 + * + * @param sysSensitiveWord 敏感词 + * @return R + */ + @Operation(summary = "修改敏感词", description = "修改敏感词") + @SysLog("修改敏感词") + @PutMapping + @PreAuthorize("@pms.hasPermission('admin_sysSensitiveWord_edit')") + public R updateById(@RequestBody SysSensitiveWordEntity sysSensitiveWord) { + sysSensitiveWordService.updateById(sysSensitiveWord); + redisTemplate.convertAndSend(CacheConstants.SENSITIVE_REDIS_RELOAD_TOPIC, "刷新敏感词缓存"); + return R.ok(); + } + + /** + * 查询敏感词 + * + * @param sysSensitiveWord 敏感词 + * @return R + */ + @Operation(summary = "查询敏感词", description = "查询敏感词") + @SysLog("查询敏感词") + @PostMapping("/match") + @PreAuthorize("@pms.hasPermission('admin_sysSensitiveWord_del')") + public R match(@RequestBody SysSensitiveWordEntity sysSensitiveWord) { + return R.ok(sysSensitiveWordService.matchSensitiveWord(sysSensitiveWord)); + } + + /** + * 通过id删除敏感词 + * + * @param ids sensitiveId列表 + * @return R + */ + @Operation(summary = "通过id删除敏感词", description = "通过id删除敏感词") + @SysLog("通过id删除敏感词") + @DeleteMapping + @PreAuthorize("@pms.hasPermission('admin_sysSensitiveWord_del')") + public R removeById(@RequestBody Long[] ids) { + sysSensitiveWordService.removeBatchByIds(CollUtil.toList(ids)); + redisTemplate.convertAndSend(CacheConstants.SENSITIVE_REDIS_RELOAD_TOPIC, "刷新敏感词缓存"); + return R.ok(); + } + + + /** + * 导出excel 表格 + * + * @param sysSensitiveWord 查询条件 + * @param ids 导出指定ID + * @return excel 文件流 + */ + @ResponseExcel + @GetMapping("/export") + @PreAuthorize("@pms.hasPermission('admin_sysSensitiveWord_export')") + public List export(SysSensitiveWordEntity sysSensitiveWord, Long[] ids) { + return sysSensitiveWordService.list(Wrappers.lambdaQuery(sysSensitiveWord).in(ArrayUtil.isNotEmpty(ids), SysSensitiveWordEntity::getSensitiveId, ids)); + } + + /** + * 刷新敏感词缓存 + * + * @return R + */ + @Operation(summary = "刷新敏感词缓存", description = "刷新敏感词缓存") + @GetMapping("/refresh") + @PreAuthorize("@pms.hasPermission('admin_sysSensitiveWord_del')") + public R refresh() { + redisTemplate.convertAndSend(CacheConstants.SENSITIVE_REDIS_RELOAD_TOPIC, "刷新敏感词缓存"); + return R.ok(); + } +} diff --git a/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/mapper/SysSensitiveWordMapper.java b/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/mapper/SysSensitiveWordMapper.java new file mode 100644 index 000000000..d479b6e49 --- /dev/null +++ b/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/mapper/SysSensitiveWordMapper.java @@ -0,0 +1,11 @@ +package com.pig4cloud.pigx.admin.mapper; + +import com.pig4cloud.pigx.common.data.datascope.PigxBaseMapper; +import com.pig4cloud.pigx.admin.api.entity.SysSensitiveWordEntity; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface SysSensitiveWordMapper extends PigxBaseMapper { + + +} diff --git a/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/service/SysSensitiveWordService.java b/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/service/SysSensitiveWordService.java new file mode 100644 index 000000000..b2c64af93 --- /dev/null +++ b/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/service/SysSensitiveWordService.java @@ -0,0 +1,23 @@ +package com.pig4cloud.pigx.admin.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.pig4cloud.pigx.admin.api.entity.SysSensitiveWordEntity; + +import java.util.List; + +public interface SysSensitiveWordService extends IService { + + /** + * 查询敏感词 + * @param sysSensitiveWord 敏感词 + * @return 敏感词列表 + */ + List matchSensitiveWord(SysSensitiveWordEntity sysSensitiveWord); + + /** + * 保存敏感词 + * @param sysSensitiveWord + * @return + */ + Boolean saveSensitive(SysSensitiveWordEntity sysSensitiveWord); +} diff --git a/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/service/impl/SysSensitiveWordServiceImpl.java b/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/service/impl/SysSensitiveWordServiceImpl.java new file mode 100644 index 000000000..f8e5d6e05 --- /dev/null +++ b/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/service/impl/SysSensitiveWordServiceImpl.java @@ -0,0 +1,65 @@ +package com.pig4cloud.pigx.admin.service.impl; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.extra.spring.SpringUtil; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.github.houbb.sensitive.word.bs.SensitiveWordBs; +import com.pig4cloud.pigx.admin.api.entity.SysSensitiveWordEntity; +import com.pig4cloud.pigx.admin.mapper.SysSensitiveWordMapper; +import com.pig4cloud.pigx.admin.service.SysSensitiveWordService; +import com.pig4cloud.pigx.common.core.constant.CacheConstants; +import lombok.RequiredArgsConstructor; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 敏感词 + * + * @author pig + * @date 2024-07-06 15:54:43 + */ +@Service +@RequiredArgsConstructor +public class SysSensitiveWordServiceImpl extends ServiceImpl implements SysSensitiveWordService { + + private final RedisTemplate redisTemplate; + + /** + * 查询敏感词 + * + * @param sysSensitiveWord 敏感词 + * @return 敏感词列表 + */ + @Override + public List matchSensitiveWord(SysSensitiveWordEntity sysSensitiveWord) { + SensitiveWordBs sensitiveWordBs = SpringUtil.getBean(SensitiveWordBs.class); + return sensitiveWordBs.findAll(sysSensitiveWord.getSensitiveWord()); + } + + /** + * 保存敏感词 + * + * @param sysSensitiveWord 敏感词 + * @return success/false + */ + @Override + public Boolean saveSensitive(SysSensitiveWordEntity sysSensitiveWord) { + List wordEntityList = baseMapper.selectList(Wrappers.lambdaQuery(). + eq(SysSensitiveWordEntity::getSensitiveWord, sysSensitiveWord.getSensitiveWord())); + + if (CollUtil.isEmpty(wordEntityList)) { + save(sysSensitiveWord); + } else { + wordEntityList.forEach(wordEntity -> { + wordEntity.setSensitiveType(sysSensitiveWord.getSensitiveType()); + updateById(wordEntity); + }); + } + + redisTemplate.convertAndSend(CacheConstants.SENSITIVE_REDIS_RELOAD_TOPIC, "刷新敏感词缓存"); + return Boolean.TRUE; + } +} diff --git a/pigx-upms/pigx-upms-biz/src/main/resources/file/qa.xlsx b/pigx-upms/pigx-upms-biz/src/main/resources/file/qa.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..0d2627edf08fed9b953073530c0c6c917d88d723 GIT binary patch literal 10415 zcma)i1ymi&(lsu@4g`Wb1a}P(+#P}@xVs$O-GaMYaEIXT?oMzIZo&133yO_3>6|JMWS!z_fI5-2U(3STS;H%~28)S+^iqC-r>z<0U*4t9p z31a+bI3FEKyJJ70Hvk^M+xJ$g_6!pey*TWM>l%-j28W#h+zFeQ6m1*@ioA`7h@=@h zsiG{ecKWT#s)d3CGEpLpAwg5UvwW=FLPeCY%gNi3H8a(CdjoSv6M}mq;ASst&ZG;? zX~)9tyKIvNFzoGIBYpU1_H9`)B>@UxVuRFh#!GW_C#^X_VG`U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Kgdcz{(R(7Ku|!Wo~=oeyy*QuNaG+a literal 0 HcmV?d00001 diff --git a/pigx-upms/pigx-upms-biz/src/main/resources/mapper/SysSensitiveWordMapper.xml b/pigx-upms/pigx-upms-biz/src/main/resources/mapper/SysSensitiveWordMapper.xml new file mode 100644 index 000000000..d325f8383 --- /dev/null +++ b/pigx-upms/pigx-upms-biz/src/main/resources/mapper/SysSensitiveWordMapper.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + +