Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibznotify
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibznotify
提交
118fae27
提交
118fae27
编写于
8月 06, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibiz4j 发布系统代码
上级
a52ec714
变更
10
显示空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
489 行增加
和
13 行删除
+489
-13
msg-open-access_en_US.ts
.../lanres/entities/msg-open-access/msg-open-access_en_US.ts
+1
-0
msg-open-access_zh_CN.ts
.../lanres/entities/msg-open-access/msg-open-access_zh_CN.ts
+1
-0
msg-open-accesss.ts
app_web/src/mock/entity/msg-open-accesss/msg-open-accesss.ts
+214
-9
msg-open-access-service-base.ts
...c/service/msg-open-access/msg-open-access-service-base.ts
+120
-0
pickup-viewpickupviewpanel-pickupviewpanel-model.ts
...panel/pickup-viewpickupviewpanel-pickupviewpanel-model.ts
+3
-0
MsgOpenAccess.java
...ain/java/cn/ibizlab/core/notify/domain/MsgOpenAccess.java
+16
-0
h2_table.xml
ibznotify-core/src/main/resources/liquibase/h2_table.xml
+3
-1
MsgOpenAccessMapper.xml
...urces/mapper/notify/msgopenaccess/MsgOpenAccessMapper.xml
+3
-3
MsgOpenAccessDTO.java
...pi/src/main/java/cn/ibizlab/api/dto/MsgOpenAccessDTO.java
+16
-0
MsgOpenAccessResource.java
.../main/java/cn/ibizlab/api/rest/MsgOpenAccessResource.java
+112
-0
未找到文件。
app_web/src/locale/lanres/entities/msg-open-access/msg-open-access_en_US.ts
浏览文件 @
118fae27
...
...
@@ -9,6 +9,7 @@ export default {
region_id
:
"RegionId"
,
access_token
:
"管理账号token"
,
expires_time
:
"管理账号token过期时间"
,
disabled
:
"是否禁用"
,
},
views
:
{
editview
:
{
...
...
app_web/src/locale/lanres/entities/msg-open-access/msg-open-access_zh_CN.ts
浏览文件 @
118fae27
...
...
@@ -8,6 +8,7 @@ export default {
region_id
:
"RegionId"
,
access_token
:
"管理账号token"
,
expires_time
:
"管理账号token过期时间"
,
disabled
:
"是否禁用"
,
},
views
:
{
editview
:
{
...
...
app_web/src/mock/entity/msg-open-accesss/msg-open-accesss.ts
浏览文件 @
118fae27
...
...
@@ -114,16 +114,165 @@ mock.onGet(new RegExp(/^\/msgopenaccesses\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).r
console
.
groupEnd
();
return
[
status
,
_items
];
});
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// URI参数传递情况未实现
// Create
mock
.
onPost
(
new
RegExp
(
/^
\/
msgopenaccesses
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msgopenaccess 方法: Create"
);
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
]
});
});
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
mockDatas
[
0
]);
console
.
groupEnd
();
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
)
=>
{
console
.
groupCollapsed
(
"实体:msgopenaccess 方法: GetDraft"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
// GetDraft
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
({});
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
{}];
});
// CheckKey
mock
.
onPost
(
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})\/
checkkey$/
).
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
];
});
// 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})\/
save$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
Object
.
defineProperty
(
tempValue
,
item
,
{
enumerable
:
true
,
value
:
matchArray
[
index
+
1
]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.id, tempValue.id));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'id'
]
==
tempValue
[
'id'
]
){
for
(
let
value
in
data
){
if
(
item
.
hasOwnProperty
(
value
)){
item
[
value
]
=
data
[
value
];
}
}
}
})
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
data
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
data
];
});
// FetchDefault
mock
.
onGet
(
new
RegExp
(
/^
\/
msgopenaccesses
\/
selec
t$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onGet
(
new
RegExp
(
/^
\/
msgopenaccesses
\/
fetchdefaul
t$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msgopenaccess 方法: FetchDefault"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
...
...
@@ -138,7 +287,7 @@ mock.onGet(new RegExp(/^\/msgopenaccesses\/select$/)).reply((config: any) => {
});
// FetchDefault
mock
.
onGet
(
new
RegExp
(
/^
\/
msgopenaccesses
\/
selec
t
(\?[\w
-.
/
?%&=,
]
*
)
*$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onGet
(
new
RegExp
(
/^
\/
msgopenaccesses
\/
fetchdefaul
t
(\?[\w
-.
/
?%&=,
]
*
)
*$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:msgopenaccess 方法: FetchDefault"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
if
(
config
.
url
.
includes
(
'page'
)){
...
...
@@ -173,3 +322,59 @@ mock.onGet(new RegExp(/^\/msgopenaccesses\/select(\?[\w-./?%&=,]*)*$/)).reply((c
// URI参数传递情况未实现
// URI参数传递情况未实现
// Remove
mock
.
onDelete
(
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
)
{
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
));
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
?
_items
:{});
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
?
_items
:{}];
});
// 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
)
{
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
));
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
_items
?
_items
:{});
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
_items
?
_items
:{}];
});
app_web/src/service/msg-open-access/msg-open-access-service-base.ts
浏览文件 @
118fae27
...
...
@@ -53,6 +53,123 @@ export default class MsgOpenAccessServiceBase extends EntityService {
return
res
;
}
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MsgOpenAccessServiceBase
*/
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
(
`/msgopenaccesses`
,
data
,
isloading
);
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接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MsgOpenAccessServiceBase
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/msgopenaccesses/
${
context
.
msgopenaccess
}
`
,
isloading
);
return
res
;
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MsgOpenAccessServiceBase
*/
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/msgopenaccesses/getdraft`
,
isloading
);
res
.
data
.
msgopenaccess
=
data
.
msgopenaccess
;
return
res
;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @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
);
return
res
;
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof MsgOpenAccessServiceBase
*/
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
(
`/msgopenaccesses/
${
context
.
msgopenaccess
}
/save`
,
data
,
isloading
);
return
res
;
}
/**
* FetchDefault接口方法
*
...
...
@@ -63,5 +180,8 @@ export default class MsgOpenAccessServiceBase extends EntityService {
* @memberof MsgOpenAccessServiceBase
*/
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
(
`/msgopenaccesses/fetchdefault`
,
tempData
,
isloading
);
return
res
;
}
}
\ No newline at end of file
app_web/src/widgets/msg-open-access/pickup-viewpickupviewpanel-pickupviewpanel/pickup-viewpickupviewpanel-pickupviewpanel-model.ts
浏览文件 @
118fae27
...
...
@@ -39,6 +39,9 @@ export default class PickupViewpickupviewpanelModel {
{
name
:
'expires_time'
,
},
{
name
:
'disabled'
,
},
]
}
...
...
ibznotify-core/src/main/java/cn/ibizlab/core/notify/domain/MsgOpenAccess.java
浏览文件 @
118fae27
...
...
@@ -105,6 +105,14 @@ public class MsgOpenAccess extends EntityMP implements Serializable {
@JSONField
(
name
=
"expires_time"
,
format
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonProperty
(
"expires_time"
)
private
Timestamp
expiresTime
;
/**
* 是否禁用
*/
@DEField
(
defaultValue
=
"0"
)
@TableField
(
value
=
"disabled"
)
@JSONField
(
name
=
"disabled"
)
@JsonProperty
(
"disabled"
)
private
Integer
disabled
;
...
...
@@ -174,6 +182,14 @@ public class MsgOpenAccess extends EntityMP implements Serializable {
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
return
sdf
.
format
(
expiresTime
);
}
/**
* 设置 [是否禁用]
*/
public
void
setDisabled
(
Integer
disabled
){
this
.
disabled
=
disabled
;
this
.
modify
(
"disabled"
,
disabled
);
}
}
...
...
ibznotify-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
118fae27
...
...
@@ -4,7 +4,7 @@
<!--输出实体[MSG_OPEN_ACCESS]数据结构 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-msg_open_access-2
1
-1"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-msg_open_access-2
4
-1"
>
<createTable
tableName=
"IBZOPENACCESS"
>
<column
name=
"ACCESSID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_MSG_OPEN_ACCESS_ACCESSID"
/>
...
...
@@ -23,6 +23,8 @@
</column>
<column
name=
"EXPIRES_TIME"
remarks=
""
type=
"DATETIME"
>
</column>
<column
name=
"DISABLED"
remarks=
""
type=
"INT"
>
</column>
</createTable>
</changeSet>
...
...
ibznotify-core/src/main/resources/mapper/notify/msgopenaccess/MsgOpenAccessMapper.xml
浏览文件 @
118fae27
...
...
@@ -5,7 +5,7 @@
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select
id=
"selectById"
resultMap=
"MsgOpenAccessResultMap"
databaseId=
"mysql"
>
<![CDATA[select t1.* from (SELECT t1.`ACCESSID`, t1.`ACCESSNAME`, t1.`ACCESS_KEY`, t1.`ACCESS_TOKEN`, t1.`EXPIRES_TIME`, t1.`OPEN_TYPE`, t1.`REGION_ID`, t1.`SECRET_KEY` FROM `IBZOPENACCESS` t1 ) t1 where accessid=#{id}]]>
<![CDATA[select t1.* from (SELECT t1.`ACCESSID`, t1.`ACCESSNAME`, t1.`ACCESS_KEY`, t1.`ACCESS_TOKEN`, t1.`
DISABLED`, t1.`
EXPIRES_TIME`, t1.`OPEN_TYPE`, t1.`REGION_ID`, t1.`SECRET_KEY` FROM `IBZOPENACCESS` t1 ) t1 where accessid=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
...
...
@@ -34,12 +34,12 @@
<!--数据查询[Default]-->
<sql
id=
"Default"
databaseId=
"mysql"
>
<![CDATA[ SELECT t1.`ACCESSID`, t1.`ACCESSNAME`, t1.`ACCESS_KEY`, t1.`ACCESS_TOKEN`, t1.`EXPIRES_TIME`, t1.`OPEN_TYPE`, t1.`REGION_ID`, t1.`SECRET_KEY` FROM `IBZOPENACCESS` t1
<![CDATA[ SELECT t1.`ACCESSID`, t1.`ACCESSNAME`, t1.`ACCESS_KEY`, t1.`ACCESS_TOKEN`, t1.`
DISABLED`, t1.`
EXPIRES_TIME`, t1.`OPEN_TYPE`, t1.`REGION_ID`, t1.`SECRET_KEY` FROM `IBZOPENACCESS` t1
]]>
</sql>
<!--数据查询[View]-->
<sql
id=
"View"
databaseId=
"mysql"
>
<![CDATA[ SELECT t1.`ACCESSID`, t1.`ACCESSNAME`, t1.`ACCESS_KEY`, t1.`ACCESS_TOKEN`, t1.`EXPIRES_TIME`, t1.`OPEN_TYPE`, t1.`REGION_ID`, t1.`SECRET_KEY` FROM `IBZOPENACCESS` t1
<![CDATA[ SELECT t1.`ACCESSID`, t1.`ACCESSNAME`, t1.`ACCESS_KEY`, t1.`ACCESS_TOKEN`, t1.`
DISABLED`, t1.`
EXPIRES_TIME`, t1.`OPEN_TYPE`, t1.`REGION_ID`, t1.`SECRET_KEY` FROM `IBZOPENACCESS` t1
]]>
</sql>
</mapper>
...
...
ibznotify-provider/ibznotify-provider-api/src/main/java/cn/ibizlab/api/dto/MsgOpenAccessDTO.java
浏览文件 @
118fae27
...
...
@@ -89,6 +89,14 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable {
@JsonProperty
(
"expires_time"
)
private
Timestamp
expiresTime
;
/**
* 属性 [DISABLED]
*
*/
@JSONField
(
name
=
"disabled"
)
@JsonProperty
(
"disabled"
)
private
Integer
disabled
;
/**
* 设置 [ACCESSNAME]
...
...
@@ -146,6 +154,14 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable {
this
.
modify
(
"expires_time"
,
expiresTime
);
}
/**
* 设置 [DISABLED]
*/
public
void
setDisabled
(
Integer
disabled
){
this
.
disabled
=
disabled
;
this
.
modify
(
"disabled"
,
disabled
);
}
}
ibznotify-provider/ibznotify-provider-api/src/main/java/cn/ibizlab/api/rest/MsgOpenAccessResource.java
浏览文件 @
118fae27
...
...
@@ -47,5 +47,117 @@ public class MsgOpenAccessResource {
@Lazy
public
MsgOpenAccessMapping
msgopenaccessMapping
;
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgOpenAccess-Create-all')"
)
@ApiOperation
(
value
=
"新建接入开放平台"
,
tags
=
{
"接入开放平台"
},
notes
=
"新建接入开放平台"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/msgopenaccesses"
)
@Transactional
public
ResponseEntity
<
MsgOpenAccessDTO
>
create
(
@RequestBody
MsgOpenAccessDTO
msgopenaccessdto
)
{
MsgOpenAccess
domain
=
msgopenaccessMapping
.
toDomain
(
msgopenaccessdto
);
msgopenaccessService
.
create
(
domain
);
MsgOpenAccessDTO
dto
=
msgopenaccessMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgOpenAccess-Create-all')"
)
@ApiOperation
(
value
=
"批量新建接入开放平台"
,
tags
=
{
"接入开放平台"
},
notes
=
"批量新建接入开放平台"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/msgopenaccesses/batch"
)
public
ResponseEntity
<
Boolean
>
createBatch
(
@RequestBody
List
<
MsgOpenAccessDTO
>
msgopenaccessdtos
)
{
msgopenaccessService
.
createBatch
(
msgopenaccessMapping
.
toDomain
(
msgopenaccessdtos
));
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}"
)
@Transactional
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
);
}
@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}"
)
@Transactional
public
ResponseEntity
<
Boolean
>
remove
(
@PathVariable
(
"msgopenaccess_id"
)
String
msgopenaccess_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
msgopenaccessService
.
remove
(
msgopenaccess_id
));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgOpenAccess-Remove-all')"
)
@ApiOperation
(
value
=
"批量删除接入开放平台"
,
tags
=
{
"接入开放平台"
},
notes
=
"批量删除接入开放平台"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/msgopenaccesses/batch"
)
public
ResponseEntity
<
Boolean
>
removeBatch
(
@RequestBody
List
<
String
>
ids
)
{
msgopenaccessService
.
removeBatch
(
ids
);
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
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"获取接入开放平台草稿"
,
tags
=
{
"接入开放平台"
},
notes
=
"获取接入开放平台草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/msgopenaccesses/getdraft"
)
public
ResponseEntity
<
MsgOpenAccessDTO
>
getDraft
()
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
msgopenaccessMapping
.
toDto
(
msgopenaccessService
.
getDraft
(
new
MsgOpenAccess
())));
}
@ApiOperation
(
value
=
"检查接入开放平台"
,
tags
=
{
"接入开放平台"
},
notes
=
"检查接入开放平台"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/msgopenaccesses/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKey
(
@RequestBody
MsgOpenAccessDTO
msgopenaccessdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
msgopenaccessService
.
checkKey
(
msgopenaccessMapping
.
toDomain
(
msgopenaccessdto
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgOpenAccess-Save-all')"
)
@ApiOperation
(
value
=
"保存接入开放平台"
,
tags
=
{
"接入开放平台"
},
notes
=
"保存接入开放平台"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/msgopenaccesses/save"
)
public
ResponseEntity
<
Boolean
>
save
(
@RequestBody
MsgOpenAccessDTO
msgopenaccessdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
msgopenaccessService
.
save
(
msgopenaccessMapping
.
toDomain
(
msgopenaccessdto
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgOpenAccess-Save-all')"
)
@ApiOperation
(
value
=
"批量保存接入开放平台"
,
tags
=
{
"接入开放平台"
},
notes
=
"批量保存接入开放平台"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/msgopenaccesses/savebatch"
)
public
ResponseEntity
<
Boolean
>
saveBatch
(
@RequestBody
List
<
MsgOpenAccessDTO
>
msgopenaccessdtos
)
{
msgopenaccessService
.
saveBatch
(
msgopenaccessMapping
.
toDomain
(
msgopenaccessdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgOpenAccess-searchDefault-all')"
)
@ApiOperation
(
value
=
"获取DEFAULT"
,
tags
=
{
"接入开放平台"
}
,
notes
=
"获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/msgopenaccesses/fetchdefault"
)
public
ResponseEntity
<
List
<
MsgOpenAccessDTO
>>
fetchDefault
(
MsgOpenAccessSearchContext
context
)
{
Page
<
MsgOpenAccess
>
domains
=
msgopenaccessService
.
searchDefault
(
context
)
;
List
<
MsgOpenAccessDTO
>
list
=
msgopenaccessMapping
.
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','ibznotify-MsgOpenAccess-searchDefault-all')"
)
@ApiOperation
(
value
=
"查询DEFAULT"
,
tags
=
{
"接入开放平台"
}
,
notes
=
"查询DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/msgopenaccesses/searchdefault"
)
public
ResponseEntity
<
Page
<
MsgOpenAccessDTO
>>
searchDefault
(
@RequestBody
MsgOpenAccessSearchContext
context
)
{
Page
<
MsgOpenAccess
>
domains
=
msgopenaccessService
.
searchDefault
(
context
)
;
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
msgopenaccessMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
}
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录