Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzdst
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzdst
提交
22602345
提交
22602345
编写于
12月 29, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
zoo457790531 发布系统代码 [ibz-dst,应用]
上级
c530d2de
变更
14
隐藏空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
186 行增加
和
66 行删除
+186
-66
dabuilds.ts
app_web/src/mock/entity/dabuilds/dabuilds.ts
+38
-0
dabuild-service-base.ts
app_web/src/service/dabuild/dabuild-service-base.ts
+28
-0
ibzdst-app-web.yaml
...st-app/ibzdst-app-web/src/main/docker/ibzdst-app-web.yaml
+4
-0
logback-spring.xml
ibzdst-boot/src/main/resources/logback-spring.xml
+5
-6
IDABuildService.java
...ava/cn/ibizlab/core/analysis/service/IDABuildService.java
+2
-0
DABuildServiceImpl.java
...bizlab/core/analysis/service/impl/DABuildServiceImpl.java
+16
-0
DABuildExService.java
.../cn/ibizlab/core/extensions/service/DABuildExService.java
+10
-0
h2_table.xml
ibzdst-core/src/main/resources/liquibase/h2_table.xml
+17
-17
systemResource.json
...st-core/src/main/resources/permission/systemResource.json
+1
-1
pom.xml
ibzdst-dependencies/pom.xml
+1
-2
ibzdst-provider-api.yaml
...dst-provider-api/src/main/docker/ibzdst-provider-api.yaml
+4
-0
DABuildResource.java
...pi/src/main/java/cn/ibizlab/api/rest/DABuildResource.java
+17
-0
PermissionSyncJob.java
.../src/main/java/cn/ibizlab/util/job/PermissionSyncJob.java
+42
-40
application-sys.yml
ibzdst-util/src/main/resources/application-sys.yml
+1
-0
未找到文件。
app_web/src/mock/entity/dabuilds/dabuilds.ts
浏览文件 @
22602345
...
@@ -233,6 +233,44 @@ mock.onPost(new RegExp(/^\/dabuilds\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).repl
...
@@ -233,6 +233,44 @@ mock.onPost(new RegExp(/^\/dabuilds\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).repl
return
[
status
,
data
];
return
[
status
,
data
];
});
});
// ExportZip
mock
.
onPost
(
new
RegExp
(
/^
\/
dabuilds
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
exportzip$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:dabuild 方法: ExportZip"
);
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
>
=
[
'build_id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
dabuilds
\/([
a-zA-Z0-9
\-\;]{1,35})\/
exportzip$/
).
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.build_id, tempValue.build_id));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'build_id'
]
==
tempValue
[
'build_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
];
});
// Run
// Run
mock
.
onPost
(
new
RegExp
(
/^
\/
dabuilds
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
run$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onPost
(
new
RegExp
(
/^
\/
dabuilds
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
run$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:dabuild 方法: Run"
);
console
.
groupCollapsed
(
"实体:dabuild 方法: Run"
);
...
...
app_web/src/service/dabuild/dabuild-service-base.ts
浏览文件 @
22602345
...
@@ -155,6 +155,34 @@ export default class DABuildServiceBase extends EntityService {
...
@@ -155,6 +155,34 @@ export default class DABuildServiceBase extends EntityService {
return
res
;
return
res
;
}
}
/**
* ExportZip接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DABuildServiceBase
*/
public
async
ExportZip
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
post
(
`/dabuilds/
${
context
.
dabuild
}
/exportzip`
,
data
,
isloading
);
return
res
;
}
/**
* ExportZipBatch接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof DABuildServiceBase
*/
public
async
ExportZipBatch
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
await
Http
.
getInstance
().
post
(
`/dabuild/exportzipbatch`
,
tempData
,
isloading
);
}
/**
/**
* Run接口方法
* Run接口方法
*
*
...
...
ibzdst-app/ibzdst-app-web/src/main/docker/ibzdst-app-web.yaml
浏览文件 @
22602345
...
@@ -14,6 +14,10 @@ services:
...
@@ -14,6 +14,10 @@ services:
memory
:
400M
memory
:
400M
mode
:
replicated
mode
:
replicated
replicas
:
1
replicas
:
1
restart_policy
:
condition
:
on-failure
max_attempts
:
3
window
:
120s
volumes
:
volumes
:
-
"
nfs:/app/file"
-
"
nfs:/app/file"
...
...
ibzdst-boot/src/main/resources/logback-spring.xml
浏览文件 @
22602345
...
@@ -20,18 +20,17 @@
...
@@ -20,18 +20,17 @@
<appender
name=
"file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<appender
name=
"file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!--日志文件输出的文件名-->
<!--日志文件输出的文件名-->
<FileNamePattern>
${LOG_PATH}/ibzdst.%d{yyyy-MM-dd}.log
</FileNamePattern>
<FileNamePattern>
${LOG_PATH}/ibzdst.%d{yyyy-MM-dd}.%i.log
</FileNamePattern>
<!--日志文件最大的大小-->
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
100MB
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<!--日志文件保留天数-->
<MaxHistory>
30
</MaxHistory>
<MaxHistory>
30
</MaxHistory>
</rollingPolicy>
</rollingPolicy>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
<pattern>
${LOG_PATTERN}
</pattern>
<pattern>
${LOG_PATTERN}
</pattern>
</encoder>
</encoder>
<!--日志文件最大的大小-->
<triggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"
>
<MaxFileSize>
100MB
</MaxFileSize>
</triggeringPolicy>
</appender>
</appender>
<!-- 日志输出级别 -->
<!-- 日志输出级别 -->
<root
level=
"INFO"
>
<root
level=
"INFO"
>
...
...
ibzdst-core/src/main/java/cn/ibizlab/core/analysis/service/IDABuildService.java
浏览文件 @
22602345
...
@@ -34,6 +34,8 @@ public interface IDABuildService extends IService<DABuild> {
...
@@ -34,6 +34,8 @@ public interface IDABuildService extends IService<DABuild> {
DABuild
get
(
String
key
);
DABuild
get
(
String
key
);
DABuild
getDraft
(
DABuild
et
);
DABuild
getDraft
(
DABuild
et
);
boolean
checkKey
(
DABuild
et
);
boolean
checkKey
(
DABuild
et
);
DABuild
exportZip
(
DABuild
et
);
boolean
exportZipBatch
(
List
<
DABuild
>
etList
);
DABuild
run
(
DABuild
et
);
DABuild
run
(
DABuild
et
);
boolean
runBatch
(
List
<
DABuild
>
etList
);
boolean
runBatch
(
List
<
DABuild
>
etList
);
boolean
save
(
DABuild
et
);
boolean
save
(
DABuild
et
);
...
...
ibzdst-core/src/main/java/cn/ibizlab/core/analysis/service/impl/DABuildServiceImpl.java
浏览文件 @
22602345
...
@@ -132,6 +132,22 @@ public class DABuildServiceImpl extends ServiceImpl<DABuildMapper, DABuild> impl
...
@@ -132,6 +132,22 @@ public class DABuildServiceImpl extends ServiceImpl<DABuildMapper, DABuild> impl
public
boolean
checkKey
(
DABuild
et
)
{
public
boolean
checkKey
(
DABuild
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getBuildId
()))
&&
(!
Objects
.
isNull
(
this
.
getById
(
et
.
getBuildId
())));
return
(!
ObjectUtils
.
isEmpty
(
et
.
getBuildId
()))
&&
(!
Objects
.
isNull
(
this
.
getById
(
et
.
getBuildId
())));
}
}
@Override
@Transactional
public
DABuild
exportZip
(
DABuild
et
)
{
//自定义代码
return
et
;
}
@Override
@Transactional
public
boolean
exportZipBatch
(
List
<
DABuild
>
etList
)
{
for
(
DABuild
et
:
etList
)
{
exportZip
(
et
);
}
return
true
;
}
@Override
@Override
@Transactional
@Transactional
public
DABuild
run
(
DABuild
et
)
{
public
DABuild
run
(
DABuild
et
)
{
...
...
ibzdst-core/src/main/java/cn/ibizlab/core/extensions/service/DABuildExService.java
浏览文件 @
22602345
...
@@ -21,6 +21,16 @@ public class DABuildExService extends DABuildServiceImpl {
...
@@ -21,6 +21,16 @@ public class DABuildExService extends DABuildServiceImpl {
return
com
.
baomidou
.
mybatisplus
.
core
.
toolkit
.
ReflectionKit
.
getSuperClassGenericType
(
this
.
getClass
().
getSuperclass
(),
1
);
return
com
.
baomidou
.
mybatisplus
.
core
.
toolkit
.
ReflectionKit
.
getSuperClassGenericType
(
this
.
getClass
().
getSuperclass
(),
1
);
}
}
/**
* [ExportZip:导出Zip] 行为扩展:导出模型的Zip
* @param et
* @return
*/
@Override
@Transactional
public
DABuild
exportZip
(
DABuild
et
)
{
return
super
.
exportZip
(
et
);
}
/**
/**
* [Run:运行] 行为扩展
* [Run:运行] 行为扩展
* @param et
* @param et
...
...
ibzdst-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
22602345
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<!--输出实体[DA_BUILD]数据结构 -->
<!--输出实体[DA_BUILD]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509"
id=
"tab-da_build-54
-1"
>
<changeSet
author=
"
root"
id=
"tab-da_build-58
-1"
>
<createTable
tableName=
"IBZDABUILD"
>
<createTable
tableName=
"IBZDABUILD"
>
<column
name=
"BUILDID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"BUILDID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_DA_BUILD_BUILDID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_DA_BUILD_BUILDID"
/>
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
<!--输出实体[DA_CHART]数据结构 -->
<!--输出实体[DA_CHART]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-da_chart-22-2"
>
<changeSet
author=
"
root
"
id=
"tab-da_chart-22-2"
>
<createTable
tableName=
"IBZDACHART"
>
<createTable
tableName=
"IBZDACHART"
>
<column
name=
"CHARTID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"CHARTID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_DA_CHART_CHARTID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_DA_CHART_CHARTID"
/>
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
<!--输出实体[DA_METRIC]数据结构 -->
<!--输出实体[DA_METRIC]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-da_metric-59-3"
>
<changeSet
author=
"
root
"
id=
"tab-da_metric-59-3"
>
<createTable
tableName=
"IBZDAMETRIC"
>
<createTable
tableName=
"IBZDAMETRIC"
>
<column
name=
"DA_METRICID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"DA_METRICID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_DA_METRIC_DA_METRICID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_DA_METRIC_DA_METRICID"
/>
...
@@ -82,7 +82,7 @@
...
@@ -82,7 +82,7 @@
<!--输出实体[DA_REPORT]数据结构 -->
<!--输出实体[DA_REPORT]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-da_report-24-4"
>
<changeSet
author=
"
root
"
id=
"tab-da_report-24-4"
>
<createTable
tableName=
"IBZDAREPORT"
>
<createTable
tableName=
"IBZDAREPORT"
>
<column
name=
"REPORTID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"REPORTID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_DA_REPORT_REPORTID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_DA_REPORT_REPORTID"
/>
...
@@ -104,7 +104,7 @@
...
@@ -104,7 +104,7 @@
<!--输出实体[DST_DATASOURCE]数据结构 -->
<!--输出实体[DST_DATASOURCE]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-dst_datasource-6-5"
>
<changeSet
author=
"
root
"
id=
"tab-dst_datasource-6-5"
>
<createTable
tableName=
"IBZDATASOURCE"
>
<createTable
tableName=
"IBZDATASOURCE"
>
<column
name=
"DSID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"DSID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_DST_DATASOURCE_DSID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_DST_DATASOURCE_DSID"
/>
...
@@ -120,7 +120,7 @@
...
@@ -120,7 +120,7 @@
<!--输出实体[DST_SYSTEM]数据结构 -->
<!--输出实体[DST_SYSTEM]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-dst_system-5-6"
>
<changeSet
author=
"
root
"
id=
"tab-dst_system-5-6"
>
<createTable
tableName=
"IBZPSSYSTEM"
>
<createTable
tableName=
"IBZPSSYSTEM"
>
<column
name=
"PSSYSTEMID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"PSSYSTEMID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_DST_SYSTEM_PSSYSTEMID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_DST_SYSTEM_PSSYSTEMID"
/>
...
@@ -140,7 +140,7 @@
...
@@ -140,7 +140,7 @@
<!--输出实体[RU_EXECLOG]数据结构 -->
<!--输出实体[RU_EXECLOG]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-ru_execlog-31-7"
>
<changeSet
author=
"
root
"
id=
"tab-ru_execlog-31-7"
>
<createTable
tableName=
"IBZRULELOG"
>
<createTable
tableName=
"IBZRULELOG"
>
<column
name=
"RU_EXECLOGID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"RU_EXECLOGID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_RU_EXECLOG_RU_EXECLOGID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_RU_EXECLOG_RU_EXECLOGID"
/>
...
@@ -170,7 +170,7 @@
...
@@ -170,7 +170,7 @@
<!--输出实体[RU_EXECRESULT]数据结构 -->
<!--输出实体[RU_EXECRESULT]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-ru_execresult-46-8"
>
<changeSet
author=
"
root
"
id=
"tab-ru_execresult-46-8"
>
<createTable
tableName=
"IBZRULERESULT"
>
<createTable
tableName=
"IBZRULERESULT"
>
<column
name=
"RU_EXECRESULTID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"RU_EXECRESULTID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_RU_EXECRESULT_RU_EXECRESULT"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_RU_EXECRESULT_RU_EXECRESULT"
/>
...
@@ -210,7 +210,7 @@
...
@@ -210,7 +210,7 @@
<!--输出实体[META_DATASET]数据结构 -->
<!--输出实体[META_DATASET]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-meta_dataset-2-9"
>
<changeSet
author=
"
root
"
id=
"tab-meta_dataset-2-9"
>
<createTable
tableName=
"IBZDATASET"
>
<createTable
tableName=
"IBZDATASET"
>
<column
name=
"DATASETID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"DATASETID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_META_DATASET_DATASETID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_META_DATASET_DATASETID"
/>
...
@@ -232,7 +232,7 @@
...
@@ -232,7 +232,7 @@
<!--输出实体[META_ENTITY]数据结构 -->
<!--输出实体[META_ENTITY]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-meta_entity-13-10"
>
<changeSet
author=
"
root
"
id=
"tab-meta_entity-13-10"
>
<createTable
tableName=
"IBZENTITY"
>
<createTable
tableName=
"IBZENTITY"
>
<column
name=
"ENTITYID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"ENTITYID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_META_ENTITY_ENTITYID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_META_ENTITY_ENTITYID"
/>
...
@@ -264,7 +264,7 @@
...
@@ -264,7 +264,7 @@
<!--输出实体[META_FIELD]数据结构 -->
<!--输出实体[META_FIELD]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-meta_field-7-11"
>
<changeSet
author=
"
root
"
id=
"tab-meta_field-7-11"
>
<createTable
tableName=
"IBZFIELD"
>
<createTable
tableName=
"IBZFIELD"
>
<column
name=
"FIELDID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"FIELDID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_META_FIELD_FIELDID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_META_FIELD_FIELDID"
/>
...
@@ -328,7 +328,7 @@
...
@@ -328,7 +328,7 @@
<!--输出实体[META_MODEL]数据结构 -->
<!--输出实体[META_MODEL]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-meta_model-18-12"
>
<changeSet
author=
"
root
"
id=
"tab-meta_model-18-12"
>
<createTable
tableName=
"IBZMODEL"
>
<createTable
tableName=
"IBZMODEL"
>
<column
name=
"MODELID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"MODELID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_META_MODEL_MODELID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_META_MODEL_MODELID"
/>
...
@@ -354,7 +354,7 @@
...
@@ -354,7 +354,7 @@
<!--输出实体[META_MODULE]数据结构 -->
<!--输出实体[META_MODULE]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-meta_module-7-13"
>
<changeSet
author=
"
root
"
id=
"tab-meta_module-7-13"
>
<createTable
tableName=
"IBZMODULE"
>
<createTable
tableName=
"IBZMODULE"
>
<column
name=
"MODULEID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"MODULEID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_META_MODULE_MODULEID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_META_MODULE_MODULEID"
/>
...
@@ -372,7 +372,7 @@
...
@@ -372,7 +372,7 @@
<!--输出实体[META_RELATION]数据结构 -->
<!--输出实体[META_RELATION]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-meta_relation-6-14"
>
<changeSet
author=
"
root
"
id=
"tab-meta_relation-6-14"
>
<createTable
tableName=
"IBZRELATION"
>
<createTable
tableName=
"IBZRELATION"
>
<column
name=
"RELATIONID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"RELATIONID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_META_RELATION_RELATIONID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_META_RELATION_RELATIONID"
/>
...
@@ -404,7 +404,7 @@
...
@@ -404,7 +404,7 @@
<!--输出实体[RU_ENGINE]数据结构 -->
<!--输出实体[RU_ENGINE]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-ru_engine-45-15"
>
<changeSet
author=
"
root
"
id=
"tab-ru_engine-45-15"
>
<createTable
tableName=
"IBZRULEENGINE"
>
<createTable
tableName=
"IBZRULEENGINE"
>
<column
name=
"ENGINEID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"ENGINEID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_RU_ENGINE_ENGINEID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_RU_ENGINE_ENGINEID"
/>
...
@@ -432,7 +432,7 @@
...
@@ -432,7 +432,7 @@
<!--输出实体[RU_ITEM]数据结构 -->
<!--输出实体[RU_ITEM]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-ru_item-77-16"
>
<changeSet
author=
"
root
"
id=
"tab-ru_item-77-16"
>
<createTable
tableName=
"IBZRULE"
>
<createTable
tableName=
"IBZRULE"
>
<column
name=
"RULEID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"RULEID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_RU_ITEM_RULEID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_RU_ITEM_RULEID"
/>
...
@@ -469,7 +469,7 @@
...
@@ -469,7 +469,7 @@
<!--输出实体[DA_BUILD]外键关系 -->
<!--输出实体[DA_BUILD]外键关系 -->
<!--输出实体[DA_CHART]外键关系 -->
<!--输出实体[DA_CHART]外键关系 -->
<!--输出实体[DA_METRIC]外键关系 -->
<!--输出实体[DA_METRIC]外键关系 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"fk-da_metric-59-17"
>
<changeSet
author=
"
root
"
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"
/>
<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>
</changeSet>
<!--输出实体[DA_REPORT]外键关系 -->
<!--输出实体[DA_REPORT]外键关系 -->
...
...
ibzdst-core/src/main/resources/permission/systemResource.json
浏览文件 @
22602345
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
"delogicname"
:
"分析"
,
"delogicname"
:
"分析"
,
"sysmoudle"
:{
"id"
:
"ANALYSIS"
,
"name"
:
"analysis"
},
"sysmoudle"
:{
"id"
:
"ANALYSIS"
,
"name"
:
"analysis"
},
"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"
:
"Run"
,
"name"
:
"运行"
,
"type"
:
"USERCUSTOM"
},{
"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"
:
"
ExportZip"
,
"name"
:
"导出Zip"
,
"type"
:
"USERCUSTOM"
},{
"id"
:
"
Run"
,
"name"
:
"运行"
,
"type"
:
"USERCUSTOM"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
}],
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
}
}
,
{
,
{
...
...
ibzdst-dependencies/pom.xml
浏览文件 @
22602345
...
@@ -261,6 +261,7 @@
...
@@ -261,6 +261,7 @@
<version>
${baomidou-jobs.version}
</version>
<version>
${baomidou-jobs.version}
</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
</dependencyManagement>
</dependencyManagement>
...
@@ -344,14 +345,12 @@
...
@@ -344,14 +345,12 @@
<groupId>
mysql
</groupId>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<artifactId>
mysql-connector-java
</artifactId>
</dependency>
</dependency>
<!-- mp动态数据源 -->
<!-- mp动态数据源 -->
<dependency>
<dependency>
<groupId>
com.baomidou
</groupId>
<groupId>
com.baomidou
</groupId>
<artifactId>
dynamic-datasource-spring-boot-starter
</artifactId>
<artifactId>
dynamic-datasource-spring-boot-starter
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.freemarker
</groupId>
<groupId>
org.freemarker
</groupId>
<artifactId>
freemarker
</artifactId>
<artifactId>
freemarker
</artifactId>
...
...
ibzdst-provider/ibzdst-provider-api/src/main/docker/ibzdst-provider-api.yaml
浏览文件 @
22602345
...
@@ -14,6 +14,10 @@ services:
...
@@ -14,6 +14,10 @@ services:
memory
:
400M
memory
:
400M
mode
:
replicated
mode
:
replicated
replicas
:
1
replicas
:
1
restart_policy
:
condition
:
on-failure
max_attempts
:
3
window
:
120s
volumes
:
volumes
:
-
"
nfs:/app/file"
-
"
nfs:/app/file"
...
...
ibzdst-provider/ibzdst-provider-api/src/main/java/cn/ibizlab/api/rest/DABuildResource.java
浏览文件 @
22602345
...
@@ -120,6 +120,23 @@ public class DABuildResource {
...
@@ -120,6 +120,23 @@ public class DABuildResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dabuildService
.
checkKey
(
dabuildMapping
.
toDomain
(
dabuilddto
)));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dabuildService
.
checkKey
(
dabuildMapping
.
toDomain
(
dabuilddto
)));
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzdst-DABuild-ExportZip-all')"
)
@ApiOperation
(
value
=
"导出Zip"
,
tags
=
{
"分析"
},
notes
=
"导出Zip"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/dabuilds/{dabuild_id}/exportzip"
)
public
ResponseEntity
<
DABuildDTO
>
exportZip
(
@PathVariable
(
"dabuild_id"
)
String
dabuild_id
,
@RequestBody
DABuildDTO
dabuilddto
)
{
DABuild
domain
=
dabuildMapping
.
toDomain
(
dabuilddto
);
domain
.
setBuildId
(
dabuild_id
);
domain
=
dabuildService
.
exportZip
(
domain
);
dabuilddto
=
dabuildMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dabuilddto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzdst-DABuild-ExportZip-all')"
)
@ApiOperation
(
value
=
"批量处理[导出Zip]"
,
tags
=
{
"分析"
},
notes
=
"批量处理[导出Zip]"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/dabuilds/{dabuild_id}/exportzipbatch"
)
public
ResponseEntity
<
Boolean
>
exportZipBatch
(
@RequestBody
List
<
DABuildDTO
>
dabuilddtos
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dabuildService
.
exportZipBatch
(
dabuildMapping
.
toDomain
(
dabuilddtos
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzdst-DABuild-Run-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzdst-DABuild-Run-all')"
)
@ApiOperation
(
value
=
"运行"
,
tags
=
{
"分析"
},
notes
=
"运行"
)
@ApiOperation
(
value
=
"运行"
,
tags
=
{
"分析"
},
notes
=
"运行"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/dabuilds/{dabuild_id}/run"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/dabuilds/{dabuild_id}/run"
)
...
...
ibzdst-util/src/main/java/cn/ibizlab/util/job/PermissionSyncJob.java
浏览文件 @
22602345
...
@@ -13,6 +13,7 @@ import org.springframework.boot.ApplicationRunner;
...
@@ -13,6 +13,7 @@ import org.springframework.boot.ApplicationRunner;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.DigestUtils
;
import
org.springframework.util.DigestUtils
;
import
java.io.InputStream
;
import
java.io.InputStream
;
import
java.util.*
;
import
java.util.*
;
...
@@ -25,72 +26,73 @@ import java.util.*;
...
@@ -25,72 +26,73 @@ import java.util.*;
@ConditionalOnProperty
(
name
=
"ibiz.enablePermissionValid"
,
havingValue
=
"true"
)
@ConditionalOnProperty
(
name
=
"ibiz.enablePermissionValid"
,
havingValue
=
"true"
)
public
class
PermissionSyncJob
implements
ApplicationRunner
{
public
class
PermissionSyncJob
implements
ApplicationRunner
{
@Autowired
@Lazy
private
IBZUAAFeignClient
client
;
@Value
(
"${ibiz.systemid:ibzdst}"
)
@Value
(
"${ibiz.systemid:ibzdst}"
)
private
String
systemId
;
private
String
systemId
;
@Value
(
"${ibiz.systemname:ibzdst}"
)
@Value
(
"${ibiz.systemname:ibzdst}"
)
private
String
systemName
;
private
String
systemName
;
@Autowired
@Lazy
private
IBZUAAFeignClient
uaaClient
;
@Autowired
@Autowired
@Lazy
@Lazy
IBZLiteFeignClient
lite
Feign
Client
;
IBZLiteFeignClient
liteClient
;
@Autowired
@Autowired
@Lazy
@Lazy
cn
.
ibizlab
.
util
.
client
.
IBZDictFeignClient
dict
Feign
Client
;
cn
.
ibizlab
.
util
.
client
.
IBZDictFeignClient
dictClient
;
@Override
@Override
public
void
run
(
ApplicationArguments
args
)
{
public
void
run
(
ApplicationArguments
args
)
{
try
{
try
{
Thread
.
sleep
(
10000
);
Thread
.
sleep
(
10000
);
InputStream
permission
=
this
.
getClass
().
getResourceAsStream
(
"/permission/systemResource.json"
);
//获取当前系统所有实体资源能力
InputStream
permission
=
this
.
getClass
().
getResourceAsStream
(
"/permission/systemResource.json"
);
//权限资源
String
permissionResult
=
IOUtils
.
toString
(
permission
,
"UTF-8"
);
if
(!
ObjectUtils
.
isEmpty
(
permission
))
{
JSONObject
system
=
new
JSONObject
();
String
strPermission
=
IOUtils
.
toString
(
permission
,
"UTF-8"
);
system
.
put
(
"pssystemid"
,
systemId
);
JSONObject
system
=
new
JSONObject
()
{{
system
.
put
(
"pssystemname"
,
systemName
);
put
(
"pssystemid"
,
systemId
);
system
.
put
(
"sysstructure"
,
JSONObject
.
parseObject
(
permissionResult
));
put
(
"pssystemname"
,
systemName
);
system
.
put
(
"md5check"
,
DigestUtils
.
md5DigestAsHex
(
permissionResult
.
getBytes
()));
put
(
"sysstructure"
,
JSONObject
.
parseObject
(
strPermission
));
if
(
client
.
syncSysAuthority
(
system
))
{
put
(
"md5check"
,
DigestUtils
.
md5DigestAsHex
(
strPermission
.
getBytes
()));
log
.
info
(
"向[UAA]同步系统资源成功"
);
}};
}
else
{
if
(
uaaClient
.
syncSysAuthority
(
system
))
{
log
.
error
(
"向[UAA]同步系统资源失败"
);
log
.
info
(
"向[uaa]同步系统资源成功"
);
}
else
{
log
.
error
(
"向[uaa]同步系统资源失败"
);
}
}
}
}
}
catch
(
Exception
ex
)
{
catch
(
Exception
ex
)
{
log
.
error
(
"向[uaa]同步系统资源失败,请检查[uaa]服务是否正常运行! {}"
,
ex
.
getMessage
());
log
.
error
(
String
.
format
(
"向[UAA]同步系统资源失败,请检查[UAA]服务是否正常! [%s]"
,
ex
));
}
}
try
{
try
{
InputStream
sysModel
=
this
.
getClass
().
getResourceAsStream
(
"/sysmodel/ibzdst.json"
);
//获取当前系统所有实体资源能力
InputStream
model
=
this
.
getClass
().
getResourceAsStream
(
"/sysmodel/ibzdst.json"
);
//系统模型
String
strSysModel
=
IOUtils
.
toString
(
sysModel
,
"UTF-8"
);
if
(!
ObjectUtils
.
isEmpty
(
model
))
{
if
(
liteFeignClient
.
syncSysModel
(
JSONObject
.
parseObject
(
strSysModel
)))
{
String
strModel
=
IOUtils
.
toString
(
model
,
"UTF-8"
);
log
.
info
(
"向[lite]同步系统模型成功"
);
if
(
liteClient
.
syncSysModel
(
JSONObject
.
parseObject
(
strModel
)))
{
}
else
{
log
.
info
(
"向[lite]同步模型成功"
);
log
.
error
(
"向[lite]同步系统模型失败"
);
}
else
{
log
.
error
(
"向[lite]同步模型失败"
);
}
}
}
}
catch
(
Exception
ex
)
{
log
.
error
(
"向[lite]同步系统模型失败,请检查[lite]服务是否正常运行! {}"
,
ex
.
getMessage
());
}
}
catch
(
Exception
ex
)
{
log
.
error
(
String
.
format
(
"向[lite]同步系统模型失败,请检查[lite]服务是否正常! [%s]"
,
ex
));
}
try
{
try
{
InputStream
runtimeDict
=
this
.
getClass
().
getResourceAsStream
(
"/sysmodel/RuntimeDict.json"
);
//获取当前系统所有实体资源能力
InputStream
dict
=
this
.
getClass
().
getResourceAsStream
(
"/sysmodel/RuntimeDict.json"
);
//代码表
String
strRuntimeDict
=
IOUtils
.
toString
(
runtimeDict
,
"UTF-8"
);
if
(!
ObjectUtils
.
isEmpty
(
dict
))
{
if
(
dictFeignClient
.
syncRuntimeDict
(
JSONArray
.
parseArray
(
strRuntimeDict
)))
{
String
strDict
=
IOUtils
.
toString
(
dict
,
"UTF-8"
);
log
.
info
(
"推送系统预置代码表成功"
);
if
(
dictClient
.
syncRuntimeDict
(
JSONArray
.
parseArray
(
strDict
)))
{
}
else
{
log
.
info
(
"向[dict]同步代码表成功"
);
log
.
error
(
"推送系统预置代码表失败"
);
}
else
{
log
.
error
(
"向[dict]同步代码表失败"
);
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
x
)
{
log
.
error
(
"
推送系统预置代码表失败"
);
log
.
error
(
"
向[dict]同步代码表失败,请检查[dict]服务是否正常运行! {}"
,
ex
.
getMessage
()
);
}
}
}
}
}
}
\ No newline at end of file
ibzdst-util/src/main/resources/application-sys.yml
浏览文件 @
22602345
...
@@ -125,3 +125,4 @@ server:
...
@@ -125,3 +125,4 @@ server:
min-response-size
:
10240
min-response-size
:
10240
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录