Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzdst
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzdst
提交
302dd3f8
提交
302dd3f8
编写于
12月 30, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
zhouweidong 发布系统代码 [ibz-dst,应用]
上级
73ca6081
变更
7
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
87 行增加
和
3 行删除
+87
-3
IDABuildService.java
...ava/cn/ibizlab/core/analysis/service/IDABuildService.java
+1
-0
DABuildServiceImpl.java
...bizlab/core/analysis/service/impl/DABuildServiceImpl.java
+29
-0
MetaModel.java
.../src/main/java/cn/ibizlab/core/lite/domain/MetaModel.java
+16
-0
MetaModelServiceImpl.java
.../ibizlab/core/lite/service/impl/MetaModelServiceImpl.java
+8
-0
IRuleItemService.java
...n/java/cn/ibizlab/core/rule/service/IRuleItemService.java
+1
-0
RuleItemServiceImpl.java
...n/ibizlab/core/rule/service/impl/RuleItemServiceImpl.java
+29
-0
h2_table.xml
ibzdst-core/src/main/resources/liquibase/h2_table.xml
+3
-3
未找到文件。
ibzdst-core/src/main/java/cn/ibizlab/core/analysis/service/IDABuildService.java
浏览文件 @
302dd3f8
...
...
@@ -43,6 +43,7 @@ public interface IDABuildService extends IService<DABuild> {
Page
<
DABuild
>
searchDefault
(
DABuildSearchContext
context
);
List
<
DABuild
>
selectByModelId
(
String
id
);
void
removeByModelId
(
String
id
);
void
saveByModelId
(
String
id
,
List
<
DABuild
>
list
)
;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
...
...
ibzdst-core/src/main/java/cn/ibizlab/core/analysis/service/impl/DABuildServiceImpl.java
浏览文件 @
302dd3f8
...
...
@@ -240,6 +240,35 @@ public class DABuildServiceImpl extends ServiceImpl<DABuildMapper, DABuild> impl
this
.
remove
(
new
QueryWrapper
<
DABuild
>().
eq
(
"modelid"
,
id
));
}
@Override
public
void
saveByModelId
(
String
id
,
List
<
DABuild
>
list
)
{
if
(
list
==
null
)
return
;
Set
<
String
>
delIds
=
new
HashSet
<
String
>();
List
<
DABuild
>
_update
=
new
ArrayList
<
DABuild
>();
List
<
DABuild
>
_create
=
new
ArrayList
<
DABuild
>();
for
(
DABuild
before:
selectByModelId
(
id
)){
delIds
.
add
(
before
.
getBuildId
());
}
for
(
DABuild
sub:
list
)
{
sub
.
setModelId
(
id
);
if
(
ObjectUtils
.
isEmpty
(
sub
.
getBuildId
()))
sub
.
setBuildId
((
String
)
sub
.
getDefaultKey
(
true
));
if
(
delIds
.
contains
(
sub
.
getBuildId
()))
{
delIds
.
remove
(
sub
.
getBuildId
());
_update
.
add
(
sub
);
}
else
_create
.
add
(
sub
);
}
if
(
_update
.
size
()>
0
)
proxyService
.
updateBatch
(
_update
);
if
(
_create
.
size
()>
0
)
proxyService
.
createBatch
(
_create
);
if
(
delIds
.
size
()>
0
)
proxyService
.
removeBatch
(
delIds
);
}
/**
* 查询集合 数据集
...
...
ibzdst-core/src/main/java/cn/ibizlab/core/lite/domain/MetaModel.java
浏览文件 @
302dd3f8
...
...
@@ -124,6 +124,22 @@ public class MetaModel extends EntityMP implements Serializable {
private
cn
.
ibizlab
.
core
.
lite
.
domain
.
DstSystem
system
;
/**
* 分析
*/
@JsonIgnore
@JSONField
(
serialize
=
false
)
@TableField
(
exist
=
false
)
private
List
<
cn
.
ibizlab
.
core
.
analysis
.
domain
.
DABuild
>
builds
;
/**
* 规则
*/
@JsonIgnore
@JSONField
(
serialize
=
false
)
@TableField
(
exist
=
false
)
private
List
<
cn
.
ibizlab
.
core
.
rule
.
domain
.
RuleItem
>
ruleitems
;
/**
* 设置 [名称]
...
...
ibzdst-core/src/main/java/cn/ibizlab/core/lite/service/impl/MetaModelServiceImpl.java
浏览文件 @
302dd3f8
...
...
@@ -72,6 +72,8 @@ public class MetaModelServiceImpl extends ServiceImpl<MetaModelMapper, MetaModel
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
{
return
false
;
}
dabuildService
.
saveByModelId
(
et
.
getId
(),
et
.
getBuilds
());
ruleitemService
.
saveByModelId
(
et
.
getId
(),
et
.
getRuleitems
());
CachedBeanCopier
.
copy
(
get
(
et
.
getId
()),
et
);
return
true
;
}
...
...
@@ -88,6 +90,8 @@ public class MetaModelServiceImpl extends ServiceImpl<MetaModelMapper, MetaModel
if
(!
update
(
et
,
(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"modelid"
,
et
.
getId
())))
{
return
false
;
}
dabuildService
.
saveByModelId
(
et
.
getId
(),
et
.
getBuilds
());
ruleitemService
.
saveByModelId
(
et
.
getId
(),
et
.
getRuleitems
());
CachedBeanCopier
.
copy
(
get
(
et
.
getId
()),
et
);
return
true
;
}
...
...
@@ -101,6 +105,8 @@ public class MetaModelServiceImpl extends ServiceImpl<MetaModelMapper, MetaModel
@Override
@Transactional
public
boolean
remove
(
String
key
)
{
dabuildService
.
removeByModelId
(
key
)
;
ruleitemService
.
removeByModelId
(
key
)
;
boolean
result
=
removeById
(
key
);
return
result
;
}
...
...
@@ -120,6 +126,8 @@ public class MetaModelServiceImpl extends ServiceImpl<MetaModelMapper, MetaModel
et
.
setId
(
key
);
}
else
{
et
.
setBuilds
(
dabuildService
.
selectByModelId
(
key
));
et
.
setRuleitems
(
ruleitemService
.
selectByModelId
(
key
));
}
return
et
;
}
...
...
ibzdst-core/src/main/java/cn/ibizlab/core/rule/service/IRuleItemService.java
浏览文件 @
302dd3f8
...
...
@@ -43,6 +43,7 @@ public interface IRuleItemService extends IService<RuleItem> {
Page
<
RuleItem
>
searchDefault
(
RuleItemSearchContext
context
);
List
<
RuleItem
>
selectByModelId
(
String
id
);
void
removeByModelId
(
String
id
);
void
saveByModelId
(
String
id
,
List
<
RuleItem
>
list
)
;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
...
...
ibzdst-core/src/main/java/cn/ibizlab/core/rule/service/impl/RuleItemServiceImpl.java
浏览文件 @
302dd3f8
...
...
@@ -236,6 +236,35 @@ public class RuleItemServiceImpl extends ServiceImpl<RuleItemMapper, RuleItem> i
this
.
remove
(
new
QueryWrapper
<
RuleItem
>().
eq
(
"modelid"
,
id
));
}
@Override
public
void
saveByModelId
(
String
id
,
List
<
RuleItem
>
list
)
{
if
(
list
==
null
)
return
;
Set
<
String
>
delIds
=
new
HashSet
<
String
>();
List
<
RuleItem
>
_update
=
new
ArrayList
<
RuleItem
>();
List
<
RuleItem
>
_create
=
new
ArrayList
<
RuleItem
>();
for
(
RuleItem
before:
selectByModelId
(
id
)){
delIds
.
add
(
before
.
getRuleId
());
}
for
(
RuleItem
sub:
list
)
{
sub
.
setModelId
(
id
);
if
(
ObjectUtils
.
isEmpty
(
sub
.
getRuleId
()))
sub
.
setRuleId
((
String
)
sub
.
getDefaultKey
(
true
));
if
(
delIds
.
contains
(
sub
.
getRuleId
()))
{
delIds
.
remove
(
sub
.
getRuleId
());
_update
.
add
(
sub
);
}
else
_create
.
add
(
sub
);
}
if
(
_update
.
size
()>
0
)
proxyService
.
updateBatch
(
_update
);
if
(
_create
.
size
()>
0
)
proxyService
.
createBatch
(
_create
);
if
(
delIds
.
size
()>
0
)
proxyService
.
removeBatch
(
delIds
);
}
/**
* 查询集合 数据集
...
...
ibzdst-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
302dd3f8
...
...
@@ -4,7 +4,7 @@
<!--输出实体[DA_BUILD]数据结构 -->
<changeSet
author=
"root"
id=
"tab-da_build-6
7
-1"
>
<changeSet
author=
"root"
id=
"tab-da_build-6
8
-1"
>
<createTable
tableName=
"IBZDABUILD"
>
<column
name=
"BUILDID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_DA_BUILD_BUILDID"
/>
...
...
@@ -328,7 +328,7 @@
<!--输出实体[META_MODEL]数据结构 -->
<changeSet
author=
"root"
id=
"tab-meta_model-2
7
-12"
>
<changeSet
author=
"root"
id=
"tab-meta_model-2
9
-12"
>
<createTable
tableName=
"IBZMODEL"
>
<column
name=
"MODELID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_META_MODEL_MODELID"
/>
...
...
@@ -432,7 +432,7 @@
<!--输出实体[RU_ITEM]数据结构 -->
<changeSet
author=
"root"
id=
"tab-ru_item-7
7
-16"
>
<changeSet
author=
"root"
id=
"tab-ru_item-7
8
-16"
>
<createTable
tableName=
"IBZRULE"
>
<column
name=
"RULEID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_RU_ITEM_RULEID"
/>
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录