Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzlite
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzlite
提交
c09471a8
提交
c09471a8
编写于
11月 30, 2020
作者:
sq3536
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
model
上级
390939ac
变更
5
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
77 行增加
和
1 行删除
+77
-1
Property.java
.../java/cn/ibizlab/core/lite/extensions/model/Property.java
+1
-1
CommonEntityService.java
...lab/core/lite/extensions/service/CommonEntityService.java
+9
-0
DbEntityService.java
...ibizlab/core/lite/extensions/service/DbEntityService.java
+36
-0
LiteModelService.java
...bizlab/core/lite/extensions/service/LiteModelService.java
+9
-0
MongoEntityService.java
...zlab/core/lite/extensions/service/MongoEntityService.java
+22
-0
未找到文件。
ibzlite-core/src/main/java/cn/ibizlab/core/lite/extensions/model/Property.java
浏览文件 @
c09471a8
...
@@ -101,7 +101,7 @@ public class Property {
...
@@ -101,7 +101,7 @@ public class Property {
public
synchronized
EntityModel
getEntityModel
()
public
synchronized
EntityModel
getEntityModel
()
{
{
if
(
entityModel
==
null
)
if
(
entityModel
==
null
)
entityModel
=
LiteStorage
.
getLiteModelService
().
getEntityModel
(
this
.
getSystem
(),
this
.
getPropertyEntity
());
entityModel
=
LiteStorage
.
getLiteModelService
().
get
Proxy
EntityModel
(
this
.
getSystem
(),
this
.
getPropertyEntity
());
return
entityModel
;
return
entityModel
;
}
}
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/lite/extensions/service/CommonEntityService.java
浏览文件 @
c09471a8
...
@@ -2,9 +2,11 @@ package cn.ibizlab.core.lite.extensions.service;
...
@@ -2,9 +2,11 @@ package cn.ibizlab.core.lite.extensions.service;
import
cn.ibizlab.core.lite.extensions.domain.EntityModel
;
import
cn.ibizlab.core.lite.extensions.domain.EntityModel
;
import
cn.ibizlab.core.lite.extensions.domain.EntityObj
;
import
cn.ibizlab.core.lite.extensions.domain.EntityObj
;
import
cn.ibizlab.core.lite.extensions.domain.ModelObj
;
import
cn.ibizlab.util.filter.QueryFilter
;
import
cn.ibizlab.util.filter.QueryFilter
;
import
com.sun.jndi.toolkit.dir.SearchFilter
;
import
com.sun.jndi.toolkit.dir.SearchFilter
;
import
java.sql.Timestamp
;
import
java.util.List
;
import
java.util.List
;
public
interface
CommonEntityService
{
public
interface
CommonEntityService
{
...
@@ -15,4 +17,11 @@ public interface CommonEntityService {
...
@@ -15,4 +17,11 @@ public interface CommonEntityService {
List
<
EntityObj
>
search
(
String
dataSet
,
EntityModel
entityModel
,
QueryFilter
filter
);
List
<
EntityObj
>
search
(
String
dataSet
,
EntityModel
entityModel
,
QueryFilter
filter
);
List
<
EntityObj
>
search
(
String
dsName
,
String
sql
,
QueryFilter
filter
);
List
<
EntityObj
>
search
(
String
dsName
,
String
sql
,
QueryFilter
filter
);
List
<
ModelObj
>
getModelObjs
(
String
metaModelId
,
Timestamp
lastModify
);
ModelObj
getModelObjs
(
String
metaModelId
,
Object
factKey
);
ModelObj
getModelObjs
(
String
metaModelId
,
Object
...
factUniKey
);
List
<
ModelObj
>
getModelObjs
(
String
metaModelId
,
List
<
EntityObj
>
kEntityObjs
);
}
}
ibzlite-core/src/main/java/cn/ibizlab/core/lite/extensions/service/DbEntityService.java
浏览文件 @
c09471a8
...
@@ -93,6 +93,8 @@ public class DbEntityService extends ServiceImpl<DbEntityMapper, EntityObj> impl
...
@@ -93,6 +93,8 @@ public class DbEntityService extends ServiceImpl<DbEntityMapper, EntityObj> impl
@Autowired
@Autowired
private
LiteModelService
liteModelService
;
private
LiteModelService
liteModelService
;
@Override
public
List
<
ModelObj
>
getModelObjs
(
String
metaModelId
,
Timestamp
lastModify
)
public
List
<
ModelObj
>
getModelObjs
(
String
metaModelId
,
Timestamp
lastModify
)
{
{
DataModel
dataModel
=
JSON
.
toJavaObject
(
JSON
.
parseObject
(
metaModelService
.
get
(
metaModelId
).
getConfig
()),
DataModel
.
class
);
DataModel
dataModel
=
JSON
.
toJavaObject
(
JSON
.
parseObject
(
metaModelService
.
get
(
metaModelId
).
getConfig
()),
DataModel
.
class
);
...
@@ -108,6 +110,40 @@ public class DbEntityService extends ServiceImpl<DbEntityMapper, EntityObj> impl
...
@@ -108,6 +110,40 @@ public class DbEntityService extends ServiceImpl<DbEntityMapper, EntityObj> impl
return
getModelObjs
(
dataModel
,
kEntityObjs
);
return
getModelObjs
(
dataModel
,
kEntityObjs
);
}
}
@Override
public
ModelObj
getModelObjs
(
String
metaModelId
,
Object
factKey
)
{
DataModel
dataModel
=
JSON
.
toJavaObject
(
JSON
.
parseObject
(
metaModelService
.
get
(
metaModelId
).
getConfig
()),
DataModel
.
class
);
List
<
EntityObj
>
kEntityObjs
=
new
ArrayList
<>();
kEntityObjs
.
add
(
new
EntityObj
().
set
(
dataModel
.
getFactEntityModel
().
getKeyField
().
getColumnName
(),
factKey
));
List
<
ModelObj
>
list
=
getModelObjs
(
dataModel
,
kEntityObjs
);
if
(
list
.
size
()>
0
)
return
list
.
get
(
0
);
return
null
;
}
@Override
public
ModelObj
getModelObjs
(
String
metaModelId
,
Object
...
factUniKey
)
{
DataModel
dataModel
=
JSON
.
toJavaObject
(
JSON
.
parseObject
(
metaModelService
.
get
(
metaModelId
).
getConfig
()),
DataModel
.
class
);
List
<
EntityObj
>
kEntityObjs
=
new
ArrayList
<>();
EntityObj
entityObj
=
new
EntityObj
();
List
<
FieldModel
>
uniKeys
=
dataModel
.
getFactEntityModel
().
getUnionKeyFields
();
for
(
int
i
=
0
;
i
<
uniKeys
.
size
();
i
++)
entityObj
.
set
(
uniKeys
.
get
(
i
).
getColumnName
(),
factUniKey
[
i
]);
kEntityObjs
.
add
(
entityObj
);
List
<
ModelObj
>
list
=
getModelObjs
(
dataModel
,
kEntityObjs
);
if
(
list
.
size
()>
0
)
return
list
.
get
(
0
);
return
null
;
}
@Override
public
List
<
ModelObj
>
getModelObjs
(
String
metaModelId
,
List
<
EntityObj
>
kEntityObjs
)
{
DataModel
dataModel
=
JSON
.
toJavaObject
(
JSON
.
parseObject
(
metaModelService
.
get
(
metaModelId
).
getConfig
()),
DataModel
.
class
);
return
getModelObjs
(
dataModel
,
kEntityObjs
);
}
public
List
<
ModelObj
>
getModelObjs
(
DataModel
dataModel
,
List
<
EntityObj
>
kEntityObjs
)
public
List
<
ModelObj
>
getModelObjs
(
DataModel
dataModel
,
List
<
EntityObj
>
kEntityObjs
)
{
{
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/lite/extensions/service/LiteModelService.java
浏览文件 @
c09471a8
...
@@ -70,6 +70,10 @@ public class LiteModelService {
...
@@ -70,6 +70,10 @@ public class LiteModelService {
@Lazy
@Lazy
private
IDstComponentService
dstComponentService
;
private
IDstComponentService
dstComponentService
;
@Autowired
@Lazy
private
LiteModelService
proxyService
;
public
List
<
EntityModel
>
getEntityModel
(
String
systemId
)
public
List
<
EntityModel
>
getEntityModel
(
String
systemId
)
{
{
List
<
EntityModel
>
list
=
new
ArrayList
<>();
List
<
EntityModel
>
list
=
new
ArrayList
<>();
...
@@ -81,6 +85,11 @@ public class LiteModelService {
...
@@ -81,6 +85,11 @@ public class LiteModelService {
return
list
;
return
list
;
}
}
public
EntityModel
getProxyEntityModel
(
String
systemId
,
String
name
)
{
return
proxyService
.
getEntityModel
(
systemId
,
name
);
}
@Cacheable
(
value
=
"entitymodel"
,
key
=
"'row:'+#p0+'.'+#p1"
)
@Cacheable
(
value
=
"entitymodel"
,
key
=
"'row:'+#p0+'.'+#p1"
)
public
EntityModel
getEntityModel
(
String
systemId
,
String
name
)
public
EntityModel
getEntityModel
(
String
systemId
,
String
name
)
{
{
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/lite/extensions/service/MongoEntityService.java
浏览文件 @
c09471a8
...
@@ -2,9 +2,11 @@ package cn.ibizlab.core.lite.extensions.service;
...
@@ -2,9 +2,11 @@ package cn.ibizlab.core.lite.extensions.service;
import
cn.ibizlab.core.lite.extensions.domain.EntityModel
;
import
cn.ibizlab.core.lite.extensions.domain.EntityModel
;
import
cn.ibizlab.core.lite.extensions.domain.EntityObj
;
import
cn.ibizlab.core.lite.extensions.domain.EntityObj
;
import
cn.ibizlab.core.lite.extensions.domain.ModelObj
;
import
cn.ibizlab.util.filter.QueryFilter
;
import
cn.ibizlab.util.filter.QueryFilter
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.sql.Timestamp
;
import
java.util.List
;
import
java.util.List
;
@Service
@Service
...
@@ -29,4 +31,24 @@ public class MongoEntityService implements CommonEntityService{
...
@@ -29,4 +31,24 @@ public class MongoEntityService implements CommonEntityService{
public
List
<
EntityObj
>
search
(
String
dsName
,
String
sql
,
QueryFilter
filter
)
{
public
List
<
EntityObj
>
search
(
String
dsName
,
String
sql
,
QueryFilter
filter
)
{
return
null
;
return
null
;
}
}
@Override
public
List
<
ModelObj
>
getModelObjs
(
String
metaModelId
,
Timestamp
lastModify
)
{
return
null
;
}
@Override
public
ModelObj
getModelObjs
(
String
metaModelId
,
Object
factKey
)
{
return
null
;
}
@Override
public
ModelObj
getModelObjs
(
String
metaModelId
,
Object
...
factUniKey
)
{
return
null
;
}
@Override
public
List
<
ModelObj
>
getModelObjs
(
String
metaModelId
,
List
<
EntityObj
>
kEntityObjs
)
{
return
null
;
}
}
}
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录