Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzlite
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzlite
提交
c82fcd6b
提交
c82fcd6b
编写于
11月 18, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
hebao1234 发布系统代码 [ibz-lite,应用]
上级
0920c06f
变更
18
隐藏空白字符变更
内嵌
并排
正在显示
18 个修改的文件
包含
126 行增加
和
63 行删除
+126
-63
blade-visual_en_US.ts
...locale/lanres/entities/blade-visual/blade-visual_en_US.ts
+2
-0
blade-visual_zh_CN.ts
...locale/lanres/entities/blade-visual/blade-visual_zh_CN.ts
+2
-0
webApplication.java
...-app-web/src/main/java/cn/ibizlab/web/webApplication.java
+2
-2
DevBootApplication.java
...ite-boot/src/main/java/cn/ibizlab/DevBootApplication.java
+4
-4
BladeVisual.java
...ain/java/cn/ibizlab/core/avuedata/domain/BladeVisual.java
+14
-0
h2_table.xml
ibzlite-core/src/main/resources/liquibase/h2_table.xml
+1
-1
ibzlite.json
ibzlite-core/src/main/resources/sysmodel/ibzlite.json
+28
-0
apiAutoConfiguration.java
...main/java/cn/ibizlab/api/config/apiAutoConfiguration.java
+1
-1
BladeVisualDTO.java
...-api/src/main/java/cn/ibizlab/api/dto/BladeVisualDTO.java
+18
-0
AuthenticationUserService.java
...va/cn/ibizlab/util/service/AuthenticationUserService.java
+3
-3
IBZConfigService.java
...c/main/java/cn/ibizlab/util/service/IBZConfigService.java
+15
-15
IBZDataAuditService.java
...ain/java/cn/ibizlab/util/service/IBZDataAuditService.java
+2
-2
IBZUAAUserService.java
.../main/java/cn/ibizlab/util/service/IBZUAAUserService.java
+8
-8
IBZUSERServiceImpl.java
...main/java/cn/ibizlab/util/service/IBZUSERServiceImpl.java
+16
-15
RemoteService.java
.../src/main/java/cn/ibizlab/util/service/RemoteService.java
+4
-6
SimpleAuditService.java
...main/java/cn/ibizlab/util/service/SimpleAuditService.java
+1
-1
SimpleFileService.java
.../main/java/cn/ibizlab/util/service/SimpleFileService.java
+1
-1
SearchContextHandlerMethodArgumentResolver.java
.../util/web/SearchContextHandlerMethodArgumentResolver.java
+4
-4
未找到文件。
app_web/src/locale/lanres/entities/blade-visual/blade-visual_en_US.ts
浏览文件 @
c82fcd6b
...
...
@@ -13,6 +13,8 @@ export default {
updatetime
:
"修改时间"
,
updateuser
:
"修改人"
,
isdeleted
:
"是否已删除"
,
detail
:
"配置json"
,
component
:
"组件json"
,
},
views
:
{
gridview
:
{
...
...
app_web/src/locale/lanres/entities/blade-visual/blade-visual_zh_CN.ts
浏览文件 @
c82fcd6b
...
...
@@ -12,6 +12,8 @@ export default {
updatetime
:
"修改时间"
,
updateuser
:
"修改人"
,
isdeleted
:
"是否已删除"
,
detail
:
"配置json"
,
component
:
"组件json"
,
},
views
:
{
gridview
:
{
...
...
ibzlite-app/ibzlite-app-web/src/main/java/cn/ibizlab/web/webApplication.java
浏览文件 @
c82fcd6b
...
...
@@ -30,13 +30,13 @@ import java.util.List;
@SpringBootApplication
(
exclude
=
{
org
.
springframework
.
boot
.
autoconfigure
.
security
.
servlet
.
SecurityAutoConfiguration
.
class
,
})
public
class
webApplication
extends
WebMvcConfigurerAdapter
{
public
class
webApplication
extends
WebMvcConfigurerAdapter
{
@Autowired
SearchContextHandlerMethodArgumentResolver
resolver
;
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
webApplication
.
class
,
args
);
SpringApplication
.
run
(
webApplication
.
class
,
args
);
}
@Override
...
...
ibzlite-boot/src/main/java/cn/ibizlab/DevBootApplication.java
浏览文件 @
c82fcd6b
...
...
@@ -25,8 +25,8 @@ import org.springframework.beans.factory.annotation.Autowired;
@SpringBootApplication
(
exclude
=
{
})
@ComponentScan
(
basePackages
=
{
"cn.ibizlab"
}
// ,excludeFilters
=
{
// @ComponentScan.Filter(type= org.springframework.context.annotation.FilterType.REGEX,pattern="cn.ibizlab.xxx.rest.xxx"),
// ,excludeFilters
=
{
// @ComponentScan.Filter(type= org.springframework.context.annotation.FilterType.REGEX,
pattern="cn.ibizlab.xxx.rest.xxx"),
// }
)
@Import
({
...
...
@@ -34,13 +34,13 @@ import org.springframework.beans.factory.annotation.Autowired;
})
@EnableAsync
@EnableScheduling
public
class
DevBootApplication
extends
WebMvcConfigurerAdapter
{
public
class
DevBootApplication
extends
WebMvcConfigurerAdapter
{
@Autowired
SearchContextHandlerMethodArgumentResolver
resolver
;
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
DevBootApplication
.
class
,
args
);
SpringApplication
.
run
(
DevBootApplication
.
class
,
args
);
}
@Override
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/avuedata/domain/BladeVisual.java
浏览文件 @
c82fcd6b
...
...
@@ -138,6 +138,20 @@ public class BladeVisual extends EntityMP implements Serializable {
@JSONField
(
name
=
"isdeleted"
)
@JsonProperty
(
"isdeleted"
)
private
Integer
isdeleted
;
/**
* 配置json
*/
@TableField
(
exist
=
false
)
@JSONField
(
name
=
"detail"
)
@JsonProperty
(
"detail"
)
private
String
detail
;
/**
* 组件json
*/
@TableField
(
exist
=
false
)
@JSONField
(
name
=
"component"
)
@JsonProperty
(
"component"
)
private
String
component
;
...
...
ibzlite-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
c82fcd6b
...
...
@@ -4,7 +4,7 @@
<!--输出实体[BLADE_VISUAL]数据结构 -->
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-blade_visual-
49
-1"
>
<changeSet
author=
"a_A_5d9d78509"
id=
"tab-blade_visual-
52
-1"
>
<createTable
tableName=
"blade_visual"
>
<column
name=
"ID"
remarks=
""
type=
"BIGINT"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_BLADE_VISUAL_ID"
/>
...
...
ibzlite-core/src/main/resources/sysmodel/ibzlite.json
浏览文件 @
c82fcd6b
...
...
@@ -175,6 +175,34 @@
"key_field"
:
0
,
"show_order"
:
16
,
"major_field"
:
0
},
{
"fieldname"
:
"DETAIL"
,
"codename"
:
"Detail"
,
"field_logic_name"
:
"配置json"
,
"entity_name"
:
"BladeVisual"
,
"field_type"
:
"LONGTEXT"
,
"nullable"
:
1
,
"physical_field"
:
0
,
"data_type"
:
"TEXT"
,
"data_length"
:
1048576
,
"key_field"
:
0
,
"show_order"
:
1000
,
"major_field"
:
0
},
{
"fieldname"
:
"COMPONENT"
,
"codename"
:
"Component"
,
"field_logic_name"
:
"组件json"
,
"entity_name"
:
"BladeVisual"
,
"field_type"
:
"LONGTEXT"
,
"nullable"
:
1
,
"physical_field"
:
0
,
"data_type"
:
"TEXT"
,
"data_length"
:
1048576
,
"key_field"
:
0
,
"show_order"
:
1000
,
"major_field"
:
0
}
],
"subEntitys"
:[
...
...
ibzlite-provider/ibzlite-provider-api/src/main/java/cn/ibizlab/api/config/apiAutoConfiguration.java
浏览文件 @
c82fcd6b
...
...
@@ -19,7 +19,7 @@ import org.springframework.context.annotation.Import;
@ConditionalOnClass
(
apiRestConfiguration
.
class
)
@ConditionalOnWebApplication
@EnableConfigurationProperties
(
apiServiceProperties
.
class
)
public
class
apiAutoConfiguration
implements
ApplicationContextAware
{
public
class
apiAutoConfiguration
implements
ApplicationContextAware
{
protected
ApplicationContext
applicationContext
;
...
...
ibzlite-provider/ibzlite-provider-api/src/main/java/cn/ibizlab/api/dto/BladeVisualDTO.java
浏览文件 @
c82fcd6b
...
...
@@ -134,6 +134,24 @@ public class BladeVisualDTO extends DTOBase implements Serializable {
@JsonProperty
(
"isdeleted"
)
private
Integer
isdeleted
;
/**
* 属性 [DETAIL]
*
*/
@JSONField
(
name
=
"detail"
)
@JsonProperty
(
"detail"
)
@Size
(
min
=
0
,
max
=
1048576
,
message
=
"内容长度必须小于等于[1048576]"
)
private
String
detail
;
/**
* 属性 [COMPONENT]
*
*/
@JSONField
(
name
=
"component"
)
@JsonProperty
(
"component"
)
@Size
(
min
=
0
,
max
=
1048576
,
message
=
"内容长度必须小于等于[1048576]"
)
private
String
component
;
/**
* 设置 [TITLE]
...
...
ibzlite-util/src/main/java/cn/ibizlab/util/service/AuthenticationUserService.java
浏览文件 @
c82fcd6b
...
...
@@ -15,12 +15,12 @@ public interface AuthenticationUserService extends UserDetailsService {
@Override
@Cacheable
(
value
=
"ibzuaa_users"
,
key
=
"'getByUsername:'+#p0"
)
@Cacheable
(
value
=
"ibzuaa_users"
,
key
=
"'getByUsername:'+#p0"
)
AuthenticationUser
loadUserByUsername
(
String
username
);
@Cacheable
(
value
=
"ibzuaa_users"
,
key
=
"'getByUsername:'+#p0"
)
@Cacheable
(
value
=
"ibzuaa_users"
,
key
=
"'getByUsername:'+#p0"
)
AuthenticationUser
loadUserByLogin
(
String
username
,
String
password
);
@CacheEvict
(
value
=
"ibzuaa_users"
,
key
=
"'getByUsername:'+#p0"
)
@CacheEvict
(
value
=
"ibzuaa_users"
,
key
=
"'getByUsername:'+#p0"
)
void
resetByUsername
(
String
username
);
}
ibzlite-util/src/main/java/cn/ibizlab/util/service/IBZConfigService.java
浏览文件 @
c82fcd6b
...
...
@@ -26,39 +26,39 @@ public class IBZConfigService extends ServiceImpl<IBZConfigMapper, IBZConfig> im
@Value
(
"${ibiz.admin.userid:0100}"
)
private
String
adminuserid
;
@Cacheable
(
value
=
"ibzrt_configs"
,
key
=
"'cfgid:'+#p0+'||'+#p1+'||'+#p2"
)
@Cacheable
(
value
=
"ibzrt_configs"
,
key
=
"'cfgid:'+#p0+'||'+#p1+'||'+#p2"
)
public
JSONObject
getConfig
(
String
cfgType
,
String
targetType
,
String
userId
)
{
if
(
StringUtils
.
isEmpty
(
userId
)
||
StringUtils
.
isEmpty
(
cfgType
)||
StringUtils
.
isEmpty
(
targetType
))
{
if
(
StringUtils
.
isEmpty
(
userId
)
||
StringUtils
.
isEmpty
(
cfgType
)
||
StringUtils
.
isEmpty
(
targetType
))
{
throw
new
BadRequestAlertException
(
"获取配置失败,参数缺失"
,
"IBZConfig"
,
cfgType
);
}
IBZConfig
config
=
this
.
getOne
(
Wrappers
.
query
(
IBZConfig
.
builder
().
systemId
(
systemId
).
cfgType
(
cfgType
).
targetType
(
targetType
).
userId
(
userId
).
build
()),
false
);
if
(
config
==
null
)
{
config
=
this
.
getOne
(
Wrappers
.
query
(
IBZConfig
.
builder
().
systemId
(
systemId
).
cfgType
(
cfgType
).
targetType
(
targetType
).
userId
(
adminuserid
).
build
()),
false
);
if
(
config
==
null
)
{
IBZConfig
config
=
this
.
getOne
(
Wrappers
.
query
(
IBZConfig
.
builder
().
systemId
(
systemId
).
cfgType
(
cfgType
).
targetType
(
targetType
).
userId
(
userId
).
build
()),
false
);
if
(
config
==
null
)
{
config
=
this
.
getOne
(
Wrappers
.
query
(
IBZConfig
.
builder
().
systemId
(
systemId
).
cfgType
(
cfgType
).
targetType
(
targetType
).
userId
(
adminuserid
).
build
()),
false
);
if
(
config
==
null
)
{
return
new
JSONObject
();
}
}
return
JSON
.
parseObject
(
config
.
getCfg
());
}
@CacheEvict
(
value
=
"ibzrt_configs"
,
key
=
"'cfgid:'+#p0+'||'+#p1+'||'+#p2"
)
public
boolean
saveConfig
(
String
cfgType
,
String
targetType
,
String
userId
,
JSONObject
config
)
@CacheEvict
(
value
=
"ibzrt_configs"
,
key
=
"'cfgid:'+#p0+'||'+#p1+'||'+#p2"
)
public
boolean
saveConfig
(
String
cfgType
,
String
targetType
,
String
userId
,
JSONObject
config
)
{
if
(
StringUtils
.
isEmpty
(
userId
)
||
StringUtils
.
isEmpty
(
cfgType
)||
StringUtils
.
isEmpty
(
targetType
))
{
if
(
StringUtils
.
isEmpty
(
userId
)
||
StringUtils
.
isEmpty
(
cfgType
)
||
StringUtils
.
isEmpty
(
targetType
))
{
throw
new
BadRequestAlertException
(
"保存配置失败,参数缺失"
,
"IBZConfig"
,
cfgType
);
}
String
cfg
=
"{}"
;
if
(
config
!=
null
)
{
cfg
=
JSONObject
.
toJSONString
(
config
);
String
cfg
=
"{}"
;
if
(
config
!=
null
)
{
cfg
=
JSONObject
.
toJSONString
(
config
);
}
return
this
.
saveOrUpdate
(
IBZConfig
.
builder
().
systemId
(
systemId
).
cfgType
(
cfgType
).
targetType
(
targetType
).
userId
(
userId
).
cfg
(
cfg
).
updateDate
(
DataObject
.
getNow
()).
build
());
}
@CacheEvict
(
value
=
"ibzrt_configs"
,
key
=
"'cfgid:'+#p0+'||'+#p1+'||'+#p2"
)
public
void
resetConfig
(
String
cfgType
,
String
targetType
,
String
userId
)
@CacheEvict
(
value
=
"ibzrt_configs"
,
key
=
"'cfgid:'+#p0+'||'+#p1+'||'+#p2"
)
public
void
resetConfig
(
String
cfgType
,
String
targetType
,
String
userId
)
{
if
(
StringUtils
.
isEmpty
(
userId
)
||
StringUtils
.
isEmpty
(
cfgType
)||
StringUtils
.
isEmpty
(
targetType
))
{
if
(
StringUtils
.
isEmpty
(
userId
)
||
StringUtils
.
isEmpty
(
cfgType
)
||
StringUtils
.
isEmpty
(
targetType
))
{
throw
new
BadRequestAlertException
(
"重置配置失败,参数缺失"
,
"IBZConfig"
,
cfgType
);
}
this
.
remove
(
Wrappers
.
query
(
IBZConfig
.
builder
().
systemId
(
systemId
).
cfgType
(
cfgType
).
targetType
(
targetType
).
userId
(
userId
).
build
()));
...
...
ibzlite-util/src/main/java/cn/ibizlab/util/service/IBZDataAuditService.java
浏览文件 @
c82fcd6b
...
...
@@ -11,9 +11,9 @@ import java.util.Map;
*/
public
interface
IBZDataAuditService
{
@Async
(
"asyncExecutor"
)
void
createAudit
(
HttpServletRequest
request
,
EntityBase
entity
,
Object
idValue
,
Map
<
String
,
Audit
>
auditFields
);
void
createAudit
(
HttpServletRequest
request
,
EntityBase
entity
,
Object
idValue
,
Map
<
String
,
Audit
>
auditFields
);
@Async
(
"asyncExecutor"
)
void
updateAudit
(
HttpServletRequest
request
,
EntityBase
beforeEntity
,
Object
serviceObj
,
Object
idValue
,
Map
<
String
,
Audit
>
auditFields
);
@Async
(
"asyncExecutor"
)
void
removeAudit
(
HttpServletRequest
request
,
EntityBase
entity
,
Object
idValue
,
Map
<
String
,
Audit
>
auditFields
);
void
removeAudit
(
HttpServletRequest
request
,
EntityBase
entity
,
Object
idValue
,
Map
<
String
,
Audit
>
auditFields
);
}
\ No newline at end of file
ibzlite-util/src/main/java/cn/ibizlab/util/service/IBZUAAUserService.java
浏览文件 @
c82fcd6b
...
...
@@ -26,8 +26,8 @@ public class IBZUAAUserService implements AuthenticationUserService{
@Override
public
AuthenticationUser
loadUserByUsername
(
String
username
)
{
AuthenticationUser
user
=
uaaFeignClient
.
loginByUsername
(
username
);
if
(
user
==
null
)
{
AuthenticationUser
user
=
uaaFeignClient
.
loginByUsername
(
username
);
if
(
user
==
null
)
{
throw
new
BadRequestAlertException
(
"登录失败"
,
"IBZUAAUser"
,
username
);
}
return
user
;
...
...
@@ -35,9 +35,9 @@ public class IBZUAAUserService implements AuthenticationUserService{
@Override
public
AuthenticationUser
loadUserByLogin
(
String
username
,
String
password
)
{
String
[]
data
=
username
.
split
(
"[|]"
);
String
loginname
=
username
;
String
domains
=
""
;
String
[]
data
=
username
.
split
(
"[|]"
);
String
loginname
=
username
;
String
domains
=
""
;
if
(
data
.
length
==
2
)
{
loginname
=
data
[
0
].
trim
();
...
...
@@ -47,9 +47,9 @@ public class IBZUAAUserService implements AuthenticationUserService{
logininfo
.
setDomain
(
domains
);
logininfo
.
setLoginname
(
loginname
);
logininfo
.
setPassword
(
password
);
AuthenticationUser
user
=
uaaFeignClient
.
login
(
logininfo
);
if
(
user
==
null
){
throw
new
BadRequestAlertException
(
"登录失败"
,
"IBZUAAUser"
,
username
);
AuthenticationUser
user
=
uaaFeignClient
.
login
(
logininfo
);
if
(
user
==
null
){
throw
new
BadRequestAlertException
(
"登录失败"
,
"IBZUAAUser"
,
username
);
}
return
user
;
}
...
...
ibzlite-util/src/main/java/cn/ibizlab/util/service/IBZUSERServiceImpl.java
浏览文件 @
c82fcd6b
...
...
@@ -28,22 +28,23 @@ public class IBZUSERServiceImpl extends ServiceImpl<IBZUSERMapper, IBZUSER> impl
@Override
public
AuthenticationUser
loadUserByUsername
(
String
username
)
{
if
(
StringUtils
.
isEmpty
(
username
))
if
(
StringUtils
.
isEmpty
(
username
))
{
throw
new
UsernameNotFoundException
(
"用户名为空"
);
QueryWrapper
<
IBZUSER
>
conds
=
new
QueryWrapper
<
IBZUSER
>();
String
[]
data
=
username
.
split
(
"[|]"
);
String
loginname
=
""
;
String
domains
=
""
;
if
(
data
.
length
>
0
){
loginname
=
data
[
0
].
trim
();
}
if
(
data
.
length
>
1
){
domains
=
data
[
1
].
trim
();
QueryWrapper
<
IBZUSER
>
conds
=
new
QueryWrapper
<
IBZUSER
>();
String
[]
data
=
username
.
split
(
"[|]"
);
String
loginname
=
""
;
String
domains
=
""
;
if
(
data
.
length
>
0
)
{
loginname
=
data
[
0
].
trim
();
}
if
(!
StringUtils
.
isEmpty
(
loginname
)){
if
(
data
.
length
>
1
)
{
domains
=
data
[
1
].
trim
();
}
if
(!
StringUtils
.
isEmpty
(
loginname
))
{
conds
.
eq
(
"loginname"
,
loginname
);
}
if
(!
StringUtils
.
isEmpty
(
domains
)){
if
(!
StringUtils
.
isEmpty
(
domains
))
{
conds
.
eq
(
"domains"
,
domains
);
}
IBZUSER
user
=
this
.
getOne
(
conds
);
...
...
@@ -59,13 +60,13 @@ public class IBZUSERServiceImpl extends ServiceImpl<IBZUSERMapper, IBZUSER> impl
@Override
public
AuthenticationUser
loadUserByLogin
(
String
username
,
String
password
){
AuthenticationUser
authuserdetail
=
loadUserByUsername
(
username
);
if
(
pwencrymode
==
1
){
if
(
pwencrymode
==
1
){
password
=
DigestUtils
.
md5DigestAsHex
(
password
.
getBytes
());
}
else
if
(
pwencrymode
==
2
){
else
if
(
pwencrymode
==
2
){
password
=
DigestUtils
.
md5DigestAsHex
(
String
.
format
(
"%1$s||%2$s"
,
username
,
password
).
getBytes
());
}
if
(!
authuserdetail
.
getPassword
().
equals
(
password
))
{
if
(!
authuserdetail
.
getPassword
().
equals
(
password
))
{
throw
new
BadRequestAlertException
(
"用户名密码错误"
,
"IBZUSER"
,
username
);
}
return
authuserdetail
;
...
...
@@ -79,7 +80,7 @@ public class IBZUSERServiceImpl extends ServiceImpl<IBZUSERMapper, IBZUSER> impl
public
AuthenticationUser
createUserDetails
(
IBZUSER
user
)
{
AuthenticationUser
userdatail
=
new
AuthenticationUser
();
CachedBeanCopier
.
copy
(
user
,
userdatail
);
if
(
userdatail
.
getSuperuser
()
==
1
){
if
(
userdatail
.
getSuperuser
()
==
1
){
userdatail
.
setAuthorities
(
AuthorityUtils
.
createAuthorityList
(
"ROLE_SUPERADMIN"
));
}
return
userdatail
;
...
...
ibzlite-util/src/main/java/cn/ibizlab/util/service/RemoteService.java
浏览文件 @
c82fcd6b
...
...
@@ -49,19 +49,19 @@ public class RemoteService {
*/
public
interface
RemoteFeignClient
{
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/{path}"
)
JSONObject
post
(
@PathVariable
(
"path"
)
String
path
,
@RequestHeader
(
"Authorization"
)
String
token
,
@RequestBody
Map
param
);
JSONObject
post
(
@PathVariable
(
"path"
)
String
path
,
@RequestHeader
(
"Authorization"
)
String
token
,
@RequestBody
Map
param
);
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/{path}"
)
JSONObject
request
(
@PathVariable
(
"path"
)
String
path
,
@RequestHeader
(
"Authorization"
)
String
token
,
Map
param
);
JSONObject
request
(
@PathVariable
(
"path"
)
String
path
,
@RequestHeader
(
"Authorization"
)
String
token
,
Map
param
);
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/{path}"
)
JSONObject
get
(
@PathVariable
(
"path"
)
String
path
,
@RequestHeader
(
"Authorization"
)
String
token
);
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/{path}"
)
JSONObject
put
(
@PathVariable
(
"path"
)
String
path
,
@RequestHeader
(
"Authorization"
)
String
token
,
@RequestBody
Map
param
);
JSONObject
put
(
@PathVariable
(
"path"
)
String
path
,
@RequestHeader
(
"Authorization"
)
String
token
,
@RequestBody
Map
param
);
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/{path}"
)
JSONObject
delete
(
@PathVariable
(
"path"
)
String
path
,
@RequestHeader
(
"Authorization"
)
String
token
);
JSONObject
delete
(
@PathVariable
(
"path"
)
String
path
,
@RequestHeader
(
"Authorization"
)
String
token
);
}
/**
...
...
@@ -115,6 +115,4 @@ public class RemoteService {
final
HttpMessageConverters
httpMessageConverters
=
new
HttpMessageConverters
(
jsonConverter
);
return
()
->
httpMessageConverters
;
}
}
\ No newline at end of file
ibzlite-util/src/main/java/cn/ibizlab/util/service/SimpleAuditService.java
浏览文件 @
c82fcd6b
...
...
@@ -68,7 +68,7 @@ public class SimpleAuditService extends ServiceImpl<IBZDataAuditMapper, IBZDataA
public
void
createAudit
(
HttpServletRequest
request
,
EntityBase
entity
,
Object
idValue
,
Map
<
String
,
Audit
>
auditFields
)
{
IBZDataAudit
dataAudit
=
new
IBZDataAudit
();
dataAudit
.
setOppersonid
(
AuthenticationUser
.
getAuthenticationUser
().
getUserid
());
dataAudit
.
setOppersonname
(
String
.
format
(
"%s[%s]"
,
AuthenticationUser
.
getAuthenticationUser
().
getPersonname
(),
AuthenticationUser
.
getAuthenticationUser
().
getOrgname
()));
dataAudit
.
setOppersonname
(
String
.
format
(
"%s[%s]"
,
AuthenticationUser
.
getAuthenticationUser
().
getPersonname
(),
AuthenticationUser
.
getAuthenticationUser
().
getOrgname
()));
dataAudit
.
setAudittype
(
"CREATE"
);
dataAudit
.
setAuditobject
(
entity
.
getClass
().
getSimpleName
());
dataAudit
.
setAuditobjectdata
(
idValue
);
...
...
ibzlite-util/src/main/java/cn/ibizlab/util/service/SimpleFileService.java
浏览文件 @
c82fcd6b
...
...
@@ -27,7 +27,7 @@ public class SimpleFileService implements FileService {
// 获取文件名
String
fileName
=
multipartFile
.
getOriginalFilename
();
// 获取文件后缀
String
extname
=
"."
+
getExtensionName
(
fileName
);
String
extname
=
"."
+
getExtensionName
(
fileName
);
try
{
String
fileid
=
DigestUtils
.
md5DigestAsHex
(
multipartFile
.
getInputStream
());
String
fileFullPath
=
this
.
fileRoot
+
"ibizutil"
+
File
.
separator
+
fileid
+
File
.
separator
+
fileName
;
...
...
ibzlite-util/src/main/java/cn/ibizlab/util/web/SearchContextHandlerMethodArgumentResolver.java
浏览文件 @
c82fcd6b
...
...
@@ -31,14 +31,14 @@ public class SearchContextHandlerMethodArgumentResolver implements HandlerMethod
public
Object
resolveArgument
(
MethodParameter
parameter
,
ModelAndViewContainer
mavContainer
,
NativeWebRequest
webRequest
,
WebDataBinderFactory
binderFactory
)
throws
Exception
{
Map
<
String
,
String
[]>
params
=
webRequest
.
getParameterMap
();
LinkedHashMap
<
String
,
Object
>
set
=
new
LinkedHashMap
<>();
LinkedHashMap
<
String
,
Object
>
set
=
new
LinkedHashMap
<>();
for
(
String
key
:
params
.
keySet
())
{
set
.
put
(
key
,
params
.
get
(
key
)[
0
]);
}
if
((!
set
.
containsKey
(
"size"
))
){
set
.
put
(
"size"
,
pageLimit
);
set
.
put
(
"size"
,
pageLimit
);
}
String
json
=
objectMapper
.
writeValueAsString
(
set
);
return
objectMapper
.
readValue
(
json
,
parameter
.
getParameterType
());
String
json
=
objectMapper
.
writeValueAsString
(
set
);
return
objectMapper
.
readValue
(
json
,
parameter
.
getParameterType
());
}
}
\ No newline at end of file
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录