CREATE OR REPLACE VIEW ACT_ID_GROUP AS
SELECT r.role_name AS ID_,NULL AS REV_,r.full_name AS NAME_,NULL AS TYPE_ FROM sys_role r;
comment on table ACT_ID_GROUP is '用户组信息表';
comment on column ACT_ID_GROUP.REV_ is '乐观锁';
comment on column ACT_ID_GROUP.NAME_ is '节点名称';
comment on column ACT_ID_GROUP.TYPE_ is '节点类型';
CREATE OR REPLACE VIEW ACT_ID_MEMBERSHIP AS
SELECT u.user_name AS USER_ID_,r.role_name AS GROUP_ID_ FROM sys_user u join sys_user_role ur ON ur.user_id = u.id JOIN sys_role r ON r.id = ur.role_id;
comment on table ACT_ID_MEMBERSHIP is '用户与分组对应信息表';
comment on column ACT_ID_MEMBERSHIP.USER_ID_ is '用户ID';
comment on column ACT_ID_MEMBERSHIP.GROUP_ID_ is '用户组ID';
CREATE OR REPLACE VIEW ACT_ID_USER AS
SELECT
au.user_name AS ID_,
NULL AS REV_,
concat('first_',au.full_name) AS FIRST_,
concat('last_',au.full_name) AS LAST_,
au.email AS EMAIL_,
au.user_pwd AS PWD_,
NULL AS PICTURE_ID_
FROM sys_user au;
comment on table ACT_ID_USER is '用户信息表';
comment on column ACT_ID_USER.REV_ is '乐观锁';
comment on column ACT_ID_USER.FIRST_ is '姓';
comment on column ACT_ID_USER.LAST_ is '名';
comment on column ACT_ID_USER.EMAIL_ is 'EMAIL_';
comment on column ACT_ID_USER.PWD_ is '密码';
comment on column ACT_ID_USER.PICTURE_ID_ is '图片ID';
系统用户表的sql,可以对照一下你们系统的表