Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzlite
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzlite
提交
af2438b4
提交
af2438b4
编写于
12月 23, 2020
作者:
tangyaologin
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
http://demo.ibizlab.cn/ibiz4jteam/ibzlite
上级
275711a7
c26ee720
变更
27
隐藏空白字符变更
内嵌
并排
正在显示
27 个修改的文件
包含
805 行增加
和
98 行删除
+805
-98
meta-relationships.ts
.../src/mock/entity/meta-relationships/meta-relationships.ts
+92
-0
meta-relationship-service-base.ts
...rvice/meta-relationship/meta-relationship-service-base.ts
+50
-0
config.xml
config.xml
+0
-5
Dockerfile
ibzlite-app/ibzlite-app-web/src/main/docker/Dockerfile
+1
-1
ibzlite-app-web.yaml
...-app/ibzlite-app-web/src/main/docker/ibzlite-app-web.yaml
+1
-15
BladeVisualCategoryServiceImpl.java
...avuedata/service/impl/BladeVisualCategoryServiceImpl.java
+34
-3
BladeVisualConfigServiceImpl.java
...e/avuedata/service/impl/BladeVisualConfigServiceImpl.java
+34
-3
BladeVisualMapServiceImpl.java
...core/avuedata/service/impl/BladeVisualMapServiceImpl.java
+34
-3
BladeVisualServiceImpl.java
...ab/core/avuedata/service/impl/BladeVisualServiceImpl.java
+34
-3
MetaRelationshipExService.java
...ab/core/extensions/service/MetaRelationshipExService.java
+35
-0
IMetaRelationshipService.java
...n/ibizlab/core/lite/service/IMetaRelationshipService.java
+2
-0
DstComponentServiceImpl.java
...izlab/core/lite/service/impl/DstComponentServiceImpl.java
+34
-3
DstConfigServiceImpl.java
.../ibizlab/core/lite/service/impl/DstConfigServiceImpl.java
+34
-3
DstDataSourceServiceImpl.java
...zlab/core/lite/service/impl/DstDataSourceServiceImpl.java
+34
-3
DstRouterServiceImpl.java
.../ibizlab/core/lite/service/impl/DstRouterServiceImpl.java
+34
-3
DstSystemServiceImpl.java
.../ibizlab/core/lite/service/impl/DstSystemServiceImpl.java
+34
-3
DstViewServiceImpl.java
...cn/ibizlab/core/lite/service/impl/DstViewServiceImpl.java
+34
-3
MetaDataSetServiceImpl.java
...bizlab/core/lite/service/impl/MetaDataSetServiceImpl.java
+34
-6
MetaEntityServiceImpl.java
...ibizlab/core/lite/service/impl/MetaEntityServiceImpl.java
+34
-3
MetaFieldServiceImpl.java
.../ibizlab/core/lite/service/impl/MetaFieldServiceImpl.java
+34
-6
MetaModelServiceImpl.java
.../ibizlab/core/lite/service/impl/MetaModelServiceImpl.java
+34
-3
MetaModuleServiceImpl.java
...ibizlab/core/lite/service/impl/MetaModuleServiceImpl.java
+34
-3
MetaRelationshipServiceImpl.java
...b/core/lite/service/impl/MetaRelationshipServiceImpl.java
+50
-6
h2_table.xml
ibzlite-core/src/main/resources/liquibase/h2_table.xml
+16
-16
systemResource.json
...te-core/src/main/resources/permission/systemResource.json
+1
-1
pom.xml
ibzlite-dependencies/pom.xml
+0
-3
MetaRelationshipResource.java
...in/java/cn/ibizlab/api/rest/MetaRelationshipResource.java
+47
-0
未找到文件。
app_web/src/mock/entity/meta-relationships/meta-relationships.ts
浏览文件 @
af2438b4
...
...
@@ -492,6 +492,98 @@ mock.onPost(new RegExp(/^\/metarelationships\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey
});
// InitModel
mock
.
onPost
(
new
RegExp
(
/^
\/
dstsystems
\/([
a-zA-Z0-9
\-\;]{1,35})\/
metaentities
\/([
a-zA-Z0-9
\-\;]{1,35})\/
metarelationships
\/([
a-zA-Z0-9
\-\;]{1,35})\/
initmodel$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:metarelationship 方法: InitModel"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'pssystemid'
,
'entity_id'
,
'id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
dstsystems
\/([
a-zA-Z0-9
\-\;]{1,35})\/
metaentities
\/([
a-zA-Z0-9
\-\;]{1,35})\/
metarelationships
\/([
a-zA-Z0-9
\-\;]{1,35})\/
initmodel$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
Object
.
defineProperty
(
tempValue
,
item
,
{
enumerable
:
true
,
value
:
matchArray
[
index
+
1
]
});
});
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
({});
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
{}];
});
// InitModel
mock
.
onPost
(
new
RegExp
(
/^
\/
metaentities
\/([
a-zA-Z0-9
\-\;]{1,35})\/
metarelationships
\/([
a-zA-Z0-9
\-\;]{1,35})\/
initmodel$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:metarelationship 方法: InitModel"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'entity_id'
,
'id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
metaentities
\/([
a-zA-Z0-9
\-\;]{1,35})\/
metarelationships
\/([
a-zA-Z0-9
\-\;]{1,35})\/
initmodel$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
Object
.
defineProperty
(
tempValue
,
item
,
{
enumerable
:
true
,
value
:
matchArray
[
index
+
1
]
});
});
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
({});
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
{}];
});
// InitModel
mock
.
onPost
(
new
RegExp
(
/^
\/
metarelationships
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
initmodel$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:metarelationship 方法: InitModel"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
metarelationships
\/([
a-zA-Z0-9
\-\;]{1,35})\/
initmodel$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
Object
.
defineProperty
(
tempValue
,
item
,
{
enumerable
:
true
,
value
:
matchArray
[
index
+
1
]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'id'
]
==
tempValue
[
'id'
]
){
for
(
let
value
in
data
){
if
(
item
.
hasOwnProperty
(
value
)){
item
[
value
]
=
data
[
value
];
}
}
}
})
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
data
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
data
];
});
// Save
mock
.
onPost
(
new
RegExp
(
/^
\/
dstsystems
\/([
a-zA-Z0-9
\-\;]{1,35})\/
metaentities
\/([
a-zA-Z0-9
\-\;]{1,35})\/
metarelationships
\/([
a-zA-Z0-9
\-\;]{1,35})\/
save$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:metarelationship 方法: Save"
);
...
...
app_web/src/service/meta-relationship/meta-relationship-service-base.ts
浏览文件 @
af2438b4
...
...
@@ -249,6 +249,56 @@ export default class MetaRelationshipServiceBase extends EntityService {
return
res
;
}
/**
* InitModel接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MetaRelationshipServiceBase
*/
public
async
InitModel
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
dstsystem
&&
context
.
metaentity
&&
context
.
metarelationship
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/dstsystems/
${
context
.
dstsystem
}
/metaentities/
${
context
.
metaentity
}
/metarelationships/
${
context
.
metarelationship
}
/initmodel`
,
data
,
isloading
);
return
res
;
}
if
(
context
.
metaentity
&&
context
.
metarelationship
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/metaentities/
${
context
.
metaentity
}
/metarelationships/
${
context
.
metarelationship
}
/initmodel`
,
data
,
isloading
);
return
res
;
}
let
res
:
any
=
Http
.
getInstance
().
post
(
`/metarelationships/
${
context
.
metarelationship
}
/initmodel`
,
data
,
isloading
);
return
res
;
}
/**
* InitModelBatch接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MetaRelationshipServiceBase
*/
public
async
InitModelBatch
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
dstsystem
&&
context
.
metaentity
&&
true
){
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
await
Http
.
getInstance
().
post
(
`/dstsystems/
${
context
.
dstsystem
}
/metaentities/
${
context
.
metaentity
}
/metarelationship/initmodelbatch`
,
tempData
,
isloading
);
}
if
(
context
.
metaentity
&&
true
){
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
await
Http
.
getInstance
().
post
(
`/metaentities/
${
context
.
metaentity
}
/metarelationship/initmodelbatch`
,
tempData
,
isloading
);
}
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
await
Http
.
getInstance
().
post
(
`/metarelationship/initmodelbatch`
,
tempData
,
isloading
);
}
/**
* Save接口方法
*
...
...
config.xml
浏览文件 @
af2438b4
...
...
@@ -37,11 +37,6 @@
git clone -b master $para2 ibzlite/
export NODE_OPTIONS=--max-old-space-size=4096
cd ibzlite/
mvn clean package -Pweb
cd ibzlite-app/ibzlite-app-web
mvn -Pweb docker:build
mvn -Pweb docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzlite-app-web.yaml ibzlab-rt --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
...
...
ibzlite-app/ibzlite-app-web/src/main/docker/Dockerfile
浏览文件 @
af2438b4
...
...
@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzlite-app-web.jar
EXPOSE
3001
0
EXPOSE
808
0
ADD
ibzlite-app-web.jar /ibzlite-app-web.jar
ibzlite-app/ibzlite-app-web/src/main/docker/ibzlite-app-web.yaml
浏览文件 @
af2438b4
...
...
@@ -3,23 +3,9 @@ services:
ibzlite-app-web
:
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/ibzlite-app-web:latest
ports
:
-
"
30010:3001
0"
-
"
8080:808
0"
networks
:
-
agent_network
environment
:
-
SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.180.237
-
SERVER_PORT=30010
-
SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.100.243: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.100.243:8848
-
SPRING_CLOUD_NACOS_DISCOVERY_GROUP=ibizdev
deploy
:
resources
:
limits
:
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/avuedata/service/impl/BladeVisualCategoryServiceImpl.java
浏览文件 @
af2438b4
...
...
@@ -48,6 +48,9 @@ import org.springframework.util.StringUtils;
@Service
(
"BladeVisualCategoryServiceImpl"
)
public
class
BladeVisualCategoryServiceImpl
extends
ServiceImpl
<
BladeVisualCategoryMapper
,
BladeVisualCategory
>
implements
IBladeVisualCategoryService
{
@Autowired
@Lazy
IBladeVisualCategoryService
proxyService
;
protected
int
batchSize
=
500
;
...
...
@@ -133,21 +136,49 @@ public class BladeVisualCategoryServiceImpl extends ServiceImpl<BladeVisualCateg
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
return
checkKey
(
et
)
?
proxyService
.
update
(
et
)
:
proxyService
.
create
(
et
);
}
}
@Override
@Transactional
public
boolean
saveBatch
(
Collection
<
BladeVisualCategory
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
BladeVisualCategory
>
create
=
new
ArrayList
<>();
List
<
BladeVisualCategory
>
update
=
new
ArrayList
<>();
for
(
BladeVisualCategory
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
return
true
;
}
@Override
@Transactional
public
void
saveBatch
(
List
<
BladeVisualCategory
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
BladeVisualCategory
>
create
=
new
ArrayList
<>();
List
<
BladeVisualCategory
>
update
=
new
ArrayList
<>();
for
(
BladeVisualCategory
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
}
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/avuedata/service/impl/BladeVisualConfigServiceImpl.java
浏览文件 @
af2438b4
...
...
@@ -48,6 +48,9 @@ import org.springframework.util.StringUtils;
@Service
(
"BladeVisualConfigServiceImpl"
)
public
class
BladeVisualConfigServiceImpl
extends
ServiceImpl
<
BladeVisualConfigMapper
,
BladeVisualConfig
>
implements
IBladeVisualConfigService
{
@Autowired
@Lazy
IBladeVisualConfigService
proxyService
;
protected
int
batchSize
=
500
;
...
...
@@ -133,21 +136,49 @@ public class BladeVisualConfigServiceImpl extends ServiceImpl<BladeVisualConfigM
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
return
checkKey
(
et
)
?
proxyService
.
update
(
et
)
:
proxyService
.
create
(
et
);
}
}
@Override
@Transactional
public
boolean
saveBatch
(
Collection
<
BladeVisualConfig
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
BladeVisualConfig
>
create
=
new
ArrayList
<>();
List
<
BladeVisualConfig
>
update
=
new
ArrayList
<>();
for
(
BladeVisualConfig
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
return
true
;
}
@Override
@Transactional
public
void
saveBatch
(
List
<
BladeVisualConfig
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
BladeVisualConfig
>
create
=
new
ArrayList
<>();
List
<
BladeVisualConfig
>
update
=
new
ArrayList
<>();
for
(
BladeVisualConfig
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
}
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/avuedata/service/impl/BladeVisualMapServiceImpl.java
浏览文件 @
af2438b4
...
...
@@ -48,6 +48,9 @@ import org.springframework.util.StringUtils;
@Service
(
"BladeVisualMapServiceImpl"
)
public
class
BladeVisualMapServiceImpl
extends
ServiceImpl
<
BladeVisualMapMapper
,
BladeVisualMap
>
implements
IBladeVisualMapService
{
@Autowired
@Lazy
IBladeVisualMapService
proxyService
;
protected
int
batchSize
=
500
;
...
...
@@ -133,21 +136,49 @@ public class BladeVisualMapServiceImpl extends ServiceImpl<BladeVisualMapMapper,
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
return
checkKey
(
et
)
?
proxyService
.
update
(
et
)
:
proxyService
.
create
(
et
);
}
}
@Override
@Transactional
public
boolean
saveBatch
(
Collection
<
BladeVisualMap
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
BladeVisualMap
>
create
=
new
ArrayList
<>();
List
<
BladeVisualMap
>
update
=
new
ArrayList
<>();
for
(
BladeVisualMap
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
return
true
;
}
@Override
@Transactional
public
void
saveBatch
(
List
<
BladeVisualMap
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
BladeVisualMap
>
create
=
new
ArrayList
<>();
List
<
BladeVisualMap
>
update
=
new
ArrayList
<>();
for
(
BladeVisualMap
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
}
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/avuedata/service/impl/BladeVisualServiceImpl.java
浏览文件 @
af2438b4
...
...
@@ -48,6 +48,9 @@ import org.springframework.util.StringUtils;
@Service
(
"BladeVisualServiceImpl"
)
public
class
BladeVisualServiceImpl
extends
ServiceImpl
<
BladeVisualMapper
,
BladeVisual
>
implements
IBladeVisualService
{
@Autowired
@Lazy
IBladeVisualService
proxyService
;
protected
int
batchSize
=
500
;
...
...
@@ -133,21 +136,49 @@ public class BladeVisualServiceImpl extends ServiceImpl<BladeVisualMapper, Blade
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
return
checkKey
(
et
)
?
proxyService
.
update
(
et
)
:
proxyService
.
create
(
et
);
}
}
@Override
@Transactional
public
boolean
saveBatch
(
Collection
<
BladeVisual
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
BladeVisual
>
create
=
new
ArrayList
<>();
List
<
BladeVisual
>
update
=
new
ArrayList
<>();
for
(
BladeVisual
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
return
true
;
}
@Override
@Transactional
public
void
saveBatch
(
List
<
BladeVisual
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
BladeVisual
>
create
=
new
ArrayList
<>();
List
<
BladeVisual
>
update
=
new
ArrayList
<>();
for
(
BladeVisual
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
}
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/extensions/service/MetaRelationshipExService.java
0 → 100644
浏览文件 @
af2438b4
package
cn
.
ibizlab
.
core
.
extensions
.
service
;
import
cn.ibizlab.core.lite.service.impl.MetaRelationshipServiceImpl
;
import
lombok.extern.slf4j.Slf4j
;
import
cn.ibizlab.core.lite.domain.MetaRelationship
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.context.annotation.Primary
;
import
java.util.*
;
/**
* 实体[实体关系] 自定义服务对象
*/
@Slf4j
@Primary
@Service
(
"MetaRelationshipExService"
)
public
class
MetaRelationshipExService
extends
MetaRelationshipServiceImpl
{
@Override
protected
Class
currentModelClass
()
{
return
com
.
baomidou
.
mybatisplus
.
core
.
toolkit
.
ReflectionKit
.
getSuperClassGenericType
(
this
.
getClass
().
getSuperclass
(),
1
);
}
/**
* [InitModel:行为] 行为扩展
* @param et
* @return
*/
@Override
@Transactional
public
MetaRelationship
initModel
(
MetaRelationship
et
)
{
return
super
.
initModel
(
et
);
}
}
ibzlite-core/src/main/java/cn/ibizlab/core/lite/service/IMetaRelationshipService.java
浏览文件 @
af2438b4
...
...
@@ -34,6 +34,8 @@ public interface IMetaRelationshipService extends IService<MetaRelationship> {
MetaRelationship
get
(
String
key
);
MetaRelationship
getDraft
(
MetaRelationship
et
);
boolean
checkKey
(
MetaRelationship
et
);
MetaRelationship
initModel
(
MetaRelationship
et
);
boolean
initModelBatch
(
List
<
MetaRelationship
>
etList
);
boolean
save
(
MetaRelationship
et
);
void
saveBatch
(
List
<
MetaRelationship
>
list
);
Page
<
MetaRelationship
>
searchDefault
(
MetaRelationshipSearchContext
context
);
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/lite/service/impl/DstComponentServiceImpl.java
浏览文件 @
af2438b4
...
...
@@ -54,6 +54,9 @@ public class DstComponentServiceImpl extends ServiceImpl<DstComponentMapper, Dst
@Autowired
@Lazy
protected
cn
.
ibizlab
.
core
.
lite
.
service
.
IMetaEntityService
metaentityService
;
@Autowired
@Lazy
IDstComponentService
proxyService
;
protected
int
batchSize
=
500
;
...
...
@@ -144,7 +147,7 @@ public class DstComponentServiceImpl extends ServiceImpl<DstComponentMapper, Dst
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
return
checkKey
(
et
)
?
proxyService
.
update
(
et
)
:
proxyService
.
create
(
et
);
}
}
...
...
@@ -152,7 +155,21 @@ public class DstComponentServiceImpl extends ServiceImpl<DstComponentMapper, Dst
@Transactional
public
boolean
saveBatch
(
Collection
<
DstComponent
>
list
)
{
list
.
forEach
(
item
->
fillParentData
(
item
));
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
DstComponent
>
create
=
new
ArrayList
<>();
List
<
DstComponent
>
update
=
new
ArrayList
<>();
for
(
DstComponent
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
return
true
;
}
...
...
@@ -160,7 +177,21 @@ public class DstComponentServiceImpl extends ServiceImpl<DstComponentMapper, Dst
@Transactional
public
void
saveBatch
(
List
<
DstComponent
>
list
)
{
list
.
forEach
(
item
->
fillParentData
(
item
));
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
DstComponent
>
create
=
new
ArrayList
<>();
List
<
DstComponent
>
update
=
new
ArrayList
<>();
for
(
DstComponent
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
}
@Override
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/lite/service/impl/DstConfigServiceImpl.java
浏览文件 @
af2438b4
...
...
@@ -51,6 +51,9 @@ public class DstConfigServiceImpl extends ServiceImpl<DstConfigMapper, DstConfig
@Autowired
@Lazy
protected
cn
.
ibizlab
.
core
.
lite
.
service
.
IDstSystemService
dstsystemService
;
@Autowired
@Lazy
IDstConfigService
proxyService
;
protected
int
batchSize
=
500
;
...
...
@@ -152,21 +155,49 @@ public class DstConfigServiceImpl extends ServiceImpl<DstConfigMapper, DstConfig
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
return
checkKey
(
et
)
?
proxyService
.
update
(
et
)
:
proxyService
.
create
(
et
);
}
}
@Override
@Transactional
public
boolean
saveBatch
(
Collection
<
DstConfig
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
DstConfig
>
create
=
new
ArrayList
<>();
List
<
DstConfig
>
update
=
new
ArrayList
<>();
for
(
DstConfig
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getCfgId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getCfgId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
return
true
;
}
@Override
@Transactional
public
void
saveBatch
(
List
<
DstConfig
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
DstConfig
>
create
=
new
ArrayList
<>();
List
<
DstConfig
>
update
=
new
ArrayList
<>();
for
(
DstConfig
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getCfgId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getCfgId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
}
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/lite/service/impl/DstDataSourceServiceImpl.java
浏览文件 @
af2438b4
...
...
@@ -51,6 +51,9 @@ public class DstDataSourceServiceImpl extends ServiceImpl<DstDataSourceMapper, D
@Autowired
@Lazy
protected
cn
.
ibizlab
.
core
.
lite
.
service
.
IMetaEntityService
metaentityService
;
@Autowired
@Lazy
IDstDataSourceService
proxyService
;
protected
int
batchSize
=
500
;
...
...
@@ -168,21 +171,49 @@ public class DstDataSourceServiceImpl extends ServiceImpl<DstDataSourceMapper, D
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
return
checkKey
(
et
)
?
proxyService
.
update
(
et
)
:
proxyService
.
create
(
et
);
}
}
@Override
@Transactional
public
boolean
saveBatch
(
Collection
<
DstDataSource
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
DstDataSource
>
create
=
new
ArrayList
<>();
List
<
DstDataSource
>
update
=
new
ArrayList
<>();
for
(
DstDataSource
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getDsId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getDsId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
return
true
;
}
@Override
@Transactional
public
void
saveBatch
(
List
<
DstDataSource
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
DstDataSource
>
create
=
new
ArrayList
<>();
List
<
DstDataSource
>
update
=
new
ArrayList
<>();
for
(
DstDataSource
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getDsId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getDsId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
}
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/lite/service/impl/DstRouterServiceImpl.java
浏览文件 @
af2438b4
...
...
@@ -53,6 +53,9 @@ public class DstRouterServiceImpl extends ServiceImpl<DstRouterMapper, DstRouter
@Autowired
@Lazy
protected
cn
.
ibizlab
.
core
.
lite
.
service
.
IDstSystemService
dstsystemService
;
@Autowired
@Lazy
IDstRouterService
proxyService
;
protected
int
batchSize
=
500
;
...
...
@@ -138,21 +141,49 @@ public class DstRouterServiceImpl extends ServiceImpl<DstRouterMapper, DstRouter
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
return
checkKey
(
et
)
?
proxyService
.
update
(
et
)
:
proxyService
.
create
(
et
);
}
}
@Override
@Transactional
public
boolean
saveBatch
(
Collection
<
DstRouter
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
DstRouter
>
create
=
new
ArrayList
<>();
List
<
DstRouter
>
update
=
new
ArrayList
<>();
for
(
DstRouter
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
return
true
;
}
@Override
@Transactional
public
void
saveBatch
(
List
<
DstRouter
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
DstRouter
>
create
=
new
ArrayList
<>();
List
<
DstRouter
>
update
=
new
ArrayList
<>();
for
(
DstRouter
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
}
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/lite/service/impl/DstSystemServiceImpl.java
浏览文件 @
af2438b4
...
...
@@ -69,6 +69,9 @@ public class DstSystemServiceImpl extends ServiceImpl<DstSystemMapper, DstSystem
@Autowired
@Lazy
protected
cn
.
ibizlab
.
core
.
lite
.
service
.
IMetaModuleService
metamoduleService
;
@Autowired
@Lazy
IDstSystemService
proxyService
;
protected
int
batchSize
=
500
;
...
...
@@ -170,21 +173,49 @@ public class DstSystemServiceImpl extends ServiceImpl<DstSystemMapper, DstSystem
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
return
checkKey
(
et
)
?
proxyService
.
update
(
et
)
:
proxyService
.
create
(
et
);
}
}
@Override
@Transactional
public
boolean
saveBatch
(
Collection
<
DstSystem
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
DstSystem
>
create
=
new
ArrayList
<>();
List
<
DstSystem
>
update
=
new
ArrayList
<>();
for
(
DstSystem
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getPssystemid
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getPssystemid
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
return
true
;
}
@Override
@Transactional
public
void
saveBatch
(
List
<
DstSystem
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
DstSystem
>
create
=
new
ArrayList
<>();
List
<
DstSystem
>
update
=
new
ArrayList
<>();
for
(
DstSystem
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getPssystemid
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getPssystemid
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
}
@Override
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/lite/service/impl/DstViewServiceImpl.java
浏览文件 @
af2438b4
...
...
@@ -54,6 +54,9 @@ public class DstViewServiceImpl extends ServiceImpl<DstViewMapper, DstView> impl
@Autowired
@Lazy
protected
cn
.
ibizlab
.
core
.
lite
.
service
.
IMetaEntityService
metaentityService
;
@Autowired
@Lazy
IDstViewService
proxyService
;
protected
int
batchSize
=
500
;
...
...
@@ -144,7 +147,7 @@ public class DstViewServiceImpl extends ServiceImpl<DstViewMapper, DstView> impl
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
return
checkKey
(
et
)
?
proxyService
.
update
(
et
)
:
proxyService
.
create
(
et
);
}
}
...
...
@@ -152,7 +155,21 @@ public class DstViewServiceImpl extends ServiceImpl<DstViewMapper, DstView> impl
@Transactional
public
boolean
saveBatch
(
Collection
<
DstView
>
list
)
{
list
.
forEach
(
item
->
fillParentData
(
item
));
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
DstView
>
create
=
new
ArrayList
<>();
List
<
DstView
>
update
=
new
ArrayList
<>();
for
(
DstView
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
return
true
;
}
...
...
@@ -160,7 +177,21 @@ public class DstViewServiceImpl extends ServiceImpl<DstViewMapper, DstView> impl
@Transactional
public
void
saveBatch
(
List
<
DstView
>
list
)
{
list
.
forEach
(
item
->
fillParentData
(
item
));
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
DstView
>
create
=
new
ArrayList
<>();
List
<
DstView
>
update
=
new
ArrayList
<>();
for
(
DstView
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
}
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/lite/service/impl/MetaDataSetServiceImpl.java
浏览文件 @
af2438b4
...
...
@@ -51,6 +51,9 @@ public class MetaDataSetServiceImpl extends ServiceImpl<MetaDataSetMapper, MetaD
@Autowired
@Lazy
protected
cn
.
ibizlab
.
core
.
lite
.
service
.
IMetaEntityService
metaentityService
;
@Autowired
@Lazy
IMetaDataSetService
proxyService
;
protected
int
batchSize
=
500
;
...
...
@@ -141,7 +144,7 @@ public class MetaDataSetServiceImpl extends ServiceImpl<MetaDataSetMapper, MetaD
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
return
checkKey
(
et
)
?
proxyService
.
update
(
et
)
:
proxyService
.
create
(
et
);
}
}
...
...
@@ -149,7 +152,21 @@ public class MetaDataSetServiceImpl extends ServiceImpl<MetaDataSetMapper, MetaD
@Transactional
public
boolean
saveBatch
(
Collection
<
MetaDataSet
>
list
)
{
list
.
forEach
(
item
->
fillParentData
(
item
));
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
MetaDataSet
>
create
=
new
ArrayList
<>();
List
<
MetaDataSet
>
update
=
new
ArrayList
<>();
for
(
MetaDataSet
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getDatasetId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getDatasetId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
return
true
;
}
...
...
@@ -157,7 +174,21 @@ public class MetaDataSetServiceImpl extends ServiceImpl<MetaDataSetMapper, MetaD
@Transactional
public
void
saveBatch
(
List
<
MetaDataSet
>
list
)
{
list
.
forEach
(
item
->
fillParentData
(
item
));
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
MetaDataSet
>
create
=
new
ArrayList
<>();
List
<
MetaDataSet
>
update
=
new
ArrayList
<>();
for
(
MetaDataSet
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getDatasetId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getDatasetId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
}
...
...
@@ -170,9 +201,6 @@ public class MetaDataSetServiceImpl extends ServiceImpl<MetaDataSetMapper, MetaD
this
.
remove
(
new
QueryWrapper
<
MetaDataSet
>().
eq
(
"entityid"
,
entity_id
));
}
@Autowired
@Lazy
IMetaDataSetService
proxyService
;
@Override
public
void
saveByEntityId
(
String
entity_id
,
List
<
MetaDataSet
>
list
)
{
if
(
list
==
null
)
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/lite/service/impl/MetaEntityServiceImpl.java
浏览文件 @
af2438b4
...
...
@@ -72,6 +72,9 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt
@Autowired
@Lazy
protected
cn
.
ibizlab
.
core
.
lite
.
service
.
IMetaModuleService
metamoduleService
;
@Autowired
@Lazy
IMetaEntityService
proxyService
;
protected
int
batchSize
=
500
;
...
...
@@ -194,7 +197,7 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
return
checkKey
(
et
)
?
proxyService
.
update
(
et
)
:
proxyService
.
create
(
et
);
}
}
...
...
@@ -202,7 +205,21 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt
@Transactional
public
boolean
saveBatch
(
Collection
<
MetaEntity
>
list
)
{
list
.
forEach
(
item
->
fillParentData
(
item
));
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
MetaEntity
>
create
=
new
ArrayList
<>();
List
<
MetaEntity
>
update
=
new
ArrayList
<>();
for
(
MetaEntity
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getEntityId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getEntityId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
return
true
;
}
...
...
@@ -210,7 +227,21 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt
@Transactional
public
void
saveBatch
(
List
<
MetaEntity
>
list
)
{
list
.
forEach
(
item
->
fillParentData
(
item
));
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
MetaEntity
>
create
=
new
ArrayList
<>();
List
<
MetaEntity
>
update
=
new
ArrayList
<>();
for
(
MetaEntity
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getEntityId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getEntityId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
}
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/lite/service/impl/MetaFieldServiceImpl.java
浏览文件 @
af2438b4
...
...
@@ -56,6 +56,9 @@ public class MetaFieldServiceImpl extends ServiceImpl<MetaFieldMapper, MetaField
@Autowired
@Lazy
protected
cn
.
ibizlab
.
core
.
lite
.
service
.
IMetaRelationshipService
metarelationshipService
;
@Autowired
@Lazy
IMetaFieldService
proxyService
;
protected
int
batchSize
=
500
;
...
...
@@ -146,7 +149,7 @@ public class MetaFieldServiceImpl extends ServiceImpl<MetaFieldMapper, MetaField
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
return
checkKey
(
et
)
?
proxyService
.
update
(
et
)
:
proxyService
.
create
(
et
);
}
}
...
...
@@ -154,7 +157,21 @@ public class MetaFieldServiceImpl extends ServiceImpl<MetaFieldMapper, MetaField
@Transactional
public
boolean
saveBatch
(
Collection
<
MetaField
>
list
)
{
list
.
forEach
(
item
->
fillParentData
(
item
));
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
MetaField
>
create
=
new
ArrayList
<>();
List
<
MetaField
>
update
=
new
ArrayList
<>();
for
(
MetaField
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getFieldId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getFieldId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
return
true
;
}
...
...
@@ -162,7 +179,21 @@ public class MetaFieldServiceImpl extends ServiceImpl<MetaFieldMapper, MetaField
@Transactional
public
void
saveBatch
(
List
<
MetaField
>
list
)
{
list
.
forEach
(
item
->
fillParentData
(
item
));
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
MetaField
>
create
=
new
ArrayList
<>();
List
<
MetaField
>
update
=
new
ArrayList
<>();
for
(
MetaField
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getFieldId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getFieldId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
}
...
...
@@ -175,9 +206,6 @@ public class MetaFieldServiceImpl extends ServiceImpl<MetaFieldMapper, MetaField
this
.
remove
(
new
QueryWrapper
<
MetaField
>().
eq
(
"entityid"
,
entity_id
));
}
@Autowired
@Lazy
IMetaFieldService
proxyService
;
@Override
public
void
saveByEntityId
(
String
entity_id
,
List
<
MetaField
>
list
)
{
if
(
list
==
null
)
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/lite/service/impl/MetaModelServiceImpl.java
浏览文件 @
af2438b4
...
...
@@ -51,6 +51,9 @@ public class MetaModelServiceImpl extends ServiceImpl<MetaModelMapper, MetaModel
@Autowired
@Lazy
protected
cn
.
ibizlab
.
core
.
lite
.
service
.
IDstSystemService
dstsystemService
;
@Autowired
@Lazy
IMetaModelService
proxyService
;
protected
int
batchSize
=
500
;
...
...
@@ -152,21 +155,49 @@ public class MetaModelServiceImpl extends ServiceImpl<MetaModelMapper, MetaModel
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
return
checkKey
(
et
)
?
proxyService
.
update
(
et
)
:
proxyService
.
create
(
et
);
}
}
@Override
@Transactional
public
boolean
saveBatch
(
Collection
<
MetaModel
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
MetaModel
>
create
=
new
ArrayList
<>();
List
<
MetaModel
>
update
=
new
ArrayList
<>();
for
(
MetaModel
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
return
true
;
}
@Override
@Transactional
public
void
saveBatch
(
List
<
MetaModel
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
MetaModel
>
create
=
new
ArrayList
<>();
List
<
MetaModel
>
update
=
new
ArrayList
<>();
for
(
MetaModel
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
}
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/lite/service/impl/MetaModuleServiceImpl.java
浏览文件 @
af2438b4
...
...
@@ -54,6 +54,9 @@ public class MetaModuleServiceImpl extends ServiceImpl<MetaModuleMapper, MetaMod
@Autowired
@Lazy
protected
cn
.
ibizlab
.
core
.
lite
.
service
.
IDstSystemService
dstsystemService
;
@Autowired
@Lazy
IMetaModuleService
proxyService
;
protected
int
batchSize
=
500
;
...
...
@@ -139,21 +142,49 @@ public class MetaModuleServiceImpl extends ServiceImpl<MetaModuleMapper, MetaMod
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
return
checkKey
(
et
)
?
proxyService
.
update
(
et
)
:
proxyService
.
create
(
et
);
}
}
@Override
@Transactional
public
boolean
saveBatch
(
Collection
<
MetaModule
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
MetaModule
>
create
=
new
ArrayList
<>();
List
<
MetaModule
>
update
=
new
ArrayList
<>();
for
(
MetaModule
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
return
true
;
}
@Override
@Transactional
public
void
saveBatch
(
List
<
MetaModule
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
MetaModule
>
create
=
new
ArrayList
<>();
List
<
MetaModule
>
update
=
new
ArrayList
<>();
for
(
MetaModule
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
}
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/lite/service/impl/MetaRelationshipServiceImpl.java
浏览文件 @
af2438b4
...
...
@@ -54,6 +54,9 @@ public class MetaRelationshipServiceImpl extends ServiceImpl<MetaRelationshipMap
@Autowired
@Lazy
protected
cn
.
ibizlab
.
core
.
lite
.
service
.
IMetaEntityService
metaentityService
;
@Autowired
@Lazy
IMetaRelationshipService
proxyService
;
protected
int
batchSize
=
500
;
...
...
@@ -129,6 +132,22 @@ public class MetaRelationshipServiceImpl extends ServiceImpl<MetaRelationshipMap
public
boolean
checkKey
(
MetaRelationship
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getId
()))
&&
(!
Objects
.
isNull
(
this
.
getById
(
et
.
getId
())));
}
@Override
@Transactional
public
MetaRelationship
initModel
(
MetaRelationship
et
)
{
//自定义代码
return
et
;
}
@Override
@Transactional
public
boolean
initModelBatch
(
List
<
MetaRelationship
>
etList
)
{
for
(
MetaRelationship
et
:
etList
)
{
initModel
(
et
);
}
return
true
;
}
@Override
@Transactional
public
boolean
save
(
MetaRelationship
et
)
{
...
...
@@ -144,7 +163,7 @@ public class MetaRelationshipServiceImpl extends ServiceImpl<MetaRelationshipMap
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
return
checkKey
(
et
)
?
proxyService
.
update
(
et
)
:
proxyService
.
create
(
et
);
}
}
...
...
@@ -152,7 +171,21 @@ public class MetaRelationshipServiceImpl extends ServiceImpl<MetaRelationshipMap
@Transactional
public
boolean
saveBatch
(
Collection
<
MetaRelationship
>
list
)
{
list
.
forEach
(
item
->
fillParentData
(
item
));
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
MetaRelationship
>
create
=
new
ArrayList
<>();
List
<
MetaRelationship
>
update
=
new
ArrayList
<>();
for
(
MetaRelationship
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
return
true
;
}
...
...
@@ -160,7 +193,21 @@ public class MetaRelationshipServiceImpl extends ServiceImpl<MetaRelationshipMap
@Transactional
public
void
saveBatch
(
List
<
MetaRelationship
>
list
)
{
list
.
forEach
(
item
->
fillParentData
(
item
));
saveOrUpdateBatch
(
list
,
batchSize
);
List
<
MetaRelationship
>
create
=
new
ArrayList
<>();
List
<
MetaRelationship
>
update
=
new
ArrayList
<>();
for
(
MetaRelationship
et
:
list
)
{
if
(
ObjectUtils
.
isEmpty
(
et
.
getId
())
||
ObjectUtils
.
isEmpty
(
getById
(
et
.
getId
())))
{
create
.
add
(
et
);
}
else
{
update
.
add
(
et
);
}
}
if
(
create
.
size
()
>
0
)
{
proxyService
.
createBatch
(
create
);
}
if
(
update
.
size
()
>
0
)
{
proxyService
.
updateBatch
(
update
);
}
}
...
...
@@ -173,9 +220,6 @@ public class MetaRelationshipServiceImpl extends ServiceImpl<MetaRelationshipMap
this
.
remove
(
new
QueryWrapper
<
MetaRelationship
>().
eq
(
"entityid"
,
entity_id
));
}
@Autowired
@Lazy
IMetaRelationshipService
proxyService
;
@Override
public
void
saveByEntityId
(
String
entity_id
,
List
<
MetaRelationship
>
list
)
{
if
(
list
==
null
)
...
...
ibzlite-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
af2438b4
...
...
@@ -4,7 +4,7 @@
<!--输出实体[BLADE_VISUAL]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-blade_visual-55-1"
>
<changeSet
author=
"
root
"
id=
"tab-blade_visual-55-1"
>
<createTable
tableName=
"blade_visual"
>
<column
name=
"ID"
remarks=
""
type=
"BIGINT"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_BLADE_VISUAL_ID"
/>
...
...
@@ -36,7 +36,7 @@
<!--输出实体[BLADE_VISUAL_CATEGORY]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-blade_visual_category-23-2"
>
<changeSet
author=
"
root
"
id=
"tab-blade_visual_category-23-2"
>
<createTable
tableName=
"blade_visual_category"
>
<column
name=
"ID"
remarks=
""
type=
"BIGINT"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_BLADE_VISUAL_CATEGORY_ID"
/>
...
...
@@ -52,7 +52,7 @@
<!--输出实体[BLADE_VISUAL_CONFIG]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-blade_visual_config-18-3"
>
<changeSet
author=
"
root
"
id=
"tab-blade_visual_config-18-3"
>
<createTable
tableName=
"blade_visual_config"
>
<column
name=
"ID"
remarks=
""
type=
"BIGINT"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_BLADE_VISUAL_CONFIG_ID"
/>
...
...
@@ -68,7 +68,7 @@
<!--输出实体[BLADE_VISUAL_MAP]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-blade_visual_map-18-4"
>
<changeSet
author=
"
root
"
id=
"tab-blade_visual_map-18-4"
>
<createTable
tableName=
"blade_visual_map"
>
<column
name=
"ID"
remarks=
""
type=
"BIGINT"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_BLADE_VISUAL_MAP_ID"
/>
...
...
@@ -86,7 +86,7 @@
<!--输出实体[DST_COMPONENT]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-dst_component-59-5"
>
<changeSet
author=
"
root
"
id=
"tab-dst_component-59-5"
>
<createTable
tableName=
"IBZCOMPONENT"
>
<column
name=
"CID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_DST_COMPONENT_CID"
/>
...
...
@@ -112,7 +112,7 @@
<!--输出实体[DST_CONFIG]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-dst_config-32-6"
>
<changeSet
author=
"
root
"
id=
"tab-dst_config-32-6"
>
<createTable
tableName=
"IBZCFG"
>
<column
name=
"CFGID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_DST_CONFIG_CFGID"
/>
...
...
@@ -134,7 +134,7 @@
<!--输出实体[DST_DATASOURCE]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-dst_datasource-75-7"
>
<changeSet
author=
"
root
"
id=
"tab-dst_datasource-75-7"
>
<createTable
tableName=
"IBZDATASOURCE"
>
<column
name=
"DSID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_DST_DATASOURCE_DSID"
/>
...
...
@@ -152,7 +152,7 @@
<!--输出实体[DST_ROUTER]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-dst_router-37-8"
>
<changeSet
author=
"
root
"
id=
"tab-dst_router-37-8"
>
<createTable
tableName=
"IBZROUTER"
>
<column
name=
"ROUTERID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_DST_ROUTER_ROUTERID"
/>
...
...
@@ -178,7 +178,7 @@
<!--输出实体[DST_SYSTEM]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-dst_system-41-9"
>
<changeSet
author=
"
root
"
id=
"tab-dst_system-41-9"
>
<createTable
tableName=
"IBZPSSYSTEM"
>
<column
name=
"PSSYSTEMID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_DST_SYSTEM_PSSYSTEMID"
/>
...
...
@@ -198,7 +198,7 @@
<!--输出实体[DST_VIEW]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-dst_view-46-10"
>
<changeSet
author=
"
root
"
id=
"tab-dst_view-46-10"
>
<createTable
tableName=
"IBZVIEW"
>
<column
name=
"VIEWID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_DST_VIEW_VIEWID"
/>
...
...
@@ -222,7 +222,7 @@
<!--输出实体[META_DATASET]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-meta_dataset-33-11"
>
<changeSet
author=
"
root
"
id=
"tab-meta_dataset-33-11"
>
<createTable
tableName=
"IBZDATASET"
>
<column
name=
"DATASETID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_META_DATASET_DATASETID"
/>
...
...
@@ -244,7 +244,7 @@
<!--输出实体[META_ENTITY]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-meta_entity-96-12"
>
<changeSet
author=
"
root
"
id=
"tab-meta_entity-96-12"
>
<createTable
tableName=
"IBZENTITY"
>
<column
name=
"ENTITYID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_META_ENTITY_ENTITYID"
/>
...
...
@@ -276,7 +276,7 @@
<!--输出实体[META_FIELD]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-meta_field-153-13"
>
<changeSet
author=
"
root
"
id=
"tab-meta_field-153-13"
>
<createTable
tableName=
"IBZFIELD"
>
<column
name=
"FIELDID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_META_FIELD_FIELDID"
/>
...
...
@@ -340,7 +340,7 @@
<!--输出实体[META_MODEL]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-meta_model-44-14"
>
<changeSet
author=
"
root
"
id=
"tab-meta_model-44-14"
>
<createTable
tableName=
"IBZMODEL"
>
<column
name=
"MODELID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_META_MODEL_MODELID"
/>
...
...
@@ -366,7 +366,7 @@
<!--输出实体[META_MODULE]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-meta_module-34-15"
>
<changeSet
author=
"
root
"
id=
"tab-meta_module-34-15"
>
<createTable
tableName=
"IBZMODULE"
>
<column
name=
"MODULEID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_META_MODULE_MODULEID"
/>
...
...
@@ -384,7 +384,7 @@
<!--输出实体[META_RELATION]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-meta_relation-103-16"
>
<changeSet
author=
"
root
"
id=
"tab-meta_relation-103-16"
>
<createTable
tableName=
"IBZRELATION"
>
<column
name=
"RELATIONID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_META_RELATION_RELATIONID"
/>
...
...
ibzlite-core/src/main/resources/permission/systemResource.json
浏览文件 @
af2438b4
...
...
@@ -160,7 +160,7 @@
"delogicname"
:
"实体关系"
,
"sysmoudle"
:{
"id"
:
"LITE"
,
"name"
:
"lite"
},
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"数据集"
}],
"deaction"
:[{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
}],
"deaction"
:[{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"
InitModel"
,
"name"
:
"行为"
,
"type"
:
"USERCUSTOM"
},{
"id"
:
"
Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
}],
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
}
],
...
...
ibzlite-dependencies/pom.xml
浏览文件 @
af2438b4
...
...
@@ -31,9 +31,6 @@
<mybatis-plus.version>
3.3.1
</mybatis-plus.version>
<mybatis-plus-dynamic-datasource.version>
3.0.0
</mybatis-plus-dynamic-datasource.version>
<!-- Liquibase -->
<liquibase.version>
3.6.3
</liquibase.version>
<!-- Swagger2 -->
<springfox-swagger.version>
2.9.2
</springfox-swagger.version>
...
...
ibzlite-provider/ibzlite-provider-api/src/main/java/cn/ibizlab/api/rest/MetaRelationshipResource.java
浏览文件 @
af2438b4
...
...
@@ -121,6 +121,23 @@ public class MetaRelationshipResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
metarelationshipService
.
checkKey
(
metarelationshipMapping
.
toDomain
(
metarelationshipdto
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-MetaRelationship-InitModel-all')"
)
@ApiOperation
(
value
=
"行为"
,
tags
=
{
"实体关系"
},
notes
=
"行为"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/metarelationships/{metarelationship_id}/initmodel"
)
public
ResponseEntity
<
MetaRelationshipDTO
>
initModel
(
@PathVariable
(
"metarelationship_id"
)
String
metarelationship_id
,
@RequestBody
MetaRelationshipDTO
metarelationshipdto
)
{
MetaRelationship
domain
=
metarelationshipMapping
.
toDomain
(
metarelationshipdto
);
domain
.
setId
(
metarelationship_id
);
domain
=
metarelationshipService
.
initModel
(
domain
);
metarelationshipdto
=
metarelationshipMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
metarelationshipdto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-MetaRelationship-InitModel-all')"
)
@ApiOperation
(
value
=
"批量处理[行为]"
,
tags
=
{
"实体关系"
},
notes
=
"批量处理[行为]"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/metarelationships/{metarelationship_id}/initmodelbatch"
)
public
ResponseEntity
<
Boolean
>
initModelBatch
(
@RequestBody
List
<
MetaRelationshipDTO
>
metarelationshipdtos
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
metarelationshipService
.
initModelBatch
(
metarelationshipMapping
.
toDomain
(
metarelationshipdtos
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-MetaRelationship-Save-all')"
)
@ApiOperation
(
value
=
"保存实体关系"
,
tags
=
{
"实体关系"
},
notes
=
"保存实体关系"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/metarelationships/save"
)
...
...
@@ -245,6 +262,21 @@ public class MetaRelationshipResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
metarelationshipService
.
checkKey
(
metarelationshipMapping
.
toDomain
(
metarelationshipdto
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-MetaRelationship-InitModel-all')"
)
@ApiOperation
(
value
=
"根据实体实体关系"
,
tags
=
{
"实体关系"
},
notes
=
"根据实体实体关系"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/metaentities/{metaentity_id}/metarelationships/{metarelationship_id}/initmodel"
)
public
ResponseEntity
<
MetaRelationshipDTO
>
initModelByMetaEntity
(
@PathVariable
(
"metaentity_id"
)
String
metaentity_id
,
@PathVariable
(
"metarelationship_id"
)
String
metarelationship_id
,
@RequestBody
MetaRelationshipDTO
metarelationshipdto
)
{
MetaRelationship
domain
=
metarelationshipMapping
.
toDomain
(
metarelationshipdto
);
domain
.
setEntityId
(
metaentity_id
);
domain
=
metarelationshipService
.
initModel
(
domain
)
;
metarelationshipdto
=
metarelationshipMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
metarelationshipdto
);
}
@ApiOperation
(
value
=
"批量处理[根据实体实体关系]"
,
tags
=
{
"实体关系"
},
notes
=
"批量处理[根据实体实体关系]"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/metaentities/{metaentity_id}/metarelationships/{metarelationship_id}/initmodelbatch"
)
public
ResponseEntity
<
Boolean
>
initModelByMetaEntity
(
@PathVariable
(
"metaentity_id"
)
String
metaentity_id
,
@RequestBody
List
<
MetaRelationshipDTO
>
metarelationshipdtos
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
metarelationshipService
.
initModelBatch
(
metarelationshipMapping
.
toDomain
(
metarelationshipdtos
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-MetaRelationship-Save-all')"
)
@ApiOperation
(
value
=
"根据实体保存实体关系"
,
tags
=
{
"实体关系"
},
notes
=
"根据实体保存实体关系"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/metaentities/{metaentity_id}/metarelationships/save"
)
...
...
@@ -375,6 +407,21 @@ public class MetaRelationshipResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
metarelationshipService
.
checkKey
(
metarelationshipMapping
.
toDomain
(
metarelationshipdto
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-MetaRelationship-InitModel-all')"
)
@ApiOperation
(
value
=
"根据系统实体实体关系"
,
tags
=
{
"实体关系"
},
notes
=
"根据系统实体实体关系"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/dstsystems/{dstsystem_id}/metaentities/{metaentity_id}/metarelationships/{metarelationship_id}/initmodel"
)
public
ResponseEntity
<
MetaRelationshipDTO
>
initModelByDstSystemMetaEntity
(
@PathVariable
(
"dstsystem_id"
)
String
dstsystem_id
,
@PathVariable
(
"metaentity_id"
)
String
metaentity_id
,
@PathVariable
(
"metarelationship_id"
)
String
metarelationship_id
,
@RequestBody
MetaRelationshipDTO
metarelationshipdto
)
{
MetaRelationship
domain
=
metarelationshipMapping
.
toDomain
(
metarelationshipdto
);
domain
.
setEntityId
(
metaentity_id
);
domain
=
metarelationshipService
.
initModel
(
domain
)
;
metarelationshipdto
=
metarelationshipMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
metarelationshipdto
);
}
@ApiOperation
(
value
=
"批量处理[根据系统实体实体关系]"
,
tags
=
{
"实体关系"
},
notes
=
"批量处理[根据系统实体实体关系]"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/dstsystems/{dstsystem_id}/metaentities/{metaentity_id}/metarelationships/{metarelationship_id}/initmodelbatch"
)
public
ResponseEntity
<
Boolean
>
initModelByDstSystemMetaEntity
(
@PathVariable
(
"dstsystem_id"
)
String
dstsystem_id
,
@PathVariable
(
"metaentity_id"
)
String
metaentity_id
,
@RequestBody
List
<
MetaRelationshipDTO
>
metarelationshipdtos
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
metarelationshipService
.
initModelBatch
(
metarelationshipMapping
.
toDomain
(
metarelationshipdtos
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-MetaRelationship-Save-all')"
)
@ApiOperation
(
value
=
"根据系统实体保存实体关系"
,
tags
=
{
"实体关系"
},
notes
=
"根据系统实体保存实体关系"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/dstsystems/{dstsystem_id}/metaentities/{metaentity_id}/metarelationships/save"
)
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录