Replies: 2 comments
-
|
Beta Was this translation helpful? Give feedback.
0 replies
-
@gosszhang 支持对于oauth_config 通过表的形式来 管理配置; 有几个小问题,可以一起讨论下:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
#63
实现方案:
表结构如下:
CREATE TABLE
oauth_config
(id
bigint NOT NULL AUTO_INCREMENT,platform
tinyint NOT NULL DEFAULT '0' COMMENT '平台:1钉钉,2飞书',enable
tinyint NOT NULL DEFAULT '0' COMMENT '是否启用',app_key
varchar(255) NOT NULL DEFAULT '' COMMENT 'AppKey',app_secret
varchar(255) NOT NULL DEFAULT '' COMMENT 'AppSecret',auto_bind
tinyint NOT NULL DEFAULT '0' COMMENT '自动绑定系统账号,手机号与登录账号匹配',auto_create_user
tinyint NOT NULL DEFAULT '0' COMMENT '自动创建账号',auto_activate
tinyint NOT NULL DEFAULT '0' COMMENT '账号是否为激活状态,0需要手动激活,1自动激活',create_at
datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,update_at
datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,delete_at
datetime DEFAULT NULL,PRIMARY KEY (
id
),KEY
oauth_config_delete_at
(delete_at
)) ENGINE=InnoDB ;
CREATE TABLE
oauth_user
(id
bigint NOT NULL AUTO_INCREMENT,oauth_config_id
bigint NOT NULL DEFAULT 0 COMMENT '授权登录id',sys_user_id
bigint NOT NULL DEFAULT 0 COMMENT '系统用户id',name
varchar(255) NOT NULL DEFAULT '' COMMENT '姓名',mobile
varchar(255) NOT NULL DEFAULT '' COMMENT '手机号',union_id
varchar(255) NOT NULL DEFAULT '' COMMENT 'unionid',active
tinyint NOT NULL DEFAULT '0' COMMENT '是否激活',create_at
datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,update_at
datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,delete_at
datetime DEFAULT NULL,PRIMARY KEY (
id
),UNIQUE KEY
oauth_config_union_id
(oauth_config_id
,union_id
),KEY
idx_sys_user_id
(sys_user_id
),KEY
oauth_user_delete_at
(delete_at
)) ENGINE=InnoDB ;
Beta Was this translation helpful? Give feedback.
All reactions