Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzlite
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzlite
提交
7f802de5
提交
7f802de5
编写于
11月 29, 2020
作者:
sq3536
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
debug
上级
f4bafd8a
变更
4
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
17 行增加
和
8 行删除
+17
-8
DbEntityMapper.java
...ava/cn/ibizlab/core/extensions/mapper/DbEntityMapper.java
+0
-3
DstDataSourceExService.java
...izlab/core/extensions/service/DstDataSourceExService.java
+3
-3
DbEntityService.java
...ibizlab/core/lite/extensions/service/DbEntityService.java
+2
-2
DbEntityMapper.xml
...rc/main/resources/mapper/lite/dbentity/DbEntityMapper.xml
+12
-0
未找到文件。
ibzlite-core/src/main/java/cn/ibizlab/core/extensions/mapper/DbEntityMapper.java
浏览文件 @
7f802de5
...
@@ -10,8 +10,5 @@ import java.util.List;
...
@@ -10,8 +10,5 @@ import java.util.List;
public
interface
DbEntityMapper
extends
BaseMapper
<
EntityObj
>{
public
interface
DbEntityMapper
extends
BaseMapper
<
EntityObj
>{
@Select
(
"${sql} \n"
+
"<where><if test=\"ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere\">${ew.sqlSegment}</if></where> \n"
+
"<if test=\"ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere\">${ew.sqlSegment}</if> "
)
List
<
EntityObj
>
search
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"ew"
)
Wrapper
<
EntityObj
>
wrapper
);
List
<
EntityObj
>
search
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"ew"
)
Wrapper
<
EntityObj
>
wrapper
);
}
}
\ No newline at end of file
ibzlite-core/src/main/java/cn/ibizlab/core/extensions/service/DstDataSourceExService.java
浏览文件 @
7f802de5
...
@@ -46,8 +46,6 @@ public class DstDataSourceExService extends DstDataSourceServiceImpl {
...
@@ -46,8 +46,6 @@ public class DstDataSourceExService extends DstDataSourceServiceImpl {
{
{
DataSourceProperty
dataSourceProperty
=
new
DataSourceProperty
();
DataSourceProperty
dataSourceProperty
=
new
DataSourceProperty
();
DynamicRoutingDataSource
ds
=
dataSource
;
DynamicRoutingDataSource
ds
=
dataSource
;
DataSource
dataSource
=
druidDataSourceCreator
.
createDataSource
(
dataSourceProperty
);
List
<
Setting
>
settings
=
JSONArray
.
parseArray
(
dstDataSource
.
getDsCfg
(),
Setting
.
class
);
List
<
Setting
>
settings
=
JSONArray
.
parseArray
(
dstDataSource
.
getDsCfg
(),
Setting
.
class
);
for
(
Setting
setting:
settings
)
for
(
Setting
setting:
settings
)
{
{
...
@@ -62,6 +60,8 @@ public class DstDataSourceExService extends DstDataSourceServiceImpl {
...
@@ -62,6 +60,8 @@ public class DstDataSourceExService extends DstDataSourceServiceImpl {
else
if
(
setting
.
getProperty
().
equalsIgnoreCase
(
"defaultSchema"
))
else
if
(
setting
.
getProperty
().
equalsIgnoreCase
(
"defaultSchema"
))
dataSourceProperty
.
setSchema
(
setting
.
getValue
());
dataSourceProperty
.
setSchema
(
setting
.
getValue
());
}
}
DataSource
dataSource
=
druidDataSourceCreator
.
createDataSource
(
dataSourceProperty
);
ds
.
addDataSource
(
dstDataSource
.
getDsName
(),
dataSource
);
ds
.
addDataSource
(
dstDataSource
.
getDsName
(),
dataSource
);
}
}
...
@@ -79,7 +79,7 @@ public class DstDataSourceExService extends DstDataSourceServiceImpl {
...
@@ -79,7 +79,7 @@ public class DstDataSourceExService extends DstDataSourceServiceImpl {
public
void
initDataSource
(
String
dsName
)
public
void
initDataSource
(
String
dsName
)
{
{
if
(
dataSource
.
getDataSource
(
dsName
)==
null
)
//
if(dataSource.getDataSource(dsName)==null)
{
{
DstDataSource
dstDataSource
=
this
.
getOne
(
Wrappers
.<
DstDataSource
>
lambdaQuery
().
eq
(
DstDataSource:
:
getDsId
,
dsName
).
or
().
eq
(
DstDataSource:
:
getDsName
,
dsName
),
false
);
DstDataSource
dstDataSource
=
this
.
getOne
(
Wrappers
.<
DstDataSource
>
lambdaQuery
().
eq
(
DstDataSource:
:
getDsId
,
dsName
).
or
().
eq
(
DstDataSource:
:
getDsName
,
dsName
),
false
);
if
(
dstDataSource
!=
null
)
if
(
dstDataSource
!=
null
)
...
...
ibzlite-core/src/main/java/cn/ibizlab/core/lite/extensions/service/DbEntityService.java
浏览文件 @
7f802de5
...
@@ -100,8 +100,8 @@ public class DbEntityService extends ServiceImpl<DbEntityMapper, EntityObj> impl
...
@@ -100,8 +100,8 @@ public class DbEntityService extends ServiceImpl<DbEntityMapper, EntityObj> impl
FieldModel
lastModifyField
=
entityModel
.
getLastModifyField
();
FieldModel
lastModifyField
=
entityModel
.
getLastModifyField
();
QueryFilter
filter
=
new
QueryFilter
();
QueryFilter
filter
=
new
QueryFilter
();
if
(
lastModifyField
!=
null
)
//
if(lastModifyField!=null)
filter
.
ge
(
lastModifyField
.
getColumnName
(),
lastModify
);
//
filter.ge(lastModifyField.getColumnName(), lastModify);
List
<
EntityObj
>
kEntityObjs
=
this
.
selectCore
(
entityModel
,
filter
);
List
<
EntityObj
>
kEntityObjs
=
this
.
selectCore
(
entityModel
,
filter
);
...
...
ibzlite-core/src/main/resources/mapper/lite/dbentity/DbEntityMapper.xml
0 → 100644
浏览文件 @
7f802de5
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.ibizlab.core.extensions.mapper.DbEntityMapper"
>
<!--数据集合[Default]-->
<select
id=
"searchDefault"
parameterType=
"cn.ibizlab.core.lite.extensions.filter.DbEntitySearchContext"
resultType=
"cn.ibizlab.core.lite.extensions.domain.EntityObj"
>
${sql}
<where><if
test=
"ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere"
>
${ew.sqlSegment}
</if></where>
<if
test=
"ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere"
>
${ew.sqlSegment}
</if>
</select>
</mapper>
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录