Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzlite
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzlite
提交
27a74788
提交
27a74788
编写于
11月 30, 2020
作者:
sq3536
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
model
上级
c09471a8
变更
6
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
62 行增加
和
14 行删除
+62
-14
EntityModel.java
...a/cn/ibizlab/core/lite/extensions/domain/EntityModel.java
+19
-13
EntityObj.java
...ava/cn/ibizlab/core/lite/extensions/domain/EntityObj.java
+2
-0
ModelObj.java
...java/cn/ibizlab/core/lite/extensions/domain/ModelObj.java
+27
-0
NestedArray.java
...a/cn/ibizlab/core/lite/extensions/domain/NestedArray.java
+13
-0
DbEntityService.java
...ibizlab/core/lite/extensions/service/DbEntityService.java
+1
-0
LiteCoreResource.java
...java/cn/ibizlab/api/rest/extensions/LiteCoreResource.java
+0
-1
未找到文件。
ibzlite-core/src/main/java/cn/ibizlab/core/lite/extensions/domain/EntityModel.java
浏览文件 @
27a74788
...
@@ -193,13 +193,19 @@ public class EntityModel {
...
@@ -193,13 +193,19 @@ public class EntityModel {
String
columnExp
=
fieldModel
.
getColumnExp
();
String
columnExp
=
fieldModel
.
getColumnExp
();
if
(
StringUtils
.
isEmpty
(
columnExp
))
if
(
StringUtils
.
isEmpty
(
columnExp
))
continue
;
continue
;
if
(
fieldModel
.
isPhysicalField
())
continue
;
if
(!
StringUtils
.
isEmpty
(
columnSet
)){
if
(!
StringUtils
.
isEmpty
(
columnSet
)){
columnSet
=
columnSet
+
","
;
columnSet
=
columnSet
+
","
;
}
}
columnSet
=
columnSet
+
columnExp
;
columnSet
=
columnSet
+
columnExp
;
}
}
return
"select "
+
columnSet
+
" from "
+
this
.
getTableName
()+
" "
;
if
(!
StringUtils
.
isEmpty
(
columnSet
)){
columnSet
=
columnSet
+
","
;
}
columnSet
=
columnSet
+
"t.*"
;
return
"select "
+
columnSet
+
" from "
+
this
.
getTableName
()+
" t "
;
}
}
else
if
(
"CORE"
.
equalsIgnoreCase
(
dataSet
))
else
if
(
"CORE"
.
equalsIgnoreCase
(
dataSet
))
{
{
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/lite/extensions/domain/EntityObj.java
浏览文件 @
27a74788
...
@@ -134,6 +134,8 @@ public class EntityObj extends DataObj<String,Object> {
...
@@ -134,6 +134,8 @@ public class EntityObj extends DataObj<String,Object> {
return
rowKey
;
return
rowKey
;
}
}
@JsonIgnore
@JSONField
(
serialize
=
false
)
@Override
@Override
public
Timestamp
getTimestamp
()
{
public
Timestamp
getTimestamp
()
{
Timestamp
lastModify
=
super
.
getTimestamp
();
Timestamp
lastModify
=
super
.
getTimestamp
();
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/lite/extensions/domain/ModelObj.java
浏览文件 @
27a74788
...
@@ -4,10 +4,12 @@ import cn.ibizlab.core.lite.extensions.model.DataModel;
...
@@ -4,10 +4,12 @@ import cn.ibizlab.core.lite.extensions.model.DataModel;
import
cn.ibizlab.core.lite.extensions.model.LayerMapping
;
import
cn.ibizlab.core.lite.extensions.model.LayerMapping
;
import
cn.ibizlab.core.lite.extensions.model.Property
;
import
cn.ibizlab.core.lite.extensions.model.Property
;
import
cn.ibizlab.core.lite.extensions.util.LiteStorage
;
import
cn.ibizlab.core.lite.extensions.util.LiteStorage
;
import
cn.ibizlab.util.helper.DataObject
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
java.sql.Timestamp
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.Collection
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -221,6 +223,31 @@ public class ModelObj extends DataObj<String,Object> {
...
@@ -221,6 +223,31 @@ public class ModelObj extends DataObj<String,Object> {
return
rowKey
;
return
rowKey
;
}
}
@JsonIgnore
@JSONField
(
serialize
=
false
)
@Override
public
Timestamp
getTimestamp
()
{
Timestamp
last
=
DataObject
.
getBeginDate
();
for
(
Object
sub:
this
.
values
())
{
if
(
sub
==
null
)
continue
;
else
if
(
sub
instanceof
EntityObj
)
{
if
(((
EntityObj
)
sub
).
getTimestamp
().
getTime
()>
last
.
getTime
())
last
=((
EntityObj
)
sub
).
getTimestamp
();
}
else
if
(
sub
instanceof
NestedArray
)
{
if
(((
NestedArray
)
sub
).
getTimestamp
().
getTime
()>
last
.
getTime
())
last
=((
NestedArray
)
sub
).
getTimestamp
();
}
}
this
.
setTimestamp
(
last
);
return
last
;
}
public
ModelObj
findParent
(
List
<
ModelObj
>
uplayerObjs
)
public
ModelObj
findParent
(
List
<
ModelObj
>
uplayerObjs
)
{
{
if
(
uplayerObjs
.
size
()==
1
)
if
(
uplayerObjs
.
size
()==
1
)
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/lite/extensions/domain/NestedArray.java
浏览文件 @
27a74788
package
cn
.
ibizlab
.
core
.
lite
.
extensions
.
domain
;
package
cn
.
ibizlab
.
core
.
lite
.
extensions
.
domain
;
import
cn.ibizlab.core.lite.extensions.model.DataModel
;
import
cn.ibizlab.core.lite.extensions.model.DataModel
;
import
cn.ibizlab.util.helper.DataObject
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
java.sql.Timestamp
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
public
class
NestedArray
extends
ArrayList
<
ModelObj
>
{
public
class
NestedArray
extends
ArrayList
<
ModelObj
>
{
...
@@ -51,4 +53,15 @@ public class NestedArray extends ArrayList<ModelObj> {
...
@@ -51,4 +53,15 @@ public class NestedArray extends ArrayList<ModelObj> {
return
rt
;
return
rt
;
}
}
@JsonIgnore
@JSONField
(
serialize
=
false
)
public
Timestamp
getTimestamp
()
{
Timestamp
last
=
DataObject
.
getBeginDate
();
for
(
ModelObj
sub:
this
)
if
(
sub
.
getTimestamp
().
getTime
()>
last
.
getTime
())
last
=
sub
.
getTimestamp
();
return
last
;
}
}
}
ibzlite-core/src/main/java/cn/ibizlab/core/lite/extensions/service/DbEntityService.java
浏览文件 @
27a74788
...
@@ -155,6 +155,7 @@ public class DbEntityService extends ServiceImpl<DbEntityMapper, EntityObj> impl
...
@@ -155,6 +155,7 @@ public class DbEntityService extends ServiceImpl<DbEntityMapper, EntityObj> impl
fillEntityObj
(
dataModel
,
rt
);
fillEntityObj
(
dataModel
,
rt
);
dataModel
.
getNestedDataModels
().
forEach
(
subModel
->
dataModel
.
getNestedDataModels
().
forEach
(
subModel
->
this
.
getModelObjs
(
subModel
,
factEntityList
).
forEach
(
subObj
->
subObj
.
findParent
(
rt
)));
this
.
getModelObjs
(
subModel
,
factEntityList
).
forEach
(
subObj
->
subObj
.
findParent
(
rt
)));
rt
.
forEach
(
modelObj
->
modelObj
.
getTimestamp
());
return
rt
;
return
rt
;
}
}
...
...
ibzlite-provider/ibzlite-provider-api/src/main/java/cn/ibizlab/api/rest/extensions/LiteCoreResource.java
浏览文件 @
27a74788
...
@@ -57,7 +57,6 @@ public class LiteCoreResource {
...
@@ -57,7 +57,6 @@ public class LiteCoreResource {
if
(
StringUtils
.
isEmpty
(
modelid
))
if
(
StringUtils
.
isEmpty
(
modelid
))
modelid
=
"dataModelff8080816a8b510c016a8c2f18b10001"
;
modelid
=
"dataModelff8080816a8b510c016a8c2f18b10001"
;
List
<
ModelObj
>
list
=
dbEntityService
.
getModelObjs
(
modelid
,
DataObject
.
getBeginDate
());
List
<
ModelObj
>
list
=
dbEntityService
.
getModelObjs
(
modelid
,
DataObject
.
getBeginDate
());
return
ResponseEntity
.
ok
(
list
);
return
ResponseEntity
.
ok
(
list
);
}
}
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录