Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibztask
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibztask
提交
0d5d6c3f
提交
0d5d6c3f
编写于
9月 10, 2021
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibiz4j 发布系统代码 [ibiz-task,任务调度]
上级
354fe565
变更
58
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
58 个修改的文件
包含
1155 行增加
和
647 行删除
+1155
-647
app-menu-item.vue
app_web/src/components/app-menu-item/app-menu-item.vue
+5
-5
app-quick-menus.vue
app_web/src/components/app-quick-menus/app-quick-menus.vue
+2
-2
grid-view8-engine.ts
app_web/src/engine/view/grid-view8-engine.ts
+0
-8
BO-CN-base.ts
app_web/src/locale/lang/BO-CN-base.ts
+2
-0
en-US-base.ts
app_web/src/locale/lang/en-US-base.ts
+2
-0
zh-CN-base.ts
app_web/src/locale/lang/zh-CN-base.ts
+2
-0
jobs-infos.ts
app_web/src/mock/entity/jobs-infos/jobs-infos.ts
+73
-73
jobs-locks.ts
app_web/src/mock/entity/jobs-locks/jobs-locks.ts
+61
-61
jobs-logs.ts
app_web/src/mock/entity/jobs-logs/jobs-logs.ts
+61
-61
jobs-registrys.ts
app_web/src/mock/entity/jobs-registrys/jobs-registrys.ts
+61
-61
jobs-info-service-base.ts
app_web/src/service/jobs-info/jobs-info-service-base.ts
+45
-45
jobs-lock-service-base.ts
app_web/src/service/jobs-lock/jobs-lock-service-base.ts
+38
-38
jobs-log-service-base.ts
app_web/src/service/jobs-log/jobs-log-service-base.ts
+38
-38
jobs-registry-service-base.ts
...b/src/service/jobs-registry/jobs-registry-service-base.ts
+38
-38
task-index-view-appmenu-base.vue
.../task-index-view-appmenu/task-index-view-appmenu-base.vue
+5
-5
default-searchform-base.vue
.../jobs-info/default-searchform/default-searchform-base.vue
+2
-2
main-grid-base.vue
app_web/src/widgets/jobs-info/main-grid/main-grid-base.vue
+9
-6
default-searchform-base.vue
...s/jobs-log/default-searchform/default-searchform-base.vue
+2
-2
main-grid-base.vue
app_web/src/widgets/jobs-log/main-grid/main-grid-base.vue
+9
-6
default-searchform-base.vue
...s-registry/default-searchform/default-searchform-base.vue
+2
-2
main-grid-base.vue
...eb/src/widgets/jobs-registry/main-grid/main-grid-base.vue
+9
-6
pom.xml
ibztask-app/ibztask-app-web/pom.xml
+27
-1
Dockerfile
ibztask-app/ibztask-app-web/src/main/docker/Dockerfile
+1
-1
application-web-prod.yml
...ztask-app-web/src/main/resources/application-web-prod.yml
+16
-16
JobsInfoServiceImpl.java
...n/ibizlab/core/task/service/impl/JobsInfoServiceImpl.java
+2
-2
JobsLockServiceImpl.java
...n/ibizlab/core/task/service/impl/JobsLockServiceImpl.java
+2
-2
JobsLogServiceImpl.java
...cn/ibizlab/core/task/service/impl/JobsLogServiceImpl.java
+2
-2
JobsRegistryServiceImpl.java
...izlab/core/task/service/impl/JobsRegistryServiceImpl.java
+2
-2
CommonAutoConfig.java
...in/java/cn/ibizlab/core/util/config/CommonAutoConfig.java
+29
-0
h2_table.xml
ibztask-core/src/main/resources/liquibase/h2_table.xml
+4
-4
pom.xml
ibztask-provider/ibztask-provider-api/pom.xml
+35
-1
Dockerfile
...-provider/ibztask-provider-api/src/main/docker/Dockerfile
+1
-1
JobsInfoResource.java
...i/src/main/java/cn/ibizlab/api/rest/JobsInfoResource.java
+27
-27
JobsLockResource.java
...i/src/main/java/cn/ibizlab/api/rest/JobsLockResource.java
+27
-27
JobsLogResource.java
...pi/src/main/java/cn/ibizlab/api/rest/JobsLogResource.java
+27
-27
JobsRegistryResource.java
...c/main/java/cn/ibizlab/api/rest/JobsRegistryResource.java
+27
-27
DELogicAspect.java
...l/src/main/java/cn/ibizlab/util/aspect/DELogicAspect.java
+23
-9
CusCaffeineCache.java
...in/java/cn/ibizlab/util/cache/cache/CusCaffeineCache.java
+42
-0
CusRedisCache.java
.../main/java/cn/ibizlab/util/cache/cache/CusRedisCache.java
+16
-0
LayeringCacheManager.java
...ibizlab/util/cache/cacheManager/LayeringCacheManager.java
+2
-1
IBZWFFallback.java
...l/src/main/java/cn/ibizlab/util/client/IBZWFFallback.java
+22
-0
IBZWFFeignClient.java
...rc/main/java/cn/ibizlab/util/client/IBZWFFeignClient.java
+16
-0
DELogic.java
...sk-util/src/main/java/cn/ibizlab/util/domain/DELogic.java
+2
-0
DEFieldDefaultValueType.java
...n/java/cn/ibizlab/util/enums/DEFieldDefaultValueType.java
+17
-1
DEPredefinedFieldType.java
...ain/java/cn/ibizlab/util/enums/DEPredefinedFieldType.java
+13
-1
ExceptionTranslator.java
...main/java/cn/ibizlab/util/errors/ExceptionTranslator.java
+29
-0
SearchContextBase.java
...c/main/java/cn/ibizlab/util/filter/SearchContextBase.java
+5
-0
Globs.java
ibztask-util/src/main/java/cn/ibizlab/util/helper/Globs.java
+195
-0
RuleUtils.java
...-util/src/main/java/cn/ibizlab/util/helper/RuleUtils.java
+20
-16
AppController.java
...til/src/main/java/cn/ibizlab/util/rest/AppController.java
+21
-0
AuthPermissionEvaluator.java
...ava/cn/ibizlab/util/security/AuthPermissionEvaluator.java
+15
-12
AuthenticationEntryPoint.java
...va/cn/ibizlab/util/security/AuthenticationEntryPoint.java
+1
-1
AuthenticationInfo.java
...ain/java/cn/ibizlab/util/security/AuthenticationInfo.java
+6
-2
AuthenticationUser.java
...ain/java/cn/ibizlab/util/security/AuthenticationUser.java
+0
-1
AuthenticationUserService.java
...va/cn/ibizlab/util/service/AuthenticationUserService.java
+1
-1
IBZConfigService.java
...c/main/java/cn/ibizlab/util/service/IBZConfigService.java
+10
-0
SearchContextHandlerMethodArgumentResolver.java
.../util/web/SearchContextHandlerMethodArgumentResolver.java
+3
-2
application-sys.yml
ibztask-util/src/main/resources/application-sys.yml
+1
-1
未找到文件。
app_web/src/components/app-menu-item/app-menu-item.vue
浏览文件 @
0d5d6c3f
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
<
template
v-else
>
<
template
v-else
>
<i
v-if=
"isFirst"
class=
'fa fa-cogs app-menu-icon'
></i>
<i
v-if=
"isFirst"
class=
'fa fa-cogs app-menu-icon'
></i>
</
template
>
</
template
>
<span
ref=
"circleText"
:class=
"{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}"
:title=
"$t(`app.menus.${ctrlName}.${item.name
}`)"
>
{{$t(`app.menus.${ctrlName}.${item.name
}`)}}
</span>
<span
ref=
"circleText"
:class=
"{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}"
:title=
"$t(`app.menus.${ctrlName}.${item.name
.toLowerCase()}`)"
>
{{$t(`app.menus.${ctrlName}.${item.name.toLowerCase()
}`)}}
</span>
</template>
</template>
<app-menu-item
:isCollapse=
"isCollapse"
:menus=
"item.items"
:ctrlName=
"ctrlName"
:isFirst=
"false"
:counterdata=
"counterdata"
:popper-class=
"popperClass"
></app-menu-item>
<app-menu-item
:isCollapse=
"isCollapse"
:menus=
"item.items"
:ctrlName=
"ctrlName"
:isFirst=
"false"
:counterdata=
"counterdata"
:popper-class=
"popperClass"
></app-menu-item>
</el-submenu>
</el-submenu>
...
@@ -23,18 +23,18 @@
...
@@ -23,18 +23,18 @@
<el-menu-item
:class=
"[
{'isFirst' : isFirst},item.textcls]" v-show="!item.hidden" :index="item.name" :key="item.id">
<el-menu-item
:class=
"[
{'isFirst' : isFirst},item.textcls]" v-show="!item.hidden" :index="item.name" :key="item.id">
<template
v-if=
"item.icon && item.icon != ''"
>
<template
v-if=
"item.icon && item.icon != ''"
>
<img
:src=
"item.icon"
class=
'app-menu-icon'
/>
<img
:src=
"item.icon"
class=
'app-menu-icon'
/>
<span
v-if=
"(isFirst && isCollapse) ? true : false"
ref=
"circleText"
:class=
"
{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name
}`)">
{{
$t
(
`app.menus.${ctrlName
}
.${item.name
}
`
)
}}
<
/span
>
<span
v-if=
"(isFirst && isCollapse) ? true : false"
ref=
"circleText"
:class=
"
{'app-menu-circle' : appMenuCollapseFlag, 'text' : true}" :title="$t(`app.menus.${ctrlName}.${item.name
.toLowerCase()}`)">
{{
$t
(
`app.menus.${ctrlName
}
.${item.name.toLowerCase()
}
`
)
}}
<
/span
>
<
/template
>
<
/template
>
<
template
v
-
else
-
if
=
"item.iconcls && item.iconcls != ''"
>
<
template
v
-
else
-
if
=
"item.iconcls && item.iconcls != ''"
>
<
i
:
class
=
"[item.iconcls, 'app-menu-icon']"
><
/i
>
<
i
:
class
=
"[item.iconcls, 'app-menu-icon']"
><
/i
>
<
span
v
-
if
=
"(isFirst && isCollapse) ? true : false"
ref
=
"circleText"
:
class
=
"{'app-menu-circle' : appMenuCollapseFlag, 'text' : true
}
"
:
title
=
"$t(`app.menus.${ctrlName
}
.${item.name
}
`)"
>
{{
$t
(
`app.menus.${ctrlName
}
.${item.name
}
`
)
}}
<
/span
>
<
span
v
-
if
=
"(isFirst && isCollapse) ? true : false"
ref
=
"circleText"
:
class
=
"{'app-menu-circle' : appMenuCollapseFlag, 'text' : true
}
"
:
title
=
"$t(`app.menus.${ctrlName
}
.${item.name
.toLowerCase()
}
`)"
>
{{
$t
(
`app.menus.${ctrlName
}
.${item.name.toLowerCase()
}
`
)
}}
<
/span
>
<
/template
>
<
/template
>
<
template
v
-
else
>
<
template
v
-
else
>
<
i
v
-
if
=
"isFirst"
class
=
'fa fa-cogs app-menu-icon'
><
/i
>
<
i
v
-
if
=
"isFirst"
class
=
'fa fa-cogs app-menu-icon'
><
/i
>
<
span
v
-
if
=
"(isFirst && isCollapse) ? true : false"
ref
=
"circleText"
:
class
=
"{'app-menu-circle' : appMenuCollapseFlag, 'text' : true
}
"
:
title
=
"$t(`app.menus.${ctrlName
}
.${item.name
}
`)"
>
{{
$t
(
`app.menus.${ctrlName
}
.${item.name
}
`
)
}}
<
/span
>
<
span
v
-
if
=
"(isFirst && isCollapse) ? true : false"
ref
=
"circleText"
:
class
=
"{'app-menu-circle' : appMenuCollapseFlag, 'text' : true
}
"
:
title
=
"$t(`app.menus.${ctrlName
}
.${item.name
.toLowerCase()
}
`)"
>
{{
$t
(
`app.menus.${ctrlName
}
.${item.name.toLowerCase()
}
`
)
}}
<
/span
>
<
/template
>
<
/template
>
<
template
slot
=
"title"
>
<
template
slot
=
"title"
>
<
span
:
class
=
"{'app-menu-circle' : appMenuCollapseFlag, 'text' : true
}
"
:
title
=
"$t(`app.menus.${ctrlName
}
.${item.name
}
`)"
>
{{
$t
(
`app.menus.${ctrlName
}
.${item.name
}
`
)
}}
<
/span
>
<
span
:
class
=
"{'app-menu-circle' : appMenuCollapseFlag, 'text' : true
}
"
:
title
=
"$t(`app.menus.${ctrlName
}
.${item.name
.toLowerCase()
}
`)"
>
{{
$t
(
`app.menus.${ctrlName
}
.${item.name.toLowerCase()
}
`
)
}}
<
/span
>
<
template
v
-
if
=
"counterdata && counterdata[item.counterid] && counterdata[item.counterid] > 0"
>
<
template
v
-
if
=
"counterdata && counterdata[item.counterid] && counterdata[item.counterid] > 0"
>
<
span
class
=
"pull-right"
>
<
span
class
=
"pull-right"
>
<
badge
:
count
=
"counterdata[item.counterid]"
:
overflow
-
count
=
"9999"
><
/badge
>
<
badge
:
count
=
"counterdata[item.counterid]"
:
overflow
-
count
=
"9999"
><
/badge
>
...
...
app_web/src/components/app-quick-menus/app-quick-menus.vue
浏览文件 @
0d5d6c3f
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<img
:src=
"item.iconcls"
v-else-if=
"!Object.is(item.iconcls, '')"
/>
<img
:src=
"item.iconcls"
v-else-if=
"!Object.is(item.iconcls, '')"
/>
<i
class=
"fa fa-cogs"
v-else
></i>
<i
class=
"fa fa-cogs"
v-else
></i>
</span>
</span>
<span>
{{
$t
(
`app.menus.${ctrlName
}
.${item.name
}
`
)
}}
<
/span
>
<span>
{{
$t
(
`app.menus.${ctrlName
}
.${item.name
.toLowerCase()
}
`
)
}}
<
/span
>
<
span
class
=
"line"
><
/span
>
<
span
class
=
"line"
><
/span
>
<
/p
>
<
/p
>
<
p
style
=
" display: 'flex' "
>
<
p
style
=
" display: 'flex' "
>
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
<
img
:
src
=
"item.iconcls"
v
-
else
-
if
=
"!Object.is(item.iconcls, '')"
/>
<
img
:
src
=
"item.iconcls"
v
-
else
-
if
=
"!Object.is(item.iconcls, '')"
/>
<
i
class
=
"fa fa-cogs"
v
-
else
><
/i
>
<
i
class
=
"fa fa-cogs"
v
-
else
><
/i
>
<
/span
>
<
/span
>
<
h4
>
{{
$t
(
`app.menus.${ctrlName
}
.${item.name
}
`
)
}}
<
/h4
>
<
h4
>
{{
$t
(
`app.menus.${ctrlName
}
.${item.name
.toLowerCase()
}
`
)
}}
<
/h4
>
<
/div
>
<
/div
>
<
/card
>
<
/card
>
<
/template
>
<
/template
>
...
...
app_web/src/engine/view/grid-view8-engine.ts
浏览文件 @
0d5d6c3f
...
@@ -9,14 +9,6 @@ import GridViewEngine from './grid-view-engine';
...
@@ -9,14 +9,6 @@ import GridViewEngine from './grid-view-engine';
*/
*/
export
default
class
GridView8Engine
extends
GridViewEngine
{
export
default
class
GridView8Engine
extends
GridViewEngine
{
/**
* 表格部件
*
* @type {*}
* @memberof GridView8Engine
*/
protected
grid
:
any
;
/**
/**
* 表格部件
* 表格部件
*
*
...
...
app_web/src/locale/lang/BO-CN-base.ts
浏览文件 @
0d5d6c3f
...
@@ -33,6 +33,8 @@ function getAppLocale(){
...
@@ -33,6 +33,8 @@ function getAppLocale(){
nomore
:
"དེ་ལས་མང་བ་མི་འདུག"
,
nomore
:
"དེ་ལས་མང་བ་མི་འདུག"
,
other
:
"གཞན་དག"
,
other
:
"གཞན་དག"
,
valueNotEmpty
:
"སྟོང་མི་ཆོག"
,
valueNotEmpty
:
"སྟོང་མི་ཆོག"
,
createFailed
:
"གསར་འཛུགས་ཕམ་པ།"
,
isExist
:
"གནས་པ་"
,
},
},
local
:{
local
:{
new
:
"གསར་འཛུགས།"
,
new
:
"གསར་འཛུགས།"
,
...
...
app_web/src/locale/lang/en-US-base.ts
浏览文件 @
0d5d6c3f
...
@@ -33,6 +33,8 @@ function getAppLocale(){
...
@@ -33,6 +33,8 @@ function getAppLocale(){
nomore
:
"No more"
,
nomore
:
"No more"
,
other
:
"other"
,
other
:
"other"
,
valueNotEmpty
:
"The value cannot be null"
,
valueNotEmpty
:
"The value cannot be null"
,
createFailed
:
"Create Failed"
,
isExist
:
"Exist"
,
},
},
local
:{
local
:{
new
:
"New"
,
new
:
"New"
,
...
...
app_web/src/locale/lang/zh-CN-base.ts
浏览文件 @
0d5d6c3f
...
@@ -33,6 +33,8 @@ function getAppLocale(){
...
@@ -33,6 +33,8 @@ function getAppLocale(){
nomore
:
"没有更多了"
,
nomore
:
"没有更多了"
,
other
:
"其他"
,
other
:
"其他"
,
valueNotEmpty
:
"值不能为空"
,
valueNotEmpty
:
"值不能为空"
,
createFailed
:
"创建失败"
,
isExist
:
"已存在"
,
},
},
local
:{
local
:{
new
:
"新建"
,
new
:
"新建"
,
...
...
app_web/src/mock/entity/jobs-infos/jobs-infos.ts
浏览文件 @
0d5d6c3f
此差异已折叠。
点击以展开。
app_web/src/mock/entity/jobs-locks/jobs-locks.ts
浏览文件 @
0d5d6c3f
...
@@ -86,17 +86,17 @@ mock.onDelete(new RegExp(/^\/jobslocks\/batch$/)).reply((config: any) => {
...
@@ -86,17 +86,17 @@ mock.onDelete(new RegExp(/^\/jobslocks\/batch$/)).reply((config: any) => {
return
[
status
,
{}];
return
[
status
,
{}];
});
});
//
Select
//
CheckKey
mock
.
on
Get
(
new
RegExp
(
/^
\/
jobslocks
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
on
Post
(
new
RegExp
(
/^
\/
jobslocks
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:jobslock 方法:
Select
"
);
console
.
groupCollapsed
(
"实体:jobslock 方法:
CheckKey
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
jobslocks
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
jobslocks
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -106,13 +106,23 @@ mock.onGet(new RegExp(/^\/jobslocks\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((
...
@@ -106,13 +106,23 @@ mock.onGet(new RegExp(/^\/jobslocks\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((
});
});
});
});
}
}
let
items
=
mockDatas
?
mockDatas
:
[];
//let items = mockDatas ? mockDatas : [];
let
_items
=
items
.
find
((
item
:
any
)
=>
Object
.
is
(
item
.
id
,
tempValue
.
id
));
//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
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
);
console
.
table
(
data
);
console
.
groupEnd
();
console
.
groupEnd
();
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
];
return
[
status
,
data
];
});
});
// Create
// Create
...
@@ -140,44 +150,6 @@ mock.onPost(new RegExp(/^\/jobslocks\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config
...
@@ -140,44 +150,6 @@ mock.onPost(new RegExp(/^\/jobslocks\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
mockDatas
[
0
]];
return
[
status
,
mockDatas
[
0
]];
});
});
// Update
mock
.
onPut
(
new
RegExp
(
/^
\/
jobslocks
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:jobslock 方法: Update"
);
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
(
/^
\/
jobslocks
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
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
];
});
// GetDraft
// GetDraft
mock
.
onGet
(
new
RegExp
(
/^
\/
jobslocks
\/
getdraft$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onGet
(
new
RegExp
(
/^
\/
jobslocks
\/
getdraft$/
)).
reply
((
config
:
any
)
=>
{
...
@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/jobslocks\/getdraft$/)).reply((config: any) => {
...
@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/jobslocks\/getdraft$/)).reply((config: any) => {
return
[
status
,
{}];
return
[
status
,
{}];
});
});
//
CheckKey
//
Save
mock
.
onPost
(
new
RegExp
(
/^
\/
jobslocks
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onPost
(
new
RegExp
(
/^
\/
jobslocks
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
save
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:jobslock 方法:
CheckKey
"
);
console
.
groupCollapsed
(
"实体:jobslock 方法:
Save
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
jobslocks
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
jobslocks
\/([
a-zA-Z0-9
\-\;]{1,35})\/
save
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -233,16 +205,16 @@ mock.onPost(new RegExp(/^\/jobslocks\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).rep
...
@@ -233,16 +205,16 @@ mock.onPost(new RegExp(/^\/jobslocks\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).rep
return
[
status
,
data
];
return
[
status
,
data
];
});
});
//
Sav
e
//
Updat
e
mock
.
onP
ost
(
new
RegExp
(
/^
\/
jobslocks
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
save
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onP
ut
(
new
RegExp
(
/^
\/
jobslocks
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:jobslock 方法:
Sav
e"
);
console
.
groupCollapsed
(
"实体:jobslock 方法:
Updat
e"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
jobslocks
\/([
a-zA-Z0-9
\-\;]{1,35})
\/
save
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
jobslocks
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -322,10 +294,38 @@ mock.onGet(new RegExp(/^\/jobslocks\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((c
...
@@ -322,10 +294,38 @@ mock.onGet(new RegExp(/^\/jobslocks\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((c
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// Select
mock
.
onGet
(
new
RegExp
(
/^
\/
jobslocks
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:jobslock 方法: Select"
);
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
(
/^
\/
jobslocks
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select$/
).
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
));
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
];
});
// Remove
mock
.
onDelete
(
new
RegExp
(
/^
\/
jobslocks
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
// Get
console
.
groupCollapsed
(
"实体:jobslock 方法: Remove"
);
mock
.
onGet
(
new
RegExp
(
/^
\/
jobslocks
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:jobslock 方法: Get"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
...
@@ -351,9 +351,9 @@ mock.onDelete(new RegExp(/^\/jobslocks\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((confi
...
@@ -351,9 +351,9 @@ mock.onDelete(new RegExp(/^\/jobslocks\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((confi
return
[
status
,
_items
?
_items
:{}];
return
[
status
,
_items
?
_items
:{}];
});
});
//
Get
//
Remove
mock
.
on
Get
(
new
RegExp
(
/^
\/
jobslocks
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
on
Delete
(
new
RegExp
(
/^
\/
jobslocks
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:jobslock 方法:
Get
"
);
console
.
groupCollapsed
(
"实体:jobslock 方法:
Remove
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
...
...
app_web/src/mock/entity/jobs-logs/jobs-logs.ts
浏览文件 @
0d5d6c3f
...
@@ -86,17 +86,17 @@ mock.onDelete(new RegExp(/^\/jobslogs\/batch$/)).reply((config: any) => {
...
@@ -86,17 +86,17 @@ mock.onDelete(new RegExp(/^\/jobslogs\/batch$/)).reply((config: any) => {
return
[
status
,
{}];
return
[
status
,
{}];
});
});
//
Select
//
CheckKey
mock
.
on
Get
(
new
RegExp
(
/^
\/
jobslogs
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
on
Post
(
new
RegExp
(
/^
\/
jobslogs
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:jobslog 方法:
Select
"
);
console
.
groupCollapsed
(
"实体:jobslog 方法:
CheckKey
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
jobslogs
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
jobslogs
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -106,13 +106,23 @@ mock.onGet(new RegExp(/^\/jobslogs\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((c
...
@@ -106,13 +106,23 @@ mock.onGet(new RegExp(/^\/jobslogs\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((c
});
});
});
});
}
}
let
items
=
mockDatas
?
mockDatas
:
[];
//let items = mockDatas ? mockDatas : [];
let
_items
=
items
.
find
((
item
:
any
)
=>
Object
.
is
(
item
.
id
,
tempValue
.
id
));
//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
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
);
console
.
table
(
data
);
console
.
groupEnd
();
console
.
groupEnd
();
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
];
return
[
status
,
data
];
});
});
// Create
// Create
...
@@ -140,44 +150,6 @@ mock.onPost(new RegExp(/^\/jobslogs\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config:
...
@@ -140,44 +150,6 @@ mock.onPost(new RegExp(/^\/jobslogs\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config:
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
mockDatas
[
0
]];
return
[
status
,
mockDatas
[
0
]];
});
});
// Update
mock
.
onPut
(
new
RegExp
(
/^
\/
jobslogs
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:jobslog 方法: Update"
);
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
(
/^
\/
jobslogs
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
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
];
});
// GetDraft
// GetDraft
mock
.
onGet
(
new
RegExp
(
/^
\/
jobslogs
\/
getdraft$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onGet
(
new
RegExp
(
/^
\/
jobslogs
\/
getdraft$/
)).
reply
((
config
:
any
)
=>
{
...
@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/jobslogs\/getdraft$/)).reply((config: any) => {
...
@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/jobslogs\/getdraft$/)).reply((config: any) => {
return
[
status
,
{}];
return
[
status
,
{}];
});
});
//
CheckKey
//
Save
mock
.
onPost
(
new
RegExp
(
/^
\/
jobslogs
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onPost
(
new
RegExp
(
/^
\/
jobslogs
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
save
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:jobslog 方法:
CheckKey
"
);
console
.
groupCollapsed
(
"实体:jobslog 方法:
Save
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
jobslogs
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
jobslogs
\/([
a-zA-Z0-9
\-\;]{1,35})\/
save
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -233,16 +205,16 @@ mock.onPost(new RegExp(/^\/jobslogs\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).repl
...
@@ -233,16 +205,16 @@ mock.onPost(new RegExp(/^\/jobslogs\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).repl
return
[
status
,
data
];
return
[
status
,
data
];
});
});
//
Sav
e
//
Updat
e
mock
.
onP
ost
(
new
RegExp
(
/^
\/
jobslogs
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
save
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onP
ut
(
new
RegExp
(
/^
\/
jobslogs
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:jobslog 方法:
Sav
e"
);
console
.
groupCollapsed
(
"实体:jobslog 方法:
Updat
e"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
jobslogs
\/([
a-zA-Z0-9
\-\;]{1,35})
\/
save
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
jobslogs
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -322,10 +294,38 @@ mock.onGet(new RegExp(/^\/jobslogs\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((co
...
@@ -322,10 +294,38 @@ mock.onGet(new RegExp(/^\/jobslogs\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((co
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// Select
mock
.
onGet
(
new
RegExp
(
/^
\/
jobslogs
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:jobslog 方法: Select"
);
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
(
/^
\/
jobslogs
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select$/
).
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
));
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
];
});
// Remove
mock
.
onDelete
(
new
RegExp
(
/^
\/
jobslogs
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
// Get
console
.
groupCollapsed
(
"实体:jobslog 方法: Remove"
);
mock
.
onGet
(
new
RegExp
(
/^
\/
jobslogs
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:jobslog 方法: Get"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
...
@@ -351,9 +351,9 @@ mock.onDelete(new RegExp(/^\/jobslogs\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config
...
@@ -351,9 +351,9 @@ mock.onDelete(new RegExp(/^\/jobslogs\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config
return
[
status
,
_items
?
_items
:{}];
return
[
status
,
_items
?
_items
:{}];
});
});
//
Get
//
Remove
mock
.
on
Get
(
new
RegExp
(
/^
\/
jobslogs
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
on
Delete
(
new
RegExp
(
/^
\/
jobslogs
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:jobslog 方法:
Get
"
);
console
.
groupCollapsed
(
"实体:jobslog 方法:
Remove
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
...
...
app_web/src/mock/entity/jobs-registrys/jobs-registrys.ts
浏览文件 @
0d5d6c3f
...
@@ -86,17 +86,17 @@ mock.onDelete(new RegExp(/^\/jobsregistries\/batch$/)).reply((config: any) => {
...
@@ -86,17 +86,17 @@ mock.onDelete(new RegExp(/^\/jobsregistries\/batch$/)).reply((config: any) => {
return
[
status
,
{}];
return
[
status
,
{}];
});
});
//
Select
//
CheckKey
mock
.
on
Get
(
new
RegExp
(
/^
\/
jobsregistries
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
on
Post
(
new
RegExp
(
/^
\/
jobsregistries
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:jobsregistry 方法:
Select
"
);
console
.
groupCollapsed
(
"实体:jobsregistry 方法:
CheckKey
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
jobsregistries
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
jobsregistries
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -106,13 +106,23 @@ mock.onGet(new RegExp(/^\/jobsregistries\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).re
...
@@ -106,13 +106,23 @@ mock.onGet(new RegExp(/^\/jobsregistries\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).re
});
});
});
});
}
}
let
items
=
mockDatas
?
mockDatas
:
[];
//let items = mockDatas ? mockDatas : [];
let
_items
=
items
.
find
((
item
:
any
)
=>
Object
.
is
(
item
.
id
,
tempValue
.
id
));
//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
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
);
console
.
table
(
data
);
console
.
groupEnd
();
console
.
groupEnd
();
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
];
return
[
status
,
data
];
});
});
// Create
// Create
...
@@ -140,44 +150,6 @@ mock.onPost(new RegExp(/^\/jobsregistries\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((c
...
@@ -140,44 +150,6 @@ mock.onPost(new RegExp(/^\/jobsregistries\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((c
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
mockDatas
[
0
]];
return
[
status
,
mockDatas
[
0
]];
});
});
// Update
mock
.
onPut
(
new
RegExp
(
/^
\/
jobsregistries
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:jobsregistry 方法: Update"
);
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
(
/^
\/
jobsregistries
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
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
];
});
// GetDraft
// GetDraft
mock
.
onGet
(
new
RegExp
(
/^
\/
jobsregistries
\/
getdraft$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onGet
(
new
RegExp
(
/^
\/
jobsregistries
\/
getdraft$/
)).
reply
((
config
:
any
)
=>
{
...
@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/jobsregistries\/getdraft$/)).reply((config: any) => {
...
@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/jobsregistries\/getdraft$/)).reply((config: any) => {
return
[
status
,
{}];
return
[
status
,
{}];
});
});
//
CheckKey
//
Save
mock
.
onPost
(
new
RegExp
(
/^
\/
jobsregistries
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onPost
(
new
RegExp
(
/^
\/
jobsregistries
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
save
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:jobsregistry 方法:
CheckKey
"
);
console
.
groupCollapsed
(
"实体:jobsregistry 方法:
Save
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
jobsregistries
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
jobsregistries
\/([
a-zA-Z0-9
\-\;]{1,35})\/
save
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -233,16 +205,16 @@ mock.onPost(new RegExp(/^\/jobsregistries\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)
...
@@ -233,16 +205,16 @@ mock.onPost(new RegExp(/^\/jobsregistries\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)
return
[
status
,
data
];
return
[
status
,
data
];
});
});
//
Sav
e
//
Updat
e
mock
.
onP
ost
(
new
RegExp
(
/^
\/
jobsregistries
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
save
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onP
ut
(
new
RegExp
(
/^
\/
jobsregistries
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:jobsregistry 方法:
Sav
e"
);
console
.
groupCollapsed
(
"实体:jobsregistry 方法:
Updat
e"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
jobsregistries
\/([
a-zA-Z0-9
\-\;]{1,35})
\/
save
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
jobsregistries
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -322,10 +294,38 @@ mock.onGet(new RegExp(/^\/jobsregistries\/fetchdefault(\?[\w-./?%&=,]*)*$/)).rep
...
@@ -322,10 +294,38 @@ mock.onGet(new RegExp(/^\/jobsregistries\/fetchdefault(\?[\w-./?%&=,]*)*$/)).rep
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// Select
mock
.
onGet
(
new
RegExp
(
/^
\/
jobsregistries
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:jobsregistry 方法: Select"
);
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
(
/^
\/
jobsregistries
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select$/
).
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
));
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
];
});
// Remove
mock
.
onDelete
(
new
RegExp
(
/^
\/
jobsregistries
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
// Get
console
.
groupCollapsed
(
"实体:jobsregistry 方法: Remove"
);
mock
.
onGet
(
new
RegExp
(
/^
\/
jobsregistries
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:jobsregistry 方法: Get"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
...
@@ -351,9 +351,9 @@ mock.onDelete(new RegExp(/^\/jobsregistries\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((
...
@@ -351,9 +351,9 @@ mock.onDelete(new RegExp(/^\/jobsregistries\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((
return
[
status
,
_items
?
_items
:{}];
return
[
status
,
_items
?
_items
:{}];
});
});
//
Get
//
Remove
mock
.
on
Get
(
new
RegExp
(
/^
\/
jobsregistries
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
on
Delete
(
new
RegExp
(
/^
\/
jobsregistries
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:jobsregistry 方法:
Get
"
);
console
.
groupCollapsed
(
"实体:jobsregistry 方法:
Remove
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
...
...
app_web/src/service/jobs-info/jobs-info-service-base.ts
浏览文件 @
0d5d6c3f
...
@@ -39,7 +39,7 @@ export default class JobsInfoServiceBase extends EntityService {
...
@@ -39,7 +39,7 @@ export default class JobsInfoServiceBase extends EntityService {
// 实体接口
// 实体接口
/**
/**
*
Select
接口方法
*
CheckKey
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -47,9 +47,8 @@ export default class JobsInfoServiceBase extends EntityService {
...
@@ -47,9 +47,8 @@ export default class JobsInfoServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof JobsInfoServiceBase
* @memberof JobsInfoServiceBase
*/
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
get
(
`/jobsinfos/
${
context
.
jobsinfo
}
/select`
,
isloading
);
let
res
:
any
=
Http
.
getInstance
().
post
(
`/jobsinfos/
${
context
.
jobsinfo
}
/checkkey`
,
data
,
isloading
);
return
res
;
return
res
;
}
}
...
@@ -78,7 +77,7 @@ export default class JobsInfoServiceBase extends EntityService {
...
@@ -78,7 +77,7 @@ export default class JobsInfoServiceBase extends EntityService {
}
}
/**
/**
*
Upda
te接口方法
*
Execu
te接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -86,16 +85,13 @@ export default class JobsInfoServiceBase extends EntityService {
...
@@ -86,16 +85,13 @@ export default class JobsInfoServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof JobsInfoServiceBase
* @memberof JobsInfoServiceBase
*/
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Execute
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
res
:
any
=
Http
.
getInstance
().
post
(
`/jobsinfos/
${
context
.
jobsinfo
}
/execute`
,
data
,
isloading
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/jobsinfos/
${
context
.
jobsinfo
}
`
,
data
,
isloading
);
return
res
;
return
res
;
}
}
/**
/**
*
Remove
接口方法
*
ExecuteBatch
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -103,9 +99,9 @@ export default class JobsInfoServiceBase extends EntityService {
...
@@ -103,9 +99,9 @@ export default class JobsInfoServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof JobsInfoServiceBase
* @memberof JobsInfoServiceBase
*/
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
ExecuteBatch
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
delete
(
`/jobsinfos/
${
context
.
jobsinfo
}
`
,
isloading
);
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
)
);
return
res
;
return
await
Http
.
getInstance
().
post
(
`/jobsinfos/executebatch`
,
tempData
,
isloading
)
;
}
}
/**
/**
...
@@ -140,21 +136,7 @@ export default class JobsInfoServiceBase extends EntityService {
...
@@ -140,21 +136,7 @@ export default class JobsInfoServiceBase extends EntityService {
}
}
/**
/**
* CheckKey接口方法
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof JobsInfoServiceBase
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
post
(
`/jobsinfos/
${
context
.
jobsinfo
}
/checkkey`
,
data
,
isloading
);
return
res
;
}
/**
* Execute接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -162,25 +144,11 @@ export default class JobsInfoServiceBase extends EntityService {
...
@@ -162,25 +144,11 @@ export default class JobsInfoServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof JobsInfoServiceBase
* @memberof JobsInfoServiceBase
*/
*/
public
async
Execut
e
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Remov
e
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
post
(
`/jobsinfos/
${
context
.
jobsinfo
}
/execute`
,
data
,
isloading
);
let
res
:
any
=
Http
.
getInstance
().
delete
(
`/jobsinfos/
${
context
.
jobsinfo
}
`
,
isloading
);
return
res
;
return
res
;
}
}
/**
* ExecuteBatch接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof JobsInfoServiceBase
*/
public
async
ExecuteBatch
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
await
Http
.
getInstance
().
post
(
`/jobsinfos/executebatch`
,
tempData
,
isloading
);
}
/**
/**
* Save接口方法
* Save接口方法
*
*
...
@@ -226,6 +194,23 @@ export default class JobsInfoServiceBase extends EntityService {
...
@@ -226,6 +194,23 @@ export default class JobsInfoServiceBase extends EntityService {
return
res
;
return
res
;
}
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof JobsInfoServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/jobsinfos/
${
context
.
jobsinfo
}
`
,
data
,
isloading
);
return
res
;
}
/**
/**
* FetchDefault接口方法
* FetchDefault接口方法
*
*
...
@@ -254,4 +239,19 @@ export default class JobsInfoServiceBase extends EntityService {
...
@@ -254,4 +239,19 @@ export default class JobsInfoServiceBase extends EntityService {
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
await
Http
.
getInstance
().
post
(
`/jobsinfos/searchdefault`
,
tempData
,
isloading
);
return
await
Http
.
getInstance
().
post
(
`/jobsinfos/searchdefault`
,
tempData
,
isloading
);
}
}
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof JobsInfoServiceBase
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
get
(
`/jobsinfos/
${
context
.
jobsinfo
}
/select`
,
isloading
);
return
res
;
}
}
}
\ No newline at end of file
app_web/src/service/jobs-lock/jobs-lock-service-base.ts
浏览文件 @
0d5d6c3f
...
@@ -39,7 +39,7 @@ export default class JobsLockServiceBase extends EntityService {
...
@@ -39,7 +39,7 @@ export default class JobsLockServiceBase extends EntityService {
// 实体接口
// 实体接口
/**
/**
*
Select
接口方法
*
CheckKey
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -47,9 +47,8 @@ export default class JobsLockServiceBase extends EntityService {
...
@@ -47,9 +47,8 @@ export default class JobsLockServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof JobsLockServiceBase
* @memberof JobsLockServiceBase
*/
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
get
(
`/jobslocks/
${
context
.
jobslock
}
/select`
,
isloading
);
let
res
:
any
=
Http
.
getInstance
().
post
(
`/jobslocks/
${
context
.
jobslock
}
/checkkey`
,
data
,
isloading
);
return
res
;
return
res
;
}
}
...
@@ -77,37 +76,6 @@ export default class JobsLockServiceBase extends EntityService {
...
@@ -77,37 +76,6 @@ export default class JobsLockServiceBase extends EntityService {
return
res
;
return
res
;
}
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof JobsLockServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/jobslocks/
${
context
.
jobslock
}
`
,
data
,
isloading
);
return
res
;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof JobsLockServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
delete
(
`/jobslocks/
${
context
.
jobslock
}
`
,
isloading
);
return
res
;
}
/**
/**
* Get接口方法
* Get接口方法
*
*
...
@@ -140,7 +108,7 @@ export default class JobsLockServiceBase extends EntityService {
...
@@ -140,7 +108,7 @@ export default class JobsLockServiceBase extends EntityService {
}
}
/**
/**
*
CheckKey
接口方法
*
Remove
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -148,8 +116,8 @@ export default class JobsLockServiceBase extends EntityService {
...
@@ -148,8 +116,8 @@ export default class JobsLockServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof JobsLockServiceBase
* @memberof JobsLockServiceBase
*/
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
post
(
`/jobslocks/
${
context
.
jobslock
}
/checkkey`
,
data
,
isloading
);
let
res
:
any
=
Http
.
getInstance
().
delete
(
`/jobslocks/
${
context
.
jobslock
}
`
,
isloading
);
return
res
;
return
res
;
}
}
...
@@ -170,6 +138,23 @@ export default class JobsLockServiceBase extends EntityService {
...
@@ -170,6 +138,23 @@ export default class JobsLockServiceBase extends EntityService {
return
res
;
return
res
;
}
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof JobsLockServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/jobslocks/
${
context
.
jobslock
}
`
,
data
,
isloading
);
return
res
;
}
/**
/**
* FetchDefault接口方法
* FetchDefault接口方法
*
*
...
@@ -198,4 +183,19 @@ export default class JobsLockServiceBase extends EntityService {
...
@@ -198,4 +183,19 @@ export default class JobsLockServiceBase extends EntityService {
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
await
Http
.
getInstance
().
post
(
`/jobslocks/searchdefault`
,
tempData
,
isloading
);
return
await
Http
.
getInstance
().
post
(
`/jobslocks/searchdefault`
,
tempData
,
isloading
);
}
}
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof JobsLockServiceBase
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
get
(
`/jobslocks/
${
context
.
jobslock
}
/select`
,
isloading
);
return
res
;
}
}
}
\ No newline at end of file
app_web/src/service/jobs-log/jobs-log-service-base.ts
浏览文件 @
0d5d6c3f
...
@@ -39,7 +39,7 @@ export default class JobsLogServiceBase extends EntityService {
...
@@ -39,7 +39,7 @@ export default class JobsLogServiceBase extends EntityService {
// 实体接口
// 实体接口
/**
/**
*
Select
接口方法
*
CheckKey
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -47,9 +47,8 @@ export default class JobsLogServiceBase extends EntityService {
...
@@ -47,9 +47,8 @@ export default class JobsLogServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof JobsLogServiceBase
* @memberof JobsLogServiceBase
*/
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
get
(
`/jobslogs/
${
context
.
jobslog
}
/select`
,
isloading
);
let
res
:
any
=
Http
.
getInstance
().
post
(
`/jobslogs/
${
context
.
jobslog
}
/checkkey`
,
data
,
isloading
);
return
res
;
return
res
;
}
}
...
@@ -77,37 +76,6 @@ export default class JobsLogServiceBase extends EntityService {
...
@@ -77,37 +76,6 @@ export default class JobsLogServiceBase extends EntityService {
return
res
;
return
res
;
}
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof JobsLogServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/jobslogs/
${
context
.
jobslog
}
`
,
data
,
isloading
);
return
res
;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof JobsLogServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
delete
(
`/jobslogs/
${
context
.
jobslog
}
`
,
isloading
);
return
res
;
}
/**
/**
* Get接口方法
* Get接口方法
*
*
...
@@ -140,7 +108,7 @@ export default class JobsLogServiceBase extends EntityService {
...
@@ -140,7 +108,7 @@ export default class JobsLogServiceBase extends EntityService {
}
}
/**
/**
*
CheckKey
接口方法
*
Remove
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -148,8 +116,8 @@ export default class JobsLogServiceBase extends EntityService {
...
@@ -148,8 +116,8 @@ export default class JobsLogServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof JobsLogServiceBase
* @memberof JobsLogServiceBase
*/
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
post
(
`/jobslogs/
${
context
.
jobslog
}
/checkkey`
,
data
,
isloading
);
let
res
:
any
=
Http
.
getInstance
().
delete
(
`/jobslogs/
${
context
.
jobslog
}
`
,
isloading
);
return
res
;
return
res
;
}
}
...
@@ -170,6 +138,23 @@ export default class JobsLogServiceBase extends EntityService {
...
@@ -170,6 +138,23 @@ export default class JobsLogServiceBase extends EntityService {
return
res
;
return
res
;
}
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof JobsLogServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/jobslogs/
${
context
.
jobslog
}
`
,
data
,
isloading
);
return
res
;
}
/**
/**
* FetchDefault接口方法
* FetchDefault接口方法
*
*
...
@@ -198,4 +183,19 @@ export default class JobsLogServiceBase extends EntityService {
...
@@ -198,4 +183,19 @@ export default class JobsLogServiceBase extends EntityService {
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
await
Http
.
getInstance
().
post
(
`/jobslogs/searchdefault`
,
tempData
,
isloading
);
return
await
Http
.
getInstance
().
post
(
`/jobslogs/searchdefault`
,
tempData
,
isloading
);
}
}
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof JobsLogServiceBase
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
get
(
`/jobslogs/
${
context
.
jobslog
}
/select`
,
isloading
);
return
res
;
}
}
}
\ No newline at end of file
app_web/src/service/jobs-registry/jobs-registry-service-base.ts
浏览文件 @
0d5d6c3f
...
@@ -39,7 +39,7 @@ export default class JobsRegistryServiceBase extends EntityService {
...
@@ -39,7 +39,7 @@ export default class JobsRegistryServiceBase extends EntityService {
// 实体接口
// 实体接口
/**
/**
*
Select
接口方法
*
CheckKey
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -47,9 +47,8 @@ export default class JobsRegistryServiceBase extends EntityService {
...
@@ -47,9 +47,8 @@ export default class JobsRegistryServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof JobsRegistryServiceBase
* @memberof JobsRegistryServiceBase
*/
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
get
(
`/jobsregistries/
${
context
.
jobsregistry
}
/select`
,
isloading
);
let
res
:
any
=
Http
.
getInstance
().
post
(
`/jobsregistries/
${
context
.
jobsregistry
}
/checkkey`
,
data
,
isloading
);
return
res
;
return
res
;
}
}
...
@@ -77,37 +76,6 @@ export default class JobsRegistryServiceBase extends EntityService {
...
@@ -77,37 +76,6 @@ export default class JobsRegistryServiceBase extends EntityService {
return
res
;
return
res
;
}
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof JobsRegistryServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/jobsregistries/
${
context
.
jobsregistry
}
`
,
data
,
isloading
);
return
res
;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof JobsRegistryServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
delete
(
`/jobsregistries/
${
context
.
jobsregistry
}
`
,
isloading
);
return
res
;
}
/**
/**
* Get接口方法
* Get接口方法
*
*
...
@@ -140,7 +108,7 @@ export default class JobsRegistryServiceBase extends EntityService {
...
@@ -140,7 +108,7 @@ export default class JobsRegistryServiceBase extends EntityService {
}
}
/**
/**
*
CheckKey
接口方法
*
Remove
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -148,8 +116,8 @@ export default class JobsRegistryServiceBase extends EntityService {
...
@@ -148,8 +116,8 @@ export default class JobsRegistryServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof JobsRegistryServiceBase
* @memberof JobsRegistryServiceBase
*/
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
post
(
`/jobsregistries/
${
context
.
jobsregistry
}
/checkkey`
,
data
,
isloading
);
let
res
:
any
=
Http
.
getInstance
().
delete
(
`/jobsregistries/
${
context
.
jobsregistry
}
`
,
isloading
);
return
res
;
return
res
;
}
}
...
@@ -170,6 +138,23 @@ export default class JobsRegistryServiceBase extends EntityService {
...
@@ -170,6 +138,23 @@ export default class JobsRegistryServiceBase extends EntityService {
return
res
;
return
res
;
}
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof JobsRegistryServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/jobsregistries/
${
context
.
jobsregistry
}
`
,
data
,
isloading
);
return
res
;
}
/**
/**
* FetchDefault接口方法
* FetchDefault接口方法
*
*
...
@@ -198,4 +183,19 @@ export default class JobsRegistryServiceBase extends EntityService {
...
@@ -198,4 +183,19 @@ export default class JobsRegistryServiceBase extends EntityService {
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
await
Http
.
getInstance
().
post
(
`/jobsregistries/searchdefault`
,
tempData
,
isloading
);
return
await
Http
.
getInstance
().
post
(
`/jobsregistries/searchdefault`
,
tempData
,
isloading
);
}
}
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof JobsRegistryServiceBase
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
get
(
`/jobsregistries/
${
context
.
jobsregistry
}
/select`
,
isloading
);
return
res
;
}
}
}
\ No newline at end of file
app_web/src/widgets/app/task-index-view-appmenu/task-index-view-appmenu-base.vue
浏览文件 @
0d5d6c3f
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<
template
v-else
>
<
template
v-else
>
<i
class=
'fa fa-cogs app-menu-icon'
></i>
<i
class=
'fa fa-cogs app-menu-icon'
></i>
</
template
>
</
template
>
<span
class=
'text'
:title=
"$t('app.menus.taskindexview.' + item0.name
)"
>
{{$t('app.menus.taskindexview.' + item0.name
)}}
</span>
<span
class=
'text'
:title=
"$t('app.menus.taskindexview.' + item0.name
.toLowerCase())"
>
{{$t('app.menus.taskindexview.' + item0.name.toLowerCase()
)}}
</span>
</template>
</template>
<
template
v-for=
"item1 in item0.items"
>
<
template
v-for=
"item1 in item0.items"
>
<template
v-if=
"item1.items && Array.isArray(item1.items) && item1.items.length > 0"
>
<template
v-if=
"item1.items && Array.isArray(item1.items) && item1.items.length > 0"
>
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
<
template
v-else-if=
"item1.iconcls && item1.iconcls != ''"
>
<
template
v-else-if=
"item1.iconcls && item1.iconcls != ''"
>
<i
:class=
"[item1.iconcls, 'app-menu-icon']"
></i>
<i
:class=
"[item1.iconcls, 'app-menu-icon']"
></i>
</
template
>
</
template
>
<span
class=
'text'
:title=
"$t('app.menus.taskindexview.' + item1.name
)"
>
{{$t('app.menus.taskindexview.' + item1.name
)}}
</span>
<span
class=
'text'
:title=
"$t('app.menus.taskindexview.' + item1.name
.toLowerCase())"
>
{{$t('app.menus.taskindexview.' + item1.name.toLowerCase()
)}}
</span>
</template>
</template>
<
template
v-for=
"item2 in item1.items"
>
<
template
v-for=
"item2 in item1.items"
>
<template
v-if=
"item2.type =='MENUITEM'"
>
<template
v-if=
"item2.type =='MENUITEM'"
>
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
<i
:class=
"[item2.iconcls, 'app-menu-icon']"
></i>
<i
:class=
"[item2.iconcls, 'app-menu-icon']"
></i>
</
template
>
</
template
>
<
template
slot=
"title"
>
<
template
slot=
"title"
>
<span
class=
"text"
:title=
"$t('app.menus.taskindexview.' + item2.name
)"
>
{{
$t
(
'app.menus.taskindexview.'
+
item2
.
name
)
}}
</span>
<span
class=
"text"
:title=
"$t('app.menus.taskindexview.' + item2.name
.toLowerCase())"
>
{{
$t
(
'app.menus.taskindexview.'
+
item2
.
name
.
toLowerCase
()
)
}}
</span>
<template
v-if=
"counterdata && counterdata[item2.counterid] && counterdata[item2.counterid] > 0"
>
<template
v-if=
"counterdata && counterdata[item2.counterid] && counterdata[item2.counterid] > 0"
>
<span
class=
"pull-right"
>
<span
class=
"pull-right"
>
<badge
:count=
"counterdata[item2.counterid]"
:overflow-count=
"9999"
></badge>
<badge
:count=
"counterdata[item2.counterid]"
:overflow-count=
"9999"
></badge>
...
@@ -69,7 +69,7 @@
...
@@ -69,7 +69,7 @@
<i
:class=
"[item1.iconcls, 'app-menu-icon']"
></i>
<i
:class=
"[item1.iconcls, 'app-menu-icon']"
></i>
</
template
>
</
template
>
<
template
slot=
"title"
>
<
template
slot=
"title"
>
<span
class=
"text"
:title=
"$t('app.menus.taskindexview.' + item1.name
)"
>
{{
$t
(
'app.menus.taskindexview.'
+
item1
.
name
)
}}
</span>
<span
class=
"text"
:title=
"$t('app.menus.taskindexview.' + item1.name
.toLowerCase())"
>
{{
$t
(
'app.menus.taskindexview.'
+
item1
.
name
.
toLowerCase
()
)
}}
</span>
<template
v-if=
"counterdata && counterdata[item1.counterid] && counterdata[item1.counterid] > 0"
>
<template
v-if=
"counterdata && counterdata[item1.counterid] && counterdata[item1.counterid] > 0"
>
<span
class=
"pull-right"
>
<span
class=
"pull-right"
>
<badge
:count=
"counterdata[item1.counterid]"
:overflow-count=
"9999"
></badge>
<badge
:count=
"counterdata[item1.counterid]"
:overflow-count=
"9999"
></badge>
...
@@ -95,7 +95,7 @@
...
@@ -95,7 +95,7 @@
<i
class=
'fa fa-cogs app-menu-icon'
></i>
<i
class=
'fa fa-cogs app-menu-icon'
></i>
</
template
>
</
template
>
<
template
slot=
"title"
>
<
template
slot=
"title"
>
<span
class=
"text"
:title=
"$t('app.menus.taskindexview.' + item0.name
)"
>
{{
$t
(
'app.menus.taskindexview.'
+
item0
.
name
)
}}
</span>
<span
class=
"text"
:title=
"$t('app.menus.taskindexview.' + item0.name
.toLowerCase())"
>
{{
$t
(
'app.menus.taskindexview.'
+
item0
.
name
.
toLowerCase
()
)
}}
</span>
<template
v-if=
"counterdata && counterdata[item0.counterid] && counterdata[item0.counterid] > 0"
>
<template
v-if=
"counterdata && counterdata[item0.counterid] && counterdata[item0.counterid] > 0"
>
<span
class=
"pull-right"
>
<span
class=
"pull-right"
>
<badge
:count=
"counterdata[item0.counterid]"
:overflow-count=
"9999"
></badge>
<badge
:count=
"counterdata[item0.counterid]"
:overflow-count=
"9999"
></badge>
...
...
app_web/src/widgets/jobs-info/default-searchform/default-searchform-base.vue
浏览文件 @
0d5d6c3f
...
@@ -749,8 +749,8 @@ export default class DefaultBase extends Vue implements ControlInterface {
...
@@ -749,8 +749,8 @@ export default class DefaultBase extends Vue implements ControlInterface {
let
post
:
Promise
<
any
>
=
this
.
service
.
loadDraft
(
this
.
loaddraftAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
let
post
:
Promise
<
any
>
=
this
.
service
.
loadDraft
(
this
.
loaddraftAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
errorM
essage
)
{
if
(
response
.
data
&&
response
.
data
.
m
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorM
essage
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
m
essage
});
}
}
return
;
return
;
}
}
...
...
app_web/src/widgets/jobs-info/main-grid/main-grid-base.vue
浏览文件 @
0d5d6c3f
...
@@ -994,8 +994,8 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -994,8 +994,8 @@ export default class MainBase extends Vue implements ControlInterface {
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
errorM
essage
)
{
if
(
response
.
data
&&
response
.
data
.
m
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorM
essage
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
m
essage
});
}
}
return
;
return
;
}
}
...
@@ -1045,7 +1045,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1045,7 +1045,7 @@ export default class MainBase extends Vue implements ControlInterface {
if
(
response
&&
response
.
status
===
401
)
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
return
;
}
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorMessage
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
});
});
}
}
...
@@ -1130,7 +1130,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1130,7 +1130,7 @@ export default class MainBase extends Vue implements ControlInterface {
resolve
(
response
);
resolve
(
response
);
}).
catch
((
response
:
any
)
=>
{
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
!=
200
)
{
if
(
response
&&
response
.
status
!=
200
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
message
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
return
;
return
;
}
}
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
...
@@ -1251,6 +1251,9 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1251,6 +1251,9 @@ export default class MainBase extends Vue implements ControlInterface {
const
parentdata
:
any
=
{};
const
parentdata
:
any
=
{};
this
.
$emit
(
'beforeload'
,
parentdata
);
this
.
$emit
(
'beforeload'
,
parentdata
);
Object
.
assign
(
arg
,
parentdata
);
Object
.
assign
(
arg
,
parentdata
);
let
tempViewParams
:
any
=
parentdata
.
viewparams
?
parentdata
.
viewparams
:{};
Object
.
assign
(
tempViewParams
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
)));
Object
.
assign
(
arg
,{
viewparams
:
tempViewParams
});
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
if
(
!
response
||
response
.
status
!==
200
)
{
...
@@ -2147,8 +2150,8 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -2147,8 +2150,8 @@ export default class MainBase extends Vue implements ControlInterface {
let
post
:
Promise
<
any
>
=
this
.
service
.
loadDraft
(
this
.
loaddraftAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
args
[
0
],
this
.
showBusyIndicator
);
let
post
:
Promise
<
any
>
=
this
.
service
.
loadDraft
(
this
.
loaddraftAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
args
[
0
],
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
errorM
essage
)
{
if
(
response
.
data
&&
response
.
data
.
m
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorM
essage
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
m
essage
});
}
}
return
;
return
;
}
}
...
...
app_web/src/widgets/jobs-log/default-searchform/default-searchform-base.vue
浏览文件 @
0d5d6c3f
...
@@ -742,8 +742,8 @@ export default class DefaultBase extends Vue implements ControlInterface {
...
@@ -742,8 +742,8 @@ export default class DefaultBase extends Vue implements ControlInterface {
let
post
:
Promise
<
any
>
=
this
.
service
.
loadDraft
(
this
.
loaddraftAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
let
post
:
Promise
<
any
>
=
this
.
service
.
loadDraft
(
this
.
loaddraftAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
errorM
essage
)
{
if
(
response
.
data
&&
response
.
data
.
m
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorM
essage
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
m
essage
});
}
}
return
;
return
;
}
}
...
...
app_web/src/widgets/jobs-log/main-grid/main-grid-base.vue
浏览文件 @
0d5d6c3f
...
@@ -950,8 +950,8 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -950,8 +950,8 @@ export default class MainBase extends Vue implements ControlInterface {
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
errorM
essage
)
{
if
(
response
.
data
&&
response
.
data
.
m
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorM
essage
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
m
essage
});
}
}
return
;
return
;
}
}
...
@@ -1001,7 +1001,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1001,7 +1001,7 @@ export default class MainBase extends Vue implements ControlInterface {
if
(
response
&&
response
.
status
===
401
)
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
return
;
}
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorMessage
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
});
});
}
}
...
@@ -1086,7 +1086,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1086,7 +1086,7 @@ export default class MainBase extends Vue implements ControlInterface {
resolve
(
response
);
resolve
(
response
);
}).
catch
((
response
:
any
)
=>
{
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
!=
200
)
{
if
(
response
&&
response
.
status
!=
200
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
message
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
return
;
return
;
}
}
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
...
@@ -1207,6 +1207,9 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1207,6 +1207,9 @@ export default class MainBase extends Vue implements ControlInterface {
const
parentdata
:
any
=
{};
const
parentdata
:
any
=
{};
this
.
$emit
(
'beforeload'
,
parentdata
);
this
.
$emit
(
'beforeload'
,
parentdata
);
Object
.
assign
(
arg
,
parentdata
);
Object
.
assign
(
arg
,
parentdata
);
let
tempViewParams
:
any
=
parentdata
.
viewparams
?
parentdata
.
viewparams
:{};
Object
.
assign
(
tempViewParams
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
)));
Object
.
assign
(
arg
,{
viewparams
:
tempViewParams
});
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
if
(
!
response
||
response
.
status
!==
200
)
{
...
@@ -2089,8 +2092,8 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -2089,8 +2092,8 @@ export default class MainBase extends Vue implements ControlInterface {
let
post
:
Promise
<
any
>
=
this
.
service
.
loadDraft
(
this
.
loaddraftAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
args
[
0
],
this
.
showBusyIndicator
);
let
post
:
Promise
<
any
>
=
this
.
service
.
loadDraft
(
this
.
loaddraftAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
args
[
0
],
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
errorM
essage
)
{
if
(
response
.
data
&&
response
.
data
.
m
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorM
essage
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
m
essage
});
}
}
return
;
return
;
}
}
...
...
app_web/src/widgets/jobs-registry/default-searchform/default-searchform-base.vue
浏览文件 @
0d5d6c3f
...
@@ -713,8 +713,8 @@ export default class DefaultBase extends Vue implements ControlInterface {
...
@@ -713,8 +713,8 @@ export default class DefaultBase extends Vue implements ControlInterface {
let
post
:
Promise
<
any
>
=
this
.
service
.
loadDraft
(
this
.
loaddraftAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
let
post
:
Promise
<
any
>
=
this
.
service
.
loadDraft
(
this
.
loaddraftAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
errorM
essage
)
{
if
(
response
.
data
&&
response
.
data
.
m
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorM
essage
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
m
essage
});
}
}
return
;
return
;
}
}
...
...
app_web/src/widgets/jobs-registry/main-grid/main-grid-base.vue
浏览文件 @
0d5d6c3f
...
@@ -868,8 +868,8 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -868,8 +868,8 @@ export default class MainBase extends Vue implements ControlInterface {
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
errorM
essage
)
{
if
(
response
.
data
&&
response
.
data
.
m
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorM
essage
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
m
essage
});
}
}
return
;
return
;
}
}
...
@@ -919,7 +919,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -919,7 +919,7 @@ export default class MainBase extends Vue implements ControlInterface {
if
(
response
&&
response
.
status
===
401
)
{
if
(
response
&&
response
.
status
===
401
)
{
return
;
return
;
}
}
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorMessage
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
});
});
}
}
...
@@ -1004,7 +1004,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1004,7 +1004,7 @@ export default class MainBase extends Vue implements ControlInterface {
resolve
(
response
);
resolve
(
response
);
}).
catch
((
response
:
any
)
=>
{
}).
catch
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
!=
200
)
{
if
(
response
&&
response
.
status
!=
200
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
message
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
&&
response
.
data
.
message
?
response
.
data
.
message
:
""
});
return
;
return
;
}
}
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
...
@@ -1125,6 +1125,9 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -1125,6 +1125,9 @@ export default class MainBase extends Vue implements ControlInterface {
const
parentdata
:
any
=
{};
const
parentdata
:
any
=
{};
this
.
$emit
(
'beforeload'
,
parentdata
);
this
.
$emit
(
'beforeload'
,
parentdata
);
Object
.
assign
(
arg
,
parentdata
);
Object
.
assign
(
arg
,
parentdata
);
let
tempViewParams
:
any
=
parentdata
.
viewparams
?
parentdata
.
viewparams
:{};
Object
.
assign
(
tempViewParams
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
viewparams
)));
Object
.
assign
(
arg
,{
viewparams
:
tempViewParams
});
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
const
post
:
Promise
<
any
>
=
this
.
service
.
search
(
this
.
fetchAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
arg
,
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
if
(
!
response
||
response
.
status
!==
200
)
{
...
@@ -2003,8 +2006,8 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -2003,8 +2006,8 @@ export default class MainBase extends Vue implements ControlInterface {
let
post
:
Promise
<
any
>
=
this
.
service
.
loadDraft
(
this
.
loaddraftAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
args
[
0
],
this
.
showBusyIndicator
);
let
post
:
Promise
<
any
>
=
this
.
service
.
loadDraft
(
this
.
loaddraftAction
,
JSON
.
parse
(
JSON
.
stringify
(
this
.
context
)),
args
[
0
],
this
.
showBusyIndicator
);
post
.
then
((
response
:
any
)
=>
{
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
errorM
essage
)
{
if
(
response
.
data
&&
response
.
data
.
m
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorM
essage
});
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
m
essage
});
}
}
return
;
return
;
}
}
...
...
ibztask-app/ibztask-app-web/pom.xml
浏览文件 @
0d5d6c3f
...
@@ -77,6 +77,32 @@
...
@@ -77,6 +77,32 @@
<workingDirectory>
../../app_web
</workingDirectory>
<workingDirectory>
../../app_web
</workingDirectory>
</configuration>
</configuration>
</execution>
</execution>
<execution>
<id>
prepare
</id>
<configuration>
<executable>
cp
</executable>
<arguments>
<argument>
../../${project.artifactId}.jar
</argument>
<argument>
${project.basedir}/src/main/docker/
</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>
buildpush
</id>
<configuration>
<executable>
docker
</executable>
<arguments>
<argument>
buildx
</argument>
<argument>
build
</argument>
<argument>
--platform
</argument>
<argument>
linux/amd64,linux/arm64
</argument>
<argument>
-t
</argument>
<argument>
${docker.image.prefix}/${project.artifactId}:latest
</argument>
<argument>
${project.basedir}/src/main/docker
</argument>
<argument>
--push
</argument>
</arguments>
</configuration>
</execution>
</executions>
</executions>
</plugin>
</plugin>
...
@@ -114,7 +140,7 @@
...
@@ -114,7 +140,7 @@
</resource>
</resource>
</resources>
</resources>
</configuration>
</configuration>
</plugin>
</plugin>
</plugins>
</plugins>
</build>
</build>
</profile>
</profile>
...
...
ibztask-app/ibztask-app-web/src/main/docker/Dockerfile
浏览文件 @
0d5d6c3f
FROM
openjdk:8-jre-alpine
FROM
adoptopenjdk/openjdk8:jdk8u242-b08-centos
ENV
TZ=Asia/Shanghai \
ENV
TZ=Asia/Shanghai \
SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
...
...
ibztask-app/ibztask-app-web/src/main/resources/application-web-prod.yml
浏览文件 @
0d5d6c3f
...
@@ -7,22 +7,6 @@ logging:
...
@@ -7,22 +7,6 @@ logging:
#zuul网关路由设置
#zuul网关路由设置
zuul
:
zuul
:
routes
:
routes
:
jobs_log
:
path
:
/jobslogs/**
serviceId
:
${ibiz.ref.service.ibztask-api:ibztask-api}
stripPrefix
:
false
jobs_registry
:
path
:
/jobsregistries/**
serviceId
:
${ibiz.ref.service.ibztask-api:ibztask-api}
stripPrefix
:
false
jobs_info
:
path
:
/jobsinfos/**
serviceId
:
${ibiz.ref.service.ibztask-api:ibztask-api}
stripPrefix
:
false
jobs_lock
:
path
:
/jobslocks/**
serviceId
:
${ibiz.ref.service.ibztask-api:ibztask-api}
stripPrefix
:
false
loginv7
:
loginv7
:
path
:
/v7/login
path
:
/v7/login
serviceId
:
${ibiz.ref.service.uaa:ibzuaa-api}
serviceId
:
${ibiz.ref.service.uaa:ibzuaa-api}
...
@@ -79,5 +63,21 @@ zuul:
...
@@ -79,5 +63,21 @@ zuul:
path
:
/sysauthlogs
path
:
/sysauthlogs
serviceId
:
${ibiz.ref.service.uaa:ibzuaa-api}
serviceId
:
${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix
:
false
stripPrefix
:
false
jobs_log
:
path
:
/jobslogs/**
serviceId
:
${ibiz.ref.service.ibztask-api:ibztask-api}
stripPrefix
:
false
jobs_registry
:
path
:
/jobsregistries/**
serviceId
:
${ibiz.ref.service.ibztask-api:ibztask-api}
stripPrefix
:
false
jobs_info
:
path
:
/jobsinfos/**
serviceId
:
${ibiz.ref.service.ibztask-api:ibztask-api}
stripPrefix
:
false
jobs_lock
:
path
:
/jobslocks/**
serviceId
:
${ibiz.ref.service.ibztask-api:ibztask-api}
stripPrefix
:
false
sensitive-headers
:
sensitive-headers
:
-
Cookie,Set-Cookie,Authorization
-
Cookie,Set-Cookie,Authorization
ibztask-core/src/main/java/cn/ibizlab/core/task/service/impl/JobsInfoServiceImpl.java
浏览文件 @
0d5d6c3f
...
@@ -217,8 +217,8 @@ public class JobsInfoServiceImpl extends ServiceImpl<JobsInfoMapper, JobsInfo> i
...
@@ -217,8 +217,8 @@ public class JobsInfoServiceImpl extends ServiceImpl<JobsInfoMapper, JobsInfo> i
*/
*/
@Override
@Override
public
Page
<
JobsInfo
>
searchDefault
(
JobsInfoSearchContext
context
)
{
public
Page
<
JobsInfo
>
searchDefault
(
JobsInfoSearchContext
context
)
{
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
JobsInfo
>
pages
=
baseMapper
.
searchDefault
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
JobsInfo
>
pages
=
baseMapper
.
searchDefault
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
JobsInfo
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
return
new
PageImpl
<
JobsInfo
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
}
...
...
ibztask-core/src/main/java/cn/ibizlab/core/task/service/impl/JobsLockServiceImpl.java
浏览文件 @
0d5d6c3f
...
@@ -184,8 +184,8 @@ public class JobsLockServiceImpl extends ServiceImpl<JobsLockMapper, JobsLock> i
...
@@ -184,8 +184,8 @@ public class JobsLockServiceImpl extends ServiceImpl<JobsLockMapper, JobsLock> i
*/
*/
@Override
@Override
public
Page
<
JobsLock
>
searchDefault
(
JobsLockSearchContext
context
)
{
public
Page
<
JobsLock
>
searchDefault
(
JobsLockSearchContext
context
)
{
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
JobsLock
>
pages
=
baseMapper
.
searchDefault
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
JobsLock
>
pages
=
baseMapper
.
searchDefault
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
JobsLock
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
return
new
PageImpl
<
JobsLock
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
}
...
...
ibztask-core/src/main/java/cn/ibizlab/core/task/service/impl/JobsLogServiceImpl.java
浏览文件 @
0d5d6c3f
...
@@ -184,8 +184,8 @@ public class JobsLogServiceImpl extends ServiceImpl<JobsLogMapper, JobsLog> impl
...
@@ -184,8 +184,8 @@ public class JobsLogServiceImpl extends ServiceImpl<JobsLogMapper, JobsLog> impl
*/
*/
@Override
@Override
public
Page
<
JobsLog
>
searchDefault
(
JobsLogSearchContext
context
)
{
public
Page
<
JobsLog
>
searchDefault
(
JobsLogSearchContext
context
)
{
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
JobsLog
>
pages
=
baseMapper
.
searchDefault
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
JobsLog
>
pages
=
baseMapper
.
searchDefault
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
JobsLog
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
return
new
PageImpl
<
JobsLog
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
}
...
...
ibztask-core/src/main/java/cn/ibizlab/core/task/service/impl/JobsRegistryServiceImpl.java
浏览文件 @
0d5d6c3f
...
@@ -184,8 +184,8 @@ public class JobsRegistryServiceImpl extends ServiceImpl<JobsRegistryMapper, Job
...
@@ -184,8 +184,8 @@ public class JobsRegistryServiceImpl extends ServiceImpl<JobsRegistryMapper, Job
*/
*/
@Override
@Override
public
Page
<
JobsRegistry
>
searchDefault
(
JobsRegistrySearchContext
context
)
{
public
Page
<
JobsRegistry
>
searchDefault
(
JobsRegistrySearchContext
context
)
{
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
JobsRegistry
>
pages
=
baseMapper
.
searchDefault
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
JobsRegistry
>
pages
=
baseMapper
.
searchDefault
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
JobsRegistry
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
return
new
PageImpl
<
JobsRegistry
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
}
...
...
ibztask-core/src/main/java/cn/ibizlab/core/util/config/CommonAutoConfig.java
0 → 100644
浏览文件 @
0d5d6c3f
package
cn
.
ibizlab
.
core
.
util
.
config
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.boot.CommandLineRunner
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.stereotype.Component
;
/**
* 通用配置类
*/
@Configuration
public
class
CommonAutoConfig
{
@Value
(
"${jbpm.enable.multi.con:true}"
)
private
String
flag
;
/**
* 处理逻辑节点支持多来源配置
*/
@Component
public
class
InstallSystemParamsCommandLineRunner
implements
CommandLineRunner
{
@Override
public
void
run
(
String
...
var1
){
System
.
setProperty
(
"jbpm.enable.multi.con"
,
flag
);
}
}
}
ibztask-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
0d5d6c3f
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<!--输出实体[JOBS_INFO]数据结构 -->
<!--输出实体[JOBS_INFO]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-jobs_info-5-1"
>
<changeSet
author=
"
root
"
id=
"tab-jobs_info-5-1"
>
<createTable
tableName=
"JOBS_INFO"
>
<createTable
tableName=
"JOBS_INFO"
>
<column
name=
"ID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"ID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_JOBS_INFO_ID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_JOBS_INFO_ID"
/>
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
<!--输出实体[JOBS_LOCK]数据结构 -->
<!--输出实体[JOBS_LOCK]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-jobs_lock-1-2"
>
<changeSet
author=
"
root
"
id=
"tab-jobs_lock-1-2"
>
<createTable
tableName=
"JOBS_LOCK"
>
<createTable
tableName=
"JOBS_LOCK"
>
<column
name=
"ID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"ID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_JOBS_LOCK_ID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_JOBS_LOCK_ID"
/>
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
<!--输出实体[JOBS_LOG]数据结构 -->
<!--输出实体[JOBS_LOG]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-jobs_log-1-3"
>
<changeSet
author=
"
root
"
id=
"tab-jobs_log-1-3"
>
<createTable
tableName=
"JOBS_LOG"
>
<createTable
tableName=
"JOBS_LOG"
>
<column
name=
"ID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"ID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_JOBS_LOG_ID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_JOBS_LOG_ID"
/>
...
@@ -86,7 +86,7 @@
...
@@ -86,7 +86,7 @@
<!--输出实体[JOBS_REGISTRY]数据结构 -->
<!--输出实体[JOBS_REGISTRY]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-jobs_registry-1-4"
>
<changeSet
author=
"
root
"
id=
"tab-jobs_registry-1-4"
>
<createTable
tableName=
"JOBS_REGISTRY"
>
<createTable
tableName=
"JOBS_REGISTRY"
>
<column
name=
"ID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"ID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_JOBS_REGISTRY_ID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_JOBS_REGISTRY_ID"
/>
...
...
ibztask-provider/ibztask-provider-api/pom.xml
浏览文件 @
0d5d6c3f
...
@@ -73,7 +73,41 @@
...
@@ -73,7 +73,41 @@
</resource>
</resource>
</resources>
</resources>
</configuration>
</configuration>
</plugin>
</plugin>
<plugin>
<groupId>
org.codehaus.mojo
</groupId>
<artifactId>
exec-maven-plugin
</artifactId>
<version>
3.0.0
</version>
<executions>
<execution>
<id>
prepare
</id>
<configuration>
<executable>
cp
</executable>
<arguments>
<argument>
../../${project.artifactId}.jar
</argument>
<argument>
${project.basedir}/src/main/docker/
</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>
buildpush
</id>
<configuration>
<executable>
docker
</executable>
<arguments>
<argument>
buildx
</argument>
<argument>
build
</argument>
<argument>
--platform
</argument>
<argument>
linux/amd64,linux/arm64
</argument>
<argument>
-t
</argument>
<argument>
${docker.image.prefix}/${project.artifactId}:latest
</argument>
<argument>
${project.basedir}/src/main/docker
</argument>
<argument>
--push
</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</plugins>
</build>
</build>
</profile>
</profile>
...
...
ibztask-provider/ibztask-provider-api/src/main/docker/Dockerfile
浏览文件 @
0d5d6c3f
FROM
openjdk:8-jre-alpine
FROM
adoptopenjdk/openjdk8:jdk8u242-b08-centos
ENV
TZ=Asia/Shanghai \
ENV
TZ=Asia/Shanghai \
SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
...
...
ibztask-provider/ibztask-provider-api/src/main/java/cn/ibizlab/api/rest/JobsInfoResource.java
浏览文件 @
0d5d6c3f
...
@@ -65,25 +65,15 @@ public class JobsInfoResource {
...
@@ -65,25 +65,15 @@ public class JobsInfoResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsInfo-Update-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsInfo-Get-all')"
)
@ApiOperation
(
value
=
"更新任务信息"
,
tags
=
{
"任务信息"
},
notes
=
"更新任务信息"
)
@ApiOperation
(
value
=
"获取任务信息"
,
tags
=
{
"任务信息"
},
notes
=
"获取任务信息"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/jobsinfos/{jobsinfo_id}"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/jobsinfos/{jobsinfo_id}"
)
public
ResponseEntity
<
JobsInfoDTO
>
update
(
@PathVariable
(
"jobsinfo_id"
)
String
jobsinfo_id
,
@RequestBody
JobsInfoDTO
jobsinfodto
)
{
public
ResponseEntity
<
JobsInfoDTO
>
get
(
@PathVariable
(
"jobsinfo_id"
)
String
jobsinfo_id
)
{
JobsInfo
domain
=
jobsinfoMapping
.
toDomain
(
jobsinfodto
);
JobsInfo
domain
=
jobsinfoService
.
get
(
jobsinfo_id
);
domain
.
setId
(
jobsinfo_id
);
JobsInfoDTO
dto
=
jobsinfoMapping
.
toDto
(
domain
);
jobsinfoService
.
update
(
domain
);
JobsInfoDTO
dto
=
jobsinfoMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsInfo-Update-all')"
)
@ApiOperation
(
value
=
"批量更新任务信息"
,
tags
=
{
"任务信息"
},
notes
=
"批量更新任务信息"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/jobsinfos/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatch
(
@RequestBody
List
<
JobsInfoDTO
>
jobsinfodtos
)
{
jobsinfoService
.
updateBatch
(
jobsinfoMapping
.
toDomain
(
jobsinfodtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsInfo-Remove-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsInfo-Remove-all')"
)
@ApiOperation
(
value
=
"删除任务信息"
,
tags
=
{
"任务信息"
},
notes
=
"删除任务信息"
)
@ApiOperation
(
value
=
"删除任务信息"
,
tags
=
{
"任务信息"
},
notes
=
"删除任务信息"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/jobsinfos/{jobsinfo_id}"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/jobsinfos/{jobsinfo_id}"
)
...
@@ -99,20 +89,23 @@ public class JobsInfoResource {
...
@@ -99,20 +89,23 @@ public class JobsInfoResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsInfo-Get-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsInfo-Update-all')"
)
@ApiOperation
(
value
=
"获取任务信息"
,
tags
=
{
"任务信息"
},
notes
=
"获取任务信息"
)
@ApiOperation
(
value
=
"更新任务信息"
,
tags
=
{
"任务信息"
},
notes
=
"更新任务信息"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/jobsinfos/{jobsinfo_id}"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/jobsinfos/{jobsinfo_id}"
)
public
ResponseEntity
<
JobsInfoDTO
>
get
(
@PathVariable
(
"jobsinfo_id"
)
String
jobsinfo_id
)
{
public
ResponseEntity
<
JobsInfoDTO
>
update
(
@PathVariable
(
"jobsinfo_id"
)
String
jobsinfo_id
,
@RequestBody
JobsInfoDTO
jobsinfodto
)
{
JobsInfo
domain
=
jobsinfoService
.
get
(
jobsinfo_id
);
JobsInfo
domain
=
jobsinfoMapping
.
toDomain
(
jobsinfodto
);
JobsInfoDTO
dto
=
jobsinfoMapping
.
toDto
(
domain
);
domain
.
setId
(
jobsinfo_id
);
jobsinfoService
.
update
(
domain
);
JobsInfoDTO
dto
=
jobsinfoMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
}
@ApiOperation
(
value
=
"获取任务信息草稿"
,
tags
=
{
"任务信息"
},
notes
=
"获取任务信息草稿"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsInfo-Update-all')"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/jobsinfos/getdraft"
)
@ApiOperation
(
value
=
"批量更新任务信息"
,
tags
=
{
"任务信息"
},
notes
=
"批量更新任务信息"
)
public
ResponseEntity
<
JobsInfoDTO
>
getDraft
(
JobsInfoDTO
dto
)
{
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/jobsinfos/batch"
)
JobsInfo
domain
=
jobsinfoMapping
.
toDomain
(
dto
);
public
ResponseEntity
<
Boolean
>
updateBatch
(
@RequestBody
List
<
JobsInfoDTO
>
jobsinfodtos
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
jobsinfoMapping
.
toDto
(
jobsinfoService
.
getDraft
(
domain
)));
jobsinfoService
.
updateBatch
(
jobsinfoMapping
.
toDomain
(
jobsinfodtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@ApiOperation
(
value
=
"检查任务信息"
,
tags
=
{
"任务信息"
},
notes
=
"检查任务信息"
)
@ApiOperation
(
value
=
"检查任务信息"
,
tags
=
{
"任务信息"
},
notes
=
"检查任务信息"
)
...
@@ -140,6 +133,13 @@ public class JobsInfoResource {
...
@@ -140,6 +133,13 @@ public class JobsInfoResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
result
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
result
);
}
}
@ApiOperation
(
value
=
"获取任务信息草稿"
,
tags
=
{
"任务信息"
},
notes
=
"获取任务信息草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/jobsinfos/getdraft"
)
public
ResponseEntity
<
JobsInfoDTO
>
getDraft
(
JobsInfoDTO
dto
)
{
JobsInfo
domain
=
jobsinfoMapping
.
toDomain
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
jobsinfoMapping
.
toDto
(
jobsinfoService
.
getDraft
(
domain
)));
}
@ApiOperation
(
value
=
"保存任务信息"
,
tags
=
{
"任务信息"
},
notes
=
"保存任务信息"
)
@ApiOperation
(
value
=
"保存任务信息"
,
tags
=
{
"任务信息"
},
notes
=
"保存任务信息"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/jobsinfos/save"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/jobsinfos/save"
)
public
ResponseEntity
<
JobsInfoDTO
>
save
(
@RequestBody
JobsInfoDTO
jobsinfodto
)
{
public
ResponseEntity
<
JobsInfoDTO
>
save
(
@RequestBody
JobsInfoDTO
jobsinfodto
)
{
...
...
ibztask-provider/ibztask-provider-api/src/main/java/cn/ibizlab/api/rest/JobsLockResource.java
浏览文件 @
0d5d6c3f
...
@@ -65,25 +65,15 @@ public class JobsLockResource {
...
@@ -65,25 +65,15 @@ public class JobsLockResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLock-Update-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLock-Get-all')"
)
@ApiOperation
(
value
=
"更新任务锁"
,
tags
=
{
"任务锁"
},
notes
=
"更新任务锁"
)
@ApiOperation
(
value
=
"获取任务锁"
,
tags
=
{
"任务锁"
},
notes
=
"获取任务锁"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/jobslocks/{jobslock_id}"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/jobslocks/{jobslock_id}"
)
public
ResponseEntity
<
JobsLockDTO
>
update
(
@PathVariable
(
"jobslock_id"
)
String
jobslock_id
,
@RequestBody
JobsLockDTO
jobslockdto
)
{
public
ResponseEntity
<
JobsLockDTO
>
get
(
@PathVariable
(
"jobslock_id"
)
String
jobslock_id
)
{
JobsLock
domain
=
jobslockMapping
.
toDomain
(
jobslockdto
);
JobsLock
domain
=
jobslockService
.
get
(
jobslock_id
);
domain
.
setId
(
jobslock_id
);
JobsLockDTO
dto
=
jobslockMapping
.
toDto
(
domain
);
jobslockService
.
update
(
domain
);
JobsLockDTO
dto
=
jobslockMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLock-Update-all')"
)
@ApiOperation
(
value
=
"批量更新任务锁"
,
tags
=
{
"任务锁"
},
notes
=
"批量更新任务锁"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/jobslocks/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatch
(
@RequestBody
List
<
JobsLockDTO
>
jobslockdtos
)
{
jobslockService
.
updateBatch
(
jobslockMapping
.
toDomain
(
jobslockdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLock-Remove-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLock-Remove-all')"
)
@ApiOperation
(
value
=
"删除任务锁"
,
tags
=
{
"任务锁"
},
notes
=
"删除任务锁"
)
@ApiOperation
(
value
=
"删除任务锁"
,
tags
=
{
"任务锁"
},
notes
=
"删除任务锁"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/jobslocks/{jobslock_id}"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/jobslocks/{jobslock_id}"
)
...
@@ -99,20 +89,23 @@ public class JobsLockResource {
...
@@ -99,20 +89,23 @@ public class JobsLockResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLock-Get-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLock-Update-all')"
)
@ApiOperation
(
value
=
"获取任务锁"
,
tags
=
{
"任务锁"
},
notes
=
"获取任务锁"
)
@ApiOperation
(
value
=
"更新任务锁"
,
tags
=
{
"任务锁"
},
notes
=
"更新任务锁"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/jobslocks/{jobslock_id}"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/jobslocks/{jobslock_id}"
)
public
ResponseEntity
<
JobsLockDTO
>
get
(
@PathVariable
(
"jobslock_id"
)
String
jobslock_id
)
{
public
ResponseEntity
<
JobsLockDTO
>
update
(
@PathVariable
(
"jobslock_id"
)
String
jobslock_id
,
@RequestBody
JobsLockDTO
jobslockdto
)
{
JobsLock
domain
=
jobslockService
.
get
(
jobslock_id
);
JobsLock
domain
=
jobslockMapping
.
toDomain
(
jobslockdto
);
JobsLockDTO
dto
=
jobslockMapping
.
toDto
(
domain
);
domain
.
setId
(
jobslock_id
);
jobslockService
.
update
(
domain
);
JobsLockDTO
dto
=
jobslockMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
}
@ApiOperation
(
value
=
"获取任务锁草稿"
,
tags
=
{
"任务锁"
},
notes
=
"获取任务锁草稿"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLock-Update-all')"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/jobslocks/getdraft"
)
@ApiOperation
(
value
=
"批量更新任务锁"
,
tags
=
{
"任务锁"
},
notes
=
"批量更新任务锁"
)
public
ResponseEntity
<
JobsLockDTO
>
getDraft
(
JobsLockDTO
dto
)
{
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/jobslocks/batch"
)
JobsLock
domain
=
jobslockMapping
.
toDomain
(
dto
);
public
ResponseEntity
<
Boolean
>
updateBatch
(
@RequestBody
List
<
JobsLockDTO
>
jobslockdtos
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
jobslockMapping
.
toDto
(
jobslockService
.
getDraft
(
domain
)));
jobslockService
.
updateBatch
(
jobslockMapping
.
toDomain
(
jobslockdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@ApiOperation
(
value
=
"检查任务锁"
,
tags
=
{
"任务锁"
},
notes
=
"检查任务锁"
)
@ApiOperation
(
value
=
"检查任务锁"
,
tags
=
{
"任务锁"
},
notes
=
"检查任务锁"
)
...
@@ -121,6 +114,13 @@ public class JobsLockResource {
...
@@ -121,6 +114,13 @@ public class JobsLockResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
jobslockService
.
checkKey
(
jobslockMapping
.
toDomain
(
jobslockdto
)));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
jobslockService
.
checkKey
(
jobslockMapping
.
toDomain
(
jobslockdto
)));
}
}
@ApiOperation
(
value
=
"获取任务锁草稿"
,
tags
=
{
"任务锁"
},
notes
=
"获取任务锁草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/jobslocks/getdraft"
)
public
ResponseEntity
<
JobsLockDTO
>
getDraft
(
JobsLockDTO
dto
)
{
JobsLock
domain
=
jobslockMapping
.
toDomain
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
jobslockMapping
.
toDto
(
jobslockService
.
getDraft
(
domain
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLock-Save-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLock-Save-all')"
)
@ApiOperation
(
value
=
"保存任务锁"
,
tags
=
{
"任务锁"
},
notes
=
"保存任务锁"
)
@ApiOperation
(
value
=
"保存任务锁"
,
tags
=
{
"任务锁"
},
notes
=
"保存任务锁"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/jobslocks/save"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/jobslocks/save"
)
...
...
ibztask-provider/ibztask-provider-api/src/main/java/cn/ibizlab/api/rest/JobsLogResource.java
浏览文件 @
0d5d6c3f
...
@@ -65,25 +65,15 @@ public class JobsLogResource {
...
@@ -65,25 +65,15 @@ public class JobsLogResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLog-Update-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLog-Get-all')"
)
@ApiOperation
(
value
=
"更新任务调度日志"
,
tags
=
{
"任务调度日志"
},
notes
=
"更新任务调度日志"
)
@ApiOperation
(
value
=
"获取任务调度日志"
,
tags
=
{
"任务调度日志"
},
notes
=
"获取任务调度日志"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/jobslogs/{jobslog_id}"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/jobslogs/{jobslog_id}"
)
public
ResponseEntity
<
JobsLogDTO
>
update
(
@PathVariable
(
"jobslog_id"
)
String
jobslog_id
,
@RequestBody
JobsLogDTO
jobslogdto
)
{
public
ResponseEntity
<
JobsLogDTO
>
get
(
@PathVariable
(
"jobslog_id"
)
String
jobslog_id
)
{
JobsLog
domain
=
jobslogMapping
.
toDomain
(
jobslogdto
);
JobsLog
domain
=
jobslogService
.
get
(
jobslog_id
);
domain
.
setId
(
jobslog_id
);
JobsLogDTO
dto
=
jobslogMapping
.
toDto
(
domain
);
jobslogService
.
update
(
domain
);
JobsLogDTO
dto
=
jobslogMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLog-Update-all')"
)
@ApiOperation
(
value
=
"批量更新任务调度日志"
,
tags
=
{
"任务调度日志"
},
notes
=
"批量更新任务调度日志"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/jobslogs/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatch
(
@RequestBody
List
<
JobsLogDTO
>
jobslogdtos
)
{
jobslogService
.
updateBatch
(
jobslogMapping
.
toDomain
(
jobslogdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLog-Remove-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLog-Remove-all')"
)
@ApiOperation
(
value
=
"删除任务调度日志"
,
tags
=
{
"任务调度日志"
},
notes
=
"删除任务调度日志"
)
@ApiOperation
(
value
=
"删除任务调度日志"
,
tags
=
{
"任务调度日志"
},
notes
=
"删除任务调度日志"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/jobslogs/{jobslog_id}"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/jobslogs/{jobslog_id}"
)
...
@@ -99,20 +89,23 @@ public class JobsLogResource {
...
@@ -99,20 +89,23 @@ public class JobsLogResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLog-Get-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLog-Update-all')"
)
@ApiOperation
(
value
=
"获取任务调度日志"
,
tags
=
{
"任务调度日志"
},
notes
=
"获取任务调度日志"
)
@ApiOperation
(
value
=
"更新任务调度日志"
,
tags
=
{
"任务调度日志"
},
notes
=
"更新任务调度日志"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/jobslogs/{jobslog_id}"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/jobslogs/{jobslog_id}"
)
public
ResponseEntity
<
JobsLogDTO
>
get
(
@PathVariable
(
"jobslog_id"
)
String
jobslog_id
)
{
public
ResponseEntity
<
JobsLogDTO
>
update
(
@PathVariable
(
"jobslog_id"
)
String
jobslog_id
,
@RequestBody
JobsLogDTO
jobslogdto
)
{
JobsLog
domain
=
jobslogService
.
get
(
jobslog_id
);
JobsLog
domain
=
jobslogMapping
.
toDomain
(
jobslogdto
);
JobsLogDTO
dto
=
jobslogMapping
.
toDto
(
domain
);
domain
.
setId
(
jobslog_id
);
jobslogService
.
update
(
domain
);
JobsLogDTO
dto
=
jobslogMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
}
@ApiOperation
(
value
=
"获取任务调度日志草稿"
,
tags
=
{
"任务调度日志"
},
notes
=
"获取任务调度日志草稿"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLog-Update-all')"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/jobslogs/getdraft"
)
@ApiOperation
(
value
=
"批量更新任务调度日志"
,
tags
=
{
"任务调度日志"
},
notes
=
"批量更新任务调度日志"
)
public
ResponseEntity
<
JobsLogDTO
>
getDraft
(
JobsLogDTO
dto
)
{
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/jobslogs/batch"
)
JobsLog
domain
=
jobslogMapping
.
toDomain
(
dto
);
public
ResponseEntity
<
Boolean
>
updateBatch
(
@RequestBody
List
<
JobsLogDTO
>
jobslogdtos
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
jobslogMapping
.
toDto
(
jobslogService
.
getDraft
(
domain
)));
jobslogService
.
updateBatch
(
jobslogMapping
.
toDomain
(
jobslogdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@ApiOperation
(
value
=
"检查任务调度日志"
,
tags
=
{
"任务调度日志"
},
notes
=
"检查任务调度日志"
)
@ApiOperation
(
value
=
"检查任务调度日志"
,
tags
=
{
"任务调度日志"
},
notes
=
"检查任务调度日志"
)
...
@@ -121,6 +114,13 @@ public class JobsLogResource {
...
@@ -121,6 +114,13 @@ public class JobsLogResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
jobslogService
.
checkKey
(
jobslogMapping
.
toDomain
(
jobslogdto
)));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
jobslogService
.
checkKey
(
jobslogMapping
.
toDomain
(
jobslogdto
)));
}
}
@ApiOperation
(
value
=
"获取任务调度日志草稿"
,
tags
=
{
"任务调度日志"
},
notes
=
"获取任务调度日志草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/jobslogs/getdraft"
)
public
ResponseEntity
<
JobsLogDTO
>
getDraft
(
JobsLogDTO
dto
)
{
JobsLog
domain
=
jobslogMapping
.
toDomain
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
jobslogMapping
.
toDto
(
jobslogService
.
getDraft
(
domain
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLog-Save-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsLog-Save-all')"
)
@ApiOperation
(
value
=
"保存任务调度日志"
,
tags
=
{
"任务调度日志"
},
notes
=
"保存任务调度日志"
)
@ApiOperation
(
value
=
"保存任务调度日志"
,
tags
=
{
"任务调度日志"
},
notes
=
"保存任务调度日志"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/jobslogs/save"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/jobslogs/save"
)
...
...
ibztask-provider/ibztask-provider-api/src/main/java/cn/ibizlab/api/rest/JobsRegistryResource.java
浏览文件 @
0d5d6c3f
...
@@ -65,25 +65,15 @@ public class JobsRegistryResource {
...
@@ -65,25 +65,15 @@ public class JobsRegistryResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsRegistry-Update-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsRegistry-Get-all')"
)
@ApiOperation
(
value
=
"更新任务注册信息"
,
tags
=
{
"任务注册信息"
},
notes
=
"更新任务注册信息"
)
@ApiOperation
(
value
=
"获取任务注册信息"
,
tags
=
{
"任务注册信息"
},
notes
=
"获取任务注册信息"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/jobsregistries/{jobsregistry_id}"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/jobsregistries/{jobsregistry_id}"
)
public
ResponseEntity
<
JobsRegistryDTO
>
update
(
@PathVariable
(
"jobsregistry_id"
)
String
jobsregistry_id
,
@RequestBody
JobsRegistryDTO
jobsregistrydto
)
{
public
ResponseEntity
<
JobsRegistryDTO
>
get
(
@PathVariable
(
"jobsregistry_id"
)
String
jobsregistry_id
)
{
JobsRegistry
domain
=
jobsregistryMapping
.
toDomain
(
jobsregistrydto
);
JobsRegistry
domain
=
jobsregistryService
.
get
(
jobsregistry_id
);
domain
.
setId
(
jobsregistry_id
);
JobsRegistryDTO
dto
=
jobsregistryMapping
.
toDto
(
domain
);
jobsregistryService
.
update
(
domain
);
JobsRegistryDTO
dto
=
jobsregistryMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsRegistry-Update-all')"
)
@ApiOperation
(
value
=
"批量更新任务注册信息"
,
tags
=
{
"任务注册信息"
},
notes
=
"批量更新任务注册信息"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/jobsregistries/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatch
(
@RequestBody
List
<
JobsRegistryDTO
>
jobsregistrydtos
)
{
jobsregistryService
.
updateBatch
(
jobsregistryMapping
.
toDomain
(
jobsregistrydtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsRegistry-Remove-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsRegistry-Remove-all')"
)
@ApiOperation
(
value
=
"删除任务注册信息"
,
tags
=
{
"任务注册信息"
},
notes
=
"删除任务注册信息"
)
@ApiOperation
(
value
=
"删除任务注册信息"
,
tags
=
{
"任务注册信息"
},
notes
=
"删除任务注册信息"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/jobsregistries/{jobsregistry_id}"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/jobsregistries/{jobsregistry_id}"
)
...
@@ -99,20 +89,23 @@ public class JobsRegistryResource {
...
@@ -99,20 +89,23 @@ public class JobsRegistryResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsRegistry-Get-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsRegistry-Update-all')"
)
@ApiOperation
(
value
=
"获取任务注册信息"
,
tags
=
{
"任务注册信息"
},
notes
=
"获取任务注册信息"
)
@ApiOperation
(
value
=
"更新任务注册信息"
,
tags
=
{
"任务注册信息"
},
notes
=
"更新任务注册信息"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/jobsregistries/{jobsregistry_id}"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/jobsregistries/{jobsregistry_id}"
)
public
ResponseEntity
<
JobsRegistryDTO
>
get
(
@PathVariable
(
"jobsregistry_id"
)
String
jobsregistry_id
)
{
public
ResponseEntity
<
JobsRegistryDTO
>
update
(
@PathVariable
(
"jobsregistry_id"
)
String
jobsregistry_id
,
@RequestBody
JobsRegistryDTO
jobsregistrydto
)
{
JobsRegistry
domain
=
jobsregistryService
.
get
(
jobsregistry_id
);
JobsRegistry
domain
=
jobsregistryMapping
.
toDomain
(
jobsregistrydto
);
JobsRegistryDTO
dto
=
jobsregistryMapping
.
toDto
(
domain
);
domain
.
setId
(
jobsregistry_id
);
jobsregistryService
.
update
(
domain
);
JobsRegistryDTO
dto
=
jobsregistryMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
}
@ApiOperation
(
value
=
"获取任务注册信息草稿"
,
tags
=
{
"任务注册信息"
},
notes
=
"获取任务注册信息草稿"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsRegistry-Update-all')"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/jobsregistries/getdraft"
)
@ApiOperation
(
value
=
"批量更新任务注册信息"
,
tags
=
{
"任务注册信息"
},
notes
=
"批量更新任务注册信息"
)
public
ResponseEntity
<
JobsRegistryDTO
>
getDraft
(
JobsRegistryDTO
dto
)
{
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/jobsregistries/batch"
)
JobsRegistry
domain
=
jobsregistryMapping
.
toDomain
(
dto
);
public
ResponseEntity
<
Boolean
>
updateBatch
(
@RequestBody
List
<
JobsRegistryDTO
>
jobsregistrydtos
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
jobsregistryMapping
.
toDto
(
jobsregistryService
.
getDraft
(
domain
)));
jobsregistryService
.
updateBatch
(
jobsregistryMapping
.
toDomain
(
jobsregistrydtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@ApiOperation
(
value
=
"检查任务注册信息"
,
tags
=
{
"任务注册信息"
},
notes
=
"检查任务注册信息"
)
@ApiOperation
(
value
=
"检查任务注册信息"
,
tags
=
{
"任务注册信息"
},
notes
=
"检查任务注册信息"
)
...
@@ -121,6 +114,13 @@ public class JobsRegistryResource {
...
@@ -121,6 +114,13 @@ public class JobsRegistryResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
jobsregistryService
.
checkKey
(
jobsregistryMapping
.
toDomain
(
jobsregistrydto
)));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
jobsregistryService
.
checkKey
(
jobsregistryMapping
.
toDomain
(
jobsregistrydto
)));
}
}
@ApiOperation
(
value
=
"获取任务注册信息草稿"
,
tags
=
{
"任务注册信息"
},
notes
=
"获取任务注册信息草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/jobsregistries/getdraft"
)
public
ResponseEntity
<
JobsRegistryDTO
>
getDraft
(
JobsRegistryDTO
dto
)
{
JobsRegistry
domain
=
jobsregistryMapping
.
toDomain
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
jobsregistryMapping
.
toDto
(
jobsregistryService
.
getDraft
(
domain
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsRegistry-Save-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibztask-JobsRegistry-Save-all')"
)
@ApiOperation
(
value
=
"保存任务注册信息"
,
tags
=
{
"任务注册信息"
},
notes
=
"保存任务注册信息"
)
@ApiOperation
(
value
=
"保存任务注册信息"
,
tags
=
{
"任务注册信息"
},
notes
=
"保存任务注册信息"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/jobsregistries/save"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/jobsregistries/save"
)
...
...
ibztask-util/src/main/java/cn/ibizlab/util/aspect/DELogicAspect.java
浏览文件 @
0d5d6c3f
...
@@ -28,9 +28,11 @@ import org.springframework.expression.ExpressionParser;
...
@@ -28,9 +28,11 @@ import org.springframework.expression.ExpressionParser;
import
org.springframework.expression.spel.standard.SpelExpressionParser
;
import
org.springframework.expression.spel.standard.SpelExpressionParser
;
import
org.springframework.expression.spel.support.StandardEvaluationContext
;
import
org.springframework.expression.spel.support.StandardEvaluationContext
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.ClassUtils
;
import
org.springframework.util.DigestUtils
;
import
org.springframework.util.DigestUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.core.annotation.Order
;
import
javax.xml.stream.XMLInputFactory
;
import
javax.xml.stream.XMLInputFactory
;
import
javax.xml.stream.XMLStreamReader
;
import
javax.xml.stream.XMLStreamReader
;
...
@@ -51,6 +53,7 @@ import java.util.concurrent.ConcurrentMap;
...
@@ -51,6 +53,7 @@ import java.util.concurrent.ConcurrentMap;
@Aspect
@Aspect
@Component
@Component
@Slf4j
@Slf4j
@Order
(
100
)
public
class
DELogicAspect
{
public
class
DELogicAspect
{
private
static
BpmnXMLConverter
bpmnXMLConverter
=
new
BpmnXMLConverter
();
private
static
BpmnXMLConverter
bpmnXMLConverter
=
new
BpmnXMLConverter
();
...
@@ -80,7 +83,7 @@ public class DELogicAspect {
...
@@ -80,7 +83,7 @@ public class DELogicAspect {
if
(!
ObjectUtils
.
isEmpty
(
entity
))
{
if
(!
ObjectUtils
.
isEmpty
(
entity
))
{
String
id
=
DEFieldCacheMap
.
getDEKeyField
(
entity
.
getClass
());
String
id
=
DEFieldCacheMap
.
getDEKeyField
(
entity
.
getClass
());
if
(
StringUtils
.
isEmpty
(
id
))
{
if
(
StringUtils
.
isEmpty
(
id
))
{
log
.
debug
(
"无法获取实体主键属性[{}]"
,
entity
.
getClass
().
getSimpleName
(
));
log
.
debug
(
"无法获取实体主键属性[{}]"
,
getEntityName
(
entity
));
return
point
.
proceed
();
return
point
.
proceed
();
}
}
entity
.
set
(
id
,
arg
);
entity
.
set
(
id
,
arg
);
...
@@ -101,6 +104,17 @@ public class DELogicAspect {
...
@@ -101,6 +104,17 @@ public class DELogicAspect {
return
point
.
proceed
();
return
point
.
proceed
();
}
}
/**
* 判断类是否被代理类代理
*/
private
String
getEntityName
(
Object
entity
){
String
entityName
=
entity
.
getClass
().
getSimpleName
();
if
(
entityName
.
contains
(
"$$"
)){
entityName
=
ClassUtils
.
getUserClass
(
entity
.
getClass
()).
getSimpleName
();
}
return
entityName
;
}
/**
/**
* 前附加逻辑
* 前附加逻辑
*
*
...
@@ -108,7 +122,7 @@ public class DELogicAspect {
...
@@ -108,7 +122,7 @@ public class DELogicAspect {
* @param action
* @param action
*/
*/
private
void
executeBeforeLogic
(
EntityBase
entity
,
String
action
)
{
private
void
executeBeforeLogic
(
EntityBase
entity
,
String
action
)
{
Resource
bpmnFile
=
getLocalModel
(
entity
.
getClass
().
getSimpleName
(
),
action
,
LogicExecMode
.
BEFORE
);
Resource
bpmnFile
=
getLocalModel
(
getEntityName
(
entity
),
action
,
LogicExecMode
.
BEFORE
);
if
(
bpmnFile
!=
null
&&
bpmnFile
.
exists
()
&&
isValid
(
bpmnFile
,
entity
,
action
))
{
if
(
bpmnFile
!=
null
&&
bpmnFile
.
exists
()
&&
isValid
(
bpmnFile
,
entity
,
action
))
{
executeLogic
(
bpmnFile
,
entity
,
action
);
executeLogic
(
bpmnFile
,
entity
,
action
);
}
}
...
@@ -121,7 +135,7 @@ public class DELogicAspect {
...
@@ -121,7 +135,7 @@ public class DELogicAspect {
* @param action
* @param action
*/
*/
private
void
executeAfterLogic
(
EntityBase
entity
,
String
action
)
{
private
void
executeAfterLogic
(
EntityBase
entity
,
String
action
)
{
Resource
bpmnFile
=
getLocalModel
(
entity
.
getClass
().
getSimpleName
(
),
action
,
LogicExecMode
.
AFTER
);
Resource
bpmnFile
=
getLocalModel
(
getEntityName
(
entity
),
action
,
LogicExecMode
.
AFTER
);
if
(
bpmnFile
!=
null
&&
bpmnFile
.
exists
()
&&
isValid
(
bpmnFile
,
entity
,
action
))
{
if
(
bpmnFile
!=
null
&&
bpmnFile
.
exists
()
&&
isValid
(
bpmnFile
,
entity
,
action
))
{
executeLogic
(
bpmnFile
,
entity
,
action
);
executeLogic
(
bpmnFile
,
entity
,
action
);
}
}
...
@@ -134,7 +148,7 @@ public class DELogicAspect {
...
@@ -134,7 +148,7 @@ public class DELogicAspect {
* @param action
* @param action
*/
*/
private
void
executeLogic
(
EntityBase
entity
,
String
action
)
{
private
void
executeLogic
(
EntityBase
entity
,
String
action
)
{
Resource
bpmnFile
=
getLocalModel
(
entity
.
getClass
().
getSimpleName
(
),
action
,
LogicExecMode
.
EXEC
);
Resource
bpmnFile
=
getLocalModel
(
getEntityName
(
entity
),
action
,
LogicExecMode
.
EXEC
);
if
(
bpmnFile
!=
null
&&
bpmnFile
.
exists
()
&&
isValid
(
bpmnFile
,
entity
,
action
))
{
if
(
bpmnFile
!=
null
&&
bpmnFile
.
exists
()
&&
isValid
(
bpmnFile
,
entity
,
action
))
{
executeLogic
(
bpmnFile
,
entity
,
action
);
executeLogic
(
bpmnFile
,
entity
,
action
);
}
}
...
@@ -148,7 +162,7 @@ public class DELogicAspect {
...
@@ -148,7 +162,7 @@ public class DELogicAspect {
*/
*/
private
void
executeLogic
(
Resource
bpmnFile
,
Object
entity
,
String
action
)
{
private
void
executeLogic
(
Resource
bpmnFile
,
Object
entity
,
String
action
)
{
try
{
try
{
log
.
debug
(
"开始执行实体处理逻辑[{}:{}:{}:本地模式]"
,
entity
.
getClass
().
getSimpleName
(
),
action
,
bpmnFile
.
getFilename
());
log
.
debug
(
"开始执行实体处理逻辑[{}:{}:{}:本地模式]"
,
getEntityName
(
entity
),
action
,
bpmnFile
.
getFilename
());
String
bpmnId
=
DigestUtils
.
md5DigestAsHex
(
bpmnFile
.
getURL
().
getPath
().
getBytes
());
String
bpmnId
=
DigestUtils
.
md5DigestAsHex
(
bpmnFile
.
getURL
().
getPath
().
getBytes
());
DELogic
logic
=
getDELogic
(
bpmnFile
);
DELogic
logic
=
getDELogic
(
bpmnFile
);
if
(
logic
==
null
)
{
if
(
logic
==
null
)
{
...
@@ -172,9 +186,9 @@ public class DELogicAspect {
...
@@ -172,9 +186,9 @@ public class DELogicAspect {
}
}
}
}
kieSession
.
startProcess
(
mainProcess
.
getId
());
kieSession
.
startProcess
(
mainProcess
.
getId
());
log
.
debug
(
"实体处理逻辑[{}:{}:{}:本地模式]执行结束"
,
entity
.
getClass
().
getSimpleName
(
),
action
,
bpmnFile
.
getFilename
());
log
.
debug
(
"实体处理逻辑[{}:{}:{}:本地模式]执行结束"
,
getEntityName
(
entity
),
action
,
bpmnFile
.
getFilename
());
}
catch
(
IO
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"实体处理逻辑[{}:{}:{}:本地模式]发生异常"
,
entity
.
getClass
().
getSimpleName
(
),
action
,
bpmnFile
.
getFilename
());
log
.
error
(
"实体处理逻辑[{}:{}:{}:本地模式]发生异常"
,
getEntityName
(
entity
),
action
,
bpmnFile
.
getFilename
());
throw
new
BadRequestAlertException
(
"执行实体处理逻辑发生异常"
+
e
.
getMessage
(),
"DELogicAspect"
,
"executeLogic"
);
throw
new
BadRequestAlertException
(
"执行实体处理逻辑发生异常"
+
e
.
getMessage
(),
"DELogicAspect"
,
"executeLogic"
);
}
}
}
}
...
@@ -414,7 +428,7 @@ public class DELogicAspect {
...
@@ -414,7 +428,7 @@ public class DELogicAspect {
* @return
* @return
*/
*/
private
boolean
isValid
(
Resource
bpmn
,
Object
entity
,
Object
action
)
{
private
boolean
isValid
(
Resource
bpmn
,
Object
entity
,
Object
action
)
{
String
logicId
=
String
.
format
(
"%s%s%s"
,
entity
.
getClass
().
getSimpleName
(
),
action
,
bpmn
.
getFilename
()).
toLowerCase
();
String
logicId
=
String
.
format
(
"%s%s%s"
,
getEntityName
(
entity
),
action
,
bpmn
.
getFilename
()).
toLowerCase
();
if
(
validLogic
.
containsKey
(
logicId
))
{
if
(
validLogic
.
containsKey
(
logicId
))
{
return
true
;
return
true
;
}
else
{
}
else
{
...
...
ibztask-util/src/main/java/cn/ibizlab/util/cache/cache/CusCaffeineCache.java
0 → 100644
浏览文件 @
0d5d6c3f
package
cn
.
ibizlab
.
util
.
cache
.
cache
;
import
cn.ibizlab.util.helper.Globs
;
import
org.springframework.cache.caffeine.CaffeineCache
;
import
com.github.benmanes.caffeine.cache.Cache
;
import
javax.validation.constraints.NotNull
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
/**
* 自定义的Caffeine缓存
*/
public
class
CusCaffeineCache
extends
CaffeineCache
{
public
CusCaffeineCache
(
String
name
,
Cache
<
Object
,
Object
>
cache
)
{
super
(
name
,
cache
);
}
public
CusCaffeineCache
(
String
name
,
Cache
<
Object
,
Object
>
cache
,
boolean
allowNullValues
)
{
super
(
name
,
cache
,
allowNullValues
);
}
@Override
public
void
evict
(
@NotNull
Object
key
)
{
if
(
key
instanceof
String
&&
((
String
)
key
).
startsWith
(
"glob:"
))
{
String
globPattern
=
((
String
)
key
).
split
(
"glob:"
)[
1
];
// 将Glob匹配转换成正则匹配
String
regexPattern
=
Globs
.
toUnixRegexPattern
(
globPattern
);
// String regexPattern = Globs.toWindowsRegexPattern(globPattern);
Cache
<
Object
,
Object
>
cache
=
super
.
getNativeCache
();
Set
<
Object
>
keySet
=
cache
.
asMap
().
keySet
();
keySet
=
keySet
.
stream
().
filter
(
o
->
o
.
toString
().
matches
(
regexPattern
)).
collect
(
Collectors
.
toSet
());
cache
.
invalidateAll
(
keySet
);
}
else
{
super
.
evict
(
key
);
}
}
}
ibztask-util/src/main/java/cn/ibizlab/util/cache/cache/CusRedisCache.java
浏览文件 @
0d5d6c3f
...
@@ -4,6 +4,8 @@ import org.springframework.data.redis.cache.RedisCache;
...
@@ -4,6 +4,8 @@ import org.springframework.data.redis.cache.RedisCache;
import
org.springframework.data.redis.cache.RedisCacheConfiguration
;
import
org.springframework.data.redis.cache.RedisCacheConfiguration
;
import
org.springframework.data.redis.cache.RedisCacheWriter
;
import
org.springframework.data.redis.cache.RedisCacheWriter
;
import
javax.validation.constraints.NotNull
;
/**
/**
* 自定义的redis缓存
* 自定义的redis缓存
*/
*/
...
@@ -12,4 +14,18 @@ public class CusRedisCache extends RedisCache {
...
@@ -12,4 +14,18 @@ public class CusRedisCache extends RedisCache {
public
CusRedisCache
(
String
name
,
RedisCacheWriter
redisCacheWriter
,
RedisCacheConfiguration
configuration
)
{
public
CusRedisCache
(
String
name
,
RedisCacheWriter
redisCacheWriter
,
RedisCacheConfiguration
configuration
)
{
super
(
name
,
redisCacheWriter
,
configuration
);
super
(
name
,
redisCacheWriter
,
configuration
);
}
}
@Override
public
void
evict
(
@NotNull
Object
key
)
{
if
(
key
instanceof
String
&&
((
String
)
key
).
startsWith
(
"glob:"
))
{
String
globPattern
=
((
String
)
key
).
split
(
"glob:"
)[
1
];
byte
[]
globPatternBytes
=
super
.
getCacheConfiguration
().
getConversionService
().
convert
(
globPattern
,
byte
[].
class
);
if
(
globPatternBytes
!=
null
){
super
.
getNativeCache
().
clean
(
super
.
getName
(),
globPatternBytes
);
}
}
else
{
super
.
evict
(
key
);
}
}
}
}
ibztask-util/src/main/java/cn/ibizlab/util/cache/cacheManager/LayeringCacheManager.java
浏览文件 @
0d5d6c3f
...
@@ -15,6 +15,7 @@ import java.util.Collections;
...
@@ -15,6 +15,7 @@ import java.util.Collections;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.ConcurrentMap
;
import
java.util.concurrent.ConcurrentMap
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
import
cn.ibizlab.util.cache.cache.CusCaffeineCache
;
import
cn.ibizlab.util.cache.cache.CusRedisCache
;
import
cn.ibizlab.util.cache.cache.CusRedisCache
;
import
cn.ibizlab.util.cache.cache.LayeringCache
;
import
cn.ibizlab.util.cache.cache.LayeringCache
;
...
@@ -80,7 +81,7 @@ public class LayeringCacheManager implements CacheManager {
...
@@ -80,7 +81,7 @@ public class LayeringCacheManager implements CacheManager {
* @return
* @return
*/
*/
protected
Cache
createCache
(
String
cacheName
)
{
protected
Cache
createCache
(
String
cacheName
)
{
return
new
LayeringCache
(
cacheName
,
new
CaffeineCache
(
cacheName
,
this
.
cacheBuilder
.
build
(),
true
),
new
CusRedisCache
(
cacheName
,
redisCacheWriter
,
redisConfiguration
),
redisTemplate
);
return
new
LayeringCache
(
cacheName
,
new
C
usC
affeineCache
(
cacheName
,
this
.
cacheBuilder
.
build
(),
true
),
new
CusRedisCache
(
cacheName
,
redisCacheWriter
,
redisConfiguration
),
redisTemplate
);
}
}
/**
/**
...
...
ibztask-util/src/main/java/cn/ibizlab/util/client/IBZWFFallback.java
浏览文件 @
0d5d6c3f
...
@@ -3,6 +3,7 @@ package cn.ibizlab.util.client;
...
@@ -3,6 +3,7 @@ package cn.ibizlab.util.client;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
java.util.*
;
import
java.util.*
;
import
java.io.Serializable
;
@Component
@Component
public
class
IBZWFFallback
implements
IBZWFFeignClient
{
public
class
IBZWFFallback
implements
IBZWFFeignClient
{
...
@@ -26,4 +27,25 @@ public class IBZWFFallback implements IBZWFFeignClient {
...
@@ -26,4 +27,25 @@ public class IBZWFFallback implements IBZWFFeignClient {
public
JSONObject
wfstart
(
String
system
,
String
appname
,
String
entity
,
String
businessKey
,
JSONObject
instance
)
{
public
JSONObject
wfstart
(
String
system
,
String
appname
,
String
entity
,
String
businessKey
,
JSONObject
instance
)
{
return
null
;
return
null
;
}
}
@Override
public
Map
<
String
,
Map
<
String
,
Object
>>
getTask
(
String
system
,
String
userId
,
String
entity
,
String
instTag
,
String
instTag2
,
String
taskType
)
{
return
null
;
}
@Override
public
Map
<
String
,
Map
<
String
,
Object
>>
getTaskByStep
(
String
system
,
String
userId
,
String
entity
,
String
instTag
,
String
instTag2
,
String
taskType
,
String
srfwfstep
)
{
return
null
;
}
@Override
public
Integer
getDataAccessMode
(
String
system
,
String
entity
,
Serializable
businessKey
)
{
return
null
;
}
@Override
public
Map
<
String
,
Map
<
String
,
Object
>>
getMyTask
(
String
system
,
String
appName
,
String
entity
)
{
return
null
;
}
}
}
ibztask-util/src/main/java/cn/ibizlab/util/client/IBZWFFeignClient.java
浏览文件 @
0d5d6c3f
...
@@ -4,6 +4,7 @@ import org.springframework.cloud.openfeign.FeignClient;
...
@@ -4,6 +4,7 @@ import org.springframework.cloud.openfeign.FeignClient;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
java.util.*
;
import
java.util.*
;
import
java.io.Serializable
;
@FeignClient
(
value
=
"${ibiz.ref.service.wf:ibzwf-api}"
,
contextId
=
"wf"
,
fallback
=
IBZWFFallback
.
class
)
@FeignClient
(
value
=
"${ibiz.ref.service.wf:ibzwf-api}"
,
contextId
=
"wf"
,
fallback
=
IBZWFFallback
.
class
)
public
interface
IBZWFFeignClient
public
interface
IBZWFFeignClient
...
@@ -25,4 +26,19 @@ public interface IBZWFFeignClient
...
@@ -25,4 +26,19 @@ public interface IBZWFFeignClient
@PathVariable
(
"entity"
)
String
entity
,
@PathVariable
(
"entity"
)
String
entity
,
@PathVariable
(
"businessKey"
)
String
businessKey
,
@RequestBody
JSONObject
instance
);
@PathVariable
(
"businessKey"
)
String
businessKey
,
@RequestBody
JSONObject
instance
);
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/{system}-user-{userId}/{insttag}/{insttag2}/{entity}/tasks"
)
Map
<
String
,
Map
<
String
,
Object
>>
getTask
(
@PathVariable
(
"system"
)
String
system
,
@PathVariable
(
"userId"
)
String
userId
,
@PathVariable
(
"entity"
)
String
entity
,
@PathVariable
(
"insttag"
)
String
instTag
,
@PathVariable
(
"insttag2"
)
String
instTag2
,
@RequestParam
(
"srfwf"
)
String
taskType
);
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/{system}-user-{userId}/{insttag}/{insttag2}/{entity}/tasks"
)
Map
<
String
,
Map
<
String
,
Object
>>
getTaskByStep
(
@PathVariable
(
"system"
)
String
system
,
@PathVariable
(
"userId"
)
String
userId
,
@PathVariable
(
"entity"
)
String
entity
,
@PathVariable
(
"insttag"
)
String
instTag
,
@PathVariable
(
"insttag2"
)
String
instTag2
,
@RequestParam
(
"srfwf"
)
String
taskType
,
@RequestParam
(
"n_taskdefinitionkey_eq"
)
String
srfwfstep
);
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/{system}/{entity}/{businessKey}/dataaccessmode"
)
Integer
getDataAccessMode
(
@PathVariable
(
"system"
)
String
system
,
@PathVariable
(
"entity"
)
String
entity
,
@PathVariable
(
"businessKey"
)
Serializable
businessKey
);
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/{system}-app-{appname}/{entity}/mytasks"
)
Map
<
String
,
Map
<
String
,
Object
>>
getMyTask
(
@PathVariable
(
"system"
)
String
system
,
@PathVariable
(
"appname"
)
String
appName
,
@PathVariable
(
"entity"
)
String
entity
);
}
}
ibztask-util/src/main/java/cn/ibizlab/util/domain/DELogic.java
浏览文件 @
0d5d6c3f
...
@@ -17,4 +17,6 @@ public class DELogic implements Serializable {
...
@@ -17,4 +17,6 @@ public class DELogic implements Serializable {
List
<
DELogic
>
refLogic
;
List
<
DELogic
>
refLogic
;
List
<
Resource
>
refRuleFiles
;
List
<
Resource
>
refRuleFiles
;
String
md5
;
String
md5
;
int
logicMode
;
long
loadedTime
;
}
}
ibztask-util/src/main/java/cn/ibizlab/util/enums/DEFieldDefaultValueType.java
浏览文件 @
0d5d6c3f
...
@@ -43,5 +43,21 @@ public enum DEFieldDefaultValueType {
...
@@ -43,5 +43,21 @@ public enum DEFieldDefaultValueType {
/**
/**
* 默认值
* 默认值
*/
*/
NONE
NONE
,
/**
* 用户自定义
*/
USER
,
/**
* 用户自定义2
*/
USER2
,
/**
* 用户自定义3
*/
USER3
,
/**
* 用户自定义4
*/
USER4
}
}
ibztask-util/src/main/java/cn/ibizlab/util/enums/DEPredefinedFieldType.java
浏览文件 @
0d5d6c3f
...
@@ -55,5 +55,17 @@ public enum DEPredefinedFieldType {
...
@@ -55,5 +55,17 @@ public enum DEPredefinedFieldType {
/**
/**
* 不处理
* 不处理
*/
*/
NONE
NONE
,
/**
* 动态父类型
*/
PARENTTYPE
,
/**
* 动态父标识
*/
PARENTID
,
/**
* 动态父名称
*/
PARENTNAME
}
}
ibztask-util/src/main/java/cn/ibizlab/util/errors/ExceptionTranslator.java
浏览文件 @
0d5d6c3f
...
@@ -9,6 +9,8 @@ import org.springframework.web.bind.MethodArgumentNotValidException;
...
@@ -9,6 +9,8 @@ import org.springframework.web.bind.MethodArgumentNotValidException;
import
org.springframework.web.bind.annotation.ControllerAdvice
;
import
org.springframework.web.bind.annotation.ControllerAdvice
;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
import
org.springframework.web.context.request.NativeWebRequest
;
import
org.springframework.web.context.request.NativeWebRequest
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.multipart.MaxUploadSizeExceededException
;
import
org.zalando.problem.DefaultProblem
;
import
org.zalando.problem.DefaultProblem
;
import
org.zalando.problem.Problem
;
import
org.zalando.problem.Problem
;
import
org.zalando.problem.ProblemBuilder
;
import
org.zalando.problem.ProblemBuilder
;
...
@@ -105,4 +107,31 @@ public class ExceptionTranslator implements ProblemHandling {
...
@@ -105,4 +107,31 @@ public class ExceptionTranslator implements ProblemHandling {
headers
.
add
(
"X-ibz-params"
,
entityName
);
headers
.
add
(
"X-ibz-params"
,
entityName
);
return
headers
;
return
headers
;
}
}
/**
* 上传文件大小超出限制异常
*/
@Value
(
"${spring.servlet.multipart.max-file-size}"
)
private
String
maxFileSize
;
@ExceptionHandler
(
MaxUploadSizeExceededException
.
class
)
public
ResponseEntity
<
Problem
>
handlerMaxUploadFile
(
MaxUploadSizeExceededException
ex
,
NativeWebRequest
request
){
Problem
problem
=
Problem
.
builder
()
.
withStatus
(
Status
.
BAD_REQUEST
)
.
withDetail
(
"上传文件不能大于"
+
maxFileSize
)
.
with
(
"message"
,
"上传文件不能大于"
+
maxFileSize
)
.
with
(
"exmessage"
,
""
+
ex
.
getMessage
())
.
build
();
return
create
(
ex
,
problem
,
request
);
}
@ExceptionHandler
(
Exception
.
class
)
public
ResponseEntity
<
Problem
>
handlerTest
(
Exception
ex
,
NativeWebRequest
request
){
Problem
problem
=
Problem
.
builder
()
.
withStatus
(
Status
.
INTERNAL_SERVER_ERROR
)
.
withDetail
(
"内部服务器异常"
)
.
with
(
"message"
,
"内部服务器异常"
)
.
with
(
"exmessage"
,
""
+
ex
.
getMessage
())
.
build
();
return
create
(
ex
,
problem
,
request
);
}
}
}
ibztask-util/src/main/java/cn/ibizlab/util/filter/SearchContextBase.java
浏览文件 @
0d5d6c3f
...
@@ -67,6 +67,11 @@ public class SearchContextBase implements ISearchContext{
...
@@ -67,6 +67,11 @@ public class SearchContextBase implements ISearchContext{
* 工作流流程标识
* 工作流流程标识
*/
*/
public
String
processDefinitionKey
;
public
String
processDefinitionKey
;
/**
* 工作流标识
*/
@JsonProperty
(
"srfwf"
)
public
String
srfWF
;
/**
/**
* 获取工作流步骤标识
* 获取工作流步骤标识
...
...
ibztask-util/src/main/java/cn/ibizlab/util/helper/Globs.java
0 → 100644
浏览文件 @
0d5d6c3f
package
cn
.
ibizlab
.
util
.
helper
;
import
java.util.regex.PatternSyntaxException
;
/**
* Copy from class sun.nio.fs.Globs
*/
public
class
Globs
{
private
Globs
()
{
}
private
static
final
String
regexMetaChars
=
".^$+{[]|()"
;
private
static
final
String
globMetaChars
=
"\\*?[{"
;
private
static
boolean
isRegexMeta
(
char
c
)
{
return
regexMetaChars
.
indexOf
(
c
)
!=
-
1
;
}
private
static
boolean
isGlobMeta
(
char
c
)
{
return
globMetaChars
.
indexOf
(
c
)
!=
-
1
;
}
private
static
char
EOL
=
0
;
//TBD
private
static
char
next
(
String
glob
,
int
i
)
{
if
(
i
<
glob
.
length
())
{
return
glob
.
charAt
(
i
);
}
return
EOL
;
}
/**
* Creates a regex pattern from the given glob expression.
*
* @throws PatternSyntaxException
*/
private
static
String
toRegexPattern
(
String
globPattern
,
boolean
isDos
)
{
boolean
inGroup
=
false
;
StringBuilder
regex
=
new
StringBuilder
(
"^"
);
int
i
=
0
;
while
(
i
<
globPattern
.
length
())
{
char
c
=
globPattern
.
charAt
(
i
++);
switch
(
c
)
{
case
'\\'
:
// escape special characters
if
(
i
==
globPattern
.
length
())
{
throw
new
PatternSyntaxException
(
"No character to escape"
,
globPattern
,
i
-
1
);
}
char
next
=
globPattern
.
charAt
(
i
++);
if
(
isGlobMeta
(
next
)
||
isRegexMeta
(
next
))
{
regex
.
append
(
'\\'
);
}
regex
.
append
(
next
);
break
;
case
'/'
:
if
(
isDos
)
{
regex
.
append
(
"\\\\"
);
}
else
{
regex
.
append
(
c
);
}
break
;
case
'['
:
// don't match name separator in class
if
(
isDos
)
{
regex
.
append
(
"[[^\\\\]&&["
);
}
else
{
regex
.
append
(
"[[^/]&&["
);
}
if
(
next
(
globPattern
,
i
)
==
'^'
)
{
// escape the regex negation char if it appears
regex
.
append
(
"\\^"
);
i
++;
}
else
{
// negation
if
(
next
(
globPattern
,
i
)
==
'!'
)
{
regex
.
append
(
'^'
);
i
++;
}
// hyphen allowed at start
if
(
next
(
globPattern
,
i
)
==
'-'
)
{
regex
.
append
(
'-'
);
i
++;
}
}
boolean
hasRangeStart
=
false
;
char
last
=
0
;
while
(
i
<
globPattern
.
length
())
{
c
=
globPattern
.
charAt
(
i
++);
if
(
c
==
']'
)
{
break
;
}
if
(
c
==
'/'
||
(
isDos
&&
c
==
'\\'
))
{
throw
new
PatternSyntaxException
(
"Explicit 'name separator' in class"
,
globPattern
,
i
-
1
);
}
// TBD: how to specify ']' in a class?
if
(
c
==
'\\'
||
c
==
'['
||
c
==
'&'
&&
next
(
globPattern
,
i
)
==
'&'
)
{
// escape '\', '[' or "&&" for regex class
regex
.
append
(
'\\'
);
}
regex
.
append
(
c
);
if
(
c
==
'-'
)
{
if
(!
hasRangeStart
)
{
throw
new
PatternSyntaxException
(
"Invalid range"
,
globPattern
,
i
-
1
);
}
if
((
c
=
next
(
globPattern
,
i
++))
==
EOL
||
c
==
']'
)
{
break
;
}
if
(
c
<
last
)
{
throw
new
PatternSyntaxException
(
"Invalid range"
,
globPattern
,
i
-
3
);
}
regex
.
append
(
c
);
hasRangeStart
=
false
;
}
else
{
hasRangeStart
=
true
;
last
=
c
;
}
}
if
(
c
!=
']'
)
{
throw
new
PatternSyntaxException
(
"Missing ']"
,
globPattern
,
i
-
1
);
}
regex
.
append
(
"]]"
);
break
;
case
'{'
:
if
(
inGroup
)
{
throw
new
PatternSyntaxException
(
"Cannot nest groups"
,
globPattern
,
i
-
1
);
}
regex
.
append
(
"(?:(?:"
);
inGroup
=
true
;
break
;
case
'}'
:
if
(
inGroup
)
{
regex
.
append
(
"))"
);
inGroup
=
false
;
}
else
{
regex
.
append
(
'}'
);
}
break
;
case
','
:
if
(
inGroup
)
{
regex
.
append
(
")|(?:"
);
}
else
{
regex
.
append
(
','
);
}
break
;
case
'*'
:
if
(
next
(
globPattern
,
i
)
==
'*'
)
{
// crosses directory boundaries
regex
.
append
(
".*"
);
i
++;
}
else
{
// within directory boundary
if
(
isDos
)
{
regex
.
append
(
"[^\\\\]*"
);
}
else
{
regex
.
append
(
"[^/]*"
);
}
}
break
;
case
'?'
:
if
(
isDos
)
{
regex
.
append
(
"[^\\\\]"
);
}
else
{
regex
.
append
(
"[^/]"
);
}
break
;
default
:
if
(
isRegexMeta
(
c
))
{
regex
.
append
(
'\\'
);
}
regex
.
append
(
c
);
}
}
if
(
inGroup
)
{
throw
new
PatternSyntaxException
(
"Missing '}"
,
globPattern
,
i
-
1
);
}
return
regex
.
append
(
'$'
).
toString
();
}
public
static
String
toUnixRegexPattern
(
String
globPattern
)
{
return
toRegexPattern
(
globPattern
,
false
);
}
public
static
String
toWindowsRegexPattern
(
String
globPattern
)
{
return
toRegexPattern
(
globPattern
,
true
);
}
}
ibztask-util/src/main/java/cn/ibizlab/util/helper/RuleUtils.java
浏览文件 @
0d5d6c3f
...
@@ -280,22 +280,26 @@ public class RuleUtils
...
@@ -280,22 +280,26 @@ public class RuleUtils
}
}
return
finalTime
.
getTime
()<
tm
.
getTime
();
return
finalTime
.
getTime
()<
tm
.
getTime
();
}
}
else
if
(
finalObject
instanceof
Integer
)
else
if
(
finalObject
instanceof
Integer
)
{
{
return
(((
Integer
)
finalObject
).
intValue
()
<
((
Integer
)
exp
).
intValue
());
return
Integer
.
parseInt
(
finalObject
.
toString
())
<
Integer
.
parseInt
(
exp
.
toString
());
}
}
else
if
(
finalObject
instanceof
Double
)
else
if
(
finalObject
instanceof
Double
)
{
{
return
(((
Double
)
finalObject
).
doubleValue
()
<
((
Double
)
exp
).
doubleValue
());
return
Double
.
parseDouble
(
finalObject
.
toString
())
<
Double
.
parseDouble
(
exp
.
toString
());
}
}
else
if
(
finalObject
instanceof
Float
)
else
if
(
finalObject
instanceof
Float
)
{
{
return
(((
Float
)
finalObject
).
floatValue
()
<
((
Float
)
exp
).
floatValue
());
return
Float
.
parseFloat
(
finalObject
.
toString
())
<
Float
.
parseFloat
(
exp
.
toString
());
}
}
else
if
(
finalObject
instanceof
String
)
else
if
(
finalObject
instanceof
String
)
{
{
return
finalObject
.
toString
().
compareToIgnoreCase
(
exp
.
toString
())<
0
;
return
finalObject
.
toString
().
compareToIgnoreCase
(
exp
.
toString
())<
0
;
}
}
else
if
(
finalObject
instanceof
Long
)
{
return
Long
.
parseLong
(
finalObject
.
toString
())
<
Long
.
parseLong
(
exp
.
toString
());
}
else
else
return
false
;
return
false
;
}
}
...
...
ibztask-util/src/main/java/cn/ibizlab/util/rest/AppController.java
浏览文件 @
0d5d6c3f
...
@@ -12,6 +12,7 @@ import org.springframework.http.ResponseEntity;
...
@@ -12,6 +12,7 @@ import org.springframework.http.ResponseEntity;
import
org.springframework.security.core.GrantedAuthority
;
import
org.springframework.security.core.GrantedAuthority
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.core.toolkit.IdWorker
;
import
java.util.*
;
import
java.util.*
;
@RestController
@RestController
...
@@ -95,6 +96,26 @@ public class AppController {
...
@@ -95,6 +96,26 @@ public class AppController {
return
ResponseEntity
.
ok
(
ibzConfigService
.
getConfig
(
configType
,
targetType
,
userId
));
return
ResponseEntity
.
ok
(
ibzConfigService
.
getConfig
(
configType
,
targetType
,
userId
));
}
}
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/configs/share/{id}"
)
public
ResponseEntity
<
JSONObject
>
getShareConfig
(
@PathVariable
(
"id"
)
String
id
)
{
JSONObject
jo
=
ibzConfigService
.
getShareConfig
(
id
);
if
(
jo
==
null
)
{
throw
new
BadRequestAlertException
(
"无效的共享配置数据"
,
"IBZConfig"
,
id
);
}
return
ResponseEntity
.
ok
(
jo
);
}
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/configs/share/{configType}/{targetType}"
)
public
ResponseEntity
<
String
>
shareConfig
(
@PathVariable
(
"configType"
)
String
configType
,
@PathVariable
(
"targetType"
)
String
targetType
)
{
String
userId
=
AuthenticationUser
.
getAuthenticationUser
().
getUserid
();
if
(
StringUtils
.
isEmpty
(
userId
))
{
throw
new
BadRequestAlertException
(
"分享配置失败,参数缺失"
,
"IBZConfig"
,
configType
);
}
String
id
=
IdWorker
.
get32UUID
();
ibzConfigService
.
saveShareConfig
(
id
,
configType
,
targetType
,
userId
);
return
ResponseEntity
.
ok
(
id
);
}
/**
/**
* 应用参数扩展
* 应用参数扩展
* @param appData
* @param appData
...
...
ibztask-util/src/main/java/cn/ibizlab/util/security/AuthPermissionEvaluator.java
浏览文件 @
0d5d6c3f
...
@@ -13,6 +13,7 @@ import org.springframework.security.core.Authentication;
...
@@ -13,6 +13,7 @@ import org.springframework.security.core.Authentication;
import
org.springframework.security.core.GrantedAuthority
;
import
org.springframework.security.core.GrantedAuthority
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.lang.reflect.ParameterizedType
;
import
java.lang.reflect.ParameterizedType
;
import
java.lang.reflect.Type
;
import
java.lang.reflect.Type
;
...
@@ -300,20 +301,22 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
...
@@ -300,20 +301,22 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
Map
<
String
,
DEField
>
preFields
=
DEFieldCacheMap
.
getDEFields
(
entityBase
.
getClass
());
//从缓存中获取当前类预置属性
Map
<
String
,
DEField
>
preFields
=
DEFieldCacheMap
.
getDEFields
(
entityBase
.
getClass
());
//从缓存中获取当前类预置属性
for
(
Map
.
Entry
<
String
,
DEField
>
entry
:
preFields
.
entrySet
()){
for
(
Map
.
Entry
<
String
,
DEField
>
entry
:
preFields
.
entrySet
()){
String
fieldName
=
entry
.
getKey
();
//获取注解字段
DEField
fieldAnnotation
=
entry
.
getValue
();
//获取注解值
DEField
fieldAnnotation
=
entry
.
getValue
();
//获取注解值
String
fieldName
=
fieldAnnotation
.
name
();
//获取注解字段
DEPredefinedFieldType
prefieldType
=
fieldAnnotation
.
preType
();
DEPredefinedFieldType
prefieldType
=
fieldAnnotation
.
preType
();
//用户配置系统预置属性-组织机构标识
if
(!
StringUtils
.
isEmpty
(
fieldName
)){
if
(
prefieldType
==
prefieldType
.
ORGID
){
//用户配置系统预置属性-组织机构标识
orgField
=
fieldName
;
if
(
prefieldType
==
prefieldType
.
ORGID
){
}
orgField
=
fieldName
;
//用户配置系统预置属性-部门标识
}
if
(
prefieldType
==
prefieldType
.
ORGSECTORID
){
//用户配置系统预置属性-部门标识
orgDeptField
=
fieldName
;
if
(
prefieldType
==
prefieldType
.
ORGSECTORID
){
}
orgDeptField
=
fieldName
;
//用户配置系统预置属性-部门标识
}
if
(
prefieldType
==
prefieldType
.
CREATEMAN
){
//用户配置系统预置属性-部门标识
createManField
=
fieldName
;
if
(
prefieldType
==
prefieldType
.
CREATEMAN
){
createManField
=
fieldName
;
}
}
}
}
}
permissionFiled
.
put
(
"orgfield"
,
orgField
);
permissionFiled
.
put
(
"orgfield"
,
orgField
);
...
...
ibztask-util/src/main/java/cn/ibizlab/util/security/AuthenticationEntryPoint.java
浏览文件 @
0d5d6c3f
...
@@ -20,7 +20,7 @@ public class AuthenticationEntryPoint implements org.springframework.security.we
...
@@ -20,7 +20,7 @@ public class AuthenticationEntryPoint implements org.springframework.security.we
/**
/**
* 当用户尝试访问安全的REST资源而不提供任何凭据时,将调用此方法发送401 响应
* 当用户尝试访问安全的REST资源而不提供任何凭据时,将调用此方法发送401 响应
*/
*/
response
.
sendError
(
HttpServletResponse
.
SC_UNAUTHORIZED
,
authException
==
null
?
"Unauthorized"
:
authException
.
getMessage
()
);
response
.
sendError
(
HttpServletResponse
.
SC_UNAUTHORIZED
,
"账号身份已过期,请重新登录。"
);
}
}
...
...
ibztask-util/src/main/java/cn/ibizlab/util/security/AuthenticationInfo.java
浏览文件 @
0d5d6c3f
...
@@ -9,6 +9,10 @@ import java.io.Serializable;
...
@@ -9,6 +9,10 @@ import java.io.Serializable;
@AllArgsConstructor
@AllArgsConstructor
@JsonIgnoreProperties
(
ignoreUnknown
=
true
)
@JsonIgnoreProperties
(
ignoreUnknown
=
true
)
public
class
AuthenticationInfo
implements
Serializable
{
public
class
AuthenticationInfo
implements
Serializable
{
private
final
String
token
;
private
String
token
;
private
final
AuthenticationUser
user
;
private
AuthenticationUser
user
;
public
AuthenticationInfo
()
{
}
}
}
ibztask-util/src/main/java/cn/ibizlab/util/security/AuthenticationUser.java
浏览文件 @
0d5d6c3f
...
@@ -260,7 +260,6 @@ public class AuthenticationUser implements UserDetails
...
@@ -260,7 +260,6 @@ public class AuthenticationUser implements UserDetails
{
{
sessionParams
=
getUserSessionParam
();
sessionParams
=
getUserSessionParam
();
sessionParams
.
put
(
"srfsystemid"
,
this
.
getSrfsystemid
());
sessionParams
.
put
(
"srfsystemid"
,
this
.
getSrfsystemid
());
sessionParams
.
put
(
"srfdynainstid"
,
this
.
getSrfdynainstid
());
sessionParams
.
put
(
"srfpersonid"
,
this
.
getUserid
());
sessionParams
.
put
(
"srfpersonid"
,
this
.
getUserid
());
sessionParams
.
put
(
"srfpersonname"
,
this
.
getPersonname
());
sessionParams
.
put
(
"srfpersonname"
,
this
.
getPersonname
());
sessionParams
.
put
(
"srforgsectorid"
,
this
.
getMdeptid
());
sessionParams
.
put
(
"srforgsectorid"
,
this
.
getMdeptid
());
...
...
ibztask-util/src/main/java/cn/ibizlab/util/service/AuthenticationUserService.java
浏览文件 @
0d5d6c3f
...
@@ -24,7 +24,7 @@ public interface AuthenticationUserService extends UserDetailsService {
...
@@ -24,7 +24,7 @@ public interface AuthenticationUserService extends UserDetailsService {
@Cacheable
(
value
=
"ibzuaa_users"
,
key
=
"'getByUsername:'+#p0"
)
@Cacheable
(
value
=
"ibzuaa_users"
,
key
=
"'getByUsername:'+#p0"
)
AuthenticationUser
loadUserByLogin
(
String
username
,
String
password
);
AuthenticationUser
loadUserByLogin
(
String
username
,
String
password
);
@CacheEvict
(
value
=
"ibzuaa_users"
,
key
=
"'getByUsername:'+#p0"
)
@CacheEvict
(
value
=
"ibzuaa_users"
,
key
=
"'g
lob:*g
etByUsername:'+#p0"
)
default
void
resetByUsername
(
String
username
){}
default
void
resetByUsername
(
String
username
){}
...
...
ibztask-util/src/main/java/cn/ibizlab/util/service/IBZConfigService.java
浏览文件 @
0d5d6c3f
...
@@ -64,4 +64,14 @@ public class IBZConfigService extends ServiceImpl<IBZConfigMapper, IBZConfig> im
...
@@ -64,4 +64,14 @@ public class IBZConfigService extends ServiceImpl<IBZConfigMapper, IBZConfig> im
this
.
remove
(
Wrappers
.
query
(
IBZConfig
.
builder
().
systemId
(
systemId
).
cfgType
(
cfgType
).
targetType
(
targetType
).
userId
(
userId
).
build
()));
this
.
remove
(
Wrappers
.
query
(
IBZConfig
.
builder
().
systemId
(
systemId
).
cfgType
(
cfgType
).
targetType
(
targetType
).
userId
(
userId
).
build
()));
}
}
@Cacheable
(
value
=
"ibzrt_shareconfigs"
,
key
=
"'cfgid:'+#p0"
)
public
JSONObject
saveShareConfig
(
String
id
,
String
cfgType
,
String
targetType
,
String
userId
){
return
this
.
getConfig
(
cfgType
,
targetType
,
userId
);
}
@Cacheable
(
value
=
"ibzrt_shareconfigs"
,
key
=
"'cfgid:'+#p0"
)
public
JSONObject
getShareConfig
(
String
id
){
return
null
;
}
}
}
\ No newline at end of file
ibztask-util/src/main/java/cn/ibizlab/util/web/SearchContextHandlerMethodArgumentResolver.java
浏览文件 @
0d5d6c3f
package
cn
.
ibizlab
.
util
.
web
;
package
cn
.
ibizlab
.
util
.
web
;
import
cn.ibizlab.util.filter.SearchContextBase
;
import
cn.ibizlab.util.filter.SearchContextBase
;
import
cn.ibizlab.util.domain.DTOBase
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.core.MethodParameter
;
import
org.springframework.core.MethodParameter
;
...
@@ -24,7 +25,7 @@ public class SearchContextHandlerMethodArgumentResolver implements HandlerMethod
...
@@ -24,7 +25,7 @@ public class SearchContextHandlerMethodArgumentResolver implements HandlerMethod
@Override
@Override
public
boolean
supportsParameter
(
MethodParameter
parameter
)
{
public
boolean
supportsParameter
(
MethodParameter
parameter
)
{
return
SearchContextBase
.
class
.
isAssignableFrom
(
parameter
.
getParameterType
());
return
SearchContextBase
.
class
.
isAssignableFrom
(
parameter
.
getParameterType
())
||
DTOBase
.
class
.
isAssignableFrom
(
parameter
.
getParameterType
())
;
}
}
@Override
@Override
...
@@ -35,7 +36,7 @@ public class SearchContextHandlerMethodArgumentResolver implements HandlerMethod
...
@@ -35,7 +36,7 @@ public class SearchContextHandlerMethodArgumentResolver implements HandlerMethod
for
(
String
key
:
params
.
keySet
())
{
for
(
String
key
:
params
.
keySet
())
{
set
.
put
(
key
,
params
.
get
(
key
)[
0
]);
set
.
put
(
key
,
params
.
get
(
key
)[
0
]);
}
}
if
(
(!
set
.
containsKey
(
"size"
))
){
if
(
SearchContextBase
.
class
.
isAssignableFrom
(
parameter
.
getParameterType
())
&&
(!
set
.
containsKey
(
"size"
))
){
set
.
put
(
"size"
,
pageLimit
);
set
.
put
(
"size"
,
pageLimit
);
}
}
String
json
=
objectMapper
.
writeValueAsString
(
set
);
String
json
=
objectMapper
.
writeValueAsString
(
set
);
...
...
ibztask-util/src/main/resources/application-sys.yml
浏览文件 @
0d5d6c3f
...
@@ -23,7 +23,7 @@ spring:
...
@@ -23,7 +23,7 @@ spring:
datasource
:
datasource
:
username
:
a_A_5d9d78509
username
:
a_A_5d9d78509
password
:
'
@6dEfb3@'
password
:
'
@6dEfb3@'
url
:
jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
url
:
jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
&serverTimezone=GMT%2B8
driver-class-name
:
com.mysql.jdbc.Driver
driver-class-name
:
com.mysql.jdbc.Driver
filters
:
stat,wall,log4j2
filters
:
stat,wall,log4j2
#配置初始化大小/最小/最大
#配置初始化大小/最小/最大
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录