Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzdict
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzdict
提交
ffb7d7c6
提交
ffb7d7c6
编写于
9月 10, 2021
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibiz4j 发布系统代码 [ibz-dict,字典]
上级
0dfa4433
变更
18
隐藏空白字符变更
内嵌
并排
正在显示
18 个修改的文件
包含
108 行增加
和
28 行删除
+108
-28
grid-view8-engine.ts
app_web/src/engine/view/grid-view8-engine.ts
+0
-8
dict-catalog_BO_CN_base.ts
...e/lanres/entities/dict-catalog/dict-catalog_BO_CN_base.ts
+1
-0
dict-catalog_en_US_base.ts
...e/lanres/entities/dict-catalog/dict-catalog_en_US_base.ts
+1
-0
dict-catalog_zh_CN_base.ts
...e/lanres/entities/dict-catalog/dict-catalog_zh_CN_base.ts
+1
-0
pickup-viewpickupviewpanel-pickupviewpanel-model.ts
...panel/pickup-viewpickupviewpanel-pickupviewpanel-model.ts
+3
-0
DictCatalogServiceImpl.java
...bizlab/core/dict/service/impl/DictCatalogServiceImpl.java
+2
-2
DictOptionServiceImpl.java
...ibizlab/core/dict/service/impl/DictOptionServiceImpl.java
+2
-2
h2_table.xml
ibzdict-core/src/main/resources/liquibase/h2_table.xml
+3
-1
DictCatalogMapper.xml
...n/resources/mapper/dict/dictcatalog/DictCatalogMapper.xml
+2
-2
ibzdict.json
ibzdict-core/src/main/resources/sysmodel/ibzdict.json
+14
-0
DictCatalogDTO.java
...-api/src/main/java/cn/ibizlab/api/dto/DictCatalogDTO.java
+18
-0
DELogicAspect.java
...l/src/main/java/cn/ibizlab/util/aspect/DELogicAspect.java
+2
-0
IBZWFFallback.java
...l/src/main/java/cn/ibizlab/util/client/IBZWFFallback.java
+5
-0
IBZWFFeignClient.java
...rc/main/java/cn/ibizlab/util/client/IBZWFFeignClient.java
+4
-0
ExceptionTranslator.java
...main/java/cn/ibizlab/util/errors/ExceptionTranslator.java
+29
-0
SearchContextBase.java
...c/main/java/cn/ibizlab/util/filter/SearchContextBase.java
+5
-0
AuthPermissionEvaluator.java
...ava/cn/ibizlab/util/security/AuthPermissionEvaluator.java
+15
-12
AuthenticationEntryPoint.java
...va/cn/ibizlab/util/security/AuthenticationEntryPoint.java
+1
-1
未找到文件。
app_web/src/engine/view/grid-view8-engine.ts
浏览文件 @
ffb7d7c6
...
@@ -9,14 +9,6 @@ import GridViewEngine from './grid-view-engine';
...
@@ -9,14 +9,6 @@ import GridViewEngine from './grid-view-engine';
*/
*/
export
default
class
GridView8Engine
extends
GridViewEngine
{
export
default
class
GridView8Engine
extends
GridViewEngine
{
/**
* 表格部件
*
* @type {*}
* @memberof GridView8Engine
*/
protected
grid
:
any
;
/**
/**
* 表格部件
* 表格部件
*
*
...
...
app_web/src/locale/lanres/entities/dict-catalog/dict-catalog_BO_CN_base.ts
浏览文件 @
ffb7d7c6
...
@@ -11,6 +11,7 @@ function getLocaleResourceBase(){
...
@@ -11,6 +11,7 @@ function getLocaleResourceBase(){
enable
:
commonLogic
.
appcommonhandle
(
"是否有效"
,
null
),
enable
:
commonLogic
.
appcommonhandle
(
"是否有效"
,
null
),
updatedate
:
commonLogic
.
appcommonhandle
(
"最后修改时间"
,
null
),
updatedate
:
commonLogic
.
appcommonhandle
(
"最后修改时间"
,
null
),
createdate
:
commonLogic
.
appcommonhandle
(
"创建时间"
,
null
),
createdate
:
commonLogic
.
appcommonhandle
(
"创建时间"
,
null
),
ext_params
:
commonLogic
.
appcommonhandle
(
"扩展参数"
,
null
),
},
},
views
:
{
views
:
{
gridview
:
{
gridview
:
{
...
...
app_web/src/locale/lanres/entities/dict-catalog/dict-catalog_en_US_base.ts
浏览文件 @
ffb7d7c6
...
@@ -11,6 +11,7 @@ function getLocaleResourceBase(){
...
@@ -11,6 +11,7 @@ function getLocaleResourceBase(){
enable
:
commonLogic
.
appcommonhandle
(
"是否有效"
,
null
),
enable
:
commonLogic
.
appcommonhandle
(
"是否有效"
,
null
),
updatedate
:
commonLogic
.
appcommonhandle
(
"最后修改时间"
,
null
),
updatedate
:
commonLogic
.
appcommonhandle
(
"最后修改时间"
,
null
),
createdate
:
commonLogic
.
appcommonhandle
(
"创建时间"
,
null
),
createdate
:
commonLogic
.
appcommonhandle
(
"创建时间"
,
null
),
ext_params
:
commonLogic
.
appcommonhandle
(
"扩展参数"
,
null
),
},
},
views
:
{
views
:
{
gridview
:
{
gridview
:
{
...
...
app_web/src/locale/lanres/entities/dict-catalog/dict-catalog_zh_CN_base.ts
浏览文件 @
ffb7d7c6
...
@@ -11,6 +11,7 @@ function getLocaleResourceBase(){
...
@@ -11,6 +11,7 @@ function getLocaleResourceBase(){
enable
:
commonLogic
.
appcommonhandle
(
"是否有效"
,
null
),
enable
:
commonLogic
.
appcommonhandle
(
"是否有效"
,
null
),
updatedate
:
commonLogic
.
appcommonhandle
(
"最后修改时间"
,
null
),
updatedate
:
commonLogic
.
appcommonhandle
(
"最后修改时间"
,
null
),
createdate
:
commonLogic
.
appcommonhandle
(
"创建时间"
,
null
),
createdate
:
commonLogic
.
appcommonhandle
(
"创建时间"
,
null
),
ext_params
:
commonLogic
.
appcommonhandle
(
"扩展参数"
,
null
),
},
},
views
:
{
views
:
{
gridview
:
{
gridview
:
{
...
...
app_web/src/widgets/dict-catalog/pickup-viewpickupviewpanel-pickupviewpanel/pickup-viewpickupviewpanel-pickupviewpanel-model.ts
浏览文件 @
ffb7d7c6
...
@@ -39,6 +39,9 @@ export default class PickupViewpickupviewpanelModel {
...
@@ -39,6 +39,9 @@ export default class PickupViewpickupviewpanelModel {
{
{
name
:
'createdate'
,
name
:
'createdate'
,
},
},
{
name
:
'ext_params'
,
},
]
]
}
}
...
...
ibzdict-core/src/main/java/cn/ibizlab/core/dict/service/impl/DictCatalogServiceImpl.java
浏览文件 @
ffb7d7c6
...
@@ -187,8 +187,8 @@ public class DictCatalogServiceImpl extends ServiceImpl<DictCatalogMapper, DictC
...
@@ -187,8 +187,8 @@ public class DictCatalogServiceImpl extends ServiceImpl<DictCatalogMapper, DictC
*/
*/
@Override
@Override
public
Page
<
DictCatalog
>
searchDefault
(
DictCatalogSearchContext
context
)
{
public
Page
<
DictCatalog
>
searchDefault
(
DictCatalogSearchContext
context
)
{
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
DictCatalog
>
pages
=
baseMapper
.
searchDefault
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
DictCatalog
>
pages
=
baseMapper
.
searchDefault
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
DictCatalog
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
return
new
PageImpl
<
DictCatalog
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
}
...
...
ibzdict-core/src/main/java/cn/ibizlab/core/dict/service/impl/DictOptionServiceImpl.java
浏览文件 @
ffb7d7c6
...
@@ -203,8 +203,8 @@ public class DictOptionServiceImpl extends ServiceImpl<DictOptionMapper, DictOpt
...
@@ -203,8 +203,8 @@ public class DictOptionServiceImpl extends ServiceImpl<DictOptionMapper, DictOpt
*/
*/
@Override
@Override
public
Page
<
DictOption
>
searchDefault
(
DictOptionSearchContext
context
)
{
public
Page
<
DictOption
>
searchDefault
(
DictOptionSearchContext
context
)
{
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
DictOption
>
pages
=
baseMapper
.
searchDefault
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
DictOption
>
pages
=
baseMapper
.
searchDefault
(
context
.
getPages
(),
context
,
context
.
getSelectCond
());
return
new
PageImpl
<
DictOption
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
return
new
PageImpl
<
DictOption
>(
pages
.
getRecords
(),
context
.
getPageable
(),
pages
.
getTotal
());
}
}
...
...
ibzdict-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
ffb7d7c6
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<!--输出实体[DICT_CATALOG]数据结构 -->
<!--输出实体[DICT_CATALOG]数据结构 -->
<changeSet
author=
"root"
id=
"tab-dict_catalog-
4
-1"
>
<changeSet
author=
"root"
id=
"tab-dict_catalog-
7
-1"
>
<createTable
tableName=
"IBZDICTCATALOG"
>
<createTable
tableName=
"IBZDICTCATALOG"
>
<column
name=
"CID"
remarks=
""
type=
"VARCHAR(100)"
>
<column
name=
"CID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_DICT_CATALOG_CID"
/>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_DICT_CATALOG_CID"
/>
...
@@ -23,6 +23,8 @@
...
@@ -23,6 +23,8 @@
</column>
</column>
<column
name=
"CREATEDATE"
remarks=
""
type=
"DATETIME"
>
<column
name=
"CREATEDATE"
remarks=
""
type=
"DATETIME"
>
</column>
</column>
<column
name=
"EXTPARAMS"
remarks=
""
type=
"TEXT(1048576)"
>
</column>
</createTable>
</createTable>
</changeSet>
</changeSet>
...
...
ibzdict-core/src/main/resources/mapper/dict/dictcatalog/DictCatalogMapper.xml
浏览文件 @
ffb7d7c6
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<![CDATA[select t1.* from (SELECT t1.`CCODE`, t1.`CGROUP`, t1.`CID`, t1.`CNAME`, t1.`CREATEDATE`, t1.`ENABLE`, t1.`MEMO`, t1.`UPDATEDATE` FROM `IBZDICTCATALOG` t1 ) t1 where cid=#{id}]]>
<![CDATA[select t1.* from (SELECT t1.`CCODE`, t1.`CGROUP`, t1.`CID`, t1.`CNAME`, t1.`CREATEDATE`, t1.`ENABLE`, t1.`MEMO`, t1.`UPDATEDATE` FROM `IBZDICTCATALOG` t1 ) t1 where cid=#{id}]]>
</select>
</select>
<select
id=
"selectById"
resultMap=
"DictCatalogResultMap"
databaseId=
"oracle"
>
<select
id=
"selectById"
resultMap=
"DictCatalogResultMap"
databaseId=
"oracle"
>
<![CDATA[select t1.* from (SELECT t1.CCODE, t1.CGROUP, t1.CID, t1.CNAME, t1.CREATEDATE, t1.ENABLE, t1.MEMO, t1.UPDATEDATE FROM IBZDICTCATALOG t1 ) t1 where cid=#{id}]]>
<![CDATA[select t1.* from (SELECT t1.CCODE, t1.CGROUP, t1.CID, t1.CNAME, t1.CREATEDATE, t1.ENABLE, t1.
EXTPARAMS, t1.
MEMO, t1.UPDATEDATE FROM IBZDICTCATALOG t1 ) t1 where cid=#{id}]]>
</select>
</select>
<select
id=
"selectById"
resultMap=
"DictCatalogResultMap"
databaseId=
"postgresql"
>
<select
id=
"selectById"
resultMap=
"DictCatalogResultMap"
databaseId=
"postgresql"
>
<![CDATA[select t1.* from (SELECT t1.CCODE, t1.CGROUP, t1.CID, t1.CNAME, t1.CREATEDATE, t1.ENABLE, t1.MEMO, t1.UPDATEDATE FROM IBZDICTCATALOG t1 ) t1 where cid=#{id}]]>
<![CDATA[select t1.* from (SELECT t1.CCODE, t1.CGROUP, t1.CID, t1.CNAME, t1.CREATEDATE, t1.ENABLE, t1.MEMO, t1.UPDATEDATE FROM IBZDICTCATALOG t1 ) t1 where cid=#{id}]]>
...
@@ -59,7 +59,7 @@
...
@@ -59,7 +59,7 @@
</sql>
</sql>
<!--数据查询[View]-->
<!--数据查询[View]-->
<sql
id=
"View"
databaseId=
"oracle"
>
<sql
id=
"View"
databaseId=
"oracle"
>
<![CDATA[ SELECT t1.CCODE, t1.CGROUP, t1.CID, t1.CNAME, t1.CREATEDATE, t1.ENABLE, t1.MEMO, t1.UPDATEDATE FROM IBZDICTCATALOG t1
<![CDATA[ SELECT t1.CCODE, t1.CGROUP, t1.CID, t1.CNAME, t1.CREATEDATE, t1.ENABLE, t1.
EXTPARAMS, t1.
MEMO, t1.UPDATEDATE FROM IBZDICTCATALOG t1
WHERE t1.ENABLE = 1
WHERE t1.ENABLE = 1
]]>
]]>
</sql>
</sql>
...
...
ibzdict-core/src/main/resources/sysmodel/ibzdict.json
浏览文件 @
ffb7d7c6
...
@@ -123,6 +123,20 @@
...
@@ -123,6 +123,20 @@
"key_field"
:
0
,
"key_field"
:
0
,
"show_order"
:
9
,
"show_order"
:
9
,
"major_field"
:
0
"major_field"
:
0
},
{
"fieldname"
:
"EXTPARAMS"
,
"codename"
:
"Ext_params"
,
"field_logic_name"
:
"扩展参数"
,
"entity_name"
:
"DICT_CATALOG"
,
"field_type"
:
"LONGTEXT"
,
"nullable"
:
1
,
"physical_field"
:
1
,
"data_type"
:
"TEXT"
,
"data_length"
:
1048576
,
"key_field"
:
0
,
"show_order"
:
20
,
"major_field"
:
0
}
}
],
],
"subEntitys"
:[
"subEntitys"
:[
...
...
ibzdict-provider/ibzdict-provider-api/src/main/java/cn/ibizlab/api/dto/DictCatalogDTO.java
浏览文件 @
ffb7d7c6
...
@@ -113,6 +113,16 @@ public class DictCatalogDTO extends DTOBase implements Serializable {
...
@@ -113,6 +113,16 @@ public class DictCatalogDTO extends DTOBase implements Serializable {
@ApiModelProperty
(
"创建时间"
)
@ApiModelProperty
(
"创建时间"
)
private
Timestamp
createdate
;
private
Timestamp
createdate
;
/**
* 属性 [EXTPARAMS]
*
*/
@JSONField
(
name
=
"ext_params"
)
@JsonProperty
(
"ext_params"
)
@Size
(
min
=
0
,
max
=
1048576
,
message
=
"内容长度必须小于等于[1048576]"
)
@ApiModelProperty
(
"扩展参数"
)
private
String
extParams
;
/**
/**
* 设置 [CCODE]
* 设置 [CCODE]
...
@@ -146,6 +156,14 @@ public class DictCatalogDTO extends DTOBase implements Serializable {
...
@@ -146,6 +156,14 @@ public class DictCatalogDTO extends DTOBase implements Serializable {
this
.
modify
(
"memo"
,
memo
);
this
.
modify
(
"memo"
,
memo
);
}
}
/**
* 设置 [EXTPARAMS]
*/
public
void
setExtParams
(
String
extParams
){
this
.
extParams
=
extParams
;
this
.
modify
(
"extparams"
,
extParams
);
}
}
}
...
...
ibzdict-util/src/main/java/cn/ibizlab/util/aspect/DELogicAspect.java
浏览文件 @
ffb7d7c6
...
@@ -32,6 +32,7 @@ import org.springframework.util.ClassUtils;
...
@@ -32,6 +32,7 @@ import org.springframework.util.ClassUtils;
import
org.springframework.util.DigestUtils
;
import
org.springframework.util.DigestUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.core.annotation.Order
;
import
javax.xml.stream.XMLInputFactory
;
import
javax.xml.stream.XMLInputFactory
;
import
javax.xml.stream.XMLStreamReader
;
import
javax.xml.stream.XMLStreamReader
;
...
@@ -52,6 +53,7 @@ import java.util.concurrent.ConcurrentMap;
...
@@ -52,6 +53,7 @@ import java.util.concurrent.ConcurrentMap;
@Aspect
@Aspect
@Component
@Component
@Slf4j
@Slf4j
@Order
(
100
)
public
class
DELogicAspect
{
public
class
DELogicAspect
{
private
static
BpmnXMLConverter
bpmnXMLConverter
=
new
BpmnXMLConverter
();
private
static
BpmnXMLConverter
bpmnXMLConverter
=
new
BpmnXMLConverter
();
...
...
ibzdict-util/src/main/java/cn/ibizlab/util/client/IBZWFFallback.java
浏览文件 @
ffb7d7c6
...
@@ -43,4 +43,9 @@ public class IBZWFFallback implements IBZWFFeignClient {
...
@@ -43,4 +43,9 @@ public class IBZWFFallback implements IBZWFFeignClient {
return
null
;
return
null
;
}
}
@Override
public
Map
<
String
,
Map
<
String
,
Object
>>
getMyTask
(
String
system
,
String
appName
,
String
entity
)
{
return
null
;
}
}
}
ibzdict-util/src/main/java/cn/ibizlab/util/client/IBZWFFeignClient.java
浏览文件 @
ffb7d7c6
...
@@ -37,4 +37,8 @@ public interface IBZWFFeignClient
...
@@ -37,4 +37,8 @@ public interface IBZWFFeignClient
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/{system}/{entity}/{businessKey}/dataaccessmode"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/{system}/{entity}/{businessKey}/dataaccessmode"
)
Integer
getDataAccessMode
(
@PathVariable
(
"system"
)
String
system
,
@PathVariable
(
"entity"
)
String
entity
,
@PathVariable
(
"businessKey"
)
Serializable
businessKey
);
Integer
getDataAccessMode
(
@PathVariable
(
"system"
)
String
system
,
@PathVariable
(
"entity"
)
String
entity
,
@PathVariable
(
"businessKey"
)
Serializable
businessKey
);
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/{system}-app-{appname}/{entity}/mytasks"
)
Map
<
String
,
Map
<
String
,
Object
>>
getMyTask
(
@PathVariable
(
"system"
)
String
system
,
@PathVariable
(
"appname"
)
String
appName
,
@PathVariable
(
"entity"
)
String
entity
);
}
}
ibzdict-util/src/main/java/cn/ibizlab/util/errors/ExceptionTranslator.java
浏览文件 @
ffb7d7c6
...
@@ -9,6 +9,8 @@ import org.springframework.web.bind.MethodArgumentNotValidException;
...
@@ -9,6 +9,8 @@ import org.springframework.web.bind.MethodArgumentNotValidException;
import
org.springframework.web.bind.annotation.ControllerAdvice
;
import
org.springframework.web.bind.annotation.ControllerAdvice
;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
import
org.springframework.web.context.request.NativeWebRequest
;
import
org.springframework.web.context.request.NativeWebRequest
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.web.multipart.MaxUploadSizeExceededException
;
import
org.zalando.problem.DefaultProblem
;
import
org.zalando.problem.DefaultProblem
;
import
org.zalando.problem.Problem
;
import
org.zalando.problem.Problem
;
import
org.zalando.problem.ProblemBuilder
;
import
org.zalando.problem.ProblemBuilder
;
...
@@ -105,4 +107,31 @@ public class ExceptionTranslator implements ProblemHandling {
...
@@ -105,4 +107,31 @@ public class ExceptionTranslator implements ProblemHandling {
headers
.
add
(
"X-ibz-params"
,
entityName
);
headers
.
add
(
"X-ibz-params"
,
entityName
);
return
headers
;
return
headers
;
}
}
/**
* 上传文件大小超出限制异常
*/
@Value
(
"${spring.servlet.multipart.max-file-size}"
)
private
String
maxFileSize
;
@ExceptionHandler
(
MaxUploadSizeExceededException
.
class
)
public
ResponseEntity
<
Problem
>
handlerMaxUploadFile
(
MaxUploadSizeExceededException
ex
,
NativeWebRequest
request
){
Problem
problem
=
Problem
.
builder
()
.
withStatus
(
Status
.
BAD_REQUEST
)
.
withDetail
(
"上传文件不能大于"
+
maxFileSize
)
.
with
(
"message"
,
"上传文件不能大于"
+
maxFileSize
)
.
with
(
"exmessage"
,
""
+
ex
.
getMessage
())
.
build
();
return
create
(
ex
,
problem
,
request
);
}
@ExceptionHandler
(
Exception
.
class
)
public
ResponseEntity
<
Problem
>
handlerTest
(
Exception
ex
,
NativeWebRequest
request
){
Problem
problem
=
Problem
.
builder
()
.
withStatus
(
Status
.
INTERNAL_SERVER_ERROR
)
.
withDetail
(
"内部服务器异常"
)
.
with
(
"message"
,
"内部服务器异常"
)
.
with
(
"exmessage"
,
""
+
ex
.
getMessage
())
.
build
();
return
create
(
ex
,
problem
,
request
);
}
}
}
ibzdict-util/src/main/java/cn/ibizlab/util/filter/SearchContextBase.java
浏览文件 @
ffb7d7c6
...
@@ -67,6 +67,11 @@ public class SearchContextBase implements ISearchContext{
...
@@ -67,6 +67,11 @@ public class SearchContextBase implements ISearchContext{
* 工作流流程标识
* 工作流流程标识
*/
*/
public
String
processDefinitionKey
;
public
String
processDefinitionKey
;
/**
* 工作流标识
*/
@JsonProperty
(
"srfwf"
)
public
String
srfWF
;
/**
/**
* 获取工作流步骤标识
* 获取工作流步骤标识
...
...
ibzdict-util/src/main/java/cn/ibizlab/util/security/AuthPermissionEvaluator.java
浏览文件 @
ffb7d7c6
...
@@ -13,6 +13,7 @@ import org.springframework.security.core.Authentication;
...
@@ -13,6 +13,7 @@ import org.springframework.security.core.Authentication;
import
org.springframework.security.core.GrantedAuthority
;
import
org.springframework.security.core.GrantedAuthority
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.lang.reflect.ParameterizedType
;
import
java.lang.reflect.ParameterizedType
;
import
java.lang.reflect.Type
;
import
java.lang.reflect.Type
;
...
@@ -300,20 +301,22 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
...
@@ -300,20 +301,22 @@ public class AuthPermissionEvaluator implements PermissionEvaluator {
Map
<
String
,
DEField
>
preFields
=
DEFieldCacheMap
.
getDEFields
(
entityBase
.
getClass
());
//从缓存中获取当前类预置属性
Map
<
String
,
DEField
>
preFields
=
DEFieldCacheMap
.
getDEFields
(
entityBase
.
getClass
());
//从缓存中获取当前类预置属性
for
(
Map
.
Entry
<
String
,
DEField
>
entry
:
preFields
.
entrySet
()){
for
(
Map
.
Entry
<
String
,
DEField
>
entry
:
preFields
.
entrySet
()){
String
fieldName
=
entry
.
getKey
();
//获取注解字段
DEField
fieldAnnotation
=
entry
.
getValue
();
//获取注解值
DEField
fieldAnnotation
=
entry
.
getValue
();
//获取注解值
String
fieldName
=
fieldAnnotation
.
name
();
//获取注解字段
DEPredefinedFieldType
prefieldType
=
fieldAnnotation
.
preType
();
DEPredefinedFieldType
prefieldType
=
fieldAnnotation
.
preType
();
//用户配置系统预置属性-组织机构标识
if
(!
StringUtils
.
isEmpty
(
fieldName
)){
if
(
prefieldType
==
prefieldType
.
ORGID
){
//用户配置系统预置属性-组织机构标识
orgField
=
fieldName
;
if
(
prefieldType
==
prefieldType
.
ORGID
){
}
orgField
=
fieldName
;
//用户配置系统预置属性-部门标识
}
if
(
prefieldType
==
prefieldType
.
ORGSECTORID
){
//用户配置系统预置属性-部门标识
orgDeptField
=
fieldName
;
if
(
prefieldType
==
prefieldType
.
ORGSECTORID
){
}
orgDeptField
=
fieldName
;
//用户配置系统预置属性-部门标识
}
if
(
prefieldType
==
prefieldType
.
CREATEMAN
){
//用户配置系统预置属性-部门标识
createManField
=
fieldName
;
if
(
prefieldType
==
prefieldType
.
CREATEMAN
){
createManField
=
fieldName
;
}
}
}
}
}
permissionFiled
.
put
(
"orgfield"
,
orgField
);
permissionFiled
.
put
(
"orgfield"
,
orgField
);
...
...
ibzdict-util/src/main/java/cn/ibizlab/util/security/AuthenticationEntryPoint.java
浏览文件 @
ffb7d7c6
...
@@ -20,7 +20,7 @@ public class AuthenticationEntryPoint implements org.springframework.security.we
...
@@ -20,7 +20,7 @@ public class AuthenticationEntryPoint implements org.springframework.security.we
/**
/**
* 当用户尝试访问安全的REST资源而不提供任何凭据时,将调用此方法发送401 响应
* 当用户尝试访问安全的REST资源而不提供任何凭据时,将调用此方法发送401 响应
*/
*/
response
.
sendError
(
HttpServletResponse
.
SC_UNAUTHORIZED
,
authException
==
null
?
"Unauthorized"
:
authException
.
getMessage
()
);
response
.
sendError
(
HttpServletResponse
.
SC_UNAUTHORIZED
,
"账号身份已过期,请重新登录。"
);
}
}
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录