Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzlite
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzlite
提交
91c6d4ae
提交
91c6d4ae
编写于
11月 23, 2020
作者:
sq3536
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
model
上级
fd82d109
变更
11
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
272 行增加
和
184 行删除
+272
-184
app-form-json.vue
app_web/src/components/app-form-json/app-form-json.vue
+48
-150
pom.xml
ibzlite-core/pom.xml
+6
-1
DstDataSourceExService.java
...izlab/core/extensions/service/DstDataSourceExService.java
+72
-3
DstSystemExService.java
...n/ibizlab/core/extensions/service/DstSystemExService.java
+37
-0
DataObj.java
.../java/cn/ibizlab/core/lite/extensions/domain/DataObj.java
+4
-4
EntityModel.java
...a/cn/ibizlab/core/lite/extensions/domain/EntityModel.java
+6
-6
EntityObj.java
...ava/cn/ibizlab/core/lite/extensions/domain/EntityObj.java
+38
-16
ModelObj.java
...java/cn/ibizlab/core/lite/extensions/domain/ModelObj.java
+19
-0
Setting.java
.../java/cn/ibizlab/core/lite/extensions/domain/Setting.java
+15
-0
DataModel.java
...java/cn/ibizlab/core/lite/extensions/model/DataModel.java
+15
-0
DbEntityService.java
...ibizlab/core/lite/extensions/service/DbEntityService.java
+12
-4
未找到文件。
app_web/src/components/app-form-json/app-form-json.vue
浏览文件 @
91c6d4ae
...
...
@@ -34,6 +34,22 @@ export default class AppFormJson extends Vue {
*/
@
Prop
()
public
data
!
:
any
;
/**
* 数据格式
*
* @type {*}
* @memberof AppFormJson
*/
@
Prop
()
public
schema
?:
any
;
/**
* 格式选项
*
* @type {*}
* @memberof AppFormJson
*/
@
Prop
()
public
options
?:
any
;
/**
* 当前值
*
...
...
@@ -104,6 +120,37 @@ export default class AppFormJson extends Vue {
*/
public
editor
:
any
;
public
getSchema
():
any
{
if
(
this
.
schema
)
return
this
.
schema
;
else
return
{};
}
public
getOptions
():
any
{
let
_options
=
{
theme
:
"bootstrap3"
,
iconlib
:
"fontawesome4"
,
disable_edit_json
:
true
,
display_required_only
:
true
,
disable_collapse
:
true
,
disable_array_delete_last_row
:
true
,
ajax
:
true
,
};
_options
[
"schema"
]
=
this
.
getSchema
();
if
(
this
.
CurrentVal
)
{
_options
[
"startval"
]
=
JSON
.
parse
(
this
.
CurrentVal
);
}
if
(
this
.
options
){
return
Object
.
assign
({},
_options
,
this
.
options
)
}
return
_options
;
}
/**
* 编辑器生成
*
...
...
@@ -116,157 +163,8 @@ export default class AppFormJson extends Vue {
this
.
editor
.
destroy
();
}
let
_schema
=
{
$ref
:
"#/definitions/model"
,
definitions
:
{
model
:
{
title
:
"模型"
,
headerTemplate
:
"{{ self.dataModelName }}"
,
type
:
"object"
,
format
:
"grid"
,
properties
:
{
dataModelName
:
{
title
:
"模型名"
,
type
:
"string"
,
options
:
{
grid_columns
:
4
,
},
propertyOrder
:
1
,
},
objectProperties
:
{
title
:
"对象参数集合"
,
type
:
"array"
,
format
:
"tabs"
,
uniqueItems
:
true
,
items
:
{
title
:
"对象"
,
headerTemplate
:
"{{ self.propertyName }}"
,
type
:
"object"
,
properties
:
{
propertyName
:
{
title
:
"对象"
,
type
:
"string"
,
options
:
{
grid_columns
:
4
,
},
propertyOrder
:
1
,
},
system
:
{
title
:
"系统"
,
type
:
"string"
,
options
:
{
grid_columns
:
4
,
},
propertyOrder
:
2
,
},
propertyEntity
:
{
title
:
"结构实体"
,
type
:
"string"
,
options
:
{
grid_columns
:
4
,
},
propertyOrder
:
3
,
},
propertyMappings
:
{
title
:
"对象关系映射"
,
type
:
"array"
,
format
:
"table"
,
uniqueItems
:
true
,
items
:
{
title
:
"映射"
,
type
:
"object"
,
properties
:
{
selfPropertyColumn
:
{
title
:
"列"
,
type
:
"string"
,
options
:
{
grid_columns
:
4
,
},
propertyOrder
:
1
,
},
joinPropertyName
:
{
title
:
"关联对象"
,
type
:
"string"
,
options
:
{
grid_columns
:
4
,
},
propertyOrder
:
2
,
},
joinPropertyColumn
:
{
title
:
"关联列"
,
type
:
"string"
,
options
:
{
grid_columns
:
4
,
},
propertyOrder
:
3
,
},
},
},
propertyOrder
:
4
,
},
},
},
propertyOrder
:
2
,
},
nestedDataModels
:
{
title
:
"嵌套子模型集合"
,
type
:
"array"
,
format
:
"tabs"
,
uniqueItems
:
true
,
items
:
{
title
:
"子模型"
,
$ref
:
"#/definitions/model"
,
},
propertyOrder
:
3
,
},
layerMappings
:
{
title
:
"模型上下级映射"
,
type
:
"array"
,
format
:
"table"
,
uniqueItems
:
true
,
items
:
{
title
:
"映射"
,
type
:
"object"
,
properties
:
{
selfPropertyColumn
:
{
title
:
"列"
,
type
:
"string"
,
options
:
{
grid_columns
:
4
,
},
propertyOrder
:
1
,
},
parentPropertyColumn
:
{
title
:
"父模型列"
,
type
:
"string"
,
options
:
{
grid_columns
:
4
,
},
propertyOrder
:
2
,
},
},
},
propertyOrder
:
4
,
},
},
},
},
};
let
opt
:
any
=
{
schema
:
_schema
,
theme
:
"bootstrap3"
,
iconlib
:
"fontawesome4"
,
disable_edit_json
:
true
,
display_required_only
:
true
,
disable_collapse
:
true
,
disable_array_delete_last_row
:
true
,
ajax
:
true
,
};
if
(
this
.
CurrentVal
)
{
opt
[
"startval"
]
=
JSON
.
parse
(
this
.
CurrentVal
);
}
this
.
editor
=
new
JSONEditor
(
element
,
opt
);
this
.
editor
=
new
JSONEditor
(
element
,
_this
.
getOptions
()
);
this
.
editor
.
on
(
"change"
,
()
=>
{
let
value
=
_this
.
editor
.
getValue
();
...
...
ibzlite-core/pom.xml
浏览文件 @
91c6d4ae
...
...
@@ -98,7 +98,12 @@
<artifactId>
jobs-spring-boot-starter
</artifactId>
</dependency>
<!--达梦数据库-->
<dependency>
<groupId>
com.dameng
</groupId>
<artifactId>
Dm7JdbcDriver17
</artifactId>
<version>
7.6.0.165
</version>
</dependency>
</dependencies>
<properties>
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/extensions/service/DstDataSourceExService.java
浏览文件 @
91c6d4ae
package
cn
.
ibizlab
.
core
.
extensions
.
service
;
import
cn.ibizlab.core.lite.extensions.domain.Setting
;
import
cn.ibizlab.core.lite.service.IDstDataSourceService
;
import
cn.ibizlab.core.lite.service.impl.DstDataSourceServiceImpl
;
import
com.alibaba.fastjson.JSONArray
;
import
com.baomidou.dynamic.datasource.DynamicRoutingDataSource
;
import
com.baomidou.dynamic.datasource.creator.DruidDataSourceCreator
;
import
com.baomidou.dynamic.datasource.spring.boot.autoconfigure.DataSourceProperty
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
lombok.extern.slf4j.Slf4j
;
import
cn.ibizlab.core.lite.domain.DstDataSource
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.context.annotation.Primary
;
import
org.springframework.util.StringUtils
;
import
javax.sql.DataSource
;
import
java.util.*
;
/**
...
...
@@ -23,13 +34,71 @@ public class DstDataSourceExService extends DstDataSourceServiceImpl {
/**
* [BuildDS:buildDS] 行为扩展
* @param
et
* @param
dstDataSource
* @return
*/
@Override
@Transactional
public
DstDataSource
buildDS
(
DstDataSource
et
)
{
return
super
.
buildDS
(
et
);
public
DstDataSource
buildDS
(
DstDataSource
dstDataSource
)
{
if
(!(
StringUtils
.
isEmpty
(
dstDataSource
.
getDsCfg
())))
{
DataSourceProperty
dataSourceProperty
=
new
DataSourceProperty
();
DynamicRoutingDataSource
ds
=
(
DynamicRoutingDataSource
)
dataSource
;
DataSource
dataSource
=
druidDataSourceCreator
.
createDataSource
(
dataSourceProperty
);
List
<
Setting
>
settings
=
JSONArray
.
parseArray
(
dstDataSource
.
getDsCfg
(),
Setting
.
class
);
for
(
Setting
setting:
settings
)
{
if
(
setting
.
getProperty
().
equalsIgnoreCase
(
"driver-class-name"
))
dataSourceProperty
.
setDriverClassName
(
setting
.
getValue
());
else
if
(
setting
.
getProperty
().
equalsIgnoreCase
(
"username"
))
dataSourceProperty
.
setUsername
(
setting
.
getValue
());
else
if
(
setting
.
getProperty
().
equalsIgnoreCase
(
"password"
))
dataSourceProperty
.
setPassword
(
setting
.
getValue
());
else
if
(
setting
.
getProperty
().
equalsIgnoreCase
(
"url"
))
dataSourceProperty
.
setUrl
(
setting
.
getValue
());
else
if
(
setting
.
getProperty
().
equalsIgnoreCase
(
"defaultSchema"
))
dataSourceProperty
.
setSchema
(
setting
.
getValue
());
}
ds
.
addDataSource
(
dstDataSource
.
getDsName
(),
dataSource
);
}
return
super
.
buildDS
(
dstDataSource
);
}
@Autowired
private
DataSource
dataSource
;
@Autowired
private
DruidDataSourceCreator
druidDataSourceCreator
;
public
void
initDataSource
(
String
dsName
)
{
DynamicRoutingDataSource
ds
=
(
DynamicRoutingDataSource
)
dataSource
;
if
(
ds
.
getDataSource
(
dsName
)==
null
)
{
DstDataSource
dstDataSource
=
this
.
getOne
(
Wrappers
.<
DstDataSource
>
lambdaQuery
().
eq
(
DstDataSource:
:
getDsId
,
dsName
).
or
().
eq
(
DstDataSource:
:
getDsName
,
dsName
),
false
);
if
(
dstDataSource
!=
null
)
{
dstDataSource
.
setDsName
(
dsName
);
buildDS
(
dstDataSource
);
}
}
}
@Override
public
boolean
update
(
DstDataSource
et
)
{
if
(!
super
.
update
(
et
))
return
false
;
DynamicRoutingDataSource
ds
=
(
DynamicRoutingDataSource
)
dataSource
;
if
(
ds
.
getDataSource
(
et
.
getDsId
())!=
null
)
ds
.
removeDataSource
(
et
.
getDsId
());
if
(
ds
.
getDataSource
(
et
.
getDsName
())!=
null
)
ds
.
removeDataSource
(
et
.
getDsName
());
buildDS
(
et
);
return
true
;
}
}
ibzlite-core/src/main/java/cn/ibizlab/core/extensions/service/DstSystemExService.java
浏览文件 @
91c6d4ae
package
cn
.
ibizlab
.
core
.
extensions
.
service
;
import
cn.ibizlab.core.lite.domain.DstDataSource
;
import
cn.ibizlab.core.lite.domain.DstSystem
;
import
cn.ibizlab.core.lite.service.IDstDataSourceService
;
import
cn.ibizlab.core.lite.service.impl.DstSystemServiceImpl
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Primary
;
import
org.springframework.stereotype.Service
;
import
java.sql.Wrapper
;
/**
* 实体[系统] 自定义服务对象
*/
...
...
@@ -18,5 +25,35 @@ public class DstSystemExService extends DstSystemServiceImpl {
return
com
.
baomidou
.
mybatisplus
.
core
.
toolkit
.
ReflectionKit
.
getSuperClassGenericType
(
this
.
getClass
().
getSuperclass
(),
1
);
}
@Autowired
private
IDstDataSourceService
dstDataSourceService
;
@Override
public
DstSystem
initDefaultDataSource
(
DstSystem
et
)
{
String
dsName
=
et
.
getPssystemid
()+
"-master"
;
if
(
dstDataSourceService
.
count
(
Wrappers
.<
DstDataSource
>
lambdaQuery
().
eq
(
DstDataSource:
:
getDsId
,
dsName
).
or
().
eq
(
DstDataSource:
:
getDsName
,
dsName
))>
0
)
return
et
;
DstDataSource
dstDataSource
=
new
DstDataSource
();
dstDataSource
.
setDsId
(
dsName
);
dstDataSource
.
setDsName
(
dsName
);
dstDataSourceService
.
create
(
dstDataSource
);
return
super
.
initDefaultDataSource
(
et
);
}
@Override
public
boolean
create
(
DstSystem
et
)
{
if
(!
super
.
create
(
et
))
return
false
;
initDefaultDataSource
(
et
);
return
true
;
}
@Override
public
boolean
update
(
DstSystem
et
)
{
if
(!
super
.
create
(
et
))
return
false
;
initDefaultDataSource
(
et
);
return
true
;
}
}
ibzlite-core/src/main/java/cn/ibizlab/core/lite/extensions/domain/DataObj.java
浏览文件 @
91c6d4ae
...
...
@@ -17,22 +17,22 @@ public class DataObj<K,V> extends ConcurrentHashMap<K,V> {
public
String
getRowKey
()
{
return
this
.
getStringValue
(
"ROWKEY"
,
""
);
return
this
.
getStringValue
(
"
_
ROWKEY"
,
""
);
}
public
<
T
>
T
setRowKey
(
String
rowKey
)
{
return
this
.
set
(
"ROWKEY"
,(
V
)
rowKey
);
return
this
.
set
(
"
_
ROWKEY"
,(
V
)
rowKey
);
}
public
Timestamp
getTimestamp
()
{
return
getTimestampBegin
(
"TIMESTAMP"
);
return
getTimestampBegin
(
"
_
TIMESTAMP"
);
}
public
<
T
>
T
setTimestamp
(
Timestamp
timestamp
)
{
return
this
.
set
(
"TIMESTAMP"
,(
V
)
DataObject
.
getTimestampValue
(
timestamp
,
DataObject
.
getBeginDate
()));
return
this
.
set
(
"
_
TIMESTAMP"
,(
V
)
DataObject
.
getTimestampValue
(
timestamp
,
DataObject
.
getBeginDate
()));
}
public
<
T
>
T
set
(
String
key
,
V
value
)
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/lite/extensions/domain/EntityModel.java
浏览文件 @
91c6d4ae
...
...
@@ -76,7 +76,8 @@ public class EntityModel {
return
fieldMap
;
}
@JsonIgnore
@JSONField
(
serialize
=
false
)
private
FieldModel
lastModifyField
;
@JsonIgnore
@JSONField
(
serialize
=
false
)
...
...
@@ -238,13 +239,12 @@ public class EntityModel {
{
if
(!(
StringUtils
.
isEmpty
(
this
.
getEntity
().
getExtParams
())))
{
JSONArray
ja
=
JSONArray
.
parseArray
(
this
.
getEntity
().
getExtParams
()
);
for
(
int
i
=
0
;
i
<
ja
.
size
();
i
++
)
List
<
Setting
>
settings
=
JSONArray
.
parseArray
(
this
.
getEntity
().
getExtParams
(),
Setting
.
class
);
for
(
Setting
setting:
settings
)
{
JSONObject
jo
=
ja
.
getJSONObject
(
i
);
if
(
jo
.
containsKey
(
"property"
)&&
key
.
equals
(
jo
.
getString
(
"property"
)))
if
(
key
.
equals
(
setting
.
getValue
()))
{
return
jo
.
getString
(
"value"
);
return
setting
.
getValue
(
);
}
}
}
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/lite/extensions/domain/EntityObj.java
浏览文件 @
91c6d4ae
...
...
@@ -4,35 +4,30 @@ package cn.ibizlab.core.lite.extensions.domain;
import
cn.ibizlab.core.lite.extensions.model.DataModel
;
import
cn.ibizlab.core.lite.extensions.model.Property
;
import
cn.ibizlab.core.lite.extensions.util.LiteStorage
;
import
cn.ibizlab.util.helper.DataObject
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
org.springframework.util.StringUtils
;
import
java.sql.Timestamp
;
import
java.util.HashMap
;
import
java.util.List
;
public
class
EntityObj
extends
DataObj
<
String
,
Object
>
{
@JsonIgnore
@JSONField
(
serialize
=
false
)
private
EntityModel
entityModel
;
@JsonIgnore
@JSONField
(
serialize
=
false
)
public
EntityModel
getEntityModel
()
{
return
entityModel
;
return
getProperty
().
getEntityModel
()
;
}
@JsonIgnore
@JSONField
(
serialize
=
false
)
private
DataModel
dataModel
;
@JsonIgnore
@JSONField
(
serialize
=
false
)
public
DataModel
getDataModel
()
{
return
dataModel
;
return
getProperty
().
getOwnerDataModel
()
;
}
@JsonIgnore
...
...
@@ -53,39 +48,55 @@ public class EntityObj extends DataObj<String,Object> {
this
.
setDstSystemId
(
property
.
getSystem
());
if
(!
StringUtils
.
isEmpty
(
property
.
getPropertyEntity
()))
this
.
setMetaEntityName
(
property
.
getPropertyEntity
());
this
.
entityModel
=
property
.
getEntityModel
();
this
.
dataModel
=
property
.
getOwnerDataModel
(
);
if
(!
StringUtils
.
isEmpty
(
property
.
getPropertyName
()))
this
.
setPropertyName
(
property
.
getPropertyName
()
);
}
this
.
property
=
property
;
return
this
;
}
@JsonIgnore
@JSONField
(
serialize
=
false
)
public
String
getPropertyName
()
{
return
this
.
getStringValue
(
"_PROPERTYNAME"
,
""
);
}
@JsonIgnore
@JSONField
(
serialize
=
false
)
public
EntityObj
setPropertyName
(
String
propertyName
)
{
return
this
.
set
(
"_PROPERTYNAME"
,
propertyName
);
}
@JsonIgnore
@JSONField
(
serialize
=
false
)
public
String
getMetaEntityName
()
{
return
this
.
getStringValue
(
"METAENTITYNAME"
,
""
);
return
this
.
getStringValue
(
"
_
METAENTITYNAME"
,
""
);
}
@JsonIgnore
@JSONField
(
serialize
=
false
)
public
EntityObj
setMetaEntityName
(
String
metaEntityName
)
{
return
this
.
set
(
"METAENTITYNAME"
,
metaEntityName
);
return
this
.
set
(
"
_
METAENTITYNAME"
,
metaEntityName
);
}
@JsonIgnore
@JSONField
(
serialize
=
false
)
public
String
getDstSystemId
()
{
return
this
.
getStringValue
(
"DSTSYSTEMID"
,
""
);
return
this
.
getStringValue
(
"
_
DSTSYSTEMID"
,
""
);
}
@JsonIgnore
@JSONField
(
serialize
=
false
)
public
EntityObj
setDstSystemId
(
String
dstSystemId
)
{
return
this
.
set
(
"DSTSYSTEMID"
,
dstSystemId
);
return
this
.
set
(
"
_
DSTSYSTEMID"
,
dstSystemId
);
}
...
...
@@ -118,7 +129,18 @@ public class EntityObj extends DataObj<String,Object> {
return
rowKey
;
}
public
void
findModel
(
List
<
ModelObj
>
modelObjs
)
@Override
public
Timestamp
getTimestamp
()
{
Timestamp
lastModify
=
super
.
getTimestamp
();
if
(
lastModify
.
equals
(
DataObject
.
getBeginDate
())&&
this
.
getEntityModel
().
getLastModifyField
()!=
null
)
{
lastModify
=
this
.
getTimestampBegin
(
this
.
getEntityModel
().
getLastModifyField
().
getColumnName
());
this
.
setTimestamp
(
lastModify
);
}
return
super
.
getTimestamp
();
}
public
void
findModel
(
List
<
ModelObj
>
modelObjs
)
{
HashMap
<
String
,
ModelObj
>
tmps
=
new
HashMap
<
String
,
ModelObj
>();
modelObjs
.
forEach
(
obj
->
tmps
.
put
(
obj
.
getRowKey
(),
obj
));
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/lite/extensions/domain/ModelObj.java
浏览文件 @
91c6d4ae
...
...
@@ -29,10 +29,29 @@ public class ModelObj extends DataObj<String,Object> {
@JsonIgnore
@JSONField
(
serialize
=
false
)
public
ModelObj
setDataModel
(
DataModel
dataModel
)
{
if
(
dataModel
!=
null
)
{
if
(!
StringUtils
.
isEmpty
(
dataModel
.
getDataModelId
()))
this
.
setDataModelId
(
dataModel
.
getDataModelId
());
}
this
.
dataModel
=
dataModel
;
return
this
;
}
@JsonIgnore
@JSONField
(
serialize
=
false
)
public
String
getDataModelId
()
{
return
this
.
getStringValue
(
"_DATAMODELID"
,
""
);
}
@JsonIgnore
@JSONField
(
serialize
=
false
)
public
EntityObj
setDataModelId
(
String
dataModelId
)
{
return
this
.
set
(
"_DATAMODELID"
,
dataModelId
);
}
@JsonIgnore
@JSONField
(
serialize
=
false
)
private
ModelObj
parent
;
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/lite/extensions/domain/Setting.java
0 → 100644
浏览文件 @
91c6d4ae
package
cn
.
ibizlab
.
core
.
lite
.
extensions
.
domain
;
import
lombok.Getter
;
import
lombok.NoArgsConstructor
;
import
lombok.Setter
;
import
lombok.experimental.Accessors
;
@Getter
@Setter
@NoArgsConstructor
@Accessors
(
chain
=
true
)
public
class
Setting
{
private
String
property
;
private
String
value
;
}
ibzlite-core/src/main/java/cn/ibizlab/core/lite/extensions/model/DataModel.java
浏览文件 @
91c6d4ae
...
...
@@ -60,6 +60,21 @@ public class DataModel {
return
this
.
getRootFactPorperty
().
getFactPorperty
();
}
@JSONField
(
ordinal
=
0
)
private
String
dataModelId
;
public
String
getDataModelId
()
{
if
(
StringUtils
.
isEmpty
(
dataModelId
))
{
if
(
this
.
getParentDataModel
()!=
null
)
return
this
.
getRootDataModel
().
getDataModelId
()+
":"
+
this
.
getDataModelName
();
else
return
this
.
getDataModelName
();
}
return
dataModelId
;
}
@JSONField
(
ordinal
=
1
)
private
String
dataModelName
;
public
String
getDataModelName
()
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/lite/extensions/service/DbEntityService.java
浏览文件 @
91c6d4ae
package
cn
.
ibizlab
.
core
.
lite
.
extensions
.
service
;
import
cn.ibizlab.core.lite.extensions.domain.EntityModel
;
import
cn.ibizlab.core.lite.extensions.domain.EntityObj
;
import
cn.ibizlab.core.lite.extensions.domain.FieldModel
;
import
cn.ibizlab.core.lite.extensions.domain.ModelObj
;
import
cn.ibizlab.core.lite.domain.DstDataSource
;
import
cn.ibizlab.core.lite.extensions.domain.*
;
import
cn.ibizlab.core.lite.extensions.filter.DbEntitySearchContext
;
import
cn.ibizlab.core.lite.extensions.model.DataModel
;
import
cn.ibizlab.core.lite.extensions.model.Property
;
import
cn.ibizlab.core.lite.extensions.util.LiteStorage
;
import
cn.ibizlab.core.extensions.mapper.DbEntityMapper
;
import
cn.ibizlab.core.lite.service.IDstDataSourceService
;
import
cn.ibizlab.util.filter.QueryFilter
;
import
com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
...
...
@@ -19,7 +18,9 @@ import org.springframework.context.annotation.Primary;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.StringUtils
;
import
javax.sql.DataSource
;
import
java.sql.Timestamp
;
import
java.sql.Wrapper
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.LinkedHashMap
;
...
...
@@ -30,6 +31,13 @@ import java.util.List;
@Slf4j
public
class
DbEntityService
extends
ServiceImpl
<
DbEntityMapper
,
EntityObj
>
implements
CommonEntityService
{
@Autowired
private
IDstDataSourceService
dstDataSourceService
;
@Override
public
List
<
EntityObj
>
selectBase
(
EntityModel
entityModel
,
QueryFilter
filter
)
{
return
search
(
"BASE"
,
entityModel
,
filter
);
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录