Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzdata
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzdata
提交
294a10fa
提交
294a10fa
编写于
8月 27, 2021
作者:
sq3536
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
url改造
上级
d43bc8ba
变更
16
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
320 行增加
和
198 行删除
+320
-198
DevBootApplication.java
...ata-boot/src/main/java/cn/ibizlab/DevBootApplication.java
+2
-3
DevBootSecurityConfig.java
...rc/main/java/cn/ibizlab/config/DevBootSecurityConfig.java
+13
-3
DevUrlRedirectFilter.java
...src/main/java/cn/ibizlab/config/DevUrlRedirectFilter.java
+55
-0
application-boot.yml
ibzdata-boot/src/main/resources/application-boot.yml
+61
-0
BaseData.java
...core/src/main/java/cn/ibizlab/core/data/dto/BaseData.java
+18
-0
FilterData.java
...re/src/main/java/cn/ibizlab/core/data/dto/FilterData.java
+12
-1
DynamicModelService.java
...n/java/cn/ibizlab/core/data/lite/DynamicModelService.java
+4
-1
POSchema.java
...re/src/main/java/cn/ibizlab/core/data/model/POSchema.java
+54
-10
PojoSchema.java
.../src/main/java/cn/ibizlab/core/data/model/PojoSchema.java
+7
-0
TransUtils.java
.../src/main/java/cn/ibizlab/core/data/model/TransUtils.java
+1
-1
DataResource.java
...src/main/java/cn/ibizlab/core/data/rest/DataResource.java
+65
-119
ModelService.java
.../main/java/cn/ibizlab/core/data/service/ModelService.java
+23
-2
DbDataServiceImpl.java
.../cn/ibizlab/core/data/service/impl/DbDataServiceImpl.java
+1
-1
FilterDataResolver.java
.../java/cn/ibizlab/core/util/config/FilterDataResolver.java
+0
-53
DbDataMapper.xml
...re/src/main/resources/mapper/data/DbData/DbDataMapper.xml
+3
-3
AppController.java
...til/src/main/java/cn/ibizlab/util/rest/AppController.java
+1
-1
未找到文件。
ibzdata-boot/src/main/java/cn/ibizlab/DevBootApplication.java
浏览文件 @
294a10fa
package
cn
.
ibizlab
;
import
cn.ibizlab.core.util.config.FilterDataResolver
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
...
...
@@ -40,7 +39,7 @@ public class DevBootApplication extends WebMvcConfigurerAdapter {
@Autowired
FilterDataResolver
filterDataR
esolver
;
SearchContextHandlerMethodArgumentResolver
r
esolver
;
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
DevBootApplication
.
class
,
args
);
...
...
@@ -49,6 +48,6 @@ public class DevBootApplication extends WebMvcConfigurerAdapter {
@Override
public
void
addArgumentResolvers
(
List
<
HandlerMethodArgumentResolver
>
argumentResolvers
)
{
super
.
addArgumentResolvers
(
argumentResolvers
);
argumentResolvers
.
add
(
filterDataR
esolver
);
argumentResolvers
.
add
(
r
esolver
);
}
}
ibzdata-boot/src/main/java/cn/ibizlab/config/DevBootSecurityConfig.java
浏览文件 @
294a10fa
...
...
@@ -115,10 +115,20 @@ public class DevBootSecurityConfig extends WebSecurityConfigurerAdapter {
.
antMatchers
(
HttpMethod
.
GET
,
"/"
+
logoutPath
).
permitAll
()
// 文件操作
.
antMatchers
(
"/"
+
downloadpath
+
"/**"
).
permitAll
()
.
antMatchers
(
"/ibiz-repository/**"
).
permitAll
()
.
antMatchers
(
"/ibiz-repo/**"
).
permitAll
()
.
antMatchers
(
"/"
+
uploadpath
).
permitAll
()
.
antMatchers
(
"/"
+
previewpath
+
"/**"
).
permitAll
();
.
antMatchers
(
"/"
+
previewpath
+
"/**"
).
permitAll
()
.
antMatchers
(
HttpMethod
.
POST
,
"/ibiz-repo**/**/"
+
loginPath
).
permitAll
()
//放行注销请求
.
antMatchers
(
HttpMethod
.
GET
,
"/ibiz-repo**/**/"
+
logoutPath
).
permitAll
()
// 文件操作
.
antMatchers
(
"/ibiz-repo**/**/"
+
downloadpath
+
"/**"
).
permitAll
()
.
antMatchers
(
"/ibiz-repo**/**/"
+
uploadpath
).
permitAll
()
.
antMatchers
(
"/ibiz-repo**/**/"
+
previewpath
+
"/**"
).
permitAll
()
;
for
(
String
excludePattern
:
excludesPattern
)
{
...
...
ibzdata-boot/src/main/java/cn/ibizlab/config/DevUrlRedirectFilter.java
0 → 100644
浏览文件 @
294a10fa
package
cn
.
ibizlab
.
config
;
import
java.util.HashMap
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.cloud.netflix.zuul.filters.support.FilterConstants
;
import
org.springframework.stereotype.Component
;
import
com.netflix.zuul.ZuulFilter
;
import
com.netflix.zuul.context.RequestContext
;
@Component
public
class
DevUrlRedirectFilter
extends
ZuulFilter
{
@Override
public
Object
run
()
{
RequestContext
ctx
=
RequestContext
.
getCurrentContext
();
HttpServletRequest
request
=
ctx
.
getRequest
();
String
url
=
request
.
getRequestURI
();
if
(
url
.
startsWith
(
"/ibiz-repo"
))
{
String
[]
split
=
url
.
split
(
"/"
);
if
(
split
.
length
>
2
)
{
url
=
url
.
replaceFirst
(
"/"
+
split
[
1
]+
"/"
+
split
[
2
]+
"/"
,
"/"
);
ctx
.
put
(
FilterConstants
.
REQUEST_URI_KEY
,
url
);
}
}
return
null
;
}
@Override
public
boolean
shouldFilter
()
{
return
true
;
}
@Override
public
int
filterOrder
()
{
return
1
;
}
@Override
public
String
filterType
()
{
return
FilterConstants
.
ROUTE_TYPE
;
}
}
\ No newline at end of file
ibzdata-boot/src/main/resources/application-boot.yml
浏览文件 @
294a10fa
spring
:
jackson
:
date-format
:
yyyy-MM-dd HH:mm:ss
time-zone
:
GMT+8
datasource
:
username
:
root
password
:
root
...
...
@@ -43,3 +46,61 @@ spring:
cache
:
caffeine
:
spec
:
initialCapacity=5,maximumSize=50000,expireAfterWrite=3600s
zuul
:
routes
:
repo-loginv7
:
path
:
/ibiz-repo**/**/v7/login
serviceId
:
${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix
:
true
repo-changepwd
:
path
:
/ibiz-rep**/**/v7/changepwd
serviceId
:
${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix
:
false
repo-uaa
:
path
:
/ibiz-rep**/**/uaa/**
serviceId
:
${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix
:
false
repo-config
:
path
:
/ibiz-rep**/**/configs/**
serviceId
:
${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix
:
false
repo-oucore
:
path
:
/ibiz-rep**/**/ibzorganizations/**
serviceId
:
${ibiz.ref.service.ou:ibzou-api}
stripPrefix
:
false
repo-oudict
:
path
:
/ibiz-rep**/**/dictionarys/**/Ibzou**
serviceId
:
${ibiz.ref.service.ou:ibzou-api}
stripPrefix
:
false
repo-ou
:
path
:
/ibiz-rep**/**/ibzdepartments/**
serviceId
:
${ibiz.ref.service.ou:ibzou-api}
stripPrefix
:
false
repo-uaadict
:
path
:
/ibiz-rep**/**/dictionarys/**/SysOperator
serviceId
:
${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix
:
false
repo-dict
:
path
:
/ibiz-rep**/**/dictionarys/**
serviceId
:
${ibiz.ref.service.dict:ibzdict-api}
stripPrefix
:
false
repo-disk
:
path
:
/ibiz-rep**/**/net-disk/**
serviceId
:
${ibiz.ref.service.disk:ibzdisk-api}
stripPrefix
:
false
repo-ou_sys_org
:
path
:
/ibiz-rep**/**/sysorganizations/**
serviceId
:
${ibiz.ref.service.ou:ibzou-api}
stripPrefix
:
false
repo-ou_sys_dept
:
path
:
/ibiz-rep**/**/sysdepartments/**
serviceId
:
${ibiz.ref.service.ou:ibzou-api}
stripPrefix
:
false
repo-lite-core
:
path
:
/ibiz-rep**/**/lite/**
serviceId
:
${ibiz.ref.service.lite:ibzlite-api}
stripPrefix
:
false
repo-sysauthlog
:
path
:
/ibiz-rep**/**/sysauthlogs
serviceId
:
${ibiz.ref.service.uaa:ibzuaa-api}
stripPrefix
:
false
\ No newline at end of file
ibzdata-core/src/main/java/cn/ibizlab/core/data/dto/BaseData.java
浏览文件 @
294a10fa
...
...
@@ -8,6 +8,7 @@ import com.alibaba.fastjson.annotation.JSONField;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
org.springframework.util.ObjectUtils
;
import
java.io.Serializable
;
import
java.util.Map
;
...
...
@@ -41,6 +42,12 @@ public class BaseData extends DataObj
return
this
;
}
@Override
public
BaseData
remove
(
Object
key
)
{
super
.
remove
(
key
);
return
this
;
}
@JsonIgnore
@JSONField
(
serialize
=
false
)
private
POSchema
_poschema
;
...
...
@@ -121,4 +128,15 @@ public class BaseData extends DataObj
{
return
getSerializableValue
(
"_key"
);
}
public
static
BaseData
fromContext
(
Map
map
)
{
if
(
map
==
null
)
return
null
;
map
.
remove
(
"datasource"
);
if
(
map
.
size
()==
0
)
return
null
;
return
new
BaseData
().
setAll
(
map
);
}
}
ibzdata-core/src/main/java/cn/ibizlab/core/data/dto/FilterData.java
浏览文件 @
294a10fa
...
...
@@ -291,7 +291,7 @@ public class FilterData<T> extends BaseData
{
if
(!
StringUtils
.
isEmpty
(
this
.
getQuery
()))
{
if
(
ObjectUtils
.
isEmpty
(
this
.
getPOSchema
().
getQuickSearch
()))
if
(
!
ObjectUtils
.
isEmpty
(
this
.
getPOSchema
().
getQuickSearch
()))
{
searchCond
.
and
(
qw
->
{
int
i
=
0
;
...
...
@@ -376,4 +376,15 @@ public class FilterData<T> extends BaseData
return
sql
;
}
public
static
FilterData
fromContext
(
Map
map
)
{
if
(
map
==
null
)
return
null
;
map
.
remove
(
"datasource"
);
if
(
map
.
size
()==
0
)
return
null
;
return
new
FilterData
().
setAll
(
map
);
}
}
ibzdata-core/src/main/java/cn/ibizlab/core/data/lite/DynamicModelService.java
浏览文件 @
294a10fa
...
...
@@ -219,13 +219,16 @@ public class DynamicModelService {
for
(
IPSDEField
defield:
dataEntity
.
getAllPSDEFields
())
{
String
dict
=
null
;
try
{
dict
=
defield
.
getPSCodeList
()!=
null
?
defield
.
getPSCodeList
().
getCodeName
():
null
;
}
catch
(
Exception
ex
){}
FieldModel
fieldModel
=
new
FieldModel
();
MetaFieldModel
metaFieldModel
=
new
MetaFieldModel
();
metaFieldModel
.
setFieldId
(
defield
.
getId
()).
setFieldName
(
defield
.
getName
()).
setCodeName
(
defield
.
getCodeName
()).
setFieldLogicName
(
defield
.
getLogicName
())
.
setEntityId
(
dataEntity
.
getId
()).
setEntityCodeName
(
dataEntity
.
getCodeName
()).
setEntityName
(
dataEntity
.
getName
()).
setSystemId
(
metaEntityModel
.
getSystemId
())
.
setFieldUniName
(
dataEntity
.
getName
()+
"."
+
defield
.
getName
()).
setFieldShowName
(
String
.
format
(
"%1$s-%2$s[%3$s]"
,
defield
.
getName
(),
defield
.
getLogicName
(),
dataEntity
.
getName
()))
.
setKeyField
(
defield
.
isKeyDEField
()?
1
:
null
).
setMajorField
(
defield
.
isMajorDEField
()?
1
:
null
).
setUnionKey
(
defield
.
getUnionKeyValue
()).
setFieldType
(
defield
.
getDataType
())
.
setPredefined
(
defield
.
getPredefinedType
()).
setDict
(
d
efield
.
getPSCodeList
()!=
null
?
defield
.
getPSCodeList
().
getCodeName
():
null
).
setNullable
(
defield
.
isAllowEmpty
()?
1
:
0
)
.
setPredefined
(
defield
.
getPredefinedType
()).
setDict
(
d
ict
).
setNullable
(
defield
.
isAllowEmpty
()?
1
:
0
)
.
setPhysicalField
(
defield
.
isPhisicalDEField
()?
1
:
0
).
setDataType
(
DataType
.
findTypeName
(
defield
.
getStdDataType
())).
setDataLength
(
defield
.
getLength
()).
setDataPreci
(
defield
.
getPrecision
())
.
setIsEnableAudit
(
defield
.
isEnableAudit
()?
1
:
null
).
setShowOrder
(
defield
.
getImportOrder
());
...
...
ibzdata-core/src/main/java/cn/ibizlab/core/data/model/POSchema.java
浏览文件 @
294a10fa
...
...
@@ -556,7 +556,7 @@ public class POSchema {
@Accessors
(
chain
=
true
)
@JsonInclude
(
JsonInclude
.
Include
.
NON_EMPTY
)
@JsonIgnoreProperties
(
ignoreUnknown
=
true
)
public
static
class
Segment
{
public
static
class
Segment
{
private
String
name
;
private
String
vendorProvider
;
private
String
declare
;
...
...
@@ -564,13 +564,21 @@ public class POSchema {
private
String
format
;
private
Map
params
;
public
Segment
setVendorProvider
(
String
vendorProvider
)
{
if
(!
StringUtils
.
isEmpty
(
vendorProvider
))
this
.
vendorProvider
=
provider
.
get
(
vendorProvider
.
toLowerCase
());
public
Segment
setVendorProvider
(
String
vendorProvider
)
{
if
(!
StringUtils
.
isEmpty
(
vendorProvider
))
this
.
vendorProvider
=
provider
.
get
(
vendorProvider
.
toLowerCase
());
return
this
;
}
@JsonIgnore
@JSONField
(
serialize
=
false
)
public
String
getSql
()
{
if
(!
StringUtils
.
isEmpty
(
format
))
return
String
.
format
(
format
,
body
);
return
body
;
}
}
...
...
@@ -622,7 +630,7 @@ public class POSchema {
@JSONField
(
ordinal
=
12
)
public
Segment
defaultQueryScript
;
public
POSchema
setDefaultQueryScript
(
String
sql
)
public
POSchema
setDefaultQueryScript
SQL
(
String
sql
)
{
defaultQueryScript
=
new
Segment
().
setName
(
"default_query_script"
).
setVendorProvider
(
""
).
setBody
(
sql
);
return
this
;
...
...
@@ -637,7 +645,7 @@ public class POSchema {
segment
=
this
.
getSegment
(
"dq-default-"
,
this
.
getDsType
());
if
(
segment
!=
null
)
{
setDefaultQueryScript
(
segment
.
getBody
());
setDefaultQueryScript
SQL
(
segment
.
getBody
());
return
defaultQueryScript
;
}
else
if
(!
StringUtils
.
isEmpty
(
this
.
getDsType
()))
...
...
@@ -647,7 +655,7 @@ public class POSchema {
segment
=
this
.
getSegment
(
"dq-default-"
,
""
);
if
(
segment
!=
null
)
{
setDefaultQueryScript
(
segment
.
getBody
().
replace
(
"`"
,
""
).
replace
(
"["
,
""
).
replace
(
"]"
,
""
));
setDefaultQueryScript
SQL
(
segment
.
getBody
().
replace
(
"`"
,
""
).
replace
(
"["
,
""
).
replace
(
"]"
,
""
));
return
defaultQueryScript
;
}
}
...
...
@@ -707,13 +715,30 @@ public class POSchema {
public
BaseData
trans
(
BaseData
source
)
{
if
(!
needTrans
)
{
for
(
String
key
:
resultMap
.
keySet
())
{
if
(!
source
.
keySet
().
contains
(
key
))
{
if
((!
key
.
equals
(
key
.
toUpperCase
()))&&
source
.
keySet
().
contains
(
key
.
toUpperCase
()))
{
needTrans
=
true
;
break
;
}
else
if
((!
key
.
equals
(
key
.
toLowerCase
()))&&
source
.
keySet
().
contains
(
key
.
toLowerCase
()))
{
needTrans
=
true
;
break
;
}
}
}
}
if
(!
needTrans
)
return
source
;
else
{
BaseData
target
=
new
BaseData
();
for
(
Map
.
Entry
<
String
,
String
>
entry
:
resultMap
.
entrySet
())
{
if
(
source
.
keySet
().
contains
(
entry
.
getKey
()))
target
.
set
(
entry
.
getValue
(),
source
.
get
(
entry
.
getKey
()));
target
.
set
(
entry
.
getValue
().
toLowerCase
(),
source
.
get
(
entry
.
getKey
()));
}
return
target
;
}
...
...
@@ -721,6 +746,25 @@ public class POSchema {
public
List
<
BaseData
>
trans
(
List
<
BaseData
>
source
)
{
if
(!
needTrans
&&
source
.
size
()>
0
)
{
BaseData
src
=
source
.
get
(
0
);
for
(
String
key
:
resultMap
.
keySet
())
{
if
(!
src
.
keySet
().
contains
(
key
))
{
if
((!
key
.
equals
(
key
.
toUpperCase
()))&&
src
.
keySet
().
contains
(
key
.
toUpperCase
()))
{
needTrans
=
true
;
break
;
}
else
if
((!
key
.
equals
(
key
.
toLowerCase
()))&&
src
.
keySet
().
contains
(
key
.
toLowerCase
()))
{
needTrans
=
true
;
break
;
}
}
}
}
if
(!
needTrans
)
return
source
;
else
{
...
...
ibzdata-core/src/main/java/cn/ibizlab/core/data/model/PojoSchema.java
浏览文件 @
294a10fa
...
...
@@ -63,6 +63,13 @@ public class PojoSchema {
return
this
;
}
@JSONField
(
serialize
=
false
)
@JsonIgnore
public
String
getCodeName
()
{
return
this
.
getOptions
()==
null
?
this
.
getName
():
this
.
getOptions
().
getStringValue
(
"code_name"
,
this
.
getName
());
}
@JSONField
(
serialize
=
false
)
@JsonIgnore
public
String
getSystem
()
...
...
ibzdata-core/src/main/java/cn/ibizlab/core/data/model/TransUtils.java
浏览文件 @
294a10fa
...
...
@@ -297,7 +297,7 @@ public class TransUtils {
}
String
defaultQueryScript
=
pojoSchema
.
getOptions
().
getDefaultQueryScript
();
if
(!
StringUtils
.
isEmpty
(
defaultQueryScript
))
poSchema
.
setDefaultQueryScript
(
defaultQueryScript
);
poSchema
.
setDefaultQueryScript
SQL
(
defaultQueryScript
);
return
poSchema
;
}
...
...
ibzdata-core/src/main/java/cn/ibizlab/core/data/rest/DataResource.java
浏览文件 @
294a10fa
此差异已折叠。
点击以展开。
ibzdata-core/src/main/java/cn/ibizlab/core/data/service/ModelService.java
浏览文件 @
294a10fa
...
...
@@ -165,8 +165,29 @@ public class ModelService {
String
entityName
=
file
.
getName
().
replace
(
".json"
,
""
);
String
id
=
system
.
concat
(
".domain."
).
concat
(
entityName
);
if
(!
entities
.
containsKey
(
entityName
.
toLowerCase
()))
entities
.
put
(
entityName
.
toLowerCase
(),
id
);
if
(!
entities
.
containsKey
(
entityName
.
toLowerCase
()))
{
entities
.
put
(
entityName
.
toLowerCase
(),
id
);
try
{
PojoSchema
pojoSchema
=
PojoSchema
.
fromPath
(
file
.
toPath
());
entityName
=
pojoSchema
.
getName
();
if
((
StringUtils
.
isEmpty
(
entityName
))&&(!
entities
.
containsKey
(
pojoSchema
.
getName
())))
{
entities
.
put
(
pojoSchema
.
getName
(),
id
);
}
String
codeName
=
pojoSchema
.
getCodeName
();
if
((
StringUtils
.
isEmpty
(
codeName
))&&(!
entities
.
containsKey
(
codeName
)))
{
entities
.
put
(
codeName
,
id
);
if
(!
codeName
.
equals
(
codeName
.
toLowerCase
()))
entities
.
put
(
codeName
.
toLowerCase
(),
id
);
String
pluralize
=
Inflector
.
getInstance
().
pluralize
(
codeName
).
toLowerCase
();
if
(!
entities
.
containsKey
(
pluralize
))
{
entities
.
put
(
pluralize
,
id
);
}
}
}
catch
(
Exception
ex
){}
}
}
}
...
...
ibzdata-core/src/main/java/cn/ibizlab/core/data/service/impl/DbDataServiceImpl.java
浏览文件 @
294a10fa
...
...
@@ -240,7 +240,7 @@ public class DbDataServiceImpl implements IDataService {
@Override
public
BaseData
getDraft
(
DOModel
model
,
String
scope
,
String
datasource
,
BaseData
et
)
{
return
null
;
return
et
;
}
@Override
...
...
ibzdata-core/src/main/java/cn/ibizlab/core/util/config/FilterDataResolver.java
已删除
100644 → 0
浏览文件 @
d43bc8ba
package
cn
.
ibizlab
.
core
.
util
.
config
;
import
cn.ibizlab.core.data.dto.BaseData
;
import
cn.ibizlab.core.data.dto.FilterData
;
import
cn.ibizlab.core.data.filter.SearchContextBase
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.core.MethodParameter
;
import
org.springframework.web.bind.support.WebDataBinderFactory
;
import
org.springframework.web.context.request.NativeWebRequest
;
import
org.springframework.web.method.support.HandlerMethodArgumentResolver
;
import
org.springframework.web.method.support.ModelAndViewContainer
;
import
java.util.LinkedHashMap
;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Configuration
;
@Slf4j
@Configuration
public
class
FilterDataResolver
implements
HandlerMethodArgumentResolver
{
@Value
(
"${ibiz.pageLimit:1000}"
)
private
int
pageLimit
=
1000
;
private
static
ObjectMapper
objectMapper
=
new
ObjectMapper
();
@Override
public
boolean
supportsParameter
(
MethodParameter
parameter
)
{
Class
<?>
type
=
parameter
.
getParameterType
();
return
SearchContextBase
.
class
==
type
||
FilterData
.
class
==
type
||
BaseData
.
class
==
type
;
}
@Override
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
<>();
for
(
String
key
:
params
.
keySet
())
{
set
.
put
(
key
,
params
.
get
(
key
)[
0
]);
}
if
(
SearchContextBase
.
class
.
isAssignableFrom
(
parameter
.
getParameterType
())
&&
(!
set
.
containsKey
(
"size"
))){
set
.
put
(
"size"
,
pageLimit
);
}
if
(
FilterData
.
class
.
isAssignableFrom
(
parameter
.
getParameterType
())
&&
(!
set
.
containsKey
(
"size"
))){
set
.
put
(
"size"
,
pageLimit
);
}
String
json
=
objectMapper
.
writeValueAsString
(
set
);
return
objectMapper
.
readValue
(
json
,
parameter
.
getParameterType
());
}
}
\ No newline at end of file
ibzdata-core/src/main/resources/mapper/data/DbData/DbDataMapper.xml
浏览文件 @
294a10fa
...
...
@@ -32,7 +32,7 @@
select t1.* from
<choose>
<when
test=
"schema.defaultQueryScript!=null"
>
( ${schema.defaultQueryScript.
body
} ) t1 where
( ${schema.defaultQueryScript.
sql
} ) t1 where
</when>
<otherwise>
${schema.name} t1 where
...
...
@@ -50,7 +50,7 @@
select t1.* from
<choose>
<when
test=
"schema.defaultQueryScript!=null"
>
( ${schema.defaultQueryScript.
body
} ) t1 where
( ${schema.defaultQueryScript.
sql
} ) t1 where
</when>
<otherwise>
${schema.name} t1 where
...
...
@@ -74,7 +74,7 @@
select t1.* from
<choose>
<when
test=
"schema.defaultQueryScript!=null"
>
( ${schema.defaultQueryScript.
body
} ) t1 where
( ${schema.defaultQueryScript.
sql
} ) t1 where
</when>
<otherwise>
${schema.name} t1 where
...
...
ibzdata-util/src/main/java/cn/ibizlab/util/rest/AppController.java
浏览文件 @
294a10fa
...
...
@@ -29,7 +29,7 @@ public class AppController {
@Autowired
private
AuthenticationUserService
userDetailsService
;
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/appdata"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
{
"/ibiz-repository/{system}/{scope}/appdata"
,
"/ibiz-repo/{system}/appdata"
,
"/appdata"
}
)
public
ResponseEntity
<
JSONObject
>
getAppData
()
{
JSONObject
appData
=
new
JSONObject
()
;
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录