Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibznotify
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibznotify
提交
71c39df5
提交
71c39df5
编写于
9月 10, 2021
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibiz4j 发布系统代码 [ibiz-notify,通知消息]
上级
97792e3a
变更
56
隐藏空白字符变更
内嵌
并排
正在显示
56 个修改的文件
包含
1007 行增加
和
499 行删除
+1007
-499
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
msg-open-accesss.ts
app_web/src/mock/entity/msg-open-accesss/msg-open-accesss.ts
+61
-61
msg-templates.ts
app_web/src/mock/entity/msg-templates/msg-templates.ts
+61
-61
msg-user-accounts.ts
...eb/src/mock/entity/msg-user-accounts/msg-user-accounts.ts
+61
-61
msg-open-access-service-base.ts
...c/service/msg-open-access/msg-open-access-service-base.ts
+38
-38
msg-template-service-base.ts
...web/src/service/msg-template/msg-template-service-base.ts
+38
-38
msg-user-account-service-base.ts
...service/msg-user-account/msg-user-account-service-base.ts
+38
-38
notify-index-view-appmenu-base.vue
...ify-index-view-appmenu/notify-index-view-appmenu-base.vue
+5
-5
default-searchform-base.vue
...pen-access/default-searchform/default-searchform-base.vue
+2
-2
main-grid-base.vue
.../src/widgets/msg-open-access/main-grid/main-grid-base.vue
+9
-6
default-searchform-base.vue
...g-template/default-searchform/default-searchform-base.vue
+2
-2
main-grid-base.vue
...web/src/widgets/msg-template/main-grid/main-grid-base.vue
+9
-6
default-searchform-base.vue
...er-account/default-searchform/default-searchform-base.vue
+2
-2
main-grid-base.vue
...src/widgets/msg-user-account/main-grid/main-grid-base.vue
+9
-6
pom.xml
ibznotify-app/ibznotify-app-web/pom.xml
+27
-1
Dockerfile
ibznotify-app/ibznotify-app-web/src/main/docker/Dockerfile
+1
-1
application-web-prod.yml
...otify-app-web/src/main/resources/application-web-prod.yml
+12
-12
MsgOpenAccessMapper.java
...va/cn/ibizlab/core/notify/mapper/MsgOpenAccessMapper.java
+1
-1
MsgTemplateMapper.java
...java/cn/ibizlab/core/notify/mapper/MsgTemplateMapper.java
+1
-1
MsgBodyServiceImpl.java
.../ibizlab/core/notify/service/impl/MsgBodyServiceImpl.java
+2
-2
MsgOpenAccessServiceImpl.java
...ab/core/notify/service/impl/MsgOpenAccessServiceImpl.java
+2
-2
MsgTemplateServiceImpl.java
...zlab/core/notify/service/impl/MsgTemplateServiceImpl.java
+2
-2
MsgUserAccountServiceImpl.java
...b/core/notify/service/impl/MsgUserAccountServiceImpl.java
+2
-2
CommonAutoConfig.java
...in/java/cn/ibizlab/core/util/config/CommonAutoConfig.java
+29
-0
h2_table.xml
ibznotify-core/src/main/resources/liquibase/h2_table.xml
+4
-4
pom.xml
ibznotify-provider/ibznotify-provider-api/pom.xml
+35
-1
Dockerfile
...rovider/ibznotify-provider-api/src/main/docker/Dockerfile
+1
-1
MsgOpenAccessResource.java
.../main/java/cn/ibizlab/api/rest/MsgOpenAccessResource.java
+27
-27
MsgTemplateResource.java
...rc/main/java/cn/ibizlab/api/rest/MsgTemplateResource.java
+27
-27
MsgUserAccountResource.java
...main/java/cn/ibizlab/api/rest/MsgUserAccountResource.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
...fy-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
...tify-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
未找到文件。
app_web/src/components/app-menu-item/app-menu-item.vue
浏览文件 @
71c39df5
...
...
@@ -13,7 +13,7 @@
<
template
v-else
>
<i
v-if=
"isFirst"
class=
'fa fa-cogs app-menu-icon'
></i>
</
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>
<app-menu-item
:isCollapse=
"isCollapse"
:menus=
"item.items"
:ctrlName=
"ctrlName"
:isFirst=
"false"
:counterdata=
"counterdata"
:popper-class=
"popperClass"
></app-menu-item>
</el-submenu>
...
...
@@ -23,18 +23,18 @@
<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 != ''"
>
<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
v
-
else
-
if
=
"item.iconcls && item.iconcls != ''"
>
<
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
v
-
else
>
<
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
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"
>
<
span
class
=
"pull-right"
>
<
badge
:
count
=
"counterdata[item.counterid]"
:
overflow
-
count
=
"9999"
><
/badge
>
...
...
app_web/src/components/app-quick-menus/app-quick-menus.vue
浏览文件 @
71c39df5
...
...
@@ -8,7 +8,7 @@
<img
:src=
"item.iconcls"
v-else-if=
"!Object.is(item.iconcls, '')"
/>
<i
class=
"fa fa-cogs"
v-else
></i>
</span>
<span>
{{
$t
(
`app.menus.${ctrlName
}
.${item.name
}
`
)
}}
<
/span
>
<span>
{{
$t
(
`app.menus.${ctrlName
}
.${item.name
.toLowerCase()
}
`
)
}}
<
/span
>
<
span
class
=
"line"
><
/span
>
<
/p
>
<
p
style
=
" display: 'flex' "
>
...
...
@@ -37,7 +37,7 @@
<
img
:
src
=
"item.iconcls"
v
-
else
-
if
=
"!Object.is(item.iconcls, '')"
/>
<
i
class
=
"fa fa-cogs"
v
-
else
><
/i
>
<
/span
>
<
h4
>
{{
$t
(
`app.menus.${ctrlName
}
.${item.name
}
`
)
}}
<
/h4
>
<
h4
>
{{
$t
(
`app.menus.${ctrlName
}
.${item.name
.toLowerCase()
}
`
)
}}
<
/h4
>
<
/div
>
<
/card
>
<
/template
>
...
...
app_web/src/engine/view/grid-view8-engine.ts
浏览文件 @
71c39df5
...
...
@@ -9,14 +9,6 @@ import GridViewEngine from './grid-view-engine';
*/
export
default
class
GridView8Engine
extends
GridViewEngine
{
/**
* 表格部件
*
* @type {*}
* @memberof GridView8Engine
*/
protected
grid
:
any
;
/**
* 表格部件
*
...
...
app_web/src/locale/lang/BO-CN-base.ts
浏览文件 @
71c39df5
...
...
@@ -32,6 +32,8 @@ function getAppLocale(){
nomore
:
"དེ་ལས་མང་བ་མི་འདུག"
,
other
:
"གཞན་དག"
,
valueNotEmpty
:
"སྟོང་མི་ཆོག"
,
createFailed
:
"གསར་འཛུགས་ཕམ་པ།"
,
isExist
:
"གནས་པ་"
,
},
local
:{
new
:
"གསར་འཛུགས།"
,
...
...
app_web/src/locale/lang/en-US-base.ts
浏览文件 @
71c39df5
...
...
@@ -32,6 +32,8 @@ function getAppLocale(){
nomore
:
"No more"
,
other
:
"other"
,
valueNotEmpty
:
"The value cannot be null"
,
createFailed
:
"Create Failed"
,
isExist
:
"Exist"
,
},
local
:{
new
:
"New"
,
...
...
app_web/src/locale/lang/zh-CN-base.ts
浏览文件 @
71c39df5
...
...
@@ -32,6 +32,8 @@ function getAppLocale(){
nomore
:
"没有更多了"
,
other
:
"其他"
,
valueNotEmpty
:
"值不能为空"
,
createFailed
:
"创建失败"
,
isExist
:
"已存在"
,
},
local
:{
new
:
"新建"
,
...
...
app_web/src/mock/entity/msg-open-accesss/msg-open-accesss.ts
浏览文件 @
71c39df5
...
...
@@ -86,17 +86,17 @@ mock.onDelete(new RegExp(/^\/msgopenaccesses\/batch$/)).reply((config: any) => {
return
[
status
,
{}];
});
//
Select
mock
.
on
Get
(
new
RegExp
(
/^
\/
msgopenaccesses
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msgopenaccess 方法:
Select
"
);
//
CheckKey
mock
.
on
Post
(
new
RegExp
(
/^
\/
msgopenaccesses
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msgopenaccess 方法:
CheckKey
"
);
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
(
/^
\/
msgopenaccesses
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
msgopenaccesses
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
...
@@ -106,13 +106,23 @@ mock.onGet(new RegExp(/^\/msgopenaccesses\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).r
});
});
}
let
items
=
mockDatas
?
mockDatas
:
[];
let
_items
=
items
.
find
((
item
:
any
)
=>
Object
.
is
(
item
.
id
,
tempValue
.
id
));
//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
(
_items
);
console
.
table
(
data
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
];
return
[
status
,
data
];
});
// Create
...
...
@@ -140,44 +150,6 @@ mock.onPost(new RegExp(/^\/msgopenaccesses\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((
console
.
groupEnd
();
return
[
status
,
mockDatas
[
0
]];
});
// Update
mock
.
onPut
(
new
RegExp
(
/^
\/
msgopenaccesses
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msgopenaccess 方法: 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
(
/^
\/
msgopenaccesses
\/([
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
mock
.
onGet
(
new
RegExp
(
/^
\/
msgopenaccesses
\/
getdraft$/
)).
reply
((
config
:
any
)
=>
{
...
...
@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/msgopenaccesses\/getdraft$/)).reply((config: any) => {
return
[
status
,
{}];
});
//
CheckKey
mock
.
onPost
(
new
RegExp
(
/^
\/
msgopenaccesses
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msgopenaccess 方法:
CheckKey
"
);
//
Save
mock
.
onPost
(
new
RegExp
(
/^
\/
msgopenaccesses
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
save
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msgopenaccess 方法:
Save
"
);
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
(
/^
\/
msgopenaccesses
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
msgopenaccesses
\/([
a-zA-Z0-9
\-\;]{1,35})\/
save
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
...
@@ -233,16 +205,16 @@ mock.onPost(new RegExp(/^\/msgopenaccesses\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/
return
[
status
,
data
];
});
//
Sav
e
mock
.
onP
ost
(
new
RegExp
(
/^
\/
msgopenaccesses
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
save
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msgopenaccess 方法:
Sav
e"
);
//
Updat
e
mock
.
onP
ut
(
new
RegExp
(
/^
\/
msgopenaccesses
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msgopenaccess 方法:
Updat
e"
);
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
(
/^
\/
msgopenaccesses
\/([
a-zA-Z0-9
\-\;]{1,35})
\/
save
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
msgopenaccesses
\/([
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
)
=>
{
...
...
@@ -322,10 +294,38 @@ mock.onGet(new RegExp(/^\/msgopenaccesses\/fetchdefault(\?[\w-./?%&=,]*)*$/)).re
// URI参数传递情况未实现
// URI参数传递情况未实现
// Select
mock
.
onGet
(
new
RegExp
(
/^
\/
msgopenaccesses
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msgopenaccess 方法: 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
(
/^
\/
msgopenaccesses
\/([
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
(
/^
\/
msgopenaccesses
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msgopenaccess 方法: Remove"
);
// Get
mock
.
onGet
(
new
RegExp
(
/^
\/
msgopenaccesses
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msgopenaccess 方法: Get"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
...
...
@@ -351,9 +351,9 @@ mock.onDelete(new RegExp(/^\/msgopenaccesses\/([a-zA-Z0-9\-\;]{1,35})$/)).reply(
return
[
status
,
_items
?
_items
:{}];
});
//
Get
mock
.
on
Get
(
new
RegExp
(
/^
\/
msgopenaccesses
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msgopenaccess 方法:
Get
"
);
//
Remove
mock
.
on
Delete
(
new
RegExp
(
/^
\/
msgopenaccesses
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msgopenaccess 方法:
Remove
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
...
...
app_web/src/mock/entity/msg-templates/msg-templates.ts
浏览文件 @
71c39df5
...
...
@@ -86,17 +86,17 @@ mock.onDelete(new RegExp(/^\/msgtemplates\/batch$/)).reply((config: any) => {
return
[
status
,
{}];
});
//
Select
mock
.
on
Get
(
new
RegExp
(
/^
\/
msgtemplates
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msgtemplate 方法:
Select
"
);
//
CheckKey
mock
.
on
Post
(
new
RegExp
(
/^
\/
msgtemplates
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msgtemplate 方法:
CheckKey
"
);
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
>
=
[
'tid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
msgtemplates
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
msgtemplates
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
...
@@ -106,13 +106,23 @@ mock.onGet(new RegExp(/^\/msgtemplates\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).repl
});
});
}
let
items
=
mockDatas
?
mockDatas
:
[];
let
_items
=
items
.
find
((
item
:
any
)
=>
Object
.
is
(
item
.
tid
,
tempValue
.
tid
));
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.tid, tempValue.tid));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'tid'
]
==
tempValue
[
'tid'
]
){
for
(
let
value
in
data
){
if
(
item
.
hasOwnProperty
(
value
)){
item
[
value
]
=
data
[
value
];
}
}
}
})
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
);
console
.
table
(
data
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
];
return
[
status
,
data
];
});
// Create
...
...
@@ -140,44 +150,6 @@ mock.onPost(new RegExp(/^\/msgtemplates\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((con
console
.
groupEnd
();
return
[
status
,
mockDatas
[
0
]];
});
// Update
mock
.
onPut
(
new
RegExp
(
/^
\/
msgtemplates
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msgtemplate 方法: 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
>
=
[
'tid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
msgtemplates
\/([
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.tid, tempValue.tid));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'tid'
]
==
tempValue
[
'tid'
]
){
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
mock
.
onGet
(
new
RegExp
(
/^
\/
msgtemplates
\/
getdraft$/
)).
reply
((
config
:
any
)
=>
{
...
...
@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/msgtemplates\/getdraft$/)).reply((config: any) => {
return
[
status
,
{}];
});
//
CheckKey
mock
.
onPost
(
new
RegExp
(
/^
\/
msgtemplates
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msgtemplate 方法:
CheckKey
"
);
//
Save
mock
.
onPost
(
new
RegExp
(
/^
\/
msgtemplates
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
save
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msgtemplate 方法:
Save
"
);
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
>
=
[
'tid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
msgtemplates
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
msgtemplates
\/([
a-zA-Z0-9
\-\;]{1,35})\/
save
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
...
@@ -233,16 +205,16 @@ mock.onPost(new RegExp(/^\/msgtemplates\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).
return
[
status
,
data
];
});
//
Sav
e
mock
.
onP
ost
(
new
RegExp
(
/^
\/
msgtemplates
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
save
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msgtemplate 方法:
Sav
e"
);
//
Updat
e
mock
.
onP
ut
(
new
RegExp
(
/^
\/
msgtemplates
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msgtemplate 方法:
Updat
e"
);
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
>
=
[
'tid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
msgtemplates
\/([
a-zA-Z0-9
\-\;]{1,35})
\/
save
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
msgtemplates
\/([
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
)
=>
{
...
...
@@ -322,10 +294,38 @@ mock.onGet(new RegExp(/^\/msgtemplates\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply
// URI参数传递情况未实现
// URI参数传递情况未实现
// Select
mock
.
onGet
(
new
RegExp
(
/^
\/
msgtemplates
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msgtemplate 方法: 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
>
=
[
'tid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
msgtemplates
\/([
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
.
tid
,
tempValue
.
tid
));
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
];
});
// Remove
mock
.
onDelete
(
new
RegExp
(
/^
\/
msgtemplates
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msgtemplate 方法: Remove"
);
// Get
mock
.
onGet
(
new
RegExp
(
/^
\/
msgtemplates
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msgtemplate 方法: Get"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
...
...
@@ -351,9 +351,9 @@ mock.onDelete(new RegExp(/^\/msgtemplates\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((co
return
[
status
,
_items
?
_items
:{}];
});
//
Get
mock
.
on
Get
(
new
RegExp
(
/^
\/
msgtemplates
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msgtemplate 方法:
Get
"
);
//
Remove
mock
.
on
Delete
(
new
RegExp
(
/^
\/
msgtemplates
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msgtemplate 方法:
Remove
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
...
...
app_web/src/mock/entity/msg-user-accounts/msg-user-accounts.ts
浏览文件 @
71c39df5
...
...
@@ -86,17 +86,17 @@ mock.onDelete(new RegExp(/^\/msguseraccounts\/batch$/)).reply((config: any) => {
return
[
status
,
{}];
});
//
Select
mock
.
on
Get
(
new
RegExp
(
/^
\/
msguseraccounts
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msguseraccount 方法:
Select
"
);
//
CheckKey
mock
.
on
Post
(
new
RegExp
(
/^
\/
msguseraccounts
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msguseraccount 方法:
CheckKey
"
);
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
(
/^
\/
msguseraccounts
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
msguseraccounts
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
...
@@ -106,13 +106,23 @@ mock.onGet(new RegExp(/^\/msguseraccounts\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).r
});
});
}
let
items
=
mockDatas
?
mockDatas
:
[];
let
_items
=
items
.
find
((
item
:
any
)
=>
Object
.
is
(
item
.
id
,
tempValue
.
id
));
//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
(
_items
);
console
.
table
(
data
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
];
return
[
status
,
data
];
});
// Create
...
...
@@ -140,44 +150,6 @@ mock.onPost(new RegExp(/^\/msguseraccounts\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((
console
.
groupEnd
();
return
[
status
,
mockDatas
[
0
]];
});
// Update
mock
.
onPut
(
new
RegExp
(
/^
\/
msguseraccounts
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msguseraccount 方法: 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
(
/^
\/
msguseraccounts
\/([
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
mock
.
onGet
(
new
RegExp
(
/^
\/
msguseraccounts
\/
getdraft$/
)).
reply
((
config
:
any
)
=>
{
...
...
@@ -195,16 +167,16 @@ mock.onGet(new RegExp(/^\/msguseraccounts\/getdraft$/)).reply((config: any) => {
return
[
status
,
{}];
});
//
CheckKey
mock
.
onPost
(
new
RegExp
(
/^
\/
msguseraccounts
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msguseraccount 方法:
CheckKey
"
);
//
Save
mock
.
onPost
(
new
RegExp
(
/^
\/
msguseraccounts
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
save
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msguseraccount 方法:
Save
"
);
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
(
/^
\/
msguseraccounts
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
msguseraccounts
\/([
a-zA-Z0-9
\-\;]{1,35})\/
save
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
...
@@ -233,16 +205,16 @@ mock.onPost(new RegExp(/^\/msguseraccounts\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/
return
[
status
,
data
];
});
//
Sav
e
mock
.
onP
ost
(
new
RegExp
(
/^
\/
msguseraccounts
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
save
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msguseraccount 方法:
Sav
e"
);
//
Updat
e
mock
.
onP
ut
(
new
RegExp
(
/^
\/
msguseraccounts
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msguseraccount 方法:
Updat
e"
);
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
(
/^
\/
msguseraccounts
\/([
a-zA-Z0-9
\-\;]{1,35})
\/
save
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
msguseraccounts
\/([
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
)
=>
{
...
...
@@ -322,10 +294,38 @@ mock.onGet(new RegExp(/^\/msguseraccounts\/fetchdefault(\?[\w-./?%&=,]*)*$/)).re
// URI参数传递情况未实现
// URI参数传递情况未实现
// Select
mock
.
onGet
(
new
RegExp
(
/^
\/
msguseraccounts
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msguseraccount 方法: 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
(
/^
\/
msguseraccounts
\/([
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
(
/^
\/
msguseraccounts
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msguseraccount 方法: Remove"
);
// Get
mock
.
onGet
(
new
RegExp
(
/^
\/
msguseraccounts
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msguseraccount 方法: Get"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
...
...
@@ -351,9 +351,9 @@ mock.onDelete(new RegExp(/^\/msguseraccounts\/([a-zA-Z0-9\-\;]{1,35})$/)).reply(
return
[
status
,
_items
?
_items
:{}];
});
//
Get
mock
.
on
Get
(
new
RegExp
(
/^
\/
msguseraccounts
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msguseraccount 方法:
Get
"
);
//
Remove
mock
.
on
Delete
(
new
RegExp
(
/^
\/
msguseraccounts
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msguseraccount 方法:
Remove
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
...
...
app_web/src/service/msg-open-access/msg-open-access-service-base.ts
浏览文件 @
71c39df5
...
...
@@ -39,7 +39,7 @@ export default class MsgOpenAccessServiceBase extends EntityService {
// 实体接口
/**
*
Select
接口方法
*
CheckKey
接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
...
...
@@ -47,9 +47,8 @@ export default class MsgOpenAccessServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof MsgOpenAccessServiceBase
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
get
(
`/msgopenaccesses/
${
context
.
msgopenaccess
}
/select`
,
isloading
);
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
post
(
`/msgopenaccesses/
${
context
.
msgopenaccess
}
/checkkey`
,
data
,
isloading
);
return
res
;
}
...
...
@@ -77,37 +76,6 @@ export default class MsgOpenAccessServiceBase extends EntityService {
return
res
;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MsgOpenAccessServiceBase
*/
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
(
`/msgopenaccesses/
${
context
.
msgopenaccess
}
`
,
data
,
isloading
);
return
res
;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MsgOpenAccessServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
delete
(
`/msgopenaccesses/
${
context
.
msgopenaccess
}
`
,
isloading
);
return
res
;
}
/**
* Get接口方法
*
...
...
@@ -140,7 +108,7 @@ export default class MsgOpenAccessServiceBase extends EntityService {
}
/**
*
CheckKey
接口方法
*
Remove
接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
...
...
@@ -148,8 +116,8 @@ export default class MsgOpenAccessServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof MsgOpenAccessServiceBase
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
post
(
`/msgopenaccesses/
${
context
.
msgopenaccess
}
/checkkey`
,
data
,
isloading
);
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
delete
(
`/msgopenaccesses/
${
context
.
msgopenaccess
}
`
,
isloading
);
return
res
;
}
...
...
@@ -170,6 +138,23 @@ export default class MsgOpenAccessServiceBase extends EntityService {
return
res
;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MsgOpenAccessServiceBase
*/
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
(
`/msgopenaccesses/
${
context
.
msgopenaccess
}
`
,
data
,
isloading
);
return
res
;
}
/**
* FetchDefault接口方法
*
...
...
@@ -198,4 +183,19 @@ export default class MsgOpenAccessServiceBase extends EntityService {
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
await
Http
.
getInstance
().
post
(
`/msgopenaccesses/searchdefault`
,
tempData
,
isloading
);
}
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MsgOpenAccessServiceBase
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
get
(
`/msgopenaccesses/
${
context
.
msgopenaccess
}
/select`
,
isloading
);
return
res
;
}
}
\ No newline at end of file
app_web/src/service/msg-template/msg-template-service-base.ts
浏览文件 @
71c39df5
...
...
@@ -39,7 +39,7 @@ export default class MsgTemplateServiceBase extends EntityService {
// 实体接口
/**
*
Select
接口方法
*
CheckKey
接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
...
...
@@ -47,9 +47,8 @@ export default class MsgTemplateServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof MsgTemplateServiceBase
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
get
(
`/msgtemplates/
${
context
.
msgtemplate
}
/select`
,
isloading
);
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
post
(
`/msgtemplates/
${
context
.
msgtemplate
}
/checkkey`
,
data
,
isloading
);
return
res
;
}
...
...
@@ -77,37 +76,6 @@ export default class MsgTemplateServiceBase extends EntityService {
return
res
;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MsgTemplateServiceBase
*/
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
(
`/msgtemplates/
${
context
.
msgtemplate
}
`
,
data
,
isloading
);
return
res
;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MsgTemplateServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
delete
(
`/msgtemplates/
${
context
.
msgtemplate
}
`
,
isloading
);
return
res
;
}
/**
* Get接口方法
*
...
...
@@ -140,7 +108,7 @@ export default class MsgTemplateServiceBase extends EntityService {
}
/**
*
CheckKey
接口方法
*
Remove
接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
...
...
@@ -148,8 +116,8 @@ export default class MsgTemplateServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof MsgTemplateServiceBase
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
post
(
`/msgtemplates/
${
context
.
msgtemplate
}
/checkkey`
,
data
,
isloading
);
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
delete
(
`/msgtemplates/
${
context
.
msgtemplate
}
`
,
isloading
);
return
res
;
}
...
...
@@ -170,6 +138,23 @@ export default class MsgTemplateServiceBase extends EntityService {
return
res
;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MsgTemplateServiceBase
*/
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
(
`/msgtemplates/
${
context
.
msgtemplate
}
`
,
data
,
isloading
);
return
res
;
}
/**
* FetchDefault接口方法
*
...
...
@@ -198,4 +183,19 @@ export default class MsgTemplateServiceBase extends EntityService {
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
await
Http
.
getInstance
().
post
(
`/msgtemplates/searchdefault`
,
tempData
,
isloading
);
}
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MsgTemplateServiceBase
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
get
(
`/msgtemplates/
${
context
.
msgtemplate
}
/select`
,
isloading
);
return
res
;
}
}
\ No newline at end of file
app_web/src/service/msg-user-account/msg-user-account-service-base.ts
浏览文件 @
71c39df5
...
...
@@ -39,7 +39,7 @@ export default class MsgUserAccountServiceBase extends EntityService {
// 实体接口
/**
*
Select
接口方法
*
CheckKey
接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
...
...
@@ -47,9 +47,8 @@ export default class MsgUserAccountServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof MsgUserAccountServiceBase
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
get
(
`/msguseraccounts/
${
context
.
msguseraccount
}
/select`
,
isloading
);
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
post
(
`/msguseraccounts/
${
context
.
msguseraccount
}
/checkkey`
,
data
,
isloading
);
return
res
;
}
...
...
@@ -77,37 +76,6 @@ export default class MsgUserAccountServiceBase extends EntityService {
return
res
;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MsgUserAccountServiceBase
*/
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
(
`/msguseraccounts/
${
context
.
msguseraccount
}
`
,
data
,
isloading
);
return
res
;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MsgUserAccountServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
delete
(
`/msguseraccounts/
${
context
.
msguseraccount
}
`
,
isloading
);
return
res
;
}
/**
* Get接口方法
*
...
...
@@ -140,7 +108,7 @@ export default class MsgUserAccountServiceBase extends EntityService {
}
/**
*
CheckKey
接口方法
*
Remove
接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
...
...
@@ -148,8 +116,8 @@ export default class MsgUserAccountServiceBase extends EntityService {
* @returns {Promise<any>}
* @memberof MsgUserAccountServiceBase
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
post
(
`/msguseraccounts/
${
context
.
msguseraccount
}
/checkkey`
,
data
,
isloading
);
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
delete
(
`/msguseraccounts/
${
context
.
msguseraccount
}
`
,
isloading
);
return
res
;
}
...
...
@@ -170,6 +138,23 @@ export default class MsgUserAccountServiceBase extends EntityService {
return
res
;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MsgUserAccountServiceBase
*/
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
(
`/msguseraccounts/
${
context
.
msguseraccount
}
`
,
data
,
isloading
);
return
res
;
}
/**
* FetchDefault接口方法
*
...
...
@@ -198,4 +183,19 @@ export default class MsgUserAccountServiceBase extends EntityService {
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
await
Http
.
getInstance
().
post
(
`/msguseraccounts/searchdefault`
,
tempData
,
isloading
);
}
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MsgUserAccountServiceBase
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
get
(
`/msguseraccounts/
${
context
.
msguseraccount
}
/select`
,
isloading
);
return
res
;
}
}
\ No newline at end of file
app_web/src/widgets/app/notify-index-view-appmenu/notify-index-view-appmenu-base.vue
浏览文件 @
71c39df5
...
...
@@ -23,7 +23,7 @@
<
template
v-else
>
<i
class=
'fa fa-cogs app-menu-icon'
></i>
</
template
>
<span
class=
'text'
:title=
"$t('app.menus.notifyindexview.' + item0.name
)"
>
{{$t('app.menus.notifyindexview.' + item0.name
)}}
</span>
<span
class=
'text'
:title=
"$t('app.menus.notifyindexview.' + item0.name
.toLowerCase())"
>
{{$t('app.menus.notifyindexview.' + item0.name.toLowerCase()
)}}
</span>
</template>
<
template
v-for=
"item1 in item0.items"
>
<template
v-if=
"item1.items && Array.isArray(item1.items) && item1.items.length > 0"
>
...
...
@@ -35,7 +35,7 @@
<
template
v-else-if=
"item1.iconcls && item1.iconcls != ''"
>
<i
:class=
"[item1.iconcls, 'app-menu-icon']"
></i>
</
template
>
<span
class=
'text'
:title=
"$t('app.menus.notifyindexview.' + item1.name
)"
>
{{$t('app.menus.notifyindexview.' + item1.name
)}}
</span>
<span
class=
'text'
:title=
"$t('app.menus.notifyindexview.' + item1.name
.toLowerCase())"
>
{{$t('app.menus.notifyindexview.' + item1.name.toLowerCase()
)}}
</span>
</template>
<
template
v-for=
"item2 in item1.items"
>
<template
v-if=
"item2.type =='MENUITEM'"
>
...
...
@@ -47,7 +47,7 @@
<i
:class=
"[item2.iconcls, 'app-menu-icon']"
></i>
</
template
>
<
template
slot=
"title"
>
<span
class=
"text"
:title=
"$t('app.menus.notifyindexview.' + item2.name
)"
>
{{
$t
(
'app.menus.notifyindexview.'
+
item2
.
name
)
}}
</span>
<span
class=
"text"
:title=
"$t('app.menus.notifyindexview.' + item2.name
.toLowerCase())"
>
{{
$t
(
'app.menus.notifyindexview.'
+
item2
.
name
.
toLowerCase
()
)
}}
</span>
<template
v-if=
"counterdata && counterdata[item2.counterid] && counterdata[item2.counterid] > 0"
>
<span
class=
"pull-right"
>
<badge
:count=
"counterdata[item2.counterid]"
:overflow-count=
"9999"
></badge>
...
...
@@ -69,7 +69,7 @@
<i
:class=
"[item1.iconcls, 'app-menu-icon']"
></i>
</
template
>
<
template
slot=
"title"
>
<span
class=
"text"
:title=
"$t('app.menus.notifyindexview.' + item1.name
)"
>
{{
$t
(
'app.menus.notifyindexview.'
+
item1
.
name
)
}}
</span>
<span
class=
"text"
:title=
"$t('app.menus.notifyindexview.' + item1.name
.toLowerCase())"
>
{{
$t
(
'app.menus.notifyindexview.'
+
item1
.
name
.
toLowerCase
()
)
}}
</span>
<template
v-if=
"counterdata && counterdata[item1.counterid] && counterdata[item1.counterid] > 0"
>
<span
class=
"pull-right"
>
<badge
:count=
"counterdata[item1.counterid]"
:overflow-count=
"9999"
></badge>
...
...
@@ -95,7 +95,7 @@
<i
class=
'fa fa-cogs app-menu-icon'
></i>
</
template
>
<
template
slot=
"title"
>
<span
class=
"text"
:title=
"$t('app.menus.notifyindexview.' + item0.name
)"
>
{{
$t
(
'app.menus.notifyindexview.'
+
item0
.
name
)
}}
</span>
<span
class=
"text"
:title=
"$t('app.menus.notifyindexview.' + item0.name
.toLowerCase())"
>
{{
$t
(
'app.menus.notifyindexview.'
+
item0
.
name
.
toLowerCase
()
)
}}
</span>
<template
v-if=
"counterdata && counterdata[item0.counterid] && counterdata[item0.counterid] > 0"
>
<span
class=
"pull-right"
>
<badge
:count=
"counterdata[item0.counterid]"
:overflow-count=
"9999"
></badge>
...
...
app_web/src/widgets/msg-open-access/default-searchform/default-searchform-base.vue
浏览文件 @
71c39df5
...
...
@@ -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
);
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
errorM
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorM
essage
});
if
(
response
.
data
&&
response
.
data
.
m
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
m
essage
});
}
return
;
}
...
...
app_web/src/widgets/msg-open-access/main-grid/main-grid-base.vue
浏览文件 @
71c39df5
...
...
@@ -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
);
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
errorM
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorM
essage
});
if
(
response
.
data
&&
response
.
data
.
m
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
m
essage
});
}
return
;
}
...
...
@@ -919,7 +919,7 @@ export default class MainBase extends Vue implements ControlInterface {
if
(
response
&&
response
.
status
===
401
)
{
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 {
resolve
(
response
);
}).
catch
((
response
:
any
)
=>
{
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
;
}
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
...
...
@@ -1125,6 +1125,9 @@ export default class MainBase extends Vue implements ControlInterface {
const
parentdata
:
any
=
{};
this
.
$emit
(
'beforeload'
,
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
);
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
...
...
@@ -1997,8 +2000,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
);
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
errorM
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorM
essage
});
if
(
response
.
data
&&
response
.
data
.
m
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
m
essage
});
}
return
;
}
...
...
app_web/src/widgets/msg-template/default-searchform/default-searchform-base.vue
浏览文件 @
71c39df5
...
...
@@ -706,8 +706,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
);
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
errorM
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorM
essage
});
if
(
response
.
data
&&
response
.
data
.
m
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
m
essage
});
}
return
;
}
...
...
app_web/src/widgets/msg-template/main-grid/main-grid-base.vue
浏览文件 @
71c39df5
...
...
@@ -891,8 +891,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
);
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
errorM
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorM
essage
});
if
(
response
.
data
&&
response
.
data
.
m
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
m
essage
});
}
return
;
}
...
...
@@ -942,7 +942,7 @@ export default class MainBase extends Vue implements ControlInterface {
if
(
response
&&
response
.
status
===
401
)
{
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
:
""
});
});
}
...
...
@@ -1027,7 +1027,7 @@ export default class MainBase extends Vue implements ControlInterface {
resolve
(
response
);
}).
catch
((
response
:
any
)
=>
{
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
;
}
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
...
...
@@ -1148,6 +1148,9 @@ export default class MainBase extends Vue implements ControlInterface {
const
parentdata
:
any
=
{};
this
.
$emit
(
'beforeload'
,
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
);
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
...
...
@@ -2031,8 +2034,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
);
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
errorM
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorM
essage
});
if
(
response
.
data
&&
response
.
data
.
m
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
m
essage
});
}
return
;
}
...
...
app_web/src/widgets/msg-user-account/default-searchform/default-searchform-base.vue
浏览文件 @
71c39df5
...
...
@@ -670,8 +670,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
);
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
errorM
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorM
essage
});
if
(
response
.
data
&&
response
.
data
.
m
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
m
essage
});
}
return
;
}
...
...
app_web/src/widgets/msg-user-account/main-grid/main-grid-base.vue
浏览文件 @
71c39df5
...
...
@@ -847,8 +847,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
);
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
errorM
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorM
essage
});
if
(
response
.
data
&&
response
.
data
.
m
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
m
essage
});
}
return
;
}
...
...
@@ -898,7 +898,7 @@ export default class MainBase extends Vue implements ControlInterface {
if
(
response
&&
response
.
status
===
401
)
{
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
:
""
});
});
}
...
...
@@ -983,7 +983,7 @@ export default class MainBase extends Vue implements ControlInterface {
resolve
(
response
);
}).
catch
((
response
:
any
)
=>
{
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
;
}
if
(
!
response
||
!
response
.
status
||
!
response
.
data
)
{
...
...
@@ -1104,6 +1104,9 @@ export default class MainBase extends Vue implements ControlInterface {
const
parentdata
:
any
=
{};
this
.
$emit
(
'beforeload'
,
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
);
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
||
response
.
status
!==
200
)
{
...
...
@@ -1973,8 +1976,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
);
post
.
then
((
response
:
any
)
=>
{
if
(
!
response
.
status
||
response
.
status
!==
200
)
{
if
(
response
.
errorM
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
errorM
essage
});
if
(
response
.
data
&&
response
.
data
.
m
essage
)
{
this
.
$Notice
.
error
({
title
:
(
this
.
$t
(
'app.commonWords.wrong'
)
as
string
),
desc
:
response
.
data
.
m
essage
});
}
return
;
}
...
...
ibznotify-app/ibznotify-app-web/pom.xml
浏览文件 @
71c39df5
...
...
@@ -77,6 +77,32 @@
<workingDirectory>
../../app_web
</workingDirectory>
</configuration>
</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>
</plugin>
...
...
@@ -114,7 +140,7 @@
</resource>
</resources>
</configuration>
</plugin>
</plugin>
</plugins>
</build>
</profile>
...
...
ibznotify-app/ibznotify-app-web/src/main/docker/Dockerfile
浏览文件 @
71c39df5
FROM
openjdk:8-jre-alpine
FROM
adoptopenjdk/openjdk8:jdk8u242-b08-centos
ENV
TZ=Asia/Shanghai \
SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
...
...
ibznotify-app/ibznotify-app-web/src/main/resources/application-web-prod.yml
浏览文件 @
71c39df5
...
...
@@ -7,18 +7,6 @@ logging:
#zuul网关路由设置
zuul
:
routes
:
msg_user_account
:
path
:
/msguseraccounts/**
serviceId
:
${ibiz.ref.service.ibznotify-api:ibznotify-api}
stripPrefix
:
false
msg_template
:
path
:
/msgtemplates/**
serviceId
:
${ibiz.ref.service.ibznotify-api:ibznotify-api}
stripPrefix
:
false
msg_open_access
:
path
:
/msgopenaccesses/**
serviceId
:
${ibiz.ref.service.ibznotify-api:ibznotify-api}
stripPrefix
:
false
loginv7
:
path
:
/v7/login
serviceId
:
${ibiz.ref.service.uaa:ibzuaa-api}
...
...
@@ -75,5 +63,17 @@ zuul:
path
:
/sysauthlogs
serviceId
:
${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix
:
false
msg_user_account
:
path
:
/msguseraccounts/**
serviceId
:
${ibiz.ref.service.ibznotify-api:ibznotify-api}
stripPrefix
:
false
msg_template
:
path
:
/msgtemplates/**
serviceId
:
${ibiz.ref.service.ibznotify-api:ibznotify-api}
stripPrefix
:
false
msg_open_access
:
path
:
/msgopenaccesses/**
serviceId
:
${ibiz.ref.service.ibznotify-api:ibznotify-api}
stripPrefix
:
false
sensitive-headers
:
-
Cookie,Set-Cookie,Authorization
ibznotify-core/src/main/java/cn/ibizlab/core/notify/mapper/MsgOpenAccessMapper.java
浏览文件 @
71c39df5
...
...
@@ -31,7 +31,7 @@ public interface MsgOpenAccessMapper extends BaseMapper<MsgOpenAccess> {
@CacheEvict
(
value
=
"msgopenaccess"
,
key
=
"'row:'+#p0.id"
)
int
updateById
(
@Param
(
Constants
.
ENTITY
)
MsgOpenAccess
entity
);
@Override
@CacheEvict
(
value
=
"msgopenaccess"
,
key
=
"'row:'+#p0.id"
)
@CacheEvict
(
value
=
"msgopenaccess"
,
key
=
"'row:'+#p0.id"
,
condition
=
"#p0 != null"
)
int
update
(
@Param
(
Constants
.
ENTITY
)
MsgOpenAccess
entity
,
@Param
(
"ew"
)
Wrapper
<
MsgOpenAccess
>
updateWrapper
);
@Override
@CacheEvict
(
value
=
"msgopenaccess"
,
key
=
"'row:'+#p0"
)
...
...
ibznotify-core/src/main/java/cn/ibizlab/core/notify/mapper/MsgTemplateMapper.java
浏览文件 @
71c39df5
...
...
@@ -31,7 +31,7 @@ public interface MsgTemplateMapper extends BaseMapper<MsgTemplate> {
@CacheEvict
(
value
=
"msgtemplate"
,
key
=
"'row:'+#p0.tid"
)
int
updateById
(
@Param
(
Constants
.
ENTITY
)
MsgTemplate
entity
);
@Override
@CacheEvict
(
value
=
"msgtemplate"
,
key
=
"'row:'+#p0.tid"
)
@CacheEvict
(
value
=
"msgtemplate"
,
key
=
"'row:'+#p0.tid"
,
condition
=
"#p0 != null"
)
int
update
(
@Param
(
Constants
.
ENTITY
)
MsgTemplate
entity
,
@Param
(
"ew"
)
Wrapper
<
MsgTemplate
>
updateWrapper
);
@Override
@CacheEvict
(
value
=
"msgtemplate"
,
key
=
"'row:'+#p0"
)
...
...
ibznotify-core/src/main/java/cn/ibizlab/core/notify/service/impl/MsgBodyServiceImpl.java
浏览文件 @
71c39df5
...
...
@@ -184,8 +184,8 @@ public class MsgBodyServiceImpl extends ServiceImpl<MsgBodyMapper, MsgBody> impl
*/
@Override
public
Page
<
MsgBody
>
searchDefault
(
MsgBodySearchContext
context
)
{
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
MsgBody
>
pages
=
baseMapper
.
searchDefault
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
MsgBody
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
MsgBody
>
pages
=
baseMapper
.
searchDefault
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
MsgBody
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
...
...
ibznotify-core/src/main/java/cn/ibizlab/core/notify/service/impl/MsgOpenAccessServiceImpl.java
浏览文件 @
71c39df5
...
...
@@ -187,8 +187,8 @@ public class MsgOpenAccessServiceImpl extends ServiceImpl<MsgOpenAccessMapper, M
*/
@Override
public
Page
<
MsgOpenAccess
>
searchDefault
(
MsgOpenAccessSearchContext
context
)
{
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
MsgOpenAccess
>
pages
=
baseMapper
.
searchDefault
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
MsgOpenAccess
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
MsgOpenAccess
>
pages
=
baseMapper
.
searchDefault
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
MsgOpenAccess
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
...
...
ibznotify-core/src/main/java/cn/ibizlab/core/notify/service/impl/MsgTemplateServiceImpl.java
浏览文件 @
71c39df5
...
...
@@ -203,8 +203,8 @@ public class MsgTemplateServiceImpl extends ServiceImpl<MsgTemplateMapper, MsgTe
*/
@Override
public
Page
<
MsgTemplate
>
searchDefault
(
MsgTemplateSearchContext
context
)
{
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
MsgTemplate
>
pages
=
baseMapper
.
searchDefault
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
MsgTemplate
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
MsgTemplate
>
pages
=
baseMapper
.
searchDefault
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
MsgTemplate
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
...
...
ibznotify-core/src/main/java/cn/ibizlab/core/notify/service/impl/MsgUserAccountServiceImpl.java
浏览文件 @
71c39df5
...
...
@@ -184,8 +184,8 @@ public class MsgUserAccountServiceImpl extends ServiceImpl<MsgUserAccountMapper,
*/
@Override
public
Page
<
MsgUserAccount
>
searchDefault
(
MsgUserAccountSearchContext
context
)
{
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
MsgUserAccount
>
pages
=
baseMapper
.
searchDefault
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
MsgUserAccount
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
MsgUserAccount
>
pages
=
baseMapper
.
searchDefault
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
MsgUserAccount
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
...
...
ibznotify-core/src/main/java/cn/ibizlab/core/util/config/CommonAutoConfig.java
0 → 100644
浏览文件 @
71c39df5
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
);
}
}
}
ibznotify-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
71c39df5
...
...
@@ -4,7 +4,7 @@
<!--输出实体[MSG_BODY]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-msg_body-20-1"
>
<changeSet
author=
"
root
"
id=
"tab-msg_body-20-1"
>
<createTable
tableName=
"IBZMSGBODY"
>
<column
name=
"ISERROR"
remarks=
""
type=
"INT"
>
</column>
...
...
@@ -42,7 +42,7 @@
<!--输出实体[MSG_OPEN_ACCESS]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-msg_open_access-8-2"
>
<changeSet
author=
"
root
"
id=
"tab-msg_open_access-8-2"
>
<createTable
tableName=
"IBZOPENACCESS"
>
<column
name=
"ACCESSID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_MSG_OPEN_ACCESS_ACCESSID"
/>
...
...
@@ -74,7 +74,7 @@
<!--输出实体[MSG_TEMPLATE]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-msg_template-3-3"
>
<changeSet
author=
"
root
"
id=
"tab-msg_template-3-3"
>
<createTable
tableName=
"IBZMSGTEMPL"
>
<column
name=
"TID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_MSG_TEMPLATE_TID"
/>
...
...
@@ -100,7 +100,7 @@
<!--输出实体[MSG_USER_ACCOUNT]数据结构 -->
<changeSet
author=
"
a_A_5d9d78509
"
id=
"tab-msg_user_account-6-4"
>
<changeSet
author=
"
root
"
id=
"tab-msg_user_account-6-4"
>
<createTable
tableName=
"IBZUSERAUTH"
>
<column
name=
"AUTHID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_MSG_USER_ACCOUNT_AUTHID"
/>
...
...
ibznotify-provider/ibznotify-provider-api/pom.xml
浏览文件 @
71c39df5
...
...
@@ -73,7 +73,41 @@
</resource>
</resources>
</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>
</build>
</profile>
...
...
ibznotify-provider/ibznotify-provider-api/src/main/docker/Dockerfile
浏览文件 @
71c39df5
FROM
openjdk:8-jre-alpine
FROM
adoptopenjdk/openjdk8:jdk8u242-b08-centos
ENV
TZ=Asia/Shanghai \
SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
...
...
ibznotify-provider/ibznotify-provider-api/src/main/java/cn/ibizlab/api/rest/MsgOpenAccessResource.java
浏览文件 @
71c39df5
...
...
@@ -65,25 +65,15 @@ public class MsgOpenAccessResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgOpenAccess-Update-all')"
)
@ApiOperation
(
value
=
"更新接入开放平台"
,
tags
=
{
"接入开放平台"
},
notes
=
"更新接入开放平台"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/msgopenaccesses/{msgopenaccess_id}"
)
public
ResponseEntity
<
MsgOpenAccessDTO
>
update
(
@PathVariable
(
"msgopenaccess_id"
)
String
msgopenaccess_id
,
@RequestBody
MsgOpenAccessDTO
msgopenaccessdto
)
{
MsgOpenAccess
domain
=
msgopenaccessMapping
.
toDomain
(
msgopenaccessdto
);
domain
.
setId
(
msgopenaccess_id
);
msgopenaccessService
.
update
(
domain
);
MsgOpenAccessDTO
dto
=
msgopenaccessMapping
.
toDto
(
domain
);
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgOpenAccess-Get-all')"
)
@ApiOperation
(
value
=
"获取接入开放平台"
,
tags
=
{
"接入开放平台"
},
notes
=
"获取接入开放平台"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/msgopenaccesses/{msgopenaccess_id}"
)
public
ResponseEntity
<
MsgOpenAccessDTO
>
get
(
@PathVariable
(
"msgopenaccess_id"
)
String
msgopenaccess_id
)
{
MsgOpenAccess
domain
=
msgopenaccessService
.
get
(
msgopenaccess_id
);
MsgOpenAccessDTO
dto
=
msgopenaccessMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgOpenAccess-Update-all')"
)
@ApiOperation
(
value
=
"批量更新接入开放平台"
,
tags
=
{
"接入开放平台"
},
notes
=
"批量更新接入开放平台"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/msgopenaccesses/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatch
(
@RequestBody
List
<
MsgOpenAccessDTO
>
msgopenaccessdtos
)
{
msgopenaccessService
.
updateBatch
(
msgopenaccessMapping
.
toDomain
(
msgopenaccessdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgOpenAccess-Remove-all')"
)
@ApiOperation
(
value
=
"删除接入开放平台"
,
tags
=
{
"接入开放平台"
},
notes
=
"删除接入开放平台"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/msgopenaccesses/{msgopenaccess_id}"
)
...
...
@@ -99,20 +89,23 @@ public class MsgOpenAccessResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgOpenAccess-Get-all')"
)
@ApiOperation
(
value
=
"获取接入开放平台"
,
tags
=
{
"接入开放平台"
},
notes
=
"获取接入开放平台"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/msgopenaccesses/{msgopenaccess_id}"
)
public
ResponseEntity
<
MsgOpenAccessDTO
>
get
(
@PathVariable
(
"msgopenaccess_id"
)
String
msgopenaccess_id
)
{
MsgOpenAccess
domain
=
msgopenaccessService
.
get
(
msgopenaccess_id
);
MsgOpenAccessDTO
dto
=
msgopenaccessMapping
.
toDto
(
domain
);
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgOpenAccess-Update-all')"
)
@ApiOperation
(
value
=
"更新接入开放平台"
,
tags
=
{
"接入开放平台"
},
notes
=
"更新接入开放平台"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/msgopenaccesses/{msgopenaccess_id}"
)
public
ResponseEntity
<
MsgOpenAccessDTO
>
update
(
@PathVariable
(
"msgopenaccess_id"
)
String
msgopenaccess_id
,
@RequestBody
MsgOpenAccessDTO
msgopenaccessdto
)
{
MsgOpenAccess
domain
=
msgopenaccessMapping
.
toDomain
(
msgopenaccessdto
);
domain
.
setId
(
msgopenaccess_id
);
msgopenaccessService
.
update
(
domain
);
MsgOpenAccessDTO
dto
=
msgopenaccessMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"获取接入开放平台草稿"
,
tags
=
{
"接入开放平台"
},
notes
=
"获取接入开放平台草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/msgopenaccesses/getdraft"
)
public
ResponseEntity
<
MsgOpenAccessDTO
>
getDraft
(
MsgOpenAccessDTO
dto
)
{
MsgOpenAccess
domain
=
msgopenaccessMapping
.
toDomain
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
msgopenaccessMapping
.
toDto
(
msgopenaccessService
.
getDraft
(
domain
)));
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgOpenAccess-Update-all')"
)
@ApiOperation
(
value
=
"批量更新接入开放平台"
,
tags
=
{
"接入开放平台"
},
notes
=
"批量更新接入开放平台"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/msgopenaccesses/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatch
(
@RequestBody
List
<
MsgOpenAccessDTO
>
msgopenaccessdtos
)
{
msgopenaccessService
.
updateBatch
(
msgopenaccessMapping
.
toDomain
(
msgopenaccessdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"检查接入开放平台"
,
tags
=
{
"接入开放平台"
},
notes
=
"检查接入开放平台"
)
...
...
@@ -121,6 +114,13 @@ public class MsgOpenAccessResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
msgopenaccessService
.
checkKey
(
msgopenaccessMapping
.
toDomain
(
msgopenaccessdto
)));
}
@ApiOperation
(
value
=
"获取接入开放平台草稿"
,
tags
=
{
"接入开放平台"
},
notes
=
"获取接入开放平台草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/msgopenaccesses/getdraft"
)
public
ResponseEntity
<
MsgOpenAccessDTO
>
getDraft
(
MsgOpenAccessDTO
dto
)
{
MsgOpenAccess
domain
=
msgopenaccessMapping
.
toDomain
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
msgopenaccessMapping
.
toDto
(
msgopenaccessService
.
getDraft
(
domain
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgOpenAccess-Save-all')"
)
@ApiOperation
(
value
=
"保存接入开放平台"
,
tags
=
{
"接入开放平台"
},
notes
=
"保存接入开放平台"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/msgopenaccesses/save"
)
...
...
ibznotify-provider/ibznotify-provider-api/src/main/java/cn/ibizlab/api/rest/MsgTemplateResource.java
浏览文件 @
71c39df5
...
...
@@ -65,25 +65,15 @@ public class MsgTemplateResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgTemplate-Update-all')"
)
@ApiOperation
(
value
=
"更新消息模板"
,
tags
=
{
"消息模板"
},
notes
=
"更新消息模板"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/msgtemplates/{msgtemplate_id}"
)
public
ResponseEntity
<
MsgTemplateDTO
>
update
(
@PathVariable
(
"msgtemplate_id"
)
String
msgtemplate_id
,
@RequestBody
MsgTemplateDTO
msgtemplatedto
)
{
MsgTemplate
domain
=
msgtemplateMapping
.
toDomain
(
msgtemplatedto
);
domain
.
setTid
(
msgtemplate_id
);
msgtemplateService
.
update
(
domain
);
MsgTemplateDTO
dto
=
msgtemplateMapping
.
toDto
(
domain
);
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgTemplate-Get-all')"
)
@ApiOperation
(
value
=
"获取消息模板"
,
tags
=
{
"消息模板"
},
notes
=
"获取消息模板"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/msgtemplates/{msgtemplate_id}"
)
public
ResponseEntity
<
MsgTemplateDTO
>
get
(
@PathVariable
(
"msgtemplate_id"
)
String
msgtemplate_id
)
{
MsgTemplate
domain
=
msgtemplateService
.
get
(
msgtemplate_id
);
MsgTemplateDTO
dto
=
msgtemplateMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgTemplate-Update-all')"
)
@ApiOperation
(
value
=
"批量更新消息模板"
,
tags
=
{
"消息模板"
},
notes
=
"批量更新消息模板"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/msgtemplates/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatch
(
@RequestBody
List
<
MsgTemplateDTO
>
msgtemplatedtos
)
{
msgtemplateService
.
updateBatch
(
msgtemplateMapping
.
toDomain
(
msgtemplatedtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgTemplate-Remove-all')"
)
@ApiOperation
(
value
=
"删除消息模板"
,
tags
=
{
"消息模板"
},
notes
=
"删除消息模板"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/msgtemplates/{msgtemplate_id}"
)
...
...
@@ -99,20 +89,23 @@ public class MsgTemplateResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgTemplate-Get-all')"
)
@ApiOperation
(
value
=
"获取消息模板"
,
tags
=
{
"消息模板"
},
notes
=
"获取消息模板"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/msgtemplates/{msgtemplate_id}"
)
public
ResponseEntity
<
MsgTemplateDTO
>
get
(
@PathVariable
(
"msgtemplate_id"
)
String
msgtemplate_id
)
{
MsgTemplate
domain
=
msgtemplateService
.
get
(
msgtemplate_id
);
MsgTemplateDTO
dto
=
msgtemplateMapping
.
toDto
(
domain
);
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgTemplate-Update-all')"
)
@ApiOperation
(
value
=
"更新消息模板"
,
tags
=
{
"消息模板"
},
notes
=
"更新消息模板"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/msgtemplates/{msgtemplate_id}"
)
public
ResponseEntity
<
MsgTemplateDTO
>
update
(
@PathVariable
(
"msgtemplate_id"
)
String
msgtemplate_id
,
@RequestBody
MsgTemplateDTO
msgtemplatedto
)
{
MsgTemplate
domain
=
msgtemplateMapping
.
toDomain
(
msgtemplatedto
);
domain
.
setTid
(
msgtemplate_id
);
msgtemplateService
.
update
(
domain
);
MsgTemplateDTO
dto
=
msgtemplateMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"获取消息模板草稿"
,
tags
=
{
"消息模板"
},
notes
=
"获取消息模板草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/msgtemplates/getdraft"
)
public
ResponseEntity
<
MsgTemplateDTO
>
getDraft
(
MsgTemplateDTO
dto
)
{
MsgTemplate
domain
=
msgtemplateMapping
.
toDomain
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
msgtemplateMapping
.
toDto
(
msgtemplateService
.
getDraft
(
domain
)));
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgTemplate-Update-all')"
)
@ApiOperation
(
value
=
"批量更新消息模板"
,
tags
=
{
"消息模板"
},
notes
=
"批量更新消息模板"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/msgtemplates/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatch
(
@RequestBody
List
<
MsgTemplateDTO
>
msgtemplatedtos
)
{
msgtemplateService
.
updateBatch
(
msgtemplateMapping
.
toDomain
(
msgtemplatedtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"检查消息模板"
,
tags
=
{
"消息模板"
},
notes
=
"检查消息模板"
)
...
...
@@ -121,6 +114,13 @@ public class MsgTemplateResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
msgtemplateService
.
checkKey
(
msgtemplateMapping
.
toDomain
(
msgtemplatedto
)));
}
@ApiOperation
(
value
=
"获取消息模板草稿"
,
tags
=
{
"消息模板"
},
notes
=
"获取消息模板草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/msgtemplates/getdraft"
)
public
ResponseEntity
<
MsgTemplateDTO
>
getDraft
(
MsgTemplateDTO
dto
)
{
MsgTemplate
domain
=
msgtemplateMapping
.
toDomain
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
msgtemplateMapping
.
toDto
(
msgtemplateService
.
getDraft
(
domain
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgTemplate-Save-all')"
)
@ApiOperation
(
value
=
"保存消息模板"
,
tags
=
{
"消息模板"
},
notes
=
"保存消息模板"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/msgtemplates/save"
)
...
...
ibznotify-provider/ibznotify-provider-api/src/main/java/cn/ibizlab/api/rest/MsgUserAccountResource.java
浏览文件 @
71c39df5
...
...
@@ -65,25 +65,15 @@ public class MsgUserAccountResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgUserAccount-Update-all')"
)
@ApiOperation
(
value
=
"更新绑定消息账号"
,
tags
=
{
"绑定消息账号"
},
notes
=
"更新绑定消息账号"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/msguseraccounts/{msguseraccount_id}"
)
public
ResponseEntity
<
MsgUserAccountDTO
>
update
(
@PathVariable
(
"msguseraccount_id"
)
String
msguseraccount_id
,
@RequestBody
MsgUserAccountDTO
msguseraccountdto
)
{
MsgUserAccount
domain
=
msguseraccountMapping
.
toDomain
(
msguseraccountdto
);
domain
.
setId
(
msguseraccount_id
);
msguseraccountService
.
update
(
domain
);
MsgUserAccountDTO
dto
=
msguseraccountMapping
.
toDto
(
domain
);
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgUserAccount-Get-all')"
)
@ApiOperation
(
value
=
"获取绑定消息账号"
,
tags
=
{
"绑定消息账号"
},
notes
=
"获取绑定消息账号"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/msguseraccounts/{msguseraccount_id}"
)
public
ResponseEntity
<
MsgUserAccountDTO
>
get
(
@PathVariable
(
"msguseraccount_id"
)
String
msguseraccount_id
)
{
MsgUserAccount
domain
=
msguseraccountService
.
get
(
msguseraccount_id
);
MsgUserAccountDTO
dto
=
msguseraccountMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgUserAccount-Update-all')"
)
@ApiOperation
(
value
=
"批量更新绑定消息账号"
,
tags
=
{
"绑定消息账号"
},
notes
=
"批量更新绑定消息账号"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/msguseraccounts/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatch
(
@RequestBody
List
<
MsgUserAccountDTO
>
msguseraccountdtos
)
{
msguseraccountService
.
updateBatch
(
msguseraccountMapping
.
toDomain
(
msguseraccountdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgUserAccount-Remove-all')"
)
@ApiOperation
(
value
=
"删除绑定消息账号"
,
tags
=
{
"绑定消息账号"
},
notes
=
"删除绑定消息账号"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/msguseraccounts/{msguseraccount_id}"
)
...
...
@@ -99,20 +89,23 @@ public class MsgUserAccountResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgUserAccount-Get-all')"
)
@ApiOperation
(
value
=
"获取绑定消息账号"
,
tags
=
{
"绑定消息账号"
},
notes
=
"获取绑定消息账号"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/msguseraccounts/{msguseraccount_id}"
)
public
ResponseEntity
<
MsgUserAccountDTO
>
get
(
@PathVariable
(
"msguseraccount_id"
)
String
msguseraccount_id
)
{
MsgUserAccount
domain
=
msguseraccountService
.
get
(
msguseraccount_id
);
MsgUserAccountDTO
dto
=
msguseraccountMapping
.
toDto
(
domain
);
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgUserAccount-Update-all')"
)
@ApiOperation
(
value
=
"更新绑定消息账号"
,
tags
=
{
"绑定消息账号"
},
notes
=
"更新绑定消息账号"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/msguseraccounts/{msguseraccount_id}"
)
public
ResponseEntity
<
MsgUserAccountDTO
>
update
(
@PathVariable
(
"msguseraccount_id"
)
String
msguseraccount_id
,
@RequestBody
MsgUserAccountDTO
msguseraccountdto
)
{
MsgUserAccount
domain
=
msguseraccountMapping
.
toDomain
(
msguseraccountdto
);
domain
.
setId
(
msguseraccount_id
);
msguseraccountService
.
update
(
domain
);
MsgUserAccountDTO
dto
=
msguseraccountMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"获取绑定消息账号草稿"
,
tags
=
{
"绑定消息账号"
},
notes
=
"获取绑定消息账号草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/msguseraccounts/getdraft"
)
public
ResponseEntity
<
MsgUserAccountDTO
>
getDraft
(
MsgUserAccountDTO
dto
)
{
MsgUserAccount
domain
=
msguseraccountMapping
.
toDomain
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
msguseraccountMapping
.
toDto
(
msguseraccountService
.
getDraft
(
domain
)));
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgUserAccount-Update-all')"
)
@ApiOperation
(
value
=
"批量更新绑定消息账号"
,
tags
=
{
"绑定消息账号"
},
notes
=
"批量更新绑定消息账号"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/msguseraccounts/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatch
(
@RequestBody
List
<
MsgUserAccountDTO
>
msguseraccountdtos
)
{
msguseraccountService
.
updateBatch
(
msguseraccountMapping
.
toDomain
(
msguseraccountdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"检查绑定消息账号"
,
tags
=
{
"绑定消息账号"
},
notes
=
"检查绑定消息账号"
)
...
...
@@ -121,6 +114,13 @@ public class MsgUserAccountResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
msguseraccountService
.
checkKey
(
msguseraccountMapping
.
toDomain
(
msguseraccountdto
)));
}
@ApiOperation
(
value
=
"获取绑定消息账号草稿"
,
tags
=
{
"绑定消息账号"
},
notes
=
"获取绑定消息账号草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/msguseraccounts/getdraft"
)
public
ResponseEntity
<
MsgUserAccountDTO
>
getDraft
(
MsgUserAccountDTO
dto
)
{
MsgUserAccount
domain
=
msguseraccountMapping
.
toDomain
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
msguseraccountMapping
.
toDto
(
msguseraccountService
.
getDraft
(
domain
)));
}
@ApiOperation
(
value
=
"保存绑定消息账号"
,
tags
=
{
"绑定消息账号"
},
notes
=
"保存绑定消息账号"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/msguseraccounts/save"
)
public
ResponseEntity
<
MsgUserAccountDTO
>
save
(
@RequestBody
MsgUserAccountDTO
msguseraccountdto
)
{
...
...
ibznotify-util/src/main/java/cn/ibizlab/util/aspect/DELogicAspect.java
浏览文件 @
71c39df5
...
...
@@ -28,9 +28,11 @@ import org.springframework.expression.ExpressionParser;
import
org.springframework.expression.spel.standard.SpelExpressionParser
;
import
org.springframework.expression.spel.support.StandardEvaluationContext
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.ClassUtils
;
import
org.springframework.util.DigestUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.core.annotation.Order
;
import
javax.xml.stream.XMLInputFactory
;
import
javax.xml.stream.XMLStreamReader
;
...
...
@@ -51,6 +53,7 @@ import java.util.concurrent.ConcurrentMap;
@Aspect
@Component
@Slf4j
@Order
(
100
)
public
class
DELogicAspect
{
private
static
BpmnXMLConverter
bpmnXMLConverter
=
new
BpmnXMLConverter
();
...
...
@@ -80,7 +83,7 @@ public class DELogicAspect {
if
(!
ObjectUtils
.
isEmpty
(
entity
))
{
String
id
=
DEFieldCacheMap
.
getDEKeyField
(
entity
.
getClass
());
if
(
StringUtils
.
isEmpty
(
id
))
{
log
.
debug
(
"无法获取实体主键属性[{}]"
,
entity
.
getClass
().
getSimpleName
(
));
log
.
debug
(
"无法获取实体主键属性[{}]"
,
getEntityName
(
entity
));
return
point
.
proceed
();
}
entity
.
set
(
id
,
arg
);
...
...
@@ -101,6 +104,17 @@ public class DELogicAspect {
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 {
* @param 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
))
{
executeLogic
(
bpmnFile
,
entity
,
action
);
}
...
...
@@ -121,7 +135,7 @@ public class DELogicAspect {
* @param 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
))
{
executeLogic
(
bpmnFile
,
entity
,
action
);
}
...
...
@@ -134,7 +148,7 @@ public class DELogicAspect {
* @param 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
))
{
executeLogic
(
bpmnFile
,
entity
,
action
);
}
...
...
@@ -148,7 +162,7 @@ public class DELogicAspect {
*/
private
void
executeLogic
(
Resource
bpmnFile
,
Object
entity
,
String
action
)
{
try
{
log
.
debug
(
"开始执行实体处理逻辑[{}:{}:{}:本地模式]"
,
entity
.
getClass
().
getSimpleName
(
),
action
,
bpmnFile
.
getFilename
());
log
.
debug
(
"开始执行实体处理逻辑[{}:{}:{}:本地模式]"
,
getEntityName
(
entity
),
action
,
bpmnFile
.
getFilename
());
String
bpmnId
=
DigestUtils
.
md5DigestAsHex
(
bpmnFile
.
getURL
().
getPath
().
getBytes
());
DELogic
logic
=
getDELogic
(
bpmnFile
);
if
(
logic
==
null
)
{
...
...
@@ -172,9 +186,9 @@ public class DELogicAspect {
}
}
kieSession
.
startProcess
(
mainProcess
.
getId
());
log
.
debug
(
"实体处理逻辑[{}:{}:{}:本地模式]执行结束"
,
entity
.
getClass
().
getSimpleName
(
),
action
,
bpmnFile
.
getFilename
());
}
catch
(
IO
Exception
e
)
{
log
.
error
(
"实体处理逻辑[{}:{}:{}:本地模式]发生异常"
,
entity
.
getClass
().
getSimpleName
(
),
action
,
bpmnFile
.
getFilename
());
log
.
debug
(
"实体处理逻辑[{}:{}:{}:本地模式]执行结束"
,
getEntityName
(
entity
),
action
,
bpmnFile
.
getFilename
());
}
catch
(
Exception
e
)
{
log
.
error
(
"实体处理逻辑[{}:{}:{}:本地模式]发生异常"
,
getEntityName
(
entity
),
action
,
bpmnFile
.
getFilename
());
throw
new
BadRequestAlertException
(
"执行实体处理逻辑发生异常"
+
e
.
getMessage
(),
"DELogicAspect"
,
"executeLogic"
);
}
}
...
...
@@ -414,7 +428,7 @@ public class DELogicAspect {
* @return
*/
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
))
{
return
true
;
}
else
{
...
...
ibznotify-util/src/main/java/cn/ibizlab/util/cache/cache/CusCaffeineCache.java
0 → 100644
浏览文件 @
71c39df5
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
);
}
}
}
ibznotify-util/src/main/java/cn/ibizlab/util/cache/cache/CusRedisCache.java
浏览文件 @
71c39df5
...
...
@@ -4,6 +4,8 @@ import org.springframework.data.redis.cache.RedisCache;
import
org.springframework.data.redis.cache.RedisCacheConfiguration
;
import
org.springframework.data.redis.cache.RedisCacheWriter
;
import
javax.validation.constraints.NotNull
;
/**
* 自定义的redis缓存
*/
...
...
@@ -12,4 +14,18 @@ public class CusRedisCache extends RedisCache {
public
CusRedisCache
(
String
name
,
RedisCacheWriter
redisCacheWriter
,
RedisCacheConfiguration
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
);
}
}
}
ibznotify-util/src/main/java/cn/ibizlab/util/cache/cacheManager/LayeringCacheManager.java
浏览文件 @
71c39df5
...
...
@@ -15,6 +15,7 @@ import java.util.Collections;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.ConcurrentMap
;
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.LayeringCache
;
...
...
@@ -80,7 +81,7 @@ public class LayeringCacheManager implements CacheManager {
* @return
*/
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
);
}
/**
...
...
ibznotify-util/src/main/java/cn/ibizlab/util/client/IBZWFFallback.java
浏览文件 @
71c39df5
...
...
@@ -3,6 +3,7 @@ package cn.ibizlab.util.client;
import
org.springframework.stereotype.Component
;
import
com.alibaba.fastjson.JSONObject
;
import
java.util.*
;
import
java.io.Serializable
;
@Component
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
)
{
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
;
}
}
ibznotify-util/src/main/java/cn/ibizlab/util/client/IBZWFFeignClient.java
浏览文件 @
71c39df5
...
...
@@ -4,6 +4,7 @@ import org.springframework.cloud.openfeign.FeignClient;
import
org.springframework.web.bind.annotation.*
;
import
com.alibaba.fastjson.JSONObject
;
import
java.util.*
;
import
java.io.Serializable
;
@FeignClient
(
value
=
"${ibiz.ref.service.wf:ibzwf-api}"
,
contextId
=
"wf"
,
fallback
=
IBZWFFallback
.
class
)
public
interface
IBZWFFeignClient
...
...
@@ -25,4 +26,19 @@ public interface IBZWFFeignClient
@PathVariable
(
"entity"
)
String
entity
,
@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
);
}
ibznotify-util/src/main/java/cn/ibizlab/util/domain/DELogic.java
浏览文件 @
71c39df5
...
...
@@ -17,4 +17,6 @@ public class DELogic implements Serializable {
List
<
DELogic
>
refLogic
;
List
<
Resource
>
refRuleFiles
;
String
md5
;
int
logicMode
;
long
loadedTime
;
}
ibznotify-util/src/main/java/cn/ibizlab/util/enums/DEFieldDefaultValueType.java
浏览文件 @
71c39df5
...
...
@@ -43,5 +43,21 @@ public enum DEFieldDefaultValueType {
/**
* 默认值
*/
NONE
NONE
,
/**
* 用户自定义
*/
USER
,
/**
* 用户自定义2
*/
USER2
,
/**
* 用户自定义3
*/
USER3
,
/**
* 用户自定义4
*/
USER4
}
ibznotify-util/src/main/java/cn/ibizlab/util/enums/DEPredefinedFieldType.java
浏览文件 @
71c39df5
...
...
@@ -55,5 +55,17 @@ public enum DEPredefinedFieldType {
/**
* 不处理
*/
NONE
NONE
,
/**
* 动态父类型
*/
PARENTTYPE
,
/**
* 动态父标识
*/
PARENTID
,
/**
* 动态父名称
*/
PARENTNAME
}
ibznotify-util/src/main/java/cn/ibizlab/util/errors/ExceptionTranslator.java
浏览文件 @
71c39df5
...
...
@@ -9,6 +9,8 @@ import org.springframework.web.bind.MethodArgumentNotValidException;
import
org.springframework.web.bind.annotation.ControllerAdvice
;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
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.Problem
;
import
org.zalando.problem.ProblemBuilder
;
...
...
@@ -105,4 +107,31 @@ public class ExceptionTranslator implements ProblemHandling {
headers
.
add
(
"X-ibz-params"
,
entityName
);
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
);
}
}
ibznotify-util/src/main/java/cn/ibizlab/util/filter/SearchContextBase.java
浏览文件 @
71c39df5
...
...
@@ -67,6 +67,11 @@ public class SearchContextBase implements ISearchContext{
* 工作流流程标识
*/
public
String
processDefinitionKey
;
/**
* 工作流标识
*/
@JsonProperty
(
"srfwf"
)
public
String
srfWF
;
/**
* 获取工作流步骤标识
...
...
ibznotify-util/src/main/java/cn/ibizlab/util/helper/Globs.java
0 → 100644
浏览文件 @
71c39df5
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
);
}
}
ibznotify-util/src/main/java/cn/ibizlab/util/helper/RuleUtils.java
浏览文件 @
71c39df5
...
...
@@ -280,22 +280,26 @@ public class RuleUtils
}
return
finalTime
.
getTime
()<
tm
.
getTime
();
}
else
if
(
finalObject
instanceof
Integer
)
{
return
(((
Integer
)
finalObject
).
intValue
()
<
((
Integer
)
exp
).
intValue
());
}
else
if
(
finalObject
instanceof
Double
)
{
return
(((
Double
)
finalObject
).
doubleValue
()
<
((
Double
)
exp
).
doubleValue
());
}
else
if
(
finalObject
instanceof
Float
)
{
return
(((
Float
)
finalObject
).
floatValue
()
<
((
Float
)
exp
).
floatValue
());
}
else
if
(
finalObject
instanceof
String
)
{
return
finalObject
.
toString
().
compareToIgnoreCase
(
exp
.
toString
())<
0
;
}
else
if
(
finalObject
instanceof
Integer
)
{
return
Integer
.
parseInt
(
finalObject
.
toString
())
<
Integer
.
parseInt
(
exp
.
toString
());
}
else
if
(
finalObject
instanceof
Double
)
{
return
Double
.
parseDouble
(
finalObject
.
toString
())
<
Double
.
parseDouble
(
exp
.
toString
());
}
else
if
(
finalObject
instanceof
Float
)
{
return
Float
.
parseFloat
(
finalObject
.
toString
())
<
Float
.
parseFloat
(
exp
.
toString
());
}
else
if
(
finalObject
instanceof
String
)
{
return
finalObject
.
toString
().
compareToIgnoreCase
(
exp
.
toString
())<
0
;
}
else
if
(
finalObject
instanceof
Long
)
{
return
Long
.
parseLong
(
finalObject
.
toString
())
<
Long
.
parseLong
(
exp
.
toString
());
}
else
return
false
;
}
...
...
ibznotify-util/src/main/java/cn/ibizlab/util/rest/AppController.java
浏览文件 @
71c39df5
...
...
@@ -12,6 +12,7 @@ import org.springframework.http.ResponseEntity;
import
org.springframework.security.core.GrantedAuthority
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.core.toolkit.IdWorker
;
import
java.util.*
;
@RestController
...
...
@@ -95,6 +96,26 @@ public class AppController {
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
...
...
ibznotify-util/src/main/java/cn/ibizlab/util/security/AuthPermissionEvaluator.java
浏览文件 @
71c39df5
...
...
@@ -13,6 +13,7 @@ import org.springframework.security.core.Authentication;
import
org.springframework.security.core.GrantedAuthority
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
java.io.Serializable
;
import
java.lang.reflect.ParameterizedType
;
import
java.lang.reflect.Type
;
...
...
@@ -300,20 +301,22 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
Map
<
String
,
DEField
>
preFields
=
DEFieldCacheMap
.
getDEFields
(
entityBase
.
getClass
());
//从缓存中获取当前类预置属性
for
(
Map
.
Entry
<
String
,
DEField
>
entry
:
preFields
.
entrySet
()){
String
fieldName
=
entry
.
getKey
();
//获取注解字段
DEField
fieldAnnotation
=
entry
.
getValue
();
//获取注解值
String
fieldName
=
fieldAnnotation
.
name
();
//获取注解字段
DEPredefinedFieldType
prefieldType
=
fieldAnnotation
.
preType
();
//用户配置系统预置属性-组织机构标识
if
(
prefieldType
==
prefieldType
.
ORGID
){
orgField
=
fieldName
;
}
//用户配置系统预置属性-部门标识
if
(
prefieldType
==
prefieldType
.
ORGSECTORID
){
orgDeptField
=
fieldName
;
}
//用户配置系统预置属性-部门标识
if
(
prefieldType
==
prefieldType
.
CREATEMAN
){
createManField
=
fieldName
;
if
(!
StringUtils
.
isEmpty
(
fieldName
)){
//用户配置系统预置属性-组织机构标识
if
(
prefieldType
==
prefieldType
.
ORGID
){
orgField
=
fieldName
;
}
//用户配置系统预置属性-部门标识
if
(
prefieldType
==
prefieldType
.
ORGSECTORID
){
orgDeptField
=
fieldName
;
}
//用户配置系统预置属性-部门标识
if
(
prefieldType
==
prefieldType
.
CREATEMAN
){
createManField
=
fieldName
;
}
}
}
permissionFiled
.
put
(
"orgfield"
,
orgField
);
...
...
ibznotify-util/src/main/java/cn/ibizlab/util/security/AuthenticationEntryPoint.java
浏览文件 @
71c39df5
...
...
@@ -20,7 +20,7 @@ public class AuthenticationEntryPoint implements org.springframework.security.we
/**
* 当用户尝试访问安全的REST资源而不提供任何凭据时,将调用此方法发送401 响应
*/
response
.
sendError
(
HttpServletResponse
.
SC_UNAUTHORIZED
,
authException
==
null
?
"Unauthorized"
:
authException
.
getMessage
()
);
response
.
sendError
(
HttpServletResponse
.
SC_UNAUTHORIZED
,
"账号身份已过期,请重新登录。"
);
}
...
...
ibznotify-util/src/main/java/cn/ibizlab/util/security/AuthenticationInfo.java
浏览文件 @
71c39df5
...
...
@@ -9,6 +9,10 @@ import java.io.Serializable;
@AllArgsConstructor
@JsonIgnoreProperties
(
ignoreUnknown
=
true
)
public
class
AuthenticationInfo
implements
Serializable
{
private
final
String
token
;
private
final
AuthenticationUser
user
;
private
String
token
;
private
AuthenticationUser
user
;
public
AuthenticationInfo
()
{
}
}
ibznotify-util/src/main/java/cn/ibizlab/util/security/AuthenticationUser.java
浏览文件 @
71c39df5
...
...
@@ -260,7 +260,6 @@ public class AuthenticationUser implements UserDetails
{
sessionParams
=
getUserSessionParam
();
sessionParams
.
put
(
"srfsystemid"
,
this
.
getSrfsystemid
());
sessionParams
.
put
(
"srfdynainstid"
,
this
.
getSrfdynainstid
());
sessionParams
.
put
(
"srfpersonid"
,
this
.
getUserid
());
sessionParams
.
put
(
"srfpersonname"
,
this
.
getPersonname
());
sessionParams
.
put
(
"srforgsectorid"
,
this
.
getMdeptid
());
...
...
ibznotify-util/src/main/java/cn/ibizlab/util/service/AuthenticationUserService.java
浏览文件 @
71c39df5
...
...
@@ -24,7 +24,7 @@ public interface AuthenticationUserService extends UserDetailsService {
@Cacheable
(
value
=
"ibzuaa_users"
,
key
=
"'getByUsername:'+#p0"
)
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
){}
...
...
ibznotify-util/src/main/java/cn/ibizlab/util/service/IBZConfigService.java
浏览文件 @
71c39df5
...
...
@@ -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
()));
}
@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
ibznotify-util/src/main/java/cn/ibizlab/util/web/SearchContextHandlerMethodArgumentResolver.java
浏览文件 @
71c39df5
package
cn
.
ibizlab
.
util
.
web
;
import
cn.ibizlab.util.filter.SearchContextBase
;
import
cn.ibizlab.util.domain.DTOBase
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.core.MethodParameter
;
...
...
@@ -24,7 +25,7 @@ public class SearchContextHandlerMethodArgumentResolver implements HandlerMethod
@Override
public
boolean
supportsParameter
(
MethodParameter
parameter
)
{
return
SearchContextBase
.
class
.
isAssignableFrom
(
parameter
.
getParameterType
());
return
SearchContextBase
.
class
.
isAssignableFrom
(
parameter
.
getParameterType
())
||
DTOBase
.
class
.
isAssignableFrom
(
parameter
.
getParameterType
())
;
}
@Override
...
...
@@ -35,7 +36,7 @@ public class SearchContextHandlerMethodArgumentResolver implements HandlerMethod
for
(
String
key
:
params
.
keySet
())
{
set
.
put
(
key
,
params
.
get
(
key
)[
0
]);
}
if
(
(!
set
.
containsKey
(
"size"
))
){
if
(
SearchContextBase
.
class
.
isAssignableFrom
(
parameter
.
getParameterType
())
&&
(!
set
.
containsKey
(
"size"
))
){
set
.
put
(
"size"
,
pageLimit
);
}
String
json
=
objectMapper
.
writeValueAsString
(
set
);
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录