diff --git a/docs/sql/mysql5/oauth2_server.sql b/docs/sql/mysql5/oauth2_server.sql index 7889e0ae6..68f2e268f 100644 --- a/docs/sql/mysql5/oauth2_server.sql +++ b/docs/sql/mysql5/oauth2_server.sql @@ -10,9 +10,12 @@ use oauth2_server; SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; + + -- ---------------------------- -- 2.1 oauth2_authorization 令牌发放记录表 -- ---------------------------- +DROP TABLE IF EXISTS oauth2_authorization; CREATE TABLE oauth2_authorization ( id varchar(100) NOT NULL, registered_client_id varchar(100) NOT NULL, @@ -22,30 +25,30 @@ CREATE TABLE oauth2_authorization ( attributes blob DEFAULT NULL, state varchar(500) DEFAULT NULL, authorization_code_value blob DEFAULT NULL, - authorization_code_issued_at timestamp DEFAULT NULL, - authorization_code_expires_at timestamp DEFAULT NULL, + authorization_code_issued_at datetime DEFAULT NULL, + authorization_code_expires_at datetime DEFAULT NULL, authorization_code_metadata blob DEFAULT NULL, access_token_value blob DEFAULT NULL, - access_token_issued_at timestamp DEFAULT NULL, - access_token_expires_at timestamp DEFAULT NULL, + access_token_issued_at datetime DEFAULT NULL, + access_token_expires_at datetime DEFAULT NULL, access_token_metadata blob DEFAULT NULL, access_token_type varchar(100) DEFAULT NULL, access_token_scopes varchar(1000) DEFAULT NULL, oidc_id_token_value blob DEFAULT NULL, - oidc_id_token_issued_at timestamp DEFAULT NULL, - oidc_id_token_expires_at timestamp DEFAULT NULL, + oidc_id_token_issued_at datetime DEFAULT NULL, + oidc_id_token_expires_at datetime DEFAULT NULL, oidc_id_token_metadata blob DEFAULT NULL, refresh_token_value blob DEFAULT NULL, - refresh_token_issued_at timestamp DEFAULT NULL, - refresh_token_expires_at timestamp DEFAULT NULL, + refresh_token_issued_at datetime DEFAULT NULL, + refresh_token_expires_at datetime DEFAULT NULL, refresh_token_metadata blob DEFAULT NULL, user_code_value blob DEFAULT NULL, - user_code_issued_at timestamp DEFAULT NULL, - user_code_expires_at timestamp DEFAULT NULL, + user_code_issued_at datetime DEFAULT NULL, + user_code_expires_at datetime DEFAULT NULL, user_code_metadata blob DEFAULT NULL, device_code_value blob DEFAULT NULL, - device_code_issued_at timestamp DEFAULT NULL, - device_code_expires_at timestamp DEFAULT NULL, + device_code_issued_at datetime DEFAULT NULL, + device_code_expires_at datetime DEFAULT NULL, device_code_metadata blob DEFAULT NULL, PRIMARY KEY (id) ); @@ -53,6 +56,7 @@ CREATE TABLE oauth2_authorization ( -- ---------------------------- -- 2.2 oauth2_authorization_consent 授权记录表 -- ---------------------------- +DROP TABLE IF EXISTS oauth2_authorization_consent; CREATE TABLE oauth2_authorization_consent ( registered_client_id varchar(100) NOT NULL, principal_name varchar(200) NOT NULL, @@ -63,12 +67,13 @@ CREATE TABLE oauth2_authorization_consent ( -- ---------------------------- -- 2.3 oauth2-registered-client OAuth2 客户端信息表 -- ---------------------------- +DROP TABLE IF EXISTS oauth2_registered_client; CREATE TABLE oauth2_registered_client ( id varchar(100) NOT NULL, client_id varchar(100) NOT NULL, - client_id_issued_at timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, + client_id_issued_at datetime DEFAULT CURRENT_TIMESTAMP NOT NULL, client_secret varchar(200) DEFAULT NULL, - client_secret_expires_at timestamp DEFAULT NULL, + client_secret_expires_at datetime DEFAULT NULL, client_name varchar(200) NOT NULL, client_authentication_methods varchar(1000) NOT NULL, authorization_grant_types varchar(1000) NOT NULL, diff --git a/youlai-system/system-boot/src/main/java/com/youlai/system/controller/SysDictController.java b/youlai-system/system-boot/src/main/java/com/youlai/system/controller/SysDictController.java index 6f51be2f7..8a6c18351 100644 --- a/youlai-system/system-boot/src/main/java/com/youlai/system/controller/SysDictController.java +++ b/youlai-system/system-boot/src/main/java/com/youlai/system/controller/SysDictController.java @@ -140,4 +140,14 @@ public class SysDictController { return Result.judge(result); } + @Operation(summary = "获取字典类型的数据项") + @GetMapping("/types/{typeCode}/items") + public Result> listDictTypeItems( + @Parameter(description ="字典类型编码") @PathVariable String typeCode + ) { + List