Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzlite
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzlite
提交
d73329f8
提交
d73329f8
编写于
9月 21, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibiz4j 发布系统代码
上级
5db504d5
变更
11
显示空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
201 行增加
和
23 行删除
+201
-23
dst-components.ts
app_web/src/mock/entity/dst-components/dst-components.ts
+92
-0
dst-component-service-base.ts
...b/src/service/dst-component/dst-component-service-base.ts
+28
-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
-14
DstComponentExService.java
...bizlab/core/extensions/service/DstComponentExService.java
+35
-0
IDstComponentService.java
...va/cn/ibizlab/core/lite/service/IDstComponentService.java
+1
-0
DstComponentServiceImpl.java
...izlab/core/lite/service/impl/DstComponentServiceImpl.java
+7
-0
h2_table.xml
ibzlite-core/src/main/resources/liquibase/h2_table.xml
+2
-2
systemResource.json
...te-core/src/main/resources/permission/systemResource.json
+1
-1
DstComponentResource.java
...c/main/java/cn/ibizlab/api/rest/DstComponentResource.java
+33
-0
未找到文件。
app_web/src/mock/entity/dst-components/dst-components.ts
浏览文件 @
d73329f8
...
@@ -584,6 +584,98 @@ mock.onPost(new RegExp(/^\/dstcomponents\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).rep
...
@@ -584,6 +584,98 @@ mock.onPost(new RegExp(/^\/dstcomponents\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).rep
});
});
// Sync
mock
.
onPost
(
new
RegExp
(
/^
\/
dstsystems
\/([
a-zA-Z0-9
\-\;]{1,35})\/
dstapps
\/([
a-zA-Z0-9
\-\;]{1,35})\/
dstcomponents
\/([
a-zA-Z0-9
\-\;]{1,35})\/
sync$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:dstcomponent 方法: Sync"
);
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'
,
'id'
,
'id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
dstsystems
\/([
a-zA-Z0-9
\-\;]{1,35})\/
dstapps
\/([
a-zA-Z0-9
\-\;]{1,35})\/
dstcomponents
\/([
a-zA-Z0-9
\-\;]{1,35})\/
sync$/
).
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
,
{}];
});
// Sync
mock
.
onPost
(
new
RegExp
(
/^
\/
dstapps
\/([
a-zA-Z0-9
\-\;]{1,35})\/
dstcomponents
\/([
a-zA-Z0-9
\-\;]{1,35})\/
sync$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:dstcomponent 方法: Sync"
);
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'
,
'id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
dstapps
\/([
a-zA-Z0-9
\-\;]{1,35})\/
dstcomponents
\/([
a-zA-Z0-9
\-\;]{1,35})\/
sync$/
).
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
,
{}];
});
// Sync
mock
.
onPost
(
new
RegExp
(
/^
\/
dstcomponents
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
sync$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:dstcomponent 方法: Sync"
);
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
(
/^
\/
dstcomponents
\/([
a-zA-Z0-9
\-\;]{1,35})\/
sync$/
).
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
];
});
// FetchDefault
// FetchDefault
mock
.
onGet
(
new
RegExp
(
/^
\/
dstsystems
\/([
a-zA-Z0-9
\-\;]{1,35})\/
dstapps
\/([
a-zA-Z0-9
\-\;]{1,35})\/
dstcomponents
\/
fetchdefault$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onGet
(
new
RegExp
(
/^
\/
dstsystems
\/([
a-zA-Z0-9
\-\;]{1,35})\/
dstapps
\/([
a-zA-Z0-9
\-\;]{1,35})\/
dstcomponents
\/
fetchdefault$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:dstcomponent 方法: FetchDefault"
);
console
.
groupCollapsed
(
"实体:dstcomponent 方法: FetchDefault"
);
...
...
app_web/src/service/dst-component/dst-component-service-base.ts
浏览文件 @
d73329f8
...
@@ -280,6 +280,34 @@ export default class DstComponentServiceBase extends EntityService {
...
@@ -280,6 +280,34 @@ export default class DstComponentServiceBase extends EntityService {
return
res
;
return
res
;
}
}
/**
* Sync接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DstComponentServiceBase
*/
public
async
Sync
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
dstsystem
&&
context
.
dstapp
&&
context
.
dstcomponent
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/dstsystems/
${
context
.
dstsystem
}
/dstapps/
${
context
.
dstapp
}
/dstcomponents/
${
context
.
dstcomponent
}
/sync`
,
data
,
isloading
);
return
res
;
}
if
(
context
.
dstapp
&&
context
.
dstcomponent
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/dstapps/
${
context
.
dstapp
}
/dstcomponents/
${
context
.
dstcomponent
}
/sync`
,
data
,
isloading
);
return
res
;
}
let
res
:
any
=
Http
.
getInstance
().
post
(
`/dstcomponents/
${
context
.
dstcomponent
}
/sync`
,
data
,
isloading
);
return
res
;
}
/**
/**
* FetchDefault接口方法
* FetchDefault接口方法
*
*
...
...
config.xml
浏览文件 @
d73329f8
...
@@ -37,11 +37,6 @@
...
@@ -37,11 +37,6 @@
git clone -b master $para2 ibzlite/
git clone -b master $para2 ibzlite/
export NODE_OPTIONS=--max-old-space-size=4096
export NODE_OPTIONS=--max-old-space-size=4096
cd ibzlite/
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>
</command>
</hudson.tasks.Shell>
</hudson.tasks.Shell>
</builders>
</builders>
...
...
ibzlite-app/ibzlite-app-web/src/main/docker/Dockerfile
浏览文件 @
d73329f8
...
@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
...
@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzlite-app-web.jar
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
ADD
ibzlite-app-web.jar /ibzlite-app-web.jar
ibzlite-app/ibzlite-app-web/src/main/docker/ibzlite-app-web.yaml
浏览文件 @
d73329f8
...
@@ -3,22 +3,9 @@ services:
...
@@ -3,22 +3,9 @@ services:
ibzlite-app-web
:
ibzlite-app-web
:
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/ibzlite-app-web:latest
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/ibzlite-app-web:latest
ports
:
ports
:
-
"
30010:3001
0"
-
"
8080:808
0"
networks
:
networks
:
-
agent_network
-
agent_network
environment
:
-
SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.180.237
-
SERVER_PORT=30010
-
SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.102.211:8848
-
SPRING_REDIS_HOST=172.16.100.243
-
SPRING_REDIS_PORT=6379
-
SPRING_REDIS_DATABASE=0
-
SPRING_DATASOURCE_USERNAME=a_A_5d9d78509
-
SPRING_DATASOURCE_PASSWORD=@6dEfb3@
-
SPRING_DATASOURCE_URL=jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
-
SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
-
SPRING_DATASOURCE_DEFAULTSCHEMA=a_A_5d9d78509
-
NACOS=172.16.102.211:8848
deploy
:
deploy
:
resources
:
resources
:
limits
:
limits
:
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/extensions/service/DstComponentExService.java
0 → 100644
浏览文件 @
d73329f8
package
cn
.
ibizlab
.
core
.
extensions
.
service
;
import
cn.ibizlab.core.lite.service.impl.DstComponentServiceImpl
;
import
lombok.extern.slf4j.Slf4j
;
import
cn.ibizlab.core.lite.domain.DstComponent
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.context.annotation.Primary
;
import
java.util.*
;
/**
* 实体[组件] 自定义服务对象
*/
@Slf4j
@Primary
@Service
(
"DstComponentExService"
)
public
class
DstComponentExService
extends
DstComponentServiceImpl
{
@Override
protected
Class
currentModelClass
()
{
return
com
.
baomidou
.
mybatisplus
.
core
.
toolkit
.
ReflectionKit
.
getSuperClassGenericType
(
this
.
getClass
().
getSuperclass
(),
1
);
}
/**
* 自定义行为[Sync]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public
DstComponent
sync
(
DstComponent
et
)
{
return
super
.
sync
(
et
);
}
}
ibzlite-core/src/main/java/cn/ibizlab/core/lite/service/IDstComponentService.java
浏览文件 @
d73329f8
...
@@ -37,6 +37,7 @@ public interface IDstComponentService extends IService<DstComponent>{
...
@@ -37,6 +37,7 @@ public interface IDstComponentService extends IService<DstComponent>{
boolean
checkKey
(
DstComponent
et
)
;
boolean
checkKey
(
DstComponent
et
)
;
boolean
save
(
DstComponent
et
)
;
boolean
save
(
DstComponent
et
)
;
void
saveBatch
(
List
<
DstComponent
>
list
)
;
void
saveBatch
(
List
<
DstComponent
>
list
)
;
DstComponent
sync
(
DstComponent
et
)
;
Page
<
DstComponent
>
searchDefault
(
DstComponentSearchContext
context
)
;
Page
<
DstComponent
>
searchDefault
(
DstComponentSearchContext
context
)
;
List
<
DstComponent
>
selectByAppId
(
String
id
)
;
List
<
DstComponent
>
selectByAppId
(
String
id
)
;
void
removeByAppId
(
String
id
)
;
void
removeByAppId
(
String
id
)
;
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/lite/service/impl/DstComponentServiceImpl.java
浏览文件 @
d73329f8
...
@@ -160,6 +160,13 @@ public class DstComponentServiceImpl extends ServiceImpl<DstComponentMapper, Dst
...
@@ -160,6 +160,13 @@ public class DstComponentServiceImpl extends ServiceImpl<DstComponentMapper, Dst
saveOrUpdateBatch
(
list
,
batchSize
);
saveOrUpdateBatch
(
list
,
batchSize
);
}
}
@Override
@Transactional
public
DstComponent
sync
(
DstComponent
et
)
{
//自定义代码
return
et
;
}
@Override
@Override
public
List
<
DstComponent
>
selectByAppId
(
String
id
)
{
public
List
<
DstComponent
>
selectByAppId
(
String
id
)
{
...
...
ibzlite-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
d73329f8
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<!--输出实体[DST_COMPONENT]数据结构 -->
<!--输出实体[DST_COMPONENT]数据结构 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-dst_component-4
8
-1"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-dst_component-4
9
-1"
>
<createTable
tableName=
"IBZCOMPONENT"
>
<createTable
tableName=
"IBZCOMPONENT"
>
<column
name=
"CID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"CID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_DST_COMPONENT_CID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_DST_COMPONENT_CID"
/>
...
@@ -297,7 +297,7 @@
...
@@ -297,7 +297,7 @@
</changeSet>
</changeSet>
<!--输出实体[DST_COMPONENT]外键关系 -->
<!--输出实体[DST_COMPONENT]外键关系 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"fk-dst_component-4
8
-13"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"fk-dst_component-4
9
-13"
>
<addForeignKeyConstraint
baseColumnNames=
"ENTITYID"
baseTableName=
"IBZCOMPONENT"
constraintName=
"DER1N_DST_COMPONENT_META_ENTIT"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ENTITYID"
referencedTableName=
"IBZENTITY"
validate=
"true"
/>
<addForeignKeyConstraint
baseColumnNames=
"ENTITYID"
baseTableName=
"IBZCOMPONENT"
constraintName=
"DER1N_DST_COMPONENT_META_ENTIT"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"ENTITYID"
referencedTableName=
"IBZENTITY"
validate=
"true"
/>
</changeSet>
</changeSet>
<!--输出实体[DST_CONFIG]外键关系 -->
<!--输出实体[DST_CONFIG]外键关系 -->
...
...
ibzlite-core/src/main/resources/permission/systemResource.json
浏览文件 @
d73329f8
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
"delogicname"
:
"组件"
,
"delogicname"
:
"组件"
,
"sysmoudle"
:{
"id"
:
"LITE"
,
"name"
:
"lite"
},
"sysmoudle"
:{
"id"
:
"LITE"
,
"name"
:
"lite"
},
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"数据集"
}],
"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"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
}
,{
"id"
:
"Sync"
,
"name"
:
"Sync"
,
"type"
:
"USERCUSTOM"
}
],
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
}
}
,
{
,
{
...
...
ibzlite-provider/ibzlite-provider-api/src/main/java/cn/ibizlab/api/rest/DstComponentResource.java
浏览文件 @
d73329f8
...
@@ -135,6 +135,17 @@ public class DstComponentResource {
...
@@ -135,6 +135,17 @@ public class DstComponentResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-DstComponent-Sync-all')"
)
@ApiOperation
(
value
=
"Sync"
,
tags
=
{
"组件"
},
notes
=
"Sync"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/dstcomponents/{dstcomponent_id}/sync"
)
public
ResponseEntity
<
DstComponentDTO
>
sync
(
@PathVariable
(
"dstcomponent_id"
)
String
dstcomponent_id
,
@RequestBody
DstComponentDTO
dstcomponentdto
)
{
DstComponent
domain
=
dstcomponentMapping
.
toDomain
(
dstcomponentdto
);
domain
.
setId
(
dstcomponent_id
);
domain
=
dstcomponentService
.
sync
(
domain
);
dstcomponentdto
=
dstcomponentMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dstcomponentdto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-DstComponent-searchDefault-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-DstComponent-searchDefault-all')"
)
@ApiOperation
(
value
=
"获取数据集"
,
tags
=
{
"组件"
}
,
notes
=
"获取数据集"
)
@ApiOperation
(
value
=
"获取数据集"
,
tags
=
{
"组件"
}
,
notes
=
"获取数据集"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/dstcomponents/fetchdefault"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/dstcomponents/fetchdefault"
)
...
@@ -262,6 +273,17 @@ public class DstComponentResource {
...
@@ -262,6 +273,17 @@ public class DstComponentResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-DstComponent-Sync-all')"
)
@ApiOperation
(
value
=
"根据应用组件"
,
tags
=
{
"组件"
},
notes
=
"根据应用组件"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/dstapps/{dstapp_id}/dstcomponents/{dstcomponent_id}/sync"
)
public
ResponseEntity
<
DstComponentDTO
>
syncByDstApp
(
@PathVariable
(
"dstapp_id"
)
String
dstapp_id
,
@PathVariable
(
"dstcomponent_id"
)
String
dstcomponent_id
,
@RequestBody
DstComponentDTO
dstcomponentdto
)
{
DstComponent
domain
=
dstcomponentMapping
.
toDomain
(
dstcomponentdto
);
domain
.
setAppId
(
dstapp_id
);
domain
=
dstcomponentService
.
sync
(
domain
)
;
dstcomponentdto
=
dstcomponentMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dstcomponentdto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-DstComponent-searchDefault-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-DstComponent-searchDefault-all')"
)
@ApiOperation
(
value
=
"根据应用获取数据集"
,
tags
=
{
"组件"
}
,
notes
=
"根据应用获取数据集"
)
@ApiOperation
(
value
=
"根据应用获取数据集"
,
tags
=
{
"组件"
}
,
notes
=
"根据应用获取数据集"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/dstapps/{dstapp_id}/dstcomponents/fetchdefault"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/dstapps/{dstapp_id}/dstcomponents/fetchdefault"
)
...
@@ -391,6 +413,17 @@ public class DstComponentResource {
...
@@ -391,6 +413,17 @@ public class DstComponentResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-DstComponent-Sync-all')"
)
@ApiOperation
(
value
=
"根据系统应用组件"
,
tags
=
{
"组件"
},
notes
=
"根据系统应用组件"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/dstsystems/{dstsystem_id}/dstapps/{dstapp_id}/dstcomponents/{dstcomponent_id}/sync"
)
public
ResponseEntity
<
DstComponentDTO
>
syncByDstSystemDstApp
(
@PathVariable
(
"dstsystem_id"
)
String
dstsystem_id
,
@PathVariable
(
"dstapp_id"
)
String
dstapp_id
,
@PathVariable
(
"dstcomponent_id"
)
String
dstcomponent_id
,
@RequestBody
DstComponentDTO
dstcomponentdto
)
{
DstComponent
domain
=
dstcomponentMapping
.
toDomain
(
dstcomponentdto
);
domain
.
setAppId
(
dstapp_id
);
domain
=
dstcomponentService
.
sync
(
domain
)
;
dstcomponentdto
=
dstcomponentMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dstcomponentdto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-DstComponent-searchDefault-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzlite-DstComponent-searchDefault-all')"
)
@ApiOperation
(
value
=
"根据系统应用获取数据集"
,
tags
=
{
"组件"
}
,
notes
=
"根据系统应用获取数据集"
)
@ApiOperation
(
value
=
"根据系统应用获取数据集"
,
tags
=
{
"组件"
}
,
notes
=
"根据系统应用获取数据集"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/dstsystems/{dstsystem_id}/dstapps/{dstapp_id}/dstcomponents/fetchdefault"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/dstsystems/{dstsystem_id}/dstapps/{dstapp_id}/dstcomponents/fetchdefault"
)
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录