Merge branch 'big' into leng_dev

This commit is contained in:
qraddx committed 2022-03-15 09:39:20 +08:00
commit d07022c89a
2 files changed
+14 -12

No files matched your search

+13 -6
View File
@@ -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,
@@ -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