Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzwf
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzwf
提交
38f046f6
提交
38f046f6
编写于
11月 13, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibiz4j 发布系统代码 [ibz-wf,统一工作流]
上级
e75c1a07
变更
76
展开全部
显示空白字符变更
内嵌
并排
正在显示
76 个修改的文件
包含
1079 行增加
和
911 行删除
+1079
-911
package.json
app_web/package.json
+9
-1
config.xml
config.xml
+0
-5
WFGroup.java
...rc/main/java/cn/ibizlab/core/workflow/domain/WFGroup.java
+10
-10
WFHistory.java
.../main/java/cn/ibizlab/core/workflow/domain/WFHistory.java
+4
-4
WFMember.java
...c/main/java/cn/ibizlab/core/workflow/domain/WFMember.java
+15
-15
WFProcessDefinition.java
.../cn/ibizlab/core/workflow/domain/WFProcessDefinition.java
+31
-31
WFProcessInstance.java
...va/cn/ibizlab/core/workflow/domain/WFProcessInstance.java
+7
-7
WFProcessNode.java
...n/java/cn/ibizlab/core/workflow/domain/WFProcessNode.java
+1
-1
WFREModel.java
.../main/java/cn/ibizlab/core/workflow/domain/WFREModel.java
+1
-1
WFSystem.java
...c/main/java/cn/ibizlab/core/workflow/domain/WFSystem.java
+7
-7
WFTask.java
...src/main/java/cn/ibizlab/core/workflow/domain/WFTask.java
+4
-4
WFTaskWay.java
.../main/java/cn/ibizlab/core/workflow/domain/WFTaskWay.java
+1
-1
WFUser.java
...src/main/java/cn/ibizlab/core/workflow/domain/WFUser.java
+25
-25
WFGroupSearchContext.java
...cn/ibizlab/core/workflow/filter/WFGroupSearchContext.java
+1
-0
WFMemberSearchContext.java
...n/ibizlab/core/workflow/filter/WFMemberSearchContext.java
+1
-0
WFProcessDefinitionSearchContext.java
...ore/workflow/filter/WFProcessDefinitionSearchContext.java
+1
-0
WFSystemSearchContext.java
...n/ibizlab/core/workflow/filter/WFSystemSearchContext.java
+1
-0
WFUserSearchContext.java
.../cn/ibizlab/core/workflow/filter/WFUserSearchContext.java
+1
-0
WFGroupMapper.java
...n/java/cn/ibizlab/core/workflow/mapper/WFGroupMapper.java
+9
-9
WFMemberMapper.java
.../java/cn/ibizlab/core/workflow/mapper/WFMemberMapper.java
+11
-11
WFProcessDefinitionMapper.java
...izlab/core/workflow/mapper/WFProcessDefinitionMapper.java
+14
-14
WFSystemMapper.java
.../java/cn/ibizlab/core/workflow/mapper/WFSystemMapper.java
+9
-9
WFUserMapper.java
...in/java/cn/ibizlab/core/workflow/mapper/WFUserMapper.java
+9
-9
IWFGroupService.java
...ava/cn/ibizlab/core/workflow/service/IWFGroupService.java
+14
-14
IWFHistoryService.java
...a/cn/ibizlab/core/workflow/service/IWFHistoryService.java
+14
-14
IWFMemberService.java
...va/cn/ibizlab/core/workflow/service/IWFMemberService.java
+16
-16
IWFProcessDefinitionService.java
...ab/core/workflow/service/IWFProcessDefinitionService.java
+18
-18
IWFProcessInstanceService.java
...zlab/core/workflow/service/IWFProcessInstanceService.java
+14
-14
IWFProcessNodeService.java
.../ibizlab/core/workflow/service/IWFProcessNodeService.java
+14
-14
IWFREModelService.java
...a/cn/ibizlab/core/workflow/service/IWFREModelService.java
+14
-14
IWFSystemService.java
...va/cn/ibizlab/core/workflow/service/IWFSystemService.java
+14
-14
IWFTaskService.java
...java/cn/ibizlab/core/workflow/service/IWFTaskService.java
+14
-14
IWFTaskWayService.java
...a/cn/ibizlab/core/workflow/service/IWFTaskWayService.java
+14
-14
IWFUserService.java
...java/cn/ibizlab/core/workflow/service/IWFUserService.java
+16
-16
WFGroupServiceImpl.java
...bizlab/core/workflow/service/impl/WFGroupServiceImpl.java
+17
-14
WFMemberServiceImpl.java
...izlab/core/workflow/service/impl/WFMemberServiceImpl.java
+20
-15
WFProcessDefinitionServiceImpl.java
...workflow/service/impl/WFProcessDefinitionServiceImpl.java
+15
-12
WFSystemServiceImpl.java
...izlab/core/workflow/service/impl/WFSystemServiceImpl.java
+15
-12
WFUserServiceImpl.java
...ibizlab/core/workflow/service/impl/WFUserServiceImpl.java
+21
-16
pom.xml
ibzwf-dependencies/pom.xml
+0
-1
Dockerfile
ibzwf-provider/ibzwf-provider-api/src/main/docker/Dockerfile
+1
-1
ibzwf-provider-api.yaml
...bzwf-provider-api/src/main/docker/ibzwf-provider-api.yaml
+1
-14
WFGroupMapping.java
.../src/main/java/cn/ibizlab/api/mapping/WFGroupMapping.java
+3
-4
WFMemberMapping.java
...src/main/java/cn/ibizlab/api/mapping/WFMemberMapping.java
+3
-4
WFProcessDefinitionMapping.java
...va/cn/ibizlab/api/mapping/WFProcessDefinitionMapping.java
+3
-4
WFREModelMapping.java
...rc/main/java/cn/ibizlab/api/mapping/WFREModelMapping.java
+3
-4
WFSystemMapping.java
...src/main/java/cn/ibizlab/api/mapping/WFSystemMapping.java
+3
-4
WFTaskMapping.java
...i/src/main/java/cn/ibizlab/api/mapping/WFTaskMapping.java
+3
-4
WFUserMapping.java
...i/src/main/java/cn/ibizlab/api/mapping/WFUserMapping.java
+3
-4
AuditAspect.java
...til/src/main/java/cn/ibizlab/util/aspect/AuditAspect.java
+56
-57
DEFieldDefaultValueAspect.java
...ava/cn/ibizlab/util/aspect/DEFieldDefaultValueAspect.java
+62
-56
VersionCheckAspect.java
.../main/java/cn/ibizlab/util/aspect/VersionCheckAspect.java
+50
-43
DTOBase.java
ibzwf-util/src/main/java/cn/ibizlab/util/domain/DTOBase.java
+12
-6
EntityBase.java
...util/src/main/java/cn/ibizlab/util/domain/EntityBase.java
+15
-11
EntityMP.java
...f-util/src/main/java/cn/ibizlab/util/domain/EntityMP.java
+6
-6
EntityMongo.java
...til/src/main/java/cn/ibizlab/util/domain/EntityMongo.java
+0
-2
QueryBuildContext.java
...c/main/java/cn/ibizlab/util/filter/QueryBuildContext.java
+4
-3
QueryFilter.java
...til/src/main/java/cn/ibizlab/util/filter/QueryFilter.java
+8
-5
QueryWrapperContext.java
...main/java/cn/ibizlab/util/filter/QueryWrapperContext.java
+14
-12
SearchContextBase.java
...c/main/java/cn/ibizlab/util/filter/SearchContextBase.java
+6
-4
CachedBeanCopier.java
...rc/main/java/cn/ibizlab/util/helper/CachedBeanCopier.java
+2
-3
DEFieldCacheMap.java
...src/main/java/cn/ibizlab/util/helper/DEFieldCacheMap.java
+52
-31
DataObject.java
...util/src/main/java/cn/ibizlab/util/helper/DataObject.java
+62
-38
RuleUtils.java
...-util/src/main/java/cn/ibizlab/util/helper/RuleUtils.java
+102
-54
PermissionSyncJob.java
.../src/main/java/cn/ibizlab/util/job/PermissionSyncJob.java
+8
-8
AppController.java
...til/src/main/java/cn/ibizlab/util/rest/AppController.java
+12
-6
AuthenticationController.java
...n/java/cn/ibizlab/util/rest/AuthenticationController.java
+1
-1
AuthPermissionEvaluator.java
...ava/cn/ibizlab/util/security/AuthPermissionEvaluator.java
+33
-17
AuthenticationUser.java
...ain/java/cn/ibizlab/util/security/AuthenticationUser.java
+4
-2
IBZConfigService.java
...c/main/java/cn/ibizlab/util/service/IBZConfigService.java
+8
-4
IBZUAAUserService.java
.../main/java/cn/ibizlab/util/service/IBZUAAUserService.java
+4
-3
SimpleAuditService.java
...main/java/cn/ibizlab/util/service/SimpleAuditService.java
+99
-85
SimpleFileService.java
.../main/java/cn/ibizlab/util/service/SimpleFileService.java
+7
-6
FeignRequestInterceptor.java
...ain/java/cn/ibizlab/util/web/FeignRequestInterceptor.java
+2
-1
IBZOperationParameterReader.java
...java/cn/ibizlab/util/web/IBZOperationParameterReader.java
+5
-5
SearchContextHandlerMethodArgumentResolver.java
.../util/web/SearchContextHandlerMethodArgumentResolver.java
+0
-3
未找到文件。
app_web/package.json
浏览文件 @
38f046f6
...
@@ -9,7 +9,8 @@
...
@@ -9,7 +9,8 @@
"dev-build"
:
"node --max_old_space_size=8102 ./node_modules/@vue/cli-service/bin/vue-cli-service build --mode development"
,
"dev-build"
:
"node --max_old_space_size=8102 ./node_modules/@vue/cli-service/bin/vue-cli-service build --mode development"
,
"test:unit"
:
"vue-cli-service test:unit"
,
"test:unit"
:
"vue-cli-service test:unit"
,
"test:e2e"
:
"vue-cli-service test:e2e"
,
"test:e2e"
:
"vue-cli-service test:e2e"
,
"lint"
:
"vue-cli-service lint"
"lint"
:
"vue-cli-service lint"
,
"format-code"
:
"prettier-eslint --write
\"
src/**/*.js
\"
\"
src/**/*.vue
\"
\"
src/**/*.tsx
\"
\"
src/**/*.ts
\"
\"
src/**/*.less
\"
"
},
},
"dependencies"
:
{
"dependencies"
:
{
"@fullcalendar/core"
:
"^4.4.0"
,
"@fullcalendar/core"
:
"^4.4.0"
,
...
@@ -66,5 +67,12 @@
...
@@ -66,5 +67,12 @@
"script-loader"
:
"^0.7.2"
,
"script-loader"
:
"^0.7.2"
,
"typescript"
:
"~3.5.3"
,
"typescript"
:
"~3.5.3"
,
"vue-template-compiler"
:
"^2.6.10"
"vue-template-compiler"
:
"^2.6.10"
},
"eslintConfig"
:
{
"root"
:
true
,
"extends"
:
[
"gitee"
,
"stylelint-config-prettier"
]
}
}
}
}
config.xml
浏览文件 @
38f046f6
...
@@ -37,11 +37,6 @@
...
@@ -37,11 +37,6 @@
git clone -b master $para2 ibzwf/
git clone -b master $para2 ibzwf/
export NODE_OPTIONS=--max-old-space-size=4096
export NODE_OPTIONS=--max-old-space-size=4096
cd ibzwf/
cd ibzwf/
mvn clean package -Papi
cd ibzwf-provider/ibzwf-provider-api
mvn -Papi docker:build
mvn -Papi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzwf-provider-api.yaml ibzlab-rt --with-registry-auth
</command>
</command>
</hudson.tasks.Shell>
</hudson.tasks.Shell>
</builders>
</builders>
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/domain/WFGroup.java
浏览文件 @
38f046f6
...
@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
...
@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@Setter
@Setter
@NoArgsConstructor
@NoArgsConstructor
@JsonIgnoreProperties
(
value
=
"handler"
)
@JsonIgnoreProperties
(
value
=
"handler"
)
@TableName
(
value
=
"IBZWFGROUP"
,
resultMap
=
"WFGroupResultMap"
)
@TableName
(
value
=
"IBZWFGROUP"
,
resultMap
=
"WFGroupResultMap"
)
public
class
WFGroup
extends
EntityMP
implements
Serializable
{
public
class
WFGroup
extends
EntityMP
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
@@ -46,8 +46,8 @@ public class WFGroup extends EntityMP implements Serializable {
...
@@ -46,8 +46,8 @@ public class WFGroup extends EntityMP implements Serializable {
/**
/**
* 组标识
* 组标识
*/
*/
@DEField
(
name
=
"groupid"
,
isKeyField
=
true
)
@DEField
(
name
=
"groupid"
,
isKeyField
=
true
)
@TableId
(
value
=
"groupid"
,
type
=
IdType
.
ASSIGN_UUID
)
@TableId
(
value
=
"groupid"
,
type
=
IdType
.
ASSIGN_UUID
)
@JSONField
(
name
=
"id"
)
@JSONField
(
name
=
"id"
)
@JsonProperty
(
"id"
)
@JsonProperty
(
"id"
)
private
String
id
;
private
String
id
;
...
@@ -80,17 +80,17 @@ public class WFGroup extends EntityMP implements Serializable {
...
@@ -80,17 +80,17 @@ public class WFGroup extends EntityMP implements Serializable {
/**
/**
* 设置 [组名称]
* 设置 [组名称]
*/
*/
public
void
setName
(
String
name
){
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
this
.
name
=
name
;
this
.
modify
(
"groupname"
,
name
);
this
.
modify
(
"groupname"
,
name
);
}
}
/**
/**
* 设置 [范围]
* 设置 [范围]
*/
*/
public
void
setGroupscope
(
String
groupscope
){
public
void
setGroupscope
(
String
groupscope
)
{
this
.
groupscope
=
groupscope
;
this
.
groupscope
=
groupscope
;
this
.
modify
(
"groupscope"
,
groupscope
);
this
.
modify
(
"groupscope"
,
groupscope
);
}
}
...
@@ -104,7 +104,7 @@ public class WFGroup extends EntityMP implements Serializable {
...
@@ -104,7 +104,7 @@ public class WFGroup extends EntityMP implements Serializable {
@Override
@Override
public
<
T
>
T
copyTo
(
T
targetEntity
,
boolean
bIncEmpty
)
{
public
<
T
>
T
copyTo
(
T
targetEntity
,
boolean
bIncEmpty
)
{
this
.
reset
(
"groupid"
);
this
.
reset
(
"groupid"
);
return
super
.
copyTo
(
targetEntity
,
bIncEmpty
);
return
super
.
copyTo
(
targetEntity
,
bIncEmpty
);
}
}
}
}
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/domain/WFHistory.java
浏览文件 @
38f046f6
...
@@ -39,7 +39,7 @@ public class WFHistory extends EntityBase implements Serializable {
...
@@ -39,7 +39,7 @@ public class WFHistory extends EntityBase implements Serializable {
/**
/**
* 标识
* 标识
*/
*/
@DEField
(
name
=
"histid"
,
isKeyField
=
true
)
@DEField
(
name
=
"histid"
,
isKeyField
=
true
)
@JSONField
(
name
=
"id"
)
@JSONField
(
name
=
"id"
)
@JsonProperty
(
"id"
)
@JsonProperty
(
"id"
)
private
String
id
;
private
String
id
;
...
@@ -70,8 +70,8 @@ public class WFHistory extends EntityBase implements Serializable {
...
@@ -70,8 +70,8 @@ public class WFHistory extends EntityBase implements Serializable {
* 时间
* 时间
*/
*/
@DEField
(
name
=
"actiontime"
)
@DEField
(
name
=
"actiontime"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
locale
=
"zh"
,
timezone
=
"GMT+8"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
locale
=
"zh"
,
timezone
=
"GMT+8"
)
@JSONField
(
name
=
"time"
,
format
=
"yyyy-MM-dd HH:mm:ss"
)
@JSONField
(
name
=
"time"
,
format
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonProperty
(
"time"
)
@JsonProperty
(
"time"
)
private
Timestamp
time
;
private
Timestamp
time
;
...
@@ -112,7 +112,7 @@ public class WFHistory extends EntityBase implements Serializable {
...
@@ -112,7 +112,7 @@ public class WFHistory extends EntityBase implements Serializable {
/**
/**
* 格式化日期 [时间]
* 格式化日期 [时间]
*/
*/
public
String
formatTime
(){
public
String
formatTime
()
{
if
(
this
.
time
==
null
)
{
if
(
this
.
time
==
null
)
{
return
null
;
return
null
;
}
}
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/domain/WFMember.java
浏览文件 @
38f046f6
...
@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
...
@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@Setter
@Setter
@NoArgsConstructor
@NoArgsConstructor
@JsonIgnoreProperties
(
value
=
"handler"
)
@JsonIgnoreProperties
(
value
=
"handler"
)
@TableName
(
value
=
"IBZWFMEMBER"
,
resultMap
=
"WFMemberResultMap"
)
@TableName
(
value
=
"IBZWFMEMBER"
,
resultMap
=
"WFMemberResultMap"
)
public
class
WFMember
extends
EntityMP
implements
Serializable
{
public
class
WFMember
extends
EntityMP
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
@@ -46,8 +46,8 @@ public class WFMember extends EntityMP implements Serializable {
...
@@ -46,8 +46,8 @@ public class WFMember extends EntityMP implements Serializable {
/**
/**
* 组成员标识
* 组成员标识
*/
*/
@DEField
(
isKeyField
=
true
)
@DEField
(
isKeyField
=
true
)
@TableId
(
value
=
"memberid"
,
type
=
IdType
.
ASSIGN_UUID
)
@TableId
(
value
=
"memberid"
,
type
=
IdType
.
ASSIGN_UUID
)
@JSONField
(
name
=
"memberid"
)
@JSONField
(
name
=
"memberid"
)
@JsonProperty
(
"memberid"
)
@JsonProperty
(
"memberid"
)
private
String
memberid
;
private
String
memberid
;
...
@@ -136,33 +136,33 @@ public class WFMember extends EntityMP implements Serializable {
...
@@ -136,33 +136,33 @@ public class WFMember extends EntityMP implements Serializable {
/**
/**
* 设置 [组成员名称]
* 设置 [组成员名称]
*/
*/
public
void
setMembername
(
String
membername
){
public
void
setMembername
(
String
membername
)
{
this
.
membername
=
membername
;
this
.
membername
=
membername
;
this
.
modify
(
"membername"
,
membername
);
this
.
modify
(
"membername"
,
membername
);
}
}
/**
/**
* 设置 [组标识]
* 设置 [组标识]
*/
*/
public
void
setGroupid
(
String
groupid
){
public
void
setGroupid
(
String
groupid
)
{
this
.
groupid
=
groupid
;
this
.
groupid
=
groupid
;
this
.
modify
(
"groupid"
,
groupid
);
this
.
modify
(
"groupid"
,
groupid
);
}
}
/**
/**
* 设置 [用户标识]
* 设置 [用户标识]
*/
*/
public
void
setUserid
(
String
userid
){
public
void
setUserid
(
String
userid
)
{
this
.
userid
=
userid
;
this
.
userid
=
userid
;
this
.
modify
(
"userid"
,
userid
);
this
.
modify
(
"userid"
,
userid
);
}
}
/**
/**
* 获取 [组成员标识]
* 获取 [组成员标识]
*/
*/
public
String
getMemberid
(){
public
String
getMemberid
()
{
if
(
ObjectUtils
.
isEmpty
(
memberid
)){
if
(
ObjectUtils
.
isEmpty
(
memberid
))
{
memberid
=(
String
)
getDefaultKey
(
true
);
memberid
=(
String
)
getDefaultKey
(
true
);
}
}
return
memberid
;
return
memberid
;
...
@@ -184,7 +184,7 @@ public class WFMember extends EntityMP implements Serializable {
...
@@ -184,7 +184,7 @@ public class WFMember extends EntityMP implements Serializable {
@Override
@Override
public
<
T
>
T
copyTo
(
T
targetEntity
,
boolean
bIncEmpty
)
{
public
<
T
>
T
copyTo
(
T
targetEntity
,
boolean
bIncEmpty
)
{
this
.
reset
(
"memberid"
);
this
.
reset
(
"memberid"
);
return
super
.
copyTo
(
targetEntity
,
bIncEmpty
);
return
super
.
copyTo
(
targetEntity
,
bIncEmpty
);
}
}
}
}
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/domain/WFProcessDefinition.java
浏览文件 @
38f046f6
...
@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
...
@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@Setter
@Setter
@NoArgsConstructor
@NoArgsConstructor
@JsonIgnoreProperties
(
value
=
"handler"
)
@JsonIgnoreProperties
(
value
=
"handler"
)
@TableName
(
value
=
"IBZWFDEFINITION"
,
resultMap
=
"WFProcessDefinitionResultMap"
)
@TableName
(
value
=
"IBZWFDEFINITION"
,
resultMap
=
"WFProcessDefinitionResultMap"
)
public
class
WFProcessDefinition
extends
EntityMP
implements
Serializable
{
public
class
WFProcessDefinition
extends
EntityMP
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
@@ -46,8 +46,8 @@ public class WFProcessDefinition extends EntityMP implements Serializable {
...
@@ -46,8 +46,8 @@ public class WFProcessDefinition extends EntityMP implements Serializable {
/**
/**
* DefinitionKey
* DefinitionKey
*/
*/
@DEField
(
defaultValue
=
"deploykey"
,
defaultValueType
=
DEFieldDefaultValueType
.
PARAM
,
isKeyField
=
true
)
@DEField
(
defaultValue
=
"deploykey"
,
defaultValueType
=
DEFieldDefaultValueType
.
PARAM
,
isKeyField
=
true
)
@TableId
(
value
=
"definitionkey"
,
type
=
IdType
.
ASSIGN_UUID
)
@TableId
(
value
=
"definitionkey"
,
type
=
IdType
.
ASSIGN_UUID
)
@JSONField
(
name
=
"definitionkey"
)
@JSONField
(
name
=
"definitionkey"
)
@JsonProperty
(
"definitionkey"
)
@JsonProperty
(
"definitionkey"
)
private
String
definitionkey
;
private
String
definitionkey
;
...
@@ -120,73 +120,73 @@ public class WFProcessDefinition extends EntityMP implements Serializable {
...
@@ -120,73 +120,73 @@ public class WFProcessDefinition extends EntityMP implements Serializable {
/**
/**
* 设置 [流程定义名称]
* 设置 [流程定义名称]
*/
*/
public
void
setDefinitionname
(
String
definitionname
){
public
void
setDefinitionname
(
String
definitionname
)
{
this
.
definitionname
=
definitionname
;
this
.
definitionname
=
definitionname
;
this
.
modify
(
"definitionname"
,
definitionname
);
this
.
modify
(
"definitionname"
,
definitionname
);
}
}
/**
/**
* 设置 [模型版本]
* 设置 [模型版本]
*/
*/
public
void
setModelversion
(
Integer
modelversion
){
public
void
setModelversion
(
Integer
modelversion
)
{
this
.
modelversion
=
modelversion
;
this
.
modelversion
=
modelversion
;
this
.
modify
(
"modelversion"
,
modelversion
);
this
.
modify
(
"modelversion"
,
modelversion
);
}
}
/**
/**
* 设置 [模型是否启用]
* 设置 [模型是否启用]
*/
*/
public
void
setModelenable
(
Integer
modelenable
){
public
void
setModelenable
(
Integer
modelenable
)
{
this
.
modelenable
=
modelenable
;
this
.
modelenable
=
modelenable
;
this
.
modify
(
"modelenable"
,
modelenable
);
this
.
modify
(
"modelenable"
,
modelenable
);
}
}
/**
/**
* 设置 [系统标识]
* 设置 [系统标识]
*/
*/
public
void
setPssystemid
(
String
pssystemid
){
public
void
setPssystemid
(
String
pssystemid
)
{
this
.
pssystemid
=
pssystemid
;
this
.
pssystemid
=
pssystemid
;
this
.
modify
(
"pssystemid"
,
pssystemid
);
this
.
modify
(
"pssystemid"
,
pssystemid
);
}
}
/**
/**
* 设置 [校验]
* 设置 [校验]
*/
*/
public
void
setMd5check
(
String
md5check
){
public
void
setMd5check
(
String
md5check
)
{
this
.
md5check
=
md5check
;
this
.
md5check
=
md5check
;
this
.
modify
(
"md5check"
,
md5check
);
this
.
modify
(
"md5check"
,
md5check
);
}
}
/**
/**
* 设置 [BPMN]
* 设置 [BPMN]
*/
*/
public
void
setBpmnfile
(
String
bpmnfile
){
public
void
setBpmnfile
(
String
bpmnfile
)
{
this
.
bpmnfile
=
bpmnfile
;
this
.
bpmnfile
=
bpmnfile
;
this
.
modify
(
"bpmnfile"
,
bpmnfile
);
this
.
modify
(
"bpmnfile"
,
bpmnfile
);
}
}
/**
/**
* 设置 [DeployKey]
* 设置 [DeployKey]
*/
*/
public
void
setDeploykey
(
String
deploykey
){
public
void
setDeploykey
(
String
deploykey
)
{
this
.
deploykey
=
deploykey
;
this
.
deploykey
=
deploykey
;
this
.
modify
(
"deploykey"
,
deploykey
);
this
.
modify
(
"deploykey"
,
deploykey
);
}
}
/**
/**
* 设置 [WebServiceIds]
* 设置 [WebServiceIds]
*/
*/
public
void
setWebserviceids
(
String
webserviceids
){
public
void
setWebserviceids
(
String
webserviceids
)
{
this
.
webserviceids
=
webserviceids
;
this
.
webserviceids
=
webserviceids
;
this
.
modify
(
"webserviceids"
,
webserviceids
);
this
.
modify
(
"webserviceids"
,
webserviceids
);
}
}
/**
/**
* 设置 [MobileServiceIds]
* 设置 [MobileServiceIds]
*/
*/
public
void
setMobileserviceids
(
String
mobileserviceids
){
public
void
setMobileserviceids
(
String
mobileserviceids
)
{
this
.
mobileserviceids
=
mobileserviceids
;
this
.
mobileserviceids
=
mobileserviceids
;
this
.
modify
(
"mobileserviceids"
,
mobileserviceids
);
this
.
modify
(
"mobileserviceids"
,
mobileserviceids
);
}
}
...
@@ -200,7 +200,7 @@ public class WFProcessDefinition extends EntityMP implements Serializable {
...
@@ -200,7 +200,7 @@ public class WFProcessDefinition extends EntityMP implements Serializable {
@Override
@Override
public
<
T
>
T
copyTo
(
T
targetEntity
,
boolean
bIncEmpty
)
{
public
<
T
>
T
copyTo
(
T
targetEntity
,
boolean
bIncEmpty
)
{
this
.
reset
(
"definitionkey"
);
this
.
reset
(
"definitionkey"
);
return
super
.
copyTo
(
targetEntity
,
bIncEmpty
);
return
super
.
copyTo
(
targetEntity
,
bIncEmpty
);
}
}
}
}
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/domain/WFProcessInstance.java
浏览文件 @
38f046f6
...
@@ -39,7 +39,7 @@ public class WFProcessInstance extends EntityBase implements Serializable {
...
@@ -39,7 +39,7 @@ public class WFProcessInstance extends EntityBase implements Serializable {
/**
/**
* 实例标识
* 实例标识
*/
*/
@DEField
(
name
=
"instanceid"
,
isKeyField
=
true
)
@DEField
(
name
=
"instanceid"
,
isKeyField
=
true
)
@JSONField
(
name
=
"id"
)
@JSONField
(
name
=
"id"
)
@JsonProperty
(
"id"
)
@JsonProperty
(
"id"
)
private
String
id
;
private
String
id
;
...
@@ -78,16 +78,16 @@ public class WFProcessInstance extends EntityBase implements Serializable {
...
@@ -78,16 +78,16 @@ public class WFProcessInstance extends EntityBase implements Serializable {
/**
/**
* 启动时间
* 启动时间
*/
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
locale
=
"zh"
,
timezone
=
"GMT+8"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
locale
=
"zh"
,
timezone
=
"GMT+8"
)
@JSONField
(
name
=
"startTime"
,
format
=
"yyyy-MM-dd HH:mm:ss"
)
@JSONField
(
name
=
"startTime"
,
format
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonProperty
(
"startTime"
)
@JsonProperty
(
"startTime"
)
private
Timestamp
starttime
;
private
Timestamp
starttime
;
/**
/**
* 结束时间
* 结束时间
*/
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
locale
=
"zh"
,
timezone
=
"GMT+8"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
locale
=
"zh"
,
timezone
=
"GMT+8"
)
@JSONField
(
name
=
"endTime"
,
format
=
"yyyy-MM-dd HH:mm:ss"
)
@JSONField
(
name
=
"endTime"
,
format
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonProperty
(
"endTime"
)
@JsonProperty
(
"endTime"
)
private
Timestamp
endtime
;
private
Timestamp
endtime
;
...
@@ -111,7 +111,7 @@ public class WFProcessInstance extends EntityBase implements Serializable {
...
@@ -111,7 +111,7 @@ public class WFProcessInstance extends EntityBase implements Serializable {
/**
/**
* 格式化日期 [启动时间]
* 格式化日期 [启动时间]
*/
*/
public
String
formatStarttime
(){
public
String
formatStarttime
()
{
if
(
this
.
starttime
==
null
)
{
if
(
this
.
starttime
==
null
)
{
return
null
;
return
null
;
}
}
...
@@ -121,7 +121,7 @@ public class WFProcessInstance extends EntityBase implements Serializable {
...
@@ -121,7 +121,7 @@ public class WFProcessInstance extends EntityBase implements Serializable {
/**
/**
* 格式化日期 [结束时间]
* 格式化日期 [结束时间]
*/
*/
public
String
formatEndtime
(){
public
String
formatEndtime
()
{
if
(
this
.
endtime
==
null
)
{
if
(
this
.
endtime
==
null
)
{
return
null
;
return
null
;
}
}
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/domain/WFProcessNode.java
浏览文件 @
38f046f6
...
@@ -39,7 +39,7 @@ public class WFProcessNode extends EntityBase implements Serializable {
...
@@ -39,7 +39,7 @@ public class WFProcessNode extends EntityBase implements Serializable {
/**
/**
* 节点标识
* 节点标识
*/
*/
@DEField
(
name
=
"nodeid"
,
isKeyField
=
true
)
@DEField
(
name
=
"nodeid"
,
isKeyField
=
true
)
@JSONField
(
name
=
"userTaskId"
)
@JSONField
(
name
=
"userTaskId"
)
@JsonProperty
(
"userTaskId"
)
@JsonProperty
(
"userTaskId"
)
private
String
usertaskid
;
private
String
usertaskid
;
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/domain/WFREModel.java
浏览文件 @
38f046f6
...
@@ -39,7 +39,7 @@ public class WFREModel extends EntityBase implements Serializable {
...
@@ -39,7 +39,7 @@ public class WFREModel extends EntityBase implements Serializable {
/**
/**
* ID
* ID
*/
*/
@DEField
(
name
=
"modelid"
,
isKeyField
=
true
)
@DEField
(
name
=
"modelid"
,
isKeyField
=
true
)
@JSONField
(
name
=
"id"
)
@JSONField
(
name
=
"id"
)
@JsonProperty
(
"id"
)
@JsonProperty
(
"id"
)
private
String
id
;
private
String
id
;
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/domain/WFSystem.java
浏览文件 @
38f046f6
...
@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
...
@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@Setter
@Setter
@NoArgsConstructor
@NoArgsConstructor
@JsonIgnoreProperties
(
value
=
"handler"
)
@JsonIgnoreProperties
(
value
=
"handler"
)
@TableName
(
value
=
"IBZPSSYSTEM"
,
resultMap
=
"WFSystemResultMap"
)
@TableName
(
value
=
"IBZPSSYSTEM"
,
resultMap
=
"WFSystemResultMap"
)
public
class
WFSystem
extends
EntityMP
implements
Serializable
{
public
class
WFSystem
extends
EntityMP
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
@@ -46,8 +46,8 @@ public class WFSystem extends EntityMP implements Serializable {
...
@@ -46,8 +46,8 @@ public class WFSystem extends EntityMP implements Serializable {
/**
/**
* 系统标识
* 系统标识
*/
*/
@DEField
(
isKeyField
=
true
)
@DEField
(
isKeyField
=
true
)
@TableId
(
value
=
"pssystemid"
,
type
=
IdType
.
ASSIGN_UUID
)
@TableId
(
value
=
"pssystemid"
,
type
=
IdType
.
ASSIGN_UUID
)
@JSONField
(
name
=
"pssystemid"
)
@JSONField
(
name
=
"pssystemid"
)
@JsonProperty
(
"pssystemid"
)
@JsonProperty
(
"pssystemid"
)
private
String
pssystemid
;
private
String
pssystemid
;
...
@@ -64,9 +64,9 @@ public class WFSystem extends EntityMP implements Serializable {
...
@@ -64,9 +64,9 @@ public class WFSystem extends EntityMP implements Serializable {
/**
/**
* 设置 [系统名称]
* 设置 [系统名称]
*/
*/
public
void
setPssystemname
(
String
pssystemname
){
public
void
setPssystemname
(
String
pssystemname
)
{
this
.
pssystemname
=
pssystemname
;
this
.
pssystemname
=
pssystemname
;
this
.
modify
(
"pssystemname"
,
pssystemname
);
this
.
modify
(
"pssystemname"
,
pssystemname
);
}
}
...
@@ -80,7 +80,7 @@ public class WFSystem extends EntityMP implements Serializable {
...
@@ -80,7 +80,7 @@ public class WFSystem extends EntityMP implements Serializable {
@Override
@Override
public
<
T
>
T
copyTo
(
T
targetEntity
,
boolean
bIncEmpty
)
{
public
<
T
>
T
copyTo
(
T
targetEntity
,
boolean
bIncEmpty
)
{
this
.
reset
(
"pssystemid"
);
this
.
reset
(
"pssystemid"
);
return
super
.
copyTo
(
targetEntity
,
bIncEmpty
);
return
super
.
copyTo
(
targetEntity
,
bIncEmpty
);
}
}
}
}
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/domain/WFTask.java
浏览文件 @
38f046f6
...
@@ -39,7 +39,7 @@ public class WFTask extends EntityBase implements Serializable {
...
@@ -39,7 +39,7 @@ public class WFTask extends EntityBase implements Serializable {
/**
/**
* 任务标识
* 任务标识
*/
*/
@DEField
(
name
=
"taskid"
,
isKeyField
=
true
)
@DEField
(
name
=
"taskid"
,
isKeyField
=
true
)
@JSONField
(
name
=
"id"
)
@JSONField
(
name
=
"id"
)
@JsonProperty
(
"id"
)
@JsonProperty
(
"id"
)
private
String
id
;
private
String
id
;
...
@@ -93,8 +93,8 @@ public class WFTask extends EntityBase implements Serializable {
...
@@ -93,8 +93,8 @@ public class WFTask extends EntityBase implements Serializable {
/**
/**
* 发起时间
* 发起时间
*/
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
locale
=
"zh"
,
timezone
=
"GMT+8"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
locale
=
"zh"
,
timezone
=
"GMT+8"
)
@JSONField
(
name
=
"createTime"
,
format
=
"yyyy-MM-dd HH:mm:ss"
)
@JSONField
(
name
=
"createTime"
,
format
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonProperty
(
"createTime"
)
@JsonProperty
(
"createTime"
)
private
Timestamp
createtime
;
private
Timestamp
createtime
;
...
@@ -120,7 +120,7 @@ public class WFTask extends EntityBase implements Serializable {
...
@@ -120,7 +120,7 @@ public class WFTask extends EntityBase implements Serializable {
/**
/**
* 格式化日期 [发起时间]
* 格式化日期 [发起时间]
*/
*/
public
String
formatCreatetime
(){
public
String
formatCreatetime
()
{
if
(
this
.
createtime
==
null
)
{
if
(
this
.
createtime
==
null
)
{
return
null
;
return
null
;
}
}
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/domain/WFTaskWay.java
浏览文件 @
38f046f6
...
@@ -39,7 +39,7 @@ public class WFTaskWay extends EntityBase implements Serializable {
...
@@ -39,7 +39,7 @@ public class WFTaskWay extends EntityBase implements Serializable {
/**
/**
* 路径标识
* 路径标识
*/
*/
@DEField
(
name
=
"wayid"
,
isKeyField
=
true
)
@DEField
(
name
=
"wayid"
,
isKeyField
=
true
)
@JSONField
(
name
=
"sequenceFlowId"
)
@JSONField
(
name
=
"sequenceFlowId"
)
@JsonProperty
(
"sequenceFlowId"
)
@JsonProperty
(
"sequenceFlowId"
)
private
String
sequenceflowid
;
private
String
sequenceflowid
;
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/domain/WFUser.java
浏览文件 @
38f046f6
...
@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
...
@@ -38,7 +38,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@Setter
@Setter
@NoArgsConstructor
@NoArgsConstructor
@JsonIgnoreProperties
(
value
=
"handler"
)
@JsonIgnoreProperties
(
value
=
"handler"
)
@TableName
(
value
=
"IBZUSER"
,
resultMap
=
"WFUserResultMap"
)
@TableName
(
value
=
"IBZUSER"
,
resultMap
=
"WFUserResultMap"
)
public
class
WFUser
extends
EntityMP
implements
Serializable
{
public
class
WFUser
extends
EntityMP
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
@@ -46,8 +46,8 @@ public class WFUser extends EntityMP implements Serializable {
...
@@ -46,8 +46,8 @@ public class WFUser extends EntityMP implements Serializable {
/**
/**
* 用户标识
* 用户标识
*/
*/
@DEField
(
name
=
"userid"
,
isKeyField
=
true
)
@DEField
(
name
=
"userid"
,
isKeyField
=
true
)
@TableId
(
value
=
"userid"
,
type
=
IdType
.
ASSIGN_UUID
)
@TableId
(
value
=
"userid"
,
type
=
IdType
.
ASSIGN_UUID
)
@JSONField
(
name
=
"id"
)
@JSONField
(
name
=
"id"
)
@JsonProperty
(
"id"
)
@JsonProperty
(
"id"
)
private
String
id
;
private
String
id
;
...
@@ -124,57 +124,57 @@ public class WFUser extends EntityMP implements Serializable {
...
@@ -124,57 +124,57 @@ public class WFUser extends EntityMP implements Serializable {
/**
/**
* 设置 [用户全局名]
* 设置 [用户全局名]
*/
*/
public
void
setFirstname
(
String
firstname
){
public
void
setFirstname
(
String
firstname
)
{
this
.
firstname
=
firstname
;
this
.
firstname
=
firstname
;
this
.
modify
(
"username"
,
firstname
);
this
.
modify
(
"username"
,
firstname
);
}
}
/**
/**
* 设置 [用户名称]
* 设置 [用户名称]
*/
*/
public
void
setDisplayname
(
String
displayname
){
public
void
setDisplayname
(
String
displayname
)
{
this
.
displayname
=
displayname
;
this
.
displayname
=
displayname
;
this
.
modify
(
"personname"
,
displayname
);
this
.
modify
(
"personname"
,
displayname
);
}
}
/**
/**
* 设置 [主部门]
* 设置 [主部门]
*/
*/
public
void
setMdeptid
(
String
mdeptid
){
public
void
setMdeptid
(
String
mdeptid
)
{
this
.
mdeptid
=
mdeptid
;
this
.
mdeptid
=
mdeptid
;
this
.
modify
(
"mdeptid"
,
mdeptid
);
this
.
modify
(
"mdeptid"
,
mdeptid
);
}
}
/**
/**
* 设置 [主部门代码]
* 设置 [主部门代码]
*/
*/
public
void
setMdeptcode
(
String
mdeptcode
){
public
void
setMdeptcode
(
String
mdeptcode
)
{
this
.
mdeptcode
=
mdeptcode
;
this
.
mdeptcode
=
mdeptcode
;
this
.
modify
(
"mdeptcode"
,
mdeptcode
);
this
.
modify
(
"mdeptcode"
,
mdeptcode
);
}
}
/**
/**
* 设置 [主部门名称]
* 设置 [主部门名称]
*/
*/
public
void
setMdeptname
(
String
mdeptname
){
public
void
setMdeptname
(
String
mdeptname
)
{
this
.
mdeptname
=
mdeptname
;
this
.
mdeptname
=
mdeptname
;
this
.
modify
(
"mdeptname"
,
mdeptname
);
this
.
modify
(
"mdeptname"
,
mdeptname
);
}
}
/**
/**
* 设置 [业务编码]
* 设置 [业务编码]
*/
*/
public
void
setBcode
(
String
bcode
){
public
void
setBcode
(
String
bcode
)
{
this
.
bcode
=
bcode
;
this
.
bcode
=
bcode
;
this
.
modify
(
"bcode"
,
bcode
);
this
.
modify
(
"bcode"
,
bcode
);
}
}
/**
/**
* 设置 [单位代码]
* 设置 [单位代码]
*/
*/
public
void
setOrgcode
(
String
orgcode
){
public
void
setOrgcode
(
String
orgcode
)
{
this
.
orgcode
=
orgcode
;
this
.
orgcode
=
orgcode
;
this
.
modify
(
"orgcode"
,
orgcode
);
this
.
modify
(
"orgcode"
,
orgcode
);
}
}
...
@@ -188,7 +188,7 @@ public class WFUser extends EntityMP implements Serializable {
...
@@ -188,7 +188,7 @@ public class WFUser extends EntityMP implements Serializable {
@Override
@Override
public
<
T
>
T
copyTo
(
T
targetEntity
,
boolean
bIncEmpty
)
{
public
<
T
>
T
copyTo
(
T
targetEntity
,
boolean
bIncEmpty
)
{
this
.
reset
(
"userid"
);
this
.
reset
(
"userid"
);
return
super
.
copyTo
(
targetEntity
,
bIncEmpty
);
return
super
.
copyTo
(
targetEntity
,
bIncEmpty
);
}
}
}
}
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/filter/WFGroupSearchContext.java
浏览文件 @
38f046f6
...
@@ -38,6 +38,7 @@ public class WFGroupSearchContext extends QueryWrapperContext<WFGroup> {
...
@@ -38,6 +38,7 @@ public class WFGroupSearchContext extends QueryWrapperContext<WFGroup> {
/**
/**
* 启用快速搜索
* 启用快速搜索
*/
*/
@Override
public
void
setQuery
(
String
query
)
public
void
setQuery
(
String
query
)
{
{
this
.
query
=
query
;
this
.
query
=
query
;
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/filter/WFMemberSearchContext.java
浏览文件 @
38f046f6
...
@@ -80,6 +80,7 @@ public class WFMemberSearchContext extends QueryWrapperContext<WFMember> {
...
@@ -80,6 +80,7 @@ public class WFMemberSearchContext extends QueryWrapperContext<WFMember> {
/**
/**
* 启用快速搜索
* 启用快速搜索
*/
*/
@Override
public
void
setQuery
(
String
query
)
public
void
setQuery
(
String
query
)
{
{
this
.
query
=
query
;
this
.
query
=
query
;
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/filter/WFProcessDefinitionSearchContext.java
浏览文件 @
38f046f6
...
@@ -45,6 +45,7 @@ public class WFProcessDefinitionSearchContext extends QueryWrapperContext<WFProc
...
@@ -45,6 +45,7 @@ public class WFProcessDefinitionSearchContext extends QueryWrapperContext<WFProc
/**
/**
* 启用快速搜索
* 启用快速搜索
*/
*/
@Override
public
void
setQuery
(
String
query
)
public
void
setQuery
(
String
query
)
{
{
this
.
query
=
query
;
this
.
query
=
query
;
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/filter/WFSystemSearchContext.java
浏览文件 @
38f046f6
...
@@ -38,6 +38,7 @@ public class WFSystemSearchContext extends QueryWrapperContext<WFSystem> {
...
@@ -38,6 +38,7 @@ public class WFSystemSearchContext extends QueryWrapperContext<WFSystem> {
/**
/**
* 启用快速搜索
* 启用快速搜索
*/
*/
@Override
public
void
setQuery
(
String
query
)
public
void
setQuery
(
String
query
)
{
{
this
.
query
=
query
;
this
.
query
=
query
;
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/filter/WFUserSearchContext.java
浏览文件 @
38f046f6
...
@@ -38,6 +38,7 @@ public class WFUserSearchContext extends QueryWrapperContext<WFUser> {
...
@@ -38,6 +38,7 @@ public class WFUserSearchContext extends QueryWrapperContext<WFUser> {
/**
/**
* 启用快速搜索
* 启用快速搜索
*/
*/
@Override
public
void
setQuery
(
String
query
)
public
void
setQuery
(
String
query
)
{
{
this
.
query
=
query
;
this
.
query
=
query
;
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/mapper/WFGroupMapper.java
浏览文件 @
38f046f6
...
@@ -17,9 +17,9 @@ import java.io.Serializable;
...
@@ -17,9 +17,9 @@ import java.io.Serializable;
import
com.baomidou.mybatisplus.core.toolkit.Constants
;
import
com.baomidou.mybatisplus.core.toolkit.Constants
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
public
interface
WFGroupMapper
extends
BaseMapper
<
WFGroup
>{
public
interface
WFGroupMapper
extends
BaseMapper
<
WFGroup
>
{
Page
<
WFGroup
>
searchDefault
(
IPage
page
,
@Param
(
"srf"
)
WFGroupSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
WFGroup
>
wrapper
)
;
Page
<
WFGroup
>
searchDefault
(
IPage
page
,
@Param
(
"srf"
)
WFGroupSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
WFGroup
>
wrapper
);
@Override
@Override
WFGroup
selectById
(
Serializable
id
);
WFGroup
selectById
(
Serializable
id
);
@Override
@Override
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/mapper/WFMemberMapper.java
浏览文件 @
38f046f6
...
@@ -17,9 +17,9 @@ import java.io.Serializable;
...
@@ -17,9 +17,9 @@ import java.io.Serializable;
import
com.baomidou.mybatisplus.core.toolkit.Constants
;
import
com.baomidou.mybatisplus.core.toolkit.Constants
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
public
interface
WFMemberMapper
extends
BaseMapper
<
WFMember
>{
public
interface
WFMemberMapper
extends
BaseMapper
<
WFMember
>
{
Page
<
WFMember
>
searchDefault
(
IPage
page
,
@Param
(
"srf"
)
WFMemberSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
WFMember
>
wrapper
)
;
Page
<
WFMember
>
searchDefault
(
IPage
page
,
@Param
(
"srf"
)
WFMemberSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
WFMember
>
wrapper
);
@Override
@Override
WFMember
selectById
(
Serializable
id
);
WFMember
selectById
(
Serializable
id
);
@Override
@Override
...
@@ -62,8 +62,8 @@ public interface WFMemberMapper extends BaseMapper<WFMember>{
...
@@ -62,8 +62,8 @@ public interface WFMemberMapper extends BaseMapper<WFMember>{
@Delete
(
"${sql}"
)
@Delete
(
"${sql}"
)
boolean
deleteBySQL
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"et"
)
Map
param
);
boolean
deleteBySQL
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"et"
)
Map
param
);
List
<
WFMember
>
selectByGroupid
(
@Param
(
"id"
)
Serializable
id
)
;
List
<
WFMember
>
selectByGroupid
(
@Param
(
"id"
)
Serializable
id
);
List
<
WFMember
>
selectByUserid
(
@Param
(
"id"
)
Serializable
id
)
;
List
<
WFMember
>
selectByUserid
(
@Param
(
"id"
)
Serializable
id
);
}
}
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/mapper/WFProcessDefinitionMapper.java
浏览文件 @
38f046f6
...
@@ -17,23 +17,23 @@ import java.io.Serializable;
...
@@ -17,23 +17,23 @@ import java.io.Serializable;
import
com.baomidou.mybatisplus.core.toolkit.Constants
;
import
com.baomidou.mybatisplus.core.toolkit.Constants
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
public
interface
WFProcessDefinitionMapper
extends
BaseMapper
<
WFProcessDefinition
>{
public
interface
WFProcessDefinitionMapper
extends
BaseMapper
<
WFProcessDefinition
>
{
Page
<
WFProcessDefinition
>
searchDefault
(
IPage
page
,
@Param
(
"srf"
)
WFProcessDefinitionSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
WFProcessDefinition
>
wrapper
)
;
Page
<
WFProcessDefinition
>
searchDefault
(
IPage
page
,
@Param
(
"srf"
)
WFProcessDefinitionSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
WFProcessDefinition
>
wrapper
);
@Override
@Override
@Cacheable
(
value
=
"wfprocessdefinition"
,
key
=
"'row:'+#p0"
)
@Cacheable
(
value
=
"wfprocessdefinition"
,
key
=
"'row:'+#p0"
)
WFProcessDefinition
selectById
(
Serializable
id
);
WFProcessDefinition
selectById
(
Serializable
id
);
@Override
@Override
@CacheEvict
(
value
=
"wfprocessdefinition"
,
key
=
"'row:'+#p0.definitionkey"
)
@CacheEvict
(
value
=
"wfprocessdefinition"
,
key
=
"'row:'+#p0.definitionkey"
)
int
insert
(
WFProcessDefinition
entity
);
int
insert
(
WFProcessDefinition
entity
);
@Override
@Override
@CacheEvict
(
value
=
"wfprocessdefinition"
,
key
=
"'row:'+#p0.definitionkey"
)
@CacheEvict
(
value
=
"wfprocessdefinition"
,
key
=
"'row:'+#p0.definitionkey"
)
int
updateById
(
@Param
(
Constants
.
ENTITY
)
WFProcessDefinition
entity
);
int
updateById
(
@Param
(
Constants
.
ENTITY
)
WFProcessDefinition
entity
);
@Override
@Override
@CacheEvict
(
value
=
"wfprocessdefinition"
,
key
=
"'row:'+#p0.definitionkey"
)
@CacheEvict
(
value
=
"wfprocessdefinition"
,
key
=
"'row:'+#p0.definitionkey"
)
int
update
(
@Param
(
Constants
.
ENTITY
)
WFProcessDefinition
entity
,
@Param
(
"ew"
)
Wrapper
<
WFProcessDefinition
>
updateWrapper
);
int
update
(
@Param
(
Constants
.
ENTITY
)
WFProcessDefinition
entity
,
@Param
(
"ew"
)
Wrapper
<
WFProcessDefinition
>
updateWrapper
);
@Override
@Override
@CacheEvict
(
value
=
"wfprocessdefinition"
,
key
=
"'row:'+#p0"
)
@CacheEvict
(
value
=
"wfprocessdefinition"
,
key
=
"'row:'+#p0"
)
int
deleteById
(
Serializable
id
);
int
deleteById
(
Serializable
id
);
/**
/**
* 自定义查询SQL
* 自定义查询SQL
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/mapper/WFSystemMapper.java
浏览文件 @
38f046f6
...
@@ -17,9 +17,9 @@ import java.io.Serializable;
...
@@ -17,9 +17,9 @@ import java.io.Serializable;
import
com.baomidou.mybatisplus.core.toolkit.Constants
;
import
com.baomidou.mybatisplus.core.toolkit.Constants
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
public
interface
WFSystemMapper
extends
BaseMapper
<
WFSystem
>{
public
interface
WFSystemMapper
extends
BaseMapper
<
WFSystem
>
{
Page
<
WFSystem
>
searchDefault
(
IPage
page
,
@Param
(
"srf"
)
WFSystemSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
WFSystem
>
wrapper
)
;
Page
<
WFSystem
>
searchDefault
(
IPage
page
,
@Param
(
"srf"
)
WFSystemSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
WFSystem
>
wrapper
);
@Override
@Override
WFSystem
selectById
(
Serializable
id
);
WFSystem
selectById
(
Serializable
id
);
@Override
@Override
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/mapper/WFUserMapper.java
浏览文件 @
38f046f6
...
@@ -17,9 +17,9 @@ import java.io.Serializable;
...
@@ -17,9 +17,9 @@ import java.io.Serializable;
import
com.baomidou.mybatisplus.core.toolkit.Constants
;
import
com.baomidou.mybatisplus.core.toolkit.Constants
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
public
interface
WFUserMapper
extends
BaseMapper
<
WFUser
>{
public
interface
WFUserMapper
extends
BaseMapper
<
WFUser
>
{
Page
<
WFUser
>
searchDefault
(
IPage
page
,
@Param
(
"srf"
)
WFUserSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
WFUser
>
wrapper
)
;
Page
<
WFUser
>
searchDefault
(
IPage
page
,
@Param
(
"srf"
)
WFUserSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
WFUser
>
wrapper
);
@Override
@Override
WFUser
selectById
(
Serializable
id
);
WFUser
selectById
(
Serializable
id
);
@Override
@Override
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/IWFGroupService.java
浏览文件 @
38f046f6
...
@@ -23,20 +23,20 @@ import com.baomidou.mybatisplus.extension.service.IService;
...
@@ -23,20 +23,20 @@ import com.baomidou.mybatisplus.extension.service.IService;
/**
/**
* 实体[WFGroup] 服务对象接口
* 实体[WFGroup] 服务对象接口
*/
*/
public
interface
IWFGroupService
extends
IService
<
WFGroup
>{
public
interface
IWFGroupService
extends
IService
<
WFGroup
>
{
boolean
create
(
WFGroup
et
)
;
boolean
create
(
WFGroup
et
);
void
createBatch
(
List
<
WFGroup
>
list
)
;
void
createBatch
(
List
<
WFGroup
>
list
);
boolean
update
(
WFGroup
et
)
;
boolean
update
(
WFGroup
et
);
void
updateBatch
(
List
<
WFGroup
>
list
)
;
void
updateBatch
(
List
<
WFGroup
>
list
);
boolean
remove
(
String
key
)
;
boolean
remove
(
String
key
);
void
removeBatch
(
Collection
<
String
>
idList
)
;
void
removeBatch
(
Collection
<
String
>
idList
);
WFGroup
get
(
String
key
)
;
WFGroup
get
(
String
key
);
WFGroup
getDraft
(
WFGroup
et
)
;
WFGroup
getDraft
(
WFGroup
et
);
boolean
checkKey
(
WFGroup
et
)
;
boolean
checkKey
(
WFGroup
et
);
boolean
save
(
WFGroup
et
)
;
boolean
save
(
WFGroup
et
);
void
saveBatch
(
List
<
WFGroup
>
list
)
;
void
saveBatch
(
List
<
WFGroup
>
list
);
Page
<
WFGroup
>
searchDefault
(
WFGroupSearchContext
context
)
;
Page
<
WFGroup
>
searchDefault
(
WFGroupSearchContext
context
);
/**
/**
*自定义查询SQL
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param sql select * from table where id =#{et.param}
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/IWFHistoryService.java
浏览文件 @
38f046f6
...
@@ -22,20 +22,20 @@ import cn.ibizlab.core.workflow.filter.WFHistorySearchContext;
...
@@ -22,20 +22,20 @@ import cn.ibizlab.core.workflow.filter.WFHistorySearchContext;
/**
/**
* 实体[WFHistory] 服务对象接口
* 实体[WFHistory] 服务对象接口
*/
*/
public
interface
IWFHistoryService
{
public
interface
IWFHistoryService
{
boolean
create
(
WFHistory
et
)
;
boolean
create
(
WFHistory
et
);
void
createBatch
(
List
<
WFHistory
>
list
)
;
void
createBatch
(
List
<
WFHistory
>
list
);
boolean
update
(
WFHistory
et
)
;
boolean
update
(
WFHistory
et
);
void
updateBatch
(
List
<
WFHistory
>
list
)
;
void
updateBatch
(
List
<
WFHistory
>
list
);
boolean
remove
(
String
key
)
;
boolean
remove
(
String
key
);
void
removeBatch
(
Collection
<
String
>
idList
)
;
void
removeBatch
(
Collection
<
String
>
idList
);
WFHistory
get
(
String
key
)
;
WFHistory
get
(
String
key
);
WFHistory
getDraft
(
WFHistory
et
)
;
WFHistory
getDraft
(
WFHistory
et
);
boolean
checkKey
(
WFHistory
et
)
;
boolean
checkKey
(
WFHistory
et
);
boolean
save
(
WFHistory
et
)
;
boolean
save
(
WFHistory
et
);
void
saveBatch
(
List
<
WFHistory
>
list
)
;
void
saveBatch
(
List
<
WFHistory
>
list
);
Page
<
WFHistory
>
searchDefault
(
WFHistorySearchContext
context
)
;
Page
<
WFHistory
>
searchDefault
(
WFHistorySearchContext
context
);
}
}
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/IWFMemberService.java
浏览文件 @
38f046f6
...
@@ -23,23 +23,23 @@ import com.baomidou.mybatisplus.extension.service.IService;
...
@@ -23,23 +23,23 @@ import com.baomidou.mybatisplus.extension.service.IService;
/**
/**
* 实体[WFMember] 服务对象接口
* 实体[WFMember] 服务对象接口
*/
*/
public
interface
IWFMemberService
extends
IService
<
WFMember
>{
public
interface
IWFMemberService
extends
IService
<
WFMember
>
{
boolean
create
(
WFMember
et
)
;
boolean
create
(
WFMember
et
);
void
createBatch
(
List
<
WFMember
>
list
)
;
void
createBatch
(
List
<
WFMember
>
list
);
boolean
update
(
WFMember
et
)
;
boolean
update
(
WFMember
et
);
void
updateBatch
(
List
<
WFMember
>
list
)
;
void
updateBatch
(
List
<
WFMember
>
list
);
boolean
remove
(
String
key
)
;
boolean
remove
(
String
key
);
void
removeBatch
(
Collection
<
String
>
idList
)
;
void
removeBatch
(
Collection
<
String
>
idList
);
WFMember
get
(
String
key
)
;
WFMember
get
(
String
key
);
WFMember
getDraft
(
WFMember
et
)
;
WFMember
getDraft
(
WFMember
et
);
boolean
checkKey
(
WFMember
et
)
;
boolean
checkKey
(
WFMember
et
);
boolean
save
(
WFMember
et
)
;
boolean
save
(
WFMember
et
);
void
saveBatch
(
List
<
WFMember
>
list
)
;
void
saveBatch
(
List
<
WFMember
>
list
);
Page
<
WFMember
>
searchDefault
(
WFMemberSearchContext
context
)
;
Page
<
WFMember
>
searchDefault
(
WFMemberSearchContext
context
);
List
<
WFMember
>
selectByGroupid
(
String
id
);
List
<
WFMember
>
selectByGroupid
(
String
id
);
void
removeByGroupid
(
String
id
);
void
removeByGroupid
(
String
id
);
void
saveByGroupid
(
String
id
,
List
<
WFMember
>
list
)
;
void
saveByGroupid
(
String
id
,
List
<
WFMember
>
list
)
;
List
<
WFMember
>
selectByUserid
(
String
id
);
List
<
WFMember
>
selectByUserid
(
String
id
);
void
removeByUserid
(
String
id
);
void
removeByUserid
(
String
id
);
/**
/**
...
@@ -57,8 +57,8 @@ public interface IWFMemberService extends IService<WFMember>{
...
@@ -57,8 +57,8 @@ public interface IWFMemberService extends IService<WFMember>{
*/
*/
boolean
execute
(
String
sql
,
Map
param
);
boolean
execute
(
String
sql
,
Map
param
);
List
<
WFMember
>
getWfmemberByIds
(
List
<
String
>
ids
)
;
List
<
WFMember
>
getWfmemberByIds
(
List
<
String
>
ids
);
List
<
WFMember
>
getWfmemberByEntities
(
List
<
WFMember
>
entities
)
;
List
<
WFMember
>
getWfmemberByEntities
(
List
<
WFMember
>
entities
);
}
}
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/IWFProcessDefinitionService.java
浏览文件 @
38f046f6
...
@@ -23,24 +23,24 @@ import com.baomidou.mybatisplus.extension.service.IService;
...
@@ -23,24 +23,24 @@ import com.baomidou.mybatisplus.extension.service.IService;
/**
/**
* 实体[WFProcessDefinition] 服务对象接口
* 实体[WFProcessDefinition] 服务对象接口
*/
*/
public
interface
IWFProcessDefinitionService
extends
IService
<
WFProcessDefinition
>{
public
interface
IWFProcessDefinitionService
extends
IService
<
WFProcessDefinition
>
{
boolean
create
(
WFProcessDefinition
et
)
;
boolean
create
(
WFProcessDefinition
et
);
@CacheEvict
(
value
=
"wfprocessdefinition"
,
allEntries
=
true
)
@CacheEvict
(
value
=
"wfprocessdefinition"
,
allEntries
=
true
)
void
createBatch
(
List
<
WFProcessDefinition
>
list
)
;
void
createBatch
(
List
<
WFProcessDefinition
>
list
);
boolean
update
(
WFProcessDefinition
et
)
;
boolean
update
(
WFProcessDefinition
et
);
@CacheEvict
(
value
=
"wfprocessdefinition"
,
allEntries
=
true
)
@CacheEvict
(
value
=
"wfprocessdefinition"
,
allEntries
=
true
)
void
updateBatch
(
List
<
WFProcessDefinition
>
list
)
;
void
updateBatch
(
List
<
WFProcessDefinition
>
list
);
boolean
remove
(
String
key
)
;
boolean
remove
(
String
key
);
@CacheEvict
(
value
=
"wfprocessdefinition"
,
allEntries
=
true
)
@CacheEvict
(
value
=
"wfprocessdefinition"
,
allEntries
=
true
)
void
removeBatch
(
Collection
<
String
>
idList
)
;
void
removeBatch
(
Collection
<
String
>
idList
);
WFProcessDefinition
get
(
String
key
)
;
WFProcessDefinition
get
(
String
key
);
WFProcessDefinition
getDraft
(
WFProcessDefinition
et
)
;
WFProcessDefinition
getDraft
(
WFProcessDefinition
et
);
boolean
checkKey
(
WFProcessDefinition
et
)
;
boolean
checkKey
(
WFProcessDefinition
et
);
boolean
save
(
WFProcessDefinition
et
)
;
boolean
save
(
WFProcessDefinition
et
);
@CacheEvict
(
value
=
"wfprocessdefinition"
,
allEntries
=
true
)
@CacheEvict
(
value
=
"wfprocessdefinition"
,
allEntries
=
true
)
void
saveBatch
(
List
<
WFProcessDefinition
>
list
)
;
void
saveBatch
(
List
<
WFProcessDefinition
>
list
);
Page
<
WFProcessDefinition
>
searchDefault
(
WFProcessDefinitionSearchContext
context
)
;
Page
<
WFProcessDefinition
>
searchDefault
(
WFProcessDefinitionSearchContext
context
);
/**
/**
*自定义查询SQL
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param sql select * from table where id =#{et.param}
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/IWFProcessInstanceService.java
浏览文件 @
38f046f6
...
@@ -22,20 +22,20 @@ import cn.ibizlab.core.workflow.filter.WFProcessInstanceSearchContext;
...
@@ -22,20 +22,20 @@ import cn.ibizlab.core.workflow.filter.WFProcessInstanceSearchContext;
/**
/**
* 实体[WFProcessInstance] 服务对象接口
* 实体[WFProcessInstance] 服务对象接口
*/
*/
public
interface
IWFProcessInstanceService
{
public
interface
IWFProcessInstanceService
{
boolean
create
(
WFProcessInstance
et
)
;
boolean
create
(
WFProcessInstance
et
);
void
createBatch
(
List
<
WFProcessInstance
>
list
)
;
void
createBatch
(
List
<
WFProcessInstance
>
list
);
boolean
update
(
WFProcessInstance
et
)
;
boolean
update
(
WFProcessInstance
et
);
void
updateBatch
(
List
<
WFProcessInstance
>
list
)
;
void
updateBatch
(
List
<
WFProcessInstance
>
list
);
boolean
remove
(
String
key
)
;
boolean
remove
(
String
key
);
void
removeBatch
(
Collection
<
String
>
idList
)
;
void
removeBatch
(
Collection
<
String
>
idList
);
WFProcessInstance
get
(
String
key
)
;
WFProcessInstance
get
(
String
key
);
WFProcessInstance
getDraft
(
WFProcessInstance
et
)
;
WFProcessInstance
getDraft
(
WFProcessInstance
et
);
boolean
checkKey
(
WFProcessInstance
et
)
;
boolean
checkKey
(
WFProcessInstance
et
);
boolean
save
(
WFProcessInstance
et
)
;
boolean
save
(
WFProcessInstance
et
);
void
saveBatch
(
List
<
WFProcessInstance
>
list
)
;
void
saveBatch
(
List
<
WFProcessInstance
>
list
);
Page
<
WFProcessInstance
>
searchDefault
(
WFProcessInstanceSearchContext
context
)
;
Page
<
WFProcessInstance
>
searchDefault
(
WFProcessInstanceSearchContext
context
);
}
}
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/IWFProcessNodeService.java
浏览文件 @
38f046f6
...
@@ -22,20 +22,20 @@ import cn.ibizlab.core.workflow.filter.WFProcessNodeSearchContext;
...
@@ -22,20 +22,20 @@ import cn.ibizlab.core.workflow.filter.WFProcessNodeSearchContext;
/**
/**
* 实体[WFProcessNode] 服务对象接口
* 实体[WFProcessNode] 服务对象接口
*/
*/
public
interface
IWFProcessNodeService
{
public
interface
IWFProcessNodeService
{
boolean
create
(
WFProcessNode
et
)
;
boolean
create
(
WFProcessNode
et
);
void
createBatch
(
List
<
WFProcessNode
>
list
)
;
void
createBatch
(
List
<
WFProcessNode
>
list
);
boolean
update
(
WFProcessNode
et
)
;
boolean
update
(
WFProcessNode
et
);
void
updateBatch
(
List
<
WFProcessNode
>
list
)
;
void
updateBatch
(
List
<
WFProcessNode
>
list
);
boolean
remove
(
String
key
)
;
boolean
remove
(
String
key
);
void
removeBatch
(
Collection
<
String
>
idList
)
;
void
removeBatch
(
Collection
<
String
>
idList
);
WFProcessNode
get
(
String
key
)
;
WFProcessNode
get
(
String
key
);
WFProcessNode
getDraft
(
WFProcessNode
et
)
;
WFProcessNode
getDraft
(
WFProcessNode
et
);
boolean
checkKey
(
WFProcessNode
et
)
;
boolean
checkKey
(
WFProcessNode
et
);
boolean
save
(
WFProcessNode
et
)
;
boolean
save
(
WFProcessNode
et
);
void
saveBatch
(
List
<
WFProcessNode
>
list
)
;
void
saveBatch
(
List
<
WFProcessNode
>
list
);
Page
<
WFProcessNode
>
searchDefault
(
WFProcessNodeSearchContext
context
)
;
Page
<
WFProcessNode
>
searchDefault
(
WFProcessNodeSearchContext
context
);
}
}
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/IWFREModelService.java
浏览文件 @
38f046f6
...
@@ -22,20 +22,20 @@ import cn.ibizlab.core.workflow.filter.WFREModelSearchContext;
...
@@ -22,20 +22,20 @@ import cn.ibizlab.core.workflow.filter.WFREModelSearchContext;
/**
/**
* 实体[WFREModel] 服务对象接口
* 实体[WFREModel] 服务对象接口
*/
*/
public
interface
IWFREModelService
{
public
interface
IWFREModelService
{
boolean
create
(
WFREModel
et
)
;
boolean
create
(
WFREModel
et
);
void
createBatch
(
List
<
WFREModel
>
list
)
;
void
createBatch
(
List
<
WFREModel
>
list
);
boolean
update
(
WFREModel
et
)
;
boolean
update
(
WFREModel
et
);
void
updateBatch
(
List
<
WFREModel
>
list
)
;
void
updateBatch
(
List
<
WFREModel
>
list
);
boolean
remove
(
String
key
)
;
boolean
remove
(
String
key
);
void
removeBatch
(
Collection
<
String
>
idList
)
;
void
removeBatch
(
Collection
<
String
>
idList
);
WFREModel
get
(
String
key
)
;
WFREModel
get
(
String
key
);
WFREModel
getDraft
(
WFREModel
et
)
;
WFREModel
getDraft
(
WFREModel
et
);
boolean
checkKey
(
WFREModel
et
)
;
boolean
checkKey
(
WFREModel
et
);
boolean
save
(
WFREModel
et
)
;
boolean
save
(
WFREModel
et
);
void
saveBatch
(
List
<
WFREModel
>
list
)
;
void
saveBatch
(
List
<
WFREModel
>
list
);
Page
<
WFREModel
>
searchDefault
(
WFREModelSearchContext
context
)
;
Page
<
WFREModel
>
searchDefault
(
WFREModelSearchContext
context
);
}
}
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/IWFSystemService.java
浏览文件 @
38f046f6
...
@@ -23,20 +23,20 @@ import com.baomidou.mybatisplus.extension.service.IService;
...
@@ -23,20 +23,20 @@ import com.baomidou.mybatisplus.extension.service.IService;
/**
/**
* 实体[WFSystem] 服务对象接口
* 实体[WFSystem] 服务对象接口
*/
*/
public
interface
IWFSystemService
extends
IService
<
WFSystem
>{
public
interface
IWFSystemService
extends
IService
<
WFSystem
>
{
boolean
create
(
WFSystem
et
)
;
boolean
create
(
WFSystem
et
);
void
createBatch
(
List
<
WFSystem
>
list
)
;
void
createBatch
(
List
<
WFSystem
>
list
);
boolean
update
(
WFSystem
et
)
;
boolean
update
(
WFSystem
et
);
void
updateBatch
(
List
<
WFSystem
>
list
)
;
void
updateBatch
(
List
<
WFSystem
>
list
);
boolean
remove
(
String
key
)
;
boolean
remove
(
String
key
);
void
removeBatch
(
Collection
<
String
>
idList
)
;
void
removeBatch
(
Collection
<
String
>
idList
);
WFSystem
get
(
String
key
)
;
WFSystem
get
(
String
key
);
WFSystem
getDraft
(
WFSystem
et
)
;
WFSystem
getDraft
(
WFSystem
et
);
boolean
checkKey
(
WFSystem
et
)
;
boolean
checkKey
(
WFSystem
et
);
boolean
save
(
WFSystem
et
)
;
boolean
save
(
WFSystem
et
);
void
saveBatch
(
List
<
WFSystem
>
list
)
;
void
saveBatch
(
List
<
WFSystem
>
list
);
Page
<
WFSystem
>
searchDefault
(
WFSystemSearchContext
context
)
;
Page
<
WFSystem
>
searchDefault
(
WFSystemSearchContext
context
);
/**
/**
*自定义查询SQL
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param sql select * from table where id =#{et.param}
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/IWFTaskService.java
浏览文件 @
38f046f6
...
@@ -22,20 +22,20 @@ import cn.ibizlab.core.workflow.filter.WFTaskSearchContext;
...
@@ -22,20 +22,20 @@ import cn.ibizlab.core.workflow.filter.WFTaskSearchContext;
/**
/**
* 实体[WFTask] 服务对象接口
* 实体[WFTask] 服务对象接口
*/
*/
public
interface
IWFTaskService
{
public
interface
IWFTaskService
{
boolean
create
(
WFTask
et
)
;
boolean
create
(
WFTask
et
);
void
createBatch
(
List
<
WFTask
>
list
)
;
void
createBatch
(
List
<
WFTask
>
list
);
boolean
update
(
WFTask
et
)
;
boolean
update
(
WFTask
et
);
void
updateBatch
(
List
<
WFTask
>
list
)
;
void
updateBatch
(
List
<
WFTask
>
list
);
boolean
remove
(
String
key
)
;
boolean
remove
(
String
key
);
void
removeBatch
(
Collection
<
String
>
idList
)
;
void
removeBatch
(
Collection
<
String
>
idList
);
WFTask
get
(
String
key
)
;
WFTask
get
(
String
key
);
WFTask
getDraft
(
WFTask
et
)
;
WFTask
getDraft
(
WFTask
et
);
boolean
checkKey
(
WFTask
et
)
;
boolean
checkKey
(
WFTask
et
);
boolean
save
(
WFTask
et
)
;
boolean
save
(
WFTask
et
);
void
saveBatch
(
List
<
WFTask
>
list
)
;
void
saveBatch
(
List
<
WFTask
>
list
);
Page
<
WFTask
>
searchDefault
(
WFTaskSearchContext
context
)
;
Page
<
WFTask
>
searchDefault
(
WFTaskSearchContext
context
);
}
}
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/IWFTaskWayService.java
浏览文件 @
38f046f6
...
@@ -22,20 +22,20 @@ import cn.ibizlab.core.workflow.filter.WFTaskWaySearchContext;
...
@@ -22,20 +22,20 @@ import cn.ibizlab.core.workflow.filter.WFTaskWaySearchContext;
/**
/**
* 实体[WFTaskWay] 服务对象接口
* 实体[WFTaskWay] 服务对象接口
*/
*/
public
interface
IWFTaskWayService
{
public
interface
IWFTaskWayService
{
boolean
create
(
WFTaskWay
et
)
;
boolean
create
(
WFTaskWay
et
);
void
createBatch
(
List
<
WFTaskWay
>
list
)
;
void
createBatch
(
List
<
WFTaskWay
>
list
);
boolean
update
(
WFTaskWay
et
)
;
boolean
update
(
WFTaskWay
et
);
void
updateBatch
(
List
<
WFTaskWay
>
list
)
;
void
updateBatch
(
List
<
WFTaskWay
>
list
);
boolean
remove
(
String
key
)
;
boolean
remove
(
String
key
);
void
removeBatch
(
Collection
<
String
>
idList
)
;
void
removeBatch
(
Collection
<
String
>
idList
);
WFTaskWay
get
(
String
key
)
;
WFTaskWay
get
(
String
key
);
WFTaskWay
getDraft
(
WFTaskWay
et
)
;
WFTaskWay
getDraft
(
WFTaskWay
et
);
boolean
checkKey
(
WFTaskWay
et
)
;
boolean
checkKey
(
WFTaskWay
et
);
boolean
save
(
WFTaskWay
et
)
;
boolean
save
(
WFTaskWay
et
);
void
saveBatch
(
List
<
WFTaskWay
>
list
)
;
void
saveBatch
(
List
<
WFTaskWay
>
list
);
Page
<
WFTaskWay
>
searchDefault
(
WFTaskWaySearchContext
context
)
;
Page
<
WFTaskWay
>
searchDefault
(
WFTaskWaySearchContext
context
);
}
}
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/IWFUserService.java
浏览文件 @
38f046f6
...
@@ -23,20 +23,20 @@ import com.baomidou.mybatisplus.extension.service.IService;
...
@@ -23,20 +23,20 @@ import com.baomidou.mybatisplus.extension.service.IService;
/**
/**
* 实体[WFUser] 服务对象接口
* 实体[WFUser] 服务对象接口
*/
*/
public
interface
IWFUserService
extends
IService
<
WFUser
>{
public
interface
IWFUserService
extends
IService
<
WFUser
>
{
boolean
create
(
WFUser
et
)
;
boolean
create
(
WFUser
et
);
void
createBatch
(
List
<
WFUser
>
list
)
;
void
createBatch
(
List
<
WFUser
>
list
);
boolean
update
(
WFUser
et
)
;
boolean
update
(
WFUser
et
);
void
updateBatch
(
List
<
WFUser
>
list
)
;
void
updateBatch
(
List
<
WFUser
>
list
);
boolean
remove
(
String
key
)
;
boolean
remove
(
String
key
);
void
removeBatch
(
Collection
<
String
>
idList
)
;
void
removeBatch
(
Collection
<
String
>
idList
);
WFUser
get
(
String
key
)
;
WFUser
get
(
String
key
);
WFUser
getDraft
(
WFUser
et
)
;
WFUser
getDraft
(
WFUser
et
);
boolean
checkKey
(
WFUser
et
)
;
boolean
checkKey
(
WFUser
et
);
boolean
save
(
WFUser
et
)
;
boolean
save
(
WFUser
et
);
void
saveBatch
(
List
<
WFUser
>
list
)
;
void
saveBatch
(
List
<
WFUser
>
list
);
Page
<
WFUser
>
searchDefault
(
WFUserSearchContext
context
)
;
Page
<
WFUser
>
searchDefault
(
WFUserSearchContext
context
);
/**
/**
*自定义查询SQL
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param sql select * from table where id =#{et.param}
...
@@ -52,8 +52,8 @@ public interface IWFUserService extends IService<WFUser>{
...
@@ -52,8 +52,8 @@ public interface IWFUserService extends IService<WFUser>{
*/
*/
boolean
execute
(
String
sql
,
Map
param
);
boolean
execute
(
String
sql
,
Map
param
);
List
<
WFUser
>
getWfuserByIds
(
List
<
String
>
ids
)
;
List
<
WFUser
>
getWfuserByIds
(
List
<
String
>
ids
);
List
<
WFUser
>
getWfuserByEntities
(
List
<
WFUser
>
entities
)
;
List
<
WFUser
>
getWfuserByEntities
(
List
<
WFUser
>
entities
);
}
}
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/impl/WFGroupServiceImpl.java
浏览文件 @
38f046f6
...
@@ -57,40 +57,42 @@ public class WFGroupServiceImpl extends ServiceImpl<WFGroupMapper, WFGroup> impl
...
@@ -57,40 +57,42 @@ public class WFGroupServiceImpl extends ServiceImpl<WFGroupMapper, WFGroup> impl
@Override
@Override
@Transactional
@Transactional
public
boolean
create
(
WFGroup
et
)
{
public
boolean
create
(
WFGroup
et
)
{
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
{
return
false
;
return
false
;
wfmemberService
.
saveByGroupid
(
et
.
getId
(),
et
.
getWfmember
());
}
CachedBeanCopier
.
copy
(
get
(
et
.
getId
()),
et
);
wfmemberService
.
saveByGroupid
(
et
.
getId
(),
et
.
getWfmember
());
CachedBeanCopier
.
copy
(
get
(
et
.
getId
()),
et
);
return
true
;
return
true
;
}
}
@Override
@Override
@Transactional
@Transactional
public
void
createBatch
(
List
<
WFGroup
>
list
)
{
public
void
createBatch
(
List
<
WFGroup
>
list
)
{
this
.
saveBatch
(
list
,
batchSize
);
this
.
saveBatch
(
list
,
batchSize
);
}
}
@Override
@Override
@Transactional
@Transactional
public
boolean
update
(
WFGroup
et
)
{
public
boolean
update
(
WFGroup
et
)
{
if
(!
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"groupid"
,
et
.
getId
())))
if
(!
update
(
et
,
(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"groupid"
,
et
.
getId
())))
{
return
false
;
return
false
;
wfmemberService
.
saveByGroupid
(
et
.
getId
(),
et
.
getWfmember
());
}
CachedBeanCopier
.
copy
(
get
(
et
.
getId
()),
et
);
wfmemberService
.
saveByGroupid
(
et
.
getId
(),
et
.
getWfmember
());
CachedBeanCopier
.
copy
(
get
(
et
.
getId
()),
et
);
return
true
;
return
true
;
}
}
@Override
@Override
@Transactional
@Transactional
public
void
updateBatch
(
List
<
WFGroup
>
list
)
{
public
void
updateBatch
(
List
<
WFGroup
>
list
)
{
updateBatchById
(
list
,
batchSize
);
updateBatchById
(
list
,
batchSize
);
}
}
@Override
@Override
@Transactional
@Transactional
public
boolean
remove
(
String
key
)
{
public
boolean
remove
(
String
key
)
{
wfmemberService
.
removeByGroupid
(
key
)
;
wfmemberService
.
removeByGroupid
(
key
)
;
boolean
result
=
removeById
(
key
);
boolean
result
=
removeById
(
key
);
return
result
;
return
result
;
}
}
...
@@ -104,11 +106,11 @@ public class WFGroupServiceImpl extends ServiceImpl<WFGroupMapper, WFGroup> impl
...
@@ -104,11 +106,11 @@ public class WFGroupServiceImpl extends ServiceImpl<WFGroupMapper, WFGroup> impl
@Transactional
@Transactional
public
WFGroup
get
(
String
key
)
{
public
WFGroup
get
(
String
key
)
{
WFGroup
et
=
getById
(
key
);
WFGroup
et
=
getById
(
key
);
if
(
et
==
null
){
if
(
et
==
null
){
et
=
new
WFGroup
();
et
=
new
WFGroup
();
et
.
setId
(
key
);
et
.
setId
(
key
);
}
}
else
{
else
{
et
.
setWfmember
(
wfmemberService
.
selectByGroupid
(
key
));
et
.
setWfmember
(
wfmemberService
.
selectByGroupid
(
key
));
}
}
return
et
;
return
et
;
...
@@ -121,13 +123,14 @@ public class WFGroupServiceImpl extends ServiceImpl<WFGroupMapper, WFGroup> impl
...
@@ -121,13 +123,14 @@ public class WFGroupServiceImpl extends ServiceImpl<WFGroupMapper, WFGroup> impl
@Override
@Override
public
boolean
checkKey
(
WFGroup
et
)
{
public
boolean
checkKey
(
WFGroup
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getId
()))
&&
(!
Objects
.
isNull
(
this
.
getById
(
et
.
getId
())));
return
(!
ObjectUtils
.
isEmpty
(
et
.
getId
()))
&&
(!
Objects
.
isNull
(
this
.
getById
(
et
.
getId
())));
}
}
@Override
@Override
@Transactional
@Transactional
public
boolean
save
(
WFGroup
et
)
{
public
boolean
save
(
WFGroup
et
)
{
if
(!
saveOrUpdate
(
et
))
if
(!
saveOrUpdate
(
et
))
{
return
false
;
return
false
;
}
return
true
;
return
true
;
}
}
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/impl/WFMemberServiceImpl.java
浏览文件 @
38f046f6
...
@@ -61,9 +61,10 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
...
@@ -61,9 +61,10 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
@Transactional
@Transactional
public
boolean
create
(
WFMember
et
)
{
public
boolean
create
(
WFMember
et
)
{
fillParentData
(
et
);
fillParentData
(
et
);
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
{
return
false
;
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getMemberid
()),
et
);
}
CachedBeanCopier
.
copy
(
get
(
et
.
getMemberid
()),
et
);
return
true
;
return
true
;
}
}
...
@@ -78,9 +79,10 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
...
@@ -78,9 +79,10 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
@Transactional
@Transactional
public
boolean
update
(
WFMember
et
)
{
public
boolean
update
(
WFMember
et
)
{
fillParentData
(
et
);
fillParentData
(
et
);
if
(!
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"memberid"
,
et
.
getMemberid
())))
if
(!
update
(
et
,
(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"memberid"
,
et
.
getMemberid
())))
{
return
false
;
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getMemberid
()),
et
);
}
CachedBeanCopier
.
copy
(
get
(
et
.
getMemberid
()),
et
);
return
true
;
return
true
;
}
}
...
@@ -88,13 +90,13 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
...
@@ -88,13 +90,13 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
@Transactional
@Transactional
public
void
updateBatch
(
List
<
WFMember
>
list
)
{
public
void
updateBatch
(
List
<
WFMember
>
list
)
{
list
.
forEach
(
item
->
fillParentData
(
item
));
list
.
forEach
(
item
->
fillParentData
(
item
));
updateBatchById
(
list
,
batchSize
);
updateBatchById
(
list
,
batchSize
);
}
}
@Override
@Override
@Transactional
@Transactional
public
boolean
remove
(
String
key
)
{
public
boolean
remove
(
String
key
)
{
boolean
result
=
removeById
(
key
);
boolean
result
=
removeById
(
key
);
return
result
;
return
result
;
}
}
...
@@ -108,11 +110,11 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
...
@@ -108,11 +110,11 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
@Transactional
@Transactional
public
WFMember
get
(
String
key
)
{
public
WFMember
get
(
String
key
)
{
WFMember
et
=
getById
(
key
);
WFMember
et
=
getById
(
key
);
if
(
et
==
null
){
if
(
et
==
null
){
et
=
new
WFMember
();
et
=
new
WFMember
();
et
.
setMemberid
(
key
);
et
.
setMemberid
(
key
);
}
}
else
{
else
{
}
}
return
et
;
return
et
;
}
}
...
@@ -125,13 +127,14 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
...
@@ -125,13 +127,14 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
@Override
@Override
public
boolean
checkKey
(
WFMember
et
)
{
public
boolean
checkKey
(
WFMember
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getMemberid
()))
&&
(!
Objects
.
isNull
(
this
.
getById
(
et
.
getMemberid
())));
return
(!
ObjectUtils
.
isEmpty
(
et
.
getMemberid
()))
&&
(!
Objects
.
isNull
(
this
.
getById
(
et
.
getMemberid
())));
}
}
@Override
@Override
@Transactional
@Transactional
public
boolean
save
(
WFMember
et
)
{
public
boolean
save
(
WFMember
et
)
{
if
(!
saveOrUpdate
(
et
))
if
(!
saveOrUpdate
(
et
))
{
return
false
;
return
false
;
}
return
true
;
return
true
;
}
}
...
@@ -295,11 +298,13 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
...
@@ -295,11 +298,13 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
ids
.
add
(
id
);
ids
.
add
(
id
);
}
}
}
}
if
(
ids
.
size
()>
0
)
if
(
ids
.
size
()>
0
)
{
return
this
.
listByIds
(
ids
);
return
this
.
listByIds
(
ids
);
else
}
else
{
return
entities
;
return
entities
;
}
}
}
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/impl/WFProcessDefinitionServiceImpl.java
浏览文件 @
38f046f6
...
@@ -54,37 +54,39 @@ public class WFProcessDefinitionServiceImpl extends ServiceImpl<WFProcessDefinit
...
@@ -54,37 +54,39 @@ public class WFProcessDefinitionServiceImpl extends ServiceImpl<WFProcessDefinit
@Override
@Override
@Transactional
@Transactional
public
boolean
create
(
WFProcessDefinition
et
)
{
public
boolean
create
(
WFProcessDefinition
et
)
{
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
{
return
false
;
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getDefinitionkey
()),
et
);
}
CachedBeanCopier
.
copy
(
get
(
et
.
getDefinitionkey
()),
et
);
return
true
;
return
true
;
}
}
@Override
@Override
@Transactional
@Transactional
public
void
createBatch
(
List
<
WFProcessDefinition
>
list
)
{
public
void
createBatch
(
List
<
WFProcessDefinition
>
list
)
{
this
.
saveBatch
(
list
,
batchSize
);
this
.
saveBatch
(
list
,
batchSize
);
}
}
@Override
@Override
@Transactional
@Transactional
public
boolean
update
(
WFProcessDefinition
et
)
{
public
boolean
update
(
WFProcessDefinition
et
)
{
if
(!
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"definitionkey"
,
et
.
getDefinitionkey
())))
if
(!
update
(
et
,
(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"definitionkey"
,
et
.
getDefinitionkey
())))
{
return
false
;
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getDefinitionkey
()),
et
);
}
CachedBeanCopier
.
copy
(
get
(
et
.
getDefinitionkey
()),
et
);
return
true
;
return
true
;
}
}
@Override
@Override
@Transactional
@Transactional
public
void
updateBatch
(
List
<
WFProcessDefinition
>
list
)
{
public
void
updateBatch
(
List
<
WFProcessDefinition
>
list
)
{
updateBatchById
(
list
,
batchSize
);
updateBatchById
(
list
,
batchSize
);
}
}
@Override
@Override
@Transactional
@Transactional
public
boolean
remove
(
String
key
)
{
public
boolean
remove
(
String
key
)
{
boolean
result
=
removeById
(
key
);
boolean
result
=
removeById
(
key
);
return
result
;
return
result
;
}
}
...
@@ -98,11 +100,11 @@ public class WFProcessDefinitionServiceImpl extends ServiceImpl<WFProcessDefinit
...
@@ -98,11 +100,11 @@ public class WFProcessDefinitionServiceImpl extends ServiceImpl<WFProcessDefinit
@Transactional
@Transactional
public
WFProcessDefinition
get
(
String
key
)
{
public
WFProcessDefinition
get
(
String
key
)
{
WFProcessDefinition
et
=
getById
(
key
);
WFProcessDefinition
et
=
getById
(
key
);
if
(
et
==
null
){
if
(
et
==
null
){
et
=
new
WFProcessDefinition
();
et
=
new
WFProcessDefinition
();
et
.
setDefinitionkey
(
key
);
et
.
setDefinitionkey
(
key
);
}
}
else
{
else
{
}
}
return
et
;
return
et
;
}
}
...
@@ -114,13 +116,14 @@ public class WFProcessDefinitionServiceImpl extends ServiceImpl<WFProcessDefinit
...
@@ -114,13 +116,14 @@ public class WFProcessDefinitionServiceImpl extends ServiceImpl<WFProcessDefinit
@Override
@Override
public
boolean
checkKey
(
WFProcessDefinition
et
)
{
public
boolean
checkKey
(
WFProcessDefinition
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getDefinitionkey
()))
&&
(!
Objects
.
isNull
(
this
.
getById
(
et
.
getDefinitionkey
())));
return
(!
ObjectUtils
.
isEmpty
(
et
.
getDefinitionkey
()))
&&
(!
Objects
.
isNull
(
this
.
getById
(
et
.
getDefinitionkey
())));
}
}
@Override
@Override
@Transactional
@Transactional
public
boolean
save
(
WFProcessDefinition
et
)
{
public
boolean
save
(
WFProcessDefinition
et
)
{
if
(!
saveOrUpdate
(
et
))
if
(!
saveOrUpdate
(
et
))
{
return
false
;
return
false
;
}
return
true
;
return
true
;
}
}
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/impl/WFSystemServiceImpl.java
浏览文件 @
38f046f6
...
@@ -54,37 +54,39 @@ public class WFSystemServiceImpl extends ServiceImpl<WFSystemMapper, WFSystem> i
...
@@ -54,37 +54,39 @@ public class WFSystemServiceImpl extends ServiceImpl<WFSystemMapper, WFSystem> i
@Override
@Override
@Transactional
@Transactional
public
boolean
create
(
WFSystem
et
)
{
public
boolean
create
(
WFSystem
et
)
{
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
{
return
false
;
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getPssystemid
()),
et
);
}
CachedBeanCopier
.
copy
(
get
(
et
.
getPssystemid
()),
et
);
return
true
;
return
true
;
}
}
@Override
@Override
@Transactional
@Transactional
public
void
createBatch
(
List
<
WFSystem
>
list
)
{
public
void
createBatch
(
List
<
WFSystem
>
list
)
{
this
.
saveBatch
(
list
,
batchSize
);
this
.
saveBatch
(
list
,
batchSize
);
}
}
@Override
@Override
@Transactional
@Transactional
public
boolean
update
(
WFSystem
et
)
{
public
boolean
update
(
WFSystem
et
)
{
if
(!
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"pssystemid"
,
et
.
getPssystemid
())))
if
(!
update
(
et
,
(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"pssystemid"
,
et
.
getPssystemid
())))
{
return
false
;
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getPssystemid
()),
et
);
}
CachedBeanCopier
.
copy
(
get
(
et
.
getPssystemid
()),
et
);
return
true
;
return
true
;
}
}
@Override
@Override
@Transactional
@Transactional
public
void
updateBatch
(
List
<
WFSystem
>
list
)
{
public
void
updateBatch
(
List
<
WFSystem
>
list
)
{
updateBatchById
(
list
,
batchSize
);
updateBatchById
(
list
,
batchSize
);
}
}
@Override
@Override
@Transactional
@Transactional
public
boolean
remove
(
String
key
)
{
public
boolean
remove
(
String
key
)
{
boolean
result
=
removeById
(
key
);
boolean
result
=
removeById
(
key
);
return
result
;
return
result
;
}
}
...
@@ -98,11 +100,11 @@ public class WFSystemServiceImpl extends ServiceImpl<WFSystemMapper, WFSystem> i
...
@@ -98,11 +100,11 @@ public class WFSystemServiceImpl extends ServiceImpl<WFSystemMapper, WFSystem> i
@Transactional
@Transactional
public
WFSystem
get
(
String
key
)
{
public
WFSystem
get
(
String
key
)
{
WFSystem
et
=
getById
(
key
);
WFSystem
et
=
getById
(
key
);
if
(
et
==
null
){
if
(
et
==
null
){
et
=
new
WFSystem
();
et
=
new
WFSystem
();
et
.
setPssystemid
(
key
);
et
.
setPssystemid
(
key
);
}
}
else
{
else
{
}
}
return
et
;
return
et
;
}
}
...
@@ -114,13 +116,14 @@ public class WFSystemServiceImpl extends ServiceImpl<WFSystemMapper, WFSystem> i
...
@@ -114,13 +116,14 @@ public class WFSystemServiceImpl extends ServiceImpl<WFSystemMapper, WFSystem> i
@Override
@Override
public
boolean
checkKey
(
WFSystem
et
)
{
public
boolean
checkKey
(
WFSystem
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getPssystemid
()))
&&
(!
Objects
.
isNull
(
this
.
getById
(
et
.
getPssystemid
())));
return
(!
ObjectUtils
.
isEmpty
(
et
.
getPssystemid
()))
&&
(!
Objects
.
isNull
(
this
.
getById
(
et
.
getPssystemid
())));
}
}
@Override
@Override
@Transactional
@Transactional
public
boolean
save
(
WFSystem
et
)
{
public
boolean
save
(
WFSystem
et
)
{
if
(!
saveOrUpdate
(
et
))
if
(!
saveOrUpdate
(
et
))
{
return
false
;
return
false
;
}
return
true
;
return
true
;
}
}
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/impl/WFUserServiceImpl.java
浏览文件 @
38f046f6
...
@@ -57,37 +57,39 @@ public class WFUserServiceImpl extends ServiceImpl<WFUserMapper, WFUser> impleme
...
@@ -57,37 +57,39 @@ public class WFUserServiceImpl extends ServiceImpl<WFUserMapper, WFUser> impleme
@Override
@Override
@Transactional
@Transactional
public
boolean
create
(
WFUser
et
)
{
public
boolean
create
(
WFUser
et
)
{
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
{
return
false
;
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getId
()),
et
);
}
CachedBeanCopier
.
copy
(
get
(
et
.
getId
()),
et
);
return
true
;
return
true
;
}
}
@Override
@Override
@Transactional
@Transactional
public
void
createBatch
(
List
<
WFUser
>
list
)
{
public
void
createBatch
(
List
<
WFUser
>
list
)
{
this
.
saveBatch
(
list
,
batchSize
);
this
.
saveBatch
(
list
,
batchSize
);
}
}
@Override
@Override
@Transactional
@Transactional
public
boolean
update
(
WFUser
et
)
{
public
boolean
update
(
WFUser
et
)
{
if
(!
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"userid"
,
et
.
getId
())))
if
(!
update
(
et
,
(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"userid"
,
et
.
getId
())))
{
return
false
;
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getId
()),
et
);
}
CachedBeanCopier
.
copy
(
get
(
et
.
getId
()),
et
);
return
true
;
return
true
;
}
}
@Override
@Override
@Transactional
@Transactional
public
void
updateBatch
(
List
<
WFUser
>
list
)
{
public
void
updateBatch
(
List
<
WFUser
>
list
)
{
updateBatchById
(
list
,
batchSize
);
updateBatchById
(
list
,
batchSize
);
}
}
@Override
@Override
@Transactional
@Transactional
public
boolean
remove
(
String
key
)
{
public
boolean
remove
(
String
key
)
{
boolean
result
=
removeById
(
key
);
boolean
result
=
removeById
(
key
);
return
result
;
return
result
;
}
}
...
@@ -101,11 +103,11 @@ public class WFUserServiceImpl extends ServiceImpl<WFUserMapper, WFUser> impleme
...
@@ -101,11 +103,11 @@ public class WFUserServiceImpl extends ServiceImpl<WFUserMapper, WFUser> impleme
@Transactional
@Transactional
public
WFUser
get
(
String
key
)
{
public
WFUser
get
(
String
key
)
{
WFUser
et
=
getById
(
key
);
WFUser
et
=
getById
(
key
);
if
(
et
==
null
){
if
(
et
==
null
){
et
=
new
WFUser
();
et
=
new
WFUser
();
et
.
setId
(
key
);
et
.
setId
(
key
);
}
}
else
{
else
{
}
}
return
et
;
return
et
;
}
}
...
@@ -117,13 +119,14 @@ public class WFUserServiceImpl extends ServiceImpl<WFUserMapper, WFUser> impleme
...
@@ -117,13 +119,14 @@ public class WFUserServiceImpl extends ServiceImpl<WFUserMapper, WFUser> impleme
@Override
@Override
public
boolean
checkKey
(
WFUser
et
)
{
public
boolean
checkKey
(
WFUser
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getId
()))
&&
(!
Objects
.
isNull
(
this
.
getById
(
et
.
getId
())));
return
(!
ObjectUtils
.
isEmpty
(
et
.
getId
()))
&&
(!
Objects
.
isNull
(
this
.
getById
(
et
.
getId
())));
}
}
@Override
@Override
@Transactional
@Transactional
public
boolean
save
(
WFUser
et
)
{
public
boolean
save
(
WFUser
et
)
{
if
(!
saveOrUpdate
(
et
))
if
(!
saveOrUpdate
(
et
))
{
return
false
;
return
false
;
}
return
true
;
return
true
;
}
}
...
@@ -205,11 +208,13 @@ public class WFUserServiceImpl extends ServiceImpl<WFUserMapper, WFUser> impleme
...
@@ -205,11 +208,13 @@ public class WFUserServiceImpl extends ServiceImpl<WFUserMapper, WFUser> impleme
ids
.
add
(
id
);
ids
.
add
(
id
);
}
}
}
}
if
(
ids
.
size
()>
0
)
if
(
ids
.
size
()>
0
)
{
return
this
.
listByIds
(
ids
);
return
this
.
listByIds
(
ids
);
else
}
else
{
return
entities
;
return
entities
;
}
}
}
...
...
ibzwf-dependencies/pom.xml
浏览文件 @
38f046f6
...
@@ -264,7 +264,6 @@
...
@@ -264,7 +264,6 @@
<version>
${baomidou-jobs.version}
</version>
<version>
${baomidou-jobs.version}
</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
</dependencyManagement>
</dependencyManagement>
...
...
ibzwf-provider/ibzwf-provider-api/src/main/docker/Dockerfile
浏览文件 @
38f046f6
...
@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
...
@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzwf-provider-api.jar
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzwf-provider-api.jar
EXPOSE
40003
EXPOSE
8081
ADD
ibzwf-provider-api.jar /ibzwf-provider-api.jar
ADD
ibzwf-provider-api.jar /ibzwf-provider-api.jar
ibzwf-provider/ibzwf-provider-api/src/main/docker/ibzwf-provider-api.yaml
浏览文件 @
38f046f6
...
@@ -3,22 +3,9 @@ services:
...
@@ -3,22 +3,9 @@ services:
ibzwf-provider-api
:
ibzwf-provider-api
:
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/ibzwf-provider-api:latest
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/ibzwf-provider-api:latest
ports
:
ports
:
-
"
40003:40003
"
-
"
8081:8081
"
networks
:
networks
:
-
agent_network
-
agent_network
environment
:
-
SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.180.237
-
SERVER_PORT=40003
-
SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.102.211:8848
-
SPRING_REDIS_HOST=172.16.100.243
-
SPRING_REDIS_PORT=6379
-
SPRING_REDIS_DATABASE=0
-
SPRING_DATASOURCE_USERNAME=a_A_5d9d78509
-
SPRING_DATASOURCE_PASSWORD=@6dEfb3@
-
SPRING_DATASOURCE_URL=jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
-
SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
-
SPRING_DATASOURCE_DEFAULTSCHEMA=a_A_5d9d78509
-
NACOS=172.16.102.211:8848
deploy
:
deploy
:
resources
:
resources
:
limits
:
limits
:
...
...
ibzwf-provider/ibzwf-provider-api/src/main/java/cn/ibizlab/api/mapping/WFGroupMapping.java
浏览文件 @
38f046f6
...
@@ -4,9 +4,8 @@ import org.mapstruct.*;
...
@@ -4,9 +4,8 @@ import org.mapstruct.*;
import
cn.ibizlab.core.workflow.domain.WFGroup
;
import
cn.ibizlab.core.workflow.domain.WFGroup
;
import
cn.ibizlab.api.dto.WFGroupDTO
;
import
cn.ibizlab.api.dto.WFGroupDTO
;
import
cn.ibizlab.util.domain.MappingBase
;
import
cn.ibizlab.util.domain.MappingBase
;
import
org.mapstruct.factory.Mappers
;
@Mapper
(
componentModel
=
"spring"
,
uses
=
{},
implementationName
=
"apiWFGroupMapping"
,
@Mapper
(
componentModel
=
"spring"
,
uses
=
{},
implementationName
=
"apiWFGroupMapping"
,
nullValuePropertyMappingStrategy
=
NullValuePropertyMappingStrategy
.
IGNORE
,
nullValuePropertyMappingStrategy
=
NullValuePropertyMappingStrategy
.
IGNORE
,
nullValueCheckStrategy
=
NullValueCheckStrategy
.
ALWAYS
)
nullValueCheckStrategy
=
NullValueCheckStrategy
.
ALWAYS
)
public
interface
WFGroupMapping
extends
MappingBase
<
WFGroupDTO
,
WFGroup
>
{
public
interface
WFGroupMapping
extends
MappingBase
<
WFGroupDTO
,
WFGroup
>
{
...
...
ibzwf-provider/ibzwf-provider-api/src/main/java/cn/ibizlab/api/mapping/WFMemberMapping.java
浏览文件 @
38f046f6
...
@@ -4,9 +4,8 @@ import org.mapstruct.*;
...
@@ -4,9 +4,8 @@ import org.mapstruct.*;
import
cn.ibizlab.core.workflow.domain.WFMember
;
import
cn.ibizlab.core.workflow.domain.WFMember
;
import
cn.ibizlab.api.dto.WFMemberDTO
;
import
cn.ibizlab.api.dto.WFMemberDTO
;
import
cn.ibizlab.util.domain.MappingBase
;
import
cn.ibizlab.util.domain.MappingBase
;
import
org.mapstruct.factory.Mappers
;
@Mapper
(
componentModel
=
"spring"
,
uses
=
{},
implementationName
=
"apiWFMemberMapping"
,
@Mapper
(
componentModel
=
"spring"
,
uses
=
{},
implementationName
=
"apiWFMemberMapping"
,
nullValuePropertyMappingStrategy
=
NullValuePropertyMappingStrategy
.
IGNORE
,
nullValuePropertyMappingStrategy
=
NullValuePropertyMappingStrategy
.
IGNORE
,
nullValueCheckStrategy
=
NullValueCheckStrategy
.
ALWAYS
)
nullValueCheckStrategy
=
NullValueCheckStrategy
.
ALWAYS
)
public
interface
WFMemberMapping
extends
MappingBase
<
WFMemberDTO
,
WFMember
>
{
public
interface
WFMemberMapping
extends
MappingBase
<
WFMemberDTO
,
WFMember
>
{
...
...
ibzwf-provider/ibzwf-provider-api/src/main/java/cn/ibizlab/api/mapping/WFProcessDefinitionMapping.java
浏览文件 @
38f046f6
...
@@ -4,9 +4,8 @@ import org.mapstruct.*;
...
@@ -4,9 +4,8 @@ import org.mapstruct.*;
import
cn.ibizlab.core.workflow.domain.WFProcessDefinition
;
import
cn.ibizlab.core.workflow.domain.WFProcessDefinition
;
import
cn.ibizlab.api.dto.WFProcessDefinitionDTO
;
import
cn.ibizlab.api.dto.WFProcessDefinitionDTO
;
import
cn.ibizlab.util.domain.MappingBase
;
import
cn.ibizlab.util.domain.MappingBase
;
import
org.mapstruct.factory.Mappers
;
@Mapper
(
componentModel
=
"spring"
,
uses
=
{},
implementationName
=
"apiWFProcessDefinitionMapping"
,
@Mapper
(
componentModel
=
"spring"
,
uses
=
{},
implementationName
=
"apiWFProcessDefinitionMapping"
,
nullValuePropertyMappingStrategy
=
NullValuePropertyMappingStrategy
.
IGNORE
,
nullValuePropertyMappingStrategy
=
NullValuePropertyMappingStrategy
.
IGNORE
,
nullValueCheckStrategy
=
NullValueCheckStrategy
.
ALWAYS
)
nullValueCheckStrategy
=
NullValueCheckStrategy
.
ALWAYS
)
public
interface
WFProcessDefinitionMapping
extends
MappingBase
<
WFProcessDefinitionDTO
,
WFProcessDefinition
>
{
public
interface
WFProcessDefinitionMapping
extends
MappingBase
<
WFProcessDefinitionDTO
,
WFProcessDefinition
>
{
...
...
ibzwf-provider/ibzwf-provider-api/src/main/java/cn/ibizlab/api/mapping/WFREModelMapping.java
浏览文件 @
38f046f6
...
@@ -4,9 +4,8 @@ import org.mapstruct.*;
...
@@ -4,9 +4,8 @@ import org.mapstruct.*;
import
cn.ibizlab.core.workflow.domain.WFREModel
;
import
cn.ibizlab.core.workflow.domain.WFREModel
;
import
cn.ibizlab.api.dto.WFREModelDTO
;
import
cn.ibizlab.api.dto.WFREModelDTO
;
import
cn.ibizlab.util.domain.MappingBase
;
import
cn.ibizlab.util.domain.MappingBase
;
import
org.mapstruct.factory.Mappers
;
@Mapper
(
componentModel
=
"spring"
,
uses
=
{},
implementationName
=
"apiWFREModelMapping"
,
@Mapper
(
componentModel
=
"spring"
,
uses
=
{},
implementationName
=
"apiWFREModelMapping"
,
nullValuePropertyMappingStrategy
=
NullValuePropertyMappingStrategy
.
IGNORE
,
nullValuePropertyMappingStrategy
=
NullValuePropertyMappingStrategy
.
IGNORE
,
nullValueCheckStrategy
=
NullValueCheckStrategy
.
ALWAYS
)
nullValueCheckStrategy
=
NullValueCheckStrategy
.
ALWAYS
)
public
interface
WFREModelMapping
extends
MappingBase
<
WFREModelDTO
,
WFREModel
>
{
public
interface
WFREModelMapping
extends
MappingBase
<
WFREModelDTO
,
WFREModel
>
{
...
...
ibzwf-provider/ibzwf-provider-api/src/main/java/cn/ibizlab/api/mapping/WFSystemMapping.java
浏览文件 @
38f046f6
...
@@ -4,9 +4,8 @@ import org.mapstruct.*;
...
@@ -4,9 +4,8 @@ import org.mapstruct.*;
import
cn.ibizlab.core.workflow.domain.WFSystem
;
import
cn.ibizlab.core.workflow.domain.WFSystem
;
import
cn.ibizlab.api.dto.WFSystemDTO
;
import
cn.ibizlab.api.dto.WFSystemDTO
;
import
cn.ibizlab.util.domain.MappingBase
;
import
cn.ibizlab.util.domain.MappingBase
;
import
org.mapstruct.factory.Mappers
;
@Mapper
(
componentModel
=
"spring"
,
uses
=
{},
implementationName
=
"apiWFSystemMapping"
,
@Mapper
(
componentModel
=
"spring"
,
uses
=
{},
implementationName
=
"apiWFSystemMapping"
,
nullValuePropertyMappingStrategy
=
NullValuePropertyMappingStrategy
.
IGNORE
,
nullValuePropertyMappingStrategy
=
NullValuePropertyMappingStrategy
.
IGNORE
,
nullValueCheckStrategy
=
NullValueCheckStrategy
.
ALWAYS
)
nullValueCheckStrategy
=
NullValueCheckStrategy
.
ALWAYS
)
public
interface
WFSystemMapping
extends
MappingBase
<
WFSystemDTO
,
WFSystem
>
{
public
interface
WFSystemMapping
extends
MappingBase
<
WFSystemDTO
,
WFSystem
>
{
...
...
ibzwf-provider/ibzwf-provider-api/src/main/java/cn/ibizlab/api/mapping/WFTaskMapping.java
浏览文件 @
38f046f6
...
@@ -4,9 +4,8 @@ import org.mapstruct.*;
...
@@ -4,9 +4,8 @@ import org.mapstruct.*;
import
cn.ibizlab.core.workflow.domain.WFTask
;
import
cn.ibizlab.core.workflow.domain.WFTask
;
import
cn.ibizlab.api.dto.WFTaskDTO
;
import
cn.ibizlab.api.dto.WFTaskDTO
;
import
cn.ibizlab.util.domain.MappingBase
;
import
cn.ibizlab.util.domain.MappingBase
;
import
org.mapstruct.factory.Mappers
;
@Mapper
(
componentModel
=
"spring"
,
uses
=
{},
implementationName
=
"apiWFTaskMapping"
,
@Mapper
(
componentModel
=
"spring"
,
uses
=
{},
implementationName
=
"apiWFTaskMapping"
,
nullValuePropertyMappingStrategy
=
NullValuePropertyMappingStrategy
.
IGNORE
,
nullValuePropertyMappingStrategy
=
NullValuePropertyMappingStrategy
.
IGNORE
,
nullValueCheckStrategy
=
NullValueCheckStrategy
.
ALWAYS
)
nullValueCheckStrategy
=
NullValueCheckStrategy
.
ALWAYS
)
public
interface
WFTaskMapping
extends
MappingBase
<
WFTaskDTO
,
WFTask
>
{
public
interface
WFTaskMapping
extends
MappingBase
<
WFTaskDTO
,
WFTask
>
{
...
...
ibzwf-provider/ibzwf-provider-api/src/main/java/cn/ibizlab/api/mapping/WFUserMapping.java
浏览文件 @
38f046f6
...
@@ -4,9 +4,8 @@ import org.mapstruct.*;
...
@@ -4,9 +4,8 @@ import org.mapstruct.*;
import
cn.ibizlab.core.workflow.domain.WFUser
;
import
cn.ibizlab.core.workflow.domain.WFUser
;
import
cn.ibizlab.api.dto.WFUserDTO
;
import
cn.ibizlab.api.dto.WFUserDTO
;
import
cn.ibizlab.util.domain.MappingBase
;
import
cn.ibizlab.util.domain.MappingBase
;
import
org.mapstruct.factory.Mappers
;
@Mapper
(
componentModel
=
"spring"
,
uses
=
{},
implementationName
=
"apiWFUserMapping"
,
@Mapper
(
componentModel
=
"spring"
,
uses
=
{},
implementationName
=
"apiWFUserMapping"
,
nullValuePropertyMappingStrategy
=
NullValuePropertyMappingStrategy
.
IGNORE
,
nullValuePropertyMappingStrategy
=
NullValuePropertyMappingStrategy
.
IGNORE
,
nullValueCheckStrategy
=
NullValueCheckStrategy
.
ALWAYS
)
nullValueCheckStrategy
=
NullValueCheckStrategy
.
ALWAYS
)
public
interface
WFUserMapping
extends
MappingBase
<
WFUserDTO
,
WFUser
>
{
public
interface
WFUserMapping
extends
MappingBase
<
WFUserDTO
,
WFUser
>
{
...
...
ibzwf-util/src/main/java/cn/ibizlab/util/aspect/AuditAspect.java
浏览文件 @
38f046f6
...
@@ -43,30 +43,31 @@ public class AuditAspect
...
@@ -43,30 +43,31 @@ public class AuditAspect
*/
*/
@AfterReturning
(
value
=
"execution(* cn.ibizlab.core.*.service.*.create(..))"
)
@AfterReturning
(
value
=
"execution(* cn.ibizlab.core.*.service.*.create(..))"
)
@SneakyThrows
@SneakyThrows
public
void
create
(
JoinPoint
point
){
public
void
create
(
JoinPoint
point
)
{
HttpServletRequest
request
=
null
;
HttpServletRequest
request
=
null
;
RequestAttributes
requestAttributes
=
RequestContextHolder
.
getRequestAttributes
();
RequestAttributes
requestAttributes
=
RequestContextHolder
.
getRequestAttributes
();
if
(
requestAttributes
!=
null
){
if
(
requestAttributes
!=
null
)
{
request
=
((
ServletRequestAttributes
)
requestAttributes
).
getRequest
();
request
=
((
ServletRequestAttributes
)
requestAttributes
).
getRequest
();
}
}
Object
[]
args
=
point
.
getArgs
();
Object
[]
args
=
point
.
getArgs
();
if
(
ObjectUtils
.
isEmpty
(
args
)
||
args
.
length
==
0
)
if
(
ObjectUtils
.
isEmpty
(
args
)
||
args
.
length
==
0
)
{
return
;
return
;
}
Object
serviceParam
=
args
[
0
];
Object
serviceParam
=
args
[
0
];
if
(
serviceParam
instanceof
EntityBase
){
if
(
serviceParam
instanceof
EntityBase
)
{
EntityBase
entity
=(
EntityBase
)
serviceParam
;
//创建数据
EntityBase
entity
=
(
EntityBase
)
serviceParam
;
Map
<
String
,
Audit
>
auditFields
=
DEFieldCacheMap
.
getAuditFields
(
entity
.
getClass
());
Map
<
String
,
Audit
>
auditFields
=
DEFieldCacheMap
.
getAuditFields
(
entity
.
getClass
());
if
(
auditFields
.
size
()==
0
)
//是否有审计属性
//是否有审计属性
if
(
auditFields
.
size
()==
0
)
{
return
;
return
;
}
String
idField
=
DEFieldCacheMap
.
getDEKeyField
(
entity
.
getClass
());
String
idField
=
DEFieldCacheMap
.
getDEKeyField
(
entity
.
getClass
());
Object
idValue
=
""
;
Object
idValue
=
""
;
if
(!
StringUtils
.
isEmpty
(
idField
)){
if
(!
StringUtils
.
isEmpty
(
idField
))
{
idValue
=
entity
.
get
(
idField
);
idValue
=
entity
.
get
(
idField
);
}
}
//记录审计日志
//记录审计日志
dataAuditService
.
createAudit
(
request
,
entity
,
idValue
,
auditFields
);
dataAuditService
.
createAudit
(
request
,
entity
,
idValue
,
auditFields
);
}
}
}
}
...
@@ -77,39 +78,38 @@ public class AuditAspect
...
@@ -77,39 +78,38 @@ public class AuditAspect
*/
*/
@Around
(
"execution(* cn.ibizlab.core.*.service.*.update(..))"
)
@Around
(
"execution(* cn.ibizlab.core.*.service.*.update(..))"
)
public
Object
update
(
ProceedingJoinPoint
point
)
throws
Throwable
{
public
Object
update
(
ProceedingJoinPoint
point
)
throws
Throwable
{
HttpServletRequest
request
=
null
;
HttpServletRequest
request
=
null
;
RequestAttributes
requestAttributes
=
RequestContextHolder
.
getRequestAttributes
();
RequestAttributes
requestAttributes
=
RequestContextHolder
.
getRequestAttributes
();
if
(
requestAttributes
!=
null
){
if
(
requestAttributes
!=
null
)
{
request
=((
ServletRequestAttributes
)
requestAttributes
).
getRequest
();
request
=((
ServletRequestAttributes
)
requestAttributes
).
getRequest
();
}
}
Object
serviceObj
=
point
.
getTarget
();
Object
serviceObj
=
point
.
getTarget
();
Object
args
[]=
point
.
getArgs
();
Object
args
[]
=
point
.
getArgs
();
if
(
ObjectUtils
.
isEmpty
(
args
)
||
args
.
length
==
0
)
{
if
(
ObjectUtils
.
isEmpty
(
args
)
||
args
.
length
==
0
)
return
point
.
proceed
();
return
point
.
proceed
();
}
Object
arg
=
args
[
0
];
Object
arg
=
args
[
0
];
if
(
arg
instanceof
EntityBase
){
if
(
arg
instanceof
EntityBase
)
{
EntityBase
entity
=
(
EntityBase
)
arg
;
EntityBase
entity
=
(
EntityBase
)
arg
;
Map
<
String
,
Audit
>
auditFields
=
DEFieldCacheMap
.
getAuditFields
(
entity
.
getClass
());
Map
<
String
,
Audit
>
auditFields
=
DEFieldCacheMap
.
getAuditFields
(
entity
.
getClass
());
//是否有审计属性
//是否有审计属性
if
(
auditFields
.
size
()==
0
)
if
(
auditFields
.
size
()==
0
)
{
return
point
.
proceed
();
return
point
.
proceed
();
String
idField
=
DEFieldCacheMap
.
getDEKeyField
(
entity
.
getClass
());
}
Object
idValue
=
""
;
String
idField
=
DEFieldCacheMap
.
getDEKeyField
(
entity
.
getClass
());
Object
idValue
=
""
;
if
(!
StringUtils
.
isEmpty
(
idField
)){
if
(!
StringUtils
.
isEmpty
(
idField
)){
idValue
=
entity
.
get
(
idField
);
idValue
=
entity
.
get
(
idField
);
}
}
if
(
ObjectUtils
.
isEmpty
(
idValue
))
if
(
ObjectUtils
.
isEmpty
(
idValue
))
{
return
point
.
proceed
();
return
point
.
proceed
();
}
//获取更新前实体
//获取更新前实体
EntityBase
beforeEntity
=
getEntity
(
serviceObj
,
idValue
);
EntityBase
beforeEntity
=
getEntity
(
serviceObj
,
idValue
);
//执行更新操作
//执行更新操作
point
.
proceed
();
point
.
proceed
();
//记录审计日志
//记录审计日志
dataAuditService
.
updateAudit
(
request
,
beforeEntity
,
serviceObj
,
idValue
,
auditFields
);
dataAuditService
.
updateAudit
(
request
,
beforeEntity
,
serviceObj
,
idValue
,
auditFields
);
return
true
;
return
true
;
}
}
return
point
.
proceed
();
return
point
.
proceed
();
...
@@ -124,28 +124,27 @@ public class AuditAspect
...
@@ -124,28 +124,27 @@ public class AuditAspect
*/
*/
@Around
(
"execution(* cn.ibizlab.core.*.service.*.remove(..))"
)
@Around
(
"execution(* cn.ibizlab.core.*.service.*.remove(..))"
)
public
Object
remove
(
ProceedingJoinPoint
point
)
throws
Throwable
{
public
Object
remove
(
ProceedingJoinPoint
point
)
throws
Throwable
{
HttpServletRequest
request
=
null
;
HttpServletRequest
request
=
null
;
RequestAttributes
requestAttributes
=
RequestContextHolder
.
getRequestAttributes
();
RequestAttributes
requestAttributes
=
RequestContextHolder
.
getRequestAttributes
();
if
(
requestAttributes
!=
null
)
{
if
(
requestAttributes
!=
null
)
{
request
=
((
ServletRequestAttributes
)
requestAttributes
).
getRequest
();
request
=
((
ServletRequestAttributes
)
requestAttributes
).
getRequest
();
}
}
Object
serviceObj
=
point
.
getTarget
();
Object
serviceObj
=
point
.
getTarget
();
Object
args
[]=
point
.
getArgs
();
Object
args
[]
=
point
.
getArgs
();
if
(
ObjectUtils
.
isEmpty
(
args
)
||
args
.
length
==
0
)
{
if
(
ObjectUtils
.
isEmpty
(
args
)
||
args
.
length
==
0
)
return
point
.
proceed
();
return
point
.
proceed
();
}
Object
idValue
=
args
[
0
];
Object
idValue
=
args
[
0
];
EntityBase
entity
=
getEntity
(
serviceObj
,
idValue
);
EntityBase
entity
=
getEntity
(
serviceObj
,
idValue
);
Map
<
String
,
Audit
>
auditFields
=
DEFieldCacheMap
.
getAuditFields
(
entity
.
getClass
());
Map
<
String
,
Audit
>
auditFields
=
DEFieldCacheMap
.
getAuditFields
(
entity
.
getClass
());
if
(
auditFields
.
size
()==
0
){
if
(
auditFields
.
size
()==
0
)
{
return
point
.
proceed
();
return
point
.
proceed
();
}
}
else
{
else
{
//执行删除操作
//执行删除操作
point
.
proceed
();
point
.
proceed
();
//记录审计日志
//记录审计日志
dataAuditService
.
removeAudit
(
request
,
entity
,
idValue
,
auditFields
);
dataAuditService
.
removeAudit
(
request
,
entity
,
idValue
,
auditFields
);
return
true
;
return
true
;
}
}
}
}
...
@@ -157,12 +156,12 @@ public class AuditAspect
...
@@ -157,12 +156,12 @@ public class AuditAspect
* @return
* @return
*/
*/
@SneakyThrows
@SneakyThrows
private
EntityBase
getEntity
(
Object
service
,
Object
id
){
private
EntityBase
getEntity
(
Object
service
,
Object
id
)
{
EntityBase
entity
=
null
;
EntityBase
entity
=
null
;
if
(!
ObjectUtils
.
isEmpty
(
service
)){
if
(!
ObjectUtils
.
isEmpty
(
service
))
{
EvaluationContext
oldContext
=
new
StandardEvaluationContext
();
EvaluationContext
oldContext
=
new
StandardEvaluationContext
();
oldContext
.
setVariable
(
"service"
,
service
);
oldContext
.
setVariable
(
"service"
,
service
);
oldContext
.
setVariable
(
"id"
,
id
);
oldContext
.
setVariable
(
"id"
,
id
);
Expression
oldExp
=
parser
.
parseExpression
(
"#service.get(#id)"
);
Expression
oldExp
=
parser
.
parseExpression
(
"#service.get(#id)"
);
return
oldExp
.
getValue
(
oldContext
,
EntityBase
.
class
);
return
oldExp
.
getValue
(
oldContext
,
EntityBase
.
class
);
}
}
...
...
ibzwf-util/src/main/java/cn/ibizlab/util/aspect/DEFieldDefaultValueAspect.java
浏览文件 @
38f046f6
此差异已折叠。
点击以展开。
ibzwf-util/src/main/java/cn/ibizlab/util/aspect/VersionCheckAspect.java
浏览文件 @
38f046f6
...
@@ -32,55 +32,62 @@ import java.util.Map;
...
@@ -32,55 +32,62 @@ import java.util.Map;
public
class
VersionCheckAspect
public
class
VersionCheckAspect
{
{
private
final
ExpressionParser
parser
=
new
SpelExpressionParser
();
private
final
ExpressionParser
parser
=
new
SpelExpressionParser
();
private
final
String
IgnoreField
=
"ignoreversioncheck"
;
private
final
String
IgnoreField
=
"ignoreversioncheck"
;
@SneakyThrows
@SneakyThrows
@Before
(
"execution(* cn.ibizlab.*.rest.*.update(..)) && @annotation(versionCheck)"
)
@Before
(
"execution(* cn.ibizlab.*.rest.*.update(..)) && @annotation(versionCheck)"
)
public
void
BeforeUpdate
(
JoinPoint
point
,
VersionCheck
versionCheck
){
public
void
BeforeUpdate
(
JoinPoint
point
,
VersionCheck
versionCheck
)
{
Object
[]
args
=
point
.
getArgs
();
Object
[]
args
=
point
.
getArgs
();
Object
id
=
args
[
0
];
Object
id
=
args
[
0
];
Object
dto
=
args
[
1
];
Object
dto
=
args
[
1
];
if
(
ObjectUtils
.
isEmpty
(
id
)
||
ObjectUtils
.
isEmpty
(
dto
))
if
(
ObjectUtils
.
isEmpty
(
id
)
||
ObjectUtils
.
isEmpty
(
dto
))
{
return
;
return
;
String
versionField
=
versionCheck
.
versionfield
();
}
if
(
StringUtils
.
isEmpty
(
versionField
))
String
versionField
=
versionCheck
.
versionfield
();
if
(
StringUtils
.
isEmpty
(
versionField
))
{
return
;
return
;
versionCheck
(
versionCheck
,
point
.
getTarget
(),
dto
,
id
);
}
versionCheck
(
versionCheck
,
point
.
getTarget
(),
dto
,
id
);
}
}
@SneakyThrows
@SneakyThrows
@Before
(
"execution(* cn.ibizlab.*.rest.*.updateBy*(..)) && @annotation(versionCheck)"
)
@Before
(
"execution(* cn.ibizlab.*.rest.*.updateBy*(..)) && @annotation(versionCheck)"
)
public
void
BeforeUpdateBy
(
JoinPoint
point
,
VersionCheck
versionCheck
){
public
void
BeforeUpdateBy
(
JoinPoint
point
,
VersionCheck
versionCheck
)
{
Object
[]
args
=
point
.
getArgs
();
Object
[]
args
=
point
.
getArgs
();
if
(
args
.
length
>=
2
){
if
(
args
.
length
>=
2
)
{
Object
id
=
args
[
args
.
length
-
2
];
Object
id
=
args
[
args
.
length
-
2
];
Object
dto
=
args
[
args
.
length
-
1
];
Object
dto
=
args
[
args
.
length
-
1
];
if
(
ObjectUtils
.
isEmpty
(
id
)
||
ObjectUtils
.
isEmpty
(
dto
))
if
(
ObjectUtils
.
isEmpty
(
id
)
||
ObjectUtils
.
isEmpty
(
dto
))
{
return
;
return
;
String
versionField
=
versionCheck
.
versionfield
();
}
if
(
StringUtils
.
isEmpty
(
versionField
))
String
versionField
=
versionCheck
.
versionfield
();
if
(
StringUtils
.
isEmpty
(
versionField
))
{
return
;
return
;
versionCheck
(
versionCheck
,
point
.
getTarget
(),
dto
,
id
);
}
versionCheck
(
versionCheck
,
point
.
getTarget
(),
dto
,
id
);
}
}
}
}
private
void
versionCheck
(
VersionCheck
versionCheck
,
Object
resource
,
Object
dto
,
Object
id
)
{
private
void
versionCheck
(
VersionCheck
versionCheck
,
Object
resource
,
Object
dto
,
Object
id
)
{
EvaluationContext
context
=
new
StandardEvaluationContext
();
EvaluationContext
context
=
new
StandardEvaluationContext
();
context
.
setVariable
(
"dto"
,
dto
);
context
.
setVariable
(
"dto"
,
dto
);
//忽略版本检查
//忽略版本检查
Expression
dtoParamsExp
=
parser
.
parseExpression
(
"#dto.extensionparams"
);
Expression
dtoParamsExp
=
parser
.
parseExpression
(
"#dto.extensionparams"
);
Map
dtoParam
=
dtoParamsExp
.
getValue
(
context
,
Map
.
class
);
Map
dtoParam
=
dtoParamsExp
.
getValue
(
context
,
Map
.
class
);
if
(!
ObjectUtils
.
isEmpty
(
dtoParam
)
&&
!
ObjectUtils
.
isEmpty
(
dtoParam
.
get
(
IgnoreField
))
&&
dtoParam
.
get
(
IgnoreField
).
equals
(
1
))
if
(!
ObjectUtils
.
isEmpty
(
dtoParam
)
&&
!
ObjectUtils
.
isEmpty
(
dtoParam
.
get
(
IgnoreField
))
&&
dtoParam
.
get
(
IgnoreField
).
equals
(
1
))
{
return
;
return
;
Expression
newExp
=
parser
.
parseExpression
(
String
.
format
(
"#dto.%s"
,
versionCheck
.
versionfield
()));
}
Object
newVersion
=
newExp
.
getValue
(
context
);
Expression
newExp
=
parser
.
parseExpression
(
String
.
format
(
"#dto.%s"
,
versionCheck
.
versionfield
()));
if
(
ObjectUtils
.
isEmpty
(
newVersion
))
Object
newVersion
=
newExp
.
getValue
(
context
);
if
(
ObjectUtils
.
isEmpty
(
newVersion
))
{
return
;
return
;
}
//进行版本检查
//进行版本检查
Object
oldVersion
=
getDBVersion
(
versionCheck
,
getService
(
resource
,
versionCheck
.
entity
()),
id
);
Object
oldVersion
=
getDBVersion
(
versionCheck
,
getService
(
resource
,
versionCheck
.
entity
()),
id
);
if
(!
ObjectUtils
.
isEmpty
(
oldVersion
)){
if
(!
ObjectUtils
.
isEmpty
(
oldVersion
))
{
if
(
RuleUtils
.
gt
(
newVersion
,
oldVersion
))
if
(
RuleUtils
.
gt
(
newVersion
,
oldVersion
))
{
throw
new
BadRequestAlertException
(
"数据已变更,可能后台数据已被修改,请重新加载数据"
,
"VersionCheckAspect"
,
"versionCheck"
);
throw
new
BadRequestAlertException
(
"数据已变更,可能后台数据已被修改,请重新加载数据"
,
"VersionCheckAspect"
,
"versionCheck"
);
}
}
}
}
}
...
@@ -91,12 +98,12 @@ public class VersionCheckAspect
...
@@ -91,12 +98,12 @@ public class VersionCheckAspect
* @return
* @return
*/
*/
@SneakyThrows
@SneakyThrows
private
Object
getService
(
Object
resource
,
String
entity
)
{
private
Object
getService
(
Object
resource
,
String
entity
)
{
Object
service
=
null
;
Object
service
=
null
;
Field
[]
fields
=
resource
.
getClass
().
getDeclaredFields
();
Field
[]
fields
=
resource
.
getClass
().
getDeclaredFields
();
for
(
Field
field
:
fields
){
for
(
Field
field
:
fields
)
{
if
(
field
.
getModifiers
()==
1
&&
field
.
getName
().
equalsIgnoreCase
(
String
.
format
(
"%sService"
,
entity
))){
if
(
field
.
getModifiers
()==
1
&&
field
.
getName
().
equalsIgnoreCase
(
String
.
format
(
"%sService"
,
entity
)))
{
service
=
field
.
get
(
resource
);
service
=
field
.
get
(
resource
);
break
;
break
;
}
}
}
}
...
@@ -111,21 +118,21 @@ public class VersionCheckAspect
...
@@ -111,21 +118,21 @@ public class VersionCheckAspect
* @return
* @return
*/
*/
@SneakyThrows
@SneakyThrows
private
Object
getDBVersion
(
VersionCheck
versionCheck
,
Object
service
,
Object
id
)
{
private
Object
getDBVersion
(
VersionCheck
versionCheck
,
Object
service
,
Object
id
)
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
Timestamp
dbVersion
=
null
;
Timestamp
dbVersion
=
null
;
String
versionField
=
versionCheck
.
versionfield
();
String
versionField
=
versionCheck
.
versionfield
();
if
(!
ObjectUtils
.
isEmpty
(
service
)){
if
(!
ObjectUtils
.
isEmpty
(
service
))
{
EvaluationContext
oldContext
=
new
StandardEvaluationContext
();
EvaluationContext
oldContext
=
new
StandardEvaluationContext
();
oldContext
.
setVariable
(
"service"
,
service
);
oldContext
.
setVariable
(
"service"
,
service
);
oldContext
.
setVariable
(
"id"
,
id
);
oldContext
.
setVariable
(
"id"
,
id
);
Expression
oldExp
=
parser
.
parseExpression
(
"#service.get(#id)"
);
Expression
oldExp
=
parser
.
parseExpression
(
"#service.get(#id)"
);
EntityBase
oldEntity
=
oldExp
.
getValue
(
oldContext
,
EntityBase
.
class
);
EntityBase
oldEntity
=
oldExp
.
getValue
(
oldContext
,
EntityBase
.
class
);
Object
oldDate
=
oldEntity
.
get
(
versionField
);
Object
oldDate
=
oldEntity
.
get
(
versionField
);
if
(
oldDate
!=
null
&&
oldDate
instanceof
Timestamp
){
if
(
oldDate
!=
null
&&
oldDate
instanceof
Timestamp
)
{
Timestamp
db_time
=
(
Timestamp
)
oldDate
;
Timestamp
db_time
=
(
Timestamp
)
oldDate
;
Date
db_date
=
sdf
.
parse
(
sdf
.
format
(
db_time
));
Date
db_date
=
sdf
.
parse
(
sdf
.
format
(
db_time
));
dbVersion
=
new
Timestamp
(
db_date
.
getTime
());
dbVersion
=
new
Timestamp
(
db_date
.
getTime
());
}
}
}
}
return
dbVersion
;
return
dbVersion
;
...
...
ibzwf-util/src/main/java/cn/ibizlab/util/domain/DTOBase.java
浏览文件 @
38f046f6
...
@@ -21,33 +21,39 @@ public class DTOBase implements Serializable {
...
@@ -21,33 +21,39 @@ public class DTOBase implements Serializable {
public
void
modify
(
String
field
,
Object
val
)
{
public
void
modify
(
String
field
,
Object
val
)
{
if
(
val
==
null
)
if
(
val
==
null
)
{
this
.
getFocusNull
(
true
).
add
(
field
.
toLowerCase
());
this
.
getFocusNull
(
true
).
add
(
field
.
toLowerCase
());
else
}
else
{
this
.
getFocusNull
(
true
).
remove
(
field
.
toLowerCase
());
this
.
getFocusNull
(
true
).
remove
(
field
.
toLowerCase
());
}
}
}
public
Set
<
String
>
getFocusNull
()
{
public
Set
<
String
>
getFocusNull
()
{
if
(
focusNull
==
null
)
if
(
focusNull
==
null
)
{
focusNull
=
new
HashSet
<>();
focusNull
=
new
HashSet
<>();
}
if
(
focusNull
.
size
()>
0
&&
extensionparams
.
containsKey
(
"dirtyflagenable"
))
if
(
focusNull
.
size
()>
0
&&
extensionparams
.
containsKey
(
"dirtyflagenable"
))
{
{
Set
<
String
>
nocheck
=
new
HashSet
<>();
Set
<
String
>
nocheck
=
new
HashSet
<>();
for
(
String
key:
focusNull
)
for
(
String
key:
focusNull
)
{
{
if
(!
extensionparams
.
containsKey
(
key
+
"dirtyflag"
))
if
(!
extensionparams
.
containsKey
(
key
+
"dirtyflag"
))
{
nocheck
.
add
(
key
);
nocheck
.
add
(
key
);
}
}
for
(
String
key:
nocheck
)
}
for
(
String
key:
nocheck
)
{
focusNull
.
remove
(
key
);
focusNull
.
remove
(
key
);
}
}
}
return
focusNull
;
return
focusNull
;
}
}
private
Set
<
String
>
getFocusNull
(
boolean
newflag
)
{
private
Set
<
String
>
getFocusNull
(
boolean
newflag
)
{
if
(
focusNull
==
null
)
if
(
focusNull
==
null
)
{
focusNull
=
new
HashSet
<>();
focusNull
=
new
HashSet
<>();
}
return
focusNull
;
return
focusNull
;
}
}
...
...
ibzwf-util/src/main/java/cn/ibizlab/util/domain/EntityBase.java
浏览文件 @
38f046f6
...
@@ -24,8 +24,9 @@ public class EntityBase implements Serializable {
...
@@ -24,8 +24,9 @@ public class EntityBase implements Serializable {
private
Set
<
String
>
focusNull
;
private
Set
<
String
>
focusNull
;
public
Set
<
String
>
getFocusNull
()
{
public
Set
<
String
>
getFocusNull
()
{
if
(
focusNull
==
null
)
if
(
focusNull
==
null
)
{
focusNull
=
new
HashSet
<>();
focusNull
=
new
HashSet
<>();
}
return
focusNull
;
return
focusNull
;
}
}
...
@@ -50,8 +51,9 @@ public class EntityBase implements Serializable {
...
@@ -50,8 +51,9 @@ public class EntityBase implements Serializable {
private
BeanMap
getMap
()
private
BeanMap
getMap
()
{
{
if
(
map
==
null
)
if
(
map
==
null
)
{
map
=
BeanMap
.
create
(
this
);
map
=
BeanMap
.
create
(
this
);
}
return
map
;
return
map
;
}
}
...
@@ -68,16 +70,15 @@ public class EntityBase implements Serializable {
...
@@ -68,16 +70,15 @@ public class EntityBase implements Serializable {
this
.
extensionparams
=
extensionparams
;
this
.
extensionparams
=
extensionparams
;
}
}
public
Object
get
(
String
field
)
{
public
Object
get
(
String
field
)
{
String
fieldRealName
=
DEFieldCacheMap
.
getFieldRealName
(
this
.
getClass
(),
field
);
String
fieldRealName
=
DEFieldCacheMap
.
getFieldRealName
(
this
.
getClass
(),
field
);
if
(!
StringUtils
.
isEmpty
(
fieldRealName
))
if
(!
StringUtils
.
isEmpty
(
fieldRealName
))
{
return
getMap
().
get
(
fieldRealName
);
return
getMap
().
get
(
fieldRealName
);
else
}
else
{
return
this
.
extensionparams
.
get
(
field
.
toLowerCase
());
return
this
.
extensionparams
.
get
(
field
.
toLowerCase
());
}
}
}
@JsonAnyGetter
@JsonAnyGetter
public
Map
<
String
,
Object
>
any
()
{
public
Map
<
String
,
Object
>
any
()
{
...
@@ -89,14 +90,17 @@ public class EntityBase implements Serializable {
...
@@ -89,14 +90,17 @@ public class EntityBase implements Serializable {
field
=
field
.
toLowerCase
();
field
=
field
.
toLowerCase
();
String
fieldRealName
=
DEFieldCacheMap
.
getFieldRealName
(
this
.
getClass
(),
field
);
String
fieldRealName
=
DEFieldCacheMap
.
getFieldRealName
(
this
.
getClass
(),
field
);
if
(!
StringUtils
.
isEmpty
(
fieldRealName
))
{
if
(!
StringUtils
.
isEmpty
(
fieldRealName
))
{
if
(
value
==
null
)
if
(
value
==
null
)
{
getMap
().
put
(
fieldRealName
,
null
);
getMap
().
put
(
fieldRealName
,
null
);
else
}
else
{
getMap
().
put
(
fieldRealName
,
DEFieldCacheMap
.
fieldValueOf
(
this
.
getClass
(),
fieldRealName
,
value
));
getMap
().
put
(
fieldRealName
,
DEFieldCacheMap
.
fieldValueOf
(
this
.
getClass
(),
fieldRealName
,
value
));
}
}
else
}
else
{
this
.
extensionparams
.
put
(
field
.
toLowerCase
(),
value
);
this
.
extensionparams
.
put
(
field
.
toLowerCase
(),
value
);
}
}
}
/**
/**
* 复制当前对象数据到目标对象
* 复制当前对象数据到目标对象
...
...
ibzwf-util/src/main/java/cn/ibizlab/util/domain/EntityMP.java
浏览文件 @
38f046f6
...
@@ -5,25 +5,26 @@ import org.springframework.util.StringUtils;
...
@@ -5,25 +5,26 @@ import org.springframework.util.StringUtils;
public
class
EntityMP
extends
EntityBase
{
public
class
EntityMP
extends
EntityBase
{
public
UpdateWrapper
getUpdateWrapper
(
boolean
clean
)
{
public
UpdateWrapper
getUpdateWrapper
(
boolean
clean
)
{
UpdateWrapper
wrapper
=
new
UpdateWrapper
();
UpdateWrapper
wrapper
=
new
UpdateWrapper
();
for
(
String
nullField:
getFocusNull
())
{
for
(
String
nullField:
getFocusNull
())
{
wrapper
.
set
(
nullField
,
null
);
wrapper
.
set
(
nullField
,
null
);
}
}
if
(
clean
)
if
(
clean
)
{
getFocusNull
().
clear
();
getFocusNull
().
clear
();
}
return
wrapper
;
return
wrapper
;
}
}
@Override
@Override
public
void
modify
(
String
field
,
Object
val
)
{
public
void
modify
(
String
field
,
Object
val
)
{
if
(
val
==
null
)
if
(
val
==
null
)
{
this
.
getFocusNull
().
add
(
field
.
toLowerCase
());
this
.
getFocusNull
().
add
(
field
.
toLowerCase
());
else
}
else
{
this
.
getFocusNull
().
remove
(
field
.
toLowerCase
());
this
.
getFocusNull
().
remove
(
field
.
toLowerCase
());
}
}
}
@Override
@Override
public
void
reset
(
String
field
){
public
void
reset
(
String
field
){
...
@@ -33,6 +34,5 @@ public class EntityMP extends EntityBase {
...
@@ -33,6 +34,5 @@ public class EntityMP extends EntityBase {
getFocusNull
().
remove
(
resetField
);
getFocusNull
().
remove
(
resetField
);
}
}
}
}
}
}
ibzwf-util/src/main/java/cn/ibizlab/util/domain/EntityMongo.java
浏览文件 @
38f046f6
...
@@ -2,7 +2,5 @@ package cn.ibizlab.util.domain;
...
@@ -2,7 +2,5 @@ package cn.ibizlab.util.domain;
public
class
EntityMongo
extends
EntityBase
{
public
class
EntityMongo
extends
EntityBase
{
}
}
ibzwf-util/src/main/java/cn/ibizlab/util/filter/QueryBuildContext.java
浏览文件 @
38f046f6
...
@@ -44,9 +44,9 @@ public class QueryBuildContext extends SearchContextBase implements ISearchConte
...
@@ -44,9 +44,9 @@ public class QueryBuildContext extends SearchContextBase implements ISearchConte
*/
*/
private
QueryBuilder
parseQueryFilter
(
QueryFilter
queryFilter
){
private
QueryBuilder
parseQueryFilter
(
QueryFilter
queryFilter
){
if
(
ObjectUtils
.
isEmpty
(
queryFilter
.
get
$and
())
&&
ObjectUtils
.
isEmpty
(
queryFilter
.
get
$or
())
&&
ObjectUtils
.
isEmpty
(
queryFilter
.
any
()))
if
(
ObjectUtils
.
isEmpty
(
queryFilter
.
get
$and
())
&&
ObjectUtils
.
isEmpty
(
queryFilter
.
get
$or
())
&&
ObjectUtils
.
isEmpty
(
queryFilter
.
any
()))
{
return
null
;
return
null
;
}
QueryBuilder
rsBuilder
=
QueryBuilder
.
start
();
QueryBuilder
rsBuilder
=
QueryBuilder
.
start
();
QueryBuilder
fieldBuilder
=
parseFieldMap
(
queryFilter
.
any
());
QueryBuilder
fieldBuilder
=
parseFieldMap
(
queryFilter
.
any
());
QueryBuilder
orBuilder
=
parseOrQueryFilter
(
queryFilter
.
get
$or
());
QueryBuilder
orBuilder
=
parseOrQueryFilter
(
queryFilter
.
get
$or
());
...
@@ -107,8 +107,9 @@ public class QueryBuildContext extends SearchContextBase implements ISearchConte
...
@@ -107,8 +107,9 @@ public class QueryBuildContext extends SearchContextBase implements ISearchConte
* @return
* @return
*/
*/
private
QueryBuilder
parseFieldMap
(
Map
<
String
,
QueryFilter
.
SegmentCond
>
fieldMap
)
{
private
QueryBuilder
parseFieldMap
(
Map
<
String
,
QueryFilter
.
SegmentCond
>
fieldMap
)
{
if
(
fieldMap
.
size
()==
0
)
if
(
fieldMap
.
size
()==
0
)
{
return
null
;
return
null
;
}
QueryBuilder
fieldBuilders
=
QueryBuilder
.
start
();
QueryBuilder
fieldBuilders
=
QueryBuilder
.
start
();
for
(
Map
.
Entry
<
String
,
QueryFilter
.
SegmentCond
>
entry:
fieldMap
.
entrySet
()){
for
(
Map
.
Entry
<
String
,
QueryFilter
.
SegmentCond
>
entry:
fieldMap
.
entrySet
()){
getSegmentCondSql
(
entry
.
getKey
(),
entry
.
getValue
(),
fieldBuilders
);
getSegmentCondSql
(
entry
.
getKey
(),
entry
.
getValue
(),
fieldBuilders
);
...
...
ibzwf-util/src/main/java/cn/ibizlab/util/filter/QueryFilter.java
浏览文件 @
38f046f6
...
@@ -63,8 +63,9 @@ public class QueryFilter {
...
@@ -63,8 +63,9 @@ public class QueryFilter {
private
Map
<
String
,
SegmentCond
>
getMap
()
private
Map
<
String
,
SegmentCond
>
getMap
()
{
{
if
(
map
==
null
)
if
(
map
==
null
)
{
map
=
new
LinkedHashMap
<>();
map
=
new
LinkedHashMap
<>();
}
return
map
;
return
map
;
}
}
...
@@ -132,11 +133,12 @@ public class QueryFilter {
...
@@ -132,11 +133,12 @@ public class QueryFilter {
}
}
private
QueryFilter
op
(
String
column
,
SegmentCond
segmentCond
)
{
private
QueryFilter
op
(
String
column
,
SegmentCond
segmentCond
)
{
if
(
this
.
getMap
().
containsKey
(
column
))
{
if
(
this
.
getMap
().
containsKey
(
column
))
((
SegmentCond
)
this
.
getMap
().
get
(
column
)).
getMap
().
putAll
(
segmentCond
.
getMap
());
((
SegmentCond
)
this
.
getMap
().
get
(
column
)).
getMap
().
putAll
(
segmentCond
.
getMap
());
else
}
else
{
this
.
getMap
().
put
(
column
,
segmentCond
);
this
.
getMap
().
put
(
column
,
segmentCond
);
}
return
this
;
return
this
;
}
}
...
@@ -155,8 +157,9 @@ public class QueryFilter {
...
@@ -155,8 +157,9 @@ public class QueryFilter {
private
Map
<
String
,
Object
>
getMap
()
private
Map
<
String
,
Object
>
getMap
()
{
{
if
(
map
==
null
)
if
(
map
==
null
)
{
map
=
new
LinkedHashMap
<>();
map
=
new
LinkedHashMap
<>();
}
return
map
;
return
map
;
}
}
...
...
ibzwf-util/src/main/java/cn/ibizlab/util/filter/QueryWrapperContext.java
浏览文件 @
38f046f6
...
@@ -37,17 +37,20 @@ public class QueryWrapperContext<T> extends SearchContextBase implements ISearch
...
@@ -37,17 +37,20 @@ public class QueryWrapperContext<T> extends SearchContextBase implements ISearch
int
pageSize
=
getPageable
().
getPageSize
();
int
pageSize
=
getPageable
().
getPageSize
();
//构造mybatis-plus分页
//构造mybatis-plus分页
if
(
StringUtils
.
isEmpty
(
currentPage
)
||
StringUtils
.
isEmpty
(
pageSize
))
if
(
StringUtils
.
isEmpty
(
currentPage
)
||
StringUtils
.
isEmpty
(
pageSize
))
{
page
=
new
Page
(
1
,
Short
.
MAX_VALUE
);
page
=
new
Page
(
1
,
Short
.
MAX_VALUE
);
else
}
else
{
page
=
new
Page
(
currentPage
+
1
,
pageSize
);
page
=
new
Page
(
currentPage
+
1
,
pageSize
);
}
//构造mybatis-plus排序
//构造mybatis-plus排序
Sort
sort
=
getPageable
().
getSort
();
Sort
sort
=
getPageable
().
getSort
();
Iterator
<
Sort
.
Order
>
it_sort
=
sort
.
iterator
();
Iterator
<
Sort
.
Order
>
it_sort
=
sort
.
iterator
();
if
(
ObjectUtils
.
isEmpty
(
it_sort
))
if
(
ObjectUtils
.
isEmpty
(
it_sort
))
{
return
page
;
return
page
;
}
ParameterizedType
parameterizedType
=
(
ParameterizedType
)
getClass
().
getGenericSuperclass
();
ParameterizedType
parameterizedType
=
(
ParameterizedType
)
getClass
().
getGenericSuperclass
();
Class
<
T
>
type
=
(
Class
<
T
>)
parameterizedType
.
getActualTypeArguments
()[
0
];
Class
<
T
>
type
=
(
Class
<
T
>)
parameterizedType
.
getActualTypeArguments
()[
0
];
...
@@ -95,9 +98,9 @@ public class QueryWrapperContext<T> extends SearchContextBase implements ISearch
...
@@ -95,9 +98,9 @@ public class QueryWrapperContext<T> extends SearchContextBase implements ISearch
* @return
* @return
*/
*/
private
Consumer
<
QueryWrapper
<
T
>>
parseQueryFilter
(
QueryFilter
queryFilter
){
private
Consumer
<
QueryWrapper
<
T
>>
parseQueryFilter
(
QueryFilter
queryFilter
){
if
(
queryFilter
.
any
().
size
()==
0
&&
queryFilter
.
get
$or
()==
null
&&
queryFilter
.
get
$and
()==
null
)
{
if
(
queryFilter
.
any
().
size
()==
0
&&
queryFilter
.
get
$or
()==
null
&&
queryFilter
.
get
$and
()==
null
)
return
null
;
return
null
;
}
Consumer
<
QueryWrapper
<
T
>>
consumer
=
queryWrapper
->
{
Consumer
<
QueryWrapper
<
T
>>
consumer
=
queryWrapper
->
{
Consumer
fieldConsumer
=
parseFieldMap
(
queryFilter
.
any
());
Consumer
fieldConsumer
=
parseFieldMap
(
queryFilter
.
any
());
Consumer
orConsumer
=
parseOrQueryFilter
(
queryFilter
.
get
$or
());
Consumer
orConsumer
=
parseOrQueryFilter
(
queryFilter
.
get
$or
());
...
@@ -121,7 +124,6 @@ public class QueryWrapperContext<T> extends SearchContextBase implements ISearch
...
@@ -121,7 +124,6 @@ public class QueryWrapperContext<T> extends SearchContextBase implements ISearch
* @return
* @return
*/
*/
private
Consumer
<
QueryWrapper
<
T
>>
parseOrQueryFilter
(
List
<
QueryFilter
>
queryFilters
)
{
private
Consumer
<
QueryWrapper
<
T
>>
parseOrQueryFilter
(
List
<
QueryFilter
>
queryFilters
)
{
if
(
queryFilters
==
null
||
queryFilters
.
size
()==
0
)
if
(
queryFilters
==
null
||
queryFilters
.
size
()==
0
)
return
null
;
return
null
;
Consumer
<
QueryWrapper
<
T
>>
consumer
=
queryWrapper
->
{
Consumer
<
QueryWrapper
<
T
>>
consumer
=
queryWrapper
->
{
...
@@ -139,9 +141,9 @@ public class QueryWrapperContext<T> extends SearchContextBase implements ISearch
...
@@ -139,9 +141,9 @@ public class QueryWrapperContext<T> extends SearchContextBase implements ISearch
* @return
* @return
*/
*/
private
Consumer
<
QueryWrapper
<
T
>>
parseAndQueryFilter
(
List
<
QueryFilter
>
queryFilters
)
{
private
Consumer
<
QueryWrapper
<
T
>>
parseAndQueryFilter
(
List
<
QueryFilter
>
queryFilters
)
{
if
(
queryFilters
==
null
||
queryFilters
.
size
()==
0
)
{
if
(
queryFilters
==
null
||
queryFilters
.
size
()==
0
)
return
null
;
return
null
;
}
Consumer
<
QueryWrapper
<
T
>>
consumer
=
queryWrapper
->
{
Consumer
<
QueryWrapper
<
T
>>
consumer
=
queryWrapper
->
{
for
(
QueryFilter
queryFilter:
queryFilters
){
for
(
QueryFilter
queryFilter:
queryFilters
){
Consumer
tempQueryWrapper
=
parseQueryFilter
(
queryFilter
);
Consumer
tempQueryWrapper
=
parseQueryFilter
(
queryFilter
);
...
@@ -157,9 +159,9 @@ public class QueryWrapperContext<T> extends SearchContextBase implements ISearch
...
@@ -157,9 +159,9 @@ public class QueryWrapperContext<T> extends SearchContextBase implements ISearch
* @return
* @return
*/
*/
private
Consumer
<
QueryWrapper
<
T
>>
parseFieldMap
(
Map
<
String
,
QueryFilter
.
SegmentCond
>
fieldMap
)
{
private
Consumer
<
QueryWrapper
<
T
>>
parseFieldMap
(
Map
<
String
,
QueryFilter
.
SegmentCond
>
fieldMap
)
{
if
(
fieldMap
.
size
()==
0
)
{
if
(
fieldMap
.
size
()==
0
)
return
null
;
return
null
;
}
Consumer
<
QueryWrapper
<
T
>>
consumer
=
queryWrapper
->
{
Consumer
<
QueryWrapper
<
T
>>
consumer
=
queryWrapper
->
{
for
(
Map
.
Entry
<
String
,
QueryFilter
.
SegmentCond
>
field:
fieldMap
.
entrySet
()){
for
(
Map
.
Entry
<
String
,
QueryFilter
.
SegmentCond
>
field:
fieldMap
.
entrySet
()){
String
fieldName
=
field
.
getKey
();
String
fieldName
=
field
.
getKey
();
...
...
ibzwf-util/src/main/java/cn/ibizlab/util/filter/SearchContextBase.java
浏览文件 @
38f046f6
...
@@ -98,11 +98,13 @@ public class SearchContextBase implements ISearchContext{
...
@@ -98,11 +98,13 @@ public class SearchContextBase implements ISearchContext{
* @return
* @return
*/
*/
public
Pageable
getPageable
()
{
public
Pageable
getPageable
()
{
if
(
ObjectUtils
.
isEmpty
(
pageSort
))
if
(
ObjectUtils
.
isEmpty
(
pageSort
))
{
return
PageRequest
.
of
(
page
,
size
);
return
PageRequest
.
of
(
page
,
size
);
else
}
else
{
return
PageRequest
.
of
(
page
,
size
,
pageSort
);
return
PageRequest
.
of
(
page
,
size
,
pageSort
);
}
}
}
/**
/**
* 设置排序值
* 设置排序值
...
...
ibzwf-util/src/main/java/cn/ibizlab/util/helper/CachedBeanCopier.java
浏览文件 @
38f046f6
...
@@ -13,8 +13,9 @@ public class CachedBeanCopier {
...
@@ -13,8 +13,9 @@ public class CachedBeanCopier {
}
}
public
static
void
copy
(
Object
srcObj
,
Object
destObj
,
boolean
useConverter
)
{
public
static
void
copy
(
Object
srcObj
,
Object
destObj
,
boolean
useConverter
)
{
if
(
srcObj
==
null
||
destObj
==
null
)
if
(
srcObj
==
null
||
destObj
==
null
)
{
return
;
return
;
}
getCopier
(
srcObj
,
destObj
,
useConverter
).
copy
(
srcObj
,
destObj
,
null
);
getCopier
(
srcObj
,
destObj
,
useConverter
).
copy
(
srcObj
,
destObj
,
null
);
}
}
...
@@ -29,6 +30,4 @@ public class CachedBeanCopier {
...
@@ -29,6 +30,4 @@ public class CachedBeanCopier {
}
}
return
copier
;
return
copier
;
}
}
}
}
ibzwf-util/src/main/java/cn/ibizlab/util/helper/DEFieldCacheMap.java
浏览文件 @
38f046f6
...
@@ -36,13 +36,16 @@ public class DEFieldCacheMap {
...
@@ -36,13 +36,16 @@ public class DEFieldCacheMap {
*/
*/
public
static
<
T
>
Hashtable
<
String
,
Field
>
getFieldMap
(
Class
<
T
>
clazz
)
{
public
static
<
T
>
Hashtable
<
String
,
Field
>
getFieldMap
(
Class
<
T
>
clazz
)
{
String
className
=
clazz
.
getName
();
String
className
=
clazz
.
getName
();
if
(
className
.
indexOf
(
"_$"
)>
0
)
if
(
className
.
indexOf
(
"_$"
)>
0
)
{
className
=
className
.
substring
(
0
,
className
.
lastIndexOf
(
"_$"
));
className
=
className
.
substring
(
0
,
className
.
lastIndexOf
(
"_$"
));
if
(
cacheMap
.
containsKey
(
className
))
}
if
(
cacheMap
.
containsKey
(
className
))
{
return
cacheMap
.
get
(
className
);
return
cacheMap
.
get
(
className
);
}
synchronized
(
objLock1
)
{
synchronized
(
objLock1
)
{
if
(
cacheMap
.
containsKey
(
className
))
if
(
cacheMap
.
containsKey
(
className
))
{
return
cacheMap
.
get
(
className
);
return
cacheMap
.
get
(
className
);
}
Hashtable
<
String
,
Field
>
result
=
new
Hashtable
<
String
,
Field
>();
Hashtable
<
String
,
Field
>
result
=
new
Hashtable
<
String
,
Field
>();
List
<
Field
>
list
=
new
ArrayList
<
Field
>();
List
<
Field
>
list
=
new
ArrayList
<
Field
>();
Hashtable
<
String
,
String
>
keys
=
new
Hashtable
<
String
,
String
>();
Hashtable
<
String
,
String
>
keys
=
new
Hashtable
<
String
,
String
>();
...
@@ -58,9 +61,10 @@ public class DEFieldCacheMap {
...
@@ -58,9 +61,10 @@ public class DEFieldCacheMap {
Audit
auditField
=
field
.
getAnnotation
(
Audit
.
class
);
Audit
auditField
=
field
.
getAnnotation
(
Audit
.
class
);
if
(!
ObjectUtils
.
isEmpty
(
deField
))
{
if
(!
ObjectUtils
.
isEmpty
(
deField
))
{
defields
.
put
(
field
.
getName
(),
deField
);
defields
.
put
(
field
.
getName
(),
deField
);
if
(
deField
.
isKeyField
())
if
(
deField
.
isKeyField
())
{
cacheDEKeyField
.
put
(
className
,
field
.
getName
());
cacheDEKeyField
.
put
(
className
,
field
.
getName
());
}
}
}
if
(!
ObjectUtils
.
isEmpty
(
auditField
))
{
if
(!
ObjectUtils
.
isEmpty
(
auditField
))
{
auditfields
.
put
(
field
.
getName
(),
auditField
);
auditfields
.
put
(
field
.
getName
(),
auditField
);
}
}
...
@@ -74,10 +78,12 @@ public class DEFieldCacheMap {
...
@@ -74,10 +78,12 @@ public class DEFieldCacheMap {
}
}
}
}
public
static
Hashtable
<
String
,
Field
>
getFieldMap
(
String
className
)
{
public
static
Hashtable
<
String
,
Field
>
getFieldMap
(
String
className
)
{
if
(
className
.
indexOf
(
"_$"
)>
0
)
if
(
className
.
indexOf
(
"_$"
)>
0
)
{
className
=
className
.
substring
(
0
,
className
.
lastIndexOf
(
"_$"
));
className
=
className
.
substring
(
0
,
className
.
lastIndexOf
(
"_$"
));
if
(
cacheMap
.
containsKey
(
className
))
}
if
(
cacheMap
.
containsKey
(
className
))
{
return
cacheMap
.
get
(
className
);
return
cacheMap
.
get
(
className
);
}
Class
clazz
=
null
;
Class
clazz
=
null
;
try
{
try
{
clazz
=
Class
.
forName
(
className
);
clazz
=
Class
.
forName
(
className
);
...
@@ -96,10 +102,12 @@ public class DEFieldCacheMap {
...
@@ -96,10 +102,12 @@ public class DEFieldCacheMap {
*/
*/
public
static
<
T
>
Hashtable
<
String
,
DEField
>
getDEFields
(
Class
<
T
>
clazz
)
{
public
static
<
T
>
Hashtable
<
String
,
DEField
>
getDEFields
(
Class
<
T
>
clazz
)
{
String
className
=
clazz
.
getName
();
String
className
=
clazz
.
getName
();
if
(
className
.
indexOf
(
"_$"
)>
0
)
if
(
className
.
indexOf
(
"_$"
)>
0
)
{
className
=
className
.
substring
(
0
,
className
.
lastIndexOf
(
"_$"
));
className
=
className
.
substring
(
0
,
className
.
lastIndexOf
(
"_$"
));
if
(
cacheDEField
.
containsKey
(
className
))
}
if
(
cacheDEField
.
containsKey
(
className
))
{
return
cacheDEField
.
get
(
className
);
return
cacheDEField
.
get
(
className
);
}
else
{
else
{
DEFieldCacheMap
.
getFieldMap
(
className
);
DEFieldCacheMap
.
getFieldMap
(
className
);
return
cacheDEField
.
get
(
className
);
return
cacheDEField
.
get
(
className
);
...
@@ -113,10 +121,12 @@ public class DEFieldCacheMap {
...
@@ -113,10 +121,12 @@ public class DEFieldCacheMap {
*/
*/
public
static
<
T
>
Hashtable
<
String
,
Audit
>
getAuditFields
(
Class
<
T
>
clazz
)
{
public
static
<
T
>
Hashtable
<
String
,
Audit
>
getAuditFields
(
Class
<
T
>
clazz
)
{
String
className
=
clazz
.
getName
();
String
className
=
clazz
.
getName
();
if
(
className
.
indexOf
(
"_$"
)>
0
)
if
(
className
.
indexOf
(
"_$"
)>
0
)
{
className
=
className
.
substring
(
0
,
className
.
lastIndexOf
(
"_$"
));
className
=
className
.
substring
(
0
,
className
.
lastIndexOf
(
"_$"
));
if
(
cacheAuditField
.
containsKey
(
className
))
}
if
(
cacheAuditField
.
containsKey
(
className
))
{
return
cacheAuditField
.
get
(
className
);
return
cacheAuditField
.
get
(
className
);
}
else
{
else
{
DEFieldCacheMap
.
getFieldMap
(
className
);
DEFieldCacheMap
.
getFieldMap
(
className
);
return
cacheAuditField
.
get
(
className
);
return
cacheAuditField
.
get
(
className
);
...
@@ -130,10 +140,12 @@ public class DEFieldCacheMap {
...
@@ -130,10 +140,12 @@ public class DEFieldCacheMap {
*/
*/
public
static
<
T
>
String
getDEKeyField
(
Class
<
T
>
clazz
)
{
public
static
<
T
>
String
getDEKeyField
(
Class
<
T
>
clazz
)
{
String
className
=
clazz
.
getName
();
String
className
=
clazz
.
getName
();
if
(
className
.
indexOf
(
"_$"
)>
0
)
if
(
className
.
indexOf
(
"_$"
)>
0
)
{
className
=
className
.
substring
(
0
,
className
.
lastIndexOf
(
"_$"
));
className
=
className
.
substring
(
0
,
className
.
lastIndexOf
(
"_$"
));
if
(
cacheDEKeyField
.
containsKey
(
className
))
}
if
(
cacheDEKeyField
.
containsKey
(
className
))
{
return
cacheDEKeyField
.
get
(
className
);
return
cacheDEKeyField
.
get
(
className
);
}
else
{
else
{
DEFieldCacheMap
.
getFieldMap
(
className
);
DEFieldCacheMap
.
getFieldMap
(
className
);
return
cacheDEKeyField
.
get
(
className
);
return
cacheDEKeyField
.
get
(
className
);
...
@@ -148,10 +160,12 @@ public class DEFieldCacheMap {
...
@@ -148,10 +160,12 @@ public class DEFieldCacheMap {
*/
*/
public
static
<
T
>
List
<
Field
>
getFields
(
Class
<
T
>
clazz
)
{
public
static
<
T
>
List
<
Field
>
getFields
(
Class
<
T
>
clazz
)
{
String
className
=
clazz
.
getName
();
String
className
=
clazz
.
getName
();
if
(
className
.
indexOf
(
"_$"
)>
0
)
if
(
className
.
indexOf
(
"_$"
)>
0
)
{
className
=
className
.
substring
(
0
,
className
.
lastIndexOf
(
"_$"
));
className
=
className
.
substring
(
0
,
className
.
lastIndexOf
(
"_$"
));
if
(
cacheList
.
containsKey
(
className
))
}
if
(
cacheList
.
containsKey
(
className
))
{
return
cacheList
.
get
(
className
);
return
cacheList
.
get
(
className
);
}
else
{
else
{
DEFieldCacheMap
.
getFieldMap
(
className
);
DEFieldCacheMap
.
getFieldMap
(
className
);
return
cacheList
.
get
(
className
);
return
cacheList
.
get
(
className
);
...
@@ -159,10 +173,12 @@ public class DEFieldCacheMap {
...
@@ -159,10 +173,12 @@ public class DEFieldCacheMap {
}
}
public
static
List
<
Field
>
getFields
(
String
className
)
{
public
static
List
<
Field
>
getFields
(
String
className
)
{
if
(
className
.
indexOf
(
"_$"
)>
0
)
if
(
className
.
indexOf
(
"_$"
)>
0
)
{
className
=
className
.
substring
(
0
,
className
.
lastIndexOf
(
"_$"
));
className
=
className
.
substring
(
0
,
className
.
lastIndexOf
(
"_$"
));
if
(
cacheList
.
containsKey
(
className
))
}
if
(
cacheList
.
containsKey
(
className
))
{
return
cacheList
.
get
(
className
);
return
cacheList
.
get
(
className
);
}
else
{
else
{
DEFieldCacheMap
.
getFieldMap
(
className
);
DEFieldCacheMap
.
getFieldMap
(
className
);
return
cacheList
.
get
(
className
);
return
cacheList
.
get
(
className
);
...
@@ -176,10 +192,12 @@ public class DEFieldCacheMap {
...
@@ -176,10 +192,12 @@ public class DEFieldCacheMap {
*/
*/
public
static
<
T
>
Hashtable
<
String
,
String
>
getFieldKeys
(
Class
<
T
>
clazz
)
{
public
static
<
T
>
Hashtable
<
String
,
String
>
getFieldKeys
(
Class
<
T
>
clazz
)
{
String
className
=
clazz
.
getName
();
String
className
=
clazz
.
getName
();
if
(
className
.
indexOf
(
"_$"
)>
0
)
if
(
className
.
indexOf
(
"_$"
)>
0
)
{
className
=
className
.
substring
(
0
,
className
.
lastIndexOf
(
"_$"
));
className
=
className
.
substring
(
0
,
className
.
lastIndexOf
(
"_$"
));
if
(
cacheKey
.
containsKey
(
className
))
}
if
(
cacheKey
.
containsKey
(
className
))
{
return
cacheKey
.
get
(
className
);
return
cacheKey
.
get
(
className
);
}
else
{
else
{
DEFieldCacheMap
.
getFieldMap
(
className
);
DEFieldCacheMap
.
getFieldMap
(
className
);
return
cacheKey
.
get
(
className
);
return
cacheKey
.
get
(
className
);
...
@@ -189,21 +207,26 @@ public class DEFieldCacheMap {
...
@@ -189,21 +207,26 @@ public class DEFieldCacheMap {
public
static
<
T
>
String
getFieldRealName
(
Class
<
T
>
clazz
,
String
fieldname
)
{
public
static
<
T
>
String
getFieldRealName
(
Class
<
T
>
clazz
,
String
fieldname
)
{
fieldname
=
fieldname
.
toLowerCase
();
fieldname
=
fieldname
.
toLowerCase
();
Hashtable
<
String
,
String
>
keys
=
DEFieldCacheMap
.
getFieldKeys
(
clazz
);
Hashtable
<
String
,
String
>
keys
=
DEFieldCacheMap
.
getFieldKeys
(
clazz
);
if
(
keys
.
containsKey
(
fieldname
))
if
(
keys
.
containsKey
(
fieldname
))
{
return
keys
.
get
(
fieldname
);
return
keys
.
get
(
fieldname
);
else
if
(
keys
.
containsKey
(
fieldname
.
replace
(
"_"
,
""
)))
}
else
if
(
keys
.
containsKey
(
fieldname
.
replace
(
"_"
,
""
)))
{
return
keys
.
get
(
fieldname
.
replace
(
"_"
,
""
));
return
keys
.
get
(
fieldname
.
replace
(
"_"
,
""
));
else
}
else
{
return
""
;
return
""
;
}
}
}
public
static
<
T
>
Field
getField
(
Class
<
T
>
clazz
,
String
fieldname
)
{
public
static
<
T
>
Field
getField
(
Class
<
T
>
clazz
,
String
fieldname
)
{
String
fieldRealName
=
DEFieldCacheMap
.
getFieldRealName
(
clazz
,
fieldname
);
String
fieldRealName
=
DEFieldCacheMap
.
getFieldRealName
(
clazz
,
fieldname
);
if
(!
StringUtils
.
isEmpty
(
fieldRealName
))
if
(!
StringUtils
.
isEmpty
(
fieldRealName
))
{
return
DEFieldCacheMap
.
getFieldMap
(
clazz
).
get
(
fieldRealName
);
return
DEFieldCacheMap
.
getFieldMap
(
clazz
).
get
(
fieldRealName
);
else
}
else
{
return
null
;
return
null
;
}
}
}
public
static
<
T
>
String
getFieldColumnName
(
Class
<
T
>
clazz
,
String
fieldname
)
{
public
static
<
T
>
String
getFieldColumnName
(
Class
<
T
>
clazz
,
String
fieldname
)
{
Field
field
=
DEFieldCacheMap
.
getField
(
clazz
,
fieldname
);
Field
field
=
DEFieldCacheMap
.
getField
(
clazz
,
fieldname
);
...
@@ -226,6 +249,4 @@ public class DEFieldCacheMap {
...
@@ -226,6 +249,4 @@ public class DEFieldCacheMap {
}
}
return
resultValue
;
return
resultValue
;
}
}
}
}
\ No newline at end of file
ibzwf-util/src/main/java/cn/ibizlab/util/helper/DataObject.java
浏览文件 @
38f046f6
...
@@ -19,30 +19,34 @@ public class DataObject {
...
@@ -19,30 +19,34 @@ public class DataObject {
final
static
public
DateFormat
dayFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
final
static
public
DateFormat
dayFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
final
static
public
String
getStringValue
(
Object
objValue
,
String
strDefault
)
{
final
static
public
String
getStringValue
(
Object
objValue
,
String
strDefault
)
{
if
(
objValue
==
null
)
return
strDefault
;
if
(
objValue
==
null
)
{
if
(
objValue
instanceof
String
)
return
(
String
)
objValue
;
return
strDefault
;
}
if
(
objValue
instanceof
String
)
{
return
(
String
)
objValue
;
}
if
(
objValue
instanceof
java
.
sql
.
Timestamp
||
objValue
instanceof
java
.
sql
.
Date
||
objValue
instanceof
java
.
util
.
Date
)
{
if
(
objValue
instanceof
java
.
sql
.
Timestamp
||
objValue
instanceof
java
.
sql
.
Date
||
objValue
instanceof
java
.
util
.
Date
)
{
String
rt
=
datetimeFormat
.
format
(
objValue
);
String
rt
=
datetimeFormat
.
format
(
objValue
);
if
(
rt
.
endsWith
(
" 00:00:00"
))
if
(
rt
.
endsWith
(
" 00:00:00"
))
{
rt
=
dayFormat
.
format
(
objValue
);
rt
=
dayFormat
.
format
(
objValue
);
else
if
(
rt
.
endsWith
(
":00"
))
}
else
if
(
rt
.
endsWith
(
":00"
))
{
rt
=
datetimeFormat2
.
format
(
objValue
);
rt
=
datetimeFormat2
.
format
(
objValue
);
}
return
rt
;
return
rt
;
}
}
return
objValue
.
toString
();
return
objValue
.
toString
();
}
}
public
static
<
T
>
Object
objectValueOf
(
Class
<
T
>
type
,
Object
fieldValue
)
{
public
static
<
T
>
Object
objectValueOf
(
Class
<
T
>
type
,
Object
fieldValue
)
{
if
(
fieldValue
==
null
)
if
(
fieldValue
==
null
)
{
return
null
;
return
null
;
}
Object
resultValue
=
fieldValue
;
Object
resultValue
=
fieldValue
;
String
targetType
=
type
.
getSimpleName
();
String
targetType
=
type
.
getSimpleName
();
if
(
targetType
.
equalsIgnoreCase
(
fieldValue
.
getClass
().
getSimpleName
()))
if
(
targetType
.
equalsIgnoreCase
(
fieldValue
.
getClass
().
getSimpleName
()))
{
return
resultValue
;
return
resultValue
;
}
if
(
targetType
.
equals
(
"Boolean"
)){
if
(
targetType
.
equals
(
"Boolean"
)){
resultValue
=
getBooleanValue
(
fieldValue
,
false
);
resultValue
=
getBooleanValue
(
fieldValue
,
false
);
}
}
...
@@ -79,10 +83,9 @@ public class DataObject {
...
@@ -79,10 +83,9 @@ public class DataObject {
else
if
(
targetType
.
equals
(
"String"
))
{
else
if
(
targetType
.
equals
(
"String"
))
{
resultValue
=
getStringValue
(
fieldValue
,
null
);
resultValue
=
getStringValue
(
fieldValue
,
null
);
}
}
if
(
resultValue
==
null
)
{
if
(
resultValue
==
null
)
return
null
;
return
null
;
}
return
resultValue
;
return
resultValue
;
}
}
...
@@ -95,8 +98,9 @@ public class DataObject {
...
@@ -95,8 +98,9 @@ public class DataObject {
if
(
objValue
==
null
)
{
if
(
objValue
==
null
)
{
return
jDefault
;
return
jDefault
;
}
}
if
(
objValue
instanceof
JSONObject
)
if
(
objValue
instanceof
JSONObject
)
{
return
(
JSONObject
)
objValue
;
return
(
JSONObject
)
objValue
;
}
String
strValue
=
objValue
.
toString
();
String
strValue
=
objValue
.
toString
();
try
{
try
{
return
JSONObject
.
parseObject
(
strValue
);
return
JSONObject
.
parseObject
(
strValue
);
...
@@ -111,8 +115,9 @@ public class DataObject {
...
@@ -111,8 +115,9 @@ public class DataObject {
if
(
objValue
==
null
)
{
if
(
objValue
==
null
)
{
return
jDefault
;
return
jDefault
;
}
}
if
(
objValue
instanceof
JSONArray
)
if
(
objValue
instanceof
JSONArray
)
{
return
(
JSONArray
)
objValue
;
return
(
JSONArray
)
objValue
;
}
String
strValue
=
objValue
.
toString
();
String
strValue
=
objValue
.
toString
();
try
{
try
{
return
JSONArray
.
parseArray
(
strValue
);
return
JSONArray
.
parseArray
(
strValue
);
...
@@ -133,9 +138,10 @@ public class DataObject {
...
@@ -133,9 +138,10 @@ public class DataObject {
List
<
String
>
chk1
=
new
ArrayList
<>();
List
<
String
>
chk1
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
arr
.
size
();
i
++)
for
(
int
i
=
0
;
i
<
arr
.
size
();
i
++)
{
{
if
(
arr
.
get
(
i
)
instanceof
String
)
if
(
arr
.
get
(
i
)
instanceof
String
)
{
chk1
.
add
(
arr
.
getString
(
i
));
chk1
.
add
(
arr
.
getString
(
i
));
}
}
}
return
chk1
;
return
chk1
;
}
}
else
else
...
@@ -146,8 +152,9 @@ public class DataObject {
...
@@ -146,8 +152,9 @@ public class DataObject {
}
}
final
static
public
Boolean
getBooleanValue
(
Object
objValue
,
Boolean
bDefault
)
{
final
static
public
Boolean
getBooleanValue
(
Object
objValue
,
Boolean
bDefault
)
{
if
(
objValue
==
null
)
return
bDefault
;
if
(
objValue
==
null
)
{
return
bDefault
;
}
if
(
objValue
instanceof
Boolean
)
{
if
(
objValue
instanceof
Boolean
)
{
return
(
Boolean
)
objValue
;
return
(
Boolean
)
objValue
;
}
}
...
@@ -155,20 +162,24 @@ public class DataObject {
...
@@ -155,20 +162,24 @@ public class DataObject {
}
}
final
static
public
char
[]
getCharacterValue
(
Object
objValue
,
char
[]
cDefault
)
{
final
static
public
char
[]
getCharacterValue
(
Object
objValue
,
char
[]
cDefault
)
{
if
(
objValue
==
null
)
return
cDefault
;
if
(
objValue
==
null
)
{
return
cDefault
;
}
return
objValue
.
toString
().
toCharArray
();
return
objValue
.
toString
().
toCharArray
();
}
}
final
static
public
Double
getDoubleValue
(
Object
objValue
,
Double
dDefault
)
{
final
static
public
Double
getDoubleValue
(
Object
objValue
,
Double
dDefault
)
{
if
(
objValue
==
null
)
return
dDefault
;
if
(
objValue
==
null
)
{
return
dDefault
;
}
if
(
objValue
instanceof
Double
)
{
if
(
objValue
instanceof
Double
)
{
return
(
Double
)
objValue
;
return
(
Double
)
objValue
;
}
}
String
strValue
=
objValue
.
toString
();
String
strValue
=
objValue
.
toString
();
if
(
StringUtils
.
isEmpty
(
strValue
))
return
null
;
if
(
StringUtils
.
isEmpty
(
strValue
))
{
return
null
;
}
strValue
=
strValue
.
replace
(
","
,
""
);
strValue
=
strValue
.
replace
(
","
,
""
);
return
Double
.
parseDouble
(
strValue
);
return
Double
.
parseDouble
(
strValue
);
}
}
...
@@ -179,8 +190,9 @@ public class DataObject {
...
@@ -179,8 +190,9 @@ public class DataObject {
return
nDefault
;
return
nDefault
;
}
}
if
(
objValue
instanceof
Integer
)
if
(
objValue
instanceof
Integer
)
{
return
(
Integer
)
objValue
;
return
(
Integer
)
objValue
;
}
if
(
objValue
instanceof
Double
)
{
if
(
objValue
instanceof
Double
)
{
return
((
Double
)
objValue
).
intValue
();
return
((
Double
)
objValue
).
intValue
();
...
@@ -191,8 +203,9 @@ public class DataObject {
...
@@ -191,8 +203,9 @@ public class DataObject {
}
}
String
strValue
=
objValue
.
toString
();
String
strValue
=
objValue
.
toString
();
if
(
StringUtils
.
isEmpty
(
strValue
))
if
(
StringUtils
.
isEmpty
(
strValue
))
{
return
nDefault
;
return
nDefault
;
}
strValue
=
strValue
.
replace
(
","
,
""
);
strValue
=
strValue
.
replace
(
","
,
""
);
return
Integer
.
parseInt
(
strValue
);
return
Integer
.
parseInt
(
strValue
);
}
}
...
@@ -204,12 +217,13 @@ public class DataObject {
...
@@ -204,12 +217,13 @@ public class DataObject {
}
}
try
{
try
{
if
(
objValue
instanceof
Float
)
if
(
objValue
instanceof
Float
)
{
return
(
Float
)
objValue
;
return
(
Float
)
objValue
;
}
String
strValue
=
objValue
.
toString
();
String
strValue
=
objValue
.
toString
();
if
(
StringUtils
.
isEmpty
(
strValue
))
if
(
StringUtils
.
isEmpty
(
strValue
))
{
return
fDefault
;
return
fDefault
;
}
strValue
=
strValue
.
replace
(
","
,
""
);
strValue
=
strValue
.
replace
(
","
,
""
);
return
Float
.
parseFloat
(
strValue
);
return
Float
.
parseFloat
(
strValue
);
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
...
@@ -233,8 +247,9 @@ public class DataObject {
...
@@ -233,8 +247,9 @@ public class DataObject {
return
BigDecimal
.
valueOf
((
Long
)
objValue
);
return
BigDecimal
.
valueOf
((
Long
)
objValue
);
}
}
String
strValue
=
objValue
.
toString
();
String
strValue
=
objValue
.
toString
();
if
(
StringUtils
.
isEmpty
(
strValue
))
if
(
StringUtils
.
isEmpty
(
strValue
))
{
return
fDefault
;
return
fDefault
;
}
strValue
=
strValue
.
replace
(
","
,
""
);
strValue
=
strValue
.
replace
(
","
,
""
);
return
BigDecimal
.
valueOf
(
Double
.
parseDouble
(
strValue
));
return
BigDecimal
.
valueOf
(
Double
.
parseDouble
(
strValue
));
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
...
@@ -253,9 +268,10 @@ public class DataObject {
...
@@ -253,9 +268,10 @@ public class DataObject {
}
}
else
{
else
{
Long
l
=
getLongValue
(
objValue
,
null
);
Long
l
=
getLongValue
(
objValue
,
null
);
if
(
l
!=
null
)
if
(
l
!=
null
)
{
return
BigInteger
.
valueOf
(
l
);
return
BigInteger
.
valueOf
(
l
);
}
}
}
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
}
}
...
@@ -283,8 +299,9 @@ public class DataObject {
...
@@ -283,8 +299,9 @@ public class DataObject {
}
}
String
strValue
=
objValue
.
toString
();
String
strValue
=
objValue
.
toString
();
if
(
StringUtils
.
isEmpty
(
strValue
))
if
(
StringUtils
.
isEmpty
(
strValue
))
{
return
nDefault
;
return
nDefault
;
}
strValue
=
strValue
.
replace
(
","
,
""
);
strValue
=
strValue
.
replace
(
","
,
""
);
return
Long
.
parseLong
(
strValue
);
return
Long
.
parseLong
(
strValue
);
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
...
@@ -294,7 +311,9 @@ public class DataObject {
...
@@ -294,7 +311,9 @@ public class DataObject {
final
static
public
byte
[]
getBinaryValue
(
Object
objValue
,
byte
[]
def
)
{
final
static
public
byte
[]
getBinaryValue
(
Object
objValue
,
byte
[]
def
)
{
if
(
objValue
==
null
)
return
def
;
if
(
objValue
==
null
)
{
return
def
;
}
if
(
objValue
instanceof
byte
[]){
if
(
objValue
instanceof
byte
[]){
return
(
byte
[])
objValue
;
return
(
byte
[])
objValue
;
}
}
...
@@ -312,7 +331,9 @@ public class DataObject {
...
@@ -312,7 +331,9 @@ public class DataObject {
* @
* @
*/
*/
final
static
public
java
.
sql
.
Timestamp
getTimestampValue
(
Object
objValue
,
java
.
sql
.
Timestamp
tDefault
)
{
final
static
public
java
.
sql
.
Timestamp
getTimestampValue
(
Object
objValue
,
java
.
sql
.
Timestamp
tDefault
)
{
if
(
objValue
==
null
)
return
tDefault
;
if
(
objValue
==
null
)
{
return
tDefault
;
}
if
(
objValue
instanceof
java
.
sql
.
Timestamp
)
{
if
(
objValue
instanceof
java
.
sql
.
Timestamp
)
{
java
.
sql
.
Timestamp
ti
=
(
java
.
sql
.
Timestamp
)
objValue
;
java
.
sql
.
Timestamp
ti
=
(
java
.
sql
.
Timestamp
)
objValue
;
...
@@ -332,7 +353,9 @@ public class DataObject {
...
@@ -332,7 +353,9 @@ public class DataObject {
if
(
objValue
instanceof
String
)
{
if
(
objValue
instanceof
String
)
{
String
strValue
=
(
String
)
objValue
;
String
strValue
=
(
String
)
objValue
;
strValue
=
strValue
.
trim
();
strValue
=
strValue
.
trim
();
if
(
StringUtils
.
isEmpty
(
strValue
))
return
null
;
if
(
StringUtils
.
isEmpty
(
strValue
))
{
return
null
;
}
try
{
try
{
java
.
util
.
Date
date
=
parse
((
String
)
objValue
);
java
.
util
.
Date
date
=
parse
((
String
)
objValue
);
...
@@ -373,7 +396,9 @@ public class DataObject {
...
@@ -373,7 +396,9 @@ public class DataObject {
* @
* @
*/
*/
public
static
Object
testDateTime
(
String
strInput
,
TimeZone
timeZone
)
throws
Exception
{
public
static
Object
testDateTime
(
String
strInput
,
TimeZone
timeZone
)
throws
Exception
{
if
(
StringUtils
.
isEmpty
(
strInput
))
return
null
;
if
(
StringUtils
.
isEmpty
(
strInput
))
{
return
null
;
}
Date
dtDate
=
parse
(
strInput
,
timeZone
);
Date
dtDate
=
parse
(
strInput
,
timeZone
);
java
.
sql
.
Timestamp
retDate
=
new
java
.
sql
.
Timestamp
(
dtDate
.
getTime
());
java
.
sql
.
Timestamp
retDate
=
new
java
.
sql
.
Timestamp
(
dtDate
.
getTime
());
return
retDate
;
return
retDate
;
...
@@ -425,8 +450,9 @@ public class DataObject {
...
@@ -425,8 +450,9 @@ public class DataObject {
if
(
strTimeString
.
indexOf
(
"T"
)!=-
1
){
if
(
strTimeString
.
indexOf
(
"T"
)!=-
1
){
strPart
=
strTimeString
.
split
(
"[T]"
);
strPart
=
strTimeString
.
split
(
"[T]"
);
}
}
else
else
{
strPart
=
strTimeString
.
split
(
" "
);
strPart
=
strTimeString
.
split
(
" "
);
}
if
(
strPart
.
length
==
2
)
{
if
(
strPart
.
length
==
2
)
{
// 两个部分
// 两个部分
String
strDate
=
""
;
String
strDate
=
""
;
...
@@ -589,6 +615,4 @@ public class DataObject {
...
@@ -589,6 +615,4 @@ public class DataObject {
return
new
Timestamp
(
cl
.
getTime
().
getTime
());
return
new
Timestamp
(
cl
.
getTime
().
getTime
());
}
}
}
}
ibzwf-util/src/main/java/cn/ibizlab/util/helper/RuleUtils.java
浏览文件 @
38f046f6
此差异已折叠。
点击以展开。
ibzwf-util/src/main/java/cn/ibizlab/util/job/PermissionSyncJob.java
浏览文件 @
38f046f6
...
@@ -49,14 +49,14 @@ public class PermissionSyncJob implements ApplicationRunner {
...
@@ -49,14 +49,14 @@ public class PermissionSyncJob implements ApplicationRunner {
public
void
run
(
ApplicationArguments
args
)
{
public
void
run
(
ApplicationArguments
args
)
{
try
{
try
{
Thread
.
sleep
(
10000
);
Thread
.
sleep
(
10000
);
InputStream
permission
=
this
.
getClass
().
getResourceAsStream
(
"/permission/systemResource.json"
);
//获取当前系统所有实体资源能力
InputStream
permission
=
this
.
getClass
().
getResourceAsStream
(
"/permission/systemResource.json"
);
//获取当前系统所有实体资源能力
String
permissionResult
=
IOUtils
.
toString
(
permission
,
"UTF-8"
);
String
permissionResult
=
IOUtils
.
toString
(
permission
,
"UTF-8"
);
JSONObject
system
=
new
JSONObject
();
JSONObject
system
=
new
JSONObject
();
system
.
put
(
"pssystemid"
,
systemId
);
system
.
put
(
"pssystemid"
,
systemId
);
system
.
put
(
"pssystemname"
,
systemName
);
system
.
put
(
"pssystemname"
,
systemName
);
system
.
put
(
"sysstructure"
,
JSONObject
.
parseObject
(
permissionResult
));
system
.
put
(
"sysstructure"
,
JSONObject
.
parseObject
(
permissionResult
));
system
.
put
(
"md5check"
,
DigestUtils
.
md5DigestAsHex
(
permissionResult
.
getBytes
()));
system
.
put
(
"md5check"
,
DigestUtils
.
md5DigestAsHex
(
permissionResult
.
getBytes
()));
if
(
client
.
syncSysAuthority
(
system
)){
if
(
client
.
syncSysAuthority
(
system
))
{
log
.
info
(
"向[UAA]同步系统资源成功"
);
log
.
info
(
"向[UAA]同步系统资源成功"
);
}
else
{
}
else
{
log
.
error
(
"向[UAA]同步系统资源失败"
);
log
.
error
(
"向[UAA]同步系统资源失败"
);
...
@@ -67,9 +67,9 @@ public class PermissionSyncJob implements ApplicationRunner {
...
@@ -67,9 +67,9 @@ public class PermissionSyncJob implements ApplicationRunner {
}
}
try
{
try
{
InputStream
sysModel
=
this
.
getClass
().
getResourceAsStream
(
"/sysmodel/ibzwf.json"
);
//获取当前系统所有实体资源能力
InputStream
sysModel
=
this
.
getClass
().
getResourceAsStream
(
"/sysmodel/ibzwf.json"
);
//获取当前系统所有实体资源能力
String
strSysModel
=
IOUtils
.
toString
(
sysModel
,
"UTF-8"
);
String
strSysModel
=
IOUtils
.
toString
(
sysModel
,
"UTF-8"
);
if
(
liteFeignClient
.
syncSysModel
(
JSONObject
.
parseObject
(
strSysModel
))){
if
(
liteFeignClient
.
syncSysModel
(
JSONObject
.
parseObject
(
strSysModel
)))
{
log
.
info
(
"向[lite]同步系统模型成功"
);
log
.
info
(
"向[lite]同步系统模型成功"
);
}
else
{
}
else
{
log
.
error
(
"向[lite]同步系统模型失败"
);
log
.
error
(
"向[lite]同步系统模型失败"
);
...
@@ -81,11 +81,11 @@ public class PermissionSyncJob implements ApplicationRunner {
...
@@ -81,11 +81,11 @@ public class PermissionSyncJob implements ApplicationRunner {
try
{
try
{
InputStream
msgTemplate
=
this
.
getClass
().
getResourceAsStream
(
"/msgtempl/systemMsgTempl.json"
);
//获取当前系统所有实体资源能力
InputStream
msgTemplate
=
this
.
getClass
().
getResourceAsStream
(
"/msgtempl/systemMsgTempl.json"
);
//获取当前系统所有实体资源能力
String
strMsgTemplate
=
IOUtils
.
toString
(
msgTemplate
,
"UTF-8"
);
String
strMsgTemplate
=
IOUtils
.
toString
(
msgTemplate
,
"UTF-8"
);
JSONObject
template
=
new
JSONObject
();
JSONObject
template
=
new
JSONObject
();
template
.
put
(
"template"
,
JSONArray
.
parseArray
(
strMsgTemplate
));
template
.
put
(
"template"
,
JSONArray
.
parseArray
(
strMsgTemplate
));
if
(
notifyFeignClient
.
createMsgTemplate
(
template
)){
if
(
notifyFeignClient
.
createMsgTemplate
(
template
))
{
log
.
info
(
"推送消息模板成功"
);
log
.
info
(
"推送消息模板成功"
);
}
else
{
}
else
{
log
.
error
(
"推送消息模板失败"
);
log
.
error
(
"推送消息模板失败"
);
...
...
ibzwf-util/src/main/java/cn/ibizlab/util/rest/AppController.java
浏览文件 @
38f046f6
...
@@ -42,12 +42,14 @@ public class AppController {
...
@@ -42,12 +42,14 @@ public class AppController {
while
(
it
.
hasNext
())
{
while
(
it
.
hasNext
())
{
GrantedAuthority
authority
=
(
GrantedAuthority
)
it
.
next
();
GrantedAuthority
authority
=
(
GrantedAuthority
)
it
.
next
();
String
strAuthority
=
authority
.
getAuthority
();
String
strAuthority
=
authority
.
getAuthority
();
if
(
strAuthority
.
startsWith
(
"UNIRES_"
+
systemId
))
if
(
strAuthority
.
startsWith
(
"UNIRES_"
+
systemId
))
{
uniRes
.
add
(
strAuthority
.
substring
(
systemId
.
length
()+
8
));
uniRes
.
add
(
strAuthority
.
substring
(
systemId
.
length
()+
8
));
else
if
(
strAuthority
.
startsWith
(
"APPMENU_"
+
systemId
))
}
else
if
(
strAuthority
.
startsWith
(
"APPMENU_"
+
systemId
)){
appMenu
.
add
(
strAuthority
.
substring
(
systemId
.
length
()+
9
));
appMenu
.
add
(
strAuthority
.
substring
(
systemId
.
length
()+
9
));
}
}
}
}
}
Map
<
String
,
Object
>
context
=
new
HashMap
<>();
Map
<
String
,
Object
>
context
=
new
HashMap
<>();
context
.
putAll
(
curUser
.
getSessionParams
());
context
.
putAll
(
curUser
.
getSessionParams
());
context
.
put
(
"srfusername"
,
curUser
.
getPersonname
());
context
.
put
(
"srfusername"
,
curUser
.
getPersonname
());
...
@@ -55,10 +57,12 @@ public class AppController {
...
@@ -55,10 +57,12 @@ public class AppController {
appData
.
put
(
"unires"
,
uniRes
);
appData
.
put
(
"unires"
,
uniRes
);
appData
.
put
(
"appmenu"
,
appMenu
);
appData
.
put
(
"appmenu"
,
appMenu
);
appData
.
put
(
"enablepermissionvalid"
,
enablePermissionValid
);
appData
.
put
(
"enablepermissionvalid"
,
enablePermissionValid
);
if
(
curUser
.
getSuperuser
()==
1
)
if
(
curUser
.
getSuperuser
()==
1
)
{
appData
.
put
(
"enablepermissionvalid"
,
false
);
appData
.
put
(
"enablepermissionvalid"
,
false
);
else
}
else
{
appData
.
put
(
"enablepermissionvalid"
,
enablePermissionValid
);
appData
.
put
(
"enablepermissionvalid"
,
enablePermissionValid
);
}
fillAppData
(
appData
);
fillAppData
(
appData
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
appData
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
appData
);
}
}
...
@@ -76,16 +80,18 @@ public class AppController {
...
@@ -76,16 +80,18 @@ public class AppController {
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/configs/{configType}/{targetType}"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/configs/{configType}/{targetType}"
)
public
ResponseEntity
<
Boolean
>
saveConfig
(
@PathVariable
(
"configType"
)
String
configType
,
@PathVariable
(
"targetType"
)
String
targetType
,
@RequestBody
JSONObject
config
)
{
public
ResponseEntity
<
Boolean
>
saveConfig
(
@PathVariable
(
"configType"
)
String
configType
,
@PathVariable
(
"targetType"
)
String
targetType
,
@RequestBody
JSONObject
config
)
{
String
userId
=
AuthenticationUser
.
getAuthenticationUser
().
getUserid
();
String
userId
=
AuthenticationUser
.
getAuthenticationUser
().
getUserid
();
if
(
StringUtils
.
isEmpty
(
userId
))
if
(
StringUtils
.
isEmpty
(
userId
))
{
throw
new
BadRequestAlertException
(
"保存配置失败,参数缺失"
,
"IBZConfig"
,
configType
);
throw
new
BadRequestAlertException
(
"保存配置失败,参数缺失"
,
"IBZConfig"
,
configType
);
}
return
ResponseEntity
.
ok
(
ibzConfigService
.
saveConfig
(
configType
,
targetType
,
userId
,
config
));
return
ResponseEntity
.
ok
(
ibzConfigService
.
saveConfig
(
configType
,
targetType
,
userId
,
config
));
}
}
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/configs/{configType}/{targetType}"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/configs/{configType}/{targetType}"
)
public
ResponseEntity
<
JSONObject
>
getConfig
(
@PathVariable
(
"configType"
)
String
configType
,
@PathVariable
(
"targetType"
)
String
targetType
)
{
public
ResponseEntity
<
JSONObject
>
getConfig
(
@PathVariable
(
"configType"
)
String
configType
,
@PathVariable
(
"targetType"
)
String
targetType
)
{
String
userId
=
AuthenticationUser
.
getAuthenticationUser
().
getUserid
();
String
userId
=
AuthenticationUser
.
getAuthenticationUser
().
getUserid
();
if
(
StringUtils
.
isEmpty
(
userId
))
if
(
StringUtils
.
isEmpty
(
userId
))
{
throw
new
BadRequestAlertException
(
"获取配置失败,参数缺失"
,
"IBZConfig"
,
configType
);
throw
new
BadRequestAlertException
(
"获取配置失败,参数缺失"
,
"IBZConfig"
,
configType
);
}
return
ResponseEntity
.
ok
(
ibzConfigService
.
getConfig
(
configType
,
targetType
,
userId
));
return
ResponseEntity
.
ok
(
ibzConfigService
.
getConfig
(
configType
,
targetType
,
userId
));
}
}
...
...
ibzwf-util/src/main/java/cn/ibizlab/util/rest/AuthenticationController.java
浏览文件 @
38f046f6
ibzwf-util/src/main/java/cn/ibizlab/util/security/AuthPermissionEvaluator.java
浏览文件 @
38f046f6
...
@@ -38,18 +38,22 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
...
@@ -38,18 +38,22 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
@Override
@Override
@SneakyThrows
@SneakyThrows
public
boolean
hasPermission
(
Authentication
authentication
,
Object
entity
,
Object
action
)
{
public
boolean
hasPermission
(
Authentication
authentication
,
Object
entity
,
Object
action
)
{
if
(!
enablePermissionValid
)
if
(!
enablePermissionValid
)
{
return
true
;
return
true
;
}
Object
principal
=
authentication
.
getPrincipal
();
Object
principal
=
authentication
.
getPrincipal
();
if
(
ObjectUtils
.
isEmpty
(
principal
))
if
(
ObjectUtils
.
isEmpty
(
principal
))
{
return
false
;
return
false
;
}
AuthenticationUser
authenticationUser
=
(
AuthenticationUser
)
authentication
.
getPrincipal
();
AuthenticationUser
authenticationUser
=
(
AuthenticationUser
)
authentication
.
getPrincipal
();
if
(
authenticationUser
.
getSuperuser
()==
1
)
if
(
authenticationUser
.
getSuperuser
()==
1
)
{
return
true
;
return
true
;
}
String
strAction
=
String
.
valueOf
(
action
);
String
strAction
=
String
.
valueOf
(
action
);
Set
<
String
>
userAuthorities
=
getAuthorities
(
authentication
,
strAction
);
Set
<
String
>
userAuthorities
=
getAuthorities
(
authentication
,
strAction
);
if
(
userAuthorities
.
size
()==
0
)
if
(
userAuthorities
.
size
()==
0
)
{
return
false
;
return
false
;
}
if
(
isAllData
(
strAction
,
userAuthorities
)){
if
(
isAllData
(
strAction
,
userAuthorities
)){
return
true
;
return
true
;
}
}
...
@@ -102,8 +106,9 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
...
@@ -102,8 +106,9 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
*/
*/
@SneakyThrows
@SneakyThrows
private
void
setPermissionCondToSearchContext
(
EntityBase
entity
,
QueryWrapperContext
qc
,
Set
<
String
>
userAuthorities
,
AuthenticationUser
authenticationUser
){
private
void
setPermissionCondToSearchContext
(
EntityBase
entity
,
QueryWrapperContext
qc
,
Set
<
String
>
userAuthorities
,
AuthenticationUser
authenticationUser
){
if
(
entity
==
null
)
if
(
entity
==
null
)
{
return
;
return
;
}
Map
<
String
,
String
>
permissionField
=
getPermissionField
(
entity
);
//获取组织、部门预置属性
Map
<
String
,
String
>
permissionField
=
getPermissionField
(
entity
);
//获取组织、部门预置属性
String
orgField
=
permissionField
.
get
(
"orgfield"
);
String
orgField
=
permissionField
.
get
(
"orgfield"
);
String
orgDeptField
=
permissionField
.
get
(
"orgsecfield"
);
String
orgDeptField
=
permissionField
.
get
(
"orgsecfield"
);
...
@@ -185,9 +190,10 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
...
@@ -185,9 +190,10 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
Iterator
it
=
authorities
.
iterator
();
Iterator
it
=
authorities
.
iterator
();
while
(
it
.
hasNext
())
{
while
(
it
.
hasNext
())
{
GrantedAuthority
authority
=
(
GrantedAuthority
)
it
.
next
();
GrantedAuthority
authority
=
(
GrantedAuthority
)
it
.
next
();
if
(
authority
.
getAuthority
().
contains
(
action
))
if
(
authority
.
getAuthority
().
contains
(
action
))
{
userAuthorities
.
add
(
authority
.
getAuthority
());
userAuthorities
.
add
(
authority
.
getAuthority
());
}
}
}
return
userAuthorities
;
return
userAuthorities
;
}
}
...
@@ -253,23 +259,27 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
...
@@ -253,23 +259,27 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
}
}
if
(
action
.
endsWith
(
"Create"
)
||
action
.
endsWith
(
"Save"
)){
if
(
action
.
endsWith
(
"Create"
)
||
action
.
endsWith
(
"Save"
)){
if
(!
ObjectUtils
.
isEmpty
(
orgFieldValue
)
&&
!
userOrg
.
contains
(
orgFieldValue
))
if
(!
ObjectUtils
.
isEmpty
(
orgFieldValue
)
&&
!
userOrg
.
contains
(
orgFieldValue
))
{
return
false
;
return
false
;
if
(!
ObjectUtils
.
isEmpty
(
orgDeptFieldValue
)
&&
!
userOrgDept
.
contains
(
orgDeptFieldValue
))
}
if
(!
ObjectUtils
.
isEmpty
(
orgDeptFieldValue
)
&&
!
userOrgDept
.
contains
(
orgDeptFieldValue
)){
return
false
;
return
false
;
if
(!
ObjectUtils
.
isEmpty
(
crateManFieldValue
)
&&
!
authenticationUser
.
getUserid
().
equals
(
crateManFieldValue
))
}
if
(!
ObjectUtils
.
isEmpty
(
crateManFieldValue
)
&&
!
authenticationUser
.
getUserid
().
equals
(
crateManFieldValue
)){
return
false
;
return
false
;
}
return
true
;
return
true
;
}
}
else
{
else
{
if
(!
ObjectUtils
.
isEmpty
(
orgFieldValue
)
&&
userOrg
.
contains
(
orgFieldValue
))
if
(!
ObjectUtils
.
isEmpty
(
orgFieldValue
)
&&
userOrg
.
contains
(
orgFieldValue
))
{
return
true
;
return
true
;
if
(!
ObjectUtils
.
isEmpty
(
orgDeptFieldValue
)
&&
userOrgDept
.
contains
(
orgDeptFieldValue
))
}
if
(!
ObjectUtils
.
isEmpty
(
orgDeptFieldValue
)
&&
userOrgDept
.
contains
(
orgDeptFieldValue
)){
return
true
;
return
true
;
if
(!
ObjectUtils
.
isEmpty
(
crateManFieldValue
)
&&
authenticationUser
.
getUserid
().
equals
(
crateManFieldValue
))
}
if
(!
ObjectUtils
.
isEmpty
(
crateManFieldValue
)
&&
authenticationUser
.
getUserid
().
equals
(
crateManFieldValue
)){
return
true
;
return
true
;
}
return
false
;
return
false
;
}
}
}
}
...
@@ -293,13 +303,19 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
...
@@ -293,13 +303,19 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
String
fieldName
=
entry
.
getKey
();
//获取注解字段
String
fieldName
=
entry
.
getKey
();
//获取注解字段
DEField
fieldAnnotation
=
entry
.
getValue
();
//获取注解值
DEField
fieldAnnotation
=
entry
.
getValue
();
//获取注解值
DEPredefinedFieldType
prefieldType
=
fieldAnnotation
.
preType
();
DEPredefinedFieldType
prefieldType
=
fieldAnnotation
.
preType
();
if
(
prefieldType
==
prefieldType
.
ORGID
)
//用户配置系统预置属性-组织机构标识
//用户配置系统预置属性-组织机构标识
if
(
prefieldType
==
prefieldType
.
ORGID
){
orgField
=
fieldName
;
orgField
=
fieldName
;
if
(
prefieldType
==
prefieldType
.
ORGSECTORID
)
//用户配置系统预置属性-部门标识
}
//用户配置系统预置属性-部门标识
if
(
prefieldType
==
prefieldType
.
ORGSECTORID
){
orgDeptField
=
fieldName
;
orgDeptField
=
fieldName
;
if
(
prefieldType
==
prefieldType
.
CREATEMAN
)
//用户配置系统预置属性-部门标识
}
//用户配置系统预置属性-部门标识
if
(
prefieldType
==
prefieldType
.
CREATEMAN
){
createManField
=
fieldName
;
createManField
=
fieldName
;
}
}
}
permissionFiled
.
put
(
"orgfield"
,
orgField
);
permissionFiled
.
put
(
"orgfield"
,
orgField
);
permissionFiled
.
put
(
"orgsecfield"
,
orgDeptField
);
permissionFiled
.
put
(
"orgsecfield"
,
orgDeptField
);
permissionFiled
.
put
(
"createmanfield"
,
createManField
);
permissionFiled
.
put
(
"createmanfield"
,
createManField
);
...
...
ibzwf-util/src/main/java/cn/ibizlab/util/security/AuthenticationUser.java
浏览文件 @
38f046f6
...
@@ -260,11 +260,13 @@ public class AuthenticationUser implements UserDetails
...
@@ -260,11 +260,13 @@ public class AuthenticationUser implements UserDetails
return
this
.
sessionParams
;
return
this
.
sessionParams
;
}
}
private
Map
<
String
,
Object
>
getUserSessionParam
()
{
private
Map
<
String
,
Object
>
getUserSessionParam
()
{
if
(
userSessionParam
!=
null
)
if
(
userSessionParam
!=
null
)
{
return
userSessionParam
;
return
userSessionParam
;
else
}
else
{
return
new
HashMap
<>();
return
new
HashMap
<>();
}
}
}
public
void
setOrgInfo
(
Map
<
String
,
Set
<
String
>>
orgInfo
)
{
public
void
setOrgInfo
(
Map
<
String
,
Set
<
String
>>
orgInfo
)
{
this
.
orgInfo
=
orgInfo
;
this
.
orgInfo
=
orgInfo
;
...
...
ibzwf-util/src/main/java/cn/ibizlab/util/service/IBZConfigService.java
浏览文件 @
38f046f6
...
@@ -29,8 +29,9 @@ public class IBZConfigService extends ServiceImpl<IBZConfigMapper, IBZConfig> im
...
@@ -29,8 +29,9 @@ public class IBZConfigService extends ServiceImpl<IBZConfigMapper, IBZConfig> im
@Cacheable
(
value
=
"ibzrt_configs"
,
key
=
"'cfgid:'+#p0+'||'+#p1+'||'+#p2"
)
@Cacheable
(
value
=
"ibzrt_configs"
,
key
=
"'cfgid:'+#p0+'||'+#p1+'||'+#p2"
)
public
JSONObject
getConfig
(
String
cfgType
,
String
targetType
,
String
userId
)
public
JSONObject
getConfig
(
String
cfgType
,
String
targetType
,
String
userId
)
{
{
if
(
StringUtils
.
isEmpty
(
userId
)||
StringUtils
.
isEmpty
(
cfgType
)||
StringUtils
.
isEmpty
(
targetType
))
if
(
StringUtils
.
isEmpty
(
userId
)||
StringUtils
.
isEmpty
(
cfgType
)||
StringUtils
.
isEmpty
(
targetType
))
{
throw
new
BadRequestAlertException
(
"获取配置失败,参数缺失"
,
"IBZConfig"
,
cfgType
);
throw
new
BadRequestAlertException
(
"获取配置失败,参数缺失"
,
"IBZConfig"
,
cfgType
);
}
IBZConfig
config
=
this
.
getOne
(
Wrappers
.
query
(
IBZConfig
.
builder
().
systemId
(
systemId
).
cfgType
(
cfgType
).
targetType
(
targetType
).
userId
(
userId
).
build
()),
false
);
IBZConfig
config
=
this
.
getOne
(
Wrappers
.
query
(
IBZConfig
.
builder
().
systemId
(
systemId
).
cfgType
(
cfgType
).
targetType
(
targetType
).
userId
(
userId
).
build
()),
false
);
if
(
config
==
null
)
{
if
(
config
==
null
)
{
config
=
this
.
getOne
(
Wrappers
.
query
(
IBZConfig
.
builder
().
systemId
(
systemId
).
cfgType
(
cfgType
).
targetType
(
targetType
).
userId
(
adminuserid
).
build
()),
false
);
config
=
this
.
getOne
(
Wrappers
.
query
(
IBZConfig
.
builder
().
systemId
(
systemId
).
cfgType
(
cfgType
).
targetType
(
targetType
).
userId
(
adminuserid
).
build
()),
false
);
...
@@ -44,19 +45,22 @@ public class IBZConfigService extends ServiceImpl<IBZConfigMapper, IBZConfig> im
...
@@ -44,19 +45,22 @@ public class IBZConfigService extends ServiceImpl<IBZConfigMapper, IBZConfig> im
@CacheEvict
(
value
=
"ibzrt_configs"
,
key
=
"'cfgid:'+#p0+'||'+#p1+'||'+#p2"
)
@CacheEvict
(
value
=
"ibzrt_configs"
,
key
=
"'cfgid:'+#p0+'||'+#p1+'||'+#p2"
)
public
boolean
saveConfig
(
String
cfgType
,
String
targetType
,
String
userId
,
JSONObject
config
)
public
boolean
saveConfig
(
String
cfgType
,
String
targetType
,
String
userId
,
JSONObject
config
)
{
{
if
(
StringUtils
.
isEmpty
(
userId
)||
StringUtils
.
isEmpty
(
cfgType
)||
StringUtils
.
isEmpty
(
targetType
))
if
(
StringUtils
.
isEmpty
(
userId
)||
StringUtils
.
isEmpty
(
cfgType
)||
StringUtils
.
isEmpty
(
targetType
))
{
throw
new
BadRequestAlertException
(
"保存配置失败,参数缺失"
,
"IBZConfig"
,
cfgType
);
throw
new
BadRequestAlertException
(
"保存配置失败,参数缺失"
,
"IBZConfig"
,
cfgType
);
}
String
cfg
=
"{}"
;
String
cfg
=
"{}"
;
if
(
config
!=
null
)
if
(
config
!=
null
)
{
cfg
=
JSONObject
.
toJSONString
(
config
);
cfg
=
JSONObject
.
toJSONString
(
config
);
}
return
this
.
saveOrUpdate
(
IBZConfig
.
builder
().
systemId
(
systemId
).
cfgType
(
cfgType
).
targetType
(
targetType
).
userId
(
userId
).
cfg
(
cfg
).
updateDate
(
DataObject
.
getNow
()).
build
());
return
this
.
saveOrUpdate
(
IBZConfig
.
builder
().
systemId
(
systemId
).
cfgType
(
cfgType
).
targetType
(
targetType
).
userId
(
userId
).
cfg
(
cfg
).
updateDate
(
DataObject
.
getNow
()).
build
());
}
}
@CacheEvict
(
value
=
"ibzrt_configs"
,
key
=
"'cfgid:'+#p0+'||'+#p1+'||'+#p2"
)
@CacheEvict
(
value
=
"ibzrt_configs"
,
key
=
"'cfgid:'+#p0+'||'+#p1+'||'+#p2"
)
public
void
resetConfig
(
String
cfgType
,
String
targetType
,
String
userId
)
public
void
resetConfig
(
String
cfgType
,
String
targetType
,
String
userId
)
{
{
if
(
StringUtils
.
isEmpty
(
userId
)||
StringUtils
.
isEmpty
(
cfgType
)||
StringUtils
.
isEmpty
(
targetType
))
if
(
StringUtils
.
isEmpty
(
userId
)||
StringUtils
.
isEmpty
(
cfgType
)||
StringUtils
.
isEmpty
(
targetType
))
{
throw
new
BadRequestAlertException
(
"重置配置失败,参数缺失"
,
"IBZConfig"
,
cfgType
);
throw
new
BadRequestAlertException
(
"重置配置失败,参数缺失"
,
"IBZConfig"
,
cfgType
);
}
this
.
remove
(
Wrappers
.
query
(
IBZConfig
.
builder
().
systemId
(
systemId
).
cfgType
(
cfgType
).
targetType
(
targetType
).
userId
(
userId
).
build
()));
this
.
remove
(
Wrappers
.
query
(
IBZConfig
.
builder
().
systemId
(
systemId
).
cfgType
(
cfgType
).
targetType
(
targetType
).
userId
(
userId
).
build
()));
}
}
...
...
ibzwf-util/src/main/java/cn/ibizlab/util/service/IBZUAAUserService.java
浏览文件 @
38f046f6
...
@@ -26,10 +26,10 @@ public class IBZUAAUserService implements AuthenticationUserService{
...
@@ -26,10 +26,10 @@ public class IBZUAAUserService implements AuthenticationUserService{
@Override
@Override
public
AuthenticationUser
loadUserByUsername
(
String
username
)
{
public
AuthenticationUser
loadUserByUsername
(
String
username
)
{
AuthenticationUser
user
=
uaaFeignClient
.
loginByUsername
(
username
);
AuthenticationUser
user
=
uaaFeignClient
.
loginByUsername
(
username
);
if
(
user
==
null
)
if
(
user
==
null
)
{
throw
new
BadRequestAlertException
(
"登录失败"
,
"IBZUAAUser"
,
username
);
throw
new
BadRequestAlertException
(
"登录失败"
,
"IBZUAAUser"
,
username
);
}
return
user
;
return
user
;
}
}
...
@@ -48,8 +48,9 @@ public class IBZUAAUserService implements AuthenticationUserService{
...
@@ -48,8 +48,9 @@ public class IBZUAAUserService implements AuthenticationUserService{
logininfo
.
setLoginname
(
loginname
);
logininfo
.
setLoginname
(
loginname
);
logininfo
.
setPassword
(
password
);
logininfo
.
setPassword
(
password
);
AuthenticationUser
user
=
uaaFeignClient
.
login
(
logininfo
);
AuthenticationUser
user
=
uaaFeignClient
.
login
(
logininfo
);
if
(
user
==
null
)
if
(
user
==
null
)
{
throw
new
BadRequestAlertException
(
"登录失败"
,
"IBZUAAUser"
,
username
);
throw
new
BadRequestAlertException
(
"登录失败"
,
"IBZUAAUser"
,
username
);
}
return
user
;
return
user
;
}
}
...
...
ibzwf-util/src/main/java/cn/ibizlab/util/service/SimpleAuditService.java
浏览文件 @
38f046f6
此差异已折叠。
点击以展开。
ibzwf-util/src/main/java/cn/ibizlab/util/service/SimpleFileService.java
浏览文件 @
38f046f6
...
@@ -23,20 +23,21 @@ public class SimpleFileService implements FileService {
...
@@ -23,20 +23,21 @@ public class SimpleFileService implements FileService {
@Override
@Override
public
FileItem
saveFile
(
MultipartFile
multipartFile
)
{
public
FileItem
saveFile
(
MultipartFile
multipartFile
)
{
FileItem
item
=
null
;
FileItem
item
=
null
;
// 获取文件名
// 获取文件名
String
fileName
=
multipartFile
.
getOriginalFilename
();
String
fileName
=
multipartFile
.
getOriginalFilename
();
// 获取文件后缀
// 获取文件后缀
String
extname
=
"."
+
getExtensionName
(
fileName
);
String
extname
=
"."
+
getExtensionName
(
fileName
);
try
{
try
{
String
fileid
=
DigestUtils
.
md5DigestAsHex
(
multipartFile
.
getInputStream
());
String
fileid
=
DigestUtils
.
md5DigestAsHex
(
multipartFile
.
getInputStream
());
String
fileFullPath
=
this
.
fileRoot
+
"ibizutil"
+
File
.
separator
+
fileid
+
File
.
separator
+
fileName
;
String
fileFullPath
=
this
.
fileRoot
+
"ibizutil"
+
File
.
separator
+
fileid
+
File
.
separator
+
fileName
;
File
file
=
new
File
(
fileFullPath
);
File
file
=
new
File
(
fileFullPath
);
File
parent
=
new
File
(
file
.
getParent
());
File
parent
=
new
File
(
file
.
getParent
());
if
(!
parent
.
exists
())
if
(!
parent
.
exists
())
{
parent
.
mkdirs
();
parent
.
mkdirs
();
FileCopyUtils
.
copy
(
multipartFile
.
getInputStream
(),
Files
.
newOutputStream
(
file
.
toPath
()));
}
item
=
new
FileItem
(
fileid
,
fileName
,
fileid
,
fileName
,(
int
)
multipartFile
.
getSize
(),
extname
);
FileCopyUtils
.
copy
(
multipartFile
.
getInputStream
(),
Files
.
newOutputStream
(
file
.
toPath
()));
item
=
new
FileItem
(
fileid
,
fileName
,
fileid
,
fileName
,
(
int
)
multipartFile
.
getSize
(),
extname
);
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
throw
new
InternalServerErrorException
(
"文件上传失败,"
+
e
);
throw
new
InternalServerErrorException
(
"文件上传失败,"
+
e
);
}
}
...
...
ibzwf-util/src/main/java/cn/ibizlab/util/web/FeignRequestInterceptor.java
浏览文件 @
38f046f6
...
@@ -29,8 +29,9 @@ public class FeignRequestInterceptor implements RequestInterceptor {
...
@@ -29,8 +29,9 @@ public class FeignRequestInterceptor implements RequestInterceptor {
if
(
headerNames
!=
null
)
{
if
(
headerNames
!=
null
)
{
while
(
headerNames
.
hasMoreElements
())
{
while
(
headerNames
.
hasMoreElements
())
{
String
name
=
headerNames
.
nextElement
();
String
name
=
headerNames
.
nextElement
();
if
(
name
.
equalsIgnoreCase
(
"transfer-encoding"
))
if
(
name
.
equalsIgnoreCase
(
"transfer-encoding"
))
{
continue
;
continue
;
}
String
values
=
request
.
getHeader
(
name
);
String
values
=
request
.
getHeader
(
name
);
requestTemplate
.
header
(
name
,
values
);
requestTemplate
.
header
(
name
,
values
);
}
}
...
...
ibzwf-util/src/main/java/cn/ibizlab/util/web/IBZOperationParameterReader.java
浏览文件 @
38f046f6
ibzwf-util/src/main/java/cn/ibizlab/util/web/SearchContextHandlerMethodArgumentResolver.java
浏览文件 @
38f046f6
...
@@ -41,7 +41,4 @@ public class SearchContextHandlerMethodArgumentResolver implements HandlerMethod
...
@@ -41,7 +41,4 @@ public class SearchContextHandlerMethodArgumentResolver implements HandlerMethod
String
json
=
objectMapper
.
writeValueAsString
(
set
);
String
json
=
objectMapper
.
writeValueAsString
(
set
);
return
objectMapper
.
readValue
(
json
,
parameter
.
getParameterType
());
return
objectMapper
.
readValue
(
json
,
parameter
.
getParameterType
());
}
}
}
}
\ No newline at end of file
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录