Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
功
功能演示系统
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
示例
功能演示系统
提交
50b75251
提交
50b75251
编写于
4年前
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Mosher 发布系统代码 [后台服务,演示应用]
上级
c94f2b75
变更
7
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
319 行增加
和
150 行删除
+319
-150
ibizbooks.ts
app_Web/src/mock/entity/ibizbooks/ibizbooks.ts
+85
-127
ibizbook-service-base.ts
app_Web/src/service/ibizbook/ibizbook-service-base.ts
+120
-0
config.xml
config.xml
+0
-5
Dockerfile
demo-app/demo-app-web/src/main/docker/Dockerfile
+1
-1
demo-app-web.yaml
demo-app/demo-app-web/src/main/docker/demo-app-web.yaml
+1
-16
h2_table.xml
demo-core/src/main/resources/liquibase/h2_table.xml
+1
-1
IBIZBOOKResource.java
...c/main/java/cn/ibizlab/demoapi/rest/IBIZBOOKResource.java
+111
-0
未找到文件。
app_Web/src/mock/entity/ibizbooks/ibizbooks.ts
浏览文件 @
50b75251
...
@@ -176,7 +176,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply(
...
@@ -176,7 +176,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply(
});
});
// Create
// Create
mock
.
onPost
(
new
RegExp
(
/^
\/
ibizbooks
\/?([
a-zA-Z0-9
\-\;]{0,35})
\/
select
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onPost
(
new
RegExp
(
/^
\/
ibizbooks
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibizbook 方法: Create"
);
console
.
groupCollapsed
(
"实体:ibizbook 方法: Create"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
...
@@ -184,7 +184,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
...
@@ -184,7 +184,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'ibizbookid'
];
const
paramArray
:
Array
<
any
>
=
[
'ibizbookid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibizbooks
\/([
a-zA-Z0-9
\-\;]{1,35})
\/
select
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibizbooks
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -202,7 +202,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
...
@@ -202,7 +202,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
});
});
// Update
// Update
mock
.
onP
ost
(
new
RegExp
(
/^
\/
ibizbooks
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
select
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onP
ut
(
new
RegExp
(
/^
\/
ibizbooks
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibizbook 方法: Update"
);
console
.
groupCollapsed
(
"实体:ibizbook 方法: Update"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
...
@@ -210,7 +210,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
...
@@ -210,7 +210,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'ibizbookid'
];
const
paramArray
:
Array
<
any
>
=
[
'ibizbookid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibizbooks
\/([
a-zA-Z0-9
\-\;]{1,35})
\/
select
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibizbooks
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -238,123 +238,25 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
...
@@ -238,123 +238,25 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
data
];
return
[
status
,
data
];
});
});
// Remove
mock
.
onPost
(
new
RegExp
(
/^
\/
ibizbooks
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
select$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibizbook 方法: Remove"
);
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
>
=
[
'ibizbookid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibizbooks
\/([
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.ibizbookid, tempValue.ibizbookid));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'ibizbookid'
]
==
tempValue
[
'ibizbookid'
]
){
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
];
});
// Get
mock
.
onPost
(
new
RegExp
(
/^
\/
ibizbooks
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
select$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibizbook 方法: Get"
);
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
>
=
[
'ibizbookid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibizbooks
\/([
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.ibizbookid, tempValue.ibizbookid));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'ibizbookid'
]
==
tempValue
[
'ibizbookid'
]
){
for
(
let
value
in
data
){
if
(
item
.
hasOwnProperty
(
value
)){
item
[
value
]
=
data
[
value
];
}
}
}
})
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
data
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
data
];
});
// GetDraft
// GetDraft
mock
.
on
Post
(
new
RegExp
(
/^
\/
ibizbooks
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
selec
t$/
)).
reply
((
config
:
any
)
=>
{
mock
.
on
Get
(
new
RegExp
(
/^
\/
ibizbooks
\/
getdraf
t$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibizbook 方法: GetDraft"
);
console
.
groupCollapsed
(
"实体:ibizbook 方法: GetDraft"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
// GetDraft
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
return
[
status
,
null
];
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'ibizbookid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibizbooks
\/([
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.ibizbookid, tempValue.ibizbookid));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'ibizbookid'
]
==
tempValue
[
'ibizbookid'
]
){
for
(
let
value
in
data
){
if
(
item
.
hasOwnProperty
(
value
)){
item
[
value
]
=
data
[
value
];
}
}
}
})
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
data
);
console
.
table
(
{}
);
console
.
groupEnd
();
console
.
groupEnd
();
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
data
];
return
[
status
,
{}
];
});
});
// CheckKey
// CheckKey
mock
.
onPost
(
new
RegExp
(
/^
\/
ibizbooks
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
select
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onPost
(
new
RegExp
(
/^
\/
ibizbooks
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibizbook 方法: CheckKey"
);
console
.
groupCollapsed
(
"实体:ibizbook 方法: CheckKey"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
...
@@ -362,7 +264,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
...
@@ -362,7 +264,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'ibizbookid'
];
const
paramArray
:
Array
<
any
>
=
[
'ibizbookid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibizbooks
\/([
a-zA-Z0-9
\-\;]{1,35})\/
select
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibizbooks
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -392,7 +294,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
...
@@ -392,7 +294,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
});
});
// Save
// Save
mock
.
onPost
(
new
RegExp
(
/^
\/
ibizbooks
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
s
elect
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onPost
(
new
RegExp
(
/^
\/
ibizbooks
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
s
ave
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibizbook 方法: Save"
);
console
.
groupCollapsed
(
"实体:ibizbook 方法: Save"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
...
@@ -400,7 +302,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
...
@@ -400,7 +302,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'ibizbookid'
];
const
paramArray
:
Array
<
any
>
=
[
'ibizbookid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibizbooks
\/([
a-zA-Z0-9
\-\;]{1,35})\/
s
elect
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibizbooks
\/([
a-zA-Z0-9
\-\;]{1,35})\/
s
ave
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -430,7 +332,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
...
@@ -430,7 +332,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
});
});
// FetchDefault
// FetchDefault
mock
.
onGet
(
new
RegExp
(
/^
\/
ibizbooks
\/
selec
t$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onGet
(
new
RegExp
(
/^
\/
ibizbooks
\/
fetchdefaul
t$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibizbook 方法: FetchDefault"
);
console
.
groupCollapsed
(
"实体:ibizbook 方法: FetchDefault"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
...
@@ -445,7 +347,7 @@ mock.onGet(new RegExp(/^\/ibizbooks\/select$/)).reply((config: any) => {
...
@@ -445,7 +347,7 @@ mock.onGet(new RegExp(/^\/ibizbooks\/select$/)).reply((config: any) => {
});
});
// FetchDefault
// FetchDefault
mock
.
onGet
(
new
RegExp
(
/^
\/
ibizbooks
\/
selec
t
(\?[\w
-.
/
?%&=,
]
*
)
*$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onGet
(
new
RegExp
(
/^
\/
ibizbooks
\/
fetchdefaul
t
(\?[\w
-.
/
?%&=,
]
*
)
*$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibizbook 方法: FetchDefault"
);
console
.
groupCollapsed
(
"实体:ibizbook 方法: FetchDefault"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
if
(
config
.
url
.
includes
(
'page'
)){
if
(
config
.
url
.
includes
(
'page'
)){
...
@@ -474,7 +376,7 @@ mock.onGet(new RegExp(/^\/ibizbooks\/select(\?[\w-./?%&=,]*)*$/)).reply((config:
...
@@ -474,7 +376,7 @@ mock.onGet(new RegExp(/^\/ibizbooks\/select(\?[\w-./?%&=,]*)*$/)).reply((config:
});
});
// FilterUpdate
// FilterUpdate
mock
.
onPost
(
new
RegExp
(
/^
\/
ibizbooks
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
selec
t$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onPost
(
new
RegExp
(
/^
\/
ibizbooks
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
fetchdefaul
t$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibizbook 方法: FilterUpdate"
);
console
.
groupCollapsed
(
"实体:ibizbook 方法: FilterUpdate"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
...
@@ -482,7 +384,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
...
@@ -482,7 +384,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'ibizbookid'
];
const
paramArray
:
Array
<
any
>
=
[
'ibizbookid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibizbooks
\/([
a-zA-Z0-9
\-\;]{1,35})\/
selec
t$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibizbooks
\/([
a-zA-Z0-9
\-\;]{1,35})\/
fetchdefaul
t$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -512,7 +414,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
...
@@ -512,7 +414,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
});
});
// FilterSearch
// FilterSearch
mock
.
onPost
(
new
RegExp
(
/^
\/
ibizbooks
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
selec
t$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onPost
(
new
RegExp
(
/^
\/
ibizbooks
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
fetchdefaul
t$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibizbook 方法: FilterSearch"
);
console
.
groupCollapsed
(
"实体:ibizbook 方法: FilterSearch"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
...
@@ -520,7 +422,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
...
@@ -520,7 +422,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'ibizbookid'
];
const
paramArray
:
Array
<
any
>
=
[
'ibizbookid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibizbooks
\/([
a-zA-Z0-9
\-\;]{1,35})\/
selec
t$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibizbooks
\/([
a-zA-Z0-9
\-\;]{1,35})\/
fetchdefaul
t$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -550,7 +452,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
...
@@ -550,7 +452,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
});
});
// FilterGet
// FilterGet
mock
.
onPost
(
new
RegExp
(
/^
\/
ibizbooks
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
selec
t$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onPost
(
new
RegExp
(
/^
\/
ibizbooks
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
fetchdefaul
t$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibizbook 方法: FilterGet"
);
console
.
groupCollapsed
(
"实体:ibizbook 方法: FilterGet"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
...
@@ -558,7 +460,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
...
@@ -558,7 +460,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'ibizbookid'
];
const
paramArray
:
Array
<
any
>
=
[
'ibizbookid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibizbooks
\/([
a-zA-Z0-9
\-\;]{1,35})\/
selec
t$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibizbooks
\/([
a-zA-Z0-9
\-\;]{1,35})\/
fetchdefaul
t$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -588,7 +490,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
...
@@ -588,7 +490,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
});
});
// FilterCreate
// FilterCreate
mock
.
onPost
(
new
RegExp
(
/^
\/
ibizbooks
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
selec
t$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onPost
(
new
RegExp
(
/^
\/
ibizbooks
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
fetchdefaul
t$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibizbook 方法: FilterCreate"
);
console
.
groupCollapsed
(
"实体:ibizbook 方法: FilterCreate"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
...
@@ -596,7 +498,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
...
@@ -596,7 +498,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'ibizbookid'
];
const
paramArray
:
Array
<
any
>
=
[
'ibizbookid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibizbooks
\/([
a-zA-Z0-9
\-\;]{1,35})\/
selec
t$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibizbooks
\/([
a-zA-Z0-9
\-\;]{1,35})\/
fetchdefaul
t$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -626,7 +528,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
...
@@ -626,7 +528,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
});
});
// FilterGetDraft
// FilterGetDraft
mock
.
onPost
(
new
RegExp
(
/^
\/
ibizbooks
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
selec
t$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onPost
(
new
RegExp
(
/^
\/
ibizbooks
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
fetchdefaul
t$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibizbook 方法: FilterGetDraft"
);
console
.
groupCollapsed
(
"实体:ibizbook 方法: FilterGetDraft"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
...
@@ -634,7 +536,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
...
@@ -634,7 +536,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'ibizbookid'
];
const
paramArray
:
Array
<
any
>
=
[
'ibizbookid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibizbooks
\/([
a-zA-Z0-9
\-\;]{1,35})\/
selec
t$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibizbooks
\/([
a-zA-Z0-9
\-\;]{1,35})\/
fetchdefaul
t$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -664,7 +566,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
...
@@ -664,7 +566,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
});
});
// FilterRemove
// FilterRemove
mock
.
onPost
(
new
RegExp
(
/^
\/
ibizbooks
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
selec
t$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onPost
(
new
RegExp
(
/^
\/
ibizbooks
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
fetchdefaul
t$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibizbook 方法: FilterRemove"
);
console
.
groupCollapsed
(
"实体:ibizbook 方法: FilterRemove"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
...
@@ -672,7 +574,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
...
@@ -672,7 +574,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'ibizbookid'
];
const
paramArray
:
Array
<
any
>
=
[
'ibizbookid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibizbooks
\/([
a-zA-Z0-9
\-\;]{1,35})\/
selec
t$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibizbooks
\/([
a-zA-Z0-9
\-\;]{1,35})\/
fetchdefaul
t$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -702,7 +604,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
...
@@ -702,7 +604,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
});
});
// FilterFetch
// FilterFetch
mock
.
onPost
(
new
RegExp
(
/^
\/
ibizbooks
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
selec
t$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onPost
(
new
RegExp
(
/^
\/
ibizbooks
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
fetchdefaul
t$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibizbook 方法: FilterFetch"
);
console
.
groupCollapsed
(
"实体:ibizbook 方法: FilterFetch"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
...
@@ -710,7 +612,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
...
@@ -710,7 +612,7 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'ibizbookid'
];
const
paramArray
:
Array
<
any
>
=
[
'ibizbookid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibizbooks
\/([
a-zA-Z0-9
\-\;]{1,35})\/
selec
t$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibizbooks
\/([
a-zA-Z0-9
\-\;]{1,35})\/
fetchdefaul
t$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -739,3 +641,59 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
...
@@ -739,3 +641,59 @@ mock.onPost(new RegExp(/^\/ibizbooks\/?([a-zA-Z0-9\-\;]{0,35})\/select$/)).reply
return
[
status
,
data
];
return
[
status
,
data
];
});
});
// Remove
mock
.
onDelete
(
new
RegExp
(
/^
\/
ibizbooks
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibizbook 方法: Remove"
);
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
>
=
[
'ibizbookid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibizbooks
\/([
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
.
ibizbookid
,
tempValue
.
ibizbookid
));
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
?
_items
:{});
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
?
_items
:{}];
});
// Get
mock
.
onGet
(
new
RegExp
(
/^
\/
ibizbooks
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:ibizbook 方法: Get"
);
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
>
=
[
'ibizbookid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ibizbooks
\/([
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
.
ibizbookid
,
tempValue
.
ibizbookid
));
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
?
_items
:{});
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
?
_items
:{}];
});
This diff is collapsed.
Click to expand it.
app_Web/src/service/ibizbook/ibizbook-service-base.ts
浏览文件 @
50b75251
...
@@ -53,6 +53,123 @@ export default class IBIZBOOKServiceBase extends EntityService {
...
@@ -53,6 +53,123 @@ export default class IBIZBOOKServiceBase extends EntityService {
return
res
;
return
res
;
}
}
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBIZBOOKServiceBase
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibizbooks`
,
data
,
isloading
);
return
res
;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBIZBOOKServiceBase
*/
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
(
`/ibizbooks/
${
context
.
ibizbook
}
`
,
data
,
isloading
);
return
res
;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBIZBOOKServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
delete
(
`/ibizbooks/
${
context
.
ibizbook
}
`
,
isloading
);
return
res
;
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBIZBOOKServiceBase
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibizbooks/
${
context
.
ibizbook
}
`
,
isloading
);
return
res
;
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBIZBOOKServiceBase
*/
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/ibizbooks/getdraft`
,
isloading
);
res
.
data
.
ibizbook
=
data
.
ibizbook
;
return
res
;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBIZBOOKServiceBase
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
Http
.
getInstance
().
post
(
`/ibizbooks/
${
context
.
ibizbook
}
/checkkey`
,
data
,
isloading
);
return
res
;
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IBIZBOOKServiceBase
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/ibizbooks/
${
context
.
ibizbook
}
/save`
,
data
,
isloading
);
return
res
;
}
/**
/**
* FetchDefault接口方法
* FetchDefault接口方法
*
*
...
@@ -63,5 +180,8 @@ export default class IBIZBOOKServiceBase extends EntityService {
...
@@ -63,5 +180,8 @@ export default class IBIZBOOKServiceBase extends EntityService {
* @memberof IBIZBOOKServiceBase
* @memberof IBIZBOOKServiceBase
*/
*/
public
async
FetchDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
FetchDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
let
res
:
any
=
Http
.
getInstance
().
get
(
`/ibizbooks/fetchdefault`
,
tempData
,
isloading
);
return
res
;
}
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
config.xml
浏览文件 @
50b75251
...
@@ -37,11 +37,6 @@
...
@@ -37,11 +37,6 @@
git clone -b master $para2 demosys/
git clone -b master $para2 demosys/
export NODE_OPTIONS=--max-old-space-size=4096
export NODE_OPTIONS=--max-old-space-size=4096
cd demosys/
cd demosys/
mvn clean package -Pweb
cd demo-app/demo-app-web
mvn -Pweb docker:build
mvn -Pweb docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/demo-app-web.yaml iBizDemo --with-registry-auth
</command>
</command>
</hudson.tasks.Shell>
</hudson.tasks.Shell>
</builders>
</builders>
...
...
This diff is collapsed.
Click to expand it.
demo-app/demo-app-web/src/main/docker/Dockerfile
浏览文件 @
50b75251
...
@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
...
@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /demo-app-web.jar
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /demo-app-web.jar
EXPOSE
51001
EXPOSE
8080
ADD
demo-app-web.jar /demo-app-web.jar
ADD
demo-app-web.jar /demo-app-web.jar
This diff is collapsed.
Click to expand it.
demo-app/demo-app-web/src/main/docker/demo-app-web.yaml
浏览文件 @
50b75251
...
@@ -3,24 +3,9 @@ services:
...
@@ -3,24 +3,9 @@ services:
demo-app-web
:
demo-app-web
:
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/demo-app-web:latest
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/demo-app-web:latest
ports
:
ports
:
-
"
51001:51001
"
-
"
8080:8080
"
networks
:
networks
:
-
agent_network
-
agent_network
environment
:
-
SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.240.110
-
SERVER_PORT=51001
-
SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.240.110:8848
-
SPRING_REDIS_HOST=172.16.240.110
-
SPRING_REDIS_PORT=6379
-
SPRING_REDIS_DATABASE=0
-
SPRING_DATASOURCE_USERNAME=a_LAB01_df847bdfd
-
SPRING_DATASOURCE_PASSWORD=3d6@460A
-
SPRING_DATASOURCE_URL=jdbc:mysql://172.16.186.185:3306/a_LAB01_df847bdfd?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
-
SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
-
SPRING_DATASOURCE_DEFAULTSCHEMA=a_LAB01_df847bdfd
-
NACOS=172.16.240.110:8848
-
SEATA_REGISTRY_NACOS_SERVER-ADDR=172.16.240.110:8848
-
SEATA_ENABLED=true
deploy
:
deploy
:
resources
:
resources
:
limits
:
limits
:
...
...
This diff is collapsed.
Click to expand it.
demo-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
50b75251
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
<!--输出实体[IBIZBOOK]数据结构 -->
<!--输出实体[IBIZBOOK]数据结构 -->
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibizbook-
68
-2"
>
<changeSet
author=
"a_LAB01_df847bdfd"
id=
"tab-ibizbook-
75
-2"
>
<createTable
tableName=
"T_IBIZBOOK"
>
<createTable
tableName=
"T_IBIZBOOK"
>
<column
name=
"CREATEMAN"
remarks=
""
type=
"VARCHAR(60)"
>
<column
name=
"CREATEMAN"
remarks=
""
type=
"VARCHAR(60)"
>
</column>
</column>
...
...
This diff is collapsed.
Click to expand it.
demo-provider/demo-provider-demoapi/src/main/java/cn/ibizlab/demoapi/rest/IBIZBOOKResource.java
浏览文件 @
50b75251
...
@@ -47,6 +47,117 @@ public class IBIZBOOKResource {
...
@@ -47,6 +47,117 @@ public class IBIZBOOKResource {
@Lazy
@Lazy
public
IBIZBOOKMapping
ibizbookMapping
;
public
IBIZBOOKMapping
ibizbookMapping
;
@PreAuthorize
(
"hasPermission(this.ibizbookMapping.toDomain(#ibizbookdto),'DemoSys-IBIZBOOK-Create')"
)
@ApiOperation
(
value
=
"新建图书"
,
tags
=
{
"图书"
},
notes
=
"新建图书"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibizbooks"
)
public
ResponseEntity
<
IBIZBOOKDTO
>
create
(
@Validated
@RequestBody
IBIZBOOKDTO
ibizbookdto
)
{
IBIZBOOK
domain
=
ibizbookMapping
.
toDomain
(
ibizbookdto
);
ibizbookService
.
create
(
domain
);
IBIZBOOKDTO
dto
=
ibizbookMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.ibizbookMapping.toDomain(#ibizbookdtos),'DemoSys-IBIZBOOK-Create')"
)
@ApiOperation
(
value
=
"批量新建图书"
,
tags
=
{
"图书"
},
notes
=
"批量新建图书"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibizbooks/batch"
)
public
ResponseEntity
<
Boolean
>
createBatch
(
@RequestBody
List
<
IBIZBOOKDTO
>
ibizbookdtos
)
{
ibizbookService
.
createBatch
(
ibizbookMapping
.
toDomain
(
ibizbookdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@VersionCheck
(
entity
=
"ibizbook"
,
versionfield
=
"updatedate"
)
@PreAuthorize
(
"hasPermission(this.ibizbookService.get(#ibizbook_id),'DemoSys-IBIZBOOK-Update')"
)
@ApiOperation
(
value
=
"更新图书"
,
tags
=
{
"图书"
},
notes
=
"更新图书"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/ibizbooks/{ibizbook_id}"
)
public
ResponseEntity
<
IBIZBOOKDTO
>
update
(
@PathVariable
(
"ibizbook_id"
)
String
ibizbook_id
,
@RequestBody
IBIZBOOKDTO
ibizbookdto
)
{
IBIZBOOK
domain
=
ibizbookMapping
.
toDomain
(
ibizbookdto
);
domain
.
setIbizbookid
(
ibizbook_id
);
ibizbookService
.
update
(
domain
);
IBIZBOOKDTO
dto
=
ibizbookMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasPermission(this.ibizbookService.getIbizbookByEntities(this.ibizbookMapping.toDomain(#ibizbookdtos)),'DemoSys-IBIZBOOK-Update')"
)
@ApiOperation
(
value
=
"批量更新图书"
,
tags
=
{
"图书"
},
notes
=
"批量更新图书"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/ibizbooks/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatch
(
@RequestBody
List
<
IBIZBOOKDTO
>
ibizbookdtos
)
{
ibizbookService
.
updateBatch
(
ibizbookMapping
.
toDomain
(
ibizbookdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasPermission(this.ibizbookService.get(#ibizbook_id),'DemoSys-IBIZBOOK-Remove')"
)
@ApiOperation
(
value
=
"删除图书"
,
tags
=
{
"图书"
},
notes
=
"删除图书"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/ibizbooks/{ibizbook_id}"
)
public
ResponseEntity
<
Boolean
>
remove
(
@PathVariable
(
"ibizbook_id"
)
String
ibizbook_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibizbookService
.
remove
(
ibizbook_id
));
}
@PreAuthorize
(
"hasPermission(this.ibizbookService.getIbizbookByIds(#ids),'DemoSys-IBIZBOOK-Remove')"
)
@ApiOperation
(
value
=
"批量删除图书"
,
tags
=
{
"图书"
},
notes
=
"批量删除图书"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/ibizbooks/batch"
)
public
ResponseEntity
<
Boolean
>
removeBatch
(
@RequestBody
List
<
String
>
ids
)
{
ibizbookService
.
removeBatch
(
ids
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PostAuthorize
(
"hasPermission(this.ibizbookMapping.toDomain(returnObject.body),'DemoSys-IBIZBOOK-Get')"
)
@ApiOperation
(
value
=
"获取图书"
,
tags
=
{
"图书"
},
notes
=
"获取图书"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibizbooks/{ibizbook_id}"
)
public
ResponseEntity
<
IBIZBOOKDTO
>
get
(
@PathVariable
(
"ibizbook_id"
)
String
ibizbook_id
)
{
IBIZBOOK
domain
=
ibizbookService
.
get
(
ibizbook_id
);
IBIZBOOKDTO
dto
=
ibizbookMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"获取图书草稿"
,
tags
=
{
"图书"
},
notes
=
"获取图书草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ibizbooks/getdraft"
)
public
ResponseEntity
<
IBIZBOOKDTO
>
getDraft
()
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibizbookMapping
.
toDto
(
ibizbookService
.
getDraft
(
new
IBIZBOOK
())));
}
@ApiOperation
(
value
=
"检查图书"
,
tags
=
{
"图书"
},
notes
=
"检查图书"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibizbooks/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKey
(
@RequestBody
IBIZBOOKDTO
ibizbookdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibizbookService
.
checkKey
(
ibizbookMapping
.
toDomain
(
ibizbookdto
)));
}
@PreAuthorize
(
"hasPermission(this.ibizbookMapping.toDomain(#ibizbookdto),'DemoSys-IBIZBOOK-Save')"
)
@ApiOperation
(
value
=
"保存图书"
,
tags
=
{
"图书"
},
notes
=
"保存图书"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibizbooks/save"
)
public
ResponseEntity
<
Boolean
>
save
(
@RequestBody
IBIZBOOKDTO
ibizbookdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibizbookService
.
save
(
ibizbookMapping
.
toDomain
(
ibizbookdto
)));
}
@PreAuthorize
(
"hasPermission(this.ibizbookMapping.toDomain(#ibizbookdtos),'DemoSys-IBIZBOOK-Save')"
)
@ApiOperation
(
value
=
"批量保存图书"
,
tags
=
{
"图书"
},
notes
=
"批量保存图书"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibizbooks/savebatch"
)
public
ResponseEntity
<
Boolean
>
saveBatch
(
@RequestBody
List
<
IBIZBOOKDTO
>
ibizbookdtos
)
{
ibizbookService
.
saveBatch
(
ibizbookMapping
.
toDomain
(
ibizbookdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZBOOK-searchDefault-all') and hasPermission(#context,'DemoSys-IBIZBOOK-Get')"
)
@ApiOperation
(
value
=
"获取数据集"
,
tags
=
{
"图书"
}
,
notes
=
"获取数据集"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibizbooks/fetchdefault"
)
public
ResponseEntity
<
List
<
IBIZBOOKDTO
>>
fetchDefault
(
IBIZBOOKSearchContext
context
)
{
Page
<
IBIZBOOK
>
domains
=
ibizbookService
.
searchDefault
(
context
)
;
List
<
IBIZBOOKDTO
>
list
=
ibizbookMapping
.
toDto
(
domains
.
getContent
());
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
header
(
"x-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageNumber
()))
.
header
(
"x-per-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageSize
()))
.
header
(
"x-total"
,
String
.
valueOf
(
domains
.
getTotalElements
()))
.
body
(
list
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','DemoSys-IBIZBOOK-searchDefault-all') and hasPermission(#context,'DemoSys-IBIZBOOK-Get')"
)
@ApiOperation
(
value
=
"查询数据集"
,
tags
=
{
"图书"
}
,
notes
=
"查询数据集"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibizbooks/searchdefault"
)
public
ResponseEntity
<
Page
<
IBIZBOOKDTO
>>
searchDefault
(
@RequestBody
IBIZBOOKSearchContext
context
)
{
Page
<
IBIZBOOK
>
domains
=
ibizbookService
.
searchDefault
(
context
)
;
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
ibizbookMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
}
}
This diff is collapsed.
Click to expand it.
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录