Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzuaa
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzuaa
提交
bef7d685
提交
bef7d685
编写于
3月 28, 2021
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
zhouweidong 发布系统代码 [ibiz-uaa,UAA鉴权]
上级
58ad57e6
变更
33
隐藏空白字符变更
内嵌
并排
正在显示
33 个修改的文件
包含
97 行增加
和
153 行删除
+97
-153
SysAuthLogServiceImpl.java
.../ibizlab/core/uaa/service/impl/SysAuthLogServiceImpl.java
+2
-3
SysOpenAccessServiceImpl.java
...izlab/core/uaa/service/impl/SysOpenAccessServiceImpl.java
+2
-3
SysPSSystemServiceImpl.java
...ibizlab/core/uaa/service/impl/SysPSSystemServiceImpl.java
+2
-3
SysPermissionServiceImpl.java
...izlab/core/uaa/service/impl/SysPermissionServiceImpl.java
+2
-3
SysRolePermissionServiceImpl.java
...b/core/uaa/service/impl/SysRolePermissionServiceImpl.java
+2
-3
SysRoleServiceImpl.java
.../cn/ibizlab/core/uaa/service/impl/SysRoleServiceImpl.java
+2
-3
SysUserAuthServiceImpl.java
...ibizlab/core/uaa/service/impl/SysUserAuthServiceImpl.java
+2
-3
SysUserRoleServiceImpl.java
...ibizlab/core/uaa/service/impl/SysUserRoleServiceImpl.java
+2
-3
SysUserServiceImpl.java
.../cn/ibizlab/core/uaa/service/impl/SysUserServiceImpl.java
+2
-3
h2_table.xml
ibzuaa-core/src/main/resources/liquibase/h2_table.xml
+10
-10
SysAuthLogMapper.xml
...main/resources/mapper/uaa/sysauthlog/SysAuthLogMapper.xml
+0
-1
SysOpenAccessMapper.xml
...esources/mapper/uaa/sysopenaccess/SysOpenAccessMapper.xml
+0
-1
SysPermissionMapper.xml
...esources/mapper/uaa/syspermission/SysPermissionMapper.xml
+0
-1
SysRoleMapper.xml
...e/src/main/resources/mapper/uaa/sysrole/SysRoleMapper.xml
+0
-1
SysRolePermissionMapper.xml
.../mapper/uaa/sysrolepermission/SysRolePermissionMapper.xml
+0
-1
SysUserMapper.xml
...e/src/main/resources/mapper/uaa/sysuser/SysUserMapper.xml
+0
-1
SysUserAuthMapper.xml
...in/resources/mapper/uaa/sysuserauth/SysUserAuthMapper.xml
+0
-1
SysUserRoleMapper.xml
...in/resources/mapper/uaa/sysuserrole/SysUserRoleMapper.xml
+0
-1
SysAppMapping.java
...i/src/main/java/cn/ibizlab/api/mapping/SysAppMapping.java
+0
-1
SysAuthLogMapping.java
...c/main/java/cn/ibizlab/api/mapping/SysAuthLogMapping.java
+0
-1
SysOpenAccessMapping.java
...ain/java/cn/ibizlab/api/mapping/SysOpenAccessMapping.java
+0
-1
SysPSSystemMapping.java
.../main/java/cn/ibizlab/api/mapping/SysPSSystemMapping.java
+0
-1
SysPermissionMapping.java
...ain/java/cn/ibizlab/api/mapping/SysPermissionMapping.java
+0
-1
SysRoleMapping.java
.../src/main/java/cn/ibizlab/api/mapping/SysRoleMapping.java
+0
-1
SysRolePermissionMapping.java
...java/cn/ibizlab/api/mapping/SysRolePermissionMapping.java
+0
-1
SysUserAuthMapping.java
.../main/java/cn/ibizlab/api/mapping/SysUserAuthMapping.java
+0
-1
SysUserMapping.java
.../src/main/java/cn/ibizlab/api/mapping/SysUserMapping.java
+0
-1
SysUserRoleMapping.java
.../main/java/cn/ibizlab/api/mapping/SysUserRoleMapping.java
+0
-1
DELogicAspect.java
...l/src/main/java/cn/ibizlab/util/aspect/DELogicAspect.java
+64
-97
IBZWFFeignClient.java
...rc/main/java/cn/ibizlab/util/client/IBZWFFeignClient.java
+1
-0
DELogic.java
...aa-util/src/main/java/cn/ibizlab/util/domain/DELogic.java
+2
-1
SearchContextBase.java
...c/main/java/cn/ibizlab/util/filter/SearchContextBase.java
+1
-0
AuthenticationUser.java
...ain/java/cn/ibizlab/util/security/AuthenticationUser.java
+1
-0
未找到文件。
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SysAuthLogServiceImpl.java
浏览文件 @
bef7d685
...
...
@@ -100,9 +100,8 @@ public class SysAuthLogServiceImpl extends ServiceImpl<SysAuthLogMapper, SysAuth
@Transactional
public
SysAuthLog
get
(
String
key
)
{
SysAuthLog
et
=
getById
(
key
);
if
(
et
==
null
){
et
=
new
SysAuthLog
();
et
.
setLogid
(
key
);
if
(
et
==
null
)
{
throw
new
BadRequestAlertException
(
"数据不存在"
,
this
.
getClass
().
getSimpleName
(),
key
);
}
else
{
}
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SysOpenAccessServiceImpl.java
浏览文件 @
bef7d685
...
...
@@ -100,9 +100,8 @@ public class SysOpenAccessServiceImpl extends ServiceImpl<SysOpenAccessMapper, S
@Transactional
public
SysOpenAccess
get
(
String
key
)
{
SysOpenAccess
et
=
getById
(
key
);
if
(
et
==
null
){
et
=
new
SysOpenAccess
();
et
.
setId
(
key
);
if
(
et
==
null
)
{
throw
new
BadRequestAlertException
(
"数据不存在"
,
this
.
getClass
().
getSimpleName
(),
key
);
}
else
{
}
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SysPSSystemServiceImpl.java
浏览文件 @
bef7d685
...
...
@@ -100,9 +100,8 @@ public class SysPSSystemServiceImpl extends ServiceImpl<SysPSSystemMapper, SysPS
@Transactional
public
SysPSSystem
get
(
String
key
)
{
SysPSSystem
et
=
getById
(
key
);
if
(
et
==
null
){
et
=
new
SysPSSystem
();
et
.
setPssystemid
(
key
);
if
(
et
==
null
)
{
throw
new
BadRequestAlertException
(
"数据不存在"
,
this
.
getClass
().
getSimpleName
(),
key
);
}
else
{
}
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SysPermissionServiceImpl.java
浏览文件 @
bef7d685
...
...
@@ -105,9 +105,8 @@ public class SysPermissionServiceImpl extends ServiceImpl<SysPermissionMapper, S
@Transactional
public
SysPermission
get
(
String
key
)
{
SysPermission
et
=
getById
(
key
);
if
(
et
==
null
){
et
=
new
SysPermission
();
et
.
setPermissionid
(
key
);
if
(
et
==
null
)
{
throw
new
BadRequestAlertException
(
"数据不存在"
,
this
.
getClass
().
getSimpleName
(),
key
);
}
else
{
}
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SysRolePermissionServiceImpl.java
浏览文件 @
bef7d685
...
...
@@ -110,9 +110,8 @@ public class SysRolePermissionServiceImpl extends ServiceImpl<SysRolePermissionM
@Transactional
public
SysRolePermission
get
(
String
key
)
{
SysRolePermission
et
=
getById
(
key
);
if
(
et
==
null
){
et
=
new
SysRolePermission
();
et
.
setRolepermissionid
(
key
);
if
(
et
==
null
)
{
throw
new
BadRequestAlertException
(
"数据不存在"
,
this
.
getClass
().
getSimpleName
(),
key
);
}
else
{
}
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SysRoleServiceImpl.java
浏览文件 @
bef7d685
...
...
@@ -116,9 +116,8 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
@Transactional
public
SysRole
get
(
String
key
)
{
SysRole
et
=
getById
(
key
);
if
(
et
==
null
){
et
=
new
SysRole
();
et
.
setRoleid
(
key
);
if
(
et
==
null
)
{
throw
new
BadRequestAlertException
(
"数据不存在"
,
this
.
getClass
().
getSimpleName
(),
key
);
}
else
{
}
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SysUserAuthServiceImpl.java
浏览文件 @
bef7d685
...
...
@@ -107,9 +107,8 @@ public class SysUserAuthServiceImpl extends ServiceImpl<SysUserAuthMapper, SysUs
@Transactional
public
SysUserAuth
get
(
String
key
)
{
SysUserAuth
et
=
getById
(
key
);
if
(
et
==
null
){
et
=
new
SysUserAuth
();
et
.
setId
(
key
);
if
(
et
==
null
)
{
throw
new
BadRequestAlertException
(
"数据不存在"
,
this
.
getClass
().
getSimpleName
(),
key
);
}
else
{
}
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SysUserRoleServiceImpl.java
浏览文件 @
bef7d685
...
...
@@ -110,9 +110,8 @@ public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUs
@Transactional
public
SysUserRole
get
(
String
key
)
{
SysUserRole
et
=
getById
(
key
);
if
(
et
==
null
){
et
=
new
SysUserRole
();
et
.
setUserroleid
(
key
);
if
(
et
==
null
)
{
throw
new
BadRequestAlertException
(
"数据不存在"
,
this
.
getClass
().
getSimpleName
(),
key
);
}
else
{
}
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SysUserServiceImpl.java
浏览文件 @
bef7d685
...
...
@@ -106,9 +106,8 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
@Transactional
public
SysUser
get
(
String
key
)
{
SysUser
et
=
getById
(
key
);
if
(
et
==
null
){
et
=
new
SysUser
();
et
.
setUserid
(
key
);
if
(
et
==
null
)
{
throw
new
BadRequestAlertException
(
"数据不存在"
,
this
.
getClass
().
getSimpleName
(),
key
);
}
else
{
}
...
...
ibzuaa-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
bef7d685
...
...
@@ -6,7 +6,7 @@
<!--输出实体[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"
>
<column
name=
"LOGID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_AUTHLOG_LOGID"
/>
...
...
@@ -32,7 +32,7 @@
<!--输出实体[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"
>
<column
name=
"ACCESSID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_OPEN_ACCESS_ACCESSID"
/>
...
...
@@ -64,7 +64,7 @@
<!--输出实体[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"
>
<column
name=
"PSSYSTEMID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_PSSYSTEM_PSSYSTEMID"
/>
...
...
@@ -84,7 +84,7 @@
<!--输出实体[SYS_PERMISSION]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-sys_permission-9-4"
>
<changeSet
author=
"
root
"
id=
"tab-sys_permission-9-4"
>
<createTable
tableName=
"IBZPERMISSION"
>
<column
name=
"SYS_PERMISSIONID"
remarks=
""
type=
"VARCHAR(200)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_PERMISSION_SYS_PERMISSI"
/>
...
...
@@ -106,7 +106,7 @@
<!--输出实体[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"
>
<column
name=
"SYS_ROLEID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_ROLE_SYS_ROLEID"
/>
...
...
@@ -130,7 +130,7 @@
<!--输出实体[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"
>
<column
name=
"SYS_ROLE_PERMISSIONID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_ROLE_PERMISSION_SYS_ROL"
/>
...
...
@@ -150,7 +150,7 @@
<!--输出实体[SYS_USER_AUTH]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-sys_user_auth-25-7"
>
<changeSet
author=
"
root
"
id=
"tab-sys_user_auth-25-7"
>
<createTable
tableName=
"IBZUSERAUTH"
>
<column
name=
"AUTHID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_USER_AUTH_AUTHID"
/>
...
...
@@ -168,7 +168,7 @@
<!--输出实体[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"
>
<column
name=
"SYS_USER_ROLEID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_USER_ROLE_SYS_USER_ROLE"
/>
...
...
@@ -189,13 +189,13 @@
<!--输出实体[SYS_PSSYSTEM]外键关系 -->
<!--输出实体[SYS_PERMISSION]外键关系 -->
<!--输出实体[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"
/>
</changeSet>
<!--输出实体[SYS_ROLE_PERMISSION]外键关系 -->
<!--输出实体[SYS_USER_AUTH]外键关系 -->
<!--输出实体[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"
/>
</changeSet>
...
...
ibzuaa-core/src/main/resources/mapper/uaa/sysauthlog/SysAuthLogMapper.xml
浏览文件 @
bef7d685
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.ibizlab.core.uaa.mapper.SysAuthLogMapper"
>
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
...
...
ibzuaa-core/src/main/resources/mapper/uaa/sysopenaccess/SysOpenAccessMapper.xml
浏览文件 @
bef7d685
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.ibizlab.core.uaa.mapper.SysOpenAccessMapper"
>
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
...
...
ibzuaa-core/src/main/resources/mapper/uaa/syspermission/SysPermissionMapper.xml
浏览文件 @
bef7d685
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.ibizlab.core.uaa.mapper.SysPermissionMapper"
>
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
...
...
ibzuaa-core/src/main/resources/mapper/uaa/sysrole/SysRoleMapper.xml
浏览文件 @
bef7d685
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.ibizlab.core.uaa.mapper.SysRoleMapper"
>
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
...
...
ibzuaa-core/src/main/resources/mapper/uaa/sysrolepermission/SysRolePermissionMapper.xml
浏览文件 @
bef7d685
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.ibizlab.core.uaa.mapper.SysRolePermissionMapper"
>
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
...
...
ibzuaa-core/src/main/resources/mapper/uaa/sysuser/SysUserMapper.xml
浏览文件 @
bef7d685
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.ibizlab.core.uaa.mapper.SysUserMapper"
>
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
...
...
ibzuaa-core/src/main/resources/mapper/uaa/sysuserauth/SysUserAuthMapper.xml
浏览文件 @
bef7d685
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.ibizlab.core.uaa.mapper.SysUserAuthMapper"
>
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
...
...
ibzuaa-core/src/main/resources/mapper/uaa/sysuserrole/SysUserRoleMapper.xml
浏览文件 @
bef7d685
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.ibizlab.core.uaa.mapper.SysUserRoleMapper"
>
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
...
...
ibzuaa-provider/ibzuaa-provider-api/src/main/java/cn/ibizlab/api/mapping/SysAppMapping.java
浏览文件 @
bef7d685
...
...
@@ -12,4 +12,3 @@ public interface SysAppMapping extends MappingBase<SysAppDTO, SysApp> {
}
ibzuaa-provider/ibzuaa-provider-api/src/main/java/cn/ibizlab/api/mapping/SysAuthLogMapping.java
浏览文件 @
bef7d685
...
...
@@ -12,4 +12,3 @@ public interface SysAuthLogMapping extends MappingBase<SysAuthLogDTO, SysAuthLog
}
ibzuaa-provider/ibzuaa-provider-api/src/main/java/cn/ibizlab/api/mapping/SysOpenAccessMapping.java
浏览文件 @
bef7d685
...
...
@@ -12,4 +12,3 @@ public interface SysOpenAccessMapping extends MappingBase<SysOpenAccessDTO, SysO
}
ibzuaa-provider/ibzuaa-provider-api/src/main/java/cn/ibizlab/api/mapping/SysPSSystemMapping.java
浏览文件 @
bef7d685
...
...
@@ -12,4 +12,3 @@ public interface SysPSSystemMapping extends MappingBase<SysPSSystemDTO, SysPSSys
}
ibzuaa-provider/ibzuaa-provider-api/src/main/java/cn/ibizlab/api/mapping/SysPermissionMapping.java
浏览文件 @
bef7d685
...
...
@@ -12,4 +12,3 @@ public interface SysPermissionMapping extends MappingBase<SysPermissionDTO, SysP
}
ibzuaa-provider/ibzuaa-provider-api/src/main/java/cn/ibizlab/api/mapping/SysRoleMapping.java
浏览文件 @
bef7d685
...
...
@@ -12,4 +12,3 @@ public interface SysRoleMapping extends MappingBase<SysRoleDTO, SysRole> {
}
ibzuaa-provider/ibzuaa-provider-api/src/main/java/cn/ibizlab/api/mapping/SysRolePermissionMapping.java
浏览文件 @
bef7d685
...
...
@@ -12,4 +12,3 @@ public interface SysRolePermissionMapping extends MappingBase<SysRolePermissionD
}
ibzuaa-provider/ibzuaa-provider-api/src/main/java/cn/ibizlab/api/mapping/SysUserAuthMapping.java
浏览文件 @
bef7d685
...
...
@@ -12,4 +12,3 @@ public interface SysUserAuthMapping extends MappingBase<SysUserAuthDTO, SysUserA
}
ibzuaa-provider/ibzuaa-provider-api/src/main/java/cn/ibizlab/api/mapping/SysUserMapping.java
浏览文件 @
bef7d685
...
...
@@ -12,4 +12,3 @@ public interface SysUserMapping extends MappingBase<SysUserDTO, SysUser> {
}
ibzuaa-provider/ibzuaa-provider-api/src/main/java/cn/ibizlab/api/mapping/SysUserRoleMapping.java
浏览文件 @
bef7d685
...
...
@@ -12,4 +12,3 @@ public interface SysUserRoleMapping extends MappingBase<SysUserRoleDTO, SysUserR
}
ibzuaa-util/src/main/java/cn/ibizlab/util/aspect/DELogicAspect.java
浏览文件 @
bef7d685
package
cn
.
ibizlab
.
util
.
aspect
;
import
lombok.SneakyThrows
;
import
lombok.extern.slf4j.Slf4j
;
import
cn.ibizlab.util.domain.DELogic
;
import
cn.ibizlab.util.domain.EntityBase
;
import
cn.ibizlab.util.errors.BadRequestAlertException
;
import
cn.ibizlab.util.helper.DEFieldCacheMap
;
import
org.apache.commons.io.FileUtils
;
import
org.apache.commons.io.IOUtils
;
import
org.aspectj.lang.ProceedingJoinPoint
;
import
org.aspectj.lang.annotation.Around
;
...
...
@@ -22,6 +20,8 @@ import org.kie.api.builder.Results;
import
org.kie.api.runtime.KieContainer
;
import
org.kie.api.runtime.KieSession
;
import
org.kie.internal.io.ResourceFactory
;
import
org.springframework.core.io.ClassPathResource
;
import
org.springframework.core.io.Resource
;
import
org.springframework.expression.EvaluationContext
;
import
org.springframework.expression.Expression
;
import
org.springframework.expression.ExpressionParser
;
...
...
@@ -35,7 +35,6 @@ import org.springframework.util.StringUtils;
import
javax.xml.stream.XMLInputFactory
;
import
javax.xml.stream.XMLStreamReader
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.lang.reflect.Method
;
...
...
@@ -109,7 +108,7 @@ public class DELogicAspect {
* @param action
*/
private
void
executeBeforeLogic
(
EntityBase
entity
,
String
action
)
{
Fil
e
bpmnFile
=
getLocalModel
(
entity
.
getClass
().
getSimpleName
(),
action
,
LogicExecMode
.
BEFORE
);
Resourc
e
bpmnFile
=
getLocalModel
(
entity
.
getClass
().
getSimpleName
(),
action
,
LogicExecMode
.
BEFORE
);
if
(
bpmnFile
!=
null
&&
bpmnFile
.
exists
()
&&
isValid
(
bpmnFile
,
entity
,
action
))
{
executeLogic
(
bpmnFile
,
entity
,
action
);
}
...
...
@@ -122,7 +121,7 @@ public class DELogicAspect {
* @param action
*/
private
void
executeAfterLogic
(
EntityBase
entity
,
String
action
)
{
Fil
e
bpmnFile
=
getLocalModel
(
entity
.
getClass
().
getSimpleName
(),
action
,
LogicExecMode
.
AFTER
);
Resourc
e
bpmnFile
=
getLocalModel
(
entity
.
getClass
().
getSimpleName
(),
action
,
LogicExecMode
.
AFTER
);
if
(
bpmnFile
!=
null
&&
bpmnFile
.
exists
()
&&
isValid
(
bpmnFile
,
entity
,
action
))
{
executeLogic
(
bpmnFile
,
entity
,
action
);
}
...
...
@@ -135,7 +134,7 @@ public class DELogicAspect {
* @param action
*/
private
void
executeLogic
(
EntityBase
entity
,
String
action
)
{
Fil
e
bpmnFile
=
getLocalModel
(
entity
.
getClass
().
getSimpleName
(),
action
,
LogicExecMode
.
EXEC
);
Resourc
e
bpmnFile
=
getLocalModel
(
entity
.
getClass
().
getSimpleName
(),
action
,
LogicExecMode
.
EXEC
);
if
(
bpmnFile
!=
null
&&
bpmnFile
.
exists
()
&&
isValid
(
bpmnFile
,
entity
,
action
))
{
executeLogic
(
bpmnFile
,
entity
,
action
);
}
...
...
@@ -147,32 +146,37 @@ public class DELogicAspect {
* @param bpmnFile
* @param entity
*/
private
void
executeLogic
(
File
bpmnFile
,
Object
entity
,
String
action
)
{
log
.
debug
(
"开始执行实体处理逻辑[{}:{}:{}:本地模式]"
,
entity
.
getClass
().
getSimpleName
(),
action
,
bpmnFile
.
getName
());
String
bpmnId
=
DigestUtils
.
md5DigestAsHex
(
bpmnFile
.
getPath
().
getBytes
());
DELogic
logic
=
getDELogic
(
bpmnFile
);
if
(
logic
==
null
)
{
return
;
}
if
(
deLogicMap
.
containsKey
(
bpmnId
)
&&
logic
.
getMd5
().
equals
(
deLogicMap
.
get
(
bpmnId
).
getMd5
()))
{
logic
=
deLogicMap
.
get
(
bpmnId
);
}
else
{
reloadLogic
(
logic
);
deLogicMap
.
put
(
bpmnId
,
logic
);
}
KieContainer
container
=
logic
.
getContainer
();
KieSession
kieSession
=
container
.
getKieBase
().
newKieSession
();
Process
mainProcess
=
logic
.
getProcess
();
//主流程参数
fillGlobalParam
(
kieSession
,
mainProcess
,
entity
);
//子流程参数
if
(!
ObjectUtils
.
isEmpty
(
logic
.
getRefLogic
()))
{
for
(
DELogic
subLogic
:
logic
.
getRefLogic
())
{
fillGlobalParam
(
kieSession
,
subLogic
.
getProcess
(),
entity
);
private
void
executeLogic
(
Resource
bpmnFile
,
Object
entity
,
String
action
)
{
try
{
log
.
debug
(
"开始执行实体处理逻辑[{}:{}:{}:本地模式]"
,
entity
.
getClass
().
getSimpleName
(),
action
,
bpmnFile
.
getFilename
());
String
bpmnId
=
DigestUtils
.
md5DigestAsHex
(
bpmnFile
.
getURL
().
getPath
().
getBytes
());
DELogic
logic
=
getDELogic
(
bpmnFile
);
if
(
logic
==
null
)
{
return
;
}
if
(
deLogicMap
.
containsKey
(
bpmnId
)
&&
logic
.
getMd5
().
equals
(
deLogicMap
.
get
(
bpmnId
).
getMd5
()))
{
logic
=
deLogicMap
.
get
(
bpmnId
);
}
else
{
reloadLogic
(
logic
);
deLogicMap
.
put
(
bpmnId
,
logic
);
}
KieContainer
container
=
logic
.
getContainer
();
KieSession
kieSession
=
container
.
getKieBase
().
newKieSession
();
Process
mainProcess
=
logic
.
getProcess
();
//主流程参数
fillGlobalParam
(
kieSession
,
mainProcess
,
entity
);
//子流程参数
if
(!
ObjectUtils
.
isEmpty
(
logic
.
getRefLogic
()))
{
for
(
DELogic
subLogic
:
logic
.
getRefLogic
())
{
fillGlobalParam
(
kieSession
,
subLogic
.
getProcess
(),
entity
);
}
}
kieSession
.
startProcess
(
mainProcess
.
getId
());
log
.
debug
(
"实体处理逻辑[{}:{}:{}:本地模式]执行结束"
,
entity
.
getClass
().
getSimpleName
(),
action
,
bpmnFile
.
getFilename
());
}
catch
(
IOException
e
)
{
log
.
error
(
"实体处理逻辑[{}:{}:{}:本地模式]发生异常"
,
entity
.
getClass
().
getSimpleName
(),
action
,
bpmnFile
.
getFilename
());
throw
new
BadRequestAlertException
(
"执行实体处理逻辑发生异常"
+
e
.
getMessage
(),
"DELogicAspect"
,
"executeLogic"
);
}
kieSession
.
startProcess
(
mainProcess
.
getId
());
log
.
debug
(
"实体处理逻辑[{}:{}:{}:本地模式]执行结束"
,
entity
.
getClass
().
getSimpleName
(),
action
,
bpmnFile
.
getName
());
}
/**
...
...
@@ -180,11 +184,11 @@ public class DELogicAspect {
*
* @param logic
*/
private
void
reloadLogic
(
DELogic
logic
)
{
private
void
reloadLogic
(
DELogic
logic
)
throws
IOException
{
KieServices
kieServices
=
KieServices
.
get
();
KieFileSystem
kieFileSystem
=
kieServices
.
newKieFileSystem
();
for
(
Fil
e
bpmn
:
logic
.
getRefRuleFiles
())
{
kieFileSystem
.
write
(
ResourceFactory
.
new
FileResource
(
bpmn
));
for
(
Resourc
e
bpmn
:
logic
.
getRefRuleFiles
())
{
kieFileSystem
.
write
(
ResourceFactory
.
new
UrlResource
(
bpmn
.
getURL
()
));
}
KieBuilder
kieBuilder
=
kieServices
.
newKieBuilder
(
kieFileSystem
).
buildAll
();
Results
results
=
kieBuilder
.
getResults
();
...
...
@@ -239,28 +243,29 @@ public class DELogicAspect {
* @param bpmnFile
* @return
*/
@SneakyThrows
private
DELogic
getDELogic
(
File
bpmnFile
)
{
private
DELogic
getDELogic
(
Resource
bpmnFile
)
{
DELogic
logic
=
null
;
XMLStreamReader
reader
=
null
;
InputStream
bpmn
=
null
;
try
{
if
(
bpmnFile
.
exists
())
{
XMLInputFactory
factory
=
XMLInputFactory
.
newInstance
();
bpmn
=
new
FileInputStream
(
bpmnFile
);
bpmn
=
bpmnFile
.
getInputStream
(
);
reader
=
factory
.
createXMLStreamReader
(
bpmn
);
BpmnModel
model
=
bpmnXMLConverter
.
convertToBpmnModel
(
reader
);
Process
mainProcess
=
model
.
getMainProcess
();
if
(
mainProcess
==
null
)
{
return
null
;
}
log
.
debug
(
"正在加载 BPMN:{}"
,
bpmnFile
.
getURL
().
getPath
());
List
<
DELogic
>
refLogics
=
new
ArrayList
<>();
List
<
Fil
e
>
refFiles
=
new
ArrayList
<>();
List
<
Resourc
e
>
refFiles
=
new
ArrayList
<>();
//自己 bpmn 及 drl
refFiles
.
add
(
bpmnFile
);
Fil
e
drlFile
=
getDrl
(
bpmnFile
);
Resourc
e
drlFile
=
getDrl
(
bpmnFile
);
if
(
drlFile
!=
null
&&
drlFile
.
exists
())
{
refFiles
.
add
(
drlFile
);
log
.
debug
(
"正在加载 DRL:{}"
,
drlFile
.
getURL
().
getPath
());
}
//子 bpmn 及 drl
if
(!
ObjectUtils
.
isEmpty
(
model
.
getMainProcess
())
&&
!
ObjectUtils
.
isEmpty
(
model
.
getMainProcess
().
getFlowElementMap
()))
{
...
...
@@ -268,11 +273,7 @@ public class DELogicAspect {
if
(
item
instanceof
CallActivity
)
{
CallActivity
subBpmn
=
(
CallActivity
)
item
;
String
bpmnFileName
=
subBpmn
.
getName
();
log
.
debug
(
"正在加载 BPMN:{}"
,
bpmnFileName
);
File
subBpmnFile
=
getSubBpmn
(
bpmnFileName
);
if
(
ObjectUtils
.
isEmpty
(
subBpmnFile
))
{
log
.
debug
(
"BPMN:{},缺少文件:{} "
,
bpmnFileName
,
subBpmnFile
);
}
Resource
subBpmnFile
=
getSubBpmn
(
bpmnFileName
);
DELogic
refLogic
=
getDELogic
(
subBpmnFile
);
if
(
refLogic
!=
null
)
{
refLogics
.
add
(
refLogic
);
...
...
@@ -292,7 +293,7 @@ public class DELogicAspect {
logic
.
setMd5
(
getMd5
(
refFiles
));
}
}
catch
(
Exception
e
)
{
log
.
error
(
"执行处理逻辑失败"
+
e
);
log
.
error
(
"执行处理逻辑失败"
+
e
);
}
finally
{
try
{
if
(
reader
!=
null
)
{
...
...
@@ -302,7 +303,7 @@ public class DELogicAspect {
bpmn
.
close
();
}
}
catch
(
Exception
e
)
{
log
.
error
(
"执行处理逻辑失败"
+
e
);
log
.
error
(
"执行处理逻辑失败"
+
e
);
}
}
return
logic
;
...
...
@@ -327,10 +328,10 @@ public class DELogicAspect {
}
}
}
if
(!
ObjectUtils
.
isEmpty
(
service
.
getSuperclass
())
&&
!
service
.
getSuperclass
().
getName
().
equals
(
Object
.
class
.
getName
()))
{
if
(!
ObjectUtils
.
isEmpty
(
service
.
getSuperclass
())
&&
!
service
.
getSuperclass
().
getName
().
equals
(
Object
.
class
.
getName
()))
{
return
getEntity
(
service
.
getSuperclass
());
}
log
.
error
(
"获取实体信息失败,未能在[{}]中找到参数为实体类对象的行为,如create.update等"
,
service
.
getSimpleName
());
log
.
error
(
"获取实体信息失败,未能在[{}]中找到参数为实体类对象的行为,如create.update等"
,
service
.
getSimpleName
());
return
null
;
}
...
...
@@ -340,19 +341,19 @@ public class DELogicAspect {
* @param subFiles
* @return
*/
private
String
getMd5
(
List
<
Fil
e
>
subFiles
)
{
private
String
getMd5
(
List
<
Resourc
e
>
subFiles
)
{
try
{
StringBuffer
buffer
=
new
StringBuffer
();
for
(
Fil
e
file
:
subFiles
)
{
for
(
Resourc
e
file
:
subFiles
)
{
InputStream
bpmnFile
=
null
;
try
{
bpmnFile
=
new
FileInputStream
(
file
);
bpmnFile
=
file
.
getInputStream
(
);
if
(!
ObjectUtils
.
isEmpty
(
bpmnFile
))
{
String
strBpmn
=
IOUtils
.
toString
(
bpmnFile
,
"UTF-8"
);
buffer
.
append
(
strBpmn
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"处理逻辑版本检查失败"
+
e
);
log
.
error
(
"处理逻辑版本检查失败"
+
e
);
}
finally
{
if
(
bpmnFile
!=
null
)
{
bpmnFile
.
close
();
...
...
@@ -365,12 +366,12 @@ public class DELogicAspect {
return
null
;
}
}
catch
(
Exception
e
)
{
log
.
error
(
"处理逻辑版本检查失败"
+
e
);
log
.
error
(
"处理逻辑版本检查失败"
+
e
);
return
null
;
}
}
/**
/**
* 本地逻辑
*
* @param entity
...
...
@@ -378,10 +379,8 @@ public class DELogicAspect {
* @param logicExecMode
* @return
*/
private
File
getLocalModel
(
String
entity
,
String
action
,
LogicExecMode
logicExecMode
)
{
String
logicName
=
String
.
format
(
"%s.bpmn"
,
logicExecMode
.
text
);
String
filePath
=
File
.
separator
+
"rules"
+
File
.
separator
+
entity
+
File
.
separator
+
action
.
toLowerCase
()
+
File
.
separator
+
logicName
;
return
getBpmnFile
(
filePath
);
private
Resource
getLocalModel
(
String
entity
,
String
action
,
LogicExecMode
logicExecMode
)
{
return
new
ClassPathResource
(
"rules"
+
File
.
separator
+
entity
+
File
.
separator
+
action
.
toLowerCase
()
+
File
.
separator
+
logicExecMode
.
text
+
".bpmn"
);
}
/**
...
...
@@ -390,9 +389,8 @@ public class DELogicAspect {
* @param logicName
* @return
*/
private
File
getSubBpmn
(
String
logicName
)
{
String
filePath
=
String
.
format
(
"/rules/%s"
,
logicName
);
return
getBpmnFile
(
filePath
);
private
Resource
getSubBpmn
(
String
logicName
)
{
return
new
ClassPathResource
(
String
.
format
(
"rules/%s"
,
logicName
));
}
/**
...
...
@@ -401,41 +399,10 @@ public class DELogicAspect {
* @param bpmn
* @return
*/
private
File
getDrl
(
File
bpmn
)
{
if
(
bpmn
.
getPath
().
endsWith
(
"RuleFlow.bpmn"
))
{
return
getBpmnFile
(
bpmn
.
getPath
().
replace
(
"RuleFlow.bpmn"
,
"Rule.drl"
));
}
else
{
return
getBpmnFile
(
bpmn
.
getPath
().
replace
(
".bpmn"
,
".drl"
));
}
}
/**
* 获取 bpmn
*
* @param filePath
* @return
*/
private
File
getBpmnFile
(
String
filePath
)
{
InputStream
in
=
null
;
File
bpmn
=
null
;
try
{
in
=
this
.
getClass
().
getResourceAsStream
(
filePath
.
replace
(
"\\"
,
"/"
));
if
(
in
!=
null
)
{
bpmn
=
new
File
(
filePath
);
FileUtils
.
copyToFile
(
in
,
bpmn
);
}
}
catch
(
IOException
e
)
{
log
.
error
(
"执行处理逻辑失败,无法获取逻辑文件"
+
e
);
}
finally
{
if
(
in
!=
null
)
{
try
{
in
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
}
return
bpmn
;
private
Resource
getDrl
(
Resource
bpmn
)
{
String
filePath
=
((
ClassPathResource
)
bpmn
).
getPath
();
filePath
=
filePath
.
endsWith
(
"RuleFlow.bpmn"
)
?
filePath
.
replace
(
"RuleFlow.bpmn"
,
"Rule.drl"
)
:
filePath
.
replace
(
".bpmn"
,
".drl"
);
return
new
ClassPathResource
(
filePath
);
}
/**
...
...
@@ -446,8 +413,8 @@ public class DELogicAspect {
* @param action
* @return
*/
private
boolean
isValid
(
Fil
e
bpmn
,
Object
entity
,
Object
action
)
{
String
logicId
=
String
.
format
(
"%s%s%s"
,
entity
.
getClass
().
getSimpleName
(),
action
,
bpmn
.
get
N
ame
()).
toLowerCase
();
private
boolean
isValid
(
Resourc
e
bpmn
,
Object
entity
,
Object
action
)
{
String
logicId
=
String
.
format
(
"%s%s%s"
,
entity
.
getClass
().
getSimpleName
(),
action
,
bpmn
.
get
Filen
ame
()).
toLowerCase
();
if
(
validLogic
.
containsKey
(
logicId
))
{
return
true
;
}
else
{
...
...
ibzuaa-util/src/main/java/cn/ibizlab/util/client/IBZWFFeignClient.java
浏览文件 @
bef7d685
...
...
@@ -24,4 +24,5 @@ public interface IBZWFFeignClient
JSONObject
wfstart
(
@PathVariable
(
"system"
)
String
system
,
@PathVariable
(
"appname"
)
String
appname
,
@PathVariable
(
"entity"
)
String
entity
,
@PathVariable
(
"businessKey"
)
String
businessKey
,
@RequestBody
JSONObject
instance
);
}
ibzuaa-util/src/main/java/cn/ibizlab/util/domain/DELogic.java
浏览文件 @
bef7d685
...
...
@@ -2,6 +2,7 @@ package cn.ibizlab.util.domain;
import
lombok.Data
;
import
org.flowable.bpmn.model.Process
;
import
org.springframework.core.io.Resource
;
import
org.kie.api.runtime.KieContainer
;
import
java.io.File
;
import
java.io.Serializable
;
...
...
@@ -14,6 +15,6 @@ public class DELogic implements Serializable {
Process
process
;
KieContainer
container
;
List
<
DELogic
>
refLogic
;
List
<
Fil
e
>
refRuleFiles
;
List
<
Resourc
e
>
refRuleFiles
;
String
md5
;
}
ibzuaa-util/src/main/java/cn/ibizlab/util/filter/SearchContextBase.java
浏览文件 @
bef7d685
...
...
@@ -67,6 +67,7 @@ public class SearchContextBase implements ISearchContext{
* 工作流流程标识
*/
public
String
processDefinitionKey
;
/**
* 获取工作流步骤标识
*/
...
...
ibzuaa-util/src/main/java/cn/ibizlab/util/security/AuthenticationUser.java
浏览文件 @
bef7d685
...
...
@@ -254,6 +254,7 @@ public class AuthenticationUser implements UserDetails
if
(
this
.
sessionParams
==
null
)
{
sessionParams
=
getUserSessionParam
();
sessionParams
.
put
(
"srfdynainstid"
,
this
.
getSrfdynainstid
());
sessionParams
.
put
(
"srfpersonid"
,
this
.
getUserid
());
sessionParams
.
put
(
"srfpersonname"
,
this
.
getPersonname
());
sessionParams
.
put
(
"srforgsectorid"
,
this
.
getMdeptid
());
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录