Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzuaa
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzuaa
提交
3615746f
提交
3615746f
编写于
2月 08, 2021
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
zhouweidong 发布系统代码 [ibiz-uaa,UAA鉴权]
上级
cc5aad1a
变更
3
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
34 行增加
和
14 行删除
+34
-14
h2_table.xml
ibzuaa-core/src/main/resources/liquibase/h2_table.xml
+10
-10
DEFieldDefaultValueAspect.java
...ava/cn/ibizlab/util/aspect/DEFieldDefaultValueAspect.java
+14
-4
AuthenticationUser.java
...ain/java/cn/ibizlab/util/security/AuthenticationUser.java
+10
-0
未找到文件。
ibzuaa-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
3615746f
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<!--输出实体[SYS_AUTHLOG]数据结构 -->
<!--输出实体[SYS_AUTHLOG]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-sys_authlog-6-1"
>
<changeSet
author=
"
root
"
id=
"tab-sys_authlog-6-1"
>
<createTable
tableName=
"IBZAUTHLOG"
>
<createTable
tableName=
"IBZAUTHLOG"
>
<column
name=
"LOGID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"LOGID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_AUTHLOG_LOGID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_AUTHLOG_LOGID"
/>
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
<!--输出实体[SYS_OPEN_ACCESS]数据结构 -->
<!--输出实体[SYS_OPEN_ACCESS]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-sys_open_access-37-2"
>
<changeSet
author=
"
root
"
id=
"tab-sys_open_access-37-2"
>
<createTable
tableName=
"IBZOPENACCESS"
>
<createTable
tableName=
"IBZOPENACCESS"
>
<column
name=
"ACCESSID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"ACCESSID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_OPEN_ACCESS_ACCESSID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_OPEN_ACCESS_ACCESSID"
/>
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
<!--输出实体[SYS_PSSYSTEM]数据结构 -->
<!--输出实体[SYS_PSSYSTEM]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-sys_pssystem-1-3"
>
<changeSet
author=
"
root
"
id=
"tab-sys_pssystem-1-3"
>
<createTable
tableName=
"IBZPSSYSTEM"
>
<createTable
tableName=
"IBZPSSYSTEM"
>
<column
name=
"PSSYSTEMID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"PSSYSTEMID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_PSSYSTEM_PSSYSTEMID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_PSSYSTEM_PSSYSTEMID"
/>
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
<!--输出实体[SYS_PERMISSION]数据结构 -->
<!--输出实体[SYS_PERMISSION]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-sys_permission-8-4"
>
<changeSet
author=
"
root
"
id=
"tab-sys_permission-8-4"
>
<createTable
tableName=
"IBZPERMISSION"
>
<createTable
tableName=
"IBZPERMISSION"
>
<column
name=
"SYS_PERMISSIONID"
remarks=
""
type=
"VARCHAR(200)"
>
<column
name=
"SYS_PERMISSIONID"
remarks=
""
type=
"VARCHAR(200)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_PERMISSION_SYS_PERMISSI"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_PERMISSION_SYS_PERMISSI"
/>
...
@@ -106,7 +106,7 @@
...
@@ -106,7 +106,7 @@
<!--输出实体[SYS_ROLE]数据结构 -->
<!--输出实体[SYS_ROLE]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-sys_role-50-5"
>
<changeSet
author=
"
root
"
id=
"tab-sys_role-50-5"
>
<createTable
tableName=
"IBZROLE"
>
<createTable
tableName=
"IBZROLE"
>
<column
name=
"SYS_ROLEID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"SYS_ROLEID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_ROLE_SYS_ROLEID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_ROLE_SYS_ROLEID"
/>
...
@@ -130,7 +130,7 @@
...
@@ -130,7 +130,7 @@
<!--输出实体[SYS_ROLE_PERMISSION]数据结构 -->
<!--输出实体[SYS_ROLE_PERMISSION]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-sys_role_permission-25-6"
>
<changeSet
author=
"
root
"
id=
"tab-sys_role_permission-25-6"
>
<createTable
tableName=
"IBZROLE_PERMISSION"
>
<createTable
tableName=
"IBZROLE_PERMISSION"
>
<column
name=
"SYS_ROLE_PERMISSIONID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"SYS_ROLE_PERMISSIONID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_ROLE_PERMISSION_SYS_ROL"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_ROLE_PERMISSION_SYS_ROL"
/>
...
@@ -150,7 +150,7 @@
...
@@ -150,7 +150,7 @@
<!--输出实体[SYS_USER_AUTH]数据结构 -->
<!--输出实体[SYS_USER_AUTH]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-sys_user_auth-24-7"
>
<changeSet
author=
"
root
"
id=
"tab-sys_user_auth-24-7"
>
<createTable
tableName=
"IBZUSERAUTH"
>
<createTable
tableName=
"IBZUSERAUTH"
>
<column
name=
"AUTHID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"AUTHID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_USER_AUTH_AUTHID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_USER_AUTH_AUTHID"
/>
...
@@ -168,7 +168,7 @@
...
@@ -168,7 +168,7 @@
<!--输出实体[SYS_USER_ROLE]数据结构 -->
<!--输出实体[SYS_USER_ROLE]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-sys_user_role-15-8"
>
<changeSet
author=
"
root
"
id=
"tab-sys_user_role-15-8"
>
<createTable
tableName=
"IBZUSER_ROLE"
>
<createTable
tableName=
"IBZUSER_ROLE"
>
<column
name=
"SYS_USER_ROLEID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"SYS_USER_ROLEID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_USER_ROLE_SYS_USER_ROLE"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_USER_ROLE_SYS_USER_ROLE"
/>
...
@@ -189,13 +189,13 @@
...
@@ -189,13 +189,13 @@
<!--输出实体[SYS_PSSYSTEM]外键关系 -->
<!--输出实体[SYS_PSSYSTEM]外键关系 -->
<!--输出实体[SYS_PERMISSION]外键关系 -->
<!--输出实体[SYS_PERMISSION]外键关系 -->
<!--输出实体[SYS_ROLE]外键关系 -->
<!--输出实体[SYS_ROLE]外键关系 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"fk-sys_role-50-9"
>
<changeSet
author=
"
root
"
id=
"fk-sys_role-50-9"
>
<addForeignKeyConstraint
baseColumnNames=
"PROLEID"
baseTableName=
"IBZROLE"
constraintName=
"DER1N_SYS_ROLE_SYS_ROLE_PROLEI"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SYS_ROLEID"
referencedTableName=
"IBZROLE"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"PROLEID"
baseTableName=
"IBZROLE"
constraintName=
"DER1N_SYS_ROLE_SYS_ROLE_PROLEI"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SYS_ROLEID"
referencedTableName=
"IBZROLE"
validate=
"true"
/>
</changeSet>
</changeSet>
<!--输出实体[SYS_ROLE_PERMISSION]外键关系 -->
<!--输出实体[SYS_ROLE_PERMISSION]外键关系 -->
<!--输出实体[SYS_USER_AUTH]外键关系 -->
<!--输出实体[SYS_USER_AUTH]外键关系 -->
<!--输出实体[SYS_USER_ROLE]外键关系 -->
<!--输出实体[SYS_USER_ROLE]外键关系 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"fk-sys_user_role-15-10"
>
<changeSet
author=
"
root
"
id=
"fk-sys_user_role-15-10"
>
<addForeignKeyConstraint
baseColumnNames=
"SYS_ROLEID"
baseTableName=
"IBZUSER_ROLE"
constraintName=
"DER1N_SYS_USER_ROLE_SYS_ROLE_S"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SYS_ROLEID"
referencedTableName=
"IBZROLE"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"SYS_ROLEID"
baseTableName=
"IBZUSER_ROLE"
constraintName=
"DER1N_SYS_USER_ROLE_SYS_ROLE_S"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SYS_ROLEID"
referencedTableName=
"IBZROLE"
validate=
"true"
/>
</changeSet>
</changeSet>
...
...
ibzuaa-util/src/main/java/cn/ibizlab/util/aspect/DEFieldDefaultValueAspect.java
浏览文件 @
3615746f
...
@@ -27,6 +27,16 @@ import java.util.Map;
...
@@ -27,6 +27,16 @@ import java.util.Map;
@Component
@Component
public
class
DEFieldDefaultValueAspect
public
class
DEFieldDefaultValueAspect
{
{
/**
* 操作用户标识
*/
final
static
String
TAG_PERSONID
=
"SRF_PERSONID"
;
/**
* 操作用户名称
*/
final
static
String
TAG_PERSONNAME
=
"SRF_PERSONNAME"
;
/**
/**
* 新建数据切入点
* 新建数据切入点
* @param point
* @param point
...
@@ -221,16 +231,16 @@ public class DEFieldDefaultValueAspect
...
@@ -221,16 +231,16 @@ public class DEFieldDefaultValueAspect
switch
(
preFieldType
)
{
switch
(
preFieldType
)
{
case
CREATEMAN:
case
CREATEMAN:
et
.
set
(
fieldname
,
curUser
.
getUserid
());
et
.
set
(
fieldname
,
StringUtils
.
isEmpty
(
curUser
.
getUserid
())
?
et
.
get
(
TAG_PERSONID
)
:
curUser
.
getUserid
());
break
;
break
;
case
CREATEMANNAME:
case
CREATEMANNAME:
et
.
set
(
fieldname
,
curUser
.
getPersonname
());
et
.
set
(
fieldname
,
StringUtils
.
isEmpty
(
curUser
.
getPersonname
())
?
et
.
get
(
TAG_PERSONNAME
)
:
curUser
.
getPersonname
());
break
;
break
;
case
UPDATEMAN:
case
UPDATEMAN:
et
.
set
(
fieldname
,
curUser
.
getUserid
());
et
.
set
(
fieldname
,
StringUtils
.
isEmpty
(
curUser
.
getUserid
())
?
et
.
get
(
TAG_PERSONID
)
:
curUser
.
getUserid
());
break
;
break
;
case
UPDATEMANNAME:
case
UPDATEMANNAME:
et
.
set
(
fieldname
,
curUser
.
getPersonname
());
et
.
set
(
fieldname
,
StringUtils
.
isEmpty
(
curUser
.
getPersonname
())
?
et
.
get
(
TAG_PERSONNAME
)
:
curUser
.
getPersonname
());
break
;
break
;
case
CREATEDATE:
case
CREATEDATE:
et
.
set
(
fieldname
,
new
Timestamp
(
new
Date
().
getTime
()));
et
.
set
(
fieldname
,
new
Timestamp
(
new
Date
().
getTime
()));
...
...
ibzuaa-util/src/main/java/cn/ibizlab/util/security/AuthenticationUser.java
浏览文件 @
3615746f
...
@@ -7,6 +7,7 @@ import lombok.Data;
...
@@ -7,6 +7,7 @@ import lombok.Data;
import
org.springframework.security.core.GrantedAuthority
;
import
org.springframework.security.core.GrantedAuthority
;
import
org.springframework.security.core.context.SecurityContextHolder
;
import
org.springframework.security.core.context.SecurityContextHolder
;
import
org.springframework.security.core.authority.SimpleGrantedAuthority
;
import
org.springframework.security.core.authority.SimpleGrantedAuthority
;
import
org.springframework.security.authentication.UsernamePasswordAuthenticationToken
;
import
org.springframework.security.core.userdetails.UserDetails
;
import
org.springframework.security.core.userdetails.UserDetails
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
java.sql.Timestamp
;
import
java.sql.Timestamp
;
...
@@ -231,6 +232,15 @@ public class AuthenticationUser implements UserDetails
...
@@ -231,6 +232,15 @@ public class AuthenticationUser implements UserDetails
return
authuserdetail
;
return
authuserdetail
;
}
}
public
static
AuthenticationUser
setAuthenticationUser
(
String
userId
,
String
userName
)
{
AuthenticationUser
user
=
new
AuthenticationUser
();
user
.
setUserid
(
userId
);
user
.
setPersonname
(
userName
);
UsernamePasswordAuthenticationToken
authentication
=
new
UsernamePasswordAuthenticationToken
(
user
,
null
,
user
.
getAuthorities
());
SecurityContextHolder
.
getContext
().
setAuthentication
(
authentication
);
return
user
;
}
public
Map
<
String
,
Object
>
getSessionParams
()
public
Map
<
String
,
Object
>
getSessionParams
()
{
{
if
(
this
.
sessionParams
==
null
)
if
(
this
.
sessionParams
==
null
)
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录