Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzuaa
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzuaa
提交
b6d3eb21
提交
b6d3eb21
编写于
6月 30, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibiz4j 发布系统代码
上级
95b79a19
变更
47
展开全部
显示空白字符变更
内嵌
并排
正在显示
47 个修改的文件
包含
1749 行增加
和
1538 行删除
+1749
-1538
sys-apps.ts
app_web/src/mock/entity/sys-apps/sys-apps.ts
+34
-34
sys-auth-logs.ts
app_web/src/mock/entity/sys-auth-logs/sys-auth-logs.ts
+24
-24
sys-permissions.ts
app_web/src/mock/entity/sys-permissions/sys-permissions.ts
+38
-38
sys-role-permissions.ts
.../mock/entity/sys-role-permissions/sys-role-permissions.ts
+108
-108
sys-roles.ts
app_web/src/mock/entity/sys-roles/sys-roles.ts
+50
-50
sys-user-roles.ts
app_web/src/mock/entity/sys-user-roles/sys-user-roles.ts
+92
-92
sys-users.ts
app_web/src/mock/entity/sys-users/sys-users.ts
+42
-42
sys-permissionmpickup-view-base.vue
...ermissionmpickup-view/sys-permissionmpickup-view-base.vue
+11
-2
sys-role-permissionmpickup-view-base.vue
...sionmpickup-view/sys-role-permissionmpickup-view-base.vue
+11
-2
sys-rolempickup-view-base.vue
...es/uaa/sys-rolempickup-view/sys-rolempickup-view-base.vue
+11
-2
sys-user-rolempickup-view-base.vue
...-user-rolempickup-view/sys-user-rolempickup-view-base.vue
+11
-2
sys-usermpickup-view-base.vue
...es/uaa/sys-usermpickup-view/sys-usermpickup-view-base.vue
+11
-2
sys-app-service-base.ts
app_web/src/service/sys-app/sys-app-service-base.ts
+33
-33
sys-auth-log-service-base.ts
...web/src/service/sys-auth-log/sys-auth-log-service-base.ts
+22
-22
sys-permission-service-base.ts
...src/service/sys-permission/sys-permission-service-base.ts
+59
-59
sys-role-permission-service-base.ts
...e/sys-role-permission/sys-role-permission-service-base.ts
+73
-73
sys-role-service-base.ts
app_web/src/service/sys-role/sys-role-service-base.ts
+61
-61
sys-user-role-service-base.ts
...b/src/service/sys-user-role/sys-user-role-service-base.ts
+65
-65
sys-user-service-base.ts
app_web/src/service/sys-user/sys-user-service-base.ts
+42
-42
SysPSSystemServiceEx.java
...ibizlab/core/extensions.service/SysPSSystemServiceEx.java
+45
-0
SysPSSystemMapper.java
...in/java/cn/ibizlab/core/uaa/mapper/SysPSSystemMapper.java
+1
-1
ISysAppService.java
...main/java/cn/ibizlab/core/uaa/service/ISysAppService.java
+6
-6
ISysAuthLogService.java
.../java/cn/ibizlab/core/uaa/service/ISysAuthLogService.java
+4
-4
ISysPSSystemService.java
...java/cn/ibizlab/core/uaa/service/ISysPSSystemService.java
+8
-6
ISysPermissionService.java
...va/cn/ibizlab/core/uaa/service/ISysPermissionService.java
+8
-8
ISysRolePermissionService.java
...n/ibizlab/core/uaa/service/ISysRolePermissionService.java
+5
-5
ISysRoleService.java
...ain/java/cn/ibizlab/core/uaa/service/ISysRoleService.java
+6
-6
ISysUserRoleService.java
...java/cn/ibizlab/core/uaa/service/ISysUserRoleService.java
+4
-4
ISysUserService.java
...ain/java/cn/ibizlab/core/uaa/service/ISysUserService.java
+7
-7
SysAppServiceImpl.java
...a/cn/ibizlab/core/uaa/service/impl/SysAppServiceImpl.java
+24
-24
SysAuthLogServiceImpl.java
.../ibizlab/core/uaa/service/impl/SysAuthLogServiceImpl.java
+20
-20
SysPSSystemServiceImpl.java
...ibizlab/core/uaa/service/impl/SysPSSystemServiceImpl.java
+49
-35
SysPermissionServiceImpl.java
...izlab/core/uaa/service/impl/SysPermissionServiceImpl.java
+44
-44
SysRolePermissionServiceImpl.java
...b/core/uaa/service/impl/SysRolePermissionServiceImpl.java
+39
-39
SysRoleServiceImpl.java
.../cn/ibizlab/core/uaa/service/impl/SysRoleServiceImpl.java
+38
-38
SysUserRoleServiceImpl.java
...ibizlab/core/uaa/service/impl/SysUserRoleServiceImpl.java
+21
-21
SysUserServiceImpl.java
.../cn/ibizlab/core/uaa/service/impl/SysUserServiceImpl.java
+26
-26
h2_table.xml
ibzuaa-core/src/main/resources/liquibase/h2_table.xml
+1
-1
systemResource.json
...aa-core/src/main/resources/permission/systemResource.json
+7
-7
SysAppResource.java
...api/src/main/java/cn/ibizlab/api/rest/SysAppResource.java
+45
-45
SysAuthLogResource.java
...src/main/java/cn/ibizlab/api/rest/SysAuthLogResource.java
+29
-29
SysPermissionResource.java
.../main/java/cn/ibizlab/api/rest/SysPermissionResource.java
+52
-52
SysRolePermissionResource.java
...n/java/cn/ibizlab/api/rest/SysRolePermissionResource.java
+161
-161
SysRoleResource.java
...pi/src/main/java/cn/ibizlab/api/rest/SysRoleResource.java
+40
-40
SysUserResource.java
...pi/src/main/java/cn/ibizlab/api/rest/SysUserResource.java
+41
-41
SysUserRoleResource.java
...rc/main/java/cn/ibizlab/api/rest/SysUserRoleResource.java
+101
-101
AuthPermissionEvaluator.java
...ava/cn/ibizlab/util/security/AuthPermissionEvaluator.java
+119
-14
未找到文件。
app_web/src/mock/entity/sys-apps/sys-apps.ts
浏览文件 @
b6d3eb21
...
@@ -115,16 +115,42 @@ mock.onGet(new RegExp(/^\/sysapps\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((co
...
@@ -115,16 +115,42 @@ mock.onGet(new RegExp(/^\/sysapps\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((co
return
[
status
,
_items
];
return
[
status
,
_items
];
});
});
//
Sav
e
//
Creat
e
mock
.
onPost
(
new
RegExp
(
/^
\/
sysapps
\/?([
a-zA-Z0-9
\-\;]{0,35})
\/
save
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onPost
(
new
RegExp
(
/^
\/
sysapps
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:sysapp 方法:
Sav
e"
);
console
.
groupCollapsed
(
"实体:sysapp 方法:
Creat
e"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
sysapps
\/([
a-zA-Z0-9
\-\;]{1,35})\/
save$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
sysapps
\/([
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
(
/^
\/
sysapps
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:sysapp 方法: 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
(
/^
\/
sysapps
\/([
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
)
=>
{
...
@@ -207,16 +233,16 @@ mock.onPost(new RegExp(/^\/sysapps\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply
...
@@ -207,16 +233,16 @@ mock.onPost(new RegExp(/^\/sysapps\/?([a-zA-Z0-9\-\;]{0,35})\/checkkey$/)).reply
return
[
status
,
data
];
return
[
status
,
data
];
});
});
//
Updat
e
//
Sav
e
mock
.
onP
ut
(
new
RegExp
(
/^
\/
sysapps
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onP
ost
(
new
RegExp
(
/^
\/
sysapps
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
save
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:sysapp 方法:
Updat
e"
);
console
.
groupCollapsed
(
"实体:sysapp 方法:
Sav
e"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
paramArray
:
Array
<
any
>
=
[
'id'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
sysapps
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
sysapps
\/([
a-zA-Z0-9
\-\;]{1,35})
\/
save
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -245,32 +271,6 @@ mock.onPut(new RegExp(/^\/sysapps\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: a
...
@@ -245,32 +271,6 @@ mock.onPut(new RegExp(/^\/sysapps\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: a
return
[
status
,
data
];
return
[
status
,
data
];
});
});
// Create
mock
.
onPost
(
new
RegExp
(
/^
\/
sysapps
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:sysapp 方法: 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
(
/^
\/
sysapps
\/([
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
]];
});
// FetchDefault
// FetchDefault
mock
.
onGet
(
new
RegExp
(
/^
\/
sysapps
\/
fetchdefault$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onGet
(
new
RegExp
(
/^
\/
sysapps
\/
fetchdefault$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:sysapp 方法: FetchDefault"
);
console
.
groupCollapsed
(
"实体:sysapp 方法: FetchDefault"
);
...
...
app_web/src/mock/entity/sys-auth-logs/sys-auth-logs.ts
浏览文件 @
b6d3eb21
...
@@ -115,20 +115,30 @@ mock.onGet(new RegExp(/^\/sysauthlogs\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply
...
@@ -115,20 +115,30 @@ mock.onGet(new RegExp(/^\/sysauthlogs\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply
return
[
status
,
_items
];
return
[
status
,
_items
];
});
});
//
GetDraft
//
Create
mock
.
on
Get
(
new
RegExp
(
/^
\/
sysauthlogs
\/
getdraft
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
on
Post
(
new
RegExp
(
/^
\/
sysauthlogs
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:sysauthlog 方法:
GetDraft
"
);
console
.
groupCollapsed
(
"实体:sysauthlog 方法:
Create
"
);
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
>
=
[
'logid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
sysauthlogs
\/([
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
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
{}
);
console
.
table
(
mockDatas
[
0
]
);
console
.
groupEnd
();
console
.
groupEnd
();
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
{}
];
return
[
status
,
mockDatas
[
0
]
];
});
});
// Update
// Update
...
@@ -169,30 +179,20 @@ mock.onPut(new RegExp(/^\/sysauthlogs\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((confi
...
@@ -169,30 +179,20 @@ mock.onPut(new RegExp(/^\/sysauthlogs\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((confi
return
[
status
,
data
];
return
[
status
,
data
];
});
});
//
Create
//
GetDraft
mock
.
on
Post
(
new
RegExp
(
/^
\/
sysauthlogs
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
on
Get
(
new
RegExp
(
/^
\/
sysauthlogs
\/
getdraft
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:sysauthlog 方法:
Create
"
);
console
.
groupCollapsed
(
"实体:sysauthlog 方法:
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
>
=
[
'logid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
sysauthlogs
\/([
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
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
mockDatas
[
0
]
);
console
.
table
(
{}
);
console
.
groupEnd
();
console
.
groupEnd
();
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
mockDatas
[
0
]
];
return
[
status
,
{}
];
});
});
// CheckKey
// CheckKey
...
...
app_web/src/mock/entity/sys-permissions/sys-permissions.ts
浏览文件 @
b6d3eb21
...
@@ -115,16 +115,42 @@ mock.onGet(new RegExp(/^\/syspermissions\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).re
...
@@ -115,16 +115,42 @@ mock.onGet(new RegExp(/^\/syspermissions\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).re
return
[
status
,
_items
];
return
[
status
,
_items
];
});
});
//
Sav
e
//
Creat
e
mock
.
onPost
(
new
RegExp
(
/^
\/
syspermissions
\/?([
a-zA-Z0-9
\-\;]{0,35})
\/
save
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onPost
(
new
RegExp
(
/^
\/
syspermissions
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:syspermission 方法:
Sav
e"
);
console
.
groupCollapsed
(
"实体:syspermission 方法:
Creat
e"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'permissionid'
];
const
paramArray
:
Array
<
any
>
=
[
'permissionid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
syspermissions
\/([
a-zA-Z0-9
\-\;]{1,35})\/
save$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
syspermissions
\/([
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
(
/^
\/
syspermissions
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:syspermission 方法: 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
>
=
[
'permissionid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
syspermissions
\/([
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
)
=>
{
...
@@ -169,16 +195,16 @@ mock.onGet(new RegExp(/^\/syspermissions\/getdraft$/)).reply((config: any) => {
...
@@ -169,16 +195,16 @@ mock.onGet(new RegExp(/^\/syspermissions\/getdraft$/)).reply((config: any) => {
return
[
status
,
{}];
return
[
status
,
{}];
});
});
//
Update
//
CheckKey
mock
.
onP
ut
(
new
RegExp
(
/^
\/
syspermissions
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onP
ost
(
new
RegExp
(
/^
\/
syspermissions
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:syspermission 方法:
Update
"
);
console
.
groupCollapsed
(
"实体:syspermission 方法:
CheckKey
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'permissionid'
];
const
paramArray
:
Array
<
any
>
=
[
'permissionid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
syspermissions
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
syspermissions
\/([
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
)
=>
{
...
@@ -207,42 +233,16 @@ mock.onPut(new RegExp(/^\/syspermissions\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((co
...
@@ -207,42 +233,16 @@ mock.onPut(new RegExp(/^\/syspermissions\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((co
return
[
status
,
data
];
return
[
status
,
data
];
});
});
// Create
// Save
mock
.
onPost
(
new
RegExp
(
/^
\/
syspermissions
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onPost
(
new
RegExp
(
/^
\/
syspermissions
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
save$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:syspermission 方法: Create"
);
console
.
groupCollapsed
(
"实体:syspermission 方法: 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
>
=
[
'permissionid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
syspermissions
\/([
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
]];
});
// CheckKey
mock
.
onPost
(
new
RegExp
(
/^
\/
syspermissions
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:syspermission 方法: CheckKey"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'permissionid'
];
const
paramArray
:
Array
<
any
>
=
[
'permissionid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
syspermissions
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
syspermissions
\/([
a-zA-Z0-9
\-\;]{1,35})\/
save
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
...
app_web/src/mock/entity/sys-role-permissions/sys-role-permissions.ts
浏览文件 @
b6d3eb21
此差异已折叠。
点击以展开。
app_web/src/mock/entity/sys-roles/sys-roles.ts
浏览文件 @
b6d3eb21
...
@@ -115,16 +115,16 @@ mock.onGet(new RegExp(/^\/sysroles\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((c
...
@@ -115,16 +115,16 @@ mock.onGet(new RegExp(/^\/sysroles\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((c
return
[
status
,
_items
];
return
[
status
,
_items
];
});
});
//
Sav
e
//
Creat
e
mock
.
onPost
(
new
RegExp
(
/^
\/
sysroles
\/?([
a-zA-Z0-9
\-\;]{0,35})
\/
save
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onPost
(
new
RegExp
(
/^
\/
sysroles
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:sysrole 方法:
Sav
e"
);
console
.
groupCollapsed
(
"实体:sysrole 方法:
Creat
e"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'roleid'
];
const
paramArray
:
Array
<
any
>
=
[
'roleid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
sysroles
\/([
a-zA-Z0-9
\-\;]{1,35})
\/
save
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
sysroles
\/([
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
)
=>
{
...
@@ -134,23 +134,11 @@ mock.onPost(new RegExp(/^\/sysroles\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((c
...
@@ -134,23 +134,11 @@ mock.onPost(new RegExp(/^\/sysroles\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((c
});
});
});
});
}
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.roleid, tempValue.roleid));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'roleid'
]
==
tempValue
[
'roleid'
]
){
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
(
mockDatas
[
0
]
);
console
.
groupEnd
();
console
.
groupEnd
();
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
data
];
return
[
status
,
mockDatas
[
0
]
];
});
});
// Update
// Update
...
@@ -191,16 +179,32 @@ mock.onPut(new RegExp(/^\/sysroles\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config:
...
@@ -191,16 +179,32 @@ mock.onPut(new RegExp(/^\/sysroles\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config:
return
[
status
,
data
];
return
[
status
,
data
];
});
});
// Create
// GetDraft
mock
.
onPost
(
new
RegExp
(
/^
\/
sysroles
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onGet
(
new
RegExp
(
/^
\/
sysroles
\/
getdraft$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:sysrole 方法: Create"
);
console
.
groupCollapsed
(
"实体:sysrole 方法: 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
(
/^
\/
sysroles
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:sysrole 方法: CheckKey"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'roleid'
];
const
paramArray
:
Array
<
any
>
=
[
'roleid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
sysroles
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
sysroles
\/([
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
)
=>
{
...
@@ -210,39 +214,35 @@ mock.onPost(new RegExp(/^\/sysroles\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config:
...
@@ -210,39 +214,35 @@ mock.onPost(new RegExp(/^\/sysroles\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config:
});
});
});
});
}
}
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
//let items = mockDatas ? mockDatas : [];
console
.
table
(
mockDatas
[
0
]);
//let _items = items.find((item: any) => Object.is(item.roleid, tempValue.roleid));
console
.
groupEnd
();
let
data
=
JSON
.
parse
(
config
.
data
);
console
.
groupEnd
();
mockDatas
.
forEach
((
item
)
=>
{
return
[
status
,
mockDatas
[
0
]];
if
(
item
[
'roleid'
]
==
tempValue
[
'roleid'
]
){
});
for
(
let
value
in
data
){
if
(
item
.
hasOwnProperty
(
value
)){
// GetDraft
item
[
value
]
=
data
[
value
];
mock
.
onGet
(
new
RegExp
(
/^
\/
sysroles
\/
getdraft$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:sysrole 方法: 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
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
{}
);
console
.
table
(
data
);
console
.
groupEnd
();
console
.
groupEnd
();
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
{}
];
return
[
status
,
data
];
});
});
//
CheckKey
//
Save
mock
.
onPost
(
new
RegExp
(
/^
\/
sysroles
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onPost
(
new
RegExp
(
/^
\/
sysroles
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
save
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:sysrole 方法:
CheckKey
"
);
console
.
groupCollapsed
(
"实体:sysrole 方法:
Save
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
return
[
status
,
null
];
return
[
status
,
null
];
}
}
const
paramArray
:
Array
<
any
>
=
[
'roleid'
];
const
paramArray
:
Array
<
any
>
=
[
'roleid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
sysroles
\/([
a-zA-Z0-9
\-\;]{1,35})\/
checkkey
$/
).
exec
(
config
.
url
);
const
matchArray
:
any
=
new
RegExp
(
/^
\/
sysroles
\/([
a-zA-Z0-9
\-\;]{1,35})\/
save
$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
...
@@ -323,9 +323,9 @@ mock.onGet(new RegExp(/^\/sysroles\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((co
...
@@ -323,9 +323,9 @@ mock.onGet(new RegExp(/^\/sysroles\/fetchdefault(\?[\w-./?%&=,]*)*$/)).reply((co
// URI参数传递情况未实现
// URI参数传递情况未实现
//
Get
//
Remove
mock
.
on
Get
(
new
RegExp
(
/^
\/
sysroles
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
on
Delete
(
new
RegExp
(
/^
\/
sysroles
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:sysrole 方法:
Get
"
);
console
.
groupCollapsed
(
"实体:sysrole 方法:
Remove
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
...
@@ -351,9 +351,9 @@ mock.onGet(new RegExp(/^\/sysroles\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: a
...
@@ -351,9 +351,9 @@ mock.onGet(new RegExp(/^\/sysroles\/([a-zA-Z0-9\-\;]{1,35})$/)).reply((config: a
return
[
status
,
_items
?
_items
:{}];
return
[
status
,
_items
?
_items
:{}];
});
});
//
Remove
//
Get
mock
.
on
Delete
(
new
RegExp
(
/^
\/
sysroles
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
on
Get
(
new
RegExp
(
/^
\/
sysroles
\/([
a-zA-Z0-9
\-\;]{1,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:sysrole 方法:
Remove
"
);
console
.
groupCollapsed
(
"实体:sysrole 方法:
Get
"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
if
(
status
!==
200
)
{
...
...
app_web/src/mock/entity/sys-user-roles/sys-user-roles.ts
浏览文件 @
b6d3eb21
此差异已折叠。
点击以展开。
app_web/src/mock/entity/sys-users/sys-users.ts
浏览文件 @
b6d3eb21
...
@@ -115,6 +115,32 @@ mock.onGet(new RegExp(/^\/sysusers\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((c
...
@@ -115,6 +115,32 @@ mock.onGet(new RegExp(/^\/sysusers\/([a-zA-Z0-9\-\;]{1,35})\/select$/)).reply((c
return
[
status
,
_items
];
return
[
status
,
_items
];
});
});
// Create
mock
.
onPost
(
new
RegExp
(
/^
\/
sysusers
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:sysuser 方法: 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
>
=
[
'userid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
sysusers
\/([
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
// Update
mock
.
onPut
(
new
RegExp
(
/^
\/
sysusers
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onPut
(
new
RegExp
(
/^
\/
sysusers
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:sysuser 方法: Update"
);
console
.
groupCollapsed
(
"实体:sysuser 方法: Update"
);
...
@@ -153,6 +179,22 @@ mock.onPut(new RegExp(/^\/sysusers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config:
...
@@ -153,6 +179,22 @@ mock.onPut(new RegExp(/^\/sysusers\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config:
return
[
status
,
data
];
return
[
status
,
data
];
});
});
// GetDraft
mock
.
onGet
(
new
RegExp
(
/^
\/
sysusers
\/
getdraft$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:sysuser 方法: 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
// CheckKey
mock
.
onPost
(
new
RegExp
(
/^
\/
sysusers
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onPost
(
new
RegExp
(
/^
\/
sysusers
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
checkkey$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:sysuser 方法: CheckKey"
);
console
.
groupCollapsed
(
"实体:sysuser 方法: CheckKey"
);
...
@@ -229,48 +271,6 @@ mock.onPost(new RegExp(/^\/sysusers\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((c
...
@@ -229,48 +271,6 @@ mock.onPost(new RegExp(/^\/sysusers\/?([a-zA-Z0-9\-\;]{0,35})\/save$/)).reply((c
return
[
status
,
data
];
return
[
status
,
data
];
});
});
// GetDraft
mock
.
onGet
(
new
RegExp
(
/^
\/
sysusers
\/
getdraft$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:sysuser 方法: 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
,
{}];
});
// Create
mock
.
onPost
(
new
RegExp
(
/^
\/
sysusers
\/?([
a-zA-Z0-9
\-\;]{0,35})
$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:sysuser 方法: 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
>
=
[
'userid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
sysusers
\/([
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
]];
});
// FetchDefault
// FetchDefault
mock
.
onGet
(
new
RegExp
(
/^
\/
sysusers
\/
fetchdefault$/
)).
reply
((
config
:
any
)
=>
{
mock
.
onGet
(
new
RegExp
(
/^
\/
sysusers
\/
fetchdefault$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:sysuser 方法: FetchDefault"
);
console
.
groupCollapsed
(
"实体:sysuser 方法: FetchDefault"
);
...
...
app_web/src/pages/uaa/sys-permissionmpickup-view/sys-permissionmpickup-view-base.vue
浏览文件 @
b6d3eb21
...
@@ -747,9 +747,18 @@ export default class SYS_PERMISSIONMPickupViewBase extends Vue {
...
@@ -747,9 +747,18 @@ export default class SYS_PERMISSIONMPickupViewBase extends Vue {
newSelections
.
push
(
this
.
viewSelections
[
index
]);
newSelections
.
push
(
this
.
viewSelections
[
index
]);
}
}
});
});
this
.
viewSelections
=
newSelections
;
this
.
viewSelections
=
this
.
removeDuplicates
([...
newSelections
,...
this
.
viewSelections
])
;
});
});
this
.
selectedData
=
JSON
.
stringify
(
this
.
viewSelections
);
}
/**
* 去重
*
* @memberof SYS_PERMISSIONMPickupViewBase
*/
public
removeDuplicates
(
data
:
any
):
Array
<
any
>
{
const
uniqueSet
=
new
Set
(
data
);
return
[...
uniqueSet
];
}
}
/**
/**
...
...
app_web/src/pages/uaa/sys-role-permissionmpickup-view/sys-role-permissionmpickup-view-base.vue
浏览文件 @
b6d3eb21
...
@@ -747,9 +747,18 @@ export default class SYS_ROLE_PERMISSIONMPickupViewBase extends Vue {
...
@@ -747,9 +747,18 @@ export default class SYS_ROLE_PERMISSIONMPickupViewBase extends Vue {
newSelections
.
push
(
this
.
viewSelections
[
index
]);
newSelections
.
push
(
this
.
viewSelections
[
index
]);
}
}
});
});
this
.
viewSelections
=
newSelections
;
this
.
viewSelections
=
this
.
removeDuplicates
([...
newSelections
,...
this
.
viewSelections
])
;
});
});
this
.
selectedData
=
JSON
.
stringify
(
this
.
viewSelections
);
}
/**
* 去重
*
* @memberof SYS_ROLE_PERMISSIONMPickupViewBase
*/
public
removeDuplicates
(
data
:
any
):
Array
<
any
>
{
const
uniqueSet
=
new
Set
(
data
);
return
[...
uniqueSet
];
}
}
/**
/**
...
...
app_web/src/pages/uaa/sys-rolempickup-view/sys-rolempickup-view-base.vue
浏览文件 @
b6d3eb21
...
@@ -747,9 +747,18 @@ export default class SYS_ROLEMPickupViewBase extends Vue {
...
@@ -747,9 +747,18 @@ export default class SYS_ROLEMPickupViewBase extends Vue {
newSelections
.
push
(
this
.
viewSelections
[
index
]);
newSelections
.
push
(
this
.
viewSelections
[
index
]);
}
}
});
});
this
.
viewSelections
=
newSelections
;
this
.
viewSelections
=
this
.
removeDuplicates
([...
newSelections
,...
this
.
viewSelections
])
;
});
});
this
.
selectedData
=
JSON
.
stringify
(
this
.
viewSelections
);
}
/**
* 去重
*
* @memberof SYS_ROLEMPickupViewBase
*/
public
removeDuplicates
(
data
:
any
):
Array
<
any
>
{
const
uniqueSet
=
new
Set
(
data
);
return
[...
uniqueSet
];
}
}
/**
/**
...
...
app_web/src/pages/uaa/sys-user-rolempickup-view/sys-user-rolempickup-view-base.vue
浏览文件 @
b6d3eb21
...
@@ -747,9 +747,18 @@ export default class SYS_USER_ROLEMPickupViewBase extends Vue {
...
@@ -747,9 +747,18 @@ export default class SYS_USER_ROLEMPickupViewBase extends Vue {
newSelections
.
push
(
this
.
viewSelections
[
index
]);
newSelections
.
push
(
this
.
viewSelections
[
index
]);
}
}
});
});
this
.
viewSelections
=
newSelections
;
this
.
viewSelections
=
this
.
removeDuplicates
([...
newSelections
,...
this
.
viewSelections
])
;
});
});
this
.
selectedData
=
JSON
.
stringify
(
this
.
viewSelections
);
}
/**
* 去重
*
* @memberof SYS_USER_ROLEMPickupViewBase
*/
public
removeDuplicates
(
data
:
any
):
Array
<
any
>
{
const
uniqueSet
=
new
Set
(
data
);
return
[...
uniqueSet
];
}
}
/**
/**
...
...
app_web/src/pages/uaa/sys-usermpickup-view/sys-usermpickup-view-base.vue
浏览文件 @
b6d3eb21
...
@@ -747,9 +747,18 @@ export default class SYS_USERMPickupViewBase extends Vue {
...
@@ -747,9 +747,18 @@ export default class SYS_USERMPickupViewBase extends Vue {
newSelections
.
push
(
this
.
viewSelections
[
index
]);
newSelections
.
push
(
this
.
viewSelections
[
index
]);
}
}
});
});
this
.
viewSelections
=
newSelections
;
this
.
viewSelections
=
this
.
removeDuplicates
([...
newSelections
,...
this
.
viewSelections
])
;
});
});
this
.
selectedData
=
JSON
.
stringify
(
this
.
viewSelections
);
}
/**
* 去重
*
* @memberof SYS_USERMPickupViewBase
*/
public
removeDuplicates
(
data
:
any
):
Array
<
any
>
{
const
uniqueSet
=
new
Set
(
data
);
return
[...
uniqueSet
];
}
}
/**
/**
...
...
app_web/src/service/sys-app/sys-app-service-base.ts
浏览文件 @
b6d3eb21
...
@@ -53,7 +53,7 @@ export default class SysAppServiceBase extends EntityService {
...
@@ -53,7 +53,7 @@ export default class SysAppServiceBase extends EntityService {
}
}
/**
/**
*
Remov
e接口方法
*
Creat
e接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -61,13 +61,22 @@ export default class SysAppServiceBase extends EntityService {
...
@@ -61,13 +61,22 @@ export default class SysAppServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof SysAppServiceBase
* @memberof SysAppServiceBase
*/
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
delete
(
`/sysapps/
${
context
.
sysapp
}
`
,
isloading
);
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
(
`/sysapps`
,
data
,
isloading
);
return
res
;
return
res
;
}
}
/**
/**
*
Get
接口方法
*
Update
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -75,13 +84,15 @@ export default class SysAppServiceBase extends EntityService {
...
@@ -75,13 +84,15 @@ export default class SysAppServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof SysAppServiceBase
* @memberof SysAppServiceBase
*/
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysapps/
${
context
.
sysapp
}
`
,
isloading
);
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/sysapps/
${
context
.
sysapp
}
`
,
data
,
isloading
);
return
res
;
return
res
;
}
}
/**
/**
*
Sa
ve接口方法
*
Remo
ve接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -89,15 +100,13 @@ export default class SysAppServiceBase extends EntityService {
...
@@ -89,15 +100,13 @@ export default class SysAppServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof SysAppServiceBase
* @memberof SysAppServiceBase
*/
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
res
:
any
=
await
Http
.
getInstance
().
delete
(
`/sysapps/
${
context
.
sysapp
}
`
,
isloading
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysapps/
${
context
.
sysapp
}
/save`
,
data
,
isloading
);
return
res
;
return
res
;
}
}
/**
/**
* Get
Draft
接口方法
* Get接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -105,14 +114,13 @@ export default class SysAppServiceBase extends EntityService {
...
@@ -105,14 +114,13 @@ export default class SysAppServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof SysAppServiceBase
* @memberof SysAppServiceBase
*/
*/
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysapps/getdraft`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysapps/
${
context
.
sysapp
}
`
,
isloading
);
res
.
data
.
sysapp
=
data
.
sysapp
;
return
res
;
return
res
;
}
}
/**
/**
*
CheckKey
接口方法
*
GetDraft
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -120,13 +128,14 @@ export default class SysAppServiceBase extends EntityService {
...
@@ -120,13 +128,14 @@ export default class SysAppServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof SysAppServiceBase
* @memberof SysAppServiceBase
*/
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysapps/
${
context
.
sysapp
}
/checkkey`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysapps/getdraft`
,
isloading
);
res
.
data
.
sysapp
=
data
.
sysapp
;
return
res
;
return
res
;
}
}
/**
/**
*
Update
接口方法
*
CheckKey
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -134,15 +143,13 @@ export default class SysAppServiceBase extends EntityService {
...
@@ -134,15 +143,13 @@ export default class SysAppServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof SysAppServiceBase
* @memberof SysAppServiceBase
*/
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysapps/
${
context
.
sysapp
}
/checkkey`
,
data
,
isloading
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/sysapps/
${
context
.
sysapp
}
`
,
data
,
isloading
);
return
res
;
return
res
;
}
}
/**
/**
*
Creat
e接口方法
*
Sav
e接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -150,17 +157,10 @@ export default class SysAppServiceBase extends EntityService {
...
@@ -150,17 +157,10 @@ export default class SysAppServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof SysAppServiceBase
* @memberof SysAppServiceBase
*/
*/
public
async
Creat
e
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Sav
e
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysapps/
${
context
.
sysapp
}
/save`
,
data
,
isloading
);
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
(
`/sysapps`
,
data
,
isloading
);
return
res
;
return
res
;
}
}
...
...
app_web/src/service/sys-auth-log/sys-auth-log-service-base.ts
浏览文件 @
b6d3eb21
...
@@ -53,7 +53,7 @@ export default class SysAuthLogServiceBase extends EntityService {
...
@@ -53,7 +53,7 @@ export default class SysAuthLogServiceBase extends EntityService {
}
}
/**
/**
*
GetDraft
接口方法
*
Create
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -61,9 +61,17 @@ export default class SysAuthLogServiceBase extends EntityService {
...
@@ -61,9 +61,17 @@ export default class SysAuthLogServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof SysAuthLogServiceBase
* @memberof SysAuthLogServiceBase
*/
*/
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysauthlogs/getdraft`
,
isloading
);
let
masterData
:
any
=
{};
res
.
data
.
sysauthlog
=
data
.
sysauthlog
;
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
(
`/sysauthlogs`
,
data
,
isloading
);
return
res
;
return
res
;
}
}
...
@@ -98,7 +106,7 @@ export default class SysAuthLogServiceBase extends EntityService {
...
@@ -98,7 +106,7 @@ export default class SysAuthLogServiceBase extends EntityService {
}
}
/**
/**
*
Create
接口方法
*
Get
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -106,22 +114,13 @@ export default class SysAuthLogServiceBase extends EntityService {
...
@@ -106,22 +114,13 @@ export default class SysAuthLogServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof SysAuthLogServiceBase
* @memberof SysAuthLogServiceBase
*/
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysauthlogs/
${
context
.
sysauthlog
}
`
,
isloading
);
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
(
`/sysauthlogs`
,
data
,
isloading
);
return
res
;
return
res
;
}
}
/**
/**
*
CheckKey
接口方法
*
GetDraft
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -129,13 +128,14 @@ export default class SysAuthLogServiceBase extends EntityService {
...
@@ -129,13 +128,14 @@ export default class SysAuthLogServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof SysAuthLogServiceBase
* @memberof SysAuthLogServiceBase
*/
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysauthlogs/
${
context
.
sysauthlog
}
/checkkey`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysauthlogs/getdraft`
,
isloading
);
res
.
data
.
sysauthlog
=
data
.
sysauthlog
;
return
res
;
return
res
;
}
}
/**
/**
*
Get
接口方法
*
CheckKey
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -143,8 +143,8 @@ export default class SysAuthLogServiceBase extends EntityService {
...
@@ -143,8 +143,8 @@ export default class SysAuthLogServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof SysAuthLogServiceBase
* @memberof SysAuthLogServiceBase
*/
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysauthlogs/
${
context
.
sysauthlog
}
`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysauthlogs/
${
context
.
sysauthlog
}
/checkkey`
,
data
,
isloading
);
return
res
;
return
res
;
}
}
...
...
app_web/src/service/sys-permission/sys-permission-service-base.ts
浏览文件 @
b6d3eb21
...
@@ -53,7 +53,7 @@ export default class SysPermissionServiceBase extends EntityService {
...
@@ -53,7 +53,7 @@ export default class SysPermissionServiceBase extends EntityService {
}
}
/**
/**
*
Sav
e接口方法
*
Creat
e接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -61,7 +61,7 @@ export default class SysPermissionServiceBase extends EntityService {
...
@@ -61,7 +61,7 @@ export default class SysPermissionServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof SysPermissionServiceBase
* @memberof SysPermissionServiceBase
*/
*/
public
async
Sav
e
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Creat
e
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
sysrolepermissionsData
:
any
=
[];
let
sysrolepermissionsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
),
'undefined'
)){
...
@@ -79,13 +79,20 @@ export default class SysPermissionServiceBase extends EntityService {
...
@@ -79,13 +79,20 @@ export default class SysPermissionServiceBase extends EntityService {
}
}
masterData
.
sysrolepermissions
=
sysrolepermissionsData
;
masterData
.
sysrolepermissions
=
sysrolepermissionsData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/syspermissions/
${
context
.
syspermission
}
/save`
,
data
,
isloading
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
,
JSON
.
stringify
(
res
.
data
.
sysrolepermissions
));
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
(
`/syspermissions`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_sysrolepermissions'
,
JSON
.
stringify
(
res
.
data
.
sysrolepermissions
));
return
res
;
return
res
;
}
}
/**
/**
*
GetDraft
接口方法
*
Update
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -93,9 +100,25 @@ export default class SysPermissionServiceBase extends EntityService {
...
@@ -93,9 +100,25 @@ export default class SysPermissionServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof SysPermissionServiceBase
* @memberof SysPermissionServiceBase
*/
*/
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/syspermissions/getdraft`
,
isloading
);
let
masterData
:
any
=
{};
res
.
data
.
syspermission
=
data
.
syspermission
;
let
sysrolepermissionsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
),
'undefined'
)){
sysrolepermissionsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
)
as
any
);
if
(
sysrolepermissionsData
&&
sysrolepermissionsData
.
length
&&
sysrolepermissionsData
.
length
>
0
){
sysrolepermissionsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
rolepermissionid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
sysrolepermissions
=
sysrolepermissionsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/syspermissions/
${
context
.
syspermission
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
,
JSON
.
stringify
(
res
.
data
.
sysrolepermissions
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
,
JSON
.
stringify
(
res
.
data
.
sysrolepermissions
));
return
res
;
return
res
;
}
}
...
@@ -115,7 +138,7 @@ export default class SysPermissionServiceBase extends EntityService {
...
@@ -115,7 +138,7 @@ export default class SysPermissionServiceBase extends EntityService {
}
}
/**
/**
*
Update
接口方法
*
Get
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -123,31 +146,14 @@ export default class SysPermissionServiceBase extends EntityService {
...
@@ -123,31 +146,14 @@ export default class SysPermissionServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof SysPermissionServiceBase
* @memberof SysPermissionServiceBase
*/
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/syspermissions/
${
context
.
syspermission
}
`
,
isloading
);
let
sysrolepermissionsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
),
'undefined'
)){
sysrolepermissionsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
)
as
any
);
if
(
sysrolepermissionsData
&&
sysrolepermissionsData
.
length
&&
sysrolepermissionsData
.
length
>
0
){
sysrolepermissionsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
rolepermissionid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
sysrolepermissions
=
sysrolepermissionsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/syspermissions/
${
context
.
syspermission
}
`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
,
JSON
.
stringify
(
res
.
data
.
sysrolepermissions
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
,
JSON
.
stringify
(
res
.
data
.
sysrolepermissions
));
return
res
;
return
res
;
}
}
/**
/**
*
Create
接口方法
*
GetDraft
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -155,33 +161,10 @@ export default class SysPermissionServiceBase extends EntityService {
...
@@ -155,33 +161,10 @@ export default class SysPermissionServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof SysPermissionServiceBase
* @memberof SysPermissionServiceBase
*/
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/syspermissions/getdraft`
,
isloading
);
let
sysrolepermissionsData
:
any
=
[];
res
.
data
.
syspermission
=
data
.
syspermission
;
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
),
'undefined'
)){
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
,
JSON
.
stringify
(
res
.
data
.
sysrolepermissions
));
sysrolepermissionsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
)
as
any
);
if
(
sysrolepermissionsData
&&
sysrolepermissionsData
.
length
&&
sysrolepermissionsData
.
length
>
0
){
sysrolepermissionsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
rolepermissionid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
sysrolepermissions
=
sysrolepermissionsData
;
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
(
`/syspermissions`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_sysrolepermissions'
,
JSON
.
stringify
(
res
.
data
.
sysrolepermissions
));
return
res
;
return
res
;
}
}
...
@@ -200,7 +183,7 @@ export default class SysPermissionServiceBase extends EntityService {
...
@@ -200,7 +183,7 @@ export default class SysPermissionServiceBase extends EntityService {
}
}
/**
/**
*
Get
接口方法
*
Save
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -208,8 +191,25 @@ export default class SysPermissionServiceBase extends EntityService {
...
@@ -208,8 +191,25 @@ export default class SysPermissionServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof SysPermissionServiceBase
* @memberof SysPermissionServiceBase
*/
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/syspermissions/
${
context
.
syspermission
}
`
,
isloading
);
let
masterData
:
any
=
{};
let
sysrolepermissionsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
),
'undefined'
)){
sysrolepermissionsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
)
as
any
);
if
(
sysrolepermissionsData
&&
sysrolepermissionsData
.
length
&&
sysrolepermissionsData
.
length
>
0
){
sysrolepermissionsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
rolepermissionid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
sysrolepermissions
=
sysrolepermissionsData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/syspermissions/
${
context
.
syspermission
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
,
JSON
.
stringify
(
res
.
data
.
sysrolepermissions
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
,
JSON
.
stringify
(
res
.
data
.
sysrolepermissions
));
return
res
;
return
res
;
}
}
...
...
app_web/src/service/sys-role-permission/sys-role-permission-service-base.ts
浏览文件 @
b6d3eb21
...
@@ -59,7 +59,7 @@ export default class SysRolePermissionServiceBase extends EntityService {
...
@@ -59,7 +59,7 @@ export default class SysRolePermissionServiceBase extends EntityService {
}
}
/**
/**
*
Get
接口方法
*
Create
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -67,14 +67,67 @@ export default class SysRolePermissionServiceBase extends EntityService {
...
@@ -67,14 +67,67 @@ export default class SysRolePermissionServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof SysRolePermissionServiceBase
* @memberof SysRolePermissionServiceBase
*/
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
sysrole
&&
true
){
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
(
`/sysroles/
${
context
.
sysrole
}
/sysrolepermissions`
,
data
,
isloading
);
}
if
(
context
.
syspermission
&&
true
){
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
(
`/syspermissions/
${
context
.
syspermission
}
/sysrolepermissions`
,
data
,
isloading
);
}
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
(
`/sysrolepermissions`
,
data
,
isloading
);
return
res
;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysRolePermissionServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
sysrole
&&
context
.
sysrolepermission
){
if
(
context
.
sysrole
&&
context
.
sysrolepermission
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysroles/
${
context
.
sysrole
}
/sysrolepermissions/
${
context
.
sysrolepermission
}
`
,
isloading
);
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/sysroles/
${
context
.
sysrole
}
/sysrolepermissions/
${
context
.
sysrolepermission
}
`
,
data
,
isloading
);
}
}
if
(
context
.
syspermission
&&
context
.
sysrolepermission
){
if
(
context
.
syspermission
&&
context
.
sysrolepermission
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/syspermissions/
${
context
.
syspermission
}
/sysrolepermissions/
${
context
.
sysrolepermission
}
`
,
isloading
);
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/syspermissions/
${
context
.
syspermission
}
/sysrolepermissions/
${
context
.
sysrolepermission
}
`
,
data
,
isloading
);
}
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysrolepermissions/
${
context
.
sysrolepermission
}
`
,
isloading
);
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/sysrolepermissions/
${
context
.
sysrolepermission
}
`
,
data
,
isloading
);
return
res
;
return
res
;
}
}
...
@@ -99,7 +152,7 @@ export default class SysRolePermissionServiceBase extends EntityService {
...
@@ -99,7 +152,7 @@ export default class SysRolePermissionServiceBase extends EntityService {
}
}
/**
/**
* Get
Draft
接口方法
* Get接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -107,22 +160,19 @@ export default class SysRolePermissionServiceBase extends EntityService {
...
@@ -107,22 +160,19 @@ export default class SysRolePermissionServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof SysRolePermissionServiceBase
* @memberof SysRolePermissionServiceBase
*/
*/
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
sysrole
&&
true
){
if
(
context
.
sysrole
&&
context
.
sysrolepermission
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysroles/
${
context
.
sysrole
}
/sysrolepermissions/getdraft`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysroles/
${
context
.
sysrole
}
/sysrolepermissions/
${
context
.
sysrolepermission
}
`
,
isloading
);
res
.
data
.
sysrolepermission
=
data
.
sysrolepermission
;
}
}
if
(
context
.
syspermission
&&
true
){
if
(
context
.
syspermission
&&
context
.
sysrolepermission
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/syspermissions/
${
context
.
syspermission
}
/sysrolepermissions/getdraft`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/syspermissions/
${
context
.
syspermission
}
/sysrolepermissions/
${
context
.
sysrolepermission
}
`
,
isloading
);
res
.
data
.
sysrolepermission
=
data
.
sysrolepermission
;
}
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysrolepermissions/getdraft`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysrolepermissions/
${
context
.
sysrolepermission
}
`
,
isloading
);
res
.
data
.
sysrolepermission
=
data
.
sysrolepermission
;
return
res
;
return
res
;
}
}
/**
/**
*
Create
接口方法
*
GetDraft
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -130,41 +180,17 @@ export default class SysRolePermissionServiceBase extends EntityService {
...
@@ -130,41 +180,17 @@ export default class SysRolePermissionServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof SysRolePermissionServiceBase
* @memberof SysRolePermissionServiceBase
*/
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
sysrole
&&
true
){
if
(
context
.
sysrole
&&
true
){
let
masterData
:
any
=
{};
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysroles/
${
context
.
sysrole
}
/sysrolepermissions/getdraft`
,
isloading
);
Object
.
assign
(
data
,
masterData
);
res
.
data
.
sysrolepermission
=
data
.
sysrolepermission
;
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
(
`/sysroles/
${
context
.
sysrole
}
/sysrolepermissions`
,
data
,
isloading
);
}
}
if
(
context
.
syspermission
&&
true
){
if
(
context
.
syspermission
&&
true
){
let
masterData
:
any
=
{};
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/syspermissions/
${
context
.
syspermission
}
/sysrolepermissions/getdraft`
,
isloading
);
Object
.
assign
(
data
,
masterData
);
res
.
data
.
sysrolepermission
=
data
.
sysrolepermission
;
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
(
`/syspermissions/
${
context
.
syspermission
}
/sysrolepermissions`
,
data
,
isloading
);
}
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
().
get
(
`/sysrolepermissions/getdraft`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysrolepermissions`
,
data
,
isloading
)
;
res
.
data
.
sysrolepermission
=
data
.
sysrolepermission
;
return
res
;
return
res
;
}
}
...
@@ -218,32 +244,6 @@ export default class SysRolePermissionServiceBase extends EntityService {
...
@@ -218,32 +244,6 @@ export default class SysRolePermissionServiceBase extends EntityService {
return
res
;
return
res
;
}
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysRolePermissionServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
sysrole
&&
context
.
sysrolepermission
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/sysroles/
${
context
.
sysrole
}
/sysrolepermissions/
${
context
.
sysrolepermission
}
`
,
data
,
isloading
);
}
if
(
context
.
syspermission
&&
context
.
sysrolepermission
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/syspermissions/
${
context
.
syspermission
}
/sysrolepermissions/
${
context
.
sysrolepermission
}
`
,
data
,
isloading
);
}
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/sysrolepermissions/
${
context
.
sysrolepermission
}
`
,
data
,
isloading
);
return
res
;
}
/**
/**
* FetchDefault接口方法
* FetchDefault接口方法
*
*
...
...
app_web/src/service/sys-role/sys-role-service-base.ts
浏览文件 @
b6d3eb21
...
@@ -53,7 +53,7 @@ export default class SysRoleServiceBase extends EntityService {
...
@@ -53,7 +53,7 @@ export default class SysRoleServiceBase extends EntityService {
}
}
/**
/**
*
Sav
e接口方法
*
Creat
e接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -61,7 +61,7 @@ export default class SysRoleServiceBase extends EntityService {
...
@@ -61,7 +61,7 @@ export default class SysRoleServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof SysRoleServiceBase
* @memberof SysRoleServiceBase
*/
*/
public
async
Sav
e
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Creat
e
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
sysrolepermissionsData
:
any
=
[];
let
sysrolepermissionsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
),
'undefined'
)){
...
@@ -94,9 +94,16 @@ export default class SysRoleServiceBase extends EntityService {
...
@@ -94,9 +94,16 @@ export default class SysRoleServiceBase extends EntityService {
}
}
masterData
.
sysuserroles
=
sysuserrolesData
;
masterData
.
sysuserroles
=
sysuserrolesData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysroles/
${
context
.
sysrole
}
/save`
,
data
,
isloading
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
,
JSON
.
stringify
(
res
.
data
.
sysrolepermissions
));
data
[
this
.
APPDEKEY
]
=
null
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_sysuserroles'
,
JSON
.
stringify
(
res
.
data
.
sysuserroles
));
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysroles`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_sysrolepermissions'
,
JSON
.
stringify
(
res
.
data
.
sysrolepermissions
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_sysuserroles'
,
JSON
.
stringify
(
res
.
data
.
sysuserroles
));
return
res
;
return
res
;
}
}
...
@@ -149,7 +156,7 @@ export default class SysRoleServiceBase extends EntityService {
...
@@ -149,7 +156,7 @@ export default class SysRoleServiceBase extends EntityService {
}
}
/**
/**
*
Creat
e接口方法
*
Remov
e接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -157,49 +164,8 @@ export default class SysRoleServiceBase extends EntityService {
...
@@ -157,49 +164,8 @@ export default class SysRoleServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof SysRoleServiceBase
* @memberof SysRoleServiceBase
*/
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
res
:
any
=
await
Http
.
getInstance
().
delete
(
`/sysroles/
${
context
.
sysrole
}
`
,
isloading
);
let
sysrolepermissionsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
),
'undefined'
)){
sysrolepermissionsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
)
as
any
);
if
(
sysrolepermissionsData
&&
sysrolepermissionsData
.
length
&&
sysrolepermissionsData
.
length
>
0
){
sysrolepermissionsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
rolepermissionid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
sysrolepermissions
=
sysrolepermissionsData
;
let
sysuserrolesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysuserroles'
),
'undefined'
)){
sysuserrolesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysuserroles'
)
as
any
);
if
(
sysuserrolesData
&&
sysuserrolesData
.
length
&&
sysuserrolesData
.
length
>
0
){
sysuserrolesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
userroleid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
sysuserroles
=
sysuserrolesData
;
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
(
`/sysroles`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_sysrolepermissions'
,
JSON
.
stringify
(
res
.
data
.
sysrolepermissions
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_sysuserroles'
,
JSON
.
stringify
(
res
.
data
.
sysuserroles
));
return
res
;
return
res
;
}
}
...
@@ -220,7 +186,7 @@ export default class SysRoleServiceBase extends EntityService {
...
@@ -220,7 +186,7 @@ export default class SysRoleServiceBase extends EntityService {
}
}
/**
/**
*
Remove
接口方法
*
GetDraft
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -228,13 +194,16 @@ export default class SysRoleServiceBase extends EntityService {
...
@@ -228,13 +194,16 @@ export default class SysRoleServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof SysRoleServiceBase
* @memberof SysRoleServiceBase
*/
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
delete
(
`/sysroles/
${
context
.
sysrole
}
`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysroles/getdraft`
,
isloading
);
res
.
data
.
sysrole
=
data
.
sysrole
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
,
JSON
.
stringify
(
res
.
data
.
sysrolepermissions
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_sysuserroles'
,
JSON
.
stringify
(
res
.
data
.
sysuserroles
));
return
res
;
return
res
;
}
}
/**
/**
*
GetDraft
接口方法
*
CheckKey
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -242,16 +211,13 @@ export default class SysRoleServiceBase extends EntityService {
...
@@ -242,16 +211,13 @@ export default class SysRoleServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof SysRoleServiceBase
* @memberof SysRoleServiceBase
*/
*/
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysroles/getdraft`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysroles/
${
context
.
sysrole
}
/checkkey`
,
data
,
isloading
);
res
.
data
.
sysrole
=
data
.
sysrole
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
,
JSON
.
stringify
(
res
.
data
.
sysrolepermissions
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_sysuserroles'
,
JSON
.
stringify
(
res
.
data
.
sysuserroles
));
return
res
;
return
res
;
}
}
/**
/**
*
CheckKey
接口方法
*
Save
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -259,8 +225,42 @@ export default class SysRoleServiceBase extends EntityService {
...
@@ -259,8 +225,42 @@ export default class SysRoleServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof SysRoleServiceBase
* @memberof SysRoleServiceBase
*/
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysroles/
${
context
.
sysrole
}
/checkkey`
,
data
,
isloading
);
let
masterData
:
any
=
{};
let
sysrolepermissionsData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
),
'undefined'
)){
sysrolepermissionsData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
)
as
any
);
if
(
sysrolepermissionsData
&&
sysrolepermissionsData
.
length
&&
sysrolepermissionsData
.
length
>
0
){
sysrolepermissionsData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
rolepermissionid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
sysrolepermissions
=
sysrolepermissionsData
;
let
sysuserrolesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysuserroles'
),
'undefined'
)){
sysuserrolesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysuserroles'
)
as
any
);
if
(
sysuserrolesData
&&
sysuserrolesData
.
length
&&
sysuserrolesData
.
length
>
0
){
sysuserrolesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
userroleid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
sysuserroles
=
sysuserrolesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysroles/
${
context
.
sysrole
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_sysrolepermissions'
,
JSON
.
stringify
(
res
.
data
.
sysrolepermissions
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_sysuserroles'
,
JSON
.
stringify
(
res
.
data
.
sysuserroles
));
return
res
;
return
res
;
}
}
...
...
app_web/src/service/sys-user-role/sys-user-role-service-base.ts
浏览文件 @
b6d3eb21
...
@@ -59,7 +59,7 @@ export default class SysUserRoleServiceBase extends EntityService {
...
@@ -59,7 +59,7 @@ export default class SysUserRoleServiceBase extends EntityService {
}
}
/**
/**
* C
heckKey
接口方法
* C
reate
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -67,41 +67,41 @@ export default class SysUserRoleServiceBase extends EntityService {
...
@@ -67,41 +67,41 @@ export default class SysUserRoleServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof SysUserRoleServiceBase
* @memberof SysUserRoleServiceBase
*/
*/
public
async
C
heckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
C
reate
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
sysuser
&&
context
.
sysuserrol
e
){
if
(
context
.
sysuser
&&
tru
e
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysusers/
${
context
.
sysuser
}
/sysuserroles/
${
context
.
sysuserrole
}
/checkkey`
,
data
,
isloading
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
}
if
(
context
.
sysrole
&&
context
.
sysuserrole
){
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysusers/
${
context
.
sysuser
}
/sysuserroles`
,
data
,
isloading
);
}
if
(
context
.
sysrole
&&
true
){
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysroles/
${
context
.
sysrole
}
/sysuserroles/
${
context
.
sysuserrole
}
/checkkey`
,
data
,
isloading
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
}
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysuserroles/
${
context
.
sysuserrole
}
/checkkey`
,
data
,
isloading
);
if
(
data
.
srffrontuf
){
return
res
;
delete
data
.
srffrontuf
;
}
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
/**
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysroles/
${
context
.
sysrole
}
/sysuserroles`
,
data
,
isloading
);
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserRoleServiceBase
*/
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
sysuser
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysusers/
${
context
.
sysuser
}
/sysuserroles/getdraft`
,
isloading
);
res
.
data
.
sysuserrole
=
data
.
sysuserrole
;
}
}
if
(
context
.
sysrole
&&
true
){
let
masterData
:
any
=
{};
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysroles/
${
context
.
sysrole
}
/sysuserroles/getdraft`
,
isloading
);
Object
.
assign
(
data
,
masterData
);
res
.
data
.
sysuserrole
=
data
.
sysuserrole
;
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysuserroles/getdraft`
,
isloading
);
if
(
data
.
srffrontuf
){
res
.
data
.
sysuserrole
=
data
.
sysuserrole
;
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysuserroles`
,
data
,
isloading
);
return
res
;
return
res
;
}
}
...
@@ -152,7 +152,7 @@ export default class SysUserRoleServiceBase extends EntityService {
...
@@ -152,7 +152,7 @@ export default class SysUserRoleServiceBase extends EntityService {
}
}
/**
/**
*
Create
接口方法
*
Get
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -160,46 +160,42 @@ export default class SysUserRoleServiceBase extends EntityService {
...
@@ -160,46 +160,42 @@ export default class SysUserRoleServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof SysUserRoleServiceBase
* @memberof SysUserRoleServiceBase
*/
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
sysuser
&&
true
){
if
(
context
.
sysuser
&&
context
.
sysuserrole
){
let
masterData
:
any
=
{};
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysusers/
${
context
.
sysuser
}
/sysuserroles/
${
context
.
sysuserrole
}
`
,
isloading
);
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
(
`/sysusers/
${
context
.
sysuser
}
/sysuserroles`
,
data
,
isloading
);
}
if
(
context
.
sysrole
&&
true
){
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
}
if
(
data
.
srffrontuf
){
if
(
context
.
sysrole
&&
context
.
sysuserrole
){
delete
data
.
srffrontuf
;
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysroles/
${
context
.
sysrole
}
/sysuserroles/
${
context
.
sysuserrole
}
`
,
isloading
)
;
}
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
)
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysuserroles/
${
context
.
sysuserrole
}
`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysroles/
${
context
.
sysrole
}
/sysuserroles`
,
data
,
isloading
)
;
return
res
;
}
}
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
/**
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
* GetDraft接口方法
data
[
this
.
APPDEKEY
]
=
null
;
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserRoleServiceBase
*/
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
sysuser
&&
true
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysusers/
${
context
.
sysuser
}
/sysuserroles/getdraft`
,
isloading
);
res
.
data
.
sysuserrole
=
data
.
sysuserrole
;
}
}
if
(
data
.
srffrontuf
){
if
(
context
.
sysrole
&&
true
){
delete
data
.
srffrontuf
;
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysroles/
${
context
.
sysrole
}
/sysuserroles/getdraft`
,
isloading
);
res
.
data
.
sysuserrole
=
data
.
sysuserrole
;
}
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
)
);
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysuserroles/getdraft`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysuserroles`
,
data
,
isloading
)
;
res
.
data
.
sysuserrole
=
data
.
sysuserrole
;
return
res
;
return
res
;
}
}
/**
/**
*
Get
接口方法
*
CheckKey
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -207,14 +203,18 @@ export default class SysUserRoleServiceBase extends EntityService {
...
@@ -207,14 +203,18 @@ export default class SysUserRoleServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof SysUserRoleServiceBase
* @memberof SysUserRoleServiceBase
*/
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
if
(
context
.
sysuser
&&
context
.
sysuserrole
){
if
(
context
.
sysuser
&&
context
.
sysuserrole
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysusers/
${
context
.
sysuser
}
/sysuserroles/
${
context
.
sysuserrole
}
`
,
isloading
);
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysusers/
${
context
.
sysuser
}
/sysuserroles/
${
context
.
sysuserrole
}
/checkkey`
,
data
,
isloading
);
}
}
if
(
context
.
sysrole
&&
context
.
sysuserrole
){
if
(
context
.
sysrole
&&
context
.
sysuserrole
){
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysroles/
${
context
.
sysrole
}
/sysuserroles/
${
context
.
sysuserrole
}
`
,
isloading
);
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysroles/
${
context
.
sysrole
}
/sysuserroles/
${
context
.
sysuserrole
}
/checkkey`
,
data
,
isloading
);
}
}
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysuserroles/
${
context
.
sysuserrole
}
`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysuserroles/
${
context
.
sysuserrole
}
/checkkey`
,
data
,
isloading
);
return
res
;
return
res
;
}
}
...
...
app_web/src/service/sys-user/sys-user-service-base.ts
浏览文件 @
b6d3eb21
...
@@ -53,7 +53,7 @@ export default class SysUserServiceBase extends EntityService {
...
@@ -53,7 +53,7 @@ export default class SysUserServiceBase extends EntityService {
}
}
/**
/**
*
Remov
e接口方法
*
Creat
e接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -61,8 +61,33 @@ export default class SysUserServiceBase extends EntityService {
...
@@ -61,8 +61,33 @@ export default class SysUserServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof SysUserServiceBase
* @memberof SysUserServiceBase
*/
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
delete
(
`/sysusers/
${
context
.
sysuser
}
`
,
isloading
);
let
masterData
:
any
=
{};
let
sysuserrolesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysuserroles'
),
'undefined'
)){
sysuserrolesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysuserroles'
)
as
any
);
if
(
sysuserrolesData
&&
sysuserrolesData
.
length
&&
sysuserrolesData
.
length
>
0
){
sysuserrolesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
userroleid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
sysuserroles
=
sysuserrolesData
;
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
(
`/sysusers`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_sysuserroles'
,
JSON
.
stringify
(
res
.
data
.
sysuserroles
));
return
res
;
return
res
;
}
}
...
@@ -99,7 +124,7 @@ export default class SysUserServiceBase extends EntityService {
...
@@ -99,7 +124,7 @@ export default class SysUserServiceBase extends EntityService {
}
}
/**
/**
*
CheckKey
接口方法
*
Remove
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -107,8 +132,8 @@ export default class SysUserServiceBase extends EntityService {
...
@@ -107,8 +132,8 @@ export default class SysUserServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof SysUserServiceBase
* @memberof SysUserServiceBase
*/
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysusers/
${
context
.
sysuser
}
/checkkey`
,
data
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
delete
(
`/sysusers/
${
context
.
sysuser
}
`
,
isloading
);
return
res
;
return
res
;
}
}
...
@@ -128,7 +153,7 @@ export default class SysUserServiceBase extends EntityService {
...
@@ -128,7 +153,7 @@ export default class SysUserServiceBase extends EntityService {
}
}
/**
/**
*
Save
接口方法
*
GetDraft
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -136,31 +161,15 @@ export default class SysUserServiceBase extends EntityService {
...
@@ -136,31 +161,15 @@ export default class SysUserServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof SysUserServiceBase
* @memberof SysUserServiceBase
*/
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysusers/getdraft`
,
isloading
);
let
sysuserrolesData
:
any
=
[];
res
.
data
.
sysuser
=
data
.
sysuser
;
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysuserroles'
),
'undefined'
)){
sysuserrolesData
=
JSON
.
parse
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysuserroles'
)
as
any
);
if
(
sysuserrolesData
&&
sysuserrolesData
.
length
&&
sysuserrolesData
.
length
>
0
){
sysuserrolesData
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
srffrontuf
){
if
(
Object
.
is
(
item
.
srffrontuf
,
"0"
)){
item
.
userroleid
=
null
;
}
delete
item
.
srffrontuf
;
}
});
}
}
masterData
.
sysuserroles
=
sysuserrolesData
;
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysusers/
${
context
.
sysuser
}
/save`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_sysuserroles'
,
JSON
.
stringify
(
res
.
data
.
sysuserroles
));
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_sysuserroles'
,
JSON
.
stringify
(
res
.
data
.
sysuserroles
));
return
res
;
return
res
;
}
}
/**
/**
*
GetDraft
接口方法
*
CheckKey
接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -168,15 +177,13 @@ export default class SysUserServiceBase extends EntityService {
...
@@ -168,15 +177,13 @@ export default class SysUserServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof SysUserServiceBase
* @memberof SysUserServiceBase
*/
*/
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysusers/getdraft`
,
isloading
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysusers/
${
context
.
sysuser
}
/checkkey`
,
data
,
isloading
);
res
.
data
.
sysuser
=
data
.
sysuser
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_sysuserroles'
,
JSON
.
stringify
(
res
.
data
.
sysuserroles
));
return
res
;
return
res
;
}
}
/**
/**
*
Creat
e接口方法
*
Sav
e接口方法
*
*
* @param {*} [context={}]
* @param {*} [context={}]
* @param {*} [data={}]
* @param {*} [data={}]
...
@@ -184,7 +191,7 @@ export default class SysUserServiceBase extends EntityService {
...
@@ -184,7 +191,7 @@ export default class SysUserServiceBase extends EntityService {
* @returns {Promise<any>}
* @returns {Promise<any>}
* @memberof SysUserServiceBase
* @memberof SysUserServiceBase
*/
*/
public
async
Creat
e
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
async
Sav
e
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
let
masterData
:
any
=
{};
let
sysuserrolesData
:
any
=
[];
let
sysuserrolesData
:
any
=
[];
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysuserroles'
),
'undefined'
)){
if
(
!
Object
.
is
(
this
.
tempStorage
.
getItem
(
context
.
srfsessionkey
+
'_sysuserroles'
),
'undefined'
)){
...
@@ -202,15 +209,8 @@ export default class SysUserServiceBase extends EntityService {
...
@@ -202,15 +209,8 @@ export default class SysUserServiceBase extends EntityService {
}
}
masterData
.
sysuserroles
=
sysuserrolesData
;
masterData
.
sysuserroles
=
sysuserrolesData
;
Object
.
assign
(
data
,
masterData
);
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysusers/
${
context
.
sysuser
}
/save`
,
data
,
isloading
);
data
[
this
.
APPDEKEY
]
=
null
;
this
.
tempStorage
.
setItem
(
context
.
srfsessionkey
+
'_sysuserroles'
,
JSON
.
stringify
(
res
.
data
.
sysuserroles
));
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysusers`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_sysuserroles'
,
JSON
.
stringify
(
res
.
data
.
sysuserroles
));
return
res
;
return
res
;
}
}
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/extensions.service/SysPSSystemServiceEx.java
0 → 100644
浏览文件 @
b6d3eb21
package
cn
.
ibizlab
.
core
.
extensions
.
service
;
import
cn.ibizlab.core.uaa.service.impl.SysPSSystemServiceImpl
;
import
lombok.extern.slf4j.Slf4j
;
import
cn.ibizlab.core.uaa.domain.SysPSSystem
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.context.annotation.Primary
;
import
java.util.*
;
/**
* 实体[系统] 自定义服务对象
*/
@Slf4j
@Primary
@Service
(
"SysPSSystemServiceEx"
)
public
class
SysPSSystemServiceEx
extends
SysPSSystemServiceImpl
{
@Override
protected
Class
currentModelClass
()
{
return
com
.
baomidou
.
mybatisplus
.
core
.
toolkit
.
ReflectionKit
.
getSuperClassGenericType
(
this
.
getClass
().
getSuperclass
(),
1
);
}
/**
* 自定义行为[PrepareApps]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public
SysPSSystem
prepareApps
(
SysPSSystem
et
)
{
return
super
.
prepareApps
(
et
);
}
/**
* 自定义行为[SyncPermission]用户扩展
* @param et
* @return
*/
@Override
@Transactional
public
SysPSSystem
syncPermission
(
SysPSSystem
et
)
{
return
super
.
syncPermission
(
et
);
}
}
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/mapper/SysPSSystemMapper.java
浏览文件 @
b6d3eb21
...
@@ -19,8 +19,8 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -19,8 +19,8 @@ import com.alibaba.fastjson.JSONObject;
public
interface
SysPSSystemMapper
extends
BaseMapper
<
SysPSSystem
>{
public
interface
SysPSSystemMapper
extends
BaseMapper
<
SysPSSystem
>{
Page
<
SysPSSystem
>
searchPick
(
IPage
page
,
@Param
(
"srf"
)
SysPSSystemSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
SysPSSystem
>
wrapper
)
;
Page
<
SysPSSystem
>
searchDefault
(
IPage
page
,
@Param
(
"srf"
)
SysPSSystemSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
SysPSSystem
>
wrapper
)
;
Page
<
SysPSSystem
>
searchDefault
(
IPage
page
,
@Param
(
"srf"
)
SysPSSystemSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
SysPSSystem
>
wrapper
)
;
Page
<
SysPSSystem
>
searchPick
(
IPage
page
,
@Param
(
"srf"
)
SysPSSystemSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
SysPSSystem
>
wrapper
)
;
@Override
@Override
SysPSSystem
selectById
(
Serializable
id
);
SysPSSystem
selectById
(
Serializable
id
);
@Override
@Override
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/ISysAppService.java
浏览文件 @
b6d3eb21
...
@@ -23,17 +23,17 @@ import cn.ibizlab.core.uaa.filter.SysAppSearchContext;
...
@@ -23,17 +23,17 @@ import cn.ibizlab.core.uaa.filter.SysAppSearchContext;
*/
*/
public
interface
ISysAppService
{
public
interface
ISysAppService
{
boolean
create
(
SysApp
et
)
;
void
createBatch
(
List
<
SysApp
>
list
)
;
boolean
update
(
SysApp
et
)
;
void
updateBatch
(
List
<
SysApp
>
list
)
;
boolean
remove
(
String
key
)
;
boolean
remove
(
String
key
)
;
void
removeBatch
(
Collection
<
String
>
idList
)
;
void
removeBatch
(
Collection
<
String
>
idList
)
;
SysApp
get
(
String
key
)
;
SysApp
get
(
String
key
)
;
boolean
save
(
SysApp
et
)
;
void
saveBatch
(
List
<
SysApp
>
list
)
;
SysApp
getDraft
(
SysApp
et
)
;
SysApp
getDraft
(
SysApp
et
)
;
boolean
checkKey
(
SysApp
et
)
;
boolean
checkKey
(
SysApp
et
)
;
boolean
update
(
SysApp
et
)
;
boolean
save
(
SysApp
et
)
;
void
updateBatch
(
List
<
SysApp
>
list
)
;
void
saveBatch
(
List
<
SysApp
>
list
)
;
boolean
create
(
SysApp
et
)
;
void
createBatch
(
List
<
SysApp
>
list
)
;
Page
<
SysApp
>
searchDefault
(
SysAppSearchContext
context
)
;
Page
<
SysApp
>
searchDefault
(
SysAppSearchContext
context
)
;
List
<
SysApp
>
selectBySystemid
(
String
pssystemid
)
;
List
<
SysApp
>
selectBySystemid
(
String
pssystemid
)
;
void
removeBySystemid
(
String
pssystemid
)
;
void
removeBySystemid
(
String
pssystemid
)
;
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/ISysAuthLogService.java
浏览文件 @
b6d3eb21
...
@@ -25,15 +25,15 @@ import com.baomidou.mybatisplus.extension.service.IService;
...
@@ -25,15 +25,15 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
*/
public
interface
ISysAuthLogService
extends
IService
<
SysAuthLog
>{
public
interface
ISysAuthLogService
extends
IService
<
SysAuthLog
>{
SysAuthLog
getDraft
(
SysAuthLog
et
)
;
boolean
create
(
SysAuthLog
et
)
;
void
createBatch
(
List
<
SysAuthLog
>
list
)
;
boolean
update
(
SysAuthLog
et
)
;
boolean
update
(
SysAuthLog
et
)
;
void
updateBatch
(
List
<
SysAuthLog
>
list
)
;
void
updateBatch
(
List
<
SysAuthLog
>
list
)
;
boolean
remove
(
String
key
)
;
boolean
remove
(
String
key
)
;
void
removeBatch
(
Collection
<
String
>
idList
)
;
void
removeBatch
(
Collection
<
String
>
idList
)
;
boolean
create
(
SysAuthLog
et
)
;
void
createBatch
(
List
<
SysAuthLog
>
list
)
;
boolean
checkKey
(
SysAuthLog
et
)
;
SysAuthLog
get
(
String
key
)
;
SysAuthLog
get
(
String
key
)
;
SysAuthLog
getDraft
(
SysAuthLog
et
)
;
boolean
checkKey
(
SysAuthLog
et
)
;
boolean
save
(
SysAuthLog
et
)
;
boolean
save
(
SysAuthLog
et
)
;
void
saveBatch
(
List
<
SysAuthLog
>
list
)
;
void
saveBatch
(
List
<
SysAuthLog
>
list
)
;
Page
<
SysAuthLog
>
searchDefault
(
SysAuthLogSearchContext
context
)
;
Page
<
SysAuthLog
>
searchDefault
(
SysAuthLogSearchContext
context
)
;
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/ISysPSSystemService.java
浏览文件 @
b6d3eb21
...
@@ -25,19 +25,21 @@ import com.baomidou.mybatisplus.extension.service.IService;
...
@@ -25,19 +25,21 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
*/
public
interface
ISysPSSystemService
extends
IService
<
SysPSSystem
>{
public
interface
ISysPSSystemService
extends
IService
<
SysPSSystem
>{
boolean
checkKey
(
SysPSSystem
et
)
;
SysPSSystem
get
(
String
key
)
;
boolean
create
(
SysPSSystem
et
)
;
boolean
create
(
SysPSSystem
et
)
;
void
createBatch
(
List
<
SysPSSystem
>
list
)
;
void
createBatch
(
List
<
SysPSSystem
>
list
)
;
SysPSSystem
getDraft
(
SysPSSystem
et
)
;
boolean
update
(
SysPSSystem
et
)
;
void
updateBatch
(
List
<
SysPSSystem
>
list
)
;
boolean
remove
(
String
key
)
;
boolean
remove
(
String
key
)
;
void
removeBatch
(
Collection
<
String
>
idList
)
;
void
removeBatch
(
Collection
<
String
>
idList
)
;
SysPSSystem
get
(
String
key
)
;
SysPSSystem
getDraft
(
SysPSSystem
et
)
;
boolean
checkKey
(
SysPSSystem
et
)
;
SysPSSystem
prepareApps
(
SysPSSystem
et
)
;
boolean
save
(
SysPSSystem
et
)
;
boolean
save
(
SysPSSystem
et
)
;
void
saveBatch
(
List
<
SysPSSystem
>
list
)
;
void
saveBatch
(
List
<
SysPSSystem
>
list
)
;
boolean
update
(
SysPSSystem
et
)
;
SysPSSystem
syncPermission
(
SysPSSystem
et
)
;
void
updateBatch
(
List
<
SysPSSystem
>
list
)
;
Page
<
SysPSSystem
>
searchPick
(
SysPSSystemSearchContext
context
)
;
Page
<
SysPSSystem
>
searchDefault
(
SysPSSystemSearchContext
context
)
;
Page
<
SysPSSystem
>
searchDefault
(
SysPSSystemSearchContext
context
)
;
Page
<
SysPSSystem
>
searchPick
(
SysPSSystemSearchContext
context
)
;
/**
/**
*自定义查询SQL
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param sql select * from table where id =#{et.param}
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/ISysPermissionService.java
浏览文件 @
b6d3eb21
...
@@ -25,17 +25,17 @@ import com.baomidou.mybatisplus.extension.service.IService;
...
@@ -25,17 +25,17 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
*/
public
interface
ISysPermissionService
extends
IService
<
SysPermission
>{
public
interface
ISysPermissionService
extends
IService
<
SysPermission
>{
boolean
save
(
SysPermission
et
)
;
void
saveBatch
(
List
<
SysPermission
>
list
)
;
SysPermission
getDraft
(
SysPermission
et
)
;
boolean
remove
(
String
key
)
;
void
removeBatch
(
Collection
<
String
>
idList
)
;
boolean
update
(
SysPermission
et
)
;
void
updateBatch
(
List
<
SysPermission
>
list
)
;
boolean
create
(
SysPermission
et
)
;
boolean
create
(
SysPermission
et
)
;
void
createBatch
(
List
<
SysPermission
>
list
)
;
void
createBatch
(
List
<
SysPermission
>
list
)
;
boolean
checkKey
(
SysPermission
et
)
;
boolean
update
(
SysPermission
et
)
;
void
updateBatch
(
List
<
SysPermission
>
list
)
;
boolean
remove
(
String
key
)
;
void
removeBatch
(
Collection
<
String
>
idList
)
;
SysPermission
get
(
String
key
)
;
SysPermission
get
(
String
key
)
;
SysPermission
getDraft
(
SysPermission
et
)
;
boolean
checkKey
(
SysPermission
et
)
;
boolean
save
(
SysPermission
et
)
;
void
saveBatch
(
List
<
SysPermission
>
list
)
;
Page
<
SysPermission
>
searchDefault
(
SysPermissionSearchContext
context
)
;
Page
<
SysPermission
>
searchDefault
(
SysPermissionSearchContext
context
)
;
/**
/**
*自定义查询SQL
*自定义查询SQL
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/ISysRolePermissionService.java
浏览文件 @
b6d3eb21
...
@@ -25,17 +25,17 @@ import com.baomidou.mybatisplus.extension.service.IService;
...
@@ -25,17 +25,17 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
*/
public
interface
ISysRolePermissionService
extends
IService
<
SysRolePermission
>{
public
interface
ISysRolePermissionService
extends
IService
<
SysRolePermission
>{
SysRolePermission
get
(
String
key
)
;
boolean
create
(
SysRolePermission
et
)
;
void
createBatch
(
List
<
SysRolePermission
>
list
)
;
boolean
update
(
SysRolePermission
et
)
;
void
updateBatch
(
List
<
SysRolePermission
>
list
)
;
boolean
remove
(
String
key
)
;
boolean
remove
(
String
key
)
;
void
removeBatch
(
Collection
<
String
>
idList
)
;
void
removeBatch
(
Collection
<
String
>
idList
)
;
SysRolePermission
get
(
String
key
)
;
SysRolePermission
getDraft
(
SysRolePermission
et
)
;
SysRolePermission
getDraft
(
SysRolePermission
et
)
;
boolean
create
(
SysRolePermission
et
)
;
void
createBatch
(
List
<
SysRolePermission
>
list
)
;
boolean
checkKey
(
SysRolePermission
et
)
;
boolean
checkKey
(
SysRolePermission
et
)
;
boolean
save
(
SysRolePermission
et
)
;
boolean
save
(
SysRolePermission
et
)
;
void
saveBatch
(
List
<
SysRolePermission
>
list
)
;
void
saveBatch
(
List
<
SysRolePermission
>
list
)
;
boolean
update
(
SysRolePermission
et
)
;
void
updateBatch
(
List
<
SysRolePermission
>
list
)
;
Page
<
SysRolePermission
>
searchDefault
(
SysRolePermissionSearchContext
context
)
;
Page
<
SysRolePermission
>
searchDefault
(
SysRolePermissionSearchContext
context
)
;
List
<
SysRolePermission
>
selectByPermissionid
(
String
permissionid
)
;
List
<
SysRolePermission
>
selectByPermissionid
(
String
permissionid
)
;
void
removeByPermissionid
(
String
permissionid
)
;
void
removeByPermissionid
(
String
permissionid
)
;
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/ISysRoleService.java
浏览文件 @
b6d3eb21
...
@@ -25,21 +25,21 @@ import com.baomidou.mybatisplus.extension.service.IService;
...
@@ -25,21 +25,21 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
*/
public
interface
ISysRoleService
extends
IService
<
SysRole
>{
public
interface
ISysRoleService
extends
IService
<
SysRole
>{
boolean
sav
e
(
SysRole
et
)
;
boolean
creat
e
(
SysRole
et
)
;
@CacheEvict
(
value
=
"sysrole"
,
allEntries
=
true
)
@CacheEvict
(
value
=
"sysrole"
,
allEntries
=
true
)
void
sav
eBatch
(
List
<
SysRole
>
list
)
;
void
creat
eBatch
(
List
<
SysRole
>
list
)
;
boolean
update
(
SysRole
et
)
;
boolean
update
(
SysRole
et
)
;
@CacheEvict
(
value
=
"sysrole"
,
allEntries
=
true
)
@CacheEvict
(
value
=
"sysrole"
,
allEntries
=
true
)
void
updateBatch
(
List
<
SysRole
>
list
)
;
void
updateBatch
(
List
<
SysRole
>
list
)
;
boolean
create
(
SysRole
et
)
;
@CacheEvict
(
value
=
"sysrole"
,
allEntries
=
true
)
void
createBatch
(
List
<
SysRole
>
list
)
;
SysRole
get
(
String
key
)
;
boolean
remove
(
String
key
)
;
boolean
remove
(
String
key
)
;
@CacheEvict
(
value
=
"sysrole"
,
allEntries
=
true
)
@CacheEvict
(
value
=
"sysrole"
,
allEntries
=
true
)
void
removeBatch
(
Collection
<
String
>
idList
)
;
void
removeBatch
(
Collection
<
String
>
idList
)
;
SysRole
get
(
String
key
)
;
SysRole
getDraft
(
SysRole
et
)
;
SysRole
getDraft
(
SysRole
et
)
;
boolean
checkKey
(
SysRole
et
)
;
boolean
checkKey
(
SysRole
et
)
;
boolean
save
(
SysRole
et
)
;
@CacheEvict
(
value
=
"sysrole"
,
allEntries
=
true
)
void
saveBatch
(
List
<
SysRole
>
list
)
;
Page
<
SysRole
>
searchDefault
(
SysRoleSearchContext
context
)
;
Page
<
SysRole
>
searchDefault
(
SysRoleSearchContext
context
)
;
/**
/**
*自定义查询SQL
*自定义查询SQL
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/ISysUserRoleService.java
浏览文件 @
b6d3eb21
...
@@ -25,15 +25,15 @@ import com.baomidou.mybatisplus.extension.service.IService;
...
@@ -25,15 +25,15 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
*/
public
interface
ISysUserRoleService
extends
IService
<
SysUserRole
>{
public
interface
ISysUserRoleService
extends
IService
<
SysUserRole
>{
boolean
c
heckKey
(
SysUserRole
et
)
;
boolean
c
reate
(
SysUserRole
et
)
;
SysUserRole
getDraft
(
SysUserRole
e
t
)
;
void
createBatch
(
List
<
SysUserRole
>
lis
t
)
;
boolean
update
(
SysUserRole
et
)
;
boolean
update
(
SysUserRole
et
)
;
void
updateBatch
(
List
<
SysUserRole
>
list
)
;
void
updateBatch
(
List
<
SysUserRole
>
list
)
;
boolean
remove
(
String
key
)
;
boolean
remove
(
String
key
)
;
void
removeBatch
(
Collection
<
String
>
idList
)
;
void
removeBatch
(
Collection
<
String
>
idList
)
;
boolean
create
(
SysUserRole
et
)
;
void
createBatch
(
List
<
SysUserRole
>
list
)
;
SysUserRole
get
(
String
key
)
;
SysUserRole
get
(
String
key
)
;
SysUserRole
getDraft
(
SysUserRole
et
)
;
boolean
checkKey
(
SysUserRole
et
)
;
boolean
save
(
SysUserRole
et
)
;
boolean
save
(
SysUserRole
et
)
;
void
saveBatch
(
List
<
SysUserRole
>
list
)
;
void
saveBatch
(
List
<
SysUserRole
>
list
)
;
Page
<
SysUserRole
>
searchDefault
(
SysUserRoleSearchContext
context
)
;
Page
<
SysUserRole
>
searchDefault
(
SysUserRoleSearchContext
context
)
;
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/ISysUserService.java
浏览文件 @
b6d3eb21
...
@@ -25,21 +25,21 @@ import com.baomidou.mybatisplus.extension.service.IService;
...
@@ -25,21 +25,21 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
*/
public
interface
ISysUserService
extends
IService
<
SysUser
>{
public
interface
ISysUserService
extends
IService
<
SysUser
>{
boolean
remove
(
String
key
)
;
boolean
create
(
SysUser
et
)
;
@CacheEvict
(
value
=
"sysuser"
,
allEntries
=
true
)
@CacheEvict
(
value
=
"sysuser"
,
allEntries
=
true
)
void
removeBatch
(
Collection
<
String
>
idL
ist
)
;
void
createBatch
(
List
<
SysUser
>
l
ist
)
;
boolean
update
(
SysUser
et
)
;
boolean
update
(
SysUser
et
)
;
@CacheEvict
(
value
=
"sysuser"
,
allEntries
=
true
)
@CacheEvict
(
value
=
"sysuser"
,
allEntries
=
true
)
void
updateBatch
(
List
<
SysUser
>
list
)
;
void
updateBatch
(
List
<
SysUser
>
list
)
;
boolean
checkKey
(
SysUser
et
)
;
boolean
remove
(
String
key
)
;
@CacheEvict
(
value
=
"sysuser"
,
allEntries
=
true
)
void
removeBatch
(
Collection
<
String
>
idList
)
;
SysUser
get
(
String
key
)
;
SysUser
get
(
String
key
)
;
SysUser
getDraft
(
SysUser
et
)
;
boolean
checkKey
(
SysUser
et
)
;
boolean
save
(
SysUser
et
)
;
boolean
save
(
SysUser
et
)
;
@CacheEvict
(
value
=
"sysuser"
,
allEntries
=
true
)
@CacheEvict
(
value
=
"sysuser"
,
allEntries
=
true
)
void
saveBatch
(
List
<
SysUser
>
list
)
;
void
saveBatch
(
List
<
SysUser
>
list
)
;
SysUser
getDraft
(
SysUser
et
)
;
boolean
create
(
SysUser
et
)
;
@CacheEvict
(
value
=
"sysuser"
,
allEntries
=
true
)
void
createBatch
(
List
<
SysUser
>
list
)
;
Page
<
SysUser
>
searchDefault
(
SysUserSearchContext
context
)
;
Page
<
SysUser
>
searchDefault
(
SysUserSearchContext
context
)
;
/**
/**
*自定义查询SQL
*自定义查询SQL
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SysAppServiceImpl.java
浏览文件 @
b6d3eb21
...
@@ -39,33 +39,41 @@ public class SysAppServiceImpl implements ISysAppService {
...
@@ -39,33 +39,41 @@ public class SysAppServiceImpl implements ISysAppService {
@Override
@Override
public
boolean
remove
(
String
key
)
{
public
boolean
create
(
SysApp
et
)
{
//代码实现
return
true
;
return
true
;
}
}
public
void
removeBatch
(
Collection
<
String
>
idL
ist
){
public
void
createBatch
(
List
<
SysApp
>
l
ist
){
}
}
@Override
@Override
public
SysApp
get
(
String
key
)
{
public
boolean
update
(
SysApp
et
)
{
SysApp
et
=
new
SysApp
();
//代码实现
et
.
setId
(
key
);
return
true
;
return
et
;
}
public
void
updateBatch
(
List
<
SysApp
>
list
){
}
}
@Override
@Override
@Transactional
public
boolean
remove
(
String
key
)
{
public
boolean
save
(
SysApp
et
)
{
//代码实现
return
true
;
return
true
;
}
}
@Override
public
void
removeBatch
(
Collection
<
String
>
idList
){
public
void
saveBatch
(
List
<
SysApp
>
list
)
{
}
}
@Override
public
SysApp
get
(
String
key
)
{
SysApp
et
=
new
SysApp
();
et
.
setId
(
key
);
return
et
;
}
@Override
@Override
public
SysApp
getDraft
(
SysApp
et
)
{
public
SysApp
getDraft
(
SysApp
et
)
{
return
et
;
return
et
;
...
@@ -76,22 +84,14 @@ public class SysAppServiceImpl implements ISysAppService {
...
@@ -76,22 +84,14 @@ public class SysAppServiceImpl implements ISysAppService {
return
false
;
return
false
;
}
}
@Override
@Override
public
boolean
update
(
SysApp
et
)
{
@Transactional
public
boolean
save
(
SysApp
et
)
{
//代码实现
//代码实现
return
true
;
return
true
;
}
}
public
void
updateBatch
(
List
<
SysApp
>
list
){
}
@Override
@Override
public
boolean
create
(
SysApp
et
)
{
public
void
saveBatch
(
List
<
SysApp
>
list
)
{
//代码实现
return
true
;
}
public
void
createBatch
(
List
<
SysApp
>
list
){
}
}
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SysAuthLogServiceImpl.java
浏览文件 @
b6d3eb21
...
@@ -48,8 +48,17 @@ public class SysAuthLogServiceImpl extends ServiceImpl<SysAuthLogMapper, SysAuth
...
@@ -48,8 +48,17 @@ public class SysAuthLogServiceImpl extends ServiceImpl<SysAuthLogMapper, SysAuth
protected
int
batchSize
=
500
;
protected
int
batchSize
=
500
;
@Override
@Override
public
SysAuthLog
getDraft
(
SysAuthLog
et
)
{
@Transactional
return
et
;
public
boolean
create
(
SysAuthLog
et
)
{
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getLogid
()),
et
);
return
true
;
}
@Override
public
void
createBatch
(
List
<
SysAuthLog
>
list
)
{
this
.
saveBatch
(
list
,
batchSize
);
}
}
@Override
@Override
...
@@ -78,24 +87,6 @@ public class SysAuthLogServiceImpl extends ServiceImpl<SysAuthLogMapper, SysAuth
...
@@ -78,24 +87,6 @@ public class SysAuthLogServiceImpl extends ServiceImpl<SysAuthLogMapper, SysAuth
removeByIds
(
idList
);
removeByIds
(
idList
);
}
}
@Override
@Transactional
public
boolean
create
(
SysAuthLog
et
)
{
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getLogid
()),
et
);
return
true
;
}
@Override
public
void
createBatch
(
List
<
SysAuthLog
>
list
)
{
this
.
saveBatch
(
list
,
batchSize
);
}
@Override
public
boolean
checkKey
(
SysAuthLog
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getLogid
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getLogid
())));
}
@Override
@Override
@Transactional
@Transactional
public
SysAuthLog
get
(
String
key
)
{
public
SysAuthLog
get
(
String
key
)
{
...
@@ -109,6 +100,15 @@ public class SysAuthLogServiceImpl extends ServiceImpl<SysAuthLogMapper, SysAuth
...
@@ -109,6 +100,15 @@ public class SysAuthLogServiceImpl extends ServiceImpl<SysAuthLogMapper, SysAuth
return
et
;
return
et
;
}
}
@Override
public
SysAuthLog
getDraft
(
SysAuthLog
et
)
{
return
et
;
}
@Override
public
boolean
checkKey
(
SysAuthLog
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getLogid
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getLogid
())));
}
@Override
@Override
@Transactional
@Transactional
public
boolean
save
(
SysAuthLog
et
)
{
public
boolean
save
(
SysAuthLog
et
)
{
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SysPSSystemServiceImpl.java
浏览文件 @
b6d3eb21
...
@@ -47,23 +47,6 @@ public class SysPSSystemServiceImpl extends ServiceImpl<SysPSSystemMapper, SysPS
...
@@ -47,23 +47,6 @@ public class SysPSSystemServiceImpl extends ServiceImpl<SysPSSystemMapper, SysPS
protected
int
batchSize
=
500
;
protected
int
batchSize
=
500
;
@Override
public
boolean
checkKey
(
SysPSSystem
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getPssystemid
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getPssystemid
())));
}
@Override
@Transactional
public
SysPSSystem
get
(
String
key
)
{
SysPSSystem
et
=
getById
(
key
);
if
(
et
==
null
){
et
=
new
SysPSSystem
();
et
.
setPssystemid
(
key
);
}
else
{
}
return
et
;
}
@Override
@Override
@Transactional
@Transactional
public
boolean
create
(
SysPSSystem
et
)
{
public
boolean
create
(
SysPSSystem
et
)
{
...
@@ -79,8 +62,17 @@ public class SysPSSystemServiceImpl extends ServiceImpl<SysPSSystemMapper, SysPS
...
@@ -79,8 +62,17 @@ public class SysPSSystemServiceImpl extends ServiceImpl<SysPSSystemMapper, SysPS
}
}
@Override
@Override
public
SysPSSystem
getDraft
(
SysPSSystem
et
)
{
@Transactional
return
et
;
public
boolean
update
(
SysPSSystem
et
)
{
if
(!
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"pssystemid"
,
et
.
getPssystemid
())))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getPssystemid
()),
et
);
return
true
;
}
@Override
public
void
updateBatch
(
List
<
SysPSSystem
>
list
)
{
updateBatchById
(
list
,
batchSize
);
}
}
@Override
@Override
...
@@ -95,6 +87,35 @@ public class SysPSSystemServiceImpl extends ServiceImpl<SysPSSystemMapper, SysPS
...
@@ -95,6 +87,35 @@ public class SysPSSystemServiceImpl extends ServiceImpl<SysPSSystemMapper, SysPS
removeByIds
(
idList
);
removeByIds
(
idList
);
}
}
@Override
@Transactional
public
SysPSSystem
get
(
String
key
)
{
SysPSSystem
et
=
getById
(
key
);
if
(
et
==
null
){
et
=
new
SysPSSystem
();
et
.
setPssystemid
(
key
);
}
else
{
}
return
et
;
}
@Override
public
SysPSSystem
getDraft
(
SysPSSystem
et
)
{
return
et
;
}
@Override
public
boolean
checkKey
(
SysPSSystem
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getPssystemid
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getPssystemid
())));
}
@Override
@Transactional
public
SysPSSystem
prepareApps
(
SysPSSystem
et
)
{
//自定义代码
return
et
;
}
@Override
@Override
@Transactional
@Transactional
public
boolean
save
(
SysPSSystem
et
)
{
public
boolean
save
(
SysPSSystem
et
)
{
...
@@ -128,35 +149,28 @@ public class SysPSSystemServiceImpl extends ServiceImpl<SysPSSystemMapper, SysPS
...
@@ -128,35 +149,28 @@ public class SysPSSystemServiceImpl extends ServiceImpl<SysPSSystemMapper, SysPS
@Override
@Override
@Transactional
@Transactional
public
boolean
update
(
SysPSSystem
et
)
{
public
SysPSSystem
syncPermission
(
SysPSSystem
et
)
{
if
(!
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"pssystemid"
,
et
.
getPssystemid
())))
//自定义代码
return
false
;
return
et
;
CachedBeanCopier
.
copy
(
get
(
et
.
getPssystemid
()),
et
);
return
true
;
}
@Override
public
void
updateBatch
(
List
<
SysPSSystem
>
list
)
{
updateBatchById
(
list
,
batchSize
);
}
}
/**
/**
* 查询集合
Pick
* 查询集合
DEFAULT
*/
*/
@Override
@Override
public
Page
<
SysPSSystem
>
search
Pick
(
SysPSSystemSearchContext
context
)
{
public
Page
<
SysPSSystem
>
search
Default
(
SysPSSystemSearchContext
context
)
{
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
SysPSSystem
>
pages
=
baseMapper
.
search
Pick
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
SysPSSystem
>
pages
=
baseMapper
.
search
Default
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
SysPSSystem
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
return
new
PageImpl
<
SysPSSystem
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
}
/**
/**
* 查询集合
DEFAULT
* 查询集合
Pick
*/
*/
@Override
@Override
public
Page
<
SysPSSystem
>
search
Default
(
SysPSSystemSearchContext
context
)
{
public
Page
<
SysPSSystem
>
search
Pick
(
SysPSSystemSearchContext
context
)
{
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
SysPSSystem
>
pages
=
baseMapper
.
search
Default
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
SysPSSystem
>
pages
=
baseMapper
.
search
Pick
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
SysPSSystem
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
return
new
PageImpl
<
SysPSSystem
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
}
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SysPermissionServiceImpl.java
浏览文件 @
b6d3eb21
...
@@ -52,38 +52,30 @@ public class SysPermissionServiceImpl extends ServiceImpl<SysPermissionMapper, S
...
@@ -52,38 +52,30 @@ public class SysPermissionServiceImpl extends ServiceImpl<SysPermissionMapper, S
@Override
@Override
@Transactional
@Transactional
public
boolean
sav
e
(
SysPermission
et
)
{
public
boolean
creat
e
(
SysPermission
et
)
{
if
(!
saveOrUpdate
(
et
))
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)
))
return
false
;
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getPermissionid
()),
et
);
return
true
;
return
true
;
}
}
@Override
@Override
@Transactional
(
public
void
createBatch
(
List
<
SysPermission
>
list
)
{
rollbackFor
=
{
Exception
.
class
}
this
.
saveBatch
(
list
,
batchSize
);
)
public
boolean
saveOrUpdate
(
SysPermission
et
)
{
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
}
}
}
@Override
@Override
public
boolean
saveBatch
(
Collection
<
SysPermission
>
list
)
{
@Transactional
saveOrUpdateBatch
(
list
,
batchSize
);
public
boolean
update
(
SysPermission
et
)
{
if
(!
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"sys_permissionid"
,
et
.
getPermissionid
())))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getPermissionid
()),
et
);
return
true
;
return
true
;
}
}
@Override
@Override
public
void
saveBatch
(
List
<
SysPermission
>
list
)
{
public
void
updateBatch
(
List
<
SysPermission
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
updateBatchById
(
list
,
batchSize
);
}
@Override
public
SysPermission
getDraft
(
SysPermission
et
)
{
return
et
;
}
}
@Override
@Override
...
@@ -100,47 +92,55 @@ public class SysPermissionServiceImpl extends ServiceImpl<SysPermissionMapper, S
...
@@ -100,47 +92,55 @@ public class SysPermissionServiceImpl extends ServiceImpl<SysPermissionMapper, S
@Override
@Override
@Transactional
@Transactional
public
boolean
update
(
SysPermission
et
)
{
public
SysPermission
get
(
String
key
)
{
if
(!
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"sys_permissionid"
,
et
.
getPermissionid
())))
SysPermission
et
=
getById
(
key
);
return
false
;
if
(
et
==
null
){
CachedBeanCopier
.
copy
(
get
(
et
.
getPermissionid
()),
et
);
et
=
new
SysPermission
();
return
true
;
et
.
setPermissionid
(
key
);
}
else
{
}
return
et
;
}
}
@Override
@Override
public
void
updateBatch
(
List
<
SysPermission
>
lis
t
)
{
public
SysPermission
getDraft
(
SysPermission
e
t
)
{
updateBatchById
(
list
,
batchSize
)
;
return
et
;
}
}
@Override
public
boolean
checkKey
(
SysPermission
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getPermissionid
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getPermissionid
())));
}
@Override
@Override
@Transactional
@Transactional
public
boolean
creat
e
(
SysPermission
et
)
{
public
boolean
sav
e
(
SysPermission
et
)
{
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)
))
if
(!
saveOrUpdate
(
et
))
return
false
;
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getPermissionid
()),
et
);
return
true
;
return
true
;
}
}
@Override
@Override
public
void
createBatch
(
List
<
SysPermission
>
list
)
{
@Transactional
(
this
.
saveBatch
(
list
,
batchSize
);
rollbackFor
=
{
Exception
.
class
}
)
public
boolean
saveOrUpdate
(
SysPermission
et
)
{
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
}
}
}
@Override
@Override
public
boolean
checkKey
(
SysPermission
et
)
{
public
boolean
saveBatch
(
Collection
<
SysPermission
>
list
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getPermissionid
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getPermissionid
())));
saveOrUpdateBatch
(
list
,
batchSize
);
return
true
;
}
}
@Override
@Override
@Transactional
public
void
saveBatch
(
List
<
SysPermission
>
list
)
{
public
SysPermission
get
(
String
key
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
SysPermission
et
=
getById
(
key
);
if
(
et
==
null
){
et
=
new
SysPermission
();
et
.
setPermissionid
(
key
);
}
else
{
}
return
et
;
}
}
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SysRolePermissionServiceImpl.java
浏览文件 @
b6d3eb21
...
@@ -55,15 +55,34 @@ public class SysRolePermissionServiceImpl extends ServiceImpl<SysRolePermissionM
...
@@ -55,15 +55,34 @@ public class SysRolePermissionServiceImpl extends ServiceImpl<SysRolePermissionM
@Override
@Override
@Transactional
@Transactional
public
SysRolePermission
get
(
String
key
)
{
public
boolean
create
(
SysRolePermission
et
)
{
SysRolePermission
et
=
getById
(
key
);
fillParentData
(
et
);
if
(
et
==
null
){
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
et
=
new
SysRolePermission
();
return
false
;
et
.
setRolepermissionid
(
key
);
CachedBeanCopier
.
copy
(
get
(
et
.
getRolepermissionid
()),
et
);
return
true
;
}
}
else
{
@Override
public
void
createBatch
(
List
<
SysRolePermission
>
list
)
{
list
.
forEach
(
item
->
fillParentData
(
item
));
this
.
saveOrUpdateBatch
(
list
,
batchSize
);
}
}
return
et
;
@Override
@Transactional
public
boolean
update
(
SysRolePermission
et
)
{
fillParentData
(
et
);
if
(!
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"sys_role_permissionid"
,
et
.
getRolepermissionid
())))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getRolepermissionid
()),
et
);
return
true
;
}
@Override
public
void
updateBatch
(
List
<
SysRolePermission
>
list
)
{
list
.
forEach
(
item
->
fillParentData
(
item
));
updateBatchById
(
list
,
batchSize
);
}
}
@Override
@Override
...
@@ -79,25 +98,22 @@ public class SysRolePermissionServiceImpl extends ServiceImpl<SysRolePermissionM
...
@@ -79,25 +98,22 @@ public class SysRolePermissionServiceImpl extends ServiceImpl<SysRolePermissionM
}
}
@Override
@Override
public
SysRolePermission
getDraft
(
SysRolePermission
et
)
{
@Transactional
fillParentData
(
et
);
public
SysRolePermission
get
(
String
key
)
{
SysRolePermission
et
=
getById
(
key
);
if
(
et
==
null
){
et
=
new
SysRolePermission
();
et
.
setRolepermissionid
(
key
);
}
else
{
}
return
et
;
return
et
;
}
}
@Override
@Override
@Transactional
public
SysRolePermission
getDraft
(
SysRolePermission
et
)
{
public
boolean
create
(
SysRolePermission
et
)
{
fillParentData
(
et
);
fillParentData
(
et
);
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
return
et
;
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getRolepermissionid
()),
et
);
return
true
;
}
@Override
public
void
createBatch
(
List
<
SysRolePermission
>
list
)
{
list
.
forEach
(
item
->
fillParentData
(
item
));
this
.
saveOrUpdateBatch
(
list
,
batchSize
);
}
}
@Override
@Override
...
@@ -137,22 +153,6 @@ public class SysRolePermissionServiceImpl extends ServiceImpl<SysRolePermissionM
...
@@ -137,22 +153,6 @@ public class SysRolePermissionServiceImpl extends ServiceImpl<SysRolePermissionM
saveOrUpdateBatch
(
list
,
batchSize
);
saveOrUpdateBatch
(
list
,
batchSize
);
}
}
@Override
@Transactional
public
boolean
update
(
SysRolePermission
et
)
{
fillParentData
(
et
);
if
(!
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"sys_role_permissionid"
,
et
.
getRolepermissionid
())))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getRolepermissionid
()),
et
);
return
true
;
}
@Override
public
void
updateBatch
(
List
<
SysRolePermission
>
list
)
{
list
.
forEach
(
item
->
fillParentData
(
item
));
updateBatchById
(
list
,
batchSize
);
}
@Override
@Override
public
List
<
SysRolePermission
>
selectByPermissionid
(
String
permissionid
)
{
public
List
<
SysRolePermission
>
selectByPermissionid
(
String
permissionid
)
{
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SysRoleServiceImpl.java
浏览文件 @
b6d3eb21
...
@@ -55,33 +55,16 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
...
@@ -55,33 +55,16 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
@Override
@Override
@Transactional
@Transactional
public
boolean
save
(
SysRole
et
)
{
public
boolean
create
(
SysRole
et
)
{
if
(!
saveOrUpdate
(
et
))
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
return
false
;
return
true
;
}
@Override
@Transactional
(
rollbackFor
=
{
Exception
.
class
}
)
public
boolean
saveOrUpdate
(
SysRole
et
)
{
if
(
null
==
et
)
{
return
false
;
return
false
;
}
else
{
CachedBeanCopier
.
copy
(
get
(
et
.
getRoleid
()),
et
);
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
}
}
@Override
public
boolean
saveBatch
(
Collection
<
SysRole
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
return
true
;
return
true
;
}
}
@Override
@Override
public
void
sav
eBatch
(
List
<
SysRole
>
list
)
{
public
void
creat
eBatch
(
List
<
SysRole
>
list
)
{
saveOrUpdat
eBatch
(
list
,
batchSize
);
this
.
sav
eBatch
(
list
,
batchSize
);
}
}
@Override
@Override
...
@@ -100,16 +83,14 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
...
@@ -100,16 +83,14 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
@Override
@Override
@Transactional
@Transactional
public
boolean
create
(
SysRole
et
)
{
public
boolean
remove
(
String
key
)
{
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
boolean
result
=
removeById
(
key
);
return
false
;
return
result
;
CachedBeanCopier
.
copy
(
get
(
et
.
getRoleid
()),
et
);
return
true
;
}
}
@Override
@Override
public
void
createBatch
(
List
<
SysRole
>
l
ist
)
{
public
void
removeBatch
(
Collection
<
String
>
idL
ist
)
{
this
.
saveBatch
(
list
,
batchSize
);
removeByIds
(
idList
);
}
}
@Override
@Override
...
@@ -125,29 +106,48 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
...
@@ -125,29 +106,48 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
return
et
;
return
et
;
}
}
@Override
public
SysRole
getDraft
(
SysRole
et
)
{
return
et
;
}
@Override
public
boolean
checkKey
(
SysRole
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getRoleid
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getRoleid
())));
}
@Override
@Override
@Transactional
@Transactional
public
boolean
remove
(
String
key
)
{
public
boolean
save
(
SysRole
et
)
{
boolean
result
=
removeById
(
key
);
if
(!
saveOrUpdate
(
et
))
return
result
;
return
false
;
return
true
;
}
}
@Override
@Override
public
void
removeBatch
(
Collection
<
String
>
idList
)
{
@Transactional
(
removeByIds
(
idList
);
rollbackFor
=
{
Exception
.
class
}
)
public
boolean
saveOrUpdate
(
SysRole
et
)
{
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
}
}
}
@Override
@Override
public
SysRole
getDraft
(
SysRole
et
)
{
public
boolean
saveBatch
(
Collection
<
SysRole
>
list
)
{
return
et
;
saveOrUpdateBatch
(
list
,
batchSize
);
return
true
;
}
}
@Override
@Override
public
boolean
checkKey
(
SysRole
e
t
)
{
public
void
saveBatch
(
List
<
SysRole
>
lis
t
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getRoleid
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getRoleid
()))
);
saveOrUpdateBatch
(
list
,
batchSize
);
}
}
/**
/**
* 查询集合 DEFAULT
* 查询集合 DEFAULT
*/
*/
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SysUserRoleServiceImpl.java
浏览文件 @
b6d3eb21
...
@@ -54,13 +54,19 @@ public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUs
...
@@ -54,13 +54,19 @@ public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUs
protected
int
batchSize
=
500
;
protected
int
batchSize
=
500
;
@Override
@Override
public
boolean
checkKey
(
SysUserRole
et
)
{
@Transactional
return
(!
ObjectUtils
.
isEmpty
(
et
.
getUserroleid
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getUserroleid
())));
public
boolean
create
(
SysUserRole
et
)
{
fillParentData
(
et
);
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getUserroleid
()),
et
);
return
true
;
}
}
@Override
@Override
public
SysUserRole
getDraft
(
SysUserRole
e
t
)
{
public
void
createBatch
(
List
<
SysUserRole
>
lis
t
)
{
fillParentData
(
et
);
list
.
forEach
(
item
->
fillParentData
(
item
)
);
return
et
;
this
.
saveOrUpdateBatch
(
list
,
batchSize
)
;
}
}
@Override
@Override
...
@@ -91,22 +97,6 @@ public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUs
...
@@ -91,22 +97,6 @@ public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUs
removeByIds
(
idList
);
removeByIds
(
idList
);
}
}
@Override
@Transactional
public
boolean
create
(
SysUserRole
et
)
{
fillParentData
(
et
);
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getUserroleid
()),
et
);
return
true
;
}
@Override
public
void
createBatch
(
List
<
SysUserRole
>
list
)
{
list
.
forEach
(
item
->
fillParentData
(
item
));
this
.
saveOrUpdateBatch
(
list
,
batchSize
);
}
@Override
@Override
@Transactional
@Transactional
public
SysUserRole
get
(
String
key
)
{
public
SysUserRole
get
(
String
key
)
{
...
@@ -120,6 +110,16 @@ public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUs
...
@@ -120,6 +110,16 @@ public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUs
return
et
;
return
et
;
}
}
@Override
public
SysUserRole
getDraft
(
SysUserRole
et
)
{
fillParentData
(
et
);
return
et
;
}
@Override
public
boolean
checkKey
(
SysUserRole
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getUserroleid
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getUserroleid
())));
}
@Override
@Override
@Transactional
@Transactional
public
boolean
save
(
SysUserRole
et
)
{
public
boolean
save
(
SysUserRole
et
)
{
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SysUserServiceImpl.java
浏览文件 @
b6d3eb21
...
@@ -52,14 +52,16 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
...
@@ -52,14 +52,16 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
@Override
@Override
@Transactional
@Transactional
public
boolean
remove
(
String
key
)
{
public
boolean
create
(
SysUser
et
)
{
boolean
result
=
removeById
(
key
);
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
return
result
;
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getUserid
()),
et
);
return
true
;
}
}
@Override
@Override
public
void
removeBatch
(
Collection
<
String
>
idL
ist
)
{
public
void
createBatch
(
List
<
SysUser
>
l
ist
)
{
removeByIds
(
idList
);
this
.
saveBatch
(
list
,
batchSize
);
}
}
@Override
@Override
...
@@ -77,9 +79,17 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
...
@@ -77,9 +79,17 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
}
}
@Override
@Override
public
boolean
checkKey
(
SysUser
et
)
{
@Transactional
return
(!
ObjectUtils
.
isEmpty
(
et
.
getUserid
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getUserid
())));
public
boolean
remove
(
String
key
)
{
boolean
result
=
removeById
(
key
);
return
result
;
}
}
@Override
public
void
removeBatch
(
Collection
<
String
>
idList
)
{
removeByIds
(
idList
);
}
@Override
@Override
@Transactional
@Transactional
public
SysUser
get
(
String
key
)
{
public
SysUser
get
(
String
key
)
{
...
@@ -93,6 +103,15 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
...
@@ -93,6 +103,15 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
return
et
;
return
et
;
}
}
@Override
public
SysUser
getDraft
(
SysUser
et
)
{
return
et
;
}
@Override
public
boolean
checkKey
(
SysUser
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getUserid
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getUserid
())));
}
@Override
@Override
@Transactional
@Transactional
public
boolean
save
(
SysUser
et
)
{
public
boolean
save
(
SysUser
et
)
{
...
@@ -124,25 +143,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
...
@@ -124,25 +143,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
saveOrUpdateBatch
(
list
,
batchSize
);
saveOrUpdateBatch
(
list
,
batchSize
);
}
}
@Override
public
SysUser
getDraft
(
SysUser
et
)
{
return
et
;
}
@Override
@Transactional
public
boolean
create
(
SysUser
et
)
{
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getUserid
()),
et
);
return
true
;
}
@Override
public
void
createBatch
(
List
<
SysUser
>
list
)
{
this
.
saveBatch
(
list
,
batchSize
);
}
/**
/**
...
...
ibzuaa-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
b6d3eb21
...
@@ -88,7 +88,7 @@
...
@@ -88,7 +88,7 @@
<!--输出实体[SYS_PSSYSTEM]数据结构 -->
<!--输出实体[SYS_PSSYSTEM]数据结构 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-sys_pssystem-3
6
-5"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-sys_pssystem-3
9
-5"
>
<createTable
tableName=
"IBZPSSYSTEM"
>
<createTable
tableName=
"IBZPSSYSTEM"
>
<column
name=
"PSSYSTEMID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"PSSYSTEMID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_PSSYSTEM_PSSYSTEMID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_PSSYSTEM_PSSYSTEMID"
/>
...
...
ibzuaa-core/src/main/resources/permission/systemResource.json
浏览文件 @
b6d3eb21
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
"delogicname"
:
"认证日志"
,
"delogicname"
:
"认证日志"
,
"sysmoudle"
:{
"id"
:
"UAA"
,
"name"
:
"uaa"
},
"sysmoudle"
:{
"id"
:
"UAA"
,
"name"
:
"uaa"
},
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"DEFAULT"
}],
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"DEFAULT"
}],
"deaction"
:[{
"id"
:
"
GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get
"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
}],
"deaction"
:[{
"id"
:
"
Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey
"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
}],
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
}
}
,
{
,
{
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
"delogicname"
:
"应用"
,
"delogicname"
:
"应用"
,
"sysmoudle"
:{
"id"
:
"UAA"
,
"name"
:
"uaa"
},
"sysmoudle"
:{
"id"
:
"UAA"
,
"name"
:
"uaa"
},
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"DEFAULT"
}],
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"DEFAULT"
}],
"deaction"
:[{
"id"
:
"
Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Create"
,
"name"
:
"Creat
e"
,
"type"
:
"BUILTIN"
}],
"deaction"
:[{
"id"
:
"
Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Save"
,
"name"
:
"Sav
e"
,
"type"
:
"BUILTIN"
}],
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
}
}
,
{
,
{
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
"delogicname"
:
"角色权限关系"
,
"delogicname"
:
"角色权限关系"
,
"sysmoudle"
:{
"id"
:
"UAA"
,
"name"
:
"uaa"
},
"sysmoudle"
:{
"id"
:
"UAA"
,
"name"
:
"uaa"
},
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"DEFAULT"
}],
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"DEFAULT"
}],
"deaction"
:[{
"id"
:
"
Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Updat
e"
,
"type"
:
"BUILTIN"
}],
"deaction"
:[{
"id"
:
"
Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Save"
,
"name"
:
"Sav
e"
,
"type"
:
"BUILTIN"
}],
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
}
}
,
{
,
{
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
"delogicname"
:
"权限/资源"
,
"delogicname"
:
"权限/资源"
,
"sysmoudle"
:{
"id"
:
"UAA"
,
"name"
:
"uaa"
},
"sysmoudle"
:{
"id"
:
"UAA"
,
"name"
:
"uaa"
},
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"DEFAULT"
}],
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"DEFAULT"
}],
"deaction"
:[{
"id"
:
"
Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get
"
,
"type"
:
"BUILTIN"
}],
"deaction"
:[{
"id"
:
"
Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Save"
,
"name"
:
"Save
"
,
"type"
:
"BUILTIN"
}],
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
}
}
,
{
,
{
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
"delogicname"
:
"用户角色关系"
,
"delogicname"
:
"用户角色关系"
,
"sysmoudle"
:{
"id"
:
"UAA"
,
"name"
:
"uaa"
},
"sysmoudle"
:{
"id"
:
"UAA"
,
"name"
:
"uaa"
},
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"DEFAULT"
}],
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"DEFAULT"
}],
"deaction"
:[{
"id"
:
"C
heckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get
"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
}],
"deaction"
:[{
"id"
:
"C
reate"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey
"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
}],
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
}
}
,
{
,
{
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
"delogicname"
:
"系统用户"
,
"delogicname"
:
"系统用户"
,
"sysmoudle"
:{
"id"
:
"UAA"
,
"name"
:
"uaa"
},
"sysmoudle"
:{
"id"
:
"UAA"
,
"name"
:
"uaa"
},
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"DEFAULT"
}],
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"DEFAULT"
}],
"deaction"
:[{
"id"
:
"
Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Create"
,
"name"
:
"Creat
e"
,
"type"
:
"BUILTIN"
}],
"deaction"
:[{
"id"
:
"
Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Save"
,
"name"
:
"Sav
e"
,
"type"
:
"BUILTIN"
}],
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
}
}
,
{
,
{
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
"delogicname"
:
"系统角色"
,
"delogicname"
:
"系统角色"
,
"sysmoudle"
:{
"id"
:
"UAA"
,
"name"
:
"uaa"
},
"sysmoudle"
:{
"id"
:
"UAA"
,
"name"
:
"uaa"
},
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"DEFAULT"
}],
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"DEFAULT"
}],
"deaction"
:[{
"id"
:
"
Save"
,
"name"
:
"Save"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey
"
,
"type"
:
"BUILTIN"
}],
"deaction"
:[{
"id"
:
"
Create"
,
"name"
:
"Create"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Update"
,
"name"
:
"Update"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Remove"
,
"name"
:
"Remove"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Get"
,
"name"
:
"Get"
,
"type"
:
"BUILTIN"
},{
"id"
:
"GetDraft"
,
"name"
:
"GetDraft"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CheckKey"
,
"name"
:
"CheckKey"
,
"type"
:
"BUILTIN"
},{
"id"
:
"Save"
,
"name"
:
"Save
"
,
"type"
:
"BUILTIN"
}],
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
}
}
],
],
...
...
ibzuaa-provider/ibzuaa-provider-api/src/main/java/cn/ibizlab/api/rest/SysAppResource.java
浏览文件 @
b6d3eb21
...
@@ -47,6 +47,41 @@ public class SysAppResource {
...
@@ -47,6 +47,41 @@ public class SysAppResource {
@Lazy
@Lazy
public
SysAppMapping
sysappMapping
;
public
SysAppMapping
sysappMapping
;
@ApiOperation
(
value
=
"新建应用"
,
tags
=
{
"应用"
},
notes
=
"新建应用"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysapps"
)
@Transactional
public
ResponseEntity
<
SysAppDTO
>
create
(
@RequestBody
SysAppDTO
sysappdto
)
{
SysApp
domain
=
sysappMapping
.
toDomain
(
sysappdto
);
sysappService
.
create
(
domain
);
SysAppDTO
dto
=
sysappMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"批量新建应用"
,
tags
=
{
"应用"
},
notes
=
"批量新建应用"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysapps/batch"
)
public
ResponseEntity
<
Boolean
>
createBatch
(
@RequestBody
List
<
SysAppDTO
>
sysappdtos
)
{
sysappService
.
createBatch
(
sysappMapping
.
toDomain
(
sysappdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"更新应用"
,
tags
=
{
"应用"
},
notes
=
"更新应用"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/sysapps/{sysapp_id}"
)
@Transactional
public
ResponseEntity
<
SysAppDTO
>
update
(
@PathVariable
(
"sysapp_id"
)
String
sysapp_id
,
@RequestBody
SysAppDTO
sysappdto
)
{
SysApp
domain
=
sysappMapping
.
toDomain
(
sysappdto
);
domain
.
setId
(
sysapp_id
);
sysappService
.
update
(
domain
);
SysAppDTO
dto
=
sysappMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"批量更新应用"
,
tags
=
{
"应用"
},
notes
=
"批量更新应用"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/sysapps/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatch
(
@RequestBody
List
<
SysAppDTO
>
sysappdtos
)
{
sysappService
.
updateBatch
(
sysappMapping
.
toDomain
(
sysappdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"删除应用"
,
tags
=
{
"应用"
},
notes
=
"删除应用"
)
@ApiOperation
(
value
=
"删除应用"
,
tags
=
{
"应用"
},
notes
=
"删除应用"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/sysapps/{sysapp_id}"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/sysapps/{sysapp_id}"
)
@Transactional
@Transactional
...
@@ -69,19 +104,6 @@ public class SysAppResource {
...
@@ -69,19 +104,6 @@ public class SysAppResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
}
@ApiOperation
(
value
=
"保存应用"
,
tags
=
{
"应用"
},
notes
=
"保存应用"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysapps/save"
)
public
ResponseEntity
<
Boolean
>
save
(
@RequestBody
SysAppDTO
sysappdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
sysappService
.
save
(
sysappMapping
.
toDomain
(
sysappdto
)));
}
@ApiOperation
(
value
=
"批量保存应用"
,
tags
=
{
"应用"
},
notes
=
"批量保存应用"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysapps/savebatch"
)
public
ResponseEntity
<
Boolean
>
saveBatch
(
@RequestBody
List
<
SysAppDTO
>
sysappdtos
)
{
sysappService
.
saveBatch
(
sysappMapping
.
toDomain
(
sysappdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"获取应用草稿"
,
tags
=
{
"应用"
},
notes
=
"获取应用草稿"
)
@ApiOperation
(
value
=
"获取应用草稿"
,
tags
=
{
"应用"
},
notes
=
"获取应用草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/sysapps/getdraft"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/sysapps/getdraft"
)
public
ResponseEntity
<
SysAppDTO
>
getDraft
()
{
public
ResponseEntity
<
SysAppDTO
>
getDraft
()
{
...
@@ -94,42 +116,20 @@ public class SysAppResource {
...
@@ -94,42 +116,20 @@ public class SysAppResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
sysappService
.
checkKey
(
sysappMapping
.
toDomain
(
sysappdto
)));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
sysappService
.
checkKey
(
sysappMapping
.
toDomain
(
sysappdto
)));
}
}
@ApiOperation
(
value
=
"更新应用"
,
tags
=
{
"应用"
},
notes
=
"更新应用"
)
@ApiOperation
(
value
=
"保存应用"
,
tags
=
{
"应用"
},
notes
=
"保存应用"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/sysapps/{sysapp_id}"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysapps/save"
)
@Transactional
public
ResponseEntity
<
Boolean
>
save
(
@RequestBody
SysAppDTO
sysappdto
)
{
public
ResponseEntity
<
SysAppDTO
>
update
(
@PathVariable
(
"sysapp_id"
)
String
sysapp_id
,
@RequestBody
SysAppDTO
sysappdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
sysappService
.
save
(
sysappMapping
.
toDomain
(
sysappdto
)));
SysApp
domain
=
sysappMapping
.
toDomain
(
sysappdto
);
domain
.
setId
(
sysapp_id
);
sysappService
.
update
(
domain
);
SysAppDTO
dto
=
sysappMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"批量更新应用"
,
tags
=
{
"应用"
},
notes
=
"批量更新应用"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/sysapps/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatch
(
@RequestBody
List
<
SysAppDTO
>
sysappdtos
)
{
sysappService
.
updateBatch
(
sysappMapping
.
toDomain
(
sysappdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"新建应用"
,
tags
=
{
"应用"
},
notes
=
"新建应用"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysapps"
)
@Transactional
public
ResponseEntity
<
SysAppDTO
>
create
(
@RequestBody
SysAppDTO
sysappdto
)
{
SysApp
domain
=
sysappMapping
.
toDomain
(
sysappdto
);
sysappService
.
create
(
domain
);
SysAppDTO
dto
=
sysappMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
}
@ApiOperation
(
value
=
"批量
新建应用"
,
tags
=
{
"应用"
},
notes
=
"批量新建
应用"
)
@ApiOperation
(
value
=
"批量
保存应用"
,
tags
=
{
"应用"
},
notes
=
"批量保存
应用"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysapps/batch"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysapps/
save
batch"
)
public
ResponseEntity
<
Boolean
>
creat
eBatch
(
@RequestBody
List
<
SysAppDTO
>
sysappdtos
)
{
public
ResponseEntity
<
Boolean
>
sav
eBatch
(
@RequestBody
List
<
SysAppDTO
>
sysappdtos
)
{
sysappService
.
creat
eBatch
(
sysappMapping
.
toDomain
(
sysappdtos
));
sysappService
.
sav
eBatch
(
sysappMapping
.
toDomain
(
sysappdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysApp-searchDefault-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysApp-searchDefault-all')
and hasPermission(#context,'ibzuaa-SysApp-Get')
"
)
@ApiOperation
(
value
=
"获取DEFAULT"
,
tags
=
{
"应用"
}
,
notes
=
"获取DEFAULT"
)
@ApiOperation
(
value
=
"获取DEFAULT"
,
tags
=
{
"应用"
}
,
notes
=
"获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/sysapps/fetchdefault"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/sysapps/fetchdefault"
)
public
ResponseEntity
<
List
<
SysAppDTO
>>
fetchDefault
(
SysAppSearchContext
context
)
{
public
ResponseEntity
<
List
<
SysAppDTO
>>
fetchDefault
(
SysAppSearchContext
context
)
{
...
@@ -142,7 +142,7 @@ public class SysAppResource {
...
@@ -142,7 +142,7 @@ public class SysAppResource {
.
body
(
list
);
.
body
(
list
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysApp-searchDefault-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysApp-searchDefault-all')
and hasPermission(#context,'ibzuaa-SysApp-Get')
"
)
@ApiOperation
(
value
=
"查询DEFAULT"
,
tags
=
{
"应用"
}
,
notes
=
"查询DEFAULT"
)
@ApiOperation
(
value
=
"查询DEFAULT"
,
tags
=
{
"应用"
}
,
notes
=
"查询DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysapps/searchdefault"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysapps/searchdefault"
)
public
ResponseEntity
<
Page
<
SysAppDTO
>>
searchDefault
(
@RequestBody
SysAppSearchContext
context
)
{
public
ResponseEntity
<
Page
<
SysAppDTO
>>
searchDefault
(
@RequestBody
SysAppSearchContext
context
)
{
...
...
ibzuaa-provider/ibzuaa-provider-api/src/main/java/cn/ibizlab/api/rest/SysAuthLogResource.java
浏览文件 @
b6d3eb21
...
@@ -47,10 +47,23 @@ public class SysAuthLogResource {
...
@@ -47,10 +47,23 @@ public class SysAuthLogResource {
@Lazy
@Lazy
public
SysAuthLogMapping
sysauthlogMapping
;
public
SysAuthLogMapping
sysauthlogMapping
;
@ApiOperation
(
value
=
"获取认证日志草稿"
,
tags
=
{
"认证日志"
},
notes
=
"获取认证日志草稿"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysAuthLog-Create-all')"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/sysauthlogs/getdraft"
)
@ApiOperation
(
value
=
"新建认证日志"
,
tags
=
{
"认证日志"
},
notes
=
"新建认证日志"
)
public
ResponseEntity
<
SysAuthLogDTO
>
getDraft
()
{
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysauthlogs"
)
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
sysauthlogMapping
.
toDto
(
sysauthlogService
.
getDraft
(
new
SysAuthLog
())));
@Transactional
public
ResponseEntity
<
SysAuthLogDTO
>
create
(
@RequestBody
SysAuthLogDTO
sysauthlogdto
)
{
SysAuthLog
domain
=
sysauthlogMapping
.
toDomain
(
sysauthlogdto
);
sysauthlogService
.
create
(
domain
);
SysAuthLogDTO
dto
=
sysauthlogMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysAuthLog-Create-all')"
)
@ApiOperation
(
value
=
"批量新建认证日志"
,
tags
=
{
"认证日志"
},
notes
=
"批量新建认证日志"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysauthlogs/batch"
)
public
ResponseEntity
<
Boolean
>
createBatch
(
@RequestBody
List
<
SysAuthLogDTO
>
sysauthlogdtos
)
{
sysauthlogService
.
createBatch
(
sysauthlogMapping
.
toDomain
(
sysauthlogdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysAuthLog-Update-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysAuthLog-Update-all')"
)
...
@@ -89,23 +102,19 @@ public class SysAuthLogResource {
...
@@ -89,23 +102,19 @@ public class SysAuthLogResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysAuthLog-Create-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysAuthLog-Get-all')"
)
@ApiOperation
(
value
=
"新建认证日志"
,
tags
=
{
"认证日志"
},
notes
=
"新建认证日志"
)
@ApiOperation
(
value
=
"获取认证日志"
,
tags
=
{
"认证日志"
},
notes
=
"获取认证日志"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysauthlogs"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/sysauthlogs/{sysauthlog_id}"
)
@Transactional
public
ResponseEntity
<
SysAuthLogDTO
>
get
(
@PathVariable
(
"sysauthlog_id"
)
String
sysauthlog_id
)
{
public
ResponseEntity
<
SysAuthLogDTO
>
create
(
@RequestBody
SysAuthLogDTO
sysauthlogdto
)
{
SysAuthLog
domain
=
sysauthlogService
.
get
(
sysauthlog_id
);
SysAuthLog
domain
=
sysauthlogMapping
.
toDomain
(
sysauthlogdto
);
sysauthlogService
.
create
(
domain
);
SysAuthLogDTO
dto
=
sysauthlogMapping
.
toDto
(
domain
);
SysAuthLogDTO
dto
=
sysauthlogMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysAuthLog-Create-all')"
)
@ApiOperation
(
value
=
"获取认证日志草稿"
,
tags
=
{
"认证日志"
},
notes
=
"获取认证日志草稿"
)
@ApiOperation
(
value
=
"批量新建认证日志"
,
tags
=
{
"认证日志"
},
notes
=
"批量新建认证日志"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/sysauthlogs/getdraft"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysauthlogs/batch"
)
public
ResponseEntity
<
SysAuthLogDTO
>
getDraft
()
{
public
ResponseEntity
<
Boolean
>
createBatch
(
@RequestBody
List
<
SysAuthLogDTO
>
sysauthlogdtos
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
sysauthlogMapping
.
toDto
(
sysauthlogService
.
getDraft
(
new
SysAuthLog
())));
sysauthlogService
.
createBatch
(
sysauthlogMapping
.
toDomain
(
sysauthlogdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@ApiOperation
(
value
=
"检查认证日志"
,
tags
=
{
"认证日志"
},
notes
=
"检查认证日志"
)
@ApiOperation
(
value
=
"检查认证日志"
,
tags
=
{
"认证日志"
},
notes
=
"检查认证日志"
)
...
@@ -114,15 +123,6 @@ public class SysAuthLogResource {
...
@@ -114,15 +123,6 @@ public class SysAuthLogResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
sysauthlogService
.
checkKey
(
sysauthlogMapping
.
toDomain
(
sysauthlogdto
)));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
sysauthlogService
.
checkKey
(
sysauthlogMapping
.
toDomain
(
sysauthlogdto
)));
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysAuthLog-Get-all')"
)
@ApiOperation
(
value
=
"获取认证日志"
,
tags
=
{
"认证日志"
},
notes
=
"获取认证日志"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/sysauthlogs/{sysauthlog_id}"
)
public
ResponseEntity
<
SysAuthLogDTO
>
get
(
@PathVariable
(
"sysauthlog_id"
)
String
sysauthlog_id
)
{
SysAuthLog
domain
=
sysauthlogService
.
get
(
sysauthlog_id
);
SysAuthLogDTO
dto
=
sysauthlogMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysAuthLog-Save-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysAuthLog-Save-all')"
)
@ApiOperation
(
value
=
"保存认证日志"
,
tags
=
{
"认证日志"
},
notes
=
"保存认证日志"
)
@ApiOperation
(
value
=
"保存认证日志"
,
tags
=
{
"认证日志"
},
notes
=
"保存认证日志"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysauthlogs/save"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysauthlogs/save"
)
...
@@ -138,7 +138,7 @@ public class SysAuthLogResource {
...
@@ -138,7 +138,7 @@ public class SysAuthLogResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysAuthLog-searchDefault-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysAuthLog-searchDefault-all')
and hasPermission(#context,'ibzuaa-SysAuthLog-Get')
"
)
@ApiOperation
(
value
=
"获取DEFAULT"
,
tags
=
{
"认证日志"
}
,
notes
=
"获取DEFAULT"
)
@ApiOperation
(
value
=
"获取DEFAULT"
,
tags
=
{
"认证日志"
}
,
notes
=
"获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/sysauthlogs/fetchdefault"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/sysauthlogs/fetchdefault"
)
public
ResponseEntity
<
List
<
SysAuthLogDTO
>>
fetchDefault
(
SysAuthLogSearchContext
context
)
{
public
ResponseEntity
<
List
<
SysAuthLogDTO
>>
fetchDefault
(
SysAuthLogSearchContext
context
)
{
...
@@ -151,7 +151,7 @@ public class SysAuthLogResource {
...
@@ -151,7 +151,7 @@ public class SysAuthLogResource {
.
body
(
list
);
.
body
(
list
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysAuthLog-searchDefault-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysAuthLog-searchDefault-all')
and hasPermission(#context,'ibzuaa-SysAuthLog-Get')
"
)
@ApiOperation
(
value
=
"查询DEFAULT"
,
tags
=
{
"认证日志"
}
,
notes
=
"查询DEFAULT"
)
@ApiOperation
(
value
=
"查询DEFAULT"
,
tags
=
{
"认证日志"
}
,
notes
=
"查询DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysauthlogs/searchdefault"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysauthlogs/searchdefault"
)
public
ResponseEntity
<
Page
<
SysAuthLogDTO
>>
searchDefault
(
@RequestBody
SysAuthLogSearchContext
context
)
{
public
ResponseEntity
<
Page
<
SysAuthLogDTO
>>
searchDefault
(
@RequestBody
SysAuthLogSearchContext
context
)
{
...
...
ibzuaa-provider/ibzuaa-provider-api/src/main/java/cn/ibizlab/api/rest/SysPermissionResource.java
浏览文件 @
b6d3eb21
...
@@ -47,40 +47,22 @@ public class SysPermissionResource {
...
@@ -47,40 +47,22 @@ public class SysPermissionResource {
@Lazy
@Lazy
public
SysPermissionMapping
syspermissionMapping
;
public
SysPermissionMapping
syspermissionMapping
;
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysPermission-Save-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysPermission-Create-all')"
)
@ApiOperation
(
value
=
"保存权限/资源"
,
tags
=
{
"权限/资源"
},
notes
=
"保存权限/资源"
)
@ApiOperation
(
value
=
"新建权限/资源"
,
tags
=
{
"权限/资源"
},
notes
=
"新建权限/资源"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/syspermissions/save"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/syspermissions"
)
public
ResponseEntity
<
Boolean
>
save
(
@RequestBody
SysPermissionDTO
syspermissiondto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
syspermissionService
.
save
(
syspermissionMapping
.
toDomain
(
syspermissiondto
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysPermission-Save-all')"
)
@ApiOperation
(
value
=
"批量保存权限/资源"
,
tags
=
{
"权限/资源"
},
notes
=
"批量保存权限/资源"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/syspermissions/savebatch"
)
public
ResponseEntity
<
Boolean
>
saveBatch
(
@RequestBody
List
<
SysPermissionDTO
>
syspermissiondtos
)
{
syspermissionService
.
saveBatch
(
syspermissionMapping
.
toDomain
(
syspermissiondtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@ApiOperation
(
value
=
"获取权限/资源草稿"
,
tags
=
{
"权限/资源"
},
notes
=
"获取权限/资源草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/syspermissions/getdraft"
)
public
ResponseEntity
<
SysPermissionDTO
>
getDraft
()
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
syspermissionMapping
.
toDto
(
syspermissionService
.
getDraft
(
new
SysPermission
())));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysPermission-Remove-all')"
)
@ApiOperation
(
value
=
"删除权限/资源"
,
tags
=
{
"权限/资源"
},
notes
=
"删除权限/资源"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/syspermissions/{syspermission_id}"
)
@Transactional
@Transactional
public
ResponseEntity
<
Boolean
>
remove
(
@PathVariable
(
"syspermission_id"
)
String
syspermission_id
)
{
public
ResponseEntity
<
SysPermissionDTO
>
create
(
@RequestBody
SysPermissionDTO
syspermissiondto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
syspermissionService
.
remove
(
syspermission_id
));
SysPermission
domain
=
syspermissionMapping
.
toDomain
(
syspermissiondto
);
syspermissionService
.
create
(
domain
);
SysPermissionDTO
dto
=
syspermissionMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysPermission-
Remov
e-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysPermission-
Creat
e-all')"
)
@ApiOperation
(
value
=
"批量
删除权限/资源"
,
tags
=
{
"权限/资源"
},
notes
=
"批量删除
权限/资源"
)
@ApiOperation
(
value
=
"批量
新建权限/资源"
,
tags
=
{
"权限/资源"
},
notes
=
"批量新建
权限/资源"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/syspermissions/batch"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/syspermissions/batch"
)
public
ResponseEntity
<
Boolean
>
removeBatch
(
@RequestBody
List
<
String
>
id
s
)
{
public
ResponseEntity
<
Boolean
>
createBatch
(
@RequestBody
List
<
SysPermissionDTO
>
syspermissiondto
s
)
{
syspermissionService
.
removeBatch
(
ids
);
syspermissionService
.
createBatch
(
syspermissionMapping
.
toDomain
(
syspermissiondtos
)
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
...
@@ -105,31 +87,22 @@ public class SysPermissionResource {
...
@@ -105,31 +87,22 @@ public class SysPermissionResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysPermission-
Creat
e-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysPermission-
Remov
e-all')"
)
@ApiOperation
(
value
=
"
新建权限/资源"
,
tags
=
{
"权限/资源"
},
notes
=
"新建
权限/资源"
)
@ApiOperation
(
value
=
"
删除权限/资源"
,
tags
=
{
"权限/资源"
},
notes
=
"删除
权限/资源"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/syspermissions
"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/syspermissions/{syspermission_id}
"
)
@Transactional
@Transactional
public
ResponseEntity
<
SysPermissionDTO
>
create
(
@RequestBody
SysPermissionDTO
syspermissiondto
)
{
public
ResponseEntity
<
Boolean
>
remove
(
@PathVariable
(
"syspermission_id"
)
String
syspermission_id
)
{
SysPermission
domain
=
syspermissionMapping
.
toDomain
(
syspermissiondto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
syspermissionService
.
remove
(
syspermission_id
));
syspermissionService
.
create
(
domain
);
SysPermissionDTO
dto
=
syspermissionMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysPermission-
Creat
e-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysPermission-
Remov
e-all')"
)
@ApiOperation
(
value
=
"批量
新建权限/资源"
,
tags
=
{
"权限/资源"
},
notes
=
"批量新建
权限/资源"
)
@ApiOperation
(
value
=
"批量
删除权限/资源"
,
tags
=
{
"权限/资源"
},
notes
=
"批量删除
权限/资源"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/syspermissions/batch"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/syspermissions/batch"
)
public
ResponseEntity
<
Boolean
>
createBatch
(
@RequestBody
List
<
SysPermissionDTO
>
syspermissiondto
s
)
{
public
ResponseEntity
<
Boolean
>
removeBatch
(
@RequestBody
List
<
String
>
id
s
)
{
syspermissionService
.
createBatch
(
syspermissionMapping
.
toDomain
(
syspermissiondtos
)
);
syspermissionService
.
removeBatch
(
ids
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@ApiOperation
(
value
=
"检查权限/资源"
,
tags
=
{
"权限/资源"
},
notes
=
"检查权限/资源"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/syspermissions/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKey
(
@RequestBody
SysPermissionDTO
syspermissiondto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
syspermissionService
.
checkKey
(
syspermissionMapping
.
toDomain
(
syspermissiondto
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysPermission-Get-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysPermission-Get-all')"
)
@ApiOperation
(
value
=
"获取权限/资源"
,
tags
=
{
"权限/资源"
},
notes
=
"获取权限/资源"
)
@ApiOperation
(
value
=
"获取权限/资源"
,
tags
=
{
"权限/资源"
},
notes
=
"获取权限/资源"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/syspermissions/{syspermission_id}"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/syspermissions/{syspermission_id}"
)
...
@@ -139,7 +112,34 @@ public class SysPermissionResource {
...
@@ -139,7 +112,34 @@ public class SysPermissionResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysPermission-searchDefault-all')"
)
@ApiOperation
(
value
=
"获取权限/资源草稿"
,
tags
=
{
"权限/资源"
},
notes
=
"获取权限/资源草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/syspermissions/getdraft"
)
public
ResponseEntity
<
SysPermissionDTO
>
getDraft
()
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
syspermissionMapping
.
toDto
(
syspermissionService
.
getDraft
(
new
SysPermission
())));
}
@ApiOperation
(
value
=
"检查权限/资源"
,
tags
=
{
"权限/资源"
},
notes
=
"检查权限/资源"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/syspermissions/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKey
(
@RequestBody
SysPermissionDTO
syspermissiondto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
syspermissionService
.
checkKey
(
syspermissionMapping
.
toDomain
(
syspermissiondto
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysPermission-Save-all')"
)
@ApiOperation
(
value
=
"保存权限/资源"
,
tags
=
{
"权限/资源"
},
notes
=
"保存权限/资源"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/syspermissions/save"
)
public
ResponseEntity
<
Boolean
>
save
(
@RequestBody
SysPermissionDTO
syspermissiondto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
syspermissionService
.
save
(
syspermissionMapping
.
toDomain
(
syspermissiondto
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysPermission-Save-all')"
)
@ApiOperation
(
value
=
"批量保存权限/资源"
,
tags
=
{
"权限/资源"
},
notes
=
"批量保存权限/资源"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/syspermissions/savebatch"
)
public
ResponseEntity
<
Boolean
>
saveBatch
(
@RequestBody
List
<
SysPermissionDTO
>
syspermissiondtos
)
{
syspermissionService
.
saveBatch
(
syspermissionMapping
.
toDomain
(
syspermissiondtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysPermission-searchDefault-all') and hasPermission(#context,'ibzuaa-SysPermission-Get')"
)
@ApiOperation
(
value
=
"获取DEFAULT"
,
tags
=
{
"权限/资源"
}
,
notes
=
"获取DEFAULT"
)
@ApiOperation
(
value
=
"获取DEFAULT"
,
tags
=
{
"权限/资源"
}
,
notes
=
"获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/syspermissions/fetchdefault"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/syspermissions/fetchdefault"
)
public
ResponseEntity
<
List
<
SysPermissionDTO
>>
fetchDefault
(
SysPermissionSearchContext
context
)
{
public
ResponseEntity
<
List
<
SysPermissionDTO
>>
fetchDefault
(
SysPermissionSearchContext
context
)
{
...
@@ -152,7 +152,7 @@ public class SysPermissionResource {
...
@@ -152,7 +152,7 @@ public class SysPermissionResource {
.
body
(
list
);
.
body
(
list
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysPermission-searchDefault-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysPermission-searchDefault-all')
and hasPermission(#context,'ibzuaa-SysPermission-Get')
"
)
@ApiOperation
(
value
=
"查询DEFAULT"
,
tags
=
{
"权限/资源"
}
,
notes
=
"查询DEFAULT"
)
@ApiOperation
(
value
=
"查询DEFAULT"
,
tags
=
{
"权限/资源"
}
,
notes
=
"查询DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/syspermissions/searchdefault"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/syspermissions/searchdefault"
)
public
ResponseEntity
<
Page
<
SysPermissionDTO
>>
searchDefault
(
@RequestBody
SysPermissionSearchContext
context
)
{
public
ResponseEntity
<
Page
<
SysPermissionDTO
>>
searchDefault
(
@RequestBody
SysPermissionSearchContext
context
)
{
...
...
ibzuaa-provider/ibzuaa-provider-api/src/main/java/cn/ibizlab/api/rest/SysRolePermissionResource.java
浏览文件 @
b6d3eb21
此差异已折叠。
点击以展开。
ibzuaa-provider/ibzuaa-provider-api/src/main/java/cn/ibizlab/api/rest/SysRoleResource.java
浏览文件 @
b6d3eb21
...
@@ -47,18 +47,22 @@ public class SysRoleResource {
...
@@ -47,18 +47,22 @@ public class SysRoleResource {
@Lazy
@Lazy
public
SysRoleMapping
sysroleMapping
;
public
SysRoleMapping
sysroleMapping
;
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysRole-Save-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysRole-Create-all')"
)
@ApiOperation
(
value
=
"保存系统角色"
,
tags
=
{
"系统角色"
},
notes
=
"保存系统角色"
)
@ApiOperation
(
value
=
"新建系统角色"
,
tags
=
{
"系统角色"
},
notes
=
"新建系统角色"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysroles/save"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysroles"
)
public
ResponseEntity
<
Boolean
>
save
(
@RequestBody
SysRoleDTO
sysroledto
)
{
@Transactional
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
sysroleService
.
save
(
sysroleMapping
.
toDomain
(
sysroledto
)));
public
ResponseEntity
<
SysRoleDTO
>
create
(
@RequestBody
SysRoleDTO
sysroledto
)
{
SysRole
domain
=
sysroleMapping
.
toDomain
(
sysroledto
);
sysroleService
.
create
(
domain
);
SysRoleDTO
dto
=
sysroleMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysRole-
Sav
e-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysRole-
Creat
e-all')"
)
@ApiOperation
(
value
=
"批量
保存系统角色"
,
tags
=
{
"系统角色"
},
notes
=
"批量保存
系统角色"
)
@ApiOperation
(
value
=
"批量
新建系统角色"
,
tags
=
{
"系统角色"
},
notes
=
"批量新建
系统角色"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysroles/
save
batch"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysroles/batch"
)
public
ResponseEntity
<
Boolean
>
sav
eBatch
(
@RequestBody
List
<
SysRoleDTO
>
sysroledtos
)
{
public
ResponseEntity
<
Boolean
>
creat
eBatch
(
@RequestBody
List
<
SysRoleDTO
>
sysroledtos
)
{
sysroleService
.
sav
eBatch
(
sysroleMapping
.
toDomain
(
sysroledtos
));
sysroleService
.
creat
eBatch
(
sysroleMapping
.
toDomain
(
sysroledtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
...
@@ -83,34 +87,6 @@ public class SysRoleResource {
...
@@ -83,34 +87,6 @@ public class SysRoleResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysRole-Create-all')"
)
@ApiOperation
(
value
=
"新建系统角色"
,
tags
=
{
"系统角色"
},
notes
=
"新建系统角色"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysroles"
)
@Transactional
public
ResponseEntity
<
SysRoleDTO
>
create
(
@RequestBody
SysRoleDTO
sysroledto
)
{
SysRole
domain
=
sysroleMapping
.
toDomain
(
sysroledto
);
sysroleService
.
create
(
domain
);
SysRoleDTO
dto
=
sysroleMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysRole-Create-all')"
)
@ApiOperation
(
value
=
"批量新建系统角色"
,
tags
=
{
"系统角色"
},
notes
=
"批量新建系统角色"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysroles/batch"
)
public
ResponseEntity
<
Boolean
>
createBatch
(
@RequestBody
List
<
SysRoleDTO
>
sysroledtos
)
{
sysroleService
.
createBatch
(
sysroleMapping
.
toDomain
(
sysroledtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysRole-Get-all')"
)
@ApiOperation
(
value
=
"获取系统角色"
,
tags
=
{
"系统角色"
},
notes
=
"获取系统角色"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/sysroles/{sysrole_id}"
)
public
ResponseEntity
<
SysRoleDTO
>
get
(
@PathVariable
(
"sysrole_id"
)
String
sysrole_id
)
{
SysRole
domain
=
sysroleService
.
get
(
sysrole_id
);
SysRoleDTO
dto
=
sysroleMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysRole-Remove-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysRole-Remove-all')"
)
@ApiOperation
(
value
=
"删除系统角色"
,
tags
=
{
"系统角色"
},
notes
=
"删除系统角色"
)
@ApiOperation
(
value
=
"删除系统角色"
,
tags
=
{
"系统角色"
},
notes
=
"删除系统角色"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/sysroles/{sysrole_id}"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/sysroles/{sysrole_id}"
)
...
@@ -127,6 +103,15 @@ public class SysRoleResource {
...
@@ -127,6 +103,15 @@ public class SysRoleResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysRole-Get-all')"
)
@ApiOperation
(
value
=
"获取系统角色"
,
tags
=
{
"系统角色"
},
notes
=
"获取系统角色"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/sysroles/{sysrole_id}"
)
public
ResponseEntity
<
SysRoleDTO
>
get
(
@PathVariable
(
"sysrole_id"
)
String
sysrole_id
)
{
SysRole
domain
=
sysroleService
.
get
(
sysrole_id
);
SysRoleDTO
dto
=
sysroleMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"获取系统角色草稿"
,
tags
=
{
"系统角色"
},
notes
=
"获取系统角色草稿"
)
@ApiOperation
(
value
=
"获取系统角色草稿"
,
tags
=
{
"系统角色"
},
notes
=
"获取系统角色草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/sysroles/getdraft"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/sysroles/getdraft"
)
public
ResponseEntity
<
SysRoleDTO
>
getDraft
()
{
public
ResponseEntity
<
SysRoleDTO
>
getDraft
()
{
...
@@ -139,7 +124,22 @@ public class SysRoleResource {
...
@@ -139,7 +124,22 @@ public class SysRoleResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
sysroleService
.
checkKey
(
sysroleMapping
.
toDomain
(
sysroledto
)));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
sysroleService
.
checkKey
(
sysroleMapping
.
toDomain
(
sysroledto
)));
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysRole-searchDefault-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysRole-Save-all')"
)
@ApiOperation
(
value
=
"保存系统角色"
,
tags
=
{
"系统角色"
},
notes
=
"保存系统角色"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysroles/save"
)
public
ResponseEntity
<
Boolean
>
save
(
@RequestBody
SysRoleDTO
sysroledto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
sysroleService
.
save
(
sysroleMapping
.
toDomain
(
sysroledto
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysRole-Save-all')"
)
@ApiOperation
(
value
=
"批量保存系统角色"
,
tags
=
{
"系统角色"
},
notes
=
"批量保存系统角色"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysroles/savebatch"
)
public
ResponseEntity
<
Boolean
>
saveBatch
(
@RequestBody
List
<
SysRoleDTO
>
sysroledtos
)
{
sysroleService
.
saveBatch
(
sysroleMapping
.
toDomain
(
sysroledtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysRole-searchDefault-all') and hasPermission(#context,'ibzuaa-SysRole-Get')"
)
@ApiOperation
(
value
=
"获取DEFAULT"
,
tags
=
{
"系统角色"
}
,
notes
=
"获取DEFAULT"
)
@ApiOperation
(
value
=
"获取DEFAULT"
,
tags
=
{
"系统角色"
}
,
notes
=
"获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/sysroles/fetchdefault"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/sysroles/fetchdefault"
)
public
ResponseEntity
<
List
<
SysRoleDTO
>>
fetchDefault
(
SysRoleSearchContext
context
)
{
public
ResponseEntity
<
List
<
SysRoleDTO
>>
fetchDefault
(
SysRoleSearchContext
context
)
{
...
@@ -152,7 +152,7 @@ public class SysRoleResource {
...
@@ -152,7 +152,7 @@ public class SysRoleResource {
.
body
(
list
);
.
body
(
list
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysRole-searchDefault-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysRole-searchDefault-all')
and hasPermission(#context,'ibzuaa-SysRole-Get')
"
)
@ApiOperation
(
value
=
"查询DEFAULT"
,
tags
=
{
"系统角色"
}
,
notes
=
"查询DEFAULT"
)
@ApiOperation
(
value
=
"查询DEFAULT"
,
tags
=
{
"系统角色"
}
,
notes
=
"查询DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysroles/searchdefault"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysroles/searchdefault"
)
public
ResponseEntity
<
Page
<
SysRoleDTO
>>
searchDefault
(
@RequestBody
SysRoleSearchContext
context
)
{
public
ResponseEntity
<
Page
<
SysRoleDTO
>>
searchDefault
(
@RequestBody
SysRoleSearchContext
context
)
{
...
...
ibzuaa-provider/ibzuaa-provider-api/src/main/java/cn/ibizlab/api/rest/SysUserResource.java
浏览文件 @
b6d3eb21
...
@@ -47,19 +47,22 @@ public class SysUserResource {
...
@@ -47,19 +47,22 @@ public class SysUserResource {
@Lazy
@Lazy
public
SysUserMapping
sysuserMapping
;
public
SysUserMapping
sysuserMapping
;
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUser-
Remov
e-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUser-
Creat
e-all')"
)
@ApiOperation
(
value
=
"
删除系统用户"
,
tags
=
{
"系统用户"
},
notes
=
"删除
系统用户"
)
@ApiOperation
(
value
=
"
新建系统用户"
,
tags
=
{
"系统用户"
},
notes
=
"新建
系统用户"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/sysusers/{sysuser_id}
"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysusers
"
)
@Transactional
@Transactional
public
ResponseEntity
<
Boolean
>
remove
(
@PathVariable
(
"sysuser_id"
)
String
sysuser_id
)
{
public
ResponseEntity
<
SysUserDTO
>
create
(
@RequestBody
SysUserDTO
sysuserdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
sysuserService
.
remove
(
sysuser_id
));
SysUser
domain
=
sysuserMapping
.
toDomain
(
sysuserdto
);
sysuserService
.
create
(
domain
);
SysUserDTO
dto
=
sysuserMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUser-
Remov
e-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUser-
Creat
e-all')"
)
@ApiOperation
(
value
=
"批量
删除系统用户"
,
tags
=
{
"系统用户"
},
notes
=
"批量删除
系统用户"
)
@ApiOperation
(
value
=
"批量
新建系统用户"
,
tags
=
{
"系统用户"
},
notes
=
"批量新建
系统用户"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/sysusers/batch"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysusers/batch"
)
public
ResponseEntity
<
Boolean
>
removeBatch
(
@RequestBody
List
<
String
>
id
s
)
{
public
ResponseEntity
<
Boolean
>
createBatch
(
@RequestBody
List
<
SysUserDTO
>
sysuserdto
s
)
{
sysuserService
.
removeBatch
(
ids
);
sysuserService
.
createBatch
(
sysuserMapping
.
toDomain
(
sysuserdtos
)
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
...
@@ -83,10 +86,20 @@ public class SysUserResource {
...
@@ -83,10 +86,20 @@ public class SysUserResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@ApiOperation
(
value
=
"检查系统用户"
,
tags
=
{
"系统用户"
},
notes
=
"检查系统用户"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUser-Remove-all')"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysusers/checkkey"
)
@ApiOperation
(
value
=
"删除系统用户"
,
tags
=
{
"系统用户"
},
notes
=
"删除系统用户"
)
public
ResponseEntity
<
Boolean
>
checkKey
(
@RequestBody
SysUserDTO
sysuserdto
)
{
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/sysusers/{sysuser_id}"
)
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
sysuserService
.
checkKey
(
sysuserMapping
.
toDomain
(
sysuserdto
)));
@Transactional
public
ResponseEntity
<
Boolean
>
remove
(
@PathVariable
(
"sysuser_id"
)
String
sysuser_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
sysuserService
.
remove
(
sysuser_id
));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUser-Remove-all')"
)
@ApiOperation
(
value
=
"批量删除系统用户"
,
tags
=
{
"系统用户"
},
notes
=
"批量删除系统用户"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/sysusers/batch"
)
public
ResponseEntity
<
Boolean
>
removeBatch
(
@RequestBody
List
<
String
>
ids
)
{
sysuserService
.
removeBatch
(
ids
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUser-Get-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUser-Get-all')"
)
...
@@ -98,6 +111,18 @@ public class SysUserResource {
...
@@ -98,6 +111,18 @@ public class SysUserResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
}
@ApiOperation
(
value
=
"获取系统用户草稿"
,
tags
=
{
"系统用户"
},
notes
=
"获取系统用户草稿"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/sysusers/getdraft"
)
public
ResponseEntity
<
SysUserDTO
>
getDraft
()
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
sysuserMapping
.
toDto
(
sysuserService
.
getDraft
(
new
SysUser
())));
}
@ApiOperation
(
value
=
"检查系统用户"
,
tags
=
{
"系统用户"
},
notes
=
"检查系统用户"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysusers/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKey
(
@RequestBody
SysUserDTO
sysuserdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
sysuserService
.
checkKey
(
sysuserMapping
.
toDomain
(
sysuserdto
)));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUser-Save-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUser-Save-all')"
)
@ApiOperation
(
value
=
"保存系统用户"
,
tags
=
{
"系统用户"
},
notes
=
"保存系统用户"
)
@ApiOperation
(
value
=
"保存系统用户"
,
tags
=
{
"系统用户"
},
notes
=
"保存系统用户"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysusers/save"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysusers/save"
)
...
@@ -113,32 +138,7 @@ public class SysUserResource {
...
@@ -113,32 +138,7 @@ public class SysUserResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
}
@ApiOperation
(
value
=
"获取系统用户草稿"
,
tags
=
{
"系统用户"
},
notes
=
"获取系统用户草稿"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUser-searchDefault-all') and hasPermission(#context,'ibzuaa-SysUser-Get')"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/sysusers/getdraft"
)
public
ResponseEntity
<
SysUserDTO
>
getDraft
()
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
sysuserMapping
.
toDto
(
sysuserService
.
getDraft
(
new
SysUser
())));
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUser-Create-all')"
)
@ApiOperation
(
value
=
"新建系统用户"
,
tags
=
{
"系统用户"
},
notes
=
"新建系统用户"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysusers"
)
@Transactional
public
ResponseEntity
<
SysUserDTO
>
create
(
@RequestBody
SysUserDTO
sysuserdto
)
{
SysUser
domain
=
sysuserMapping
.
toDomain
(
sysuserdto
);
sysuserService
.
create
(
domain
);
SysUserDTO
dto
=
sysuserMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUser-Create-all')"
)
@ApiOperation
(
value
=
"批量新建系统用户"
,
tags
=
{
"系统用户"
},
notes
=
"批量新建系统用户"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysusers/batch"
)
public
ResponseEntity
<
Boolean
>
createBatch
(
@RequestBody
List
<
SysUserDTO
>
sysuserdtos
)
{
sysuserService
.
createBatch
(
sysuserMapping
.
toDomain
(
sysuserdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUser-searchDefault-all')"
)
@ApiOperation
(
value
=
"获取DEFAULT"
,
tags
=
{
"系统用户"
}
,
notes
=
"获取DEFAULT"
)
@ApiOperation
(
value
=
"获取DEFAULT"
,
tags
=
{
"系统用户"
}
,
notes
=
"获取DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/sysusers/fetchdefault"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/sysusers/fetchdefault"
)
public
ResponseEntity
<
List
<
SysUserDTO
>>
fetchDefault
(
SysUserSearchContext
context
)
{
public
ResponseEntity
<
List
<
SysUserDTO
>>
fetchDefault
(
SysUserSearchContext
context
)
{
...
@@ -151,7 +151,7 @@ public class SysUserResource {
...
@@ -151,7 +151,7 @@ public class SysUserResource {
.
body
(
list
);
.
body
(
list
);
}
}
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUser-searchDefault-all')"
)
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SysUser-searchDefault-all')
and hasPermission(#context,'ibzuaa-SysUser-Get')
"
)
@ApiOperation
(
value
=
"查询DEFAULT"
,
tags
=
{
"系统用户"
}
,
notes
=
"查询DEFAULT"
)
@ApiOperation
(
value
=
"查询DEFAULT"
,
tags
=
{
"系统用户"
}
,
notes
=
"查询DEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysusers/searchdefault"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sysusers/searchdefault"
)
public
ResponseEntity
<
Page
<
SysUserDTO
>>
searchDefault
(
@RequestBody
SysUserSearchContext
context
)
{
public
ResponseEntity
<
Page
<
SysUserDTO
>>
searchDefault
(
@RequestBody
SysUserSearchContext
context
)
{
...
...
ibzuaa-provider/ibzuaa-provider-api/src/main/java/cn/ibizlab/api/rest/SysUserRoleResource.java
浏览文件 @
b6d3eb21
此差异已折叠。
点击以展开。
ibzuaa-util/src/main/java/cn/ibizlab/util/security/AuthPermissionEvaluator.java
浏览文件 @
b6d3eb21
package
cn
.
ibizlab
.
util
.
security
;
package
cn
.
ibizlab
.
util
.
security
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
lombok.SneakyThrows
;
import
cn.ibizlab.util.annotation.DEField
;
import
cn.ibizlab.util.annotation.DEField
;
import
cn.ibizlab.util.domain.EntityBase
;
import
cn.ibizlab.util.domain.EntityBase
;
import
cn.ibizlab.util.enums.DEPredefinedFieldType
;
import
cn.ibizlab.util.enums.DEPredefinedFieldType
;
import
cn.ibizlab.util.filter.QueryWrapperContext
;
import
cn.ibizlab.util.helper.DEFieldCacheMap
;
import
cn.ibizlab.util.helper.DEFieldCacheMap
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.security.access.PermissionEvaluator
;
import
org.springframework.security.access.PermissionEvaluator
;
...
@@ -11,7 +14,10 @@ import org.springframework.security.core.GrantedAuthority;
...
@@ -11,7 +14,10 @@ import org.springframework.security.core.GrantedAuthority;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.lang.reflect.ParameterizedType
;
import
java.lang.reflect.Type
;
import
java.util.*
;
import
java.util.*
;
import
java.util.function.Consumer
;
/**
/**
* spring security 权限管理类
* spring security 权限管理类
...
@@ -23,44 +29,144 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
...
@@ -23,44 +29,144 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
@Value
(
"${ibiz.enablePermissionValid:false}"
)
@Value
(
"${ibiz.enablePermissionValid:false}"
)
boolean
enablePermissionValid
;
//是否开启权限校验
boolean
enablePermissionValid
;
//是否开启权限校验
/**
/**
*
实体行为
鉴权
*
服务接口
鉴权
* @param authentication
* @param authentication
用户
* @param entity
* @param entity
实体
* @param action
* @param action
操作
* @return
* @return
*/
*/
@Override
@Override
@SneakyThrows
public
boolean
hasPermission
(
Authentication
authentication
,
Object
entity
,
Object
action
)
{
public
boolean
hasPermission
(
Authentication
authentication
,
Object
entity
,
Object
action
)
{
if
(!
enablePermissionValid
)
//未开启权限校验、超级管理员则不进行权限检查
return
true
;
if
(
AuthenticationUser
.
getAuthenticationUser
().
getSuperuser
()==
1
||
!
enablePermissionValid
)
Object
principal
=
authentication
.
getPrincipal
();
if
(
ObjectUtils
.
isEmpty
(
principal
))
return
false
;
AuthenticationUser
authenticationUser
=
(
AuthenticationUser
)
authentication
.
getPrincipal
();
if
(
authenticationUser
.
getSuperuser
()==
1
)
return
true
;
return
true
;
String
strAction
=
String
.
valueOf
(
action
);
String
strAction
=
String
.
valueOf
(
action
);
Set
<
String
>
userAuthorities
=
getAuthorities
(
authentication
,
strAction
);
Set
<
String
>
userAuthorities
=
getAuthorities
(
authentication
,
strAction
);
if
(
userAuthorities
.
size
()==
0
)
if
(
userAuthorities
.
size
()==
0
)
return
false
;
return
false
;
//拥有全部数据访问权限时,则跳过权限检查
if
(
isAllData
(
strAction
,
userAuthorities
)){
if
(
isAllData
(
strAction
,
userAuthorities
)){
return
true
;
return
true
;
}
}
if
(
entity
instanceof
ArrayList
){
if
(
entity
instanceof
ArrayList
){
List
<
EntityBase
>
entities
=
(
List
<
EntityBase
>)
entity
;
List
<
EntityBase
>
entities
=
(
List
<
EntityBase
>)
entity
;
for
(
EntityBase
entityBase:
entities
){
for
(
EntityBase
entityBase:
entities
){
boolean
result
=
actionValid
(
entityBase
,
strAction
,
userAuthorities
);
boolean
result
=
actionValid
(
entityBase
,
strAction
,
userAuthorities
,
authenticationUser
);
if
(!
result
){
if
(!
result
){
return
false
;
return
false
;
}
}
}
}
}
}
else
if
(
entity
instanceof
QueryWrapperContext
){
QueryWrapperContext
queryWrapperContext
=
(
QueryWrapperContext
)
entity
;
setPermissionCondToSearchContext
(
getEntity
(
queryWrapperContext
),
queryWrapperContext
,
userAuthorities
,
authenticationUser
);
}
else
{
else
{
EntityBase
entityBase
=
(
EntityBase
)
entity
;
EntityBase
entityBase
=
(
EntityBase
)
entity
;
return
actionValid
(
entityBase
,
strAction
,
userAuthorities
);
return
actionValid
(
entityBase
,
strAction
,
userAuthorities
,
authenticationUser
);
}
}
return
true
;
return
true
;
}
}
/**
* 获取实体信息
* @param qc
* @return
*/
@SneakyThrows
private
EntityBase
getEntity
(
QueryWrapperContext
qc
){
EntityBase
entity
=
null
;
Type
type
=
qc
.
getClass
().
getGenericSuperclass
();
if
(
type
instanceof
ParameterizedType
){
ParameterizedType
parameterizedType
=
(
ParameterizedType
)
qc
.
getClass
().
getGenericSuperclass
();
Type
[]
typeArr
=
parameterizedType
.
getActualTypeArguments
();
if
(
typeArr
.
length
>
0
){
Class
<
EntityBase
>
entityClass
=
(
Class
)
typeArr
[
0
];
return
entityClass
.
newInstance
();
}
}
return
entity
;
}
/**
* 在searchContext中拼接权限条件
* @param entity 实体
* @param qc 查询上下文
* @param userAuthorities 用户权限
* @param authenticationUser 当前用户
*/
@SneakyThrows
private
void
setPermissionCondToSearchContext
(
EntityBase
entity
,
QueryWrapperContext
qc
,
Set
<
String
>
userAuthorities
,
AuthenticationUser
authenticationUser
){
if
(
entity
==
null
)
return
;
Map
<
String
,
String
>
permissionField
=
getPermissionField
(
entity
);
//获取组织、部门预置属性
String
orgField
=
permissionField
.
get
(
"orgfield"
);
String
orgDeptField
=
permissionField
.
get
(
"orgsecfield"
);
String
createManField
=
permissionField
.
get
(
"createmanfield"
);
Map
<
String
,
Set
<
String
>>
userInfo
=
authenticationUser
.
getOrgInfo
();
Set
<
String
>
orgParent
=
userInfo
.
get
(
"parentorg"
);
Set
<
String
>
orgChild
=
userInfo
.
get
(
"suborg"
);
Set
<
String
>
orgDeptParent
=
userInfo
.
get
(
"parentdept"
);
Set
<
String
>
orgDeptChild
=
userInfo
.
get
(
"subdept"
);
Set
<
String
>
userOrg
=
new
HashSet
<>();
Set
<
String
>
userOrgDept
=
new
HashSet
<>();
Set
<
String
>
userCreateMan
=
new
HashSet
<>();
for
(
String
authority:
userAuthorities
){
if
(
authority
.
endsWith
(
"curorg"
)){
//本单位
userOrg
.
add
(
authenticationUser
.
getOrgid
());
}
else
if
(
authority
.
endsWith
(
"porg"
)){
//上级单位
userOrg
.
addAll
(
orgParent
);
}
else
if
(
authority
.
endsWith
(
"sorg"
)){
//下级单位
userOrg
.
addAll
(
orgChild
);
}
else
if
(
authority
.
endsWith
(
"curorgdept"
)){
//本部门
userOrgDept
.
add
(
authenticationUser
.
getMdeptid
());
}
else
if
(
authority
.
endsWith
(
"porgdept"
)){
//上级部门
userOrgDept
.
addAll
(
orgDeptParent
);
}
else
if
(
authority
.
endsWith
(
"sorgdept"
)){
//下级部门
userOrgDept
.
addAll
(
orgDeptChild
);
}
else
if
(
authority
.
endsWith
(
"createman"
)){
userCreateMan
.
add
(
authority
);
}
}
if
(
userOrg
.
size
()==
0
&&
userOrgDept
.
size
()==
0
&&
userCreateMan
.
size
()==
0
){
qc
.
getSelectCond
().
apply
(
"1<>1"
);
}
else
{
Consumer
<
QueryWrapper
>
consumer
=
qw
->
{
if
(
userOrg
.
size
()>
0
){
Consumer
<
QueryWrapper
>
org
=
orgQw
->
{
orgQw
.
in
(
orgField
,
userOrg
);
};
qw
.
or
(
org
);
}
if
(
userOrgDept
.
size
()>
0
){
Consumer
<
QueryWrapper
>
dept
=
deptQw
->
{
deptQw
.
in
(
orgDeptField
,
userOrgDept
);
};
qw
.
or
(
dept
);
}
if
(
userCreateMan
.
size
()>
0
){
Consumer
<
QueryWrapper
>
createMan
=
createManQw
->
{
createManQw
.
eq
(
createManField
,
authenticationUser
.
getUserid
());
};
qw
.
or
(
createMan
);
}
};
qc
.
getSelectCond
().
and
(
consumer
);
}
}
@Override
@Override
public
boolean
hasPermission
(
Authentication
authentication
,
Serializable
id
,
String
action
,
Object
params
)
{
public
boolean
hasPermission
(
Authentication
authentication
,
Serializable
id
,
String
action
,
Object
params
)
{
...
@@ -106,13 +212,12 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
...
@@ -106,13 +212,12 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
* @param userAuthorities
* @param userAuthorities
* @return
* @return
*/
*/
private
boolean
actionValid
(
EntityBase
entity
,
String
action
,
Set
<
String
>
userAuthorities
){
private
boolean
actionValid
(
EntityBase
entity
,
String
action
,
Set
<
String
>
userAuthorities
,
AuthenticationUser
authenticationUser
){
Map
<
String
,
String
>
permissionField
=
getPermissionField
(
entity
);
//获取组织、部门预置属性
Map
<
String
,
String
>
permissionField
=
getPermissionField
(
entity
);
//获取组织、部门预置属性
String
orgField
=
permissionField
.
get
(
"orgfield"
);
String
orgField
=
permissionField
.
get
(
"orgfield"
);
String
orgDeptField
=
permissionField
.
get
(
"orgsecfield"
);
String
orgDeptField
=
permissionField
.
get
(
"orgsecfield"
);
String
createManField
=
permissionField
.
get
(
"createmanfield"
);
String
createManField
=
permissionField
.
get
(
"createmanfield"
);
AuthenticationUser
authenticationUser
=
AuthenticationUser
.
getAuthenticationUser
();
Map
<
String
,
Set
<
String
>>
userInfo
=
authenticationUser
.
getOrgInfo
();
Map
<
String
,
Set
<
String
>>
userInfo
=
authenticationUser
.
getOrgInfo
();
Set
<
String
>
orgParent
=
userInfo
.
get
(
"parentorg"
);
Set
<
String
>
orgParent
=
userInfo
.
get
(
"parentorg"
);
Set
<
String
>
orgChild
=
userInfo
.
get
(
"suborg"
);
Set
<
String
>
orgChild
=
userInfo
.
get
(
"suborg"
);
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录