Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzuaa
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzuaa
提交
feea6b9a
提交
feea6b9a
编写于
4月 30, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibizdev提交
上级
1ec8ec0c
变更
29
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
29 个修改的文件
包含
533 行增加
和
248 行删除
+533
-248
CHANGELOG.md
app_web/CHANGELOG.md
+3
-0
noimage.png
app_web/public/assets/img/noimage.png
+0
-0
app-span.vue
app_web/src/components/app-span/app-span.vue
+9
-9
sys-psdeoppriv_en_US.ts
.../src/locale/lanres/sys-psdeoppriv/sys-psdeoppriv_en_US.ts
+1
-0
sys-psdeoppriv_zh_CN.ts
.../src/locale/lanres/sys-psdeoppriv/sys-psdeoppriv_zh_CN.ts
+1
-0
main-form-base.vue
...b/src/widgets/sys-permission/main-form/main-form-base.vue
+2
-1
main-form-base.vue
.../widgets/sys-role-permission/main-form/main-form-base.vue
+4
-2
main-form-base.vue
app_web/src/widgets/sys-role/main-form/main-form-base.vue
+2
-1
main-form-base.vue
...eb/src/widgets/sys-user-role/main-form/main-form-base.vue
+2
-1
SYS_PSDEOPPRIV.java
.../main/java/cn/ibizlab/core/uaa/domain/SYS_PSDEOPPRIV.java
+14
-0
SYS_PERMISSIONServiceImpl.java
...zlab/core/uaa/service/impl/SYS_PERMISSIONServiceImpl.java
+1
-1
SYS_PSAPPMENUITEMServiceImpl.java
...b/core/uaa/service/impl/SYS_PSAPPMENUITEMServiceImpl.java
+1
-1
SYS_PSDEOPPRIVServiceImpl.java
...zlab/core/uaa/service/impl/SYS_PSDEOPPRIVServiceImpl.java
+1
-1
SYS_PSSYSTEMServiceImpl.java
...bizlab/core/uaa/service/impl/SYS_PSSYSTEMServiceImpl.java
+1
-1
SYS_ROLEServiceImpl.java
...cn/ibizlab/core/uaa/service/impl/SYS_ROLEServiceImpl.java
+1
-1
SYS_ROLE_PERMISSIONServiceImpl.java
...core/uaa/service/impl/SYS_ROLE_PERMISSIONServiceImpl.java
+1
-1
SYS_USERServiceImpl.java
...cn/ibizlab/core/uaa/service/impl/SYS_USERServiceImpl.java
+1
-1
SYS_USER_ROLEServiceImpl.java
...izlab/core/uaa/service/impl/SYS_USER_ROLEServiceImpl.java
+1
-1
DEPrivs.json
ibzuaa-core/src/main/resources/deprivs/DEPrivs.json
+12
-15
h2_table.xml
ibzuaa-core/src/main/resources/liquibase/h2_table.xml
+3
-1
SYS_PSDEOPPRIVMapper.xml
...ources/mapper/uaa/sys_psdeoppriv/SYS_PSDEOPPRIVMapper.xml
+1
-1
SYS_PSDEOPPRIVDTO.java
...rc/main/java/cn/ibizlab/uaaapi/dto/SYS_PSDEOPPRIVDTO.java
+16
-0
FileItem.java
...a-util/src/main/java/cn/ibizlab/util/domain/FileItem.java
+19
-0
FileController.java
...il/src/main/java/cn/ibizlab/util/rest/FileController.java
+86
-0
AuthPermissionEvaluator.java
...ava/cn/ibizlab/util/security/AuthPermissionEvaluator.java
+257
-209
FileService.java
...il/src/main/java/cn/ibizlab/util/service/FileService.java
+11
-0
SimpleFileService.java
.../main/java/cn/ibizlab/util/service/SimpleFileService.java
+75
-0
SimpleUserService.java
.../main/java/cn/ibizlab/util/service/SimpleUserService.java
+3
-0
application-sys.yml
ibzuaa-util/src/main/resources/application-sys.yml
+4
-0
未找到文件。
app_web/CHANGELOG.md
0 → 100644
浏览文件 @
feea6b9a
*2020-4-29*
初始化文件
app_web/public/assets/img/noimage.png
0 → 100644
浏览文件 @
feea6b9a
18.2 KB
app_web/src/components/app-span/app-span.vue
浏览文件 @
feea6b9a
<
template
>
<
template
>
<codelist
v-if=
"tag"
:tag=
"tag"
:value=
"value"
:codelistType=
"codelistType"
:renderMode=
"renderMode"
:valueSeparator=
"valueSeparator"
:textSeparator=
"textSeparator"
></codelist>
<codelist
v-if=
"tag"
:tag=
"tag"
:value=
"value"
:codelistType=
"codelistType"
:renderMode=
"renderMode"
:valueSeparator=
"valueSeparator"
:textSeparator=
"textSeparator"
></codelist>
<app-upload-file-info
v-else-if=
"Object.is(this.editorType,'PICTURE') || Object.is(this.editorType,'PICTURE_ONE') || Object.is(this.editorType,'FILEUPLOADER')"
:value=
"value"
:name=
"name"
></app-upload-file-info>
<span
class=
"app-span"
v-else
>
{{
text
}}
</span>
<span
class=
"app-span"
v-else
>
{{
text
}}
</span>
</
template
>
</
template
>
...
@@ -18,6 +19,14 @@ export default class DropDownList extends Vue {
...
@@ -18,6 +19,14 @@ export default class DropDownList extends Vue {
*/
*/
@
Prop
()
public
value
?:
any
;
@
Prop
()
public
value
?:
any
;
/**
* 当前表单项名称
*
* @type {*}
* @memberof AppSpan
*/
@
Prop
()
public
name
?:
any
;
/**
/**
* 代码表标识
* 代码表标识
*
*
...
@@ -99,15 +108,6 @@ export default class DropDownList extends Vue {
...
@@ -99,15 +108,6 @@ export default class DropDownList extends Vue {
public
load
(){
public
load
(){
if
(
!
this
.
value
||
this
.
tag
){
if
(
!
this
.
value
||
this
.
tag
){
return
;
//代码表走codelist组件
return
;
//代码表走codelist组件
}
else
if
(
Object
.
is
(
this
.
editorType
,
'PICTURE'
)
||
Object
.
is
(
this
.
editorType
,
'PICTURE_ONE'
)
||
Object
.
is
(
this
.
editorType
,
'FILEUPLOADER'
)){
let
files
:
any
[]
=
JSON
.
parse
(
this
.
value
);
let
names
:
any
[]
=
[];
if
(
files
.
length
&&
files
.
length
>
0
){
files
.
forEach
((
item
:
any
)
=>
{
names
.
push
(
item
.
name
);
});
this
.
text
=
names
.
join
(
','
);
}
}
else
{
}
else
{
this
.
text
=
this
.
value
;
this
.
text
=
this
.
value
;
}
}
...
...
app_web/src/locale/lanres/sys-psdeoppriv/sys-psdeoppriv_en_US.ts
浏览文件 @
feea6b9a
...
@@ -15,5 +15,6 @@ export default {
...
@@ -15,5 +15,6 @@ export default {
permissionid
:
'系统资源标识'
,
permissionid
:
'系统资源标识'
,
createdate
:
'建立时间'
,
createdate
:
'建立时间'
,
updatedate
:
'更新时间'
,
updatedate
:
'更新时间'
,
permissiontype
:
'资源类型'
,
},
},
};
};
\ No newline at end of file
app_web/src/locale/lanres/sys-psdeoppriv/sys-psdeoppriv_zh_CN.ts
浏览文件 @
feea6b9a
...
@@ -14,5 +14,6 @@ export default {
...
@@ -14,5 +14,6 @@ export default {
permissionid
:
'系统资源标识'
,
permissionid
:
'系统资源标识'
,
createdate
:
'建立时间'
,
createdate
:
'建立时间'
,
updatedate
:
'更新时间'
,
updatedate
:
'更新时间'
,
permissiontype
:
'资源类型'
,
},
},
};
};
\ No newline at end of file
app_web/src/widgets/sys-permission/main-form/main-form-base.vue
浏览文件 @
feea6b9a
...
@@ -21,7 +21,8 @@
...
@@ -21,7 +21,8 @@
</i-col>
</i-col>
<i-col
v-show=
"detailsModel.sys_permissionid.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<i-col
v-show=
"detailsModel.sys_permissionid.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'sys_permissionid'
:itemRules=
"this.rules.sys_permissionid"
class=
''
:caption=
"$t('entities.sys_permission.main_form.details.sys_permissionid')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.sys_permissionid.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-form-item
name=
'sys_permissionid'
:itemRules=
"this.rules.sys_permissionid"
class=
''
:caption=
"$t('entities.sys_permission.main_form.details.sys_permissionid')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.sys_permissionid.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-span
:value=
"data.sys_permissionid"
style=
""
></app-span>
<app-span
name=
'sys_permissionid'
:value=
"data.sys_permissionid"
style=
""
></app-span>
</app-form-item>
</app-form-item>
</i-col>
</i-col>
...
...
app_web/src/widgets/sys-role-permission/main-form/main-form-base.vue
浏览文件 @
feea6b9a
...
@@ -34,7 +34,8 @@
...
@@ -34,7 +34,8 @@
</i-col>
</i-col>
<i-col
v-show=
"detailsModel.type.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<i-col
v-show=
"detailsModel.type.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'type'
:itemRules=
"this.rules.type"
class=
''
:caption=
"$t('entities.sys_role_permission.main_form.details.type')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.type.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-form-item
name=
'type'
:itemRules=
"this.rules.type"
class=
''
:caption=
"$t('entities.sys_role_permission.main_form.details.type')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.type.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-span
:value=
"data.type"
tag=
'CLPermissionType'
codelistType=
'STATIC'
style=
""
></app-span>
<app-span
name=
'type'
:value=
"data.type"
tag=
'CLPermissionType'
codelistType=
'STATIC'
style=
""
></app-span>
</app-form-item>
</app-form-item>
</i-col>
</i-col>
...
@@ -65,7 +66,8 @@
...
@@ -65,7 +66,8 @@
</i-col>
</i-col>
<i-col
v-show=
"detailsModel.sys_role_permissionid.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<i-col
v-show=
"detailsModel.sys_role_permissionid.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'sys_role_permissionid'
:itemRules=
"this.rules.sys_role_permissionid"
class=
''
:caption=
"$t('entities.sys_role_permission.main_form.details.sys_role_permissionid')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.sys_role_permissionid.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-form-item
name=
'sys_role_permissionid'
:itemRules=
"this.rules.sys_role_permissionid"
class=
''
:caption=
"$t('entities.sys_role_permission.main_form.details.sys_role_permissionid')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.sys_role_permissionid.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-span
:value=
"data.sys_role_permissionid"
style=
""
></app-span>
<app-span
name=
'sys_role_permissionid'
:value=
"data.sys_role_permissionid"
style=
""
></app-span>
</app-form-item>
</app-form-item>
</i-col>
</i-col>
...
...
app_web/src/widgets/sys-role/main-form/main-form-base.vue
浏览文件 @
feea6b9a
...
@@ -21,7 +21,8 @@
...
@@ -21,7 +21,8 @@
</i-col>
</i-col>
<i-col
v-show=
"detailsModel.sys_roleid.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<i-col
v-show=
"detailsModel.sys_roleid.visible"
:style=
"
{}" :lg="{ span: 24, 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-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
:value=
"data.sys_roleid"
style=
""
></app-span>
<app-span
name=
'sys_roleid'
:value=
"data.sys_roleid"
style=
""
></app-span>
</app-form-item>
</app-form-item>
</i-col>
</i-col>
...
...
app_web/src/widgets/sys-user-role/main-form/main-form-base.vue
浏览文件 @
feea6b9a
...
@@ -21,7 +21,8 @@
...
@@ -21,7 +21,8 @@
</i-col>
</i-col>
<i-col
v-show=
"detailsModel.sys_user_roleid.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<i-col
v-show=
"detailsModel.sys_user_roleid.visible"
:style=
"
{}" :lg="{ span: 24, offset: 0 }">
<app-form-item
name=
'sys_user_roleid'
:itemRules=
"this.rules.sys_user_roleid"
class=
''
:caption=
"$t('entities.sys_user_role.main_form.details.sys_user_roleid')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.sys_user_roleid.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-form-item
name=
'sys_user_roleid'
:itemRules=
"this.rules.sys_user_roleid"
class=
''
:caption=
"$t('entities.sys_user_role.main_form.details.sys_user_roleid')"
uiStyle=
"DEFAULT"
:labelWidth=
"130"
:isShowCaption=
"true"
:error=
"detailsModel.sys_user_roleid.error"
:isEmptyCaption=
"false"
labelPos=
"LEFT"
>
<app-span
:value=
"data.sys_user_roleid"
style=
""
></app-span>
<app-span
name=
'sys_user_roleid'
:value=
"data.sys_user_roleid"
style=
""
></app-span>
</app-form-item>
</app-form-item>
</i-col>
</i-col>
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/domain/SYS_PSDEOPPRIV.java
浏览文件 @
feea6b9a
...
@@ -135,6 +135,13 @@ public class SYS_PSDEOPPRIV extends EntityMP implements Serializable {
...
@@ -135,6 +135,13 @@ public class SYS_PSDEOPPRIV extends EntityMP implements Serializable {
@JSONField
(
name
=
"updatedate"
,
format
=
"yyyy-MM-dd HH:mm:ss"
)
@JSONField
(
name
=
"updatedate"
,
format
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonProperty
(
"updatedate"
)
@JsonProperty
(
"updatedate"
)
private
Timestamp
updatedate
;
private
Timestamp
updatedate
;
/**
* 资源类型
*/
@TableField
(
value
=
"permissiontype"
)
@JSONField
(
name
=
"permissiontype"
)
@JsonProperty
(
"permissiontype"
)
private
String
permissiontype
;
...
@@ -215,6 +222,13 @@ public class SYS_PSDEOPPRIV extends EntityMP implements Serializable {
...
@@ -215,6 +222,13 @@ public class SYS_PSDEOPPRIV extends EntityMP implements Serializable {
this
.
permissionid
=
permissionid
;
this
.
permissionid
=
permissionid
;
this
.
modify
(
"permissionid"
,
permissionid
);
this
.
modify
(
"permissionid"
,
permissionid
);
}
}
/**
* 设置 [资源类型]
*/
public
void
setPermissiontype
(
String
permissiontype
){
this
.
permissiontype
=
permissiontype
;
this
.
modify
(
"permissiontype"
,
permissiontype
);
}
}
}
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SYS_PERMISSIONServiceImpl.java
浏览文件 @
feea6b9a
...
@@ -39,7 +39,7 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -39,7 +39,7 @@ import com.alibaba.fastjson.JSONObject;
* 实体[权限/资源] 服务对象接口实现
* 实体[权限/资源] 服务对象接口实现
*/
*/
@Slf4j
@Slf4j
@Service
@Service
(
"SYS_PERMISSIONServiceImpl"
)
public
class
SYS_PERMISSIONServiceImpl
extends
ServiceImpl
<
SYS_PERMISSIONMapper
,
SYS_PERMISSION
>
implements
ISYS_PERMISSIONService
{
public
class
SYS_PERMISSIONServiceImpl
extends
ServiceImpl
<
SYS_PERMISSIONMapper
,
SYS_PERMISSION
>
implements
ISYS_PERMISSIONService
{
@Autowired
@Autowired
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SYS_PSAPPMENUITEMServiceImpl.java
浏览文件 @
feea6b9a
...
@@ -39,7 +39,7 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -39,7 +39,7 @@ import com.alibaba.fastjson.JSONObject;
* 实体[系统菜单项] 服务对象接口实现
* 实体[系统菜单项] 服务对象接口实现
*/
*/
@Slf4j
@Slf4j
@Service
@Service
(
"SYS_PSAPPMENUITEMServiceImpl"
)
public
class
SYS_PSAPPMENUITEMServiceImpl
extends
ServiceImpl
<
SYS_PSAPPMENUITEMMapper
,
SYS_PSAPPMENUITEM
>
implements
ISYS_PSAPPMENUITEMService
{
public
class
SYS_PSAPPMENUITEMServiceImpl
extends
ServiceImpl
<
SYS_PSAPPMENUITEMMapper
,
SYS_PSAPPMENUITEM
>
implements
ISYS_PSAPPMENUITEMService
{
private
int
batchSize
=
500
;
private
int
batchSize
=
500
;
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SYS_PSDEOPPRIVServiceImpl.java
浏览文件 @
feea6b9a
...
@@ -39,7 +39,7 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -39,7 +39,7 @@ import com.alibaba.fastjson.JSONObject;
* 实体[实体数据操作标识] 服务对象接口实现
* 实体[实体数据操作标识] 服务对象接口实现
*/
*/
@Slf4j
@Slf4j
@Service
@Service
(
"SYS_PSDEOPPRIVServiceImpl"
)
public
class
SYS_PSDEOPPRIVServiceImpl
extends
ServiceImpl
<
SYS_PSDEOPPRIVMapper
,
SYS_PSDEOPPRIV
>
implements
ISYS_PSDEOPPRIVService
{
public
class
SYS_PSDEOPPRIVServiceImpl
extends
ServiceImpl
<
SYS_PSDEOPPRIVMapper
,
SYS_PSDEOPPRIV
>
implements
ISYS_PSDEOPPRIVService
{
private
int
batchSize
=
500
;
private
int
batchSize
=
500
;
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SYS_PSSYSTEMServiceImpl.java
浏览文件 @
feea6b9a
...
@@ -39,7 +39,7 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -39,7 +39,7 @@ import com.alibaba.fastjson.JSONObject;
* 实体[实体] 服务对象接口实现
* 实体[实体] 服务对象接口实现
*/
*/
@Slf4j
@Slf4j
@Service
@Service
(
"SYS_PSSYSTEMServiceImpl"
)
public
class
SYS_PSSYSTEMServiceImpl
extends
ServiceImpl
<
SYS_PSSYSTEMMapper
,
SYS_PSSYSTEM
>
implements
ISYS_PSSYSTEMService
{
public
class
SYS_PSSYSTEMServiceImpl
extends
ServiceImpl
<
SYS_PSSYSTEMMapper
,
SYS_PSSYSTEM
>
implements
ISYS_PSSYSTEMService
{
private
int
batchSize
=
500
;
private
int
batchSize
=
500
;
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SYS_ROLEServiceImpl.java
浏览文件 @
feea6b9a
...
@@ -39,7 +39,7 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -39,7 +39,7 @@ import com.alibaba.fastjson.JSONObject;
* 实体[系统角色] 服务对象接口实现
* 实体[系统角色] 服务对象接口实现
*/
*/
@Slf4j
@Slf4j
@Service
@Service
(
"SYS_ROLEServiceImpl"
)
public
class
SYS_ROLEServiceImpl
extends
ServiceImpl
<
SYS_ROLEMapper
,
SYS_ROLE
>
implements
ISYS_ROLEService
{
public
class
SYS_ROLEServiceImpl
extends
ServiceImpl
<
SYS_ROLEMapper
,
SYS_ROLE
>
implements
ISYS_ROLEService
{
@Autowired
@Autowired
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SYS_ROLE_PERMISSIONServiceImpl.java
浏览文件 @
feea6b9a
...
@@ -39,7 +39,7 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -39,7 +39,7 @@ import com.alibaba.fastjson.JSONObject;
* 实体[角色权限关系] 服务对象接口实现
* 实体[角色权限关系] 服务对象接口实现
*/
*/
@Slf4j
@Slf4j
@Service
@Service
(
"SYS_ROLE_PERMISSIONServiceImpl"
)
public
class
SYS_ROLE_PERMISSIONServiceImpl
extends
ServiceImpl
<
SYS_ROLE_PERMISSIONMapper
,
SYS_ROLE_PERMISSION
>
implements
ISYS_ROLE_PERMISSIONService
{
public
class
SYS_ROLE_PERMISSIONServiceImpl
extends
ServiceImpl
<
SYS_ROLE_PERMISSIONMapper
,
SYS_ROLE_PERMISSION
>
implements
ISYS_ROLE_PERMISSIONService
{
private
int
batchSize
=
500
;
private
int
batchSize
=
500
;
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SYS_USERServiceImpl.java
浏览文件 @
feea6b9a
...
@@ -39,7 +39,7 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -39,7 +39,7 @@ import com.alibaba.fastjson.JSONObject;
* 实体[系统用户] 服务对象接口实现
* 实体[系统用户] 服务对象接口实现
*/
*/
@Slf4j
@Slf4j
@Service
@Service
(
"SYS_USERServiceImpl"
)
public
class
SYS_USERServiceImpl
extends
ServiceImpl
<
SYS_USERMapper
,
SYS_USER
>
implements
ISYS_USERService
{
public
class
SYS_USERServiceImpl
extends
ServiceImpl
<
SYS_USERMapper
,
SYS_USER
>
implements
ISYS_USERService
{
@Autowired
@Autowired
...
...
ibzuaa-core/src/main/java/cn/ibizlab/core/uaa/service/impl/SYS_USER_ROLEServiceImpl.java
浏览文件 @
feea6b9a
...
@@ -39,7 +39,7 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -39,7 +39,7 @@ import com.alibaba.fastjson.JSONObject;
* 实体[用户角色关系] 服务对象接口实现
* 实体[用户角色关系] 服务对象接口实现
*/
*/
@Slf4j
@Slf4j
@Service
@Service
(
"SYS_USER_ROLEServiceImpl"
)
public
class
SYS_USER_ROLEServiceImpl
extends
ServiceImpl
<
SYS_USER_ROLEMapper
,
SYS_USER_ROLE
>
implements
ISYS_USER_ROLEService
{
public
class
SYS_USER_ROLEServiceImpl
extends
ServiceImpl
<
SYS_USER_ROLEMapper
,
SYS_USER_ROLE
>
implements
ISYS_USER_ROLEService
{
private
int
batchSize
=
500
;
private
int
batchSize
=
500
;
...
...
ibzuaa-core/src/main/resources/deprivs/DEPrivs.json
浏览文件 @
feea6b9a
[
{
"predefineddatarange"
:[{
"id"
:
"ALL"
,
"name"
:
"全部数据"
},{
"id"
:
"CURORG"
,
"name"
:
"当前单位"
},{
"id"
:
"PORG"
,
"name"
:
"上级单位"
},{
"id"
:
"SORG"
,
"name"
:
"下级单位"
},{
"id"
:
"CURORGDEPT"
,
"name"
:
"当前部门"
},{
"id"
:
"PORGDEPT"
,
"name"
:
"上级部门"
},{
"id"
:
"SORGDEPT"
,
"name"
:
"下级部门"
}],
"entities"
:[
{
{
"dename"
:
"SYS_ROLE_PERMISSION"
,
"dename"
:
"SYS_ROLE_PERMISSION"
,
"delogicname"
:
"角色权限关系"
,
"delogicname"
:
"角色权限关系"
,
"sysmoudle"
:{
"id"
:
"UAA"
,
"name"
:
"uaa"
},
"sysmoudle"
:{
"id"
:
"UAA"
,
"name"
:
"uaa"
},
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"默认数据集"
}],
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"默认数据集"
}],
"dedatarange"
:[{
"id"
:
"ALL"
,
"name"
:
"全部数据"
},{
"id"
:
"CURORG"
,
"name"
:
"当前单位"
},{
"id"
:
"PORG"
,
"name"
:
"上级单位"
},{
"id"
:
"SORG"
,
"name"
:
"下级单位"
},{
"id"
:
"CURORGDEPT"
,
"name"
:
"当前部门"
},{
"id"
:
"PORGDEPT"
,
"name"
:
"上级部门"
},{
"id"
:
"SORGDEPT"
,
"name"
:
"下级部门"
}],
"deaction"
:[{
"id"
:
"CREATE"
,
"name"
:
"新建"
,
"type"
:
"BUILTIN"
},{
"id"
:
"UPDATE"
,
"name"
:
"编辑"
,
"type"
:
"BUILTIN"
},{
"id"
:
"READ"
,
"name"
:
"读取"
,
"type"
:
"BUILTIN"
},{
"id"
:
"DELETE"
,
"name"
:
"删除"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CUSTOM"
,
"name"
:
"自定义行为"
,
"type"
:
"USERCUSTOM"
}]
"deprivs"
:[{
"id"
:
"READ"
,
"name"
:
"READ"
},{
"id"
:
"CREATE"
,
"name"
:
"CREATE"
},{
"id"
:
"UPDATE"
,
"name"
:
"UPDATE"
},{
"id"
:
"DELETE"
,
"name"
:
"DELETE"
}]
}
}
,
,
{
{
...
@@ -15,8 +16,7 @@
...
@@ -15,8 +16,7 @@
"delogicname"
:
"权限/资源"
,
"delogicname"
:
"权限/资源"
,
"sysmoudle"
:{
"id"
:
"UAA"
,
"name"
:
"uaa"
},
"sysmoudle"
:{
"id"
:
"UAA"
,
"name"
:
"uaa"
},
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"默认数据集"
}],
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"默认数据集"
}],
"dedatarange"
:[{
"id"
:
"ALL"
,
"name"
:
"全部数据"
},{
"id"
:
"CURORG"
,
"name"
:
"当前单位"
},{
"id"
:
"PORG"
,
"name"
:
"上级单位"
},{
"id"
:
"SORG"
,
"name"
:
"下级单位"
},{
"id"
:
"CURORGDEPT"
,
"name"
:
"当前部门"
},{
"id"
:
"PORGDEPT"
,
"name"
:
"上级部门"
},{
"id"
:
"SORGDEPT"
,
"name"
:
"下级部门"
}],
"deaction"
:[{
"id"
:
"CREATE"
,
"name"
:
"新建"
,
"type"
:
"BUILTIN"
},{
"id"
:
"UPDATE"
,
"name"
:
"编辑"
,
"type"
:
"BUILTIN"
},{
"id"
:
"READ"
,
"name"
:
"读取"
,
"type"
:
"BUILTIN"
},{
"id"
:
"DELETE"
,
"name"
:
"删除"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CUSTOM"
,
"name"
:
"自定义行为"
,
"type"
:
"USERCUSTOM"
}]
"deprivs"
:[{
"id"
:
"READ"
,
"name"
:
"READ"
},{
"id"
:
"CREATE"
,
"name"
:
"CREATE"
},{
"id"
:
"UPDATE"
,
"name"
:
"UPDATE"
},{
"id"
:
"DELETE"
,
"name"
:
"DELETE"
}]
}
}
,
,
{
{
...
@@ -24,8 +24,7 @@
...
@@ -24,8 +24,7 @@
"delogicname"
:
"用户角色关系"
,
"delogicname"
:
"用户角色关系"
,
"sysmoudle"
:{
"id"
:
"UAA"
,
"name"
:
"uaa"
},
"sysmoudle"
:{
"id"
:
"UAA"
,
"name"
:
"uaa"
},
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"默认数据集"
}],
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"默认数据集"
}],
"dedatarange"
:[{
"id"
:
"ALL"
,
"name"
:
"全部数据"
},{
"id"
:
"CURORG"
,
"name"
:
"当前单位"
},{
"id"
:
"PORG"
,
"name"
:
"上级单位"
},{
"id"
:
"SORG"
,
"name"
:
"下级单位"
},{
"id"
:
"CURORGDEPT"
,
"name"
:
"当前部门"
},{
"id"
:
"PORGDEPT"
,
"name"
:
"上级部门"
},{
"id"
:
"SORGDEPT"
,
"name"
:
"下级部门"
}],
"deaction"
:[{
"id"
:
"CREATE"
,
"name"
:
"新建"
,
"type"
:
"BUILTIN"
},{
"id"
:
"UPDATE"
,
"name"
:
"编辑"
,
"type"
:
"BUILTIN"
},{
"id"
:
"READ"
,
"name"
:
"读取"
,
"type"
:
"BUILTIN"
},{
"id"
:
"DELETE"
,
"name"
:
"删除"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CUSTOM"
,
"name"
:
"自定义行为"
,
"type"
:
"USERCUSTOM"
}]
"deprivs"
:[{
"id"
:
"READ"
,
"name"
:
"READ"
},{
"id"
:
"CREATE"
,
"name"
:
"CREATE"
},{
"id"
:
"UPDATE"
,
"name"
:
"UPDATE"
},{
"id"
:
"DELETE"
,
"name"
:
"DELETE"
}]
}
}
,
,
{
{
...
@@ -33,8 +32,7 @@
...
@@ -33,8 +32,7 @@
"delogicname"
:
"系统用户"
,
"delogicname"
:
"系统用户"
,
"sysmoudle"
:{
"id"
:
"UAA"
,
"name"
:
"uaa"
},
"sysmoudle"
:{
"id"
:
"UAA"
,
"name"
:
"uaa"
},
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"默认数据集"
}],
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"默认数据集"
}],
"dedatarange"
:[{
"id"
:
"ALL"
,
"name"
:
"全部数据"
},{
"id"
:
"CURORG"
,
"name"
:
"当前单位"
},{
"id"
:
"PORG"
,
"name"
:
"上级单位"
},{
"id"
:
"SORG"
,
"name"
:
"下级单位"
},{
"id"
:
"CURORGDEPT"
,
"name"
:
"当前部门"
},{
"id"
:
"PORGDEPT"
,
"name"
:
"上级部门"
},{
"id"
:
"SORGDEPT"
,
"name"
:
"下级部门"
}],
"deaction"
:[{
"id"
:
"CREATE"
,
"name"
:
"新建"
,
"type"
:
"BUILTIN"
},{
"id"
:
"UPDATE"
,
"name"
:
"编辑"
,
"type"
:
"BUILTIN"
},{
"id"
:
"READ"
,
"name"
:
"读取"
,
"type"
:
"BUILTIN"
},{
"id"
:
"DELETE"
,
"name"
:
"删除"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CUSTOM"
,
"name"
:
"自定义行为"
,
"type"
:
"USERCUSTOM"
}]
"deprivs"
:[{
"id"
:
"READ"
,
"name"
:
"READ"
},{
"id"
:
"CREATE"
,
"name"
:
"CREATE"
},{
"id"
:
"UPDATE"
,
"name"
:
"UPDATE"
},{
"id"
:
"DELETE"
,
"name"
:
"DELETE"
}]
}
}
,
,
{
{
...
@@ -42,8 +40,7 @@
...
@@ -42,8 +40,7 @@
"delogicname"
:
"系统角色"
,
"delogicname"
:
"系统角色"
,
"sysmoudle"
:{
"id"
:
"UAA"
,
"name"
:
"uaa"
},
"sysmoudle"
:{
"id"
:
"UAA"
,
"name"
:
"uaa"
},
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"默认数据集"
}],
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"默认数据集"
}],
"dedatarange"
:[{
"id"
:
"ALL"
,
"name"
:
"全部数据"
},{
"id"
:
"CURORG"
,
"name"
:
"当前单位"
},{
"id"
:
"PORG"
,
"name"
:
"上级单位"
},{
"id"
:
"SORG"
,
"name"
:
"下级单位"
},{
"id"
:
"CURORGDEPT"
,
"name"
:
"当前部门"
},{
"id"
:
"PORGDEPT"
,
"name"
:
"上级部门"
},{
"id"
:
"SORGDEPT"
,
"name"
:
"下级部门"
}],
"deaction"
:[{
"id"
:
"CREATE"
,
"name"
:
"新建"
,
"type"
:
"BUILTIN"
},{
"id"
:
"UPDATE"
,
"name"
:
"编辑"
,
"type"
:
"BUILTIN"
},{
"id"
:
"READ"
,
"name"
:
"读取"
,
"type"
:
"BUILTIN"
},{
"id"
:
"DELETE"
,
"name"
:
"删除"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CUSTOM"
,
"name"
:
"自定义行为"
,
"type"
:
"USERCUSTOM"
}]
"deprivs"
:[{
"id"
:
"READ"
,
"name"
:
"READ"
},{
"id"
:
"CREATE"
,
"name"
:
"CREATE"
},{
"id"
:
"UPDATE"
,
"name"
:
"UPDATE"
},{
"id"
:
"DELETE"
,
"name"
:
"DELETE"
}]
}
}
,
,
{
{
...
@@ -51,8 +48,7 @@
...
@@ -51,8 +48,7 @@
"delogicname"
:
"系统菜单项"
,
"delogicname"
:
"系统菜单项"
,
"sysmoudle"
:{
"id"
:
"UAA"
,
"name"
:
"uaa"
},
"sysmoudle"
:{
"id"
:
"UAA"
,
"name"
:
"uaa"
},
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"默认数据集"
}],
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"默认数据集"
}],
"dedatarange"
:[{
"id"
:
"ALL"
,
"name"
:
"全部数据"
},{
"id"
:
"CURORG"
,
"name"
:
"当前单位"
},{
"id"
:
"PORG"
,
"name"
:
"上级单位"
},{
"id"
:
"SORG"
,
"name"
:
"下级单位"
},{
"id"
:
"CURORGDEPT"
,
"name"
:
"当前部门"
},{
"id"
:
"PORGDEPT"
,
"name"
:
"上级部门"
},{
"id"
:
"SORGDEPT"
,
"name"
:
"下级部门"
}],
"deaction"
:[{
"id"
:
"CREATE"
,
"name"
:
"新建"
,
"type"
:
"BUILTIN"
},{
"id"
:
"UPDATE"
,
"name"
:
"编辑"
,
"type"
:
"BUILTIN"
},{
"id"
:
"READ"
,
"name"
:
"读取"
,
"type"
:
"BUILTIN"
},{
"id"
:
"DELETE"
,
"name"
:
"删除"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CUSTOM"
,
"name"
:
"自定义行为"
,
"type"
:
"USERCUSTOM"
}]
"deprivs"
:[{
"id"
:
"READ"
,
"name"
:
"READ"
},{
"id"
:
"CREATE"
,
"name"
:
"CREATE"
},{
"id"
:
"UPDATE"
,
"name"
:
"UPDATE"
},{
"id"
:
"DELETE"
,
"name"
:
"DELETE"
}]
}
}
,
,
{
{
...
@@ -60,8 +56,9 @@
...
@@ -60,8 +56,9 @@
"delogicname"
:
"实体数据操作标识"
,
"delogicname"
:
"实体数据操作标识"
,
"sysmoudle"
:{
"id"
:
"UAA"
,
"name"
:
"uaa"
},
"sysmoudle"
:{
"id"
:
"UAA"
,
"name"
:
"uaa"
},
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"默认数据集"
}],
"dedataset"
:[{
"id"
:
"Default"
,
"name"
:
"默认数据集"
}],
"dedatarange"
:[{
"id"
:
"ALL"
,
"name"
:
"全部数据"
},{
"id"
:
"CURORG"
,
"name"
:
"当前单位"
},{
"id"
:
"PORG"
,
"name"
:
"上级单位"
},{
"id"
:
"SORG"
,
"name"
:
"下级单位"
},{
"id"
:
"CURORGDEPT"
,
"name"
:
"当前部门"
},{
"id"
:
"PORGDEPT"
,
"name"
:
"上级部门"
},{
"id"
:
"SORGDEPT"
,
"name"
:
"下级部门"
}],
"deaction"
:[{
"id"
:
"CREATE"
,
"name"
:
"新建"
,
"type"
:
"BUILTIN"
},{
"id"
:
"UPDATE"
,
"name"
:
"编辑"
,
"type"
:
"BUILTIN"
},{
"id"
:
"READ"
,
"name"
:
"读取"
,
"type"
:
"BUILTIN"
},{
"id"
:
"DELETE"
,
"name"
:
"删除"
,
"type"
:
"BUILTIN"
},{
"id"
:
"CUSTOM"
,
"name"
:
"自定义行为"
,
"type"
:
"USERCUSTOM"
}]
"deprivs"
:[{
"id"
:
"READ"
,
"name"
:
"READ"
},{
"id"
:
"CREATE"
,
"name"
:
"CREATE"
},{
"id"
:
"UPDATE"
,
"name"
:
"UPDATE"
},{
"id"
:
"DELETE"
,
"name"
:
"DELETE"
}]
}
}
]
]
}
ibzuaa-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
feea6b9a
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<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"
>
<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_PSDEOPPRIV]数据结构 -->
<!--输出实体[SYS_PSDEOPPRIV]数据结构 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-sys_psdeoppriv-
42
-1"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-sys_psdeoppriv-
51
-1"
>
<createTable
tableName=
"IBZPSDEOPPRIV"
>
<createTable
tableName=
"IBZPSDEOPPRIV"
>
<column
name=
"SYS_PSDEOPPRIVID"
remarks=
""
type=
"VARCHAR(200)"
>
<column
name=
"SYS_PSDEOPPRIVID"
remarks=
""
type=
"VARCHAR(200)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_PSDEOPPRIV_SYS_PSDEOPPR"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_SYS_PSDEOPPRIV_SYS_PSDEOPPR"
/>
...
@@ -33,6 +33,8 @@
...
@@ -33,6 +33,8 @@
</column>
</column>
<column
name=
"UPDATEDATE"
remarks=
""
type=
"DATETIME"
>
<column
name=
"UPDATEDATE"
remarks=
""
type=
"DATETIME"
>
</column>
</column>
<column
name=
"PERMISSIONTYPE"
remarks=
""
type=
"VARCHAR(100)"
>
</column>
</createTable>
</createTable>
</changeSet>
</changeSet>
<!--输出实体[SYS_USER]数据结构 -->
<!--输出实体[SYS_USER]数据结构 -->
...
...
ibzuaa-core/src/main/resources/mapper/uaa/sys_psdeoppriv/SYS_PSDEOPPRIVMapper.xml
浏览文件 @
feea6b9a
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
<!--数据查询[Default]-->
<!--数据查询[Default]-->
<sql
id=
"Default"
databaseId=
"mysql"
>
<sql
id=
"Default"
databaseId=
"mysql"
>
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`PERMISSIONID`, t1.`PSDATAENTITYID`, t1.`PSDATAENTITYNAME`, t1.`PSDEDATARANGEID`, t1.`PSDEDATARANGENAME`, t1.`PSDEDATASETID`, t1.`PSDEDATASETNAME`, t1.`PSSYSMODULEID`, t1.`PSSYSMODULENAME`, t1.`PSSYSTEMID`, t1.`SYS_PSDEOPPRIVID`, t1.`SYS_PSDEOPPRIVNAME`, t1.`UPDATEDATE` FROM `IBZPSDEOPPRIV` t1
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`PERMISSIONID`, t1.`P
ERMISSIONTYPE`, t1.`P
SDATAENTITYID`, t1.`PSDATAENTITYNAME`, t1.`PSDEDATARANGEID`, t1.`PSDEDATARANGENAME`, t1.`PSDEDATASETID`, t1.`PSDEDATASETNAME`, t1.`PSSYSMODULEID`, t1.`PSSYSMODULENAME`, t1.`PSSYSTEMID`, t1.`SYS_PSDEOPPRIVID`, t1.`SYS_PSDEOPPRIVNAME`, t1.`UPDATEDATE` FROM `IBZPSDEOPPRIV` t1
]]>
]]>
</sql>
</sql>
...
...
ibzuaa-provider/ibzuaa-provider-uaaapi/src/main/java/cn/ibizlab/uaaapi/dto/SYS_PSDEOPPRIVDTO.java
浏览文件 @
feea6b9a
...
@@ -137,6 +137,14 @@ public class SYS_PSDEOPPRIVDTO extends DTOBase implements Serializable {
...
@@ -137,6 +137,14 @@ public class SYS_PSDEOPPRIVDTO extends DTOBase implements Serializable {
@JsonProperty
(
"updatedate"
)
@JsonProperty
(
"updatedate"
)
private
Timestamp
updatedate
;
private
Timestamp
updatedate
;
/**
* 属性 [PERMISSIONTYPE]
*
*/
@JSONField
(
name
=
"permissiontype"
)
@JsonProperty
(
"permissiontype"
)
private
String
permissiontype
;
/**
/**
* 设置 [SYS_PSDEOPPRIVNAME]
* 设置 [SYS_PSDEOPPRIVNAME]
...
@@ -226,6 +234,14 @@ public class SYS_PSDEOPPRIVDTO extends DTOBase implements Serializable {
...
@@ -226,6 +234,14 @@ public class SYS_PSDEOPPRIVDTO extends DTOBase implements Serializable {
this
.
modify
(
"permissionid"
,
permissionid
);
this
.
modify
(
"permissionid"
,
permissionid
);
}
}
/**
* 设置 [PERMISSIONTYPE]
*/
public
void
setPermissiontype
(
String
permissiontype
){
this
.
permissiontype
=
permissiontype
;
this
.
modify
(
"permissiontype"
,
permissiontype
);
}
}
}
ibzuaa-util/src/main/java/cn/ibizlab/util/domain/FileItem.java
0 → 100644
浏览文件 @
feea6b9a
package
cn
.
ibizlab
.
util
.
domain
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
com.fasterxml.jackson.annotation.JsonInclude.Include
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
@Data
@JsonInclude
(
Include
.
NON_NULL
)
@JsonIgnoreProperties
(
ignoreUnknown
=
true
)
@AllArgsConstructor
public
class
FileItem
{
private
String
id
;
private
String
name
;
private
long
size
;
private
String
ext
;
}
ibzuaa-util/src/main/java/cn/ibizlab/util/rest/FileController.java
0 → 100644
浏览文件 @
feea6b9a
package
cn
.
ibizlab
.
util
.
rest
;
import
cn.ibizlab.util.domain.FileItem
;
import
cn.ibizlab.util.service.FileService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.*
;
@Slf4j
public
class
FileController
{
@Autowired
private
FileService
fileService
;
@PostMapping
(
value
=
"${ibiz.uploadpath.path:ibizutil/upload}"
)
public
ResponseEntity
<
FileItem
>
upload
(
@RequestParam
(
"file"
)
MultipartFile
multipartFile
){
return
ResponseEntity
.
ok
().
body
(
fileService
.
saveFile
(
multipartFile
));
}
private
final
String
defaultdownloadpath
=
"ibizutil/download/{id}"
;
protected
String
getDefaultdownloadpath
(){
return
defaultdownloadpath
;
}
@GetMapping
(
value
=
"${ibiz.file.downloadpath:"
+
defaultdownloadpath
+
"}"
)
@ResponseStatus
(
HttpStatus
.
OK
)
public
void
download
(
@PathVariable
String
id
,
HttpServletResponse
response
){
File
file
=
fileService
.
getFile
(
id
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
getFileName
(
file
.
getName
()));
this
.
sendRespose
(
response
,
file
);
}
protected
void
sendRespose
(
HttpServletResponse
response
,
File
file
){
BufferedInputStream
bis
=
null
;
BufferedOutputStream
bos
=
null
;
try
{
bis
=
new
BufferedInputStream
(
new
FileInputStream
(
file
));
bos
=
new
BufferedOutputStream
(
response
.
getOutputStream
());
byte
[]
buff
=
new
byte
[
2048
];
int
bytesRead
;
while
(-
1
!=
(
bytesRead
=
bis
.
read
(
buff
,
0
,
buff
.
length
)))
{
bos
.
write
(
buff
,
0
,
bytesRead
);
}
}
catch
(
Exception
e
)
{
//throw e;
}
finally
{
if
(
bis
!=
null
)
{
try
{
bis
.
close
();
}
catch
(
IOException
e
)
{
}
}
if
(
bos
!=
null
)
{
try
{
bos
.
close
();
}
catch
(
IOException
e
)
{
}
}
}
}
protected
String
getFileName
(
String
fileName
){
try
{
return
new
String
(
fileName
.
getBytes
(
"utf-8"
),
"iso8859-1"
);
//防止中文乱码
}
catch
(
UnsupportedEncodingException
e
)
{
e
.
printStackTrace
();
}
return
fileName
;
}
}
\ No newline at end of file
ibzuaa-util/src/main/java/cn/ibizlab/util/security/AuthPermissionEvaluator.java
浏览文件 @
feea6b9a
此差异已折叠。
点击以展开。
ibzuaa-util/src/main/java/cn/ibizlab/util/service/FileService.java
0 → 100644
浏览文件 @
feea6b9a
package
cn
.
ibizlab
.
util
.
service
;
import
cn.ibizlab.util.domain.FileItem
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.File
;
public
interface
FileService
{
FileItem
saveFile
(
MultipartFile
multipartFile
);
File
getFile
(
String
fileid
);
}
\ No newline at end of file
ibzuaa-util/src/main/java/cn/ibizlab/util/service/SimpleFileService.java
0 → 100644
浏览文件 @
feea6b9a
package
cn
.
ibizlab
.
util
.
service
;
import
cn.ibizlab.util.domain.FileItem
;
import
cn.ibizlab.util.errors.InternalServerErrorException
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Primary
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.FileCopyUtils
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.File
;
import
java.io.IOException
;
import
java.nio.file.Files
;
import
java.util.UUID
;
@Primary
@Slf4j
@Service
public
class
SimpleFileService
implements
FileService
{
@Value
(
"${ibiz.filePath:/app/file/}"
)
private
String
fileRoot
;
@Override
public
FileItem
saveFile
(
MultipartFile
multipartFile
)
{
FileItem
item
=
null
;
// 获取文件名
String
fileName
=
multipartFile
.
getOriginalFilename
();
// 获取文件后缀
String
extname
=
"."
+
getExtensionName
(
fileName
);
// 用uuid作为文件名,防止生成的临时文件重复
String
fileid
=
UUID
.
randomUUID
().
toString
();
String
fileFullPath
=
this
.
fileRoot
+
"ibztuit"
+
File
.
separator
+
fileid
+
File
.
separator
+
fileName
;
File
file
=
new
File
(
fileFullPath
);
File
parent
=
new
File
(
file
.
getParent
());
if
(!
parent
.
exists
())
parent
.
mkdirs
();
try
{
FileCopyUtils
.
copy
(
multipartFile
.
getInputStream
()
,
Files
.
newOutputStream
(
file
.
toPath
()));
item
=
new
FileItem
(
fileid
,
fileName
,
(
int
)
multipartFile
.
getSize
()
,
extname
);
}
catch
(
IOException
e
)
{
throw
new
InternalServerErrorException
(
"文件上传失败"
);
}
return
item
;
}
@Override
public
File
getFile
(
String
fileid
)
{
String
dirpath
=
this
.
fileRoot
+
"ibztuit"
+
File
.
separator
+
fileid
;
File
parent
=
new
File
(
dirpath
);
if
(
parent
.
exists
()
&&
parent
.
isDirectory
()
&&
parent
.
listFiles
().
length
>
0
)
{
return
parent
.
listFiles
()[
0
];
}
throw
new
InternalServerErrorException
(
"文件未找到"
);
}
/**
* 获取文件扩展名
* @param filename
* @return
*/
public
static
String
getExtensionName
(
String
filename
)
{
if
((
filename
!=
null
)
&&
(
filename
.
length
()
>
0
))
{
int
dot
=
filename
.
lastIndexOf
(
'.'
);
if
((
dot
>-
1
)
&&
(
dot
<
(
filename
.
length
()
-
1
)))
{
return
filename
.
substring
(
dot
+
1
);
}
}
return
filename
;
}
}
\ No newline at end of file
ibzuaa-util/src/main/java/cn/ibizlab/util/service/SimpleUserService.java
浏览文件 @
feea6b9a
...
@@ -104,7 +104,10 @@ public class SimpleUserService implements AuthenticationUserService{
...
@@ -104,7 +104,10 @@ public class SimpleUserService implements AuthenticationUserService{
JSONObject
orgInfo
=
ouFeignClient
.
getOrgInfo
(
user
.
getLoginname
());
JSONObject
orgInfo
=
ouFeignClient
.
getOrgInfo
(
user
.
getLoginname
());
if
(
orgInfo
==
null
)
if
(
orgInfo
==
null
)
throw
new
RuntimeException
(
"获取用户信息失败,请检查用户中心[IBZOU]中是否存在当前用户!"
);
throw
new
RuntimeException
(
"获取用户信息失败,请检查用户中心[IBZOU]中是否存在当前用户!"
);
JSONObject
curUser
=
orgInfo
.
getJSONObject
(
"curuser"
);
user
.
setOrgInfo
(
orgInfo
);
user
.
setOrgInfo
(
orgInfo
);
user
.
setMdeptid
(
curUser
.
getString
(
"orgdept"
));
user
.
setOrgid
(
curUser
.
getString
(
"org"
));
}
}
}
}
...
...
ibzuaa-util/src/main/resources/application-sys.yml
浏览文件 @
feea6b9a
...
@@ -60,3 +60,7 @@ logging:
...
@@ -60,3 +60,7 @@ logging:
ribbon
:
ribbon
:
ReadTimeout
:
60000
ReadTimeout
:
60000
ConnectTimeout
:
60000
ConnectTimeout
:
60000
#系统是否开启权限验证
ibiz
:
enablePermissionValid
:
false
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录