Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzdst
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzdst
提交
bc028771
提交
bc028771
编写于
12月 18, 2020
作者:
sq3536
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bug modify
上级
89695371
变更
5
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
59 行增加
和
27 行删除
+59
-27
EntityModel.java
...a/cn/ibizlab/core/lite/extensions/domain/EntityModel.java
+1
-18
DataModel.java
...java/cn/ibizlab/core/lite/extensions/model/DataModel.java
+25
-4
DbEntityService.java
...ibizlab/core/lite/extensions/service/DbEntityService.java
+4
-4
LiteModelService.java
...bizlab/core/lite/extensions/service/LiteModelService.java
+4
-1
20201218055923_changelog.xml
...esources/liquibase/changelog/20201218055923_changelog.xml
+25
-0
未找到文件。
ibzdst-core/src/main/java/cn/ibizlab/core/lite/extensions/domain/EntityModel.java
浏览文件 @
bc028771
...
...
@@ -192,18 +192,12 @@ public class EntityModel {
String
columnExp
=
fieldModel
.
getColumnExp
();
if
(
StringUtils
.
isEmpty
(
columnExp
))
continue
;
// if(fieldModel.isPhysicalField())
// continue;
if
(!
StringUtils
.
isEmpty
(
columnSet
)){
columnSet
=
columnSet
+
","
;
}
columnSet
=
columnSet
+
columnExp
;
}
// if(!StringUtils.isEmpty(columnSet)){
// columnSet=columnSet+",";
// }
//columnSet=columnSet+"t.*";
return
"select "
+
columnSet
+
" from "
+
this
.
getTableName
()+
" t "
;
}
else
if
(
"CORE"
.
equalsIgnoreCase
(
dataSet
))
...
...
@@ -242,18 +236,7 @@ public class EntityModel {
public
String
getExtParams
(
String
key
)
{
if
(!(
StringUtils
.
isEmpty
(
this
.
getEntity
().
getExtParams
())))
{
List
<
Setting
>
settings
=
JSONArray
.
parseArray
(
this
.
getEntity
().
getExtParams
(),
Setting
.
class
);
for
(
Setting
setting:
settings
)
{
if
(
key
.
equals
(
setting
.
getProperty
()))
{
return
setting
.
getValue
();
}
}
}
return
null
;
return
Setting
.
getValue
(
this
.
getEntity
().
getExtParams
(),
key
);
}
...
...
ibzdst-core/src/main/java/cn/ibizlab/core/lite/extensions/model/DataModel.java
浏览文件 @
bc028771
...
...
@@ -2,6 +2,8 @@ package cn.ibizlab.core.lite.extensions.model;
import
cn.ibizlab.core.lite.extensions.domain.EntityModel
;
import
cn.ibizlab.core.lite.extensions.domain.EntityObj
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
lombok.Getter
;
...
...
@@ -20,6 +22,27 @@ import java.util.List;
@NoArgsConstructor
@Accessors
(
chain
=
true
)
public
class
DataModel
{
@JsonIgnore
@JSONField
(
serialize
=
false
)
private
String
modelString
;
public
String
getModelString
()
{
if
(
StringUtils
.
isEmpty
(
modelString
))
{
modelString
=
JSONObject
.
toJSONString
(
this
);
}
return
modelString
;
}
@JsonIgnore
@JSONField
(
serialize
=
false
)
public
DataModel
clone
()
{
DataModel
clone
=
JSON
.
toJavaObject
(
JSONObject
.
parseObject
(
this
.
getModelString
()),
DataModel
.
class
);
clone
.
setModelString
(
this
.
getModelString
());
return
clone
;
}
@JsonIgnore
@JSONField
(
serialize
=
false
)
...
...
@@ -138,9 +161,6 @@ public class DataModel {
for
(
Property
property:
this
.
getObjectProperties
())
if
(
name
.
equalsIgnoreCase
(
property
.
getPropertyName
()))
return
property
;
// for (Property property:this.getObjectProperties())
// if(name.equalsIgnoreCase(property.getPropertyEntity()))
// return property;
}
return
null
;
}
...
...
@@ -336,7 +356,8 @@ public class DataModel {
@JSONField
(
serialize
=
false
)
public
LinkedHashSet
<
Property
>
getAllProperty
()
{
LinkedHashSet
<
Property
>
properties
=
this
.
getObjectProperties
();
LinkedHashSet
<
Property
>
properties
=
new
LinkedHashSet
<>();
properties
.
addAll
(
this
.
getObjectProperties
());
if
(
this
.
getNestedDataModels
()
!=
null
)
{
for
(
DataModel
dm
:
this
.
getNestedDataModels
())
{
...
...
ibzdst-core/src/main/java/cn/ibizlab/core/lite/extensions/service/DbEntityService.java
浏览文件 @
bc028771
...
...
@@ -163,7 +163,7 @@ public class DbEntityService extends ServiceImpl<DbEntityMapper, EntityObj> impl
@Override
public
List
<
ModelObj
>
getModelObjs
(
String
metaModelId
,
Set
<
String
>
fillPropertys
,
Timestamp
lastModify
)
{
DataModel
dataModel
=
JSON
.
toJavaObject
(
JSON
.
parseObject
(
metaModelService
.
get
(
metaModelId
).
getConfig
()),
DataModel
.
class
);
DataModel
dataModel
=
liteModelService
.
getDataModel
(
metaModelId
);
EntityModel
entityModel
=
dataModel
.
getFactEntityModel
();
FieldModel
lastModifyField
=
entityModel
.
getLastModifyField
();
QueryFilter
filter
=
new
QueryFilter
();
...
...
@@ -179,7 +179,7 @@ public class DbEntityService extends ServiceImpl<DbEntityMapper, EntityObj> impl
@Override
public
ModelObj
getModelObjs
(
String
metaModelId
,
Set
<
String
>
fillPropertys
,
Object
factKey
)
{
DataModel
dataModel
=
JSON
.
toJavaObject
(
JSON
.
parseObject
(
metaModelService
.
get
(
metaModelId
).
getConfig
()),
DataModel
.
class
);
DataModel
dataModel
=
liteModelService
.
getDataModel
(
metaModelId
);
List
<
EntityObj
>
kEntityObjs
=
new
ArrayList
<>();
kEntityObjs
.
add
(
new
EntityObj
().
set
(
dataModel
.
getFactEntityModel
().
getKeyField
().
getColumnName
(),
factKey
));
List
<
ModelObj
>
list
=
getModelObjs
(
dataModel
,
fillPropertys
,
kEntityObjs
);
...
...
@@ -191,7 +191,7 @@ public class DbEntityService extends ServiceImpl<DbEntityMapper, EntityObj> impl
@Override
public
ModelObj
getModelObjs
(
String
metaModelId
,
Set
<
String
>
fillPropertys
,
Object
...
factUniKey
)
{
DataModel
dataModel
=
JSON
.
toJavaObject
(
JSON
.
parseObject
(
metaModelService
.
get
(
metaModelId
).
getConfig
()),
DataModel
.
class
);
DataModel
dataModel
=
liteModelService
.
getDataModel
(
metaModelId
);
List
<
EntityObj
>
kEntityObjs
=
new
ArrayList
<>();
EntityObj
entityObj
=
new
EntityObj
();
List
<
FieldModel
>
uniKeys
=
dataModel
.
getFactEntityModel
().
getUnionKeyFields
();
...
...
@@ -207,7 +207,7 @@ public class DbEntityService extends ServiceImpl<DbEntityMapper, EntityObj> impl
@Override
public
List
<
ModelObj
>
getModelObjs
(
String
metaModelId
,
Set
<
String
>
fillPropertys
,
List
<
EntityObj
>
kEntityObjs
)
{
DataModel
dataModel
=
JSON
.
toJavaObject
(
JSON
.
parseObject
(
metaModelService
.
get
(
metaModelId
).
getConfig
()),
DataModel
.
class
);
DataModel
dataModel
=
liteModelService
.
getDataModel
(
metaModelId
);
return
getModelObjs
(
dataModel
,
fillPropertys
,
kEntityObjs
);
}
...
...
ibzdst-core/src/main/java/cn/ibizlab/core/lite/extensions/service/LiteModelService.java
浏览文件 @
bc028771
...
...
@@ -177,7 +177,10 @@ public class LiteModelService {
public
DataModel
getDataModel
(
String
dataModelId
)
{
return
JSON
.
toJavaObject
(
JSON
.
parseObject
(
metaModelService
.
get
(
dataModelId
).
getConfig
()),
DataModel
.
class
);
String
cfg
=
metaModelService
.
get
(
dataModelId
).
getConfig
();
DataModel
dataModel
=
JSON
.
toJavaObject
(
JSON
.
parseObject
(
metaModelService
.
get
(
dataModelId
).
getConfig
()),
DataModel
.
class
);
dataModel
.
setModelString
(
cfg
);
return
dataModel
;
}
public
DataModel
getDataModel
(
String
rootDataModelId
,
String
subDataModelName
)
...
...
ibzdst-core/src/main/resources/liquibase/changelog/20201218055923_changelog.xml
0 → 100644
浏览文件 @
bc028771
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
<databaseChangeLog
xmlns=
"http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext=
"http://www.liquibase.org/xml/ns/dbchangelog-ext"
xmlns:pro=
"http://www.liquibase.org/xml/ns/pro"
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/pro http://www.liquibase.org/xml/ns/pro/liquibase-pro-3.8.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd"
>
<changeSet
author=
"mac (generated)"
id=
"1608271176252-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"IBZDABUILD"
columnName=
"TOTAL"
/>
</not>
</preConditions>
<addColumn
tableName=
"IBZDABUILD"
>
<column
name=
"TOTAL"
type=
"INTEGER"
/>
</addColumn>
<addColumn
tableName=
"IBZRULEENGINE"
>
<column
name=
"TOTAL"
type=
"INTEGER"
/>
</addColumn>
<addColumn
tableName=
"IBZDABUILD"
>
<column
name=
"PROCESSED"
type=
"INTEGER"
/>
</addColumn>
<addColumn
tableName=
"IBZRULEENGINE"
>
<column
name=
"PROCESSED"
type=
"INTEGER"
/>
</addColumn>
<addColumn
tableName=
"IBZDABUILD"
>
<column
name=
"EXTPARAMS"
type=
"CLOB(2147483647)"
/>
</addColumn>
</changeSet>
</databaseChangeLog>
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录