Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzwf
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzwf
提交
2a5bddf1
提交
2a5bddf1
编写于
5月 21, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibiz4j 发布系统代码
上级
d50e5ca2
变更
5
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
42 行增加
和
158 行删除
+42
-158
WFSystem.java
...c/main/java/cn/ibizlab/core/workflow/domain/WFSystem.java
+10
-15
WFSystemSearchContext.java
...n/ibizlab/core/workflow/filter/WFSystemSearchContext.java
+5
-24
IWFSystemService.java
...va/cn/ibizlab/core/workflow/service/IWFSystemService.java
+2
-17
WFSystemServiceImpl.java
...izlab/core/workflow/service/impl/WFSystemServiceImpl.java
+20
-86
h2_table.xml
ibzwf-core/src/main/resources/liquibase/h2_table.xml
+5
-16
未找到文件。
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/domain/WFSystem.java
浏览文件 @
2a5bddf1
...
...
@@ -21,38 +21,33 @@ import java.io.Serializable;
import
lombok.Data
;
import
org.springframework.data.annotation.Transient
;
import
com.baomidou.mybatisplus.annotation.*
;
import
cn.ibizlab.util.domain.EntityMP
;
import
cn.ibizlab.util.domain.EntityClient
;
/**
*
实体[系统]
*
ServiceApi [系统] 对象
*/
@Data
@TableName
(
value
=
"IBZPSSYSTEM"
,
resultMap
=
"WFSystemResultMap"
)
public
class
WFSystem
extends
EntityMP
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
public
class
WFSystem
extends
EntityClient
implements
Serializable
{
/**
* 系统标识
*/
@DEField
(
isKeyField
=
true
)
@TableId
(
value
=
"pssystemid"
,
type
=
IdType
.
UUID
)
@JSONField
(
name
=
"pssystemid"
)
@JsonProperty
(
"pssystemid"
)
@JSONField
(
name
=
"pSSystemId"
)
@JsonProperty
(
"pSSystemId"
)
private
String
pssystemid
;
/**
* 系统名称
*/
@TableField
(
value
=
"pssystemname"
)
@JSONField
(
name
=
"pssystemname"
)
@JsonProperty
(
"pssystemname"
)
@JSONField
(
name
=
"pSSystemName"
)
@JsonProperty
(
"pSSystemName"
)
private
String
pssystemname
;
/**
* 设置 [系统名称]
*/
...
...
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/filter/WFSystemSearchContext.java
浏览文件 @
2a5bddf1
...
...
@@ -17,36 +17,17 @@ import org.springframework.util.ObjectUtils;
import
org.springframework.util.StringUtils
;
import
cn.ibizlab.util.filter.QueryWrapperContext
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
cn.ibizlab.core.workflow.domain.WFSystem
;
import
cn.ibizlab.util.filter.SearchContextBase
;
/**
*
关系型
数据实体[WFSystem] 查询条件对象
*
ServiceApi
数据实体[WFSystem] 查询条件对象
*/
@Slf4j
@Data
public
class
WFSystemSearchContext
extends
QueryWrapperContext
<
WFSystem
>
{
public
class
WFSystemSearchContext
extends
SearchContextBase
{
private
String
n_pssystemname_like
;
//[系统名称]
public
void
setN_pssystemname_like
(
String
n_pssystemname_like
)
{
this
.
n_pssystemname_like
=
n_pssystemname_like
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_pssystemname_like
)){
this
.
getSelectCond
().
like
(
"pssystemname"
,
n_pssystemname_like
);
}
}
/**
* 启用快速搜索
*/
public
void
setQuery
(
String
query
)
{
this
.
query
=
query
;
if
(!
StringUtils
.
isEmpty
(
query
)){
this
.
getSelectCond
().
or
().
like
(
"pssystemname"
,
query
);
}
}
}
}
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/IWFSystemService.java
浏览文件 @
2a5bddf1
...
...
@@ -18,12 +18,10 @@ import cn.ibizlab.core.workflow.domain.WFSystem;
import
cn.ibizlab.core.workflow.filter.WFSystemSearchContext
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* 实体[WFSystem] 服务对象接口
*/
public
interface
IWFSystemService
extends
IService
<
WFSystem
>
{
public
interface
IWFSystemService
{
boolean
remove
(
String
key
)
;
void
removeBatch
(
Collection
<
String
>
idList
)
;
...
...
@@ -37,21 +35,8 @@ public interface IWFSystemService extends IService<WFSystem>{
boolean
checkKey
(
WFSystem
et
)
;
WFSystem
get
(
String
key
)
;
Page
<
WFSystem
>
searchDefault
(
WFSystemSearchContext
context
)
;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List
<
JSONObject
>
select
(
String
sql
,
Map
param
);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean
execute
(
String
sql
,
Map
param
);
}
ibzwf-core/src/main/java/cn/ibizlab/core/workflow/service/impl/WFSystemServiceImpl.java
浏览文件 @
2a5bddf1
...
...
@@ -30,47 +30,31 @@ import cn.ibizlab.core.workflow.service.IWFSystemService;
import
cn.ibizlab.util.helper.CachedBeanCopier
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
cn.ibizlab.core.workflow.mapper.WFSystemMapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.alibaba.fastjson.JSONObject
;
import
org.springframework.util.StringUtils
;
/**
* 实体[系统] 服务对象接口实现
* 实体[系统]
无存储
服务对象接口实现
*/
@Slf4j
@Service
(
"WFSystemServiceImpl"
)
public
class
WFSystemServiceImpl
extends
ServiceImpl
<
WFSystemMapper
,
WFSystem
>
implements
IWFSystemService
{
@Service
public
class
WFSystemServiceImpl
implements
IWFSystemService
{
private
int
batchSize
=
500
;
@Override
@Transactional
public
boolean
remove
(
String
key
)
{
boolean
result
=
removeById
(
key
);
return
result
;
return
true
;
}
@Override
public
void
removeBatch
(
Collection
<
String
>
idList
)
{
removeByIds
(
idList
);
public
void
removeBatch
(
Collection
<
String
>
idList
){
}
@Override
@Transactional
public
boolean
update
(
WFSystem
et
)
{
if
(!
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"pssystemid"
,
et
.
getPssystemid
())))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getPssystemid
()),
et
);
//代码实现
return
true
;
}
@Override
public
void
updateBatch
(
List
<
WFSystem
>
list
)
{
updateBatchById
(
list
,
batchSize
);
public
void
updateBatch
(
List
<
WFSystem
>
list
){
}
@Override
...
...
@@ -81,98 +65,48 @@ public class WFSystemServiceImpl extends ServiceImpl<WFSystemMapper, WFSystem> i
@Override
@Transactional
public
boolean
save
(
WFSystem
et
)
{
if
(!
saveOrUpdate
(
et
))
return
false
;
//代码实现
return
true
;
}
@Override
@Transactional
(
rollbackFor
=
{
Exception
.
class
}
)
public
boolean
saveOrUpdate
(
WFSystem
et
)
{
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
}
}
@Override
public
void
saveBatch
(
List
<
WFSystem
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
}
@Override
@Transactional
public
boolean
create
(
WFSystem
et
)
{
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getPssystemid
()),
et
);
//代码实现
return
true
;
}
@Override
public
void
createBatch
(
List
<
WFSystem
>
list
)
{
this
.
saveBatch
(
list
,
batchSize
);
public
void
createBatch
(
List
<
WFSystem
>
list
){
}
@Override
public
boolean
checkKey
(
WFSystem
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getPssystemid
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getPssystemid
())))
;
return
false
;
}
@Override
@Transactional
public
WFSystem
get
(
String
key
)
{
WFSystem
et
=
getById
(
key
);
if
(
et
==
null
){
et
=
new
WFSystem
();
et
.
setPssystemid
(
key
);
}
else
{
}
WFSystem
et
=
new
WFSystem
();
et
.
setPssystemid
(
key
);
return
et
;
}
/**
* 查询集合 DEFAULT
*/
@Override
public
Page
<
WFSystem
>
searchDefault
(
WFSystemSearchContext
context
)
{
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
WFSystem
>
pages
=
baseMapper
.
searchDefault
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
WFSystem
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
@Override
public
List
<
JSONObject
>
select
(
String
sql
,
Map
param
){
return
this
.
baseMapper
.
selectBySQL
(
sql
,
param
);
return
new
PageImpl
<
WFSystem
>(
new
ArrayList
(),
context
.
getPageable
(),
0
);
}
@Override
@Transactional
public
boolean
execute
(
String
sql
,
Map
param
){
if
(
sql
==
null
||
sql
.
isEmpty
())
{
return
false
;
}
if
(
sql
.
toLowerCase
().
trim
().
startsWith
(
"insert"
))
{
return
this
.
baseMapper
.
insertBySQL
(
sql
,
param
);
}
if
(
sql
.
toLowerCase
().
trim
().
startsWith
(
"update"
))
{
return
this
.
baseMapper
.
updateBySQL
(
sql
,
param
);
}
if
(
sql
.
toLowerCase
().
trim
().
startsWith
(
"delete"
))
{
return
this
.
baseMapper
.
deleteBySQL
(
sql
,
param
);
}
log
.
warn
(
"暂未支持的SQL语法"
);
return
true
;
}
}
ibzwf-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
2a5bddf1
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog
xmlns=
"http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext=
"http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"
>
<!--输出实体[WF_PSSYSTEM]数据结构 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-wf_pssystem-15-1"
>
<createTable
tableName=
"IBZPSSYSTEM"
>
<column
name=
"PSSYSTEMID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_WF_PSSYSTEM_PSSYSTEMID"
/>
</column>
<column
name=
"PSSYSTEMNAME"
remarks=
""
type=
"VARCHAR(100)"
>
</column>
</createTable>
</changeSet>
<!--输出实体[WF_GROUP]数据结构 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-wf_group-24-
2
"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-wf_group-24-
1
"
>
<createTable
tableName=
"IBZWFGROUP"
>
<column
name=
"GROUPID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_WF_GROUP_GROUPID"
/>
...
...
@@ -24,7 +14,7 @@
</createTable>
</changeSet>
<!--输出实体[WF_DEFINITION]数据结构 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-wf_definition-51-
3
"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-wf_definition-51-
2
"
>
<createTable
tableName=
"IBZWFDEFINITION"
>
<column
name=
"DEFINITIONKEY"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_WF_DEFINITION_DEFINITIONKEY"
/>
...
...
@@ -48,7 +38,7 @@
</createTable>
</changeSet>
<!--输出实体[WF_GROUP_MEMBER]数据结构 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-wf_group_member-39-
4
"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-wf_group_member-39-
3
"
>
<createTable
tableName=
"IBZWFMEMBER"
>
<column
name=
"MEMBERID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_WF_GROUP_MEMBER_MEMBERID"
/>
...
...
@@ -62,14 +52,13 @@
</createTable>
</changeSet>
<!--输出实体[WF_PSSYSTEM]外键关系 -->
<!--输出实体[WF_GROUP]外键关系 -->
<!--输出实体[WF_DEFINITION]外键关系 -->
<!--输出实体[WF_GROUP_MEMBER]外键关系 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"fk-wf_group_member-39-
5
"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"fk-wf_group_member-39-
4
"
>
<addForeignKeyConstraint
baseColumnNames=
"GROUPID"
baseTableName=
"IBZWFMEMBER"
constraintName=
"DER1N_WF_GROUP_MEMBER_WF_GROUP"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"GROUPID"
referencedTableName=
"IBZWFGROUP"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_A_5d9d78509"
id=
"fk-wf_group_member-39-
6
"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"fk-wf_group_member-39-
5
"
>
<addForeignKeyConstraint
baseColumnNames=
"USERID"
baseTableName=
"IBZWFMEMBER"
constraintName=
"DER1N_WF_GROUP_MEMBER_WF_USER_"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"USERID"
referencedTableName=
"IBZUSER"
validate=
"true"
/>
</changeSet>
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录