Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzuaa
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzuaa
提交
26267e0f
提交
26267e0f
编写于
5月 21, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
laizhilong 发布系统代码
上级
75ee22f3
变更
38
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
38 个修改的文件
包含
1904 行增加
和
587 行删除
+1904
-587
en-US.ts
app_web/src/locale/lang/en-US.ts
+3
-4
zh-CN.ts
app_web/src/locale/lang/zh-CN.ts
+3
-4
sys-authlog_en_US.ts
app_web/src/locale/lanres/sys-authlog/sys-authlog_en_US.ts
+14
-0
sys-authlog_zh_CN.ts
app_web/src/locale/lanres/sys-authlog/sys-authlog_zh_CN.ts
+13
-0
sys-role_en_US.ts
app_web/src/locale/lanres/sys-role/sys-role_en_US.ts
+1
-1
sys-role_zh_CN.ts
app_web/src/locale/lanres/sys-role/sys-role_zh_CN.ts
+1
-1
main-appmenu.ts
app_web/src/mock/app/main-appmenu/main-appmenu.ts
+2
-56
sys-authlogs.ts
app_web/src/mock/entity/sys-authlogs/sys-authlogs.ts
+380
-0
index.ts
app_web/src/mock/index.ts
+1
-0
page-register.ts
app_web/src/pages/uaa/index/page-register.ts
+1
-8
router.ts
app_web/src/pages/uaa/index/router.ts
+0
-283
entity-service-register.ts
app_web/src/service/entity-service-register.ts
+2
-1
sys-authlog-service-base.ts
app_web/src/service/sys-authlog/sys-authlog-service-base.ts
+179
-0
sys-authlog-service.ts
app_web/src/service/sys-authlog/sys-authlog-service.ts
+25
-0
state.ts
app_web/src/store/modules/view-action/state.ts
+0
-3
sys-authlog-ui-service-base.ts
.../src/uiservice/sys-authlog/sys-authlog-ui-service-base.ts
+210
-0
sys-authlog-ui-service.ts
app_web/src/uiservice/sys-authlog/sys-authlog-ui-service.ts
+21
-0
ui-service-register.ts
app_web/src/uiservice/ui-service-register.ts
+2
-1
main-appmenu-base.vue
app_web/src/widgets/app/main-appmenu/main-appmenu-base.vue
+0
-63
main-appmenu-model.ts
app_web/src/widgets/app/main-appmenu/main-appmenu-model.ts
+2
-92
main-form-base.vue
app_web/src/widgets/sys-role/main-form/main-form-base.vue
+23
-30
main-form-model.ts
app_web/src/widgets/sys-role/main-form/main-form-model.ts
+5
-5
main-form-service.ts
app_web/src/widgets/sys-role/main-form/main-form-service.ts
+0
-1
config.xml
config.xml
+0
-5
Dockerfile
ibzuaa-app/ibzuaa-app-web/src/main/docker/Dockerfile
+1
-1
ibzuaa-app-web.yaml
...aa-app/ibzuaa-app-web/src/main/docker/ibzuaa-app-web.yaml
+1
-15
application-web-prod.yml
...bzuaa-app-web/src/main/resources/application-web-prod.yml
+4
-0
SYS_AUTHLOG.java
...src/main/java/cn/ibizlab/core/uaa/domain/SYS_AUTHLOG.java
+159
-0
SYS_AUTHLOGSearchContext.java
.../cn/ibizlab/core/uaa/filter/SYS_AUTHLOGSearchContext.java
+98
-0
SYS_AUTHLOGMapper.java
...in/java/cn/ibizlab/core/uaa/mapper/SYS_AUTHLOGMapper.java
+65
-0
ISYS_AUTHLOGService.java
...java/cn/ibizlab/core/uaa/service/ISYS_AUTHLOGService.java
+57
-0
SYS_AUTHLOGServiceImpl.java
...ibizlab/core/uaa/service/impl/SYS_AUTHLOGServiceImpl.java
+178
-0
h2_table.xml
ibzuaa-core/src/main/resources/liquibase/h2_table.xml
+37
-12
SYS_AUTHLOGMapper.xml
...in/resources/mapper/uaa/sys_authlog/SYS_AUTHLOGMapper.xml
+41
-0
systemResource.json
...aa-core/src/main/resources/permission/systemResource.json
+9
-1
SYS_AUTHLOGDTO.java
...-api/src/main/java/cn/ibizlab/api/dto/SYS_AUTHLOGDTO.java
+158
-0
SYS_AUTHLOGMapping.java
.../main/java/cn/ibizlab/api/mapping/SYS_AUTHLOGMapping.java
+16
-0
SYS_AUTHLOGResource.java
...rc/main/java/cn/ibizlab/api/rest/SYS_AUTHLOGResource.java
+192
-0
未找到文件。
app_web/src/locale/lang/en-US.ts
浏览文件 @
26267e0f
import
sys_authlog_en_US
from
'@locale/lanres/sys-authlog/sys-authlog_en_US'
;
import
sys_role_permission_en_US
from
'@locale/lanres/sys-role-permission/sys-role-permission_en_US'
;
import
sys_permission_en_US
from
'@locale/lanres/sys-permission/sys-permission_en_US'
;
import
sys_user_role_en_US
from
'@locale/lanres/sys-user-role/sys-user-role_en_US'
;
...
...
@@ -62,15 +63,13 @@ export default {
},
menus
:
{
main
:
{
menuitem3
:
'用户
管理
'
,
menuitem3
:
'用户'
,
menuitem6
:
'角色'
,
menuitem7
:
'用户角色'
,
menuitem10
:
'权限'
,
menuitem1
:
'角色权限'
,
},
},
},
entities
:
{
sys_authlog
:
sys_authlog_en_US
,
sys_role_permission
:
sys_role_permission_en_US
,
sys_permission
:
sys_permission_en_US
,
sys_user_role
:
sys_user_role_en_US
,
...
...
app_web/src/locale/lang/zh-CN.ts
浏览文件 @
26267e0f
import
sys_authlog_zh_CN
from
'@locale/lanres/sys-authlog/sys-authlog_zh_CN'
;
import
sys_role_permission_zh_CN
from
'@locale/lanres/sys-role-permission/sys-role-permission_zh_CN'
;
import
sys_permission_zh_CN
from
'@locale/lanres/sys-permission/sys-permission_zh_CN'
;
import
sys_user_role_zh_CN
from
'@locale/lanres/sys-user-role/sys-user-role_zh_CN'
;
...
...
@@ -62,15 +63,13 @@ export default {
},
menus
:
{
main
:
{
menuitem3
:
'用户
管理
'
,
menuitem3
:
'用户'
,
menuitem6
:
'角色'
,
menuitem7
:
'用户角色'
,
menuitem10
:
'权限'
,
menuitem1
:
'角色权限'
,
},
},
},
entities
:
{
sys_authlog
:
sys_authlog_zh_CN
,
sys_role_permission
:
sys_role_permission_zh_CN
,
sys_permission
:
sys_permission_zh_CN
,
sys_user_role
:
sys_user_role_zh_CN
,
...
...
app_web/src/locale/lanres/sys-authlog/sys-authlog_en_US.ts
0 → 100644
浏览文件 @
26267e0f
export
default
{
fields
:
{
logid
:
'标识'
,
username
:
'用户全局名'
,
personname
:
'用户名称'
,
domain
:
'域'
,
authtime
:
'认证时间'
,
ipaddr
:
'IP地址'
,
macaddr
:
'MAC地址'
,
useragent
:
'客户端'
,
authcode
:
'认证结果'
,
},
};
\ No newline at end of file
app_web/src/locale/lanres/sys-authlog/sys-authlog_zh_CN.ts
0 → 100644
浏览文件 @
26267e0f
export
default
{
fields
:
{
logid
:
'标识'
,
username
:
'用户全局名'
,
personname
:
'用户名称'
,
domain
:
'域'
,
authtime
:
'认证时间'
,
ipaddr
:
'IP地址'
,
macaddr
:
'MAC地址'
,
useragent
:
'客户端'
,
authcode
:
'认证结果'
,
},
};
\ No newline at end of file
app_web/src/locale/lanres/sys-role/sys-role_en_US.ts
浏览文件 @
26267e0f
...
...
@@ -54,9 +54,9 @@ export default {
srfuf
:
""
,
srfdeid
:
""
,
srfsourcekey
:
""
,
sys_roleid
:
"角色表标识"
,
sys_rolename
:
"角色表名称"
,
memo
:
"备注"
,
sys_roleid
:
"角色表标识"
,
},
uiactions
:
{
},
...
...
app_web/src/locale/lanres/sys-role/sys-role_zh_CN.ts
浏览文件 @
26267e0f
...
...
@@ -53,9 +53,9 @@ export default {
srfuf
:
''
,
srfdeid
:
''
,
srfsourcekey
:
''
,
sys_roleid
:
'角色表标识'
,
sys_rolename
:
'角色表名称'
,
memo
:
'备注'
,
sys_roleid
:
'角色表标识'
,
},
uiactions
:
{
},
...
...
app_web/src/mock/app/main-appmenu/main-appmenu.ts
浏览文件 @
26267e0f
...
...
@@ -13,10 +13,10 @@ mock.onGet('v7/mainappmenu').reply((config: any) => {
{
id
:
'f59655c22753740bbcf200f5cfee8a54'
,
name
:
'menuitem3'
,
text
:
'用户
管理
'
,
text
:
'用户'
,
type
:
'MENUITEM'
,
counterid
:
''
,
tooltip
:
'用户
管理
'
,
tooltip
:
'用户'
,
expanded
:
false
,
separator
:
false
,
hidden
:
false
,
...
...
@@ -45,60 +45,6 @@ mock.onGet('v7/mainappmenu').reply((config: any) => {
textcls
:
''
,
appfunctag
:
'Auto10'
,
resourcetag
:
''
,
},
{
id
:
'aa34fa65ba436d9267830d242fcda6c5'
,
name
:
'menuitem7'
,
text
:
'用户角色'
,
type
:
'MENUITEM'
,
counterid
:
''
,
tooltip
:
'用户角色'
,
expanded
:
false
,
separator
:
false
,
hidden
:
false
,
hidesidebar
:
false
,
opendefault
:
false
,
iconcls
:
''
,
icon
:
''
,
textcls
:
''
,
appfunctag
:
'Auto8'
,
resourcetag
:
''
,
},
{
id
:
'6177ea33605de953767d48b120145efb'
,
name
:
'menuitem10'
,
text
:
'权限'
,
type
:
'MENUITEM'
,
counterid
:
''
,
tooltip
:
'权限'
,
expanded
:
false
,
separator
:
false
,
hidden
:
false
,
hidesidebar
:
false
,
opendefault
:
false
,
iconcls
:
'fa fa-certificate'
,
icon
:
''
,
textcls
:
''
,
appfunctag
:
'Auto7'
,
resourcetag
:
''
,
},
{
id
:
'2794bbcfc7b3c81b431d1f2e808a793b'
,
name
:
'menuitem1'
,
text
:
'角色权限'
,
type
:
'MENUITEM'
,
counterid
:
''
,
tooltip
:
'角色权限'
,
expanded
:
false
,
separator
:
false
,
hidden
:
false
,
hidesidebar
:
false
,
opendefault
:
false
,
iconcls
:
''
,
icon
:
''
,
textcls
:
''
,
appfunctag
:
'Auto1'
,
resourcetag
:
''
,
},
],
}];
...
...
app_web/src/mock/entity/sys-authlogs/sys-authlogs.ts
0 → 100644
浏览文件 @
26267e0f
此差异已折叠。
点击以展开。
app_web/src/mock/index.ts
浏览文件 @
26267e0f
...
...
@@ -7,6 +7,7 @@ import './login/login';
import
'./upload/upload'
;
// 实体级接口对象
import
'./entity/sys-authlogs/sys-authlogs'
;
import
'./entity/sys-role-permissions/sys-role-permissions'
;
import
'./entity/sys-permissions/sys-permissions'
;
import
'./entity/sys-user-roles/sys-user-roles'
;
...
...
app_web/src/pages/uaa/index/page-register.ts
浏览文件 @
26267e0f
export
const
PageComponents
=
{
install
(
Vue
:
any
,
opt
:
any
)
{
Vue
.
component
(
'sys-permissionpickup-grid-view'
,
()
=>
import
(
'@pages/uaa/sys-permissionpickup-grid-view/sys-permissionpickup-grid-view.vue'
));
Vue
.
component
(
'sys-rolepickup-view'
,
()
=>
import
(
'@pages/uaa/sys-rolepickup-view/sys-rolepickup-view.vue'
));
Vue
.
component
(
'sys-rolepickup-view'
,
()
=>
import
(
'@pages/uaa/sys-rolepickup-view/sys-rolepickup-view.vue'
));
Vue
.
component
(
'sys-role-permissioncustom-view'
,
()
=>
import
(
'@pages/uaa/sys-role-permissioncustom-view/sys-role-permissioncustom-view.vue'
));
Vue
.
component
(
'sys-usermpickup-view'
,
()
=>
import
(
'@pages/uaa/sys-usermpickup-view/sys-usermpickup-view.vue'
));
Vue
.
component
(
'sys-userpickup-grid-view'
,
()
=>
import
(
'@pages/uaa/sys-userpickup-grid-view/sys-userpickup-grid-view.vue'
));
Vue
.
component
(
'sys-roleedit-view'
,
()
=>
import
(
'@pages/uaa/sys-roleedit-view/sys-roleedit-view.vue'
));
Vue
.
component
(
'sys-user-roleedit-view'
,
()
=>
import
(
'@pages/uaa/sys-user-roleedit-view/sys-user-roleedit-view.vue'
));
Vue
.
component
(
'sys-permissionpickup-view'
,
()
=>
import
(
'@pages/uaa/sys-permissionpickup-view/sys-permissionpickup-view.vue'
));
Vue
.
component
(
'sys-rolempickup-view'
,
()
=>
import
(
'@pages/uaa/sys-rolempickup-view/sys-rolempickup-view.vue'
));
Vue
.
component
(
'sys-permissionedit-view'
,
()
=>
import
(
'@pages/uaa/sys-permissionedit-view/sys-permissionedit-view.vue'
));
Vue
.
component
(
'sys-role-permissiongrid-view'
,
()
=>
import
(
'@pages/uaa/sys-role-permissiongrid-view/sys-role-permissiongrid-view.vue'
));
Vue
.
component
(
'sys-userpickup-view'
,
()
=>
import
(
'@pages/uaa/sys-userpickup-view/sys-userpickup-view.vue'
));
Vue
.
component
(
'sys-rolegrid-view'
,
()
=>
import
(
'@pages/uaa/sys-rolegrid-view/sys-rolegrid-view.vue'
));
Vue
.
component
(
'sys-permissionmpickup-view'
,
()
=>
import
(
'@pages/uaa/sys-permissionmpickup-view/sys-permissionmpickup-view.vue'
));
Vue
.
component
(
'sys-useredit-view'
,
()
=>
import
(
'@pages/uaa/sys-useredit-view/sys-useredit-view.vue'
));
Vue
.
component
(
'sys-role-permissionedit-view'
,
()
=>
import
(
'@pages/uaa/sys-role-permissionedit-view/sys-role-permissionedit-view.vue'
));
Vue
.
component
(
'sys-user-rolegrid-view'
,
()
=>
import
(
'@pages/uaa/sys-user-rolegrid-view/sys-user-rolegrid-view.vue'
));
Vue
.
component
(
'sys-permissiongrid-view'
,
()
=>
import
(
'@pages/uaa/sys-permissiongrid-view/sys-permissiongrid-view.vue'
));
Vue
.
component
(
'sys-rolepickup-grid-view'
,
()
=>
import
(
'@pages/uaa/sys-rolepickup-grid-view/sys-rolepickup-grid-view.vue'
));
Vue
.
component
(
'sys-usergrid-view'
,
()
=>
import
(
'@pages/uaa/sys-usergrid-view/sys-usergrid-view.vue'
));
}
...
...
app_web/src/pages/uaa/index/router.ts
浏览文件 @
26267e0f
此差异已折叠。
点击以展开。
app_web/src/service/entity-service-register.ts
浏览文件 @
26267e0f
...
...
@@ -39,7 +39,8 @@ export class EntityServiceRegister {
* @memberof EntityServiceRegister
*/
protected
init
():
void
{
this
.
allEntityService
.
set
(
'sys_role_permission'
,
()
=>
import
(
'@/service/sys-role-permission/sys-role-permission-service'
));
this
.
allEntityService
.
set
(
'sys_authlog'
,
()
=>
import
(
'@/service/sys-authlog/sys-authlog-service'
));
this
.
allEntityService
.
set
(
'sys_role_permission'
,
()
=>
import
(
'@/service/sys-role-permission/sys-role-permission-service'
));
this
.
allEntityService
.
set
(
'sys_permission'
,
()
=>
import
(
'@/service/sys-permission/sys-permission-service'
));
this
.
allEntityService
.
set
(
'sys_user_role'
,
()
=>
import
(
'@/service/sys-user-role/sys-user-role-service'
));
this
.
allEntityService
.
set
(
'sys_user'
,
()
=>
import
(
'@/service/sys-user/sys-user-service'
));
...
...
app_web/src/service/sys-authlog/sys-authlog-service-base.ts
0 → 100644
浏览文件 @
26267e0f
import
{
Http
,
Util
}
from
'@/utils'
;
import
EntityService
from
'../entity-service'
;
/**
* 认证日志服务对象基类
*
* @export
* @class SYS_AUTHLOGServiceBase
* @extends {EntityServie}
*/
export
default
class
SYS_AUTHLOGServiceBase
extends
EntityService
{
/**
* Creates an instance of SYS_AUTHLOGServiceBase.
*
* @param {*} [opts={}]
* @memberof SYS_AUTHLOGServiceBase
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
}
/**
* 初始化基础数据
*
* @memberof SYS_AUTHLOGServiceBase
*/
public
initBasicData
(){
this
.
APPLYDEKEY
=
'sys_authlog'
;
this
.
APPDEKEY
=
'logid'
;
this
.
APPDENAME
=
'sys_authlogs'
;
this
.
APPDETEXT
=
'username'
;
this
.
APPNAME
=
'web'
;
this
.
SYSTEMNAME
=
'ibzuaa'
;
}
// 实体接口
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SYS_AUTHLOGServiceBase
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
get
(
`/sys_authlogs/
${
context
.
sys_authlog
}
/select`
,
isloading
);
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SYS_AUTHLOGServiceBase
*/
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sys_authlogs/getdraft`
,
isloading
);
res
.
data
.
sys_authlog
=
data
.
sys_authlog
;
return
res
;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SYS_AUTHLOGServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/sys_authlogs/
${
context
.
sys_authlog
}
`
,
data
,
isloading
);
return
res
;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SYS_AUTHLOGServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
delete
(
`/sys_authlogs/
${
context
.
sys_authlog
}
`
,
isloading
);
}
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SYS_AUTHLOGServiceBase
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sys_authlogs`
,
data
,
isloading
);
return
res
;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SYS_AUTHLOGServiceBase
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
post
(
`/sys_authlogs/
${
context
.
sys_authlog
}
/checkkey`
,
data
,
isloading
);
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SYS_AUTHLOGServiceBase
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sys_authlogs/
${
context
.
sys_authlog
}
`
,
isloading
);
return
res
;
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SYS_AUTHLOGServiceBase
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sys_authlogs/
${
context
.
sys_authlog
}
/save`
,
data
,
isloading
);
return
res
;
}
/**
* FetchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SYS_AUTHLOGServiceBase
*/
public
async
FetchDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/sys_authlogs/fetchdefault`
,
tempData
,
isloading
);
}
}
\ No newline at end of file
app_web/src/service/sys-authlog/sys-authlog-service.ts
0 → 100644
浏览文件 @
26267e0f
import
{
Http
,
Util
}
from
'@/utils'
;
import
SYS_AUTHLOGServiceBase
from
'./sys-authlog-service-base'
;
/**
* 认证日志服务对象
*
* @export
* @class SYS_AUTHLOGService
* @extends {SYS_AUTHLOGServiceBase}
*/
export
default
class
SYS_AUTHLOGService
extends
SYS_AUTHLOGServiceBase
{
/**
* Creates an instance of SYS_AUTHLOGService.
*
* @param {*} [opts={}]
* @memberof SYS_AUTHLOGService
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
}
}
\ No newline at end of file
app_web/src/store/modules/view-action/state.ts
浏览文件 @
26267e0f
...
...
@@ -10,10 +10,7 @@ export const viewstate: any = {
viewaction
:
''
,
viewdatachange
:
false
,
refviews
:
[
'61a949e3c23ebdda724888662ded1478'
,
'9e9a67908b3c85516085fe19e3dd4113'
,
'42f3fa04c9dc77f235207bcbe6ac3888'
,
'fb89f9af95f2caf92ccc1249025c9a1b'
,
'cb64b5009e70f225a91046314f40977a'
,
],
},
...
...
app_web/src/uiservice/sys-authlog/sys-authlog-ui-service-base.ts
0 → 100644
浏览文件 @
26267e0f
import
{
Environment
}
from
'@/environments/environment'
;
import
{
UIActionTool
,
Util
}
from
'@/utils'
;
import
UIService
from
'../ui-service'
;
import
{
Subject
}
from
'rxjs'
;
import
SYS_AUTHLOGService
from
'@/service/sys-authlog/sys-authlog-service'
;
/**
* 认证日志UI服务对象基类
*
* @export
* @class SYS_AUTHLOGUIServiceBase
*/
export
default
class
SYS_AUTHLOGUIServiceBase
extends
UIService
{
/**
* 是否支持工作流
*
* @memberof SYS_AUTHLOGUIServiceBase
*/
public
isEnableWorkflow
:
boolean
=
false
;
/**
* 当前UI服务对应的数据服务对象
*
* @memberof SYS_AUTHLOGUIServiceBase
*/
public
dataService
:
SYS_AUTHLOGService
=
new
SYS_AUTHLOGService
();
/**
* 所有关联视图
*
* @memberof SYS_AUTHLOGUIServiceBase
*/
public
allViewMap
:
Map
<
string
,
Object
>
=
new
Map
();
/**
* 状态值
*
* @memberof SYS_AUTHLOGUIServiceBase
*/
public
stateValue
:
number
=
0
;
/**
* 状态属性
*
* @memberof SYS_AUTHLOGUIServiceBase
*/
public
stateField
:
string
=
""
;
/**
* 主状态属性集合
*
* @memberof SYS_AUTHLOGUIServiceBase
*/
public
mainStateFields
:
Array
<
any
>
=
[];
/**
* 主状态集合Map
*
* @memberof SYS_AUTHLOGUIServiceBase
*/
public
allDeMainStateMap
:
Map
<
string
,
string
>
=
new
Map
();
/**
* Creates an instance of SYS_AUTHLOGUIServiceBase.
*
* @param {*} [opts={}]
* @memberof SYS_AUTHLOGUIServiceBase
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
this
.
initViewMap
();
this
.
initDeMainStateMap
();
}
/**
* 初始化视图Map
*
* @memberof SYS_AUTHLOGUIServiceBase
*/
public
initViewMap
(){
}
/**
* 初始化主状态集合
*
* @memberof SYS_AUTHLOGUIServiceBase
*/
public
initDeMainStateMap
(){
}
/**
* 获取指定数据的重定向页面
*
* @param srfkey 数据主键
* @param isEnableWorkflow 重定向视图是否需要处理流程中的数据
* @memberof SYS_AUTHLOGUIServiceBase
*/
public
async
getRDAppView
(
srfkey
:
string
,
isEnableWorkflow
:
boolean
){
this
.
isEnableWorkflow
=
isEnableWorkflow
;
// 进行数据查询
let
result
:
any
=
await
this
.
dataService
.
Get
({
sys_authlog
:
srfkey
});
const
curData
:
any
=
result
.
data
;
//判断当前数据模式,默认为true,todo
const
iRealDEModel
:
boolean
=
true
;
let
bDataInWF
:
boolean
=
false
;
let
bWFMode
:
any
=
false
;
// 计算数据模式
if
(
this
.
isEnableWorkflow
)
{
bDataInWF
=
await
this
.
dataService
.
testDataInWF
({
stateValue
:
this
.
stateValue
,
stateField
:
this
.
stateField
},
curData
);
if
(
bDataInWF
)
{
bDataInWF
=
true
;
bWFMode
=
await
this
.
dataService
.
testUserExistWorklist
(
null
,
curData
);
}
}
let
strPDTViewParam
:
string
=
await
this
.
getDESDDEViewPDTParam
(
curData
,
bDataInWF
,
bWFMode
);
//若不是当前数据模式,处理strPDTViewParam,todo
//查找视图
//返回视图
return
this
.
allViewMap
.
get
(
strPDTViewParam
);
}
/**
* 获取实际的数据类型
*
* @memberof SYS_AUTHLOGUIServiceBase
*/
public
getRealDEType
(
entity
:
any
){
}
/**
* 获取实体单数据实体视图预定义参数
*
* @param curData 当前数据
* @param bDataInWF 是否有数据在工作流中
* @param bWFMode 是否工作流模式
* @memberof SYS_AUTHLOGUIServiceBase
*/
public
async
getDESDDEViewPDTParam
(
curData
:
any
,
bDataInWF
:
boolean
,
bWFMode
:
boolean
){
let
strPDTParam
:
string
=
''
;
if
(
bDataInWF
)
{
// 判断数据是否在流程中
}
//多表单,todo
const
isEnableMultiForm
:
boolean
=
false
;
const
multiFormDEField
:
string
|
null
=
null
;
if
(
isEnableMultiForm
&&
multiFormDEField
)
{
const
objFormValue
:
string
=
curData
[
multiFormDEField
];
if
(
!
Environment
.
isAppMode
){
return
'MOBEDITVIEW'
+
objFormValue
;
}
return
'EDITVIEW'
+
objFormValue
;
}
if
(
!
Environment
.
isAppMode
){
if
(
this
.
getDEMainStateTag
(
curData
)){
return
`MOBEDITVIEW:MSTAG:
${
await
this
.
getDEMainStateTag
(
curData
)}
`
;
}
return
'MOBEDITVIEW:'
;
}
if
(
this
.
getDEMainStateTag
(
curData
)){
return
`EDITVIEW:MSTAG:
${
await
this
.
getDEMainStateTag
(
curData
)}
`
;
}
return
'EDITVIEW:'
;
}
/**
* 获取数据对象的主状态标识
*
* @param curData 当前数据
* @memberof SYS_AUTHLOGUIServiceBase
*/
public
async
getDEMainStateTag
(
curData
:
any
){
if
(
this
.
mainStateFields
.
length
===
0
)
return
null
;
this
.
mainStateFields
.
forEach
((
singleMainField
:
any
)
=>
{
if
(
!
(
singleMainField
in
curData
)){
console
.
error
(
`当前数据对象不包含属性singleMainField,可能会发生错误`
);
}
})
let
strTag
:
String
=
""
;
for
(
let
i
=
0
;
i
<=
1
;
i
++
)
{
let
strTag
:
string
=
(
curData
[
this
.
mainStateFields
[
0
]])?(
i
==
0
)
?
curData
[
this
.
mainStateFields
[
0
]]
:
""
:
""
;
if
(
this
.
mainStateFields
.
length
>=
2
)
{
for
(
let
j
=
0
;
j
<=
1
;
j
++
)
{
let
strTag2
:
string
=
(
curData
[
this
.
mainStateFields
[
1
]])?
`
${
strTag
}
__
${(
j
==
0
)
?
curData
[
this
.
mainStateFields
[
1
]]
:
""
}
`
:
strTag
;
if
(
this
.
mainStateFields
.
length
>=
3
)
{
for
(
let
k
=
0
;
k
<=
1
;
k
++
)
{
let
strTag3
:
string
=
(
curData
[
this
.
mainStateFields
[
2
]])?
`
${
strTag2
}
__
${(
k
==
0
)
?
curData
[
this
.
mainStateFields
[
2
]]
:
""
}
`
:
strTag2
;
// 判断是否存在
return
this
.
allDeMainStateMap
.
get
(
strTag3
);
}
}
else
{
return
this
.
allDeMainStateMap
.
get
(
strTag2
);
}
}
}
else
{
return
this
.
allDeMainStateMap
.
get
(
strTag
);
}
}
return
null
;
}
}
\ No newline at end of file
app_web/src/uiservice/sys-authlog/sys-authlog-ui-service.ts
0 → 100644
浏览文件 @
26267e0f
import
SYS_AUTHLOGUIServiceBase
from
'./sys-authlog-ui-service-base'
;
/**
* 认证日志UI服务对象
*
* @export
* @class SYS_AUTHLOGUIService
*/
export
default
class
SYS_AUTHLOGUIService
extends
SYS_AUTHLOGUIServiceBase
{
/**
* Creates an instance of SYS_AUTHLOGUIService.
*
* @param {*} [opts={}]
* @memberof SYS_AUTHLOGUIService
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
}
}
\ No newline at end of file
app_web/src/uiservice/ui-service-register.ts
浏览文件 @
26267e0f
...
...
@@ -39,7 +39,8 @@ export class UIServiceRegister {
* @memberof UIServiceRegister
*/
protected
init
():
void
{
this
.
allUIService
.
set
(
'sys_role_permission'
,
()
=>
import
(
'@/uiservice/sys-role-permission/sys-role-permission-ui-service'
));
this
.
allUIService
.
set
(
'sys_authlog'
,
()
=>
import
(
'@/uiservice/sys-authlog/sys-authlog-ui-service'
));
this
.
allUIService
.
set
(
'sys_role_permission'
,
()
=>
import
(
'@/uiservice/sys-role-permission/sys-role-permission-ui-service'
));
this
.
allUIService
.
set
(
'sys_permission'
,
()
=>
import
(
'@/uiservice/sys-permission/sys-permission-ui-service'
));
this
.
allUIService
.
set
(
'sys_user_role'
,
()
=>
import
(
'@/uiservice/sys-user-role/sys-user-role-ui-service'
));
this
.
allUIService
.
set
(
'sys_user'
,
()
=>
import
(
'@/uiservice/sys-user/sys-user-ui-service'
));
...
...
app_web/src/widgets/app/main-appmenu/main-appmenu-base.vue
浏览文件 @
26267e0f
...
...
@@ -558,21 +558,12 @@ export default class MainBase extends Vue implements ControlInterface {
public
click
(
item
:
any
)
{
if
(
item
)
{
switch
(
item
.
appfunctag
)
{
case
'Auto1'
:
this
.
clickAuto1
(
item
);
return
;
case
'Auto10'
:
this
.
clickAuto10
(
item
);
return
;
case
'Auto5'
:
this
.
clickAuto5
(
item
);
return
;
case
'Auto8'
:
this
.
clickAuto8
(
item
);
return
;
case
'Auto7'
:
this
.
clickAuto7
(
item
);
return
;
default
:
console
.
warn
(
'未指定应用功能'
);
}
...
...
@@ -580,24 +571,6 @@ export default class MainBase extends Vue implements ControlInterface {
}
/**
* 角色_权限
*
* @param {*} [item={}]
* @memberof Main
*/
public
clickAuto1
(
item
:
any
=
{})
{
const
viewparam
:
any
=
{};
Object
.
assign
(
viewparam
,
{});
const
deResParameters
:
any
[]
=
[];
const
parameters
:
any
[]
=
[
{
pathName
:
'sys_role_permissions'
,
parameterName
:
'sys_role_permission'
},
{
pathName
:
'gridview'
,
parameterName
:
'gridview'
},
];
const
path
:
string
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
{},
deResParameters
,
parameters
,
[],
viewparam
);
this
.
$router
.
push
(
path
);
}
/**
* 角色
*
...
...
@@ -633,42 +606,6 @@ export default class MainBase extends Vue implements ControlInterface {
const
path
:
string
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
{},
deResParameters
,
parameters
,
[],
viewparam
);
this
.
$router
.
push
(
path
);
}
/**
* 用户_角色
*
* @param {*} [item={}]
* @memberof Main
*/
public
clickAuto8
(
item
:
any
=
{})
{
const
viewparam
:
any
=
{};
Object
.
assign
(
viewparam
,
{});
const
deResParameters
:
any
[]
=
[];
const
parameters
:
any
[]
=
[
{
pathName
:
'sys_user_roles'
,
parameterName
:
'sys_user_role'
},
{
pathName
:
'gridview'
,
parameterName
:
'gridview'
},
];
const
path
:
string
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
{},
deResParameters
,
parameters
,
[],
viewparam
);
this
.
$router
.
push
(
path
);
}
/**
* 权限
*
* @param {*} [item={}]
* @memberof Main
*/
public
clickAuto7
(
item
:
any
=
{})
{
const
viewparam
:
any
=
{};
Object
.
assign
(
viewparam
,
{});
const
deResParameters
:
any
[]
=
[];
const
parameters
:
any
[]
=
[
{
pathName
:
'sys_permissions'
,
parameterName
:
'sys_permission'
},
{
pathName
:
'gridview'
,
parameterName
:
'gridview'
},
];
const
path
:
string
=
this
.
$viewTool
.
buildUpRoutePath
(
this
.
$route
,
{},
deResParameters
,
parameters
,
[],
viewparam
);
this
.
$router
.
push
(
path
);
}
/**
* 数据加载
...
...
app_web/src/widgets/app/main-appmenu/main-appmenu-model.ts
浏览文件 @
26267e0f
...
...
@@ -17,10 +17,10 @@ export default class MainModel {
{
id
:
'f59655c22753740bbcf200f5cfee8a54'
,
name
:
'menuitem3'
,
text
:
'用户
管理
'
,
text
:
'用户'
,
type
:
'MENUITEM'
,
counterid
:
''
,
tooltip
:
'用户
管理
'
,
tooltip
:
'用户'
,
expanded
:
false
,
separator
:
false
,
hidden
:
false
,
...
...
@@ -49,60 +49,6 @@ export default class MainModel {
textcls
:
''
,
appfunctag
:
'Auto10'
,
resourcetag
:
''
,
},
{
id
:
'aa34fa65ba436d9267830d242fcda6c5'
,
name
:
'menuitem7'
,
text
:
'用户角色'
,
type
:
'MENUITEM'
,
counterid
:
''
,
tooltip
:
'用户角色'
,
expanded
:
false
,
separator
:
false
,
hidden
:
false
,
hidesidebar
:
false
,
opendefault
:
false
,
iconcls
:
''
,
icon
:
''
,
textcls
:
''
,
appfunctag
:
'Auto8'
,
resourcetag
:
''
,
},
{
id
:
'6177ea33605de953767d48b120145efb'
,
name
:
'menuitem10'
,
text
:
'权限'
,
type
:
'MENUITEM'
,
counterid
:
''
,
tooltip
:
'权限'
,
expanded
:
false
,
separator
:
false
,
hidden
:
false
,
hidesidebar
:
false
,
opendefault
:
false
,
iconcls
:
'fa fa-certificate'
,
icon
:
''
,
textcls
:
''
,
appfunctag
:
'Auto7'
,
resourcetag
:
''
,
},
{
id
:
'2794bbcfc7b3c81b431d1f2e808a793b'
,
name
:
'menuitem1'
,
text
:
'角色权限'
,
type
:
'MENUITEM'
,
counterid
:
''
,
tooltip
:
'角色权限'
,
expanded
:
false
,
separator
:
false
,
hidden
:
false
,
hidesidebar
:
false
,
opendefault
:
false
,
iconcls
:
''
,
icon
:
''
,
textcls
:
''
,
appfunctag
:
'Auto1'
,
resourcetag
:
''
,
},
];
...
...
@@ -114,18 +60,6 @@ export default class MainModel {
* @memberof MainModel
*/
public
funcs
:
any
[]
=
[
{
appfunctag
:
'Auto1'
,
appfuncyype
:
'APPVIEW'
,
openmode
:
''
,
codename
:
'sys_role_permissiongridview'
,
deResParameters
:
[],
routepath
:
'/index/:index?/sys_role_permissions/:sys_role_permission?/gridview/:gridview?'
,
parameters
:
[
{
pathName
:
'sys_role_permissions'
,
parameterName
:
'sys_role_permission'
},
{
pathName
:
'gridview'
,
parameterName
:
'gridview'
},
],
},
{
appfunctag
:
'Auto10'
,
appfuncyype
:
'APPVIEW'
,
...
...
@@ -150,30 +84,6 @@ export default class MainModel {
{
pathName
:
'gridview'
,
parameterName
:
'gridview'
},
],
},
{
appfunctag
:
'Auto8'
,
appfuncyype
:
'APPVIEW'
,
openmode
:
''
,
codename
:
'sys_user_rolegridview'
,
deResParameters
:
[],
routepath
:
'/index/:index?/sys_user_roles/:sys_user_role?/gridview/:gridview?'
,
parameters
:
[
{
pathName
:
'sys_user_roles'
,
parameterName
:
'sys_user_role'
},
{
pathName
:
'gridview'
,
parameterName
:
'gridview'
},
],
},
{
appfunctag
:
'Auto7'
,
appfuncyype
:
'APPVIEW'
,
openmode
:
''
,
codename
:
'sys_permissiongridview'
,
deResParameters
:
[],
routepath
:
'/index/:index?/sys_permissions/:sys_permission?/gridview/:gridview?'
,
parameters
:
[
{
pathName
:
'sys_permissions'
,
parameterName
:
'sys_permission'
},
{
pathName
:
'gridview'
,
parameterName
:
'gridview'
},
],
},
];
/**
...
...
app_web/src/widgets/sys-role/main-form/main-form-base.vue
浏览文件 @
26267e0f
...
...
@@ -6,20 +6,13 @@
<i-col
v-show=
"detailsModel.group1.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-group
layoutType=
"TABLE_24COL"
titleStyle=
""
class=
''
:uiActionGroup=
"detailsModel.group1.uiActionGroup"
@
groupuiactionclick=
"groupUIActionClick($event)"
:caption=
"$t('entities.sys_role.main_form.details.group1')"
:isShowCaption=
"false"
uiStyle=
"DEFAULT"
:titleBarCloseMode=
"0"
:isInfoGroupMode=
"false"
>
<row>
<i-col
v-show=
"detailsModel.sys_roleid.visible"
:style=
"
{}" :lg="{ span: 12, offset: 0 }">
<app-form-item
name=
'sys_roleid'
:itemRules=
"this.rules.sys_roleid"
class=
''
:caption=
"$t('entities.sys_role.main_form.details.sys_roleid')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.sys_roleid.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-span
name=
'sys_roleid'
:value=
"data.sys_roleid"
style=
""
></app-span>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.sys_rolename.visible"
:style=
"
{}" :lg="{ span: 12, offset: 0 }">
<i-col
v-show=
"detailsModel.sys_rolename.visible"
:style=
"
{}" :md="{ span: 12, offset: 0 }" :lg="{ span: 12, offset: 0 }" :xl="{ span: 12, offset: 0 }">
<app-form-item
name=
'sys_rolename'
:itemRules=
"this.rules.sys_rolename"
class=
''
:caption=
"$t('entities.sys_role.main_form.details.sys_rolename')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.sys_rolename.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.sys_rolename"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.sys_rolename.disabled"
type=
'text'
style=
""
></input-box>
</app-form-item>
</i-col>
<i-col
v-show=
"detailsModel.memo.visible"
:style=
"
{}" :
lg="{ span: 24
, offset: 0 }">
<i-col
v-show=
"detailsModel.memo.visible"
:style=
"
{}" :
md="{ span: 12, offset: 0 }" :lg="{ span: 24, offset: 0 }" :xl="{ span: 12
, offset: 0 }">
<app-form-item
name=
'memo'
:itemRules=
"this.rules.memo"
class=
''
:caption=
"$t('entities.sys_role.main_form.details.memo')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.memo.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<input-box
v-model=
"data.memo"
@
enter=
"onEnter($event)"
unit=
""
:disabled=
"detailsModel.memo.disabled"
type=
'text'
style=
""
></input-box>
</app-form-item>
...
...
@@ -407,9 +400,9 @@ export default class MainBase extends Vue implements ControlInterface {
srfuf
:
null
,
srfdeid
:
null
,
srfsourcekey
:
null
,
sys_roleid
:
null
,
sys_rolename
:
null
,
memo
:
null
,
sys_roleid
:
null
,
sys_role
:
null
,
};
...
...
@@ -500,12 +493,6 @@ export default class MainBase extends Vue implements ControlInterface {
{
required
:
false
,
type
:
'string'
,
message
:
' 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
' 值不能为空'
,
trigger
:
'blur'
},
],
sys_roleid
:
[
{
type
:
'string'
,
message
:
'角色表标识 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'角色表标识 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
false
,
type
:
'string'
,
message
:
'角色表标识 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
'角色表标识 值不能为空'
,
trigger
:
'blur'
},
],
sys_rolename
:
[
{
type
:
'string'
,
message
:
'角色表名称 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'角色表名称 值必须为字符串类型'
,
trigger
:
'blur'
},
...
...
@@ -518,6 +505,12 @@ export default class MainBase extends Vue implements ControlInterface {
{
required
:
false
,
type
:
'string'
,
message
:
'备注 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
'备注 值不能为空'
,
trigger
:
'blur'
},
],
sys_roleid
:
[
{
type
:
'string'
,
message
:
'角色表标识 值必须为字符串类型'
,
trigger
:
'change'
},
{
type
:
'string'
,
message
:
'角色表标识 值必须为字符串类型'
,
trigger
:
'blur'
},
{
required
:
false
,
type
:
'string'
,
message
:
'角色表标识 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
'角色表标识 值不能为空'
,
trigger
:
'blur'
},
],
}
/**
...
...
@@ -556,12 +549,12 @@ export default class MainBase extends Vue implements ControlInterface {
srfdeid
:
new
FormItemModel
({
caption
:
''
,
detailType
:
'FORMITEM'
,
name
:
'srfdeid'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
srfsourcekey
:
new
FormItemModel
({
caption
:
''
,
detailType
:
'FORMITEM'
,
name
:
'srfsourcekey'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
sys_roleid
:
new
FormItemModel
({
caption
:
'角色表标识'
,
detailType
:
'FORMITEM'
,
name
:
'sys_roleid'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
sys_rolename
:
new
FormItemModel
({
caption
:
'角色表名称'
,
detailType
:
'FORMITEM'
,
name
:
'sys_rolename'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
memo
:
new
FormItemModel
({
caption
:
'备注'
,
detailType
:
'FORMITEM'
,
name
:
'memo'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
sys_roleid
:
new
FormItemModel
({
caption
:
'角色表标识'
,
detailType
:
'FORMITEM'
,
name
:
'sys_roleid'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
enableCond
:
3
})
,
};
...
...
@@ -661,18 +654,6 @@ export default class MainBase extends Vue implements ControlInterface {
this
.
formDataChange
({
name
:
'srfsourcekey'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 sys_roleid 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof Main
*/
@
Watch
(
'data.sys_roleid'
)
onSys_roleidChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'sys_roleid'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 sys_rolename 值
*
...
...
@@ -697,6 +678,18 @@ export default class MainBase extends Vue implements ControlInterface {
this
.
formDataChange
({
name
:
'memo'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 监控表单属性 sys_roleid 值
*
* @param {*} newVal
* @param {*} oldVal
* @memberof Main
*/
@
Watch
(
'data.sys_roleid'
)
onSys_roleidChange
(
newVal
:
any
,
oldVal
:
any
)
{
this
.
formDataChange
({
name
:
'sys_roleid'
,
newVal
:
newVal
,
oldVal
:
oldVal
});
}
/**
* 重置表单项值
...
...
app_web/src/widgets/sys-role/main-form/main-form-model.ts
浏览文件 @
26267e0f
...
...
@@ -55,11 +55,6 @@ export default class MainModel {
{
name
:
'srfsourcekey'
,
},
{
name
:
'sys_roleid'
,
prop
:
'roleid'
,
dataType
:
'GUID'
,
},
{
name
:
'sys_rolename'
,
prop
:
'rolename'
,
...
...
@@ -70,6 +65,11 @@ export default class MainModel {
prop
:
'memo'
,
dataType
:
'TEXT'
,
},
{
name
:
'sys_roleid'
,
prop
:
'roleid'
,
dataType
:
'GUID'
,
},
{
name
:
'sys_role'
,
prop
:
'roleid'
,
...
...
app_web/src/widgets/sys-role/main-form/main-form-service.ts
浏览文件 @
26267e0f
...
...
@@ -162,7 +162,6 @@ export default class MainService extends ControlService {
@
Errorlog
public
add
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
);
Object
.
assign
(
Data
,{
roleid
:
data
.
roleid
,
srffrontuf
:
'1'
});
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
...
...
config.xml
浏览文件 @
26267e0f
...
...
@@ -37,11 +37,6 @@
git clone -b master $para2 ibzuaa/
export NODE_OPTIONS=--max-old-space-size=4096
cd ibzuaa/
mvn clean package -Pweb
cd ibzuaa-app/ibzuaa-app-web
mvn -Pweb docker:build
mvn -Pweb docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzuaa-app-web.yaml ibzlab-rt --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
...
...
ibzuaa-app/ibzuaa-app-web/src/main/docker/Dockerfile
浏览文件 @
26267e0f
...
...
@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBZ_SLEEP}s..." && \
sleep ${IBZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzuaa-app-web.jar
EXPOSE
30002
EXPOSE
8080
ADD
ibzuaa-app-web.jar /ibzuaa-app-web.jar
ibzuaa-app/ibzuaa-app-web/src/main/docker/ibzuaa-app-web.yaml
浏览文件 @
26267e0f
...
...
@@ -3,23 +3,9 @@ services:
ibzuaa-app-web
:
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/ibzuaa-app-web:latest
ports
:
-
"
30002:30002
"
-
"
8080:8080
"
networks
:
-
agent_network
environment
:
-
SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.180.237
-
SERVER_PORT=30002
-
SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.102.211:8848
-
SPRING_REDIS_HOST=172.16.100.243
-
SPRING_REDIS_PORT=6379
-
SPRING_REDIS_DATABASE=0
-
SPRING_DATASOURCE_USERNAME=a_A_5d9d78509
-
SPRING_DATASOURCE_PASSWORD=@6dEfb3@
-
SPRING_DATASOURCE_URL=jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true
-
SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
-
SPRING_DATASOURCE_DEFAULTSCHEMA=a_A_5d9d78509
-
ABC=1
-
DEC=2
deploy
:
mode
:
replicated
replicas
:
1
...
...
ibzuaa-app/ibzuaa-app-web/src/main/resources/application-web-prod.yml
浏览文件 @
26267e0f
...
...
@@ -3,6 +3,10 @@ server:
#zuul网关路由设置
zuul
:
routes
:
sys_authlog
:
path
:
/sys_authlogs/**
serviceId
:
ibzuaa-api
stripPrefix
:
false
sys_role_permission
:
path
:
/sys_role_permissions/**
serviceId
:
ibzuaa-api
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/domain/SYS_AUTHLOG.java
0 → 100644
浏览文件 @
26267e0f
package
cn
.
ibizlab
.
core
.
uaa
.
domain
;
import
java.sql.Timestamp
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.math.BigInteger
;
import
java.util.HashMap
;
import
java.math.BigDecimal
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.DigestUtils
;
import
cn.ibizlab.util.domain.EntityBase
;
import
cn.ibizlab.util.annotation.DEField
;
import
cn.ibizlab.util.enums.DEPredefinedFieldType
;
import
cn.ibizlab.util.enums.DEFieldDefaultValueType
;
import
java.io.Serializable
;
import
lombok.Data
;
import
org.springframework.data.annotation.Transient
;
import
com.baomidou.mybatisplus.annotation.*
;
import
cn.ibizlab.util.domain.EntityMP
;
/**
* 实体[认证日志]
*/
@Data
@TableName
(
value
=
"IBZAUTHLOG"
,
resultMap
=
"SYS_AUTHLOGResultMap"
)
public
class
SYS_AUTHLOG
extends
EntityMP
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 标识
*/
@DEField
(
isKeyField
=
true
)
@TableId
(
value
=
"logid"
,
type
=
IdType
.
UUID
)
@JSONField
(
name
=
"logid"
)
@JsonProperty
(
"logid"
)
private
String
logid
;
/**
* 用户全局名
*/
@TableField
(
value
=
"username"
)
@JSONField
(
name
=
"username"
)
@JsonProperty
(
"username"
)
private
String
username
;
/**
* 用户名称
*/
@TableField
(
value
=
"personname"
)
@JSONField
(
name
=
"personname"
)
@JsonProperty
(
"personname"
)
private
String
personname
;
/**
* 域
*/
@TableField
(
value
=
"domain"
)
@JSONField
(
name
=
"domain"
)
@JsonProperty
(
"domain"
)
private
String
domain
;
/**
* 认证时间
*/
@DEField
(
preType
=
DEPredefinedFieldType
.
CREATEDATE
)
@TableField
(
value
=
"authtime"
,
fill
=
FieldFill
.
INSERT
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
locale
=
"zh"
,
timezone
=
"GMT+8"
)
@JSONField
(
name
=
"authtime"
,
format
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonProperty
(
"authtime"
)
private
Timestamp
authtime
;
/**
* IP地址
*/
@TableField
(
value
=
"ipaddr"
)
@JSONField
(
name
=
"ipaddr"
)
@JsonProperty
(
"ipaddr"
)
private
String
ipaddr
;
/**
* MAC地址
*/
@TableField
(
value
=
"macaddr"
)
@JSONField
(
name
=
"macaddr"
)
@JsonProperty
(
"macaddr"
)
private
String
macaddr
;
/**
* 客户端
*/
@TableField
(
value
=
"useragent"
)
@JSONField
(
name
=
"useragent"
)
@JsonProperty
(
"useragent"
)
private
String
useragent
;
/**
* 认证结果
*/
@TableField
(
value
=
"authcode"
)
@JSONField
(
name
=
"authcode"
)
@JsonProperty
(
"authcode"
)
private
String
authcode
;
/**
* 设置 [用户全局名]
*/
public
void
setUsername
(
String
username
){
this
.
username
=
username
;
this
.
modify
(
"username"
,
username
);
}
/**
* 设置 [用户名称]
*/
public
void
setPersonname
(
String
personname
){
this
.
personname
=
personname
;
this
.
modify
(
"personname"
,
personname
);
}
/**
* 设置 [域]
*/
public
void
setDomain
(
String
domain
){
this
.
domain
=
domain
;
this
.
modify
(
"domain"
,
domain
);
}
/**
* 设置 [IP地址]
*/
public
void
setIpaddr
(
String
ipaddr
){
this
.
ipaddr
=
ipaddr
;
this
.
modify
(
"ipaddr"
,
ipaddr
);
}
/**
* 设置 [MAC地址]
*/
public
void
setMacaddr
(
String
macaddr
){
this
.
macaddr
=
macaddr
;
this
.
modify
(
"macaddr"
,
macaddr
);
}
/**
* 设置 [客户端]
*/
public
void
setUseragent
(
String
useragent
){
this
.
useragent
=
useragent
;
this
.
modify
(
"useragent"
,
useragent
);
}
/**
* 设置 [认证结果]
*/
public
void
setAuthcode
(
String
authcode
){
this
.
authcode
=
authcode
;
this
.
modify
(
"authcode"
,
authcode
);
}
}
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/filter/SYS_AUTHLOGSearchContext.java
0 → 100644
浏览文件 @
26267e0f
package
cn
.
ibizlab
.
core
.
uaa
.
filter
;
import
java.math.BigDecimal
;
import
java.math.BigInteger
;
import
java.sql.Timestamp
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.HashMap
;
import
lombok.Data
;
import
lombok.extern.slf4j.Slf4j
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
cn.ibizlab.util.filter.QueryWrapperContext
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
cn.ibizlab.core.uaa.domain.SYS_AUTHLOG
;
/**
* 关系型数据实体[SYS_AUTHLOG] 查询条件对象
*/
@Slf4j
@Data
public
class
SYS_AUTHLOGSearchContext
extends
QueryWrapperContext
<
SYS_AUTHLOG
>
{
private
String
n_username_like
;
//[用户全局名]
public
void
setN_username_like
(
String
n_username_like
)
{
this
.
n_username_like
=
n_username_like
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_username_like
)){
this
.
getSelectCond
().
like
(
"username"
,
n_username_like
);
}
}
private
String
n_personname_like
;
//[用户名称]
public
void
setN_personname_like
(
String
n_personname_like
)
{
this
.
n_personname_like
=
n_personname_like
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_personname_like
)){
this
.
getSelectCond
().
like
(
"personname"
,
n_personname_like
);
}
}
private
String
n_domain_like
;
//[域]
public
void
setN_domain_like
(
String
n_domain_like
)
{
this
.
n_domain_like
=
n_domain_like
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_domain_like
)){
this
.
getSelectCond
().
like
(
"domain"
,
n_domain_like
);
}
}
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@JSONField
(
format
=
"yyyy-MM-dd HH:mm:ss"
)
private
Timestamp
n_authtime_gtandeq
;
//[认证时间]
public
void
setN_authtime_gtandeq
(
Timestamp
n_authtime_gtandeq
)
{
this
.
n_authtime_gtandeq
=
n_authtime_gtandeq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_authtime_gtandeq
)){
this
.
getSelectCond
().
ge
(
"authtime"
,
n_authtime_gtandeq
);
}
}
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
@JSONField
(
format
=
"yyyy-MM-dd HH:mm:ss"
)
private
Timestamp
n_authtime_ltandeq
;
//[认证时间]
public
void
setN_authtime_ltandeq
(
Timestamp
n_authtime_ltandeq
)
{
this
.
n_authtime_ltandeq
=
n_authtime_ltandeq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_authtime_ltandeq
)){
this
.
getSelectCond
().
le
(
"authtime"
,
n_authtime_ltandeq
);
}
}
private
String
n_ipaddr_like
;
//[IP地址]
public
void
setN_ipaddr_like
(
String
n_ipaddr_like
)
{
this
.
n_ipaddr_like
=
n_ipaddr_like
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_ipaddr_like
)){
this
.
getSelectCond
().
like
(
"ipaddr"
,
n_ipaddr_like
);
}
}
private
String
n_authcode_eq
;
//[认证结果]
public
void
setN_authcode_eq
(
String
n_authcode_eq
)
{
this
.
n_authcode_eq
=
n_authcode_eq
;
if
(!
ObjectUtils
.
isEmpty
(
this
.
n_authcode_eq
)){
this
.
getSelectCond
().
eq
(
"authcode"
,
n_authcode_eq
);
}
}
/**
* 启用快速搜索
*/
public
void
setQuery
(
String
query
)
{
this
.
query
=
query
;
if
(!
StringUtils
.
isEmpty
(
query
)){
this
.
getSelectCond
().
or
().
like
(
"username"
,
query
);
}
}
}
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/mapper/SYS_AUTHLOGMapper.java
0 → 100644
浏览文件 @
26267e0f
package
cn
.
ibizlab
.
core
.
uaa
.
mapper
;
import
java.util.List
;
import
org.apache.ibatis.annotations.*
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
java.util.HashMap
;
import
org.apache.ibatis.annotations.Select
;
import
cn.ibizlab.core.uaa.domain.SYS_AUTHLOG
;
import
cn.ibizlab.core.uaa.filter.SYS_AUTHLOGSearchContext
;
import
org.springframework.cache.annotation.CacheEvict
;
import
org.springframework.cache.annotation.Cacheable
;
import
java.io.Serializable
;
import
com.baomidou.mybatisplus.core.toolkit.Constants
;
import
com.alibaba.fastjson.JSONObject
;
public
interface
SYS_AUTHLOGMapper
extends
BaseMapper
<
SYS_AUTHLOG
>{
Page
<
SYS_AUTHLOG
>
searchDefault
(
IPage
page
,
@Param
(
"srf"
)
SYS_AUTHLOGSearchContext
context
,
@Param
(
"ew"
)
Wrapper
<
SYS_AUTHLOG
>
wrapper
)
;
@Override
SYS_AUTHLOG
selectById
(
Serializable
id
);
@Override
int
insert
(
SYS_AUTHLOG
entity
);
@Override
int
updateById
(
@Param
(
Constants
.
ENTITY
)
SYS_AUTHLOG
entity
);
@Override
int
update
(
@Param
(
Constants
.
ENTITY
)
SYS_AUTHLOG
entity
,
@Param
(
"ew"
)
Wrapper
<
SYS_AUTHLOG
>
updateWrapper
);
@Override
int
deleteById
(
Serializable
id
);
/**
* 自定义查询SQL
* @param sql
* @return
*/
@Select
(
"${sql}"
)
List
<
JSONObject
>
selectBySQL
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"et"
)
Map
param
);
/**
* 自定义更新SQL
* @param sql
* @return
*/
@Update
(
"${sql}"
)
boolean
updateBySQL
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"et"
)
Map
param
);
/**
* 自定义插入SQL
* @param sql
* @return
*/
@Insert
(
"${sql}"
)
boolean
insertBySQL
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"et"
)
Map
param
);
/**
* 自定义删除SQL
* @param sql
* @return
*/
@Delete
(
"${sql}"
)
boolean
deleteBySQL
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"et"
)
Map
param
);
}
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/ISYS_AUTHLOGService.java
0 → 100644
浏览文件 @
26267e0f
package
cn
.
ibizlab
.
core
.
uaa
.
service
;
import
java.io.Serializable
;
import
java.sql.Timestamp
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.HashMap
;
import
java.util.Collection
;
import
java.math.BigInteger
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
com.alibaba.fastjson.JSONObject
;
import
org.springframework.cache.annotation.CacheEvict
;
import
cn.ibizlab.core.uaa.domain.SYS_AUTHLOG
;
import
cn.ibizlab.core.uaa.filter.SYS_AUTHLOGSearchContext
;
import
com.baomidou.mybatisplus.extension.service.IService
;
/**
* 实体[SYS_AUTHLOG] 服务对象接口
*/
public
interface
ISYS_AUTHLOGService
extends
IService
<
SYS_AUTHLOG
>{
SYS_AUTHLOG
getDraft
(
SYS_AUTHLOG
et
)
;
boolean
update
(
SYS_AUTHLOG
et
)
;
void
updateBatch
(
List
<
SYS_AUTHLOG
>
list
)
;
boolean
remove
(
String
key
)
;
void
removeBatch
(
Collection
<
String
>
idList
)
;
boolean
create
(
SYS_AUTHLOG
et
)
;
void
createBatch
(
List
<
SYS_AUTHLOG
>
list
)
;
boolean
checkKey
(
SYS_AUTHLOG
et
)
;
SYS_AUTHLOG
get
(
String
key
)
;
boolean
save
(
SYS_AUTHLOG
et
)
;
void
saveBatch
(
List
<
SYS_AUTHLOG
>
list
)
;
Page
<
SYS_AUTHLOG
>
searchDefault
(
SYS_AUTHLOGSearchContext
context
)
;
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List
<
JSONObject
>
select
(
String
sql
,
Map
param
);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean
execute
(
String
sql
,
Map
param
);
}
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SYS_AUTHLOGServiceImpl.java
0 → 100644
浏览文件 @
26267e0f
package
cn
.
ibizlab
.
core
.
uaa
.
service
.
impl
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.Map
;
import
java.util.HashSet
;
import
java.util.HashMap
;
import
java.util.Collection
;
import
java.util.Objects
;
import
java.util.Optional
;
import
java.math.BigInteger
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cglib.beans.BeanCopier
;
import
org.springframework.stereotype.Service
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.context.annotation.Lazy
;
import
cn.ibizlab.core.uaa.domain.SYS_AUTHLOG
;
import
cn.ibizlab.core.uaa.filter.SYS_AUTHLOGSearchContext
;
import
cn.ibizlab.core.uaa.service.ISYS_AUTHLOGService
;
import
cn.ibizlab.util.helper.CachedBeanCopier
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
cn.ibizlab.core.uaa.mapper.SYS_AUTHLOGMapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.alibaba.fastjson.JSONObject
;
import
org.springframework.util.StringUtils
;
/**
* 实体[认证日志] 服务对象接口实现
*/
@Slf4j
@Service
(
"SYS_AUTHLOGServiceImpl"
)
public
class
SYS_AUTHLOGServiceImpl
extends
ServiceImpl
<
SYS_AUTHLOGMapper
,
SYS_AUTHLOG
>
implements
ISYS_AUTHLOGService
{
private
int
batchSize
=
500
;
@Override
public
SYS_AUTHLOG
getDraft
(
SYS_AUTHLOG
et
)
{
return
et
;
}
@Override
@Transactional
public
boolean
update
(
SYS_AUTHLOG
et
)
{
if
(!
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"logid"
,
et
.
getLogid
())))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getLogid
()),
et
);
return
true
;
}
@Override
public
void
updateBatch
(
List
<
SYS_AUTHLOG
>
list
)
{
updateBatchById
(
list
,
batchSize
);
}
@Override
@Transactional
public
boolean
remove
(
String
key
)
{
boolean
result
=
removeById
(
key
);
return
result
;
}
@Override
public
void
removeBatch
(
Collection
<
String
>
idList
)
{
removeByIds
(
idList
);
}
@Override
@Transactional
public
boolean
create
(
SYS_AUTHLOG
et
)
{
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getLogid
()),
et
);
return
true
;
}
@Override
public
void
createBatch
(
List
<
SYS_AUTHLOG
>
list
)
{
this
.
saveBatch
(
list
,
batchSize
);
}
@Override
public
boolean
checkKey
(
SYS_AUTHLOG
et
)
{
return
(!
ObjectUtils
.
isEmpty
(
et
.
getLogid
()))&&(!
Objects
.
isNull
(
this
.
getById
(
et
.
getLogid
())));
}
@Override
@Transactional
public
SYS_AUTHLOG
get
(
String
key
)
{
SYS_AUTHLOG
et
=
getById
(
key
);
if
(
et
==
null
){
et
=
new
SYS_AUTHLOG
();
et
.
setLogid
(
key
);
}
else
{
}
return
et
;
}
@Override
@Transactional
public
boolean
save
(
SYS_AUTHLOG
et
)
{
if
(!
saveOrUpdate
(
et
))
return
false
;
return
true
;
}
@Override
@Transactional
(
rollbackFor
=
{
Exception
.
class
}
)
public
boolean
saveOrUpdate
(
SYS_AUTHLOG
et
)
{
if
(
null
==
et
)
{
return
false
;
}
else
{
return
checkKey
(
et
)
?
this
.
update
(
et
)
:
this
.
create
(
et
);
}
}
@Override
public
void
saveBatch
(
List
<
SYS_AUTHLOG
>
list
)
{
saveOrUpdateBatch
(
list
,
batchSize
);
}
/**
* 查询集合 DEFAULT
*/
@Override
public
Page
<
SYS_AUTHLOG
>
searchDefault
(
SYS_AUTHLOGSearchContext
context
)
{
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
SYS_AUTHLOG
>
pages
=
baseMapper
.
searchDefault
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
SYS_AUTHLOG
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
@Override
public
List
<
JSONObject
>
select
(
String
sql
,
Map
param
){
return
this
.
baseMapper
.
selectBySQL
(
sql
,
param
);
}
@Override
@Transactional
public
boolean
execute
(
String
sql
,
Map
param
){
if
(
sql
==
null
||
sql
.
isEmpty
())
{
return
false
;
}
if
(
sql
.
toLowerCase
().
trim
().
startsWith
(
"insert"
))
{
return
this
.
baseMapper
.
insertBySQL
(
sql
,
param
);
}
if
(
sql
.
toLowerCase
().
trim
().
startsWith
(
"update"
))
{
return
this
.
baseMapper
.
updateBySQL
(
sql
,
param
);
}
if
(
sql
.
toLowerCase
().
trim
().
startsWith
(
"delete"
))
{
return
this
.
baseMapper
.
deleteBySQL
(
sql
,
param
);
}
log
.
warn
(
"暂未支持的SQL语法"
);
return
true
;
}
}
ibzuaa-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
26267e0f
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog
xmlns=
"http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext=
"http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd"
>
<!--输出实体[SYS_AUTHLOG]数据结构 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-sys_authlog-31-1"
>
<createTable
tableName=
"IBZAUTHLOG"
>
<column
name=
"LOGID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_AUTHLOG_LOGID"
/>
</column>
<column
name=
"USERNAME"
remarks=
""
type=
"VARCHAR(100)"
>
</column>
<column
name=
"PERSONNAME"
remarks=
""
type=
"VARCHAR(100)"
>
</column>
<column
name=
"DOMAIN"
remarks=
""
type=
"VARCHAR(100)"
>
</column>
<column
name=
"AUTHTIME"
remarks=
""
type=
"DATETIME"
>
</column>
<column
name=
"IPADDR"
remarks=
""
type=
"VARCHAR(100)"
>
</column>
<column
name=
"MACADDR"
remarks=
""
type=
"VARCHAR(100)"
>
</column>
<column
name=
"USERAGENT"
remarks=
""
type=
"VARCHAR(100)"
>
</column>
<column
name=
"AUTHCODE"
remarks=
""
type=
"VARCHAR(15)"
>
</column>
</createTable>
</changeSet>
<!--输出实体[SYS_PSDEOPPRIV]数据结构 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-sys_psdeoppriv-98-
1
"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-sys_psdeoppriv-98-
2
"
>
<createTable
tableName=
"IBZPSDEOPPRIV"
>
<column
name=
"SYS_PSDEOPPRIVID"
remarks=
""
type=
"VARCHAR(200)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_PSDEOPPRIV_SYS_PSDEOPPR"
/>
...
...
@@ -36,7 +60,7 @@
</createTable>
</changeSet>
<!--输出实体[SYS_ROLE_PERMISSION]数据结构 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-sys_role_permission-68-
2
"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-sys_role_permission-68-
3
"
>
<createTable
tableName=
"IBZROLE_PERMISSION"
>
<column
name=
"SYS_ROLE_PERMISSIONID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_ROLE_PERMISSION_SYS_ROL"
/>
...
...
@@ -64,7 +88,7 @@
</createTable>
</changeSet>
<!--输出实体[SYS_USER]数据结构 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-sys_user-42-
3
"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-sys_user-42-
4
"
>
<createTable
tableName=
"IBZUSER"
>
<column
name=
"USERID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_USER_USERID"
/>
...
...
@@ -78,7 +102,7 @@
</createTable>
</changeSet>
<!--输出实体[SYS_PSSYSUNIRES]数据结构 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-sys_pssysunires-91-
4
"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-sys_pssysunires-91-
5
"
>
<createTable
tableName=
"IBZPSSYSUNIRES"
>
<column
name=
"SYS_PSSYSUNIRESID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_PSSYSUNIRES_SYS_PSSYSUN"
/>
...
...
@@ -94,7 +118,7 @@
</createTable>
</changeSet>
<!--输出实体[SYS_USER_ROLE]数据结构 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-sys_user_role-47-
5
"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-sys_user_role-47-
6
"
>
<createTable
tableName=
"IBZUSER_ROLE"
>
<column
name=
"SYS_USER_ROLEID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_USER_ROLE_SYS_USER_ROLE"
/>
...
...
@@ -116,7 +140,7 @@
</createTable>
</changeSet>
<!--输出实体[SYS_PERMISSION]数据结构 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-sys_permission-191-
6
"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-sys_permission-191-
7
"
>
<createTable
tableName=
"IBZPERMISSION"
>
<column
name=
"SYS_PERMISSIONID"
remarks=
""
type=
"VARCHAR(200)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_PERMISSION_SYS_PERMISSI"
/>
...
...
@@ -136,7 +160,7 @@
</createTable>
</changeSet>
<!--输出实体[SYS_ROLE]数据结构 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-sys_role-
79-7
"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-sys_role-
81-8
"
>
<createTable
tableName=
"IBZROLE"
>
<column
name=
"SYS_ROLEID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_ROLE_SYS_ROLEID"
/>
...
...
@@ -152,7 +176,7 @@
</createTable>
</changeSet>
<!--输出实体[SYS_PSSYSTEM]数据结构 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-sys_pssystem-9-
8
"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-sys_pssystem-9-
9
"
>
<createTable
tableName=
"IBZPSSYSTEM"
>
<column
name=
"PSSYSTEMID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_PSSYSTEM_PSSYSTEMID"
/>
...
...
@@ -162,7 +186,7 @@
</createTable>
</changeSet>
<!--输出实体[SYS_PSAPPMENUITEM]数据结构 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-sys_psappmenuitem-98-
9
"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-sys_psappmenuitem-98-
10
"
>
<createTable
tableName=
"IBZPSAPPMENUITEM"
>
<column
name=
"SYS_PSAPPMENUITEMID"
remarks=
""
type=
"VARCHAR(200)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_PSAPPMENUITEM_SYS_PSAPP"
/>
...
...
@@ -190,18 +214,19 @@
</createTable>
</changeSet>
<!--输出实体[SYS_AUTHLOG]外键关系 -->
<!--输出实体[SYS_PSDEOPPRIV]外键关系 -->
<!--输出实体[SYS_ROLE_PERMISSION]外键关系 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"fk-sys_role_permission-68-1
0
"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"fk-sys_role_permission-68-1
1
"
>
<addForeignKeyConstraint
baseColumnNames=
"SYS_PERMISSIONID"
baseTableName=
"IBZROLE_PERMISSION"
constraintName=
"DER1N_SYS_ROLE_PERMISSION_SYS_"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SYS_PERMISSIONID"
referencedTableName=
"IBZPERMISSION"
validate=
"true"
/>
</changeSet>
<!--输出实体[SYS_USER]外键关系 -->
<!--输出实体[SYS_PSSYSUNIRES]外键关系 -->
<!--输出实体[SYS_USER_ROLE]外键关系 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"fk-sys_user_role-47-1
2
"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"fk-sys_user_role-47-1
3
"
>
<addForeignKeyConstraint
baseColumnNames=
"SYS_ROLEID"
baseTableName=
"IBZUSER_ROLE"
constraintName=
"DER1N_SYS_USER_ROLE_SYS_ROLE_S"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"SYS_ROLEID"
referencedTableName=
"IBZROLE"
validate=
"true"
/>
</changeSet>
<changeSet
author=
"a_A_5d9d78509"
id=
"fk-sys_user_role-47-1
3
"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"fk-sys_user_role-47-1
4
"
>
<addForeignKeyConstraint
baseColumnNames=
"SYS_USERID"
baseTableName=
"IBZUSER_ROLE"
constraintName=
"DER1N_SYS_USER_ROLE_SYS_USER_S"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"USERID"
referencedTableName=
"IBZUSER"
validate=
"true"
/>
</changeSet>
<!--输出实体[SYS_PERMISSION]外键关系 -->
...
...
ibzuaa-core/src/main/resources/mapper/uaa/sys_authlog/SYS_AUTHLOGMapper.xml
0 → 100644
浏览文件 @
26267e0f
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.ibizlab.core.uaa.mapper.SYS_AUTHLOGMapper"
>
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select
id=
"selectById"
resultMap=
"SYS_AUTHLOGResultMap"
databaseId=
"mysql"
>
<![CDATA[select t1.* from (SELECT t1.`AUTHCODE`, t1.`AUTHTIME`, t1.`DOMAIN`, t1.`IPADDR`, t1.`LOGID`, t1.`MACADDR`, t1.`PERSONNAME`, t1.`USERAGENT`, t1.`USERNAME` FROM `IBZAUTHLOG` t1 ) t1 where logid=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap
id=
"SYS_AUTHLOGResultMap"
type=
"cn.ibizlab.core.uaa.domain.SYS_AUTHLOG"
autoMapping=
"true"
>
<id
property=
"logid"
column=
"logid"
/>
<!--主键字段映射-->
</resultMap>
<!--数据集合[Default]-->
<select
id=
"searchDefault"
parameterType=
"cn.ibizlab.core.uaa.filter.SYS_AUTHLOGSearchContext"
resultMap=
"SYS_AUTHLOGResultMap"
>
select t1.* from (
<include
refid=
"Default"
/>
)t1
<where><if
test=
"ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere"
>
${ew.sqlSegment}
</if></where>
<if
test=
"ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere"
>
${ew.sqlSegment}
</if>
</select>
<!--数据查询[Default]-->
<sql
id=
"Default"
databaseId=
"mysql"
>
<![CDATA[ SELECT t1.`AUTHCODE`, t1.`AUTHTIME`, t1.`DOMAIN`, t1.`IPADDR`, t1.`LOGID`, t1.`MACADDR`, t1.`PERSONNAME`, t1.`USERAGENT`, t1.`USERNAME` FROM `IBZAUTHLOG` t1
]]>
</sql>
<!--数据查询[View]-->
<sql
id=
"View"
databaseId=
"mysql"
>
<![CDATA[ SELECT t1.`AUTHCODE`, t1.`AUTHTIME`, t1.`DOMAIN`, t1.`IPADDR`, t1.`LOGID`, t1.`MACADDR`, t1.`PERSONNAME`, t1.`USERAGENT`, t1.`USERNAME` FROM `IBZAUTHLOG` t1
]]>
</sql>
</mapper>
ibzuaa-core/src/main/resources/permission/systemResource.json
浏览文件 @
26267e0f
...
...
@@ -3,6 +3,14 @@
],
"entities"
:[
{
"dename"
:
"SYS_AUTHLOG"
,
"delogicname"
:
"认证日志"
,
"sysmoudle"
:{
"id"
:
"UAA"
,
"name"
:
"uaa"
},
"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"
}],
"datascope"
:[{
"id"
:
"all"
,
"name"
:
"全部数据"
}]
}
,
{
"dename"
:
"SYS_ROLE_PERMISSION"
,
"delogicname"
:
"角色权限关系"
,
"sysmoudle"
:{
"id"
:
"UAA"
,
"name"
:
"uaa"
},
...
...
@@ -64,7 +72,7 @@
{
"appid"
:
"web"
,
"appname"
:
"UAA鉴权"
,
"appmenu"
:[{
"menuid"
:
"Main"
,
"menuname"
:
"MAIN"
,
"menuitem"
:[{
"id"
:
"menuitem3"
,
"name"
:
"用户
管理"
},{
"id"
:
"menuitem6"
,
"name"
:
"角色"
},{
"id"
:
"menuitem7"
,
"name"
:
"用户角色"
},{
"id"
:
"menuitem10"
,
"name"
:
"权限"
},{
"id"
:
"menuitem1"
,
"name"
:
"角色权限
"
}]
}]
"appmenu"
:[{
"menuid"
:
"Main"
,
"menuname"
:
"MAIN"
,
"menuitem"
:[{
"id"
:
"menuitem3"
,
"name"
:
"用户
"
},{
"id"
:
"menuitem6"
,
"name"
:
"角色
"
}]
}]
}
]
}
ibzuaa-provider/ibzuaa-provider-api/src/main/java/cn/ibizlab/api/dto/SYS_AUTHLOGDTO.java
0 → 100644
浏览文件 @
26267e0f
package
cn
.
ibizlab
.
api
.
dto
;
import
java.sql.Timestamp
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.math.BigInteger
;
import
java.util.Map
;
import
java.util.HashMap
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
cn.ibizlab.util.domain.DTOBase
;
import
lombok.Data
;
/**
* 服务DTO对象[SYS_AUTHLOGDTO]
*/
@Data
public
class
SYS_AUTHLOGDTO
extends
DTOBase
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 属性 [LOGID]
*
*/
@JSONField
(
name
=
"logid"
)
@JsonProperty
(
"logid"
)
private
String
logid
;
/**
* 属性 [USERNAME]
*
*/
@JSONField
(
name
=
"username"
)
@JsonProperty
(
"username"
)
private
String
username
;
/**
* 属性 [PERSONNAME]
*
*/
@JSONField
(
name
=
"personname"
)
@JsonProperty
(
"personname"
)
private
String
personname
;
/**
* 属性 [DOMAIN]
*
*/
@JSONField
(
name
=
"domain"
)
@JsonProperty
(
"domain"
)
private
String
domain
;
/**
* 属性 [AUTHTIME]
*
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
locale
=
"zh"
,
timezone
=
"GMT+8"
)
@JSONField
(
name
=
"authtime"
,
format
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonProperty
(
"authtime"
)
private
Timestamp
authtime
;
/**
* 属性 [IPADDR]
*
*/
@JSONField
(
name
=
"ipaddr"
)
@JsonProperty
(
"ipaddr"
)
private
String
ipaddr
;
/**
* 属性 [MACADDR]
*
*/
@JSONField
(
name
=
"macaddr"
)
@JsonProperty
(
"macaddr"
)
private
String
macaddr
;
/**
* 属性 [USERAGENT]
*
*/
@JSONField
(
name
=
"useragent"
)
@JsonProperty
(
"useragent"
)
private
String
useragent
;
/**
* 属性 [AUTHCODE]
*
*/
@JSONField
(
name
=
"authcode"
)
@JsonProperty
(
"authcode"
)
private
String
authcode
;
/**
* 设置 [USERNAME]
*/
public
void
setUsername
(
String
username
){
this
.
username
=
username
;
this
.
modify
(
"username"
,
username
);
}
/**
* 设置 [PERSONNAME]
*/
public
void
setPersonname
(
String
personname
){
this
.
personname
=
personname
;
this
.
modify
(
"personname"
,
personname
);
}
/**
* 设置 [DOMAIN]
*/
public
void
setDomain
(
String
domain
){
this
.
domain
=
domain
;
this
.
modify
(
"domain"
,
domain
);
}
/**
* 设置 [IPADDR]
*/
public
void
setIpaddr
(
String
ipaddr
){
this
.
ipaddr
=
ipaddr
;
this
.
modify
(
"ipaddr"
,
ipaddr
);
}
/**
* 设置 [MACADDR]
*/
public
void
setMacaddr
(
String
macaddr
){
this
.
macaddr
=
macaddr
;
this
.
modify
(
"macaddr"
,
macaddr
);
}
/**
* 设置 [USERAGENT]
*/
public
void
setUseragent
(
String
useragent
){
this
.
useragent
=
useragent
;
this
.
modify
(
"useragent"
,
useragent
);
}
/**
* 设置 [AUTHCODE]
*/
public
void
setAuthcode
(
String
authcode
){
this
.
authcode
=
authcode
;
this
.
modify
(
"authcode"
,
authcode
);
}
}
ibzuaa-provider/ibzuaa-provider-api/src/main/java/cn/ibizlab/api/mapping/SYS_AUTHLOGMapping.java
0 → 100644
浏览文件 @
26267e0f
package
cn
.
ibizlab
.
api
.
mapping
;
import
org.mapstruct.*
;
import
cn.ibizlab.core.uaa.domain.SYS_AUTHLOG
;
import
cn.ibizlab.api.dto.SYS_AUTHLOGDTO
;
import
cn.ibizlab.util.domain.MappingBase
;
import
org.mapstruct.factory.Mappers
;
@Mapper
(
componentModel
=
"spring"
,
uses
=
{},
nullValuePropertyMappingStrategy
=
NullValuePropertyMappingStrategy
.
IGNORE
,
nullValueCheckStrategy
=
NullValueCheckStrategy
.
ALWAYS
)
public
interface
SYS_AUTHLOGMapping
extends
MappingBase
<
SYS_AUTHLOGDTO
,
SYS_AUTHLOG
>
{
}
ibzuaa-provider/ibzuaa-provider-api/src/main/java/cn/ibizlab/api/rest/SYS_AUTHLOGResource.java
0 → 100644
浏览文件 @
26267e0f
package
cn
.
ibizlab
.
api
.
rest
;
import
java.sql.Timestamp
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.math.BigInteger
;
import
java.util.HashMap
;
import
lombok.extern.slf4j.Slf4j
;
import
com.alibaba.fastjson.JSONObject
;
import
javax.servlet.ServletRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cglib.beans.BeanCopier
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.util.StringUtils
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiResponse
;
import
io.swagger.annotations.ApiResponses
;
import
cn.ibizlab.api.dto.*
;
import
cn.ibizlab.api.mapping.*
;
import
cn.ibizlab.core.uaa.domain.SYS_AUTHLOG
;
import
cn.ibizlab.core.uaa.service.ISYS_AUTHLOGService
;
import
cn.ibizlab.core.uaa.filter.SYS_AUTHLOGSearchContext
;
@Slf4j
@Api
(
tags
=
{
"SYS_AUTHLOG"
})
@RestController
(
"api-sys_authlog"
)
@RequestMapping
(
""
)
public
class
SYS_AUTHLOGResource
{
@Autowired
private
ISYS_AUTHLOGService
sys_authlogService
;
@Autowired
@Lazy
public
SYS_AUTHLOGMapping
sys_authlogMapping
;
public
SYS_AUTHLOGDTO
permissionDTO
=
new
SYS_AUTHLOGDTO
();
//@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_AUTHLOG-GetDraft-all')")
@ApiOperation
(
value
=
"GetDraft"
,
tags
=
{
"SYS_AUTHLOG"
},
notes
=
"GetDraft"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/sys_authlogs/getdraft"
)
public
ResponseEntity
<
SYS_AUTHLOGDTO
>
getDraft
()
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
sys_authlogMapping
.
toDto
(
sys_authlogService
.
getDraft
(
new
SYS_AUTHLOG
())));
}
//@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_AUTHLOG-Update-all')")
@ApiOperation
(
value
=
"Update"
,
tags
=
{
"SYS_AUTHLOG"
},
notes
=
"Update"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/sys_authlogs/{sys_authlog_id}"
)
@Transactional
public
ResponseEntity
<
SYS_AUTHLOGDTO
>
update
(
@PathVariable
(
"sys_authlog_id"
)
String
sys_authlog_id
,
@RequestBody
SYS_AUTHLOGDTO
sys_authlogdto
)
{
SYS_AUTHLOG
domain
=
sys_authlogMapping
.
toDomain
(
sys_authlogdto
);
domain
.
setLogid
(
sys_authlog_id
);
sys_authlogService
.
update
(
domain
);
SYS_AUTHLOGDTO
dto
=
sys_authlogMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"UpdateBatch"
,
tags
=
{
"SYS_AUTHLOG"
},
notes
=
"UpdateBatch"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/sys_authlogs/batch"
)
public
ResponseEntity
<
Boolean
>
updateBatch
(
@RequestBody
List
<
SYS_AUTHLOGDTO
>
sys_authlogdtos
)
{
sys_authlogService
.
updateBatch
(
sys_authlogMapping
.
toDomain
(
sys_authlogdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
//@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_AUTHLOG-Remove-all')")
@ApiOperation
(
value
=
"Remove"
,
tags
=
{
"SYS_AUTHLOG"
},
notes
=
"Remove"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/sys_authlogs/{sys_authlog_id}"
)
@Transactional
public
ResponseEntity
<
Boolean
>
remove
(
@PathVariable
(
"sys_authlog_id"
)
String
sys_authlog_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
sys_authlogService
.
remove
(
sys_authlog_id
));
}
@ApiOperation
(
value
=
"RemoveBatch"
,
tags
=
{
"SYS_AUTHLOG"
},
notes
=
"RemoveBatch"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/sys_authlogs/batch"
)
public
ResponseEntity
<
Boolean
>
removeBatch
(
@RequestBody
List
<
String
>
ids
)
{
sys_authlogService
.
removeBatch
(
ids
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
//@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_AUTHLOG-Create-all')")
@ApiOperation
(
value
=
"Create"
,
tags
=
{
"SYS_AUTHLOG"
},
notes
=
"Create"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sys_authlogs"
)
@Transactional
public
ResponseEntity
<
SYS_AUTHLOGDTO
>
create
(
@RequestBody
SYS_AUTHLOGDTO
sys_authlogdto
)
{
SYS_AUTHLOG
domain
=
sys_authlogMapping
.
toDomain
(
sys_authlogdto
);
sys_authlogService
.
create
(
domain
);
SYS_AUTHLOGDTO
dto
=
sys_authlogMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"createBatch"
,
tags
=
{
"SYS_AUTHLOG"
},
notes
=
"createBatch"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sys_authlogs/batch"
)
public
ResponseEntity
<
Boolean
>
createBatch
(
@RequestBody
List
<
SYS_AUTHLOGDTO
>
sys_authlogdtos
)
{
sys_authlogService
.
createBatch
(
sys_authlogMapping
.
toDomain
(
sys_authlogdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
//@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_AUTHLOG-CheckKey-all')")
@ApiOperation
(
value
=
"CheckKey"
,
tags
=
{
"SYS_AUTHLOG"
},
notes
=
"CheckKey"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sys_authlogs/checkkey"
)
public
ResponseEntity
<
Boolean
>
checkKey
(
@RequestBody
SYS_AUTHLOGDTO
sys_authlogdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
sys_authlogService
.
checkKey
(
sys_authlogMapping
.
toDomain
(
sys_authlogdto
)));
}
//@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_AUTHLOG-Get-all')")
@ApiOperation
(
value
=
"Get"
,
tags
=
{
"SYS_AUTHLOG"
},
notes
=
"Get"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/sys_authlogs/{sys_authlog_id}"
)
public
ResponseEntity
<
SYS_AUTHLOGDTO
>
get
(
@PathVariable
(
"sys_authlog_id"
)
String
sys_authlog_id
)
{
SYS_AUTHLOG
domain
=
sys_authlogService
.
get
(
sys_authlog_id
);
SYS_AUTHLOGDTO
dto
=
sys_authlogMapping
.
toDto
(
domain
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
//@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_AUTHLOG-Save-all')")
@ApiOperation
(
value
=
"Save"
,
tags
=
{
"SYS_AUTHLOG"
},
notes
=
"Save"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sys_authlogs/save"
)
public
ResponseEntity
<
Boolean
>
save
(
@RequestBody
SYS_AUTHLOGDTO
sys_authlogdto
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
sys_authlogService
.
save
(
sys_authlogMapping
.
toDomain
(
sys_authlogdto
)));
}
@ApiOperation
(
value
=
"SaveBatch"
,
tags
=
{
"SYS_AUTHLOG"
},
notes
=
"SaveBatch"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sys_authlogs/savebatch"
)
public
ResponseEntity
<
Boolean
>
saveBatch
(
@RequestBody
List
<
SYS_AUTHLOGDTO
>
sys_authlogdtos
)
{
sys_authlogService
.
saveBatch
(
sys_authlogMapping
.
toDomain
(
sys_authlogdtos
));
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
true
);
}
//@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_AUTHLOG-Default-all')")
@ApiOperation
(
value
=
"fetchDEFAULT"
,
tags
=
{
"SYS_AUTHLOG"
}
,
notes
=
"fetchDEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/sys_authlogs/fetchdefault"
)
public
ResponseEntity
<
List
<
SYS_AUTHLOGDTO
>>
fetchDefault
(
SYS_AUTHLOGSearchContext
context
)
{
Page
<
SYS_AUTHLOG
>
domains
=
sys_authlogService
.
searchDefault
(
context
)
;
List
<
SYS_AUTHLOGDTO
>
list
=
sys_authlogMapping
.
toDto
(
domains
.
getContent
());
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
header
(
"x-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageNumber
()))
.
header
(
"x-per-page"
,
String
.
valueOf
(
context
.
getPageable
().
getPageSize
()))
.
header
(
"x-total"
,
String
.
valueOf
(
domains
.
getTotalElements
()))
.
body
(
list
);
}
//@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibzuaa-SYS_AUTHLOG-Default-all')")
@ApiOperation
(
value
=
"searchDEFAULT"
,
tags
=
{
"SYS_AUTHLOG"
}
,
notes
=
"searchDEFAULT"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/sys_authlogs/searchdefault"
)
public
ResponseEntity
<
Page
<
SYS_AUTHLOGDTO
>>
searchDefault
(
@RequestBody
SYS_AUTHLOGSearchContext
context
)
{
Page
<
SYS_AUTHLOG
>
domains
=
sys_authlogService
.
searchDefault
(
context
)
;
return
ResponseEntity
.
status
(
HttpStatus
.
OK
)
.
body
(
new
PageImpl
(
sys_authlogMapping
.
toDto
(
domains
.
getContent
()),
context
.
getPageable
(),
domains
.
getTotalElements
()));
}
}
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录