From f003209b26cafc295147db9fed6142f75c1ba977 Mon Sep 17 00:00:00 2001 From: qraddx Date: Thu, 10 Mar 2022 14:10:48 +0800 Subject: [PATCH 1/2] =?UTF-8?q?:card=5Ffile=5Fbox:=20=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E7=9B=B8=E5=85=B3=E7=9A=84=E5=8F=98?= =?UTF-8?q?=E5=8C=96.=20=E5=A2=9E=E9=87=8F=E8=84=9A=E6=9C=AC=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0mail=20=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/v4.2_v4.3_update.sql | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/db/v4.2_v4.3_update.sql b/db/v4.2_v4.3_update.sql index eb1e5ba47..0fac2ee84 100644 --- a/db/v4.2_v4.3_update.sql +++ b/db/v4.2_v4.3_update.sql @@ -132,12 +132,19 @@ ALTER TABLE `sys_tenant` ADD COLUMN `update_by` varchar(64) CHARACTER SET utf8 NOT NULL DEFAULT ' ' AFTER `create_by`, MODIFY COLUMN `id` bigint NOT NULL FIRST; -ALTER TABLE `sys_user` - ADD COLUMN `create_by` varchar(64) CHARACTER SET utf8 NOT NULL DEFAULT ' ' AFTER `dept_id`, - ADD COLUMN `update_by` varchar(64) CHARACTER SET utf8 NOT NULL DEFAULT ' ' AFTER `create_by`, - MODIFY COLUMN `user_id` bigint NOT NULL FIRST, - MODIFY COLUMN `dept_id` bigint DEFAULT NULL AFTER `email`, - MODIFY COLUMN `tenant_id` bigint NOT NULL DEFAULT '0' AFTER `osc_id`; +ALTER TABLE `sys_user` ADD COLUMN `nickname` VARCHAR (64) CHARACTER + SET utf8mb4 DEFAULT NULL COMMENT '拓展字段:昵称' AFTER `username`, + ADD COLUMN `name` VARCHAR (64) CHARACTER +SET utf8mb4 DEFAULT NULL COMMENT '拓展字段:姓名' AFTER `nickname`, + ADD COLUMN `email` VARCHAR (128) CHARACTER +SET utf8mb4 DEFAULT NULL COMMENT '拓展字段:邮箱' AFTER `name`, + ADD COLUMN `create_by` VARCHAR (64) CHARACTER +SET utf8 NOT NULL DEFAULT ' ' AFTER `dept_id`, + ADD COLUMN `update_by` VARCHAR (64) CHARACTER +SET utf8 NOT NULL DEFAULT ' ' AFTER `create_by`, + MODIFY COLUMN `user_id` BIGINT NOT NULL FIRST, + MODIFY COLUMN `dept_id` BIGINT DEFAULT NULL AFTER `email`, + MODIFY COLUMN `tenant_id` BIGINT NOT NULL DEFAULT '0' AFTER `osc_id`; ALTER TABLE `sys_user_role` MODIFY COLUMN `user_id` bigint NOT NULL FIRST, From 33f713d17d59874d9f78ebc284fa1e9fe35ed3e1 Mon Sep 17 00:00:00 2001 From: qraddx Date: Tue, 15 Mar 2022 09:39:10 +0800 Subject: [PATCH 2/2] =?UTF-8?q?:beers:=20close=20#3705=20=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E8=A2=AB=E9=94=81=E5=AE=9A=E6=97=B6=EF=BC=8C=E5=90=8E?= =?UTF-8?q?=E5=8F=B0=E6=8F=90=E7=A4=BA=E7=94=A8=E6=88=B7=E5=B8=90=E5=8F=B7?= =?UTF-8?q?=E5=B7=B2=E8=A2=AB=E9=94=81=E5=AE=9A=EF=BC=8C=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E7=94=A8=E6=88=B7=E5=90=8D=E4=B8=8D=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=E6=88=96=E8=80=85=E5=AF=86=E7=A0=81=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/PigxWebResponseExceptionTranslator.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pigx-common/pigx-common-security/src/main/java/com/pig4cloud/pigx/common/security/component/PigxWebResponseExceptionTranslator.java b/pigx-common/pigx-common-security/src/main/java/com/pig4cloud/pigx/common/security/component/PigxWebResponseExceptionTranslator.java index a2a8755be..1f8bb45a2 100644 --- a/pigx-common/pigx-common-security/src/main/java/com/pig4cloud/pigx/common/security/component/PigxWebResponseExceptionTranslator.java +++ b/pigx-common/pigx-common-security/src/main/java/com/pig4cloud/pigx/common/security/component/PigxWebResponseExceptionTranslator.java @@ -18,7 +18,6 @@ package com.pig4cloud.pigx.common.security.component; import com.pig4cloud.pigx.common.security.exception.*; -import com.pig4cloud.pigx.common.security.util.PigxSecurityMessageSourceUtil; import lombok.extern.slf4j.Slf4j; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; @@ -33,8 +32,6 @@ import org.springframework.security.oauth2.provider.error.WebResponseExceptionTr import org.springframework.security.web.util.ThrowableAnalyzer; import org.springframework.web.HttpRequestMethodNotSupportedException; -import java.util.Locale; - /** * @author lengleng * @date 2020-06-20 OAutH Server 异常处理,重写oauth 默认实现 @@ -65,9 +62,7 @@ public class PigxWebResponseExceptionTranslator implements WebResponseExceptionT ase = (InvalidGrantException) throwableAnalyzer.getFirstThrowableOfType(InvalidGrantException.class, causeChain); if (ase != null) { - String msg = PigxSecurityMessageSourceUtil.getAccessor().getMessage( - "AbstractUserDetailsAuthenticationProvider.badCredentials", ase.getMessage(), Locale.CHINA); - return handleOAuth2Exception(new InvalidException(msg, ase)); + return handleOAuth2Exception(new InvalidException(ase.getLocalizedMessage(), ase)); } ase = (HttpRequestMethodNotSupportedException) throwableAnalyzer