Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzdst
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzdst
提交
27f9e1f1
提交
27f9e1f1
编写于
12月 12, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibiz4j 发布系统代码 [ibz-dst,应用]
上级
771229c4
变更
8
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
161 行增加
和
19 行删除
+161
-19
meta-entitys.ts
app_web/src/mock/entity/meta-entitys/meta-entitys.ts
+57
-0
meta-entity-service-base.ts
app_web/src/service/meta-entity/meta-entity-service-base.ts
+20
-0
MetaEntityExService.java
.../ibizlab/core/extensions/service/MetaEntityExService.java
+35
-0
IMetaEntityService.java
...java/cn/ibizlab/core/lite/service/IMetaEntityService.java
+1
-0
MetaEntityServiceImpl.java
...ibizlab/core/lite/service/impl/MetaEntityServiceImpl.java
+7
-0
h2_table.xml
ibzdst-core/src/main/resources/liquibase/h2_table.xml
+18
-18
systemResource.json
...st-core/src/main/resources/permission/systemResource.json
+1
-1
MetaEntityResource.java
...src/main/java/cn/ibizlab/api/rest/MetaEntityResource.java
+22
-0
未找到文件。
app_web/src/mock/entity/meta-entitys/meta-entitys.ts
浏览文件 @
27f9e1f1
...
...
@@ -362,6 +362,7 @@ mock.onPost(new RegExp(/^\/metaentities\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).
return
[
status
,
data
];
});
// Save
mock
.
onPost
(
new
RegExp
(
/^
\/
dstsystems
\/([
a-zA-Z0-9
\-\;]{1,35})\/
metaentities
\/([
a-zA-Z0-9
\-\;]{1,35})\/
save$/
)).
reply
((
config
:
any
)
=>
{
...
...
@@ -649,3 +650,59 @@ mock.onGet(new RegExp(/^\/metaentities\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((confi
console
.
groupEnd
();
return
[
status
,
_items
?
_items
:{}];
});
// GetDefaultModel
mock
.
onGet
(
new
RegExp
(
/^
\/
dstsystems
\/([
a-zA-Z0-9
\-\;]{1,35})\/
metaentities
\/([
a-zA-Z0-9
\-\;]{1,35})\/
getdefaultmodel$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:metaentity 方法: GetDefaultModel"
);
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'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
dstsystems
\/([
a-zA-Z0-9
\-\;]{1,35})\/
metaentities
\/([
a-zA-Z0-9
\-\;]{1,35})\/
getdefaultmodel$/
).
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
.
entity_id
,
tempValue
.
entity_id
));
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
?
_items
:{});
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
?
_items
:{}];
});
// GetDefaultModel
mock
.
onGet
(
new
RegExp
(
/^
\/
metaentities
\/([
a-zA-Z0-9
\-\;]{1,35})\/
getdefaultmodel$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:metaentity 方法: GetDefaultModel"
);
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'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
metaentities
\/([
a-zA-Z0-9
\-\;]{1,35})\/
getdefaultmodel$/
).
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
.
entity_id
,
tempValue
.
entity_id
));
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
?
_items
:{});
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
?
_items
:{}];
});
app_web/src/service/meta-entity/meta-entity-service-base.ts
浏览文件 @
27f9e1f1
...
...
@@ -207,6 +207,26 @@ export default class MetaEntityServiceBase extends EntityService {
return
res
;
}
/**
* GetDefaultModel接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MetaEntityServiceBase
*/
public
async
GetDefaultModel
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
dstsystem
&&
context
.
metaentity
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/dstsystems/
${
context
.
dstsystem
}
/metaentities/
${
context
.
metaentity
}
/getdefaultmodel`
,
isloading
);
return
res
;
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/metaentities/
${
context
.
metaentity
}
/getdefaultmodel`
,
isloading
);
return
res
;
}
/**
* Save接口方法
*
...
...
ibzdst-core/src/main/java/cn/ibizlab/core/extensions/service/MetaEntityExService.java
0 → 100644
浏览文件 @
27f9e1f1
package
cn
.
ibizlab
.
core
.
extensions
.
service
;
import
cn.ibizlab.core.lite.service.impl.MetaEntityServiceImpl
;
import
lombok.extern.slf4j.Slf4j
;
import
cn.ibizlab.core.lite.domain.MetaEntity
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.context.annotation.Primary
;
import
java.util.*
;
/**
* 实体[实体] 自定义服务对象
*/
@Slf4j
@Primary
@Service
(
"MetaEntityExService"
)
public
class
MetaEntityExService
extends
MetaEntityServiceImpl
{
@Override
protected
Class
currentModelClass
()
{
return
com
.
baomidou
.
mybatisplus
.
core
.
toolkit
.
ReflectionKit
.
getSuperClassGenericType
(
this
.
getClass
().
getSuperclass
(),
1
);
}
/**
* [GetDefaultModel:GetDefaultModel] 行为扩展
* @param et
* @return
*/
@Override
@Transactional
public
MetaEntity
getDefaultModel
(
MetaEntity
et
)
{
return
super
.
getDefaultModel
(
et
);
}
}
ibzdst-core/src/main/java/cn/ibizlab/core/lite/service/IMetaEntityService.java
浏览文件 @
27f9e1f1
...
...
@@ -34,6 +34,7 @@ public interface IMetaEntityService extends IService<MetaEntity> {
MetaEntity
get
(
String
key
);
MetaEntity
getDraft
(
MetaEntity
et
);
boolean
checkKey
(
MetaEntity
et
);
MetaEntity
getDefaultModel
(
MetaEntity
et
);
boolean
save
(
MetaEntity
et
);
void
saveBatch
(
List
<
MetaEntity
>
list
);
Page
<
MetaEntity
>
searchDefault
(
MetaEntitySearchContext
context
);
...
...
ibzdst-core/src/main/java/cn/ibizlab/core/lite/service/impl/MetaEntityServiceImpl.java
浏览文件 @
27f9e1f1
...
...
@@ -157,6 +157,13 @@ public class MetaEntityServiceImpl extends ServiceImpl<MetaEntityMapper, MetaEnt
public
boolean
checkKey
(
MetaEntity
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getEntityId
()))
&&
(!
Objects
.
isNull
(
this
.
getById
(
et
.
getEntityId
())));
}
@Override
@Transactional
public
MetaEntity
getDefaultModel
(
MetaEntity
et
)
{
//自定义代码
return
et
;
}
@Override
@Transactional
public
boolean
save
(
MetaEntity
et
)
{
...
...
ibzdst-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
27f9e1f1
...
...
@@ -4,7 +4,7 @@
<!--输出实体[DA_BUILD]数据结构 -->
<changeSet
author=
"
root
"
id=
"tab-da_build-45-1"
>
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-da_build-45-1"
>
<createTable
tableName=
"IBZDABUILD"
>
<column
name=
"BUILDID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_DA_BUILD_BUILDID"
/>
...
...
@@ -26,7 +26,7 @@
<!--输出实体[DA_CHART]数据结构 -->
<changeSet
author=
"
root
"
id=
"tab-da_chart-22-2"
>
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-da_chart-22-2"
>
<createTable
tableName=
"IBZDACHART"
>
<column
name=
"CHARTID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_DA_CHART_CHARTID"
/>
...
...
@@ -48,7 +48,7 @@
<!--输出实体[DA_METRIC]数据结构 -->
<changeSet
author=
"
root
"
id=
"tab-da_metric-59-3"
>
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-da_metric-59-3"
>
<createTable
tableName=
"IBZDAMETRIC"
>
<column
name=
"DA_METRICID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_DA_METRIC_DA_METRICID"
/>
...
...
@@ -76,7 +76,7 @@
<!--输出实体[DA_REPORT]数据结构 -->
<changeSet
author=
"
root
"
id=
"tab-da_report-24-4"
>
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-da_report-24-4"
>
<createTable
tableName=
"IBZDAREPORT"
>
<column
name=
"REPORTID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_DA_REPORT_REPORTID"
/>
...
...
@@ -98,7 +98,7 @@
<!--输出实体[DST_DATASOURCE]数据结构 -->
<changeSet
author=
"
root
"
id=
"tab-dst_datasource-6-5"
>
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-dst_datasource-6-5"
>
<createTable
tableName=
"IBZDATASOURCE"
>
<column
name=
"DSID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_DST_DATASOURCE_DSID"
/>
...
...
@@ -114,7 +114,7 @@
<!--输出实体[DST_SYSTEM]数据结构 -->
<changeSet
author=
"
root
"
id=
"tab-dst_system-5-6"
>
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-dst_system-5-6"
>
<createTable
tableName=
"IBZPSSYSTEM"
>
<column
name=
"PSSYSTEMID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_DST_SYSTEM_PSSYSTEMID"
/>
...
...
@@ -134,7 +134,7 @@
<!--输出实体[RU_EXECLOG]数据结构 -->
<changeSet
author=
"
root
"
id=
"tab-ru_execlog-31-7"
>
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-ru_execlog-31-7"
>
<createTable
tableName=
"IBZRULELOG"
>
<column
name=
"RU_EXECLOGID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_RU_EXECLOG_RU_EXECLOGID"
/>
...
...
@@ -164,7 +164,7 @@
<!--输出实体[RU_EXECRESULT]数据结构 -->
<changeSet
author=
"
root
"
id=
"tab-ru_execresult-43-8"
>
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-ru_execresult-43-8"
>
<createTable
tableName=
"IBZRULERESULT"
>
<column
name=
"RU_EXECRESULTID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_RU_EXECRESULT_RU_EXECRESULT"
/>
...
...
@@ -204,7 +204,7 @@
<!--输出实体[META_DATASET]数据结构 -->
<changeSet
author=
"
root
"
id=
"tab-meta_dataset-2-9"
>
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-meta_dataset-2-9"
>
<createTable
tableName=
"IBZDATASET"
>
<column
name=
"DATASETID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_META_DATASET_DATASETID"
/>
...
...
@@ -226,7 +226,7 @@
<!--输出实体[META_ENTITY]数据结构 -->
<changeSet
author=
"
root"
id=
"tab-meta_entity-12
-10"
>
<changeSet
author=
"
a_A_5d9d78509"
id=
"tab-meta_entity-13
-10"
>
<createTable
tableName=
"IBZENTITY"
>
<column
name=
"ENTITYID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_META_ENTITY_ENTITYID"
/>
...
...
@@ -258,7 +258,7 @@
<!--输出实体[META_FIELD]数据结构 -->
<changeSet
author=
"
root
"
id=
"tab-meta_field-7-11"
>
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-meta_field-7-11"
>
<createTable
tableName=
"IBZFIELD"
>
<column
name=
"FIELDID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_META_FIELD_FIELDID"
/>
...
...
@@ -322,7 +322,7 @@
<!--输出实体[META_MODEL]数据结构 -->
<changeSet
author=
"
root
"
id=
"tab-meta_model-18-12"
>
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-meta_model-18-12"
>
<createTable
tableName=
"IBZMODEL"
>
<column
name=
"MODELID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_META_MODEL_MODELID"
/>
...
...
@@ -348,7 +348,7 @@
<!--输出实体[META_MODULE]数据结构 -->
<changeSet
author=
"
root
"
id=
"tab-meta_module-7-13"
>
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-meta_module-7-13"
>
<createTable
tableName=
"IBZMODULE"
>
<column
name=
"MODULEID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_META_MODULE_MODULEID"
/>
...
...
@@ -366,7 +366,7 @@
<!--输出实体[META_RELATION]数据结构 -->
<changeSet
author=
"
root
"
id=
"tab-meta_relation-6-14"
>
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-meta_relation-6-14"
>
<createTable
tableName=
"IBZRELATION"
>
<column
name=
"RELATIONID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_META_RELATION_RELATIONID"
/>
...
...
@@ -398,7 +398,7 @@
<!--输出实体[RU_ENGINE]数据结构 -->
<changeSet
author=
"
root
"
id=
"tab-ru_engine-29-15"
>
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-ru_engine-29-15"
>
<createTable
tableName=
"IBZRULEENGINE"
>
<column
name=
"ENGINEID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_RU_ENGINE_ENGINEID"
/>
...
...
@@ -420,7 +420,7 @@
<!--输出实体[RU_ITEM]数据结构 -->
<changeSet
author=
"
root
"
id=
"tab-ru_item-68-16"
>
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-ru_item-68-16"
>
<createTable
tableName=
"IBZRULE"
>
<column
name=
"RULEID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_RU_ITEM_RULEID"
/>
...
...
@@ -457,7 +457,7 @@
<!--输出实体[DA_BUILD]外键关系 -->
<!--输出实体[DA_CHART]外键关系 -->
<!--输出实体[DA_METRIC]外键关系 -->
<changeSet
author=
"
root
"
id=
"fk-da_metric-59-17"
>
<changeSet
author=
"
a_A_5d9d78509
"
id=
"fk-da_metric-59-17"
>
<addForeignKeyConstraint
baseColumnNames=
"BUILDID"
baseTableName=
"IBZDAMETRIC"
constraintName=
"DER1N_DA_METRIC_DA_BUILD_BUILD"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"BUILDID"
referencedTableName=
"IBZDABUILD"
validate=
"true"
/>
</changeSet>
<!--输出实体[DA_REPORT]外键关系 -->
...
...
@@ -465,7 +465,7 @@
<!--输出实体[DST_SYSTEM]外键关系 -->
<!--输出实体[RU_EXECLOG]外键关系 -->
<!--输出实体[RU_EXECRESULT]外键关系 -->
<changeSet
author=
"
root
"
id=
"fk-ru_execresult-43-18"
>
<changeSet
author=
"
a_A_5d9d78509
"
id=
"fk-ru_execresult-43-18"
>
<addForeignKeyConstraint
baseColumnNames=
"RULEID"
baseTableName=
"IBZRULERESULT"
constraintName=
"DER1N_RU_EXECRESULT_RU_ITEM_RU"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"RULEID"
referencedTableName=
"IBZRULE"
validate=
"true"
/>
</changeSet>
<!--输出实体[META_DATASET]外键关系 -->
...
...
ibzdst-core/src/main/resources/permission/systemResource.json
浏览文件 @
27f9e1f1
...
...
@@ -96,7 +96,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"
:
"
GetDefaultModel"
,
"name"
:
"GetDefaultModel"
,
"type"
:
"USERCUSTOM"
},{
"id"
:
"
Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
}],
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
}
,
{
...
...
ibzdst-provider/ibzdst-provider-api/src/main/java/cn/ibizlab/api/rest/MetaEntityResource.java
浏览文件 @
27f9e1f1
...
...
@@ -121,6 +121,17 @@ public class MetaEntityResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
metaentityService
.
checkKey
(
metaentityMapping
.
toDomain
(
metaentitydto
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzdst-MetaEntity-GetDefaultModel-all')"
)
@ApiOperation
(
value
=
"GetDefaultModel"
,
tags
=
{
"实体"
},
notes
=
"GetDefaultModel"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/metaentities/{metaentity_id}/getdefaultmodel"
)
public
ResponseEntity
<
MetaEntityDTO
>
getDefaultModel
(
@PathVariable
(
"metaentity_id"
)
String
metaentity_id
,
@RequestBody
MetaEntityDTO
metaentitydto
)
{
MetaEntity
domain
=
metaentityMapping
.
toDomain
(
metaentitydto
);
domain
.
setEntityId
(
metaentity_id
);
domain
=
metaentityService
.
getDefaultModel
(
domain
);
metaentitydto
=
metaentityMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
metaentitydto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzdst-MetaEntity-Save-all')"
)
@ApiOperation
(
value
=
"保存实体"
,
tags
=
{
"实体"
},
notes
=
"保存实体"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/metaentities/save"
)
...
...
@@ -245,6 +256,17 @@ public class MetaEntityResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
metaentityService
.
checkKey
(
metaentityMapping
.
toDomain
(
metaentitydto
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzdst-MetaEntity-GetDefaultModel-all')"
)
@ApiOperation
(
value
=
"根据系统实体"
,
tags
=
{
"实体"
},
notes
=
"根据系统实体"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/dstsystems/{dstsystem_id}/metaentities/{metaentity_id}/getdefaultmodel"
)
public
ResponseEntity
<
MetaEntityDTO
>
getDefaultModelByDstSystem
(
@PathVariable
(
"dstsystem_id"
)
String
dstsystem_id
,
@PathVariable
(
"metaentity_id"
)
String
metaentity_id
,
@RequestBody
MetaEntityDTO
metaentitydto
)
{
MetaEntity
domain
=
metaentityMapping
.
toDomain
(
metaentitydto
);
domain
.
setSystemId
(
dstsystem_id
);
domain
=
metaentityService
.
getDefaultModel
(
domain
)
;
metaentitydto
=
metaentityMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
metaentitydto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzdst-MetaEntity-Save-all')"
)
@ApiOperation
(
value
=
"根据系统保存实体"
,
tags
=
{
"实体"
},
notes
=
"根据系统保存实体"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/dstsystems/{dstsystem_id}/metaentities/save"
)
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录